Copy disabled (too large)
Download .txt
Showing preview only (15,996K chars total). Download the full file to get everything.
Repository: geekcomputers/Python
Branch: master
Commit: 9e0c7e83f2c0
Files: 1428
Total size: 16.3 MB
Directory structure:
gitextract_30r9y9e1/
├── .circleci/
│ └── config.yml
├── .github/
│ ├── dependabot.yml
│ └── workflows/
│ ├── Codeql.yml
│ └── python.yml
├── .gitignore
├── 1 File handle/
│ ├── File handle binary/
│ │ ├── Update a binary file2.py
│ │ ├── delete.py
│ │ ├── question 1 (elegible for remedial, top marks).py
│ │ ├── read.py
│ │ ├── search record in binary file.py
│ │ └── update2.py
│ └── File handle text/
│ ├── counter.py
│ ├── file handle 12 length of line in text file.py
│ ├── happy.txt
│ ├── input,output and error streams.py
│ ├── question 2.py
│ ├── question 5.py
│ ├── question 6.py
│ ├── question3.py
│ ├── special symbol after word.py
│ └── story.txt
├── 8_puzzle.py
├── A solution to project euler problem 3.py
├── AREA OF TRIANGLE.py
├── ARKA.py
├── ASCIIvaluecharacter.py
├── Add_two_Linked_List.py
├── Anonymous_TextApp.py
├── AreaOfTriangle.py
├── Armstrong_number
├── Armstrong_number.py
├── Assembler/
│ ├── GUIDE.txt
│ ├── README.md
│ ├── assembler.py
│ ├── examples/
│ │ ├── code.txt
│ │ ├── code2.txt
│ │ ├── code3.txt
│ │ ├── code4.txt
│ │ ├── klmn
│ │ └── test.txt
│ └── requirements.txt
├── Audio_Summarizer.py
├── AutoComplete_App/
│ ├── backend.py
│ └── frontend.py
├── Automated Scheduled Call Reminders/
│ ├── caller.py
│ ├── requirements.txt
│ └── schedular.py
├── Bank Application .ipynb
├── Base Converter Number system.py
├── Battery_notifier.py
├── Binary Coefficients.py
├── Binary_search.py
├── Binary_to_Decimal.py
├── BlackJack_game/
│ ├── blackjack.py
│ ├── blackjack_rr.py
│ ├── blackjack_simulate.py
│ └── requirements.txt
├── BoardGame-CLI/
│ ├── python.py
│ ├── snakeLadder.py
│ └── uno.py
├── BrowserHistory/
│ ├── backend.py
│ ├── rock_paper_scissors.py
│ └── tests/
│ └── test_browser_history.py
├── BruteForce.py
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── CRC/
│ └── crc.py
├── CSV_file.py
├── Caesar Cipher Encoder & Decoder.py
├── Calculate resistance.py
├── Calculator with simple ui.py
├── Calendar (GUI).py
├── Cat/
│ ├── cat.py
│ ├── text_a.txt
│ ├── text_b.txt
│ └── text_c.txt
├── Checker_game_by_dz/
│ ├── __init__.py
│ ├── first.py
│ └── modules/
│ ├── __init__.py
│ ├── checker.py
│ ├── checker_board.py
│ ├── pieces.py
│ └── statics.py
├── Chrome Dino Automater.py
├── Classification_human_or_horse.py
├── CliYoutubeDownloader/
│ ├── CliYoutubeDownloader.py
│ └── requirements.txt
├── CliYoutubeDownloader.py
├── Collatz Sequence/
│ ├── Collatz Sequence.py
│ └── Collaze-Visualize.py
├── Collatz-Conjecture.py
├── Colors/
│ ├── multicoloredline.py
│ ├── pixel_sort.py
│ ├── primary_colors.py
│ └── print_colors.py
├── Compression_Analysis/
│ └── PSNR.py
├── Conversation.py
├── CountMillionCharacter.py
├── CountMillionCharacters-2.0.py
├── CountMillionCharacters-Variations/
│ └── variation1.py
├── Crack_password.py
├── Credit_Card_Validator.py
├── Cricket_score.py
├── Day_of_week.py
├── Decimal number to binary function.py
├── Decimal_To_Binary.py
├── Delete_Linked_List.py
├── Detect_Remove_loop.py
├── Dictionary opperations (input,update a dict).py
├── Divide Operator.py
├── Downloaded Files Organizer/
│ ├── browser_status.py
│ ├── move_to_directory.py
│ ├── obs.py
│ ├── readme.md
│ └── requirements.txt
├── Droplistmenu/
│ ├── GamesCalender.py
│ └── README.md
├── Electronics_Algorithms/
│ ├── Ohms_law.py
│ └── resistance.py
├── Email-Automation.py
├── Emoji Dictionary/
│ ├── QT_GUI.py
│ ├── QT_GUI.ui
│ ├── README.md
│ ├── emoji_dictionary.py
│ ├── requirements.txt
│ └── untitled.ui
├── Encryption using base64.py
├── EncryptionTool.py
├── Exception_Handling_in_Python.py
├── Extract-Table-from-pdf-txt-docx/
│ ├── Parent/
│ │ ├── Child1/
│ │ │ ├── Document_Child1.docx
│ │ │ └── Text_Child1.txt
│ │ ├── Child2/
│ │ │ ├── Document_Child2.docx
│ │ │ └── Text_Child2.txt
│ │ └── Child3/
│ │ ├── Document_Child3.docx
│ │ └── Text_Child3.txt
│ └── main.py
├── ExtractThumbnailFromVideo/
│ ├── README.md
│ └── extract_thumbnail_from_video.py
├── Extract_Text_from_image.py
├── FIND FACTORIAL OF A NUMBER.py
├── Face and eye Recognition/
│ ├── face_recofnation_first.py
│ └── gesture_control.py
├── Face_Mask_detection (haarcascade)/
│ ├── Resources/
│ │ ├── haarcascade_frontalface_default.xml
│ │ └── keras_model.h5
│ └── mask_detection.py
├── FibonacciNumbersWithGenerators.py
├── Fibonacci_sequence_recursive_sol.py
├── Find current weather of any city using openweathermap API.py
├── FindingResolutionOfAnImage.py
├── FizzBuzz.py
├── Flappy Bird - created with tkinter/
│ ├── .gitignore
│ ├── Background.py
│ ├── Bird.py
│ ├── Flappy Bird.py
│ ├── README.md
│ ├── Settings.py
│ └── Tubes.py
├── Generate a random number between 0 to 9.py
├── Google_Image_Downloader/
│ ├── create_dir.py
│ └── image_grapper.py
├── Google_News.py
├── Gregorian_Calendar.py
├── Grocery calculator.py
├── GroupSms_Way2.py
├── Guess_the_number_game.py
├── Guessing_Game.py
├── HTML_to_PDF/
│ ├── index.html
│ └── main.py
├── Hand-Motion-Detection/
│ ├── hand_motion_recognizer.py
│ └── requirements.txt
├── HangMan Game.py
├── Hangman.py
├── Hotel-Management.py
├── Image-watermarker/
│ ├── README.md
│ ├── app.py
│ ├── requirements.txt
│ └── watermark.py
├── ImageDownloader/
│ ├── img_downloader.py
│ └── requirements.txt
├── Image_resize.py
├── Industrial_developed_hangman/
│ ├── Data/
│ │ ├── local_words.txt
│ │ └── text_images.txt
│ ├── Makefile
│ ├── README.md
│ ├── pyproject.toml
│ ├── pytest.ini
│ ├── setup.cfg
│ ├── src/
│ │ └── hangman/
│ │ ├── __init__.py
│ │ └── main.py
│ └── tests/
│ ├── __init__.py
│ └── test_hangman/
│ ├── __init__.py
│ └── test_main.py
├── Infix_to_Postfix.py
├── Insert_operation_on_Linked_List.py
├── JARVIS/
│ ├── JARVIS_2.0.py
│ ├── README.md
│ └── requirements.txt
├── Job_scheduling.py
├── JsonParser.py
├── JustDialScrapperGUI/
│ └── Justdial Scrapper GUI.py
├── Key_Binding/
│ ├── key_binding.py
│ └── requirement.txt
├── Kilometerstomile.py
├── Koch Curve/
│ ├── README.txt
│ └── koch curve.py
├── LETTER GUESSER.py
├── LICENSE.md
├── Laundary System/
│ ├── README.md
│ └── code.py
├── Letter_Counter.py
├── LinkedLists all Types/
│ ├── circular_linked_list.py
│ ├── doubly_linked_list.py
│ └── singly_linked_list.py
├── List.py
├── Luhn_Algorithm.py
├── ML/
│ ├── .gitignore
│ ├── CLI_USAGE_SUMMARY.md
│ ├── CMakeLists.txt
│ ├── DATASETS.md
│ ├── DOCUMENTATION.md
│ ├── EXAMPLES.md
│ ├── FEATURES.md
│ ├── INSTALL_CLI.md
│ ├── LAUNCH_GUI.bat
│ ├── LAUNCH_GUI.sh
│ ├── LICENSE
│ ├── PROJECT_SUMMARY.md
│ ├── QUICKSTART.md
│ ├── QUICKSTART_GUI.md
│ ├── README.md
│ ├── examples/
│ │ ├── neural_architecture_search.py
│ │ ├── train_cifar10.py
│ │ └── train_custom.py
│ ├── pyproject.toml
│ ├── requirements.txt
│ ├── run.ps1
│ ├── run.sh
│ ├── src/
│ │ ├── cpp/
│ │ │ ├── extension.cpp
│ │ │ ├── include/
│ │ │ │ └── cuda_ops.h
│ │ │ └── operators.cpp
│ │ ├── cuda/
│ │ │ ├── activations.cu
│ │ │ ├── kernels.cu
│ │ │ ├── matmul.cu
│ │ │ └── optimizers.cu
│ │ └── python/
│ │ └── neuralforge/
│ │ ├── __init__.py
│ │ ├── cli/
│ │ │ ├── __init__.py
│ │ │ ├── gui.py
│ │ │ ├── nas.py
│ │ │ ├── test.py
│ │ │ └── train.py
│ │ ├── config.py
│ │ ├── data/
│ │ │ ├── __init__.py
│ │ │ ├── augmentation.py
│ │ │ ├── dataset.py
│ │ │ ├── datasets.py
│ │ │ └── transforms.py
│ │ ├── models/
│ │ │ ├── __init__.py
│ │ │ ├── efficientnet.py
│ │ │ ├── resnet.py
│ │ │ └── vit.py
│ │ ├── nas/
│ │ │ ├── __init__.py
│ │ │ ├── evaluator.py
│ │ │ ├── evolution.py
│ │ │ └── search_space.py
│ │ ├── nn/
│ │ │ ├── __init__.py
│ │ │ ├── activations.py
│ │ │ ├── attention.py
│ │ │ ├── convolution.py
│ │ │ ├── layers.py
│ │ │ └── modules.py
│ │ ├── optim/
│ │ │ ├── __init__.py
│ │ │ ├── optimizers.py
│ │ │ └── schedulers.py
│ │ ├── trainer.py
│ │ └── utils/
│ │ ├── __init__.py
│ │ ├── logger.py
│ │ ├── metrics.py
│ │ └── visualization.py
│ ├── tests/
│ │ ├── README_GUI.md
│ │ ├── SUPPORTED_DATASETS.txt
│ │ ├── gui_test.py
│ │ ├── quick_test.py
│ │ └── test_model.py
│ └── train.py
├── ML House Prediction.ipynb
├── Mad Libs Generator.py
├── Memory_game.py
├── Merge_linked_list.py
├── MobiusFunction.py
├── Model Usage.ipynb
├── Mp3_media_player.py
├── Multiply.py
├── MySQL_Databses.py
├── News_App/
│ ├── Newsapp.py
│ ├── README.md
│ ├── patterns.py
│ └── requirements.txt
├── NumPy Array Exponentiation.py
├── Number reverse.py
├── Organise.py
├── PDF/
│ ├── basic.py
│ ├── demerge_pdfs.py
│ ├── header_footer.py
│ ├── images.py
│ └── requirements.txt
├── PDFtoAudiobook.py
├── PONG_GAME.py
├── PORT SCANNER.PY
├── Palindrome_Checker.py
├── Password Generator/
│ ├── pass_gen.py
│ ├── requirements.txt
│ └── requirements_new.txt
├── Password Manager Using Tkinter/
│ ├── PGV.py
│ ├── README.md
│ ├── data.json
│ ├── data.txt
│ ├── main.py
│ └── requirements.txt
├── Patterns/
│ ├── half triangle pattern.py
│ ├── pattern2.py
│ ├── pattern5.py
│ ├── pattern6.py
│ └── patterns.py
├── Pc_information.py
├── Personal-Expense-Tracker/
│ ├── README.md
│ └── expense_tracker.py
├── PingPong/
│ ├── Ball.py
│ ├── Slab.py
│ └── main.py
├── Polyline.py
├── Pomodoro (tkinter).py
├── PongPong_Game/
│ ├── README.md
│ ├── pong/
│ │ ├── __init__.py
│ │ ├── ball.py
│ │ ├── load.py
│ │ ├── paddle.py
│ │ └── rectangle.py
│ ├── pongpong.py
│ └── requirements.txt
├── Prime_number.py
├── Python Distance.py
├── Python Programs/
│ ├── Program of Reverse of any number.py
│ ├── Program to print table of given number.py
│ ├── Program to reverse Linked List( Recursive solution).py
│ ├── Python Program for Product of unique prime factors of a number.py
│ ├── Python Program for Tower of Hanoi.py
│ ├── Python Program for factorial of a number.py
│ ├── Python Program to Count the Number of Each Vowel.py
│ ├── Python Program to Display Fibonacci Sequence Using Recursion.py
│ ├── Python Program to Find LCM.py
│ ├── Python Program to Merge Mails.py
│ ├── Python Program to Print the Fibonacci sequence.py
│ ├── Python Program to Remove Punctuations from a String.py
│ ├── Python Program to Reverse a linked list.py
│ ├── Python Program to Sort Words in Alphabetic Order.py
│ ├── Python Program to Transpose a Matrix.py
│ └── python program for finding square root for positive number.py
├── Python Voice Generator.py
├── Python-Array-Equilibrium-Index.py
├── Python_chatting_application/
│ ├── README.md
│ ├── client.py
│ └── server.py
├── Python_swapping.py
├── QR_code_generator/
│ └── qrcode.py
├── QuadraticCalc.py
├── QuestionAnswerVirtualAssistant/
│ ├── backend.py
│ ├── frontend.py
│ └── requirements.txt
├── Quizzler Using Tkinter and Trivia DB API/
│ ├── README.md
│ ├── data_dynamic.py
│ ├── data_static.py
│ ├── main.py
│ ├── question_model.py
│ ├── quiz_brain.py
│ └── ui.py
├── README.md
├── Random Password Generator.py
├── RandomDice.py
├── RandomNumberGame.py
├── Randomnumber.py
├── ReadFromCSV.py
├── Recursion Visulaizer/
│ ├── .recursionVisualizer.py.swp
│ ├── git
│ └── recursionVisualizer.py
├── Reverse_list_in_groups.py
├── Rotate_Linked_List.py
├── SECURITY.md
├── SOUNDEX.py
├── Sanke-water-gun game.py
├── Search_Engine/
│ ├── README.md
│ ├── backend.py
│ ├── frontend.py
│ └── test_data.py
├── Secret message generator GUI by tkinter.py
├── Shortest Distance between Two Lines.py
├── SimpleStopWatch.py
├── Snake Game Using Turtle/
│ ├── README.md
│ ├── colors.py
│ ├── food.py
│ ├── highscore.txt
│ ├── main.py
│ ├── scoreboard.py
│ ├── screenshots
│ ├── snake.py
│ └── wall.py
├── Snake-Water-Gun-Game.py
├── Snake_water_gun/
│ ├── README.md
│ └── main.py
├── Sorting Algorithims/
│ ├── heapsort_linkedlist.py
│ ├── mergesort_linkedlist.py
│ └── quicksort_linkedlist.py
├── Sorting Algorithms/
│ ├── Binary_Insertion_Sort.py
│ ├── Bubble_Sorting_Prog.py
│ ├── Bubble_sort.py
│ ├── Count sort.py
│ ├── Counting Sort.py
│ ├── Counting-sort.py
│ ├── Cycle Sort.py
│ ├── Heap sort.py
│ ├── Iterative Merge Sort.py
│ ├── Linear_Insertion_Sort.py
│ ├── Merge Sort.py
│ ├── Merge-sort.py
│ ├── Quick sort.py
│ ├── Shell Sort.py
│ ├── Sort the values of first list using second list.py
│ ├── Sorted_Inserted_Linked_List.py
│ ├── SortingAStringAlphabetically.py
│ ├── Sorting_List.py
│ ├── Tim_sort.py
│ ├── brickSort.py
│ ├── bubblesortpgm.py
│ ├── dual_pivot_quicksort.py
│ ├── heap_sort.py
│ ├── insertion_sort.py
│ ├── merge_sort.py
│ ├── pigeonhole_sort.py
│ ├── quick_sort.py
│ ├── recursive-quick-sort.py
│ ├── selectionSort.py
│ ├── selection_sort.py
│ ├── sorting.py
│ ├── stooge_sort.py
│ └── wave_sort.py
├── SpeechToText.py
├── Split_Circular_Linked_List.py
├── Street_Fighter/
│ ├── LICENSE
│ ├── docs/
│ │ ├── CODE_OF_CONDUCT.md
│ │ ├── CONTRIBUTING.md
│ │ ├── README.md
│ │ ├── SECURITY.md
│ │ └── requirements.txt
│ └── src/
│ ├── fighter.py
│ └── main.py
├── StringToBinary.py
├── String_Palindrome.py
├── Strings.py
├── Sum of digits of a number.py
├── TTS.py
├── TaskManager.py
├── TaskPlanner.py
├── Test-Case-Generator/
│ └── test_case.py
├── ThirdAI/
│ └── Terms and Conditions/
│ ├── Readme.md
│ ├── ThirdAI.py
│ └── TkinterUI.py
├── Tic-Tac-Toe Games/
│ ├── tic-tac-toe1.py
│ ├── tic-tac-toe2.py
│ ├── tic-tac-toe3.py
│ ├── tic-tac-toe4.py
│ ├── tic-tac-toe5.py
│ └── tic-tac-toe6.py
├── Timetable_Operations.py
├── To find the largest number between 3 numbers.py
├── To print series 1,12,123,1234......py
├── Todo_GUi.py
├── Translator/
│ ├── README.md
│ └── translator.py
├── Trending youtube videos
├── Trending youtube videos.py
├── Triplets with zero sum/
│ ├── Readme.md
│ └── find_Triplets_with_zero_sum.py
├── Turn your PDFs into audio books/
│ ├── audiobook_gen.py
│ └── requirements.txt
├── Turtle_Star.py
├── Tweet Pre-Processing.py
├── Type of angles of a triangle.py
├── Type_of_angles_of_triangle.py
├── UI-Apps/
│ ├── README.md
│ └── clock.py
├── Unit Digit of a raised to power b.py
├── Untitled.ipynb
├── Voice Command Calculator.py
├── VoiceAssistant/
│ ├── DOCUMENTATION.md
│ ├── GUIDE.md
│ ├── PRE-REQUISITES.md
│ ├── Project_Basic_struct/
│ │ ├── TextTospeech.py
│ │ ├── VoiceAssistant_main.py
│ │ ├── dictator.py
│ │ ├── menu.py
│ │ ├── speakListen.py
│ │ ├── speechtotext.py
│ │ ├── textRead.py
│ │ └── websiteWork.py
│ └── README.md
├── VoiceRepeater/
│ ├── __main__.py
│ └── readme.md
├── Weather Scrapper/
│ ├── weather.csv
│ └── weather.py
├── WeatherGUI.py
├── Web Socket.py
├── Web_Scraper.py
├── Webbrowser/
│ └── tk-browser.py
├── Wikipdedia/
│ ├── flask_rendering.py
│ ├── main.py
│ ├── practice_beautifulsoap.py
│ ├── static/
│ │ └── js/
│ │ └── output.js
│ └── template/
│ ├── index.html
│ └── output.html
├── WikipediaModule.py
├── Windows_Wallpaper_Script/
│ ├── ReadMe.md
│ └── wallpaper_extract.py
├── Word_Dictionary/
│ └── dictionary.py
├── Wordle/
│ ├── 5 letter word dictionary.txt
│ ├── Dictionary.txt
│ └── wordle.py
├── XML/
│ └── HTML parsing
├── XORcipher/
│ ├── README.md
│ ├── XOR_cipher.py
│ └── test_XOR_cipher.py
├── Youtube Downloader With GUI/
│ └── main.py
├── add_two_number.py
├── add_two_nums.py
├── advanced_calculator.py
├── agecalculator.py
├── alexa_news_headlines.py
├── area_of_square_app.py
├── armstrongnumber.py
├── async_downloader/
│ ├── async_downloader.py
│ └── requirements.txt
├── automail.py
├── avg_xdspam_confidence.py
├── backup_automater_services.py
├── balance_parenthesis.py
├── bank_managment_system/
│ ├── QTFrontend.py
│ ├── backend.py
│ ├── frontend.py
│ └── untitled.ui
├── basic_cal.py
├── batch_file_rename.py
├── billing.py
├── binary search.py
├── binarySTree isTrue_YashV1729.Java
├── binary_search_tree.py
├── binary_search_trees/
│ ├── delete_a_node_in_bst.py
│ ├── inorder_successor.py
│ ├── inorder_traversal.py
│ ├── insert_in_bst.py
│ ├── main.py
│ ├── mirror_a_bst.py
│ ├── print_in_range.py
│ ├── root_to_leaf_paths.py
│ ├── search_in_bst.py
│ ├── tree_node.py
│ └── validate_bst.py
├── binod.py
├── birthdays.py
├── blackJackGUI.py
├── blackjack.py
├── bodymass.py
├── bookstore_manangement_system.py
├── brickout-game/
│ ├── README.md
│ └── brickout-game.py
├── calc_area.py
├── calci.py
├── calci2.py
├── calculator-gui.py
├── calculator.py
├── cartesian_product.py
├── changemac.py
├── chaos.py
├── check if a number positive , negative or zero
├── check whether the string is Symmetrical or Palindrome.py
├── check_file.py
├── check_for_sqlite_files.py
├── check_input.py
├── check_internet_con.py
├── check_prime.py
├── chicks_n_rabs.py
├── cicd
├── classicIndianCardMatch.py
├── cli_master/
│ ├── cli_master.py
│ ├── database_import_countries.py
│ └── validation_page.py
├── cloning_a_list.py
├── colorma_as_color.py
├── colour spiral.py
├── communication/
│ ├── file.py
│ ├── pipe.py
│ └── socket_conn.py
├── compass_code.py
├── consonant.py
├── convert celsius into fahrenheit.py
├── convert_time.py
├── convert_wind_direction_to_degrees.py
├── count the numbers of two vovels.py
├── create password validity in python.py
├── create_dir_if_not_there.py
├── cricket_live_score.py
├── cricket_news.py
├── currency converter/
│ ├── README.md
│ ├── country.txt
│ ├── gui.ui
│ └── main.py
├── daily_checks.py
├── daily_horoscope.py
├── date-timeclient.py
├── date-timeserver.py
├── days_from_date.py
├── dec_to_hex.py
├── decimal to binary.py
├── depreciated_programs/
│ └── corona_cases.py
├── dialogs/
│ ├── README.md
│ ├── messagebox.py
│ └── requirements.txt
├── diamond.py
├── dice.py
├── diceV2_dynamic.py
├── dice_rolling_simulator.py
├── diction.py
├── digital_clock.py
├── dir_test.py
├── divisors_of_a_number.py
├── email id dictionary/
│ ├── README.md
│ ├── dict1.py
│ └── mbox-short.txt
├── encrypter-decrypter-gui.py
├── encrypter_decrypter_gui.py
├── encryptsys.py
├── env_check.py
├── environment.yml
├── equations.py
├── ex20.py
├── fF
├── facebook id hack.py
├── facebook-autologin-bot.py
├── factorial_perm_comp.py
├── factors.py
├── fastapi.py
├── fetch_news.py
├── fibonacci.py
├── fibonacci_SIMPLIFIED
├── fibonici series.py
├── file_ext_changer.py
├── file_handle/
│ ├── File handle binary/
│ │ ├── Update a binary file2.py
│ │ ├── delete.py
│ │ ├── question 1 (elegible for remedial, top marks).py
│ │ ├── read.py
│ │ ├── search record in binary file.py
│ │ └── update2.py
│ └── File handle text/
│ ├── counter.py
│ ├── file handle 12 length of line in text file.py
│ ├── happy.txt
│ ├── input,output and error streams.py
│ ├── question 2.py
│ ├── question 5.py
│ ├── question 6.py
│ ├── question3.py
│ ├── special symbol after word.py
│ └── story.txt
├── fileinfo.py
├── find_cube_root.py
├── find_prime.py
├── finding LCM.py
├── findlargestno.md
├── flappyBird_pygame/
│ ├── README.md
│ └── flappy_bird.py
├── floodfill/
│ └── floodfill.py
├── folder_size.py
├── four_digit_num_combination.py
├── framework/
│ └── quo.md
├── friday.py
├── ftp_send_receive.py
├── gambler.py
├── game_of_life/
│ ├── 05_mixed_sorting.py
│ └── game_o_life.py
├── gcd.py
├── generate_permutations.py
├── get_crypto_price.py
├── get_info_remoute_srv.py
├── get_likes_on_FB.py
├── get_youtube_view.py
├── google.py
├── googlemaps.py
├── googleweb.py
├── greaterno.py
├── greattwono.py
├── gstin_scraper.py
├── gui_calculator.py
├── hamming-numbers.py
├── happy_num.py
├── heap_sort.py
├── helloworld.py
├── how to display the fibonacci sequence up to n-.py
├── image2pdf/
│ ├── image2pdf.py
│ └── requirements.txt
├── image_compressor.py
├── index.html
├── index.py
├── inheritance_YahV1729.py
├── input matrice,product any order!.py
├── insertion_sort.py
├── insta_image_saving/
│ ├── driver/
│ │ └── file
│ ├── instagram_image_scrapping.ipynb
│ ├── instructions.txt
│ ├── output/
│ │ └── file
│ └── readme.txt
├── insta_monitering/
│ ├── con_file.py
│ ├── insta_api.py
│ ├── insta_datafetcher.py
│ ├── ipList.txt
│ └── subpinsta.py
├── internet_connection_py3.py
├── invisible_clock.py
├── iprint.py
├── is_number.py
├── jee_result.py
├── kilo_to_miles.py
├── kmp_str_search.py
├── large_files_reading.py
├── largestno.py
├── lcm.py
├── leap year.py
├── length.py
├── letter_frequency.py
├── levenshtein_distance.py
├── libs/
│ ├── haarcascade_eye.xml
│ ├── haarcascade_eye_tree_eyeglasses.xml
│ └── haarcascade_frontalface_default.xml
├── linear search.py
├── linear-algebra-python/
│ ├── README.md
│ └── src/
│ ├── Transformations2D.py
│ ├── lib.py
│ └── tests.py
├── linear_search.py
├── live_sketch.py
├── loader.py
├── local_weighted_learning/
│ ├── local_weighted_learning.md
│ └── local_weighted_learning.py
├── login.py
├── logs.py
├── longest_increasing_subsequence_length.py
├── loops.py
├── love_turtle.py
├── luhn_algorithm_for_credit_card_validation.py
├── magic8ball.py
├── magic_8_ball.py
├── mapit.py
├── mathfunctions.py
├── meme_maker.py
├── memorygame.py
├── merge.py
├── missing number from list.py
├── mobilePhoneSpecsScrapper.py
├── move_files_over_x_days.py
├── movie_details.py
├── multiple_comditions.py
├── multiplication_table.py
├── nDigitNumberCombinations.py
├── nasa_apod_with_requests/
│ ├── README.md
│ ├── run.py
│ └── settings.py
├── new.py
├── new_pattern.py
├── new_script.py
├── news_articles__scraper.py
├── news_oversimplifier.py
├── next_number.py
├── nitkarshchourasia/
│ └── to_sort/
│ ├── GUI_apps/
│ │ └── tkinter_apps/
│ │ ├── counter_app/
│ │ │ └── counter_app.py
│ │ ├── hello_world_excla_increment_app/
│ │ │ └── hello_world_incre_decre_(!).py
│ │ └── simple_calc_GUI/
│ │ └── simple_calculator_GUI.py
│ ├── JARVIS_python_bot/
│ │ ├── JARVIS_2.0.py
│ │ ├── README.md
│ │ ├── check_internet_con.py
│ │ ├── features_to_add.py
│ │ └── requirements.txt
│ ├── determine_sign.py
│ ├── django_projects/
│ │ └── ToDo_webapp/
│ │ ├── db.sqlite3
│ │ ├── manage.py
│ │ ├── todo/
│ │ │ ├── __init__.py
│ │ │ ├── admin.py
│ │ │ ├── apps.py
│ │ │ ├── forms.py
│ │ │ ├── migrations/
│ │ │ │ ├── 0001_initial.py
│ │ │ │ └── __init__.py
│ │ │ ├── models.py
│ │ │ ├── templates/
│ │ │ │ └── todo/
│ │ │ │ └── index.html
│ │ │ ├── tests.py
│ │ │ └── views.py
│ │ └── todo_site/
│ │ ├── __init__.py
│ │ ├── asgi.py
│ │ ├── settings.py
│ │ ├── urls.py
│ │ └── wsgi.py
│ ├── one_rep_max_calculator/
│ │ ├── README.md
│ │ ├── one_rep_max_calculator.py
│ │ └── one_rep_max_calculator_gui.py
│ ├── pdf_to_docx_converter/
│ │ ├── pdf_to_docx.py
│ │ └── requirements.txt
│ └── word2number/
│ └── word2number.py
├── nmap_scan.py
├── nodepad/
│ ├── README.md
│ ├── notepad.py
│ └── src/
│ └── notepad.tcl
├── notepad/
│ └── notepad_support.py
├── nslookup_check.py
├── number guessing.py
├── numberguessinggame/
│ └── index.py
├── numeric_password_cracker.py
├── oneeven.py
├── oryx-build-commands.txt
├── osinfo.py
├── other_pepole/
│ └── get_ip_gui
├── palindrome.py
├── pan.py
├── password guessing.py
├── passwordGen.py
├── passwordGenerator.py
├── password_checker.py
├── password_checker_code.py
├── password_cracker.py
├── password_manager.py
├── password_programs_multiple/
│ ├── animal_name_scraiper.py
│ └── passwordGenerator.py
├── personal_translator.py
├── ph_email.py
├── photo_timestamp_renamer.py
├── ping_servers.py
├── ping_subnet.py
├── polygon.py
├── portscanner.py
├── positiveNegetive.py
├── power_of_n.py
├── power_of_two.py
├── powerdown_startup.py
├── powers of 2.py
├── powerup_checks.py
├── primelib/
│ ├── Prime.txt
│ ├── README
│ └── primelib.py
├── print hello world.py
├── printing_hello_world.py
├── prison_break_scrapper.py
├── pscheck.py
├── psunotify.py
├── puttylogs.py
├── pyhton_array.py
├── pythagoreanTriplets.py
├── python Space Invader game.py
├── pythonVideoDownloader.py
├── python_sms.py
├── python_webscraper.py
├── qrcode.py
├── qrdecoder.py
├── quiz_game.py
├── quote.py
├── random-sentences.py
├── random_file_move.py
├── random_password_gen.py
├── randomloadingmessage.py
├── rangoli.py
├── read_excel_file.py
├── reading_csv.py
├── rearrange-files/
│ └── rearrange-files.py
├── recursive-fibonacci.py
├── recursiveStrings.py
├── recyclebin.py
├── remoteok_jobs_scraper/
│ └── remoteok_jobs.py
├── remove a character from a file and rewrite.py
├── repeat.py
├── replacetext.py
├── repo_website/
│ ├── docs/
│ │ └── README_og.md
│ └── mkdocs.yml
├── requirements.txt
├── requirements_with_versions.txt
├── reversed_pattern3.py
├── rock_paper_scissors.py
├── rook.py
├── rotate_string.py
├── rotatelist.py
├── russian_roulette.py
├── saving_input_into_list.py
├── scalg.py
├── scientific_cal.py
├── scrap_file.py
├── script_count.py
├── script_listing.py
├── send_message_automation/
│ ├── README.md
│ ├── author_name_NC.txt
│ └── message_automation.py
├── sendemail.py
├── sensors_information.py
├── serial_scanner.py
├── sha1.py
├── sierpinski_triangle.py
├── simpleInterest.py
├── simple_calcu.py
├── simple_calculator/
│ └── simple_calculator.py
├── simple_calculator.py
├── simulate_memory_cpu.py
├── singly_linked_list.py
├── size(resolution)image.py
├── slack_message.py
├── smart_file_organizer.py
├── snake.py
├── snake_case_renamer_depth_one.py
├── socket-programming/
│ ├── README.md
│ ├── client.py
│ ├── requirements.txt
│ └── server.py
├── solution to euler project problem 10.py
├── sorting_algos.py
├── soundex_algorithm.py
├── spiralmatrix.py
├── spotifyAccount.py
├── sqlite_check.py
├── sqlite_table_check.py
├── square_root.py
├── stack.py
├── stackF_Harsh2255.py
├── stone_paper_scissor/
│ ├── main.py
│ └── utils.py
├── string_palin.py
├── string_rotation.py
├── sudoku.py
├── sum_of_digits_of_a_number.py
├── swap.py
├── testlines.py
├── text-to-audio/
│ ├── README.md
│ ├── hello.txt
│ ├── main.py
│ ├── requirements.txt
│ └── text-file-to-audio.py
├── text_file_replace.py
├── text_to_audio/
│ ├── README.md
│ ├── author_name_NC.txt
│ ├── main.py
│ ├── requirements.txt
│ └── special_file.txt
├── text_to_pig_latin.py
├── tf_idf_generator.py
├── thired-party-haarcascade-mustache-on-face/
│ ├── Nose.xml
│ ├── face.xml
│ ├── mustache-add-on-face.py
│ └── utils.py
├── thread_signal.py
├── tic-tac-toe.py
├── tik_tak.py
├── time_delta.py
├── to check leap year.py
├── totaldigits.py
├── translation_of_sizes_of_underwear_RU.py
├── triangles.py
├── tuple.py
├── turtal game.ipynb
├── turtle module
├── turtle_shapes_made.py
├── tweeter.py
├── twitter_post_scraper.py
├── two_num.py
├── ultimate-phone-book/
│ ├── contacts.py
│ └── readme.md
├── url_shortner.py
├── venv/
│ ├── Lib/
│ │ └── site-packages/
│ │ ├── pip/
│ │ │ ├── __init__.py
│ │ │ ├── __main__.py
│ │ │ ├── __pip-runner__.py
│ │ │ ├── _internal/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── build_env.py
│ │ │ │ ├── cache.py
│ │ │ │ ├── cli/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── autocompletion.py
│ │ │ │ │ ├── base_command.py
│ │ │ │ │ ├── cmdoptions.py
│ │ │ │ │ ├── command_context.py
│ │ │ │ │ ├── index_command.py
│ │ │ │ │ ├── main.py
│ │ │ │ │ ├── main_parser.py
│ │ │ │ │ ├── parser.py
│ │ │ │ │ ├── progress_bars.py
│ │ │ │ │ ├── req_command.py
│ │ │ │ │ ├── spinners.py
│ │ │ │ │ └── status_codes.py
│ │ │ │ ├── commands/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── cache.py
│ │ │ │ │ ├── check.py
│ │ │ │ │ ├── completion.py
│ │ │ │ │ ├── configuration.py
│ │ │ │ │ ├── debug.py
│ │ │ │ │ ├── download.py
│ │ │ │ │ ├── freeze.py
│ │ │ │ │ ├── hash.py
│ │ │ │ │ ├── help.py
│ │ │ │ │ ├── index.py
│ │ │ │ │ ├── inspect.py
│ │ │ │ │ ├── install.py
│ │ │ │ │ ├── list.py
│ │ │ │ │ ├── search.py
│ │ │ │ │ ├── show.py
│ │ │ │ │ ├── uninstall.py
│ │ │ │ │ └── wheel.py
│ │ │ │ ├── configuration.py
│ │ │ │ ├── distributions/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── base.py
│ │ │ │ │ ├── installed.py
│ │ │ │ │ ├── sdist.py
│ │ │ │ │ └── wheel.py
│ │ │ │ ├── exceptions.py
│ │ │ │ ├── index/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── collector.py
│ │ │ │ │ ├── package_finder.py
│ │ │ │ │ └── sources.py
│ │ │ │ ├── locations/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── _distutils.py
│ │ │ │ │ ├── _sysconfig.py
│ │ │ │ │ └── base.py
│ │ │ │ ├── main.py
│ │ │ │ ├── metadata/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── _json.py
│ │ │ │ │ ├── base.py
│ │ │ │ │ ├── importlib/
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── _compat.py
│ │ │ │ │ │ ├── _dists.py
│ │ │ │ │ │ └── _envs.py
│ │ │ │ │ └── pkg_resources.py
│ │ │ │ ├── models/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── candidate.py
│ │ │ │ │ ├── direct_url.py
│ │ │ │ │ ├── format_control.py
│ │ │ │ │ ├── index.py
│ │ │ │ │ ├── installation_report.py
│ │ │ │ │ ├── link.py
│ │ │ │ │ ├── scheme.py
│ │ │ │ │ ├── search_scope.py
│ │ │ │ │ ├── selection_prefs.py
│ │ │ │ │ ├── target_python.py
│ │ │ │ │ └── wheel.py
│ │ │ │ ├── network/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── auth.py
│ │ │ │ │ ├── cache.py
│ │ │ │ │ ├── download.py
│ │ │ │ │ ├── lazy_wheel.py
│ │ │ │ │ ├── session.py
│ │ │ │ │ ├── utils.py
│ │ │ │ │ └── xmlrpc.py
│ │ │ │ ├── operations/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── build/
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── build_tracker.py
│ │ │ │ │ │ ├── metadata.py
│ │ │ │ │ │ ├── metadata_editable.py
│ │ │ │ │ │ ├── metadata_legacy.py
│ │ │ │ │ │ ├── wheel.py
│ │ │ │ │ │ ├── wheel_editable.py
│ │ │ │ │ │ └── wheel_legacy.py
│ │ │ │ │ ├── check.py
│ │ │ │ │ ├── freeze.py
│ │ │ │ │ ├── install/
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── editable_legacy.py
│ │ │ │ │ │ └── wheel.py
│ │ │ │ │ └── prepare.py
│ │ │ │ ├── pyproject.py
│ │ │ │ ├── req/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── constructors.py
│ │ │ │ │ ├── req_file.py
│ │ │ │ │ ├── req_install.py
│ │ │ │ │ ├── req_set.py
│ │ │ │ │ └── req_uninstall.py
│ │ │ │ ├── resolution/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── base.py
│ │ │ │ │ ├── legacy/
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ └── resolver.py
│ │ │ │ │ └── resolvelib/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── base.py
│ │ │ │ │ ├── candidates.py
│ │ │ │ │ ├── factory.py
│ │ │ │ │ ├── found_candidates.py
│ │ │ │ │ ├── provider.py
│ │ │ │ │ ├── reporter.py
│ │ │ │ │ ├── requirements.py
│ │ │ │ │ └── resolver.py
│ │ │ │ ├── self_outdated_check.py
│ │ │ │ ├── utils/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── _jaraco_text.py
│ │ │ │ │ ├── _log.py
│ │ │ │ │ ├── appdirs.py
│ │ │ │ │ ├── compat.py
│ │ │ │ │ ├── compatibility_tags.py
│ │ │ │ │ ├── datetime.py
│ │ │ │ │ ├── deprecation.py
│ │ │ │ │ ├── direct_url_helpers.py
│ │ │ │ │ ├── egg_link.py
│ │ │ │ │ ├── encoding.py
│ │ │ │ │ ├── entrypoints.py
│ │ │ │ │ ├── filesystem.py
│ │ │ │ │ ├── filetypes.py
│ │ │ │ │ ├── glibc.py
│ │ │ │ │ ├── hashes.py
│ │ │ │ │ ├── logging.py
│ │ │ │ │ ├── misc.py
│ │ │ │ │ ├── packaging.py
│ │ │ │ │ ├── retry.py
│ │ │ │ │ ├── setuptools_build.py
│ │ │ │ │ ├── subprocess.py
│ │ │ │ │ ├── temp_dir.py
│ │ │ │ │ ├── unpacking.py
│ │ │ │ │ ├── urls.py
│ │ │ │ │ ├── virtualenv.py
│ │ │ │ │ └── wheel.py
│ │ │ │ ├── vcs/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── bazaar.py
│ │ │ │ │ ├── git.py
│ │ │ │ │ ├── mercurial.py
│ │ │ │ │ ├── subversion.py
│ │ │ │ │ └── versioncontrol.py
│ │ │ │ └── wheel_builder.py
│ │ │ ├── _vendor/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── cachecontrol/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── _cmd.py
│ │ │ │ │ ├── adapter.py
│ │ │ │ │ ├── cache.py
│ │ │ │ │ ├── caches/
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── file_cache.py
│ │ │ │ │ │ └── redis_cache.py
│ │ │ │ │ ├── controller.py
│ │ │ │ │ ├── filewrapper.py
│ │ │ │ │ ├── heuristics.py
│ │ │ │ │ ├── py.typed
│ │ │ │ │ ├── serialize.py
│ │ │ │ │ └── wrapper.py
│ │ │ │ ├── certifi/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── __main__.py
│ │ │ │ │ ├── cacert.pem
│ │ │ │ │ ├── core.py
│ │ │ │ │ └── py.typed
│ │ │ │ ├── distlib/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── compat.py
│ │ │ │ │ ├── database.py
│ │ │ │ │ ├── index.py
│ │ │ │ │ ├── locators.py
│ │ │ │ │ ├── manifest.py
│ │ │ │ │ ├── markers.py
│ │ │ │ │ ├── metadata.py
│ │ │ │ │ ├── resources.py
│ │ │ │ │ ├── scripts.py
│ │ │ │ │ ├── util.py
│ │ │ │ │ ├── version.py
│ │ │ │ │ └── wheel.py
│ │ │ │ ├── distro/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── __main__.py
│ │ │ │ │ ├── distro.py
│ │ │ │ │ └── py.typed
│ │ │ │ ├── idna/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── codec.py
│ │ │ │ │ ├── compat.py
│ │ │ │ │ ├── core.py
│ │ │ │ │ ├── idnadata.py
│ │ │ │ │ ├── intranges.py
│ │ │ │ │ ├── package_data.py
│ │ │ │ │ ├── py.typed
│ │ │ │ │ └── uts46data.py
│ │ │ │ ├── msgpack/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── exceptions.py
│ │ │ │ │ ├── ext.py
│ │ │ │ │ └── fallback.py
│ │ │ │ ├── packaging/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── _elffile.py
│ │ │ │ │ ├── _manylinux.py
│ │ │ │ │ ├── _musllinux.py
│ │ │ │ │ ├── _parser.py
│ │ │ │ │ ├── _structures.py
│ │ │ │ │ ├── _tokenizer.py
│ │ │ │ │ ├── markers.py
│ │ │ │ │ ├── metadata.py
│ │ │ │ │ ├── py.typed
│ │ │ │ │ ├── requirements.py
│ │ │ │ │ ├── specifiers.py
│ │ │ │ │ ├── tags.py
│ │ │ │ │ ├── utils.py
│ │ │ │ │ └── version.py
│ │ │ │ ├── pkg_resources/
│ │ │ │ │ └── __init__.py
│ │ │ │ ├── platformdirs/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── __main__.py
│ │ │ │ │ ├── android.py
│ │ │ │ │ ├── api.py
│ │ │ │ │ ├── macos.py
│ │ │ │ │ ├── py.typed
│ │ │ │ │ ├── unix.py
│ │ │ │ │ ├── version.py
│ │ │ │ │ └── windows.py
│ │ │ │ ├── pygments/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── __main__.py
│ │ │ │ │ ├── cmdline.py
│ │ │ │ │ ├── console.py
│ │ │ │ │ ├── filter.py
│ │ │ │ │ ├── filters/
│ │ │ │ │ │ └── __init__.py
│ │ │ │ │ ├── formatter.py
│ │ │ │ │ ├── formatters/
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── _mapping.py
│ │ │ │ │ │ ├── bbcode.py
│ │ │ │ │ │ ├── groff.py
│ │ │ │ │ │ ├── html.py
│ │ │ │ │ │ ├── img.py
│ │ │ │ │ │ ├── irc.py
│ │ │ │ │ │ ├── latex.py
│ │ │ │ │ │ ├── other.py
│ │ │ │ │ │ ├── pangomarkup.py
│ │ │ │ │ │ ├── rtf.py
│ │ │ │ │ │ ├── svg.py
│ │ │ │ │ │ ├── terminal.py
│ │ │ │ │ │ └── terminal256.py
│ │ │ │ │ ├── lexer.py
│ │ │ │ │ ├── lexers/
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── _mapping.py
│ │ │ │ │ │ └── python.py
│ │ │ │ │ ├── modeline.py
│ │ │ │ │ ├── plugin.py
│ │ │ │ │ ├── regexopt.py
│ │ │ │ │ ├── scanner.py
│ │ │ │ │ ├── sphinxext.py
│ │ │ │ │ ├── style.py
│ │ │ │ │ ├── styles/
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ └── _mapping.py
│ │ │ │ │ ├── token.py
│ │ │ │ │ ├── unistring.py
│ │ │ │ │ └── util.py
│ │ │ │ ├── pyproject_hooks/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── _compat.py
│ │ │ │ │ ├── _impl.py
│ │ │ │ │ └── _in_process/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── _in_process.py
│ │ │ │ ├── requests/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── __version__.py
│ │ │ │ │ ├── _internal_utils.py
│ │ │ │ │ ├── adapters.py
│ │ │ │ │ ├── api.py
│ │ │ │ │ ├── auth.py
│ │ │ │ │ ├── certs.py
│ │ │ │ │ ├── compat.py
│ │ │ │ │ ├── cookies.py
│ │ │ │ │ ├── exceptions.py
│ │ │ │ │ ├── help.py
│ │ │ │ │ ├── hooks.py
│ │ │ │ │ ├── models.py
│ │ │ │ │ ├── packages.py
│ │ │ │ │ ├── sessions.py
│ │ │ │ │ ├── status_codes.py
│ │ │ │ │ ├── structures.py
│ │ │ │ │ └── utils.py
│ │ │ │ ├── resolvelib/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── compat/
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ └── collections_abc.py
│ │ │ │ │ ├── providers.py
│ │ │ │ │ ├── py.typed
│ │ │ │ │ ├── reporters.py
│ │ │ │ │ ├── resolvers.py
│ │ │ │ │ └── structs.py
│ │ │ │ ├── rich/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── __main__.py
│ │ │ │ │ ├── _cell_widths.py
│ │ │ │ │ ├── _emoji_codes.py
│ │ │ │ │ ├── _emoji_replace.py
│ │ │ │ │ ├── _export_format.py
│ │ │ │ │ ├── _extension.py
│ │ │ │ │ ├── _fileno.py
│ │ │ │ │ ├── _inspect.py
│ │ │ │ │ ├── _log_render.py
│ │ │ │ │ ├── _loop.py
│ │ │ │ │ ├── _null_file.py
│ │ │ │ │ ├── _palettes.py
│ │ │ │ │ ├── _pick.py
│ │ │ │ │ ├── _ratio.py
│ │ │ │ │ ├── _spinners.py
│ │ │ │ │ ├── _stack.py
│ │ │ │ │ ├── _timer.py
│ │ │ │ │ ├── _win32_console.py
│ │ │ │ │ ├── _windows.py
│ │ │ │ │ ├── _windows_renderer.py
│ │ │ │ │ ├── _wrap.py
│ │ │ │ │ ├── abc.py
│ │ │ │ │ ├── align.py
│ │ │ │ │ ├── ansi.py
│ │ │ │ │ ├── bar.py
│ │ │ │ │ ├── box.py
│ │ │ │ │ ├── cells.py
│ │ │ │ │ ├── color.py
│ │ │ │ │ ├── color_triplet.py
│ │ │ │ │ ├── columns.py
│ │ │ │ │ ├── console.py
│ │ │ │ │ ├── constrain.py
│ │ │ │ │ ├── containers.py
│ │ │ │ │ ├── control.py
│ │ │ │ │ ├── default_styles.py
│ │ │ │ │ ├── diagnose.py
│ │ │ │ │ ├── emoji.py
│ │ │ │ │ ├── errors.py
│ │ │ │ │ ├── file_proxy.py
│ │ │ │ │ ├── filesize.py
│ │ │ │ │ ├── highlighter.py
│ │ │ │ │ ├── json.py
│ │ │ │ │ ├── jupyter.py
│ │ │ │ │ ├── layout.py
│ │ │ │ │ ├── live.py
│ │ │ │ │ ├── live_render.py
│ │ │ │ │ ├── logging.py
│ │ │ │ │ ├── markup.py
│ │ │ │ │ ├── measure.py
│ │ │ │ │ ├── padding.py
│ │ │ │ │ ├── pager.py
│ │ │ │ │ ├── palette.py
│ │ │ │ │ ├── panel.py
│ │ │ │ │ ├── pretty.py
│ │ │ │ │ ├── progress.py
│ │ │ │ │ ├── progress_bar.py
│ │ │ │ │ ├── prompt.py
│ │ │ │ │ ├── protocol.py
│ │ │ │ │ ├── py.typed
│ │ │ │ │ ├── region.py
│ │ │ │ │ ├── repr.py
│ │ │ │ │ ├── rule.py
│ │ │ │ │ ├── scope.py
│ │ │ │ │ ├── screen.py
│ │ │ │ │ ├── segment.py
│ │ │ │ │ ├── spinner.py
│ │ │ │ │ ├── status.py
│ │ │ │ │ ├── style.py
│ │ │ │ │ ├── styled.py
│ │ │ │ │ ├── syntax.py
│ │ │ │ │ ├── table.py
│ │ │ │ │ ├── terminal_theme.py
│ │ │ │ │ ├── text.py
│ │ │ │ │ ├── theme.py
│ │ │ │ │ ├── themes.py
│ │ │ │ │ ├── traceback.py
│ │ │ │ │ └── tree.py
│ │ │ │ ├── tomli/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── _parser.py
│ │ │ │ │ ├── _re.py
│ │ │ │ │ ├── _types.py
│ │ │ │ │ └── py.typed
│ │ │ │ ├── truststore/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── _api.py
│ │ │ │ │ ├── _macos.py
│ │ │ │ │ ├── _openssl.py
│ │ │ │ │ ├── _ssl_constants.py
│ │ │ │ │ ├── _windows.py
│ │ │ │ │ └── py.typed
│ │ │ │ ├── typing_extensions.py
│ │ │ │ ├── urllib3/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── _collections.py
│ │ │ │ │ ├── _version.py
│ │ │ │ │ ├── connection.py
│ │ │ │ │ ├── connectionpool.py
│ │ │ │ │ ├── contrib/
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── _appengine_environ.py
│ │ │ │ │ │ ├── _securetransport/
│ │ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ │ ├── bindings.py
│ │ │ │ │ │ │ └── low_level.py
│ │ │ │ │ │ ├── appengine.py
│ │ │ │ │ │ ├── ntlmpool.py
│ │ │ │ │ │ ├── pyopenssl.py
│ │ │ │ │ │ ├── securetransport.py
│ │ │ │ │ │ └── socks.py
│ │ │ │ │ ├── exceptions.py
│ │ │ │ │ ├── fields.py
│ │ │ │ │ ├── filepost.py
│ │ │ │ │ ├── packages/
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── backports/
│ │ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ │ ├── makefile.py
│ │ │ │ │ │ │ └── weakref_finalize.py
│ │ │ │ │ │ └── six.py
│ │ │ │ │ ├── poolmanager.py
│ │ │ │ │ ├── request.py
│ │ │ │ │ ├── response.py
│ │ │ │ │ └── util/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── connection.py
│ │ │ │ │ ├── proxy.py
│ │ │ │ │ ├── queue.py
│ │ │ │ │ ├── request.py
│ │ │ │ │ ├── response.py
│ │ │ │ │ ├── retry.py
│ │ │ │ │ ├── ssl_.py
│ │ │ │ │ ├── ssl_match_hostname.py
│ │ │ │ │ ├── ssltransport.py
│ │ │ │ │ ├── timeout.py
│ │ │ │ │ ├── url.py
│ │ │ │ │ └── wait.py
│ │ │ │ └── vendor.txt
│ │ │ └── py.typed
│ │ └── pip-24.2.dist-info/
│ │ ├── AUTHORS.txt
│ │ ├── INSTALLER
│ │ ├── LICENSE.txt
│ │ ├── METADATA
│ │ ├── RECORD
│ │ ├── REQUESTED
│ │ ├── WHEEL
│ │ ├── entry_points.txt
│ │ └── top_level.txt
│ ├── Scripts/
│ │ ├── Activate.ps1
│ │ ├── activate
│ │ ├── activate.bat
│ │ └── deactivate.bat
│ └── pyvenv.cfg
├── very_easy/
│ └── is_number.py
├── video-operations/
│ ├── slow-motion.py
│ └── timelapse.py
├── videodownloder.py
├── vigenere_cipher.py
├── voice.py
├── vowel remover function.py
├── webcam.py
├── whatsapp-monitor.py
├── whatsapp-schedule.py
├── wifi hack by brutefore.py
├── wiki/
│ ├── requirements.txt
│ └── wiki.py
├── wiki_random.py
├── wikipedia.py
├── work_connect.py
├── write_excel_file.py
└── youtubedownloader.py
================================================
FILE CONTENTS
================================================
================================================
FILE: .circleci/config.yml
================================================
# Use the latest 2.1 version of CircleCI pipeline process engine.
# See: https://circleci.com/docs/reference/configuration-reference
version: 2.1
# Define a job to be invoked later in a workflow.
# See: https://circleci.com/docs/guides/orchestrate/jobs-steps/#jobs-overview & https://circleci.com/docs/reference/configuration-reference/#jobs
jobs:
say-hello:
# Specify the execution environment. You can specify an image from Docker Hub or use one of our convenience images from CircleCI's Developer Hub.
# See: https://circleci.com/docs/guides/execution-managed/executor-intro/ & https://circleci.com/docs/reference/configuration-reference/#executor-job
docker:
# Specify the version you desire here
# See: https://circleci.com/developer/images/image/cimg/base
- image: cimg/base:current
# Add steps to the job
# See: https://circleci.com/docs/guides/orchestrate/jobs-steps/#steps-overview & https://circleci.com/docs/reference/configuration-reference/#steps
steps:
# Checkout the code as the first step.
- checkout
- run:
name: "Say hello"
command: "echo Hello, World!"
# Orchestrate jobs using workflows
# See: https://circleci.com/docs/guides/orchestrate/workflows/ & https://circleci.com/docs/reference/configuration-reference/#workflows
workflows:
say-hello-workflow: # This is the name of the workflow, feel free to change it to better match your workflow.
# Inside the workflow, you define the jobs you want to run.
jobs:
- say-hello
================================================
FILE: .github/dependabot.yml
================================================
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
================================================
FILE: .github/workflows/Codeql.yml
================================================
name: "CodeQL Python Security and Quality Scan"
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
permissions:
contents: read
actions: read
security-events: write
jobs:
codeql-analysis:
name: "CodeQL Analysis (Python)"
runs-on: ubuntu-latest
steps:
# 1. 检出代码
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
# 2. 初始化 CodeQL
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: python
# 不指定 queries,Action 会默认跑安全 + 质量查询
# 3. 自动构建
- name: Autobuild
uses: github/codeql-action/autobuild@v3
# 4. 执行分析
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
# 不指定 queries,Action 会自动跑安全 + 质量规则
upload: true
================================================
FILE: .github/workflows/python.yml
================================================
name: Python Checks
on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
Test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.14.0'
- name: Install all dependencies and tools
run: |
python -m pip install --upgrade pip
pip install ruff bandit mypy pytest codespell requests-mock colorama
- name: Run Codespell check
run: codespell --skip "*.json,*.txt,*.pdf" || true
- name: Run Bandit security scan
run: bandit -r . --skip B101,B105 || true
- name: Run Pytest tests
run: pytest || true
- name: Run Ruff checks with ignored rules
run: ruff check . --ignore B904,B905,EM101,EXE001,G004,ISC001,PLC0415,PLC1901,PLW060,PLW1641,PLW2901,PT011,PT018,PT028,S101,S311,SIM905,SLF001,F405
- name: Run Mypy type checks
run: mypy . --ignore-missing-imports || true
================================================
FILE: .gitignore
================================================
.idea
*.pyc
string=sorted(input())
lower=""
even=""
odd=""
upper=""
for i in string:
if i.islower():
lower+=i
elif i.isupper():
upper+=i
elif int(i)%2==0:
even+=i
else:
odd+=i
print(lower+upper+odd+even)
.vscode
__pycache__/
.venv
*.DS_Store
Thumbs.db
bankmanaging.db
================================================
FILE: 1 File handle/File handle binary/Update a binary file2.py
================================================
# updating records in a binary file
import pickle
def update():
with open("studrec.dat", "rb+") as File:
value = pickle.load(File)
found = False
roll = int(input("Enter the roll number of the record"))
for i in value:
if roll == i[0]:
print(f"current name {i[1]}")
print(f"current marks {i[2]}")
i[1] = input("Enter the new name")
i[2] = int(input("Enter the new marks"))
found = True
if not found:
print("Record not found")
else:
pickle.dump(value, File)
File.seek(0)
print(pickle.load(File))
update()
# ! Instead of AB use WB?
# ! It may have memory limits while updating large files but it would be good
# ! Few lakhs records would be fine and wouldn't create any much of a significant issues
================================================
FILE: 1 File handle/File handle binary/delete.py
================================================
import logging
import os
import pickle
from dotenv import load_dotenv
base = os.path.dirname(__file__)
load_dotenv(os.path.join(base, ".env"))
logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s")
student_record = os.getenv("STUDENTS_RECORD_FILE")
def b_read():
# Opening a file & loading it
if not os.path.exists(student_record):
logging.warning("File not found")
return
with open(student_record, "rb") as F:
student = pickle.load(F)
logging.info("File opened successfully")
logging.info("Records in the file are:")
for i in student:
logging.info(i)
def b_modify():
# Deleting the Roll no. entered by user
if not os.path.exists(student_record):
logging.warning("File not found")
return
roll_no = int(input("Enter the Roll No. to be deleted: "))
student = 0
with open(student_record, "rb") as F:
student = pickle.load(F)
with open(student_record, "wb") as F:
rec = [i for i in student if i[0] != roll_no]
pickle.dump(rec, F)
b_read()
b_modify()
================================================
FILE: 1 File handle/File handle binary/question 1 (elegible for remedial, top marks).py
================================================
"""Amit is a monitor of class XII-A and he stored the record of all
the students of his class in a file named “student_records.pkl”.
Structure of record is [roll number, name, percentage]. His computer
teacher has assigned the following duty to Amit
Write a function remcount( ) to count the number of students who need
remedial class (student who scored less than 40 percent)
and find the top students of the class.
We have to find weak students and bright students.
"""
## Find bright students and weak students
from dotenv import load_dotenv
import os
base = os.path.dirname(__file__)
load_dotenv(os.path.join(base, ".env"))
student_record = os.getenv("STUDENTS_RECORD_FILE")
import pickle
import logging
# Define logger with info
# import polar
## ! Unoptimised rehne de abhi ke liye
def remcount():
with open(student_record, "rb") as F:
val = pickle.load(F)
count = 0
weak_students = []
for student in val:
if student[2] <= 40:
print(f"{student} eligible for remedial")
weak_students.append(student)
count += 1
print(f"the total number of weak students are {count}")
print(f"The weak students are {weak_students}")
# ! highest marks is the key here first marks
def firstmark():
with open(student_record, "rb") as F:
val = pickle.load(F)
count = 0
main = [i[2] for i in val]
top = max(main)
print(top, "is the first mark")
for i in val:
if top == i[2]:
print(f"{i}\ncongrats")
count += 1
print("The total number of students who secured top marks are", count)
remcount()
firstmark()
================================================
FILE: 1 File handle/File handle binary/read.py
================================================
import pickle
def binary_read():
with open("studrec.dat", "rb") as b:
stud = pickle.load(b)
print(stud)
# prints the whole record in nested list format
print("contents of binary file")
for ch in stud:
print(ch) # prints one of the chosen rec in list
rno = ch[0]
rname = ch[1] # due to unpacking the val not printed in list format
rmark = ch[2]
print(rno, rname, rmark, end="\t")
binary_read()
================================================
FILE: 1 File handle/File handle binary/search record in binary file.py
================================================
# binary file to search a given record
import pickle
from dotenv import load_dotenv
def search():
with open("student_records.pkl", "rb") as F:
# your file path will be different
search = True
rno = int(input("Enter the roll number of the student"))
for i in pickle.load(F):
if i[0] == rno:
print(f"Record found successfully\n{i}")
search = False
if search:
print("Sorry! record not found")
binary_search()
================================================
FILE: 1 File handle/File handle binary/update2.py
================================================
# Updating records in a binary file
# ! Have a .env file please
import pickle
import os
from dotenv import load_dotenv
base = os.path.dirname(__file__)
load_dotenv(os.path.join(base, ".env"))
student_record = os.getenv("STUDENTS_RECORD_FILE")
def update():
with open(student_record, "rb") as F:
S = pickle.load(F)
found = False
rno = int(input("enter the roll number you want to update"))
for i in S:
if rno == i[0]:
print(f"the current name is {i[1]}")
i[1] = input("enter the new name")
found = True
break
if found:
print("Record not found")
with open(student_record, "wb") as F:
pickle.dump(S, F)
update()
================================================
FILE: 1 File handle/File handle text/counter.py
================================================
"""
Class resposible for counting words for different files:
- Reduce redundant code
- Easier code management/debugging
- Code readability
"""
class Counter:
def __init__(self, text: str) -> None:
self.text = text
# Define the initial count of the lower and upper case.
self.count_lower = 0
self.count_upper = 0
self.count()
def count(self) -> None:
for char in self.text:
if char.lower():
self.count_lower += 1
elif char.upper():
self.count_upper += 1
return (self.count_lower, self.count_upper)
def get_total_lower(self) -> int:
return self.count_lower
def get_total_upper(self) -> int:
return self.count_upper
def get_total(self) -> int:
return self.count_lower + self.count_upper
================================================
FILE: 1 File handle/File handle text/file handle 12 length of line in text file.py
================================================
import os
import time
file_name = input("Enter the file name to create:- ")
print(file_name)
def write_to_file(file_name):
if os.path.exists(file_name):
print(f"Error: {file_name} already exists.")
return
with open(file_name, "a") as F:
while True:
text = input("enter any text to add in the file:- ")
F.write(f"{text}\n")
choice = input("Do you want to enter more, y/n").lower()
if choice == "n":
break
def longlines():
with open(file_name, encoding="utf-8") as F:
lines = F.readlines()
lines_less_than_50 = list(filter(lambda line: len(line) < 50, lines))
if not lines_less_than_50:
print("There is no line which is less than 50")
else:
for i in lines_less_than_50:
print(i, end="\t")
if __name__ == "__main__":
write_to_file(file_name)
time.sleep(1)
longlines()
================================================
FILE: 1 File handle/File handle text/happy.txt
================================================
hello how are you
what is your name
do not worry everything is alright
everything will be alright
please don't lose hope
Wonders are on the way
Take a walk in the park
At the end of the day you are more important than anything else.
Many moments of happiness are waiting
You are amazing!
If you truly believe.
================================================
FILE: 1 File handle/File handle text/input,output and error streams.py
================================================
# practicing with streams
import sys
sys.stdout.write("Enter the name of the file")
file = sys.stdin.readline()
with open(
file.strip(),
) as F:
while True:
ch = F.readlines()
for i in ch: # ch is the whole file,for i in ch gives lines, for j in i gives letters,for j in i.split gives words
print(i, end="")
else:
sys.stderr.write("End of file reached")
break
================================================
FILE: 1 File handle/File handle text/question 2.py
================================================
"""Write a method/function DISPLAYWORDS() in python to read lines
from a text file STORY.TXT,
using read function
and display those words, which are less than 4 characters."""
print("Hey!! You can print the word which are less then 4 characters")
def display_words(file_path):
try:
with open(file_path) as F:
words = F.read().split()
words_less_than_40 = list(filter(lambda word: len(word) < 4, words))
for word in words_less_than_40:
print(word)
return (
"The total number of the word's count which has less than 4 characters",
(len(words_less_than_40)),
)
except FileNotFoundError:
print("File not found")
print("Just need to pass the path of your file..")
file_path = input("Please, Enter file path: ")
if __name__ == "__main__":
print(display_words(file_path))
================================================
FILE: 1 File handle/File handle text/question 5.py
================================================
"""Write a function in python to count the number of lowercase
alphabets present in a text file “happy.txt"""
import time
import os
from counter import Counter
print(
"You will see the count of lowercase, uppercase and total count of alphabets in provided file.."
)
file_path = input("Please, Enter file path: ")
if os.path.exists(file_path):
print("The file exists and this is the path:\n", file_path)
def lowercase(file_path):
try:
with open(file_path) as F:
word_counter = Counter(F.read())
print(
f"The total number of lower case letters are {word_counter.get_total_lower()}"
)
time.sleep(0.5)
print(
f"The total number of upper case letters are {word_counter.get_total_upper()}"
)
time.sleep(0.5)
print(f"The total number of letters are {word_counter.get_total()}")
time.sleep(0.5)
except FileNotFoundError:
print("File is not exist.. Please check AGAIN")
if __name__ == "__main__":
lowercase(file_path)
================================================
FILE: 1 File handle/File handle text/question 6.py
================================================
"""Write a function in python to count the number of lowercase
alphabets present in a text file “happy.txt”"""
from counter import Counter
def lowercase():
with open("happy.txt") as F:
word_counter = Counter(F.read())
print(
f"The total number of lower case letters are {word_counter.get_total_lower()}"
)
print(
f"The total number of upper case letters are {word_counter.get_total_upper()}"
)
print(f"The total number of letters are {word_counter.get_total()}")
if __name__ == "__main__":
lowercase()
================================================
FILE: 1 File handle/File handle text/question3.py
================================================
"""Write a user-defined function named count() that will read
the contents of text file named “happy.txt” and count
the number of lines which starts with either “I‟ or “M‟."""
import os
import time
file_name = input("Enter the file name to create:- ")
# step1:
print(file_name)
def write_to_file(file_name):
if os.path.exists(file_name):
print(f"Error: {file_name} already exists.")
else:
with open(file_name, "a") as F:
while True:
text = input("enter any text")
F.write(f"{text}\n")
if input("do you want to enter more, y/n").lower() == "n":
break
# step2:
def check_first_letter():
with open(file_name) as F:
lines = F.read().split()
# store all starting letters from each line in one string after converting to lower case
first_letters = "".join([line[0].lower() for line in lines])
count_i = first_letters.count("i")
count_m = first_letters.count("m")
print(
f"The total number of sentences starting with I or M are {count_i + count_m}"
)
if __name__ == "__main__":
write_to_file(file_name)
time.sleep(1)
check_first_letter()
================================================
FILE: 1 File handle/File handle text/special symbol after word.py
================================================
with open("happy.txt", "r") as F:
# method 1
for i in F.read().split():
print(i, "*", end="")
print("\n")
# method 2
F.seek(0)
for line in F.readlines():
for word in line.split():
print(word, "*", end="")
================================================
FILE: 1 File handle/File handle text/story.txt
================================================
once upon a time there was a king.
he was powerful and happy.
he
all the flowers in his garden were beautiful.
he lived happily ever after.
================================================
FILE: 8_puzzle.py
================================================
from queue import PriorityQueue
from typing import List, Tuple, Optional, Set
class PuzzleState:
"""Represents a state in 8-puzzle solving with A* algorithm."""
def __init__(
self,
board: List[List[int]],
goal: List[List[int]],
moves: int = 0,
previous: Optional["PuzzleState"] = None,
) -> None:
self.board = board # Current 3x3 board configuration
self.goal = goal # Target 3x3 configuration
self.moves = moves # Number of moves taken to reach here
self.previous = previous # Previous state in solution path
def __lt__(self, other: "PuzzleState") -> bool:
"""For PriorityQueue ordering: compare priorities."""
return self.priority() < other.priority()
def priority(self) -> int:
"""A* priority: moves + Manhattan distance."""
return self.moves + self.manhattan()
def manhattan(self) -> int:
"""Calculate Manhattan distance using actual goal positions."""
distance = 0
# Create a lookup table for goal tile positions
goal_pos = {self.goal[i][j]: (i, j) for i in range(3) for j in range(3)}
for i in range(3):
for j in range(3):
value = self.board[i][j]
if value != 0: # skip the empty tile
x, y = goal_pos[value]
distance += abs(x - i) + abs(y - j)
return distance
def is_goal(self) -> bool:
"""Check if current state matches goal."""
return self.board == self.goal
def neighbors(self) -> List["PuzzleState"]:
"""Generate all valid neighboring states by moving empty tile (0)."""
neighbors = []
x, y = next((i, j) for i in range(3) for j in range(3) if self.board[i][j] == 0)
for dx, dy in [(-1, 0), (1, 0), (0, -1), (0, 1)]:
nx, ny = x + dx, y + dy
if 0 <= nx < 3 and 0 <= ny < 3:
new_board = [row[:] for row in self.board]
new_board[x][y], new_board[nx][ny] = new_board[nx][ny], new_board[x][y]
neighbors.append(
PuzzleState(new_board, self.goal, self.moves + 1, self)
)
return neighbors
def solve_puzzle(
initial_board: List[List[int]], goal_board: List[List[int]]
) -> Optional[PuzzleState]:
"""
Solve 8-puzzle using A* algorithm.
>>> solve_puzzle([[1,2,3],[4,0,5],[7,8,6]], [[1,2,3],[4,5,6],[7,8,0]]) is not None
True
"""
initial = PuzzleState(initial_board, goal_board)
frontier = PriorityQueue()
frontier.put(initial)
explored: Set[Tuple[Tuple[int, ...], ...]] = set()
while not frontier.empty():
current = frontier.get()
if current.is_goal():
return current
explored.add(tuple(map(tuple, current.board)))
for neighbor in current.neighbors():
if tuple(map(tuple, neighbor.board)) not in explored:
frontier.put(neighbor)
return None
def print_solution(solution: Optional[PuzzleState]) -> None:
"""Print step-by-step solution from initial to goal state."""
if not solution:
print("No solution found.")
return
steps = []
while solution:
steps.append(solution.board)
solution = solution.previous
for step in reversed(steps):
for row in step:
print(" ".join(map(str, row)))
print()
if __name__ == "__main__":
import doctest
doctest.testmod(verbose=True)
================================================
FILE: A solution to project euler problem 3.py
================================================
"""
Problem:
The prime factors of 13195 are 5,7,13 and 29. What is the largest prime factor
of a given number N?
e.g. for 10, largest prime factor = 5. For 17, largest prime factor = 17.
"""
# def solution(n: int) -> int:
def solution(n: int = 600851475143) -> int:
"""Returns the largest prime factor of a given number n.
>>> solution(13195)
29
>>> solution(10)
5
>>> solution(17)
17
>>> solution(3.4)
3
>>> solution(0)
Traceback (most recent call last):
...
ValueError: Parameter n must be greater or equal to one.
>>> solution(-17)
Traceback (most recent call last):
...
ValueError: Parameter n must be greater or equal to one.
>>> solution([])
Traceback (most recent call last):
...
TypeError: Parameter n must be int or passive of cast to int.
>>> solution("asd")
Traceback (most recent call last):
...
TypeError: Parameter n must be int or passive of cast to int.
"""
try:
n = int(n)
except (TypeError, ValueError):
raise TypeError("Parameter n must be int or passive of cast to int.")
if n <= 0:
raise ValueError("Parameter n must be greater or equal to one.")
i = 2
ans = 0
if n == 2:
return 2
while n > 2:
while n % i != 0:
i += 1
ans = i
while n % i == 0:
n = n / i
i += 1
return int(ans)
if __name__ == "__main__":
# print(solution(int(input().strip())))
import doctest
doctest.testmod()
print(solution(int(input().strip())))
================================================
FILE: AREA OF TRIANGLE.py
================================================
def get_valid_side(prompt:str):
while True:
try:
value = float(input(prompt))
if value <=0:
print("Side must be positive")
continue
return value
except ValueError:
print("Invalid Input")
a = get_valid_side("Enter side 1: ")
b = get_valid_side("Enter side 2: ")
c = get_valid_side("Enter side 3: ")
semi_perimeter = (a + b + c) / 2
area = sqrt((s * (s - a) * (s - b) * (s - c)))
print("The area of the triangle is %0.2f" % area)
================================================
FILE: ARKA.py
================================================
def sumOfSeries(n):
x = n * (n + 1) / 2
return (int)(x * x)
# Driver Function
n = 5
print(sumOfSeries(n))
================================================
FILE: ASCIIvaluecharacter.py
================================================
# Program to find the ASCII value of the given character
c = "p"
print("The ASCII value of '" + c + "' is", ord(c))
================================================
FILE: Add_two_Linked_List.py
================================================
class Node:
def __init__(self, data):
self.data = data
self.next = None
class LinkedList:
def __init__(self):
self.head = None
def insert_at_beginning(self, new_data):
new_node = Node(new_data)
if self.head is None:
self.head = new_node
return
new_node.next = self.head
self.head = new_node
def add_two_no(self, first, second):
prev = None
temp = None
carry = 0
while first is not None or second is not None:
first_data = 0 if first is None else first.data
second_data = 0 if second is None else second.data
Sum = carry + first_data + second_data
carry = 1 if Sum >= 10 else 0
Sum = Sum if Sum < 10 else Sum % 10
temp = Node(Sum)
if self.head is None:
self.head = temp
else:
prev.next = temp
prev = temp
if first is not None:
first = first.next
if second is not None:
second = second.next
if carry > 0:
temp.next = Node(carry)
def __str__(self):
temp = self.head
while temp:
print(temp.data, "->", end=" ")
temp = temp.next
return "None"
if __name__ == "__main__":
first = LinkedList()
second = LinkedList()
first.insert_at_beginning(6)
first.insert_at_beginning(4)
first.insert_at_beginning(9)
second.insert_at_beginning(2)
second.insert_at_beginning(2)
print("First Linked List: ")
print(first)
print("Second Linked List: ")
print(second)
result = LinkedList()
result.add_two_no(first.head, second.head)
print("Final Result: ")
print(result)
================================================
FILE: Anonymous_TextApp.py
================================================
import tkinter as tk
from PIL import Image, ImageTk
from twilio.rest import Client
window = tk.Tk()
window.title("Anonymous_Text_App")
window.geometry("800x750")
# Define global variables
body = ""
to = ""
def message():
global body, to
account_sid = "Your_account_sid" # Your account sid
auth_token = "Your_auth_token" # Your auth token
client = Client(account_sid, auth_token)
msg = client.messages.create(
from_="Twilio_number", # Twilio number
body=body,
to=to,
)
print(msg.sid)
confirmation_label.config(text="Message Sent!")
try:
# Load the background image
bg_img = Image.open(r"D:\Downloads\img2.png")
# Canvas widget
canvas = tk.Canvas(window, width=800, height=750)
canvas.pack(fill="both", expand=True)
# background image to the Canvas
bg_photo = ImageTk.PhotoImage(bg_img)
bg_image_id = canvas.create_image(0, 0, image=bg_photo, anchor="nw")
bg_image_id = canvas.create_image(550, 250, image=bg_photo, anchor="center")
bg_image_id = canvas.create_image(1100, 250, image=bg_photo, anchor="center")
bg_image_id = canvas.create_image(1250, 250, image=bg_photo, anchor="center")
bg_image_id = canvas.create_image(250, 750, image=bg_photo, anchor="center")
bg_image_id = canvas.create_image(850, 750, image=bg_photo, anchor="center")
bg_image_id = canvas.create_image(1300, 750, image=bg_photo, anchor="center")
# Foreground Image
img = Image.open(r"D:\Downloads\output-onlinepngtools.png")
photo = ImageTk.PhotoImage(img)
img_label = tk.Label(window, image=photo, anchor="w")
img_label.image = photo
img_label.place(x=10, y=20)
# Text for number input
canvas.create_text(
1050,
300,
text="Enter the number starting with +[country code]",
font=("Poppins", 18, "bold"),
fill="black",
anchor="n",
)
text_field_number = tk.Entry(
canvas,
width=17,
font=("Poppins", 25, "bold"),
bg="#404040",
fg="white",
show="*",
)
canvas.create_window(1100, 350, window=text_field_number, anchor="n")
# Text for message input
canvas.create_text(
1050,
450,
text="Enter the Message",
font=("Poppins", 18, "bold"),
fill="black",
anchor="n",
)
text_field_text = tk.Entry(
canvas, width=17, font=("Poppins", 25, "bold"), bg="#404040", fg="white"
)
canvas.create_window(1100, 500, window=text_field_text, anchor="n")
# label for confirmation message
confirmation_label = tk.Label(window, text="", font=("Poppins", 16), fg="green")
canvas.create_window(1100, 600, window=confirmation_label, anchor="n")
except Exception as e:
print(f"Error loading image: {e}")
# Function to save input and send message
def save_and_send():
global body, to
to = str(text_field_number.get())
body = str(text_field_text.get())
message()
# Button to save input and send message
save_button = tk.Button(window, text="Save and Send", command=save_and_send)
canvas.create_window(1200, 550, window=save_button, anchor="n")
window.mainloop()
================================================
FILE: AreaOfTriangle.py
================================================
# Python Program to find the area of triangle when all three side-lengths are known!
a = 5
b = 6
c = 7
# Uncomment below to take inputs from the user
# a = float(input('Enter first side: '))
# b = float(input('Enter second side: '))
# c = float(input('Enter third side: '))
# calculate the semi-perimeter
s = (a + b + c) / 2
# calculate the area
area = (s * (s - a) * (s - b) * (s - c)) ** 0.5
print("The area of the triangle is: " + area)
================================================
FILE: Armstrong_number
================================================
def is_armstrong_number(number):
numberstr = str(number)
length = len(numberstr)
num = number
rev = 0
temp = 0
while num != 0:
rem = num % 10
num //= 10
temp += rem ** length
return temp == number
is_armstrong_number(5)
================================================
FILE: Armstrong_number.py
================================================
def is_armstrong_number(number: str) -> bool:
"""Check if a number (as a string) is a narcissistic/Armstrong number."""
# Logic: Get the exponent (number of digits)
exponent = len(number)
# Logic: Sum each digit raised to the power in a single line
# This uses a generator, which is memory efficient.
total = sum(int(digit) ** exponent for digit in number)
# Return the boolean result instead of printing
return total == int(number)
# --- Main execution ---
user_input = input("Enter the number: ")
if is_armstrong_number(user_input):
print(f"{user_input} is an Armstrong number")
else:
print(f"{user_input} is not an Armstrong number")
================================================
FILE: Assembler/GUIDE.txt
================================================
# Guide for Python_Assembler
### Register
In this programming language you can use four registers.
* eax
* ebx
* ecx
* edx
The register **eax** will be standard use for multiplication and division.
Commands for arithmetic are:
* add p0, p1
* sub p0, p1
* mul [register]
* div [register]
p0 and p1 stands for parameter. p0 must be a register, p1 can be a register or constant.
The commands **mul** and **div** standard use eax. For instance:
```
mov ecx, 56
sub ecx, 10
mov eax, 4
int 0x80
```
* The first line move the number 56 into register ecx.
* The second line subtracts 10 from the ecx register.
* The third line move the number 4 into the eax register. This is for the print-function.
* The fourth line call interrupt 0x80, thus the result will print onto console.
* The fifth line is a new line. This is important.
**Important: close each line with a newline!**
### System-Functions
With the interrupt 0x80 you can use some functionality in your program.
EAX | Function
---- | ---------
1 | exit program. error code in ebx
3 | read input. onto ecx (only float)
4 | output onto console. print content in ecx
EAX stands for the register eax
### Variables
Variables begin with a $ or written in uppercase.
For instance:
```
; variables
VAR1 db 56
$var1 db 10
mov ecx, VAR1
mov ebx, $var1
sub ecx, ebx
mov eax, 4
int 0x80
```
**Important: The arithmetic commands (add, sub) work only with registers or constants.
Therefore we must use the register ebx as a placeholder, above.**
Result of code, above.
```
46
```
### Comments available
Comments begin with ; and end with a newline.
We noticed a comment above.
### Push and Pop
Sometimes we must save the content of a register, against losing data.
Therefor we use the push and pop command.
```
push eax
```
This line will push the contents of register eax onto the stack.
```
pop ecx
```
This line will pop the content of the top of the stack onto the ecx register.
```
push [register]
pop [register]
```
### Jumps
With the command **cmp** we can compare two registers.
```
cmp r0, r1
je l1
jmp l2
```
Are the two register equal? The the command **je** is actively and jumps to label **l1**
Otherwise, the command **jmp** is actively and jumps to label **l2**
#### Labels
For instance
```
l1:
```
is a label.
Labels begin with a **l** and contains numbers.
For instance l1, l2 etc ...
To set a label you must end with a colon.
If you use a label in the jump commands, then avoid the colon at the end.
### Subprograms
```
mov ecx, 5
call _double
call _cube
call _inc
mov eax, 4
int 0x80
mov eax, 1
mov ebx, 0
int 0x80
_double:
add ecx, ecx
ret
_cube:
push eax
mov eax, ecx
add ecx, eax
add ecx, eax
pop eax
ret
_inc:
add ecx, 1
ret
```
A subprogram label begins with a **_** and ends with a colon. See above.
If you call the subprogram you must avoid the colon.
``` call _subprogramName
```
**Important:** Each subprogram must end with the **ret** command.
================================================
FILE: Assembler/README.md
================================================
# hy your name
# Python-Assembler
# WE need A FREE T-SHIRT
This program is a simple assembler-like (intel-syntax) interpreter language. The program is written in python 3.
To start the program you will need to type
``` python assembler.py code.txt ```
After you hit 'enter' the program will interpret the source-code in 'code.txt'.
You can use many textfiles as input. These will be interpreted one by one.
You can find some examples in the directory 'examples'.
For instance-
```
$msg db "hello world"
mov ecx, $msg
mov eax, 4
int 0x80
mov eax, 1
mov ebx, 0
int 0x80
```
Will print onto console
```
hello world
END PROGRAM
```
**Refer to GUIDE.txt to read a guide**
================================================
FILE: Assembler/assembler.py
================================================
from __future__ import print_function
import sys
lines = [] # contains the lines of the file.
tokens = [] # contains all tokens of the source code.
# register eax, ebx,..., ecx
eax = 1
ebx = 0
ecx = 0
edx = 0
# status register
zeroFlag = False
# stack data structure
# push --> append
# pop --> pop
stack = []
# jump link table
jumps = {}
# variable table
variables = {}
# return stack for subprograms
returnStack = []
# simple exception class
class InvalidSyntax(Exception):
def __init__(self):
pass
# class for represent a token
class Token:
def __init__(self, token, t):
self.token = token
self.t = t
# def initRegister():
# global register
# for i in range(9):
# register.append(0)
def loadFile(fileName):
"""
loadFile: This function loads the file and reads its lines.
"""
global lines
fo = open(fileName)
for line in fo:
lines.append(line)
fo.close()
def scanner(string):
"""
scanner: This function builds the tokens by the content of the file.
The tokens will be saved in list 'tokens'
"""
global tokens
token = ""
state = 0 # init state
for ch in string:
match state:
case 0:
match ch:
case "m": # catch mov-command
state = 1
token += "m"
case "e": # catch register
state = 4
token += "e"
case "1": # catch a number
if ch <= "9" or ch == "-":
state = 6
token += ch
case "0": # catch a number or hex-code
state = 17
token += ch
case "a": # catch add-command
state = 7
token += ch
case "s": # catch sub command
state = 10
token += ch
case "i": # capture int command
state = 14
token += ch
case "p": # capture push or pop command
state = 19
token += ch
case "l": # capture label
state = 25
token += ch
case "j": # capture jmp command
state = 26
token += ch
case "c": # catch cmp-command
state = 29
token += ch
case ";": # capture comment
state = 33
case '"': # catch a string
state = 34
# without "
case ch.isupper(): # capture identifier
state = 35
token += ch
case "d": # capture db keyword
state = 36
token += ch
case "$": # catch variable with prefix $
state = 38
# not catching $
case "_": # catch label for subprogram
state = 40
# not catches the character _
case "r": # catch ret-command
state = 44
token += ch
case _: # other characters like space-characters etc
state = 0
token = ""
case 1: # state 1
match ch:
case "o":
state = 2
token += ch
case "u":
state = 47
token += ch
case _: # error case
state = 0
token = ""
raise InvalidSyntax()
case 2: # state 2
match ch:
case "v":
state = 3
token += "v"
case _: # error case
state = 0
token = ""
raise InvalidSyntax()
case 3: # state 3
if ch.isspace():
state = 0
tokens.append(Token(token, "command"))
token = ""
else: # error case
state = 0
token = ""
raise InvalidSyntax()
case 4: # state 4
if ch >= "a" and ch <= "d":
state = 5
token += ch
else: # error case
state = 0
token = ""
raise InvalidSyntax()
case 5: # state 5
match ch:
case "x":
state = 13
token += ch
case _:
state = 0
token = ""
raise InvalidSyntax()
case 6: # state 6
if ch.isdigit():
state = 6
token += ch
elif ch.isspace():
state = 0
tokens.append(Token(token, "value"))
token = ""
else: # error case
state = 0
token = ""
raise InvalidSyntax()
case 7: # state 7
match ch:
case "d":
state = 8
token += ch
case _: # error case
state = 0
token = ""
raise InvalidSyntax()
case 8: # state 8
match ch:
case "d":
state = 9
token += ch
case _: # error case
state = 0
token = ""
raise InvalidSyntax()
case 9: # state 9
if ch.isspace():
state = 0
tokens.append(Token(token, "command"))
token = ""
else: # error case
state = 0
token = ""
raise InvalidSyntax()
case 10: # state 10
match ch:
case "u":
state = 11
token += ch
case _: # error case
state = 0
token = ""
raise InvalidSyntax()
case 11: # state 11
match ch:
case "b":
state = 12
token += ch
case _: # error case
state = 0
token = ""
raise InvalidSyntax()
case 12: # state 12
if ch.isspace():
state = 0
tokens.append(Token(token, "command"))
token = ""
else: # error case
state = 0
token = ""
raise InvalidSyntax()
case 13: # state 13
if ch == "," or ch.isspace():
state = 0
tokens.append(Token(token, "register"))
token = ""
else: # error case
state = 0
token = ""
raise InvalidSyntax()
case 14: # state 14
if ch == "n":
state = 15
token += ch
else: # error case
state = 0
token = ""
raise InvalidSyntax()
case 15: # state 15
if ch == "t":
state = 16
token += ch
else: # error case
state = 0
token = ""
raise InvalidSyntax()
case 16: # state 16
if ch.isspace():
state = 0
tokens.append(Token(token, "command"))
token = ""
else: # error case
state = 0
token = ""
raise InvalidSyntax()
case 17: # state 17
if ch == "x":
state = 18
token += ch
elif ch.isspace():
state = 0
tokens.append(Token(token, "value"))
token = ""
else: # error case
state = 0
token = ""
raise InvalidSyntax()
case 18: # state 18
if ch.isdigit() or (ch >= "a" and ch <= "f"):
state = 18
token += ch
elif ch.isspace():
state = 0
tokens.append(Token(token, "value"))
token = ""
else: # error case
state = 0
token = ""
raise InvalidSyntax()
case 19: # state 19
if ch == "u":
state = 20
token += ch
elif ch == "o":
state = 23
token += ch
else: # error case
state = 0
token = ""
raise InvalidSyntax()
case 20: # state 20
if ch == "s":
state = 21
token += ch
else: # error case
state = 0
token = ""
raise InvalidSyntax()
case 21: # state 21
if ch == "h":
state = 22
token += ch
else: # error case
state = 0
token = ""
raise InvalidSyntax()
case 22: # state 22
if ch.isspace():
state = 0
tokens.append(Token(token, "command"))
token = ""
else: # error case
state = 0
token = ""
raise InvalidSyntax()
case 23: # state 23
if ch == "p":
state = 24
token += ch
else: # error case
state = 0
token = ""
raise InvalidSyntax()
case 24: # state 24
if ch.isspace():
state = 0
tokens.append(Token(token, "command"))
token = ""
else: # error case
state = 0
token = ""
raise InvalidSyntax()
case 25: # state 25
if ch.isdigit():
state = 25
token += ch
elif ch == ":" or ch.isspace():
state = 0
tokens.append(Token(token, "label"))
token = ""
else: # error case
state = 0
token = ""
raise InvalidSyntax()
case 26: # state 26
if ch == "m":
state = 27
token += ch
elif ch == "e": # catch je command
state = 32
token += ch
else: # error case
state = 0
token = ""
raise InvalidSyntax()
case 27: # state 27
if ch == "p":
state = 28
token += ch
else: # error case
state = 0
token = ""
raise InvalidSyntax()
case 28: # state 28
if ch.isspace():
state = 0
tokens.append(Token(token, "command"))
token = ""
else: # error case
state = 0
token = ""
raise InvalidSyntax()
case 29: # state 29
match ch:
case "m":
state = 30
token += ch
case "a": # catch call-command
state = 41
token += ch
case _: # error case
state = 0
token = ""
raise InvalidSyntax()
case 30: # state 30
if ch == "p":
state = 31
token += ch
else: # error case
state = 0
token = ""
raise InvalidSyntax()
case 31: # state 31
token = ""
if ch.isspace():
state = 0
tokens.append(Token(token, "command"))
else: # error case
state = 0
raise InvalidSyntax()
case 32: # state 32
token = ""
if ch.isspace():
state = 0
tokens.append(Token(token, "command"))
else: # error case
state = 0
raise InvalidSyntax()
case 33: # state 33
if (
ch.isdigit()
or ch.isalpha()
or (ch.isspace() and ch != "\n")
or ch == '"'
):
state = 33
elif ch == "\n":
state = 0
else: # error case
state = 0
token = ""
raise InvalidSyntax()
case 34: # state 34
if ch.isdigit() or ch.isalpha() or ch.isspace():
state = 34
token += ch
elif ch == '"':
state = 0
tokens.append(Token(token, "string"))
token = ""
else: # error case
state = 0
token = ""
raise InvalidSyntax()
case 35: # state 35
if ch.isdigit() or ch.isupper():
state = 35
token += ch
elif ch == " " or ch == "\n":
state = 0
tokens.append(Token(token, "identifier"))
token = ""
else: # error case
state = 0
token = ""
raise InvalidSyntax()
case 36: # state 36
if ch == "b":
state = 37
token += ch
elif ch == "i":
state = 49
token += ch
else: # error case
state = 0
token = ""
raise InvalidSyntax()
case 37: # state 37
if ch.isspace():
state = 0
tokens.append(Token(token, "command"))
token = ""
else: # error case
state = 0
token = ""
raise InvalidSyntax()
case 38: # state 38
if ch.isalpha():
state = 39
token += ch
else: # error case
state = 0
token = ""
raise InvalidSyntax()
case 39: # state 39
if ch.isalpha() or ch.isdigit():
state = 39
token += ch
elif ch.isspace():
state = 0
tokens.append(Token(token, "identifier"))
token = ""
else: # error case
state = 0
token = ""
raise InvalidSyntax()
case 40: # state 40
if (
(ch >= "a" and ch <= "z")
or (ch >= "A" and ch <= "Z")
or (ch >= "0" and ch <= "9")
):
state = 40
token += ch
elif ch == ":" or ch.isspace():
state = 0
tokens.append(Token(token, "subprogram"))
token = ""
else: # error case
state = 0
token = ""
raise InvalidSyntax()
case 41: # state 41
match ch:
case "l":
state = 42
token += ch
case _: # error case
state = 0
token = ""
raise InvalidSyntax()
case 42: # state 42
match ch:
case "l":
state = 43
token += ch
case _: # error case
state = 0
token = ""
raise InvalidSyntax()
case 43: # state 43
if ch.isspace():
state = 0
tokens.append(Token(token, "command"))
token = ""
else: # error case
state = 0
token = ""
raise InvalidSyntax()
case 44: # state 44
match ch:
case "e":
state = 45
token += ch
case _: # error case
state = 0
token = ""
raise InvalidSyntax()
case 45: # state 45
match ch:
case "t":
state = 46
token += ch
case _: # error case
state = 0
token = ""
raise InvalidSyntax()
case 46: # state 46
if ch.isspace():
state = 0
tokens.append(Token(token, "command"))
token = ""
else: # error case
state = 0
token = ""
raise InvalidSyntax()
case 47: # state 47
match ch:
case "l":
state = 48
token += ch
case _: # error case
state = 0
token = ""
raise InvalidSyntax()
case 48: # state 48
if ch.isspace():
state = 0
tokens.append(Token(token, "command"))
token = ""
else: # error case
state = 0
token = ""
raise InvalidSyntax()
case 49: # state 49
match ch:
case "v":
state = 50
token += ch
case _: # error case
state = 0
token = ""
raise InvalidSyntax()
case 50: # state 50
if ch.isspace():
state = 0
tokens.append(Token(token, "command"))
token = ""
else: # error case
state = 0
token = ""
raise InvalidSyntax()
def scan():
"""
scan: applies function scanner() to each line of the source code.
"""
global lines
assert len(lines) > 0, "no lines"
for line in lines:
try:
scanner(line)
except InvalidSyntax:
print("line=", line)
def parser():
"""
parser: parses the tokens of the list 'tokens'
"""
global tokens
global eax, ebx, ecx, edx
assert len(tokens) > 0, "no tokens"
pointer = 0 # pointer for tokens
token = Token("", "")
tmpToken = Token("", "")
while pointer < len(tokens):
token = tokens[pointer]
if token.token == "mov": # mov commando
# it must follow a register
if pointer + 1 < len(tokens):
pointer += 1
token = tokens[pointer]
else:
print("Error: Not found argument!")
return
# TODO use token.t for this stuff
if token.t == "register":
tmpToken = token
# it must follow a value / string / register / variable
if pointer + 1 < len(tokens):
pointer += 1
token = tokens[pointer]
else:
print("Error: Not found argument!")
return
# converts the token into float, if token contains only digits.
# TODO response of float
if token.t == "identifier": # for variables
# check of exists of variable
if token.token in variables:
token.token = variables[token.token]
else:
print(f"Error: Undefined variable {token.token}")
return
elif token.t == "string":
token.token = str(token.token)
elif isinstance(token.token, float):
pass
elif token.token.isdigit():
token.token = float(token.token)
elif token.token[0] == "-" and token.token[1:].isdigit():
token.token = float(token.token[1:])
token.token *= -1
elif token.t == "register": # loads out of register
match token.token:
case "eax":
token.token = eax
case "ebx":
token.token = ebx
case "ecx":
token.token = ecx
case "edx":
token.token = edx
match tmpToken.token:
case "eax":
eax = token.token
case "ebx":
ebx = token.token
case "ecx":
ecx = token.token
case "edx":
edx = token.token
else:
print("Error: No found register!")
return
elif token.token == "add": # add commando
pointer += 1
token = tokens[pointer]
if token.t == "register":
tmpToken = token
if pointer + 1 < len(tokens):
pointer += 1
token = tokens[pointer]
else:
print("Error: Not found number!")
return
# converts the token into float, if token contains only digits.
if token.t == "register":
# for the case that token is register
match token.token:
case "eax":
token.token = eax
case "ebx":
token.token = ebx
case "ecx":
token.token = ecx
case "edx":
token.token = edx
elif token.token.isdigit():
token.token = float(token.token)
elif token.token[0] == "-" and token.token[1:].isdigit():
token.token = float(token.token[1:])
token.token *= -1
else:
print("Error: ", token, " is not a number!")
return
match tmpToken.token:
case "eax":
eax += token.token
# update zero flag
zeroFlag = False
if eax == 0:
zeroFlag = True
case "ebx":
ebx += token.token
# update zero flag
zeroFlag = False
if ebx == 0:
zeroFlag = True
case "ecx":
ecx += token.token
# update zero flag
zeroFlag = False
if ecx == 0:
zeroFlag = True
case "edx":
edx += token.token
# update zero flag
zeroFlag = False
if edx == 0:
zeroFlag = True
else:
print("Error: Not found register!")
return
elif token.token == "sub": # sub commando
pointer += 1
token = tokens[pointer]
if token.t == "register":
tmpToken = token
if pointer + 1 < len(tokens):
pointer += 1
token = tokens[pointer]
else:
print("Error: Not found number!")
return
# converts the token into float, if token contains only digits.
if token.t == "register":
# for the case that token is register
if token.token == "eax":
token.token = eax
elif token.token == "ebx":
token.token = ebx
elif token.token == "ecx":
token.token = ecx
elif token.token == "edx":
token.token = edx
elif isinstance(token.token, float):
pass
elif token.token.isdigit():
token.token = float(token.token)
elif token.token[0] == "-" and token.token[1:].isdigit():
token.token = float(token.token[1:])
token.token *= -1
else:
print("Error: ", token.token, " is not a number!")
return
if tmpToken.token == "eax":
eax -= token.token
# updated zero flag
if eax == 0:
zeroFlag = True
else:
zeroFlag = False
elif tmpToken.token == "ebx":
ebx -= token.token
# update zero flag
if ebx == 0:
zeroFlag = True
else:
zeroFlag = False
elif tmpToken.token == "ecx":
ecx -= token.token
# update zero flag
if ecx == 0:
zeroFlag = True
else:
zeroFlag = False
elif tmpToken.token == "edx":
edx -= token.token
# update zero flag
if edx == 0:
zeroFlag = True
else:
zeroFlag = False
else:
print("Error: No found register!")
return
elif token.token == "int": # int commando
tmpToken = token
if pointer + 1 < len(tokens):
pointer += 1
token = tokens[pointer]
else:
print("Error: Not found argument!")
return
if token.token == "0x80": # system interrupt 0x80
if eax == 1: # exit program
if ebx == 0:
print("END PROGRAM")
return
else:
print("END PROGRAM WITH ERRORS")
return
elif eax == 3:
ecx = float(input(">> "))
elif eax == 4: # output information
print(ecx)
elif token.token == "push": # push commando
tmpToken = token
# it must follow a register
if pointer + 1 < len(tokens):
pointer += 1
token = tokens[pointer]
else:
print("Error: Not found register!")
return
# pushing register on the stack
stack.append(token.token)
elif token.token == "pop": # pop commando
tmpToken = token
# it must follow a register
if pointer + 1 < len(tokens):
pointer += 1
token = tokens[pointer]
else:
print("Error: Not found register!")
return
# pop register from stack
match token.token:
case "eax":
if len(stack) == 0:
print("Error: Stack Underflow")
return
eax = stack.pop()
case "ebx":
ebx = stack.pop()
case "ecx":
ecx = stack.pop()
case "edx":
edx = stack.pop()
elif token.t == "label": # capture label
jumps[token.token] = pointer
elif token.token == "jmp": # capture jmp command
# it must follow a label
if pointer + 1 < len(tokens):
pointer += 1
token = tokens[pointer]
else:
print("Error: Not found label!")
return
if token.t == "label":
pointer = jumps[token.token]
else:
print("Error: expected a label!")
elif token.token == "cmp":
# TODO
# it must follow a register
if pointer + 1 < len(tokens):
pointer += 1
token = tokens[pointer]
else:
print("Error: Not found argument!")
return
if token.t == "register":
# it must follow a register
if pointer + 1 < len(tokens):
pointer += 1
tmpToken = tokens[pointer] # next register
else:
print("Error: Not found register!")
return
# actual comparing
zeroFlag = setZeroFlag(token.token, tmpToken.token)
elif token.token == "je":
# it must follow a label
if pointer + 1 < len(tokens):
pointer += 1
token = tokens[pointer] # next register
else:
print("Error: Not found argument")
return
# check of label
if token.t == "label":
# actual jump
if zeroFlag:
pointer = jumps[token.token]
else:
print("Error: Not found label")
return
elif token.t == "identifier":
# check whether identifier is in variables-table
if token.token not in variables:
# it must follow a command
if pointer + 1 < len(tokens):
pointer += 1
tmpToken = tokens[pointer] # next register
else:
print("Error: Not found argument")
return
if tmpToken.t == "command" and tmpToken.token == "db":
# it must follow a value (string)
if pointer + 1 < len(tokens):
pointer += 1
tmpToken = tokens[pointer] # next register
else:
print("Error: Not found argument")
return
if tmpToken.t == "value" or tmpToken.t == "string":
if tmpToken.t == "value":
variables[token.token] = float(tmpToken.token)
elif tmpToken.t == "string":
variables[token.token] = tmpToken.token
else:
print("Error: Not found db-keyword")
return
elif token.token == "call": # catch the call-command
# it must follow a subprogram label
if pointer + 1 < len(tokens):
pointer += 1
token = tokens[pointer] # next register
else:
print("Error: Not found subprogram label")
return
if token.t == "subprogram":
if token.token in jumps:
# save the current pointer
returnStack.append(pointer) # eventuell pointer + 1
# jump to the subprogram
pointer = jumps[token.token]
else: # error case
print("Error: Unknown subprogram!")
return
else: # error case
print("Error: Not found subprogram")
return
elif token.token == "ret": # catch the ret-command
if len(returnStack) >= 1:
pointer = returnStack.pop()
else: # error case
print("Error: No return address on stack")
return
elif token.t == "subprogram":
pass
elif token.token == "mul": # catch mul-command
# it must follow a register
if pointer + 1 < len(tokens):
pointer += 1
token = tokens[pointer] # next register
else:
print("Error: Not found argument")
return
if token.t == "register":
if token.token == "eax":
eax *= eax
elif token.token == "ebx":
eax *= ebx
elif token.token == "ecx":
eax *= ecx
elif token.token == "edx":
eax *= edx
else:
print("Error: Not found register")
return
elif token.token == "div":
# it must follow a register
if pointer + 1 < len(tokens):
pointer += 1
token = tokens[pointer] # next register
else:
print("Error: Not found argument")
return
if token.t == "register":
match token.token:
case "eax":
eax /= eax
case "ebx":
if ebx == 0:
print("Error: Division by Zero")
return
eax /= ebx
case "ecx":
eax /= ecx
case "edx":
eax /= edx
else:
print("Error: Not found register")
return
# increment pointer for fetching next token.
pointer += 1
def setZeroFlag(token, tmpToken):
"""return bool for zero flag based on the regToken"""
global eax, ebx, ecx, edx
# Register in string
registers = {
"eax": eax,
"ebx": ebx,
"ecx": ecx,
"edx": edx,
}
zeroFlag = False
match tmpToken:
case "eax":
if registers.get(token) == registers.get(tmpToken):
zeroFlag = True
case "ebx":
if registers.get(token) == registers.get(tmpToken):
zeroFlag = True
case "ecx":
if registers.get(token) == registers.get(tmpToken):
zeroFlag = True
case "edx":
if registers.get(token) == registers.get(tmpToken):
zeroFlag = True
case _:
print("Error: Not found register!")
return
return zeroFlag
def registerLabels():
"""
This function search for labels / subprogram-labels and registers this in the 'jumps' list.
"""
for i in range(len(tokens)):
if tokens[i].t == "label":
jumps[tokens[i].token] = i
elif tokens[i].t == "subprogram":
jumps[tokens[i].token] = i
def resetInterpreter():
"""
resets the interpreter mind.
"""
global eax, ebx, ecx, edx, zeroFlag, stack
global variables, jumps, lines, tokens, returnStack
eax = 0
ebx = 0
ecx = 0
edx = 0
zeroFlag = False
stack = []
jumps = {}
variables = {}
lines = []
tokens = []
returnStack = []
# DEBUG FUNCTION
# def printTokens():
# for token in tokens:
# print(token.token, " --> ", token.t)
# main program
def main():
"""
reads textfiles from the command-line and interprets them.
"""
# [1:] because the first argument is the program itself.
for arg in sys.argv[1:]:
resetInterpreter() # resets interpreter mind
try:
loadFile(arg)
scan()
registerLabels()
parser()
except Exception as e:
print(f"Error: {e}")
if __name__ == "__main__":
main()
================================================
FILE: Assembler/examples/code.txt
================================================
; begin program
; variable section
$var1 db 56
$var2 db 44
mov ecx, $var1
push ecx
mov eax, 3
int 0x80
pop eax
add ecx, ebx
add ecx, eax
mov eax, 4
int 0x80
================================================
FILE: Assembler/examples/code2.txt
================================================
$msg db "hello world"
mov ecx, $msg
mov eax, 4
int 0x80
mov eax, 1
mov ebx, 0
int 0x80
================================================
FILE: Assembler/examples/code3.txt
================================================
mov ecx, 5
call _double
call _cube
call _inc
mov eax, 4
int 0x80
mov eax, 1
mov ebx, 0
int 0x80
_double:
add ecx, ecx
ret
_cube:
push eax
mov eax, ecx
add ecx, eax
add ecx, eax
pop eax
ret
_inc:
add ecx, 1
ret
================================================
FILE: Assembler/examples/code4.txt
================================================
mov eax, 8
mov ebx, 2
mul ebx
mov ecx, eax
mov eax, 4
int 0x80
mov eax, 8
mov ebx, 2
div ebx
mov ecx, eax
mov eax, 4
int 0x80
================================================
FILE: Assembler/examples/klmn
================================================
Assembler/examples/code2.txt
hello world
================================================
FILE: Assembler/examples/test.txt
================================================
; variables
VAR1 db 56
$var1 db 10
mov ecx, VAR1
mov ebx, $var1
sub ecx, ebx
mov eax, 4
int 0x80
================================================
FILE: Assembler/requirements.txt
================================================
print_function
sys
================================================
FILE: Audio_Summarizer.py
================================================
import whisper
import re
import openai
import os
def transcript_generator():
# Load Whisper model
model = whisper.load_model("base")
# Transcribe audio file
result = model.transcribe("audio.mp4")
# Send the transcript to the summarizer
provide_summarizer(result)
def provide_summarizer(Text):
# Set up Groq OpenAI-compatible API credentials
openai.api_key = os.getenv(
"OPENAI_API_KEY", "your-api-key-here"
) # Replace or set in environment
openai.api_base = "https://api.groq.com/openai/v1"
# Extract text from the Whisper result
text_to_summarize = Text["text"]
# Send the transcription to Groq for summarization
response = openai.ChatCompletion.create(
model="llama3-8b-8192",
messages=[
{
"role": "system",
"content": "You are a helpful assistant who summarizes long text into bullet points.",
},
{
"role": "user",
"content": f"Summarize the following:\n\n{text_to_summarize}",
},
],
)
# Split the response into sentences
summary = re.split(r"(?<=[.!?]) +", response["choices"][0]["message"]["content"])
# Save summary to file
with open("summary.txt", "w+", encoding="utf-8") as file:
for sentence in summary:
cleaned = sentence.strip()
if cleaned:
file.write("- " + cleaned + "\n")
if __name__ == "__main__":
transcript_generator()
================================================
FILE: AutoComplete_App/backend.py
================================================
import sqlite3
import json
class AutoComplete:
"""
It works by building a `WordMap` that stores words to word-follower-count
----------------------------
e.g. To train the following statement:
It is not enough to just know how tools work and what they worth,
we have got to learn how to use them and to use them well.
And with all these new weapons in your arsenal, we would better
get those profits fired up
we create the following:
{ It: {is:1}
is: {not:1}
not: {enough:1}
enough: {to:1}
to: {just:1, learn:1, use:2}
just: {know:1}
.
.
profits: {fired:1}
fired: {up:1}
}
so the word completion for "to" will be "use".
For optimization, we use another store `WordPrediction` to save the
predictions for each word
"""
def __init__(self):
"""
Returns - None
Input - None
----------
- Initialize database. we use sqlite3
- Check if the tables exist, if not create them
- maintain a class level access to the database
connection object
"""
self.conn = sqlite3.connect("autocompleteDB.sqlite3", autocommit=True)
cur = self.conn.cursor()
res = cur.execute("SELECT name FROM sqlite_master WHERE name='WordMap'")
tables_exist = res.fetchone()
if not tables_exist:
self.conn.execute("CREATE TABLE WordMap(name TEXT, value TEXT)")
self.conn.execute("CREATE TABLE WordPrediction (name TEXT, value TEXT)")
cur.execute(
"INSERT INTO WordMap VALUES (?, ?)",
(
"wordsmap",
"{}",
),
)
cur.execute(
"INSERT INTO WordPrediction VALUES (?, ?)",
(
"predictions",
"{}",
),
)
def train(self, sentence):
"""
Returns - string
Input - str: a string of words called sentence
----------
Trains the sentence. It does this by creating a map of
current words to next words and their counts for each
time the next word appears after the current word
- takes in the sentence and splits it into a list of words
- retrieves the word map and predictions map
- creates the word map and predictions map together
- saves word map and predictions map to the database
"""
cur = self.conn.cursor()
words_list = sentence.split(" ")
words_map = cur.execute(
"SELECT value FROM WordMap WHERE name='wordsmap'"
).fetchone()[0]
words_map = json.loads(words_map)
predictions = cur.execute(
"SELECT value FROM WordPrediction WHERE name='predictions'"
).fetchone()[0]
predictions = json.loads(predictions)
for idx in range(len(words_list) - 1):
curr_word, next_word = words_list[idx], words_list[idx + 1]
if curr_word not in words_map:
words_map[curr_word] = {}
if next_word not in words_map[curr_word]:
words_map[curr_word][next_word] = 1
else:
words_map[curr_word][next_word] += 1
# checking the completion word against the next word
if curr_word not in predictions:
predictions[curr_word] = {
"completion_word": next_word,
"completion_count": 1,
}
else:
if (
words_map[curr_word][next_word]
> predictions[curr_word]["completion_count"]
):
predictions[curr_word]["completion_word"] = next_word
predictions[curr_word]["completion_count"] = words_map[curr_word][
next_word
]
words_map = json.dumps(words_map)
predictions = json.dumps(predictions)
cur.execute(
"UPDATE WordMap SET value = (?) WHERE name='wordsmap'", (words_map,)
)
cur.execute(
"UPDATE WordPrediction SET value = (?) WHERE name='predictions'",
(predictions,),
)
return "training complete"
def predict(self, word):
"""
Returns - string
Input - string
----------
Returns the completion word of the input word
- takes in a word
- retrieves the predictions map
- returns the completion word of the input word
"""
cur = self.conn.cursor()
predictions = cur.execute(
"SELECT value FROM WordPrediction WHERE name='predictions'"
).fetchone()[0]
predictions = json.loads(predictions)
completion_word = predictions[word.lower()]["completion_word"]
return completion_word
if __name__ == "__main__":
input_ = "It is not enough to just know how tools work and what they worth,\
we have got to learn how to use them and to use them well. And with\
all these new weapons in your arsenal, we would better get those profits fired up"
ac = AutoComplete()
ac.train(input_)
print(ac.predict("to"))
================================================
FILE: AutoComplete_App/frontend.py
================================================
from tkinter import *
import backend
def train():
sentence = train_entry.get()
ac = backend.AutoComplete()
ac.train(sentence)
def predict_word():
word = predict_word_entry.get()
ac = backend.AutoComplete()
print(ac.predict(word))
if __name__ == "__main__":
root = Tk()
root.title("Input note")
root.geometry("300x300")
train_label = Label(root, text="Train")
train_label.pack()
train_entry = Entry(root)
train_entry.pack()
train_button = Button(root, text="train", command=train)
train_button.pack()
predict_word_label = Label(root, text="Input term to predict")
predict_word_label.pack()
predict_word_entry = Entry(root)
predict_word_entry.pack()
predict_button = Button(root, text="predict", command=predict_word)
predict_button.pack()
root.mainloop()
================================================
FILE: Automated Scheduled Call Reminders/caller.py
================================================
# The project automates calls for people from the firebase cloud database and the schedular keeps it running and checks for entries
# every 1 hour using aps scedular
# The project can be used to set 5 min before reminder calls to a set of people for doing a particular job
from firebase_admin import credentials, firestore, initialize_app
from datetime import datetime, timedelta
from time import gmtime, strftime
from twilio.rest import Client
# twilio credentials
acc_sid = ""
auth_token = ""
client = Client(acc_sid, auth_token)
# firebase credentials
# key.json is your certificate of firebase project
cred = credentials.Certificate("key.json")
default_app = initialize_app(cred)
db = firestore.client()
database_reference = db.collection("on_call")
# Here the collection name is on_call which has documents with fields phone , from (%H:%M:%S time to call the person),date
# gets data from cloud database and calls 5 min prior the time (from time) allotted in the database
def search():
calling_time = datetime.now()
one_hours_from_now = (calling_time + timedelta(hours=1)).strftime("%H:%M:%S")
current_date = str(strftime("%d-%m-%Y", gmtime()))
docs = db.collection("on_call").where("date", "==", current_date).stream()
list_of_docs = []
for doc in docs:
c = doc.to_dict()
if (calling_time).strftime("%H:%M:%S") <= c["from"] <= one_hours_from_now:
list_of_docs.append(c)
print(list_of_docs)
while list_of_docs:
timestamp = datetime.now().strftime("%H:%M")
five_minutes_prior = (timestamp + timedelta(minutes=5)).strftime("%H:%M")
for doc in list_of_docs:
if doc["from"][0:5] == five_minutes_prior:
phone_number = doc["phone"]
call = client.calls.create(
to=phone_number,
from_="add your twilio number",
url="http://demo.twilio.com/docs/voice.xml",
)
list_of_docs.remove(doc)
================================================
FILE: Automated Scheduled Call Reminders/requirements.txt
================================================
APScheduler
search
os
time
gmtime
strftime
Client
twilio
datetime
timedelta
credentials
firestore
initialize_app
Twilio
================================================
FILE: Automated Scheduled Call Reminders/schedular.py
================================================
# schedular code for blocking schedular as we have only 1 process to run
from apscheduler.schedulers.blocking import BlockingScheduler
from caller import search
sched = BlockingScheduler()
# Schedule job_function to be called every two hours
sched.add_job(search, "interval", hours=1) # for testing instead add hours =1
sched.start()
================================================
FILE: Bank Application .ipynb
================================================
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"##open project"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# data is abstract Part :)"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"data = {\n",
" \"accno\": [1001, 1002, 1003, 1004, 1005],\n",
" \"name\": [\"vaibhav\", \"abhinav\", \"aman\", \"ashish\", \"pramod\"],\n",
" \"balance\": [10000, 12000, 7000, 9000, 10000],\n",
" \"password\": [\"admin\", \"adminadmin\", \"passwd\", \"1234567\", \"amigo\"],\n",
" \"security_check\": [\"2211\", \"1112\", \"1009\", \"1307\", \"1103\"],\n",
"}"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'accno': [1001, 1002, 1003, 1004, 1005],\n",
" 'name': ['vaibhav', 'abhinav', 'aman', 'ashish', 'pramod'],\n",
" 'balance': [10000, 12000, 7000, 9000, 10000],\n",
" 'password': ['admin', 'adminadmin', 'passwd', '1234567', 'amigo'],\n",
" 'security_check': ['2211', '1112', '1009', '1307', '1103']}"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"data"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" ------------------- \n",
" | Bank Application | \n",
"----------------------------------------------------------------------------------------------------\n",
"\n",
" 1. Login \n",
" 2. Signup \n",
" 3. Exit\n",
" enter what you want login, signup, exit : 1\n",
" login \n",
"____________________________________________________________________________________________________\n",
" enter account number : 1001\n",
" enter password : admin\n",
"\n",
" 1.check ditails \n",
" 2. debit \n",
" 3. credit \n",
" 4. change password \n",
" 5. main Manu \n",
" enter what you want : 1\n",
" cheak ditails \n",
"....................................................................................................\n",
"your account number --> 1001\n",
"your name --> vaibhav\n",
"your balance --> 10000\n",
"\n",
" 1.check ditails \n",
" 2. debit \n",
" 3. credit \n",
" 4. change password \n",
" 5. main Manu \n",
" enter what you want : 5\n",
" main menu \n",
"....................................................................................................\n",
"\n",
" 1. Login \n",
" 2. Signup \n",
" 3. Exit\n",
" enter what you want login, signup, exit : 3\n",
" exit \n",
" thank you for visiting \n",
"....................................................................................................\n"
]
}
],
"source": [
"# import getpass\n",
"print(\"-------------------\".center(100))\n",
"print(\"| Bank Application |\".center(100))\n",
"print(\"-\" * 100)\n",
"while True:\n",
" print(\"\\n 1. Login \\n 2. Signup \\n 3. Exit\")\n",
" i1 = int(input(\"enter what you want login, signup, exit :\".center(50)))\n",
" # login part\n",
" if i1 == 1:\n",
" print(\"login\".center(90))\n",
" print(\"_\" * 100)\n",
" i2 = int(input(\"enter account number : \".center(50)))\n",
" if i2 in (data[\"accno\"]):\n",
" check = (data[\"accno\"]).index(i2)\n",
" i3 = input(\"enter password : \".center(50))\n",
" check2 = data[\"password\"].index(i3)\n",
" if check == check2:\n",
" while True:\n",
" print(\n",
" \"\\n 1.check ditails \\n 2. debit \\n 3. credit \\n 4. change password \\n 5. main Manu \"\n",
" )\n",
" i4 = int(input(\"enter what you want :\".center(50)))\n",
" # check ditails part\n",
" if i4 == 1:\n",
" print(\"cheak ditails\".center(90))\n",
" print(\".\" * 100)\n",
" print(f\"your account number --> {data['accno'][check]}\")\n",
" print(f\"your name --> {data['name'][check]}\")\n",
" print(f\"your balance --> {data['balance'][check]}\")\n",
" continue\n",
" # debit part\n",
" elif i4 == 2:\n",
" print(\"debit\".center(90))\n",
" print(\".\" * 100)\n",
" print(f\"your balance --> {data['balance'][check]}\")\n",
" i5 = int(input(\"enter debit amount : \"))\n",
" if 0 < i5 <= data[\"balance\"][check]:\n",
" debit = data[\"balance\"][check] - i5\n",
" data[\"balance\"][check] = debit\n",
" print(\n",
" f\"your remaining balance --> {data['balance'][check]}\"\n",
" )\n",
" else:\n",
" print(\"your debit amount is more than balance \")\n",
" continue\n",
" # credit part\n",
" elif i4 == 3:\n",
" print(\"credit\".center(90))\n",
" print(\".\" * 100)\n",
" print(f\"your balance --> {data['balance'][check]}\")\n",
" i6 = int(input(\"enter credit amount : \"))\n",
" if 0 < i6:\n",
" credit = data[\"balance\"][check] + i6\n",
" data[\"balance\"][check] = credit\n",
" print(f\"your new balance --> {data['balance'][check]}\")\n",
" else:\n",
" print(\"your credit amount is low \")\n",
" continue\n",
" # password part\n",
" elif i4 == 4:\n",
" print(\"change password\".center(90))\n",
" print(\".\" * 100)\n",
" old = input(\"enter your old password : \")\n",
" print(\n",
" \"your password must have at list one lower case, one uppercase, one digital, one special case and length of password is 8\"\n",
" )\n",
" new = getpass.getpass(prompt=\"Enter your new password\")\n",
" if old == data[\"password\"][check]:\n",
" low, up, sp, di = 0, 0, 0, 0\n",
" if (len(new)) > 8:\n",
" for i in new:\n",
" if i.islower():\n",
" low += 1\n",
" if i.isupper():\n",
" up += 1\n",
" if i.isdigit():\n",
" di += 1\n",
" if i in [\"@\", \"$\", \"%\", \"^\", \"&\", \"*\"]:\n",
" sp += 1\n",
" if (\n",
" low >= 1\n",
" and up >= 1\n",
" and sp >= 1\n",
" and di >= 1\n",
" and low + up + sp + di == len(new)\n",
" ):\n",
" data[\"password\"][check] = new\n",
" print(\n",
" f\"your new password --> {data['password'][check]}\"\n",
" )\n",
" else:\n",
" print(\"Invalid Password\")\n",
" else:\n",
" print(\"old password wrong please enter valid password\")\n",
" continue\n",
" elif i4 == 5:\n",
" print(\"main menu\".center(90))\n",
" print(\".\" * 100)\n",
" break\n",
" else:\n",
" print(\"please enter valid number\")\n",
" else:\n",
" print(\"please check your password number\".center(50))\n",
" else:\n",
" print(\"please check your account number\".center(50))\n",
" # signup part\n",
" elif i1 == 2:\n",
" print(\"signup\".center(90))\n",
" print(\"_\" * 100)\n",
" acc = 1001 + len(data[\"accno\"])\n",
" data[\"accno\"].append(acc)\n",
" ind = (data[\"accno\"]).index(acc)\n",
" name = input(\"enter your name : \")\n",
" data[\"name\"].append(name)\n",
" balance = int(input(\"enter your initial balance : \"))\n",
" data[\"balance\"].append(balance)\n",
" password = input(\"enter your password : \")\n",
" data[\"password\"].append(password)\n",
" security_check = (int(input(\"enter your security pin (DDMM) : \"))).split()\n",
" print(\".\" * 100)\n",
" print(f\"your account number --> {data['accno'][ind]}\".center(50))\n",
" print(f\"your name --> {data['name'][ind]}\".center(50))\n",
" print(f\"your balance --> {data['balance'][ind]}\".center(50))\n",
" print(f\"your password --> {data['password'][ind]}\".center(50))\n",
" continue\n",
" # exit part\n",
" elif i1 == 3:\n",
" print(\"exit\".center(90))\n",
" print(\"thank you for visiting\".center(90))\n",
" print(\".\" * 100)\n",
" break\n",
" else:\n",
" print(f\"wrong enter : {i1}\".center(50))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# All part in function:)"
]
},
{
"cell_type": "code",
"execution_count": 54,
"metadata": {},
"outputs": [],
"source": [
"def cheak_ditails(check):\n",
" print(\"cheak ditails\".center(90))\n",
" print(\".\" * 100)\n",
" print(f\"your account number --> {data['accno'][check]}\")\n",
" print(f\"your name --> {data['name'][check]}\")\n",
" print(f\"your balance --> {data['balance'][check]}\")"
]
},
{
"cell_type": "code",
"execution_count": 55,
"metadata": {},
"outputs": [],
"source": [
"def credit(check):\n",
" print(\"credit\".center(90))\n",
" print(\".\" * 100)\n",
" print(f\"your balance --> {data['balance'][check]}\")\n",
" i6 = int(input(\"enter credit amount : \"))\n",
" if 0 < i6:\n",
" credit = data[\"balance\"][check] + i6\n",
" data[\"balance\"][check] = credit\n",
" print(f\"your new balance --> {data['balance'][check]}\")\n",
" else:\n",
" print(\"your credit amount is low \")"
]
},
{
"cell_type": "code",
"execution_count": 56,
"metadata": {},
"outputs": [],
"source": [
"def debit(check):\n",
" print(\"debit\".center(90))\n",
" print(\".\" * 100)\n",
" print(f\"your balance --> {data['balance'][check]}\")\n",
" i5 = int(input(\"enter debit amount : \"))\n",
" if 0 < i5 <= data[\"balance\"][check]:\n",
" debit = data[\"balance\"][check] - i5\n",
" data[\"balance\"][check] = debit\n",
" print(f\"your remaining balance --> {data['balance'][check]}\")\n",
" else:\n",
" print(\"your debit amount is more than balance \")"
]
},
{
"cell_type": "code",
"execution_count": 57,
"metadata": {},
"outputs": [],
"source": [
"def change_password(check):\n",
" print(\"change password\".center(90))\n",
" print(\".\" * 100)\n",
" old = input(\"enter your old password : \")\n",
" print(\n",
" \"your password must have at list one lower case, one uppercase, one digital, one special case and length of password is 8\"\n",
" )\n",
" new = getpass.getpass(prompt=\"Enter your new password\")\n",
" if old == data[\"password\"][check]:\n",
" low, up, sp, di = 0, 0, 0, 0\n",
" if (len(new)) > 8:\n",
" for i in new:\n",
" if i.islower():\n",
" low += 1\n",
" if i.isupper():\n",
" up += 1\n",
" if i.isdigit():\n",
" di += 1\n",
" if i in [\"@\", \"$\", \"%\", \"^\", \"&\", \"*\"]:\n",
" sp += 1\n",
" if (\n",
" low >= 1\n",
" and up >= 1\n",
" and sp >= 1\n",
" and di >= 1\n",
" and low + up + sp + di == len(new)\n",
" ):\n",
" data[\"password\"][check] = new\n",
" print(f\"your new password --> {data['password'][check]}\")\n",
" else:\n",
" print(\"Invalid Password\")\n",
" else:\n",
" print(\"old password wrong please enter valid password\")"
]
},
{
"cell_type": "code",
"execution_count": 58,
"metadata": {},
"outputs": [],
"source": [
"def login():\n",
" print(\"login\".center(90))\n",
" print(\"_\" * 100)\n",
" i2 = int(input(\"enter account number : \".center(50)))\n",
" if i2 in (data[\"accno\"]):\n",
" check = (data[\"accno\"]).index(i2)\n",
" i3 = input(\"enter password : \".center(50))\n",
" check2 = data[\"password\"].index(i3)\n",
" if check == check2:\n",
" while True:\n",
" print(\n",
" \"\\n 1.check ditails \\n 2. debit \\n 3. credit \\n 4. change password \\n 5. main Manu \"\n",
" )\n",
" i4 = int(input(\"enter what you want :\".center(50)))\n",
" # check ditails part\n",
" if i4 == 1:\n",
" cheak_ditails(check)\n",
" continue\n",
" # debit part\n",
" elif i4 == 2:\n",
" debit(check)\n",
" continue\n",
" # credit part\n",
" elif i4 == 3:\n",
" credit(check)\n",
" continue\n",
" # password part\n",
" elif i4 == 4:\n",
" change_password(check)\n",
" continue\n",
" elif i4 == 5:\n",
" print(\"main menu\".center(90))\n",
" print(\".\" * 100)\n",
" break\n",
" else:\n",
" print(\"please enter valid number\")\n",
" else:\n",
" print(\"please check your password number\".center(50))\n",
" else:\n",
" print(\"please check your account number\".center(50))"
]
},
{
"cell_type": "code",
"execution_count": 74,
"metadata": {},
"outputs": [],
"source": [
"def security_check(ss):\n",
" data = {(1, 3, 5, 7, 8, 10, 12): 31, (2,): 29, (4, 6, 9): 30}\n",
" month = ss[2:]\n",
" date = ss[:2]\n",
" for key, value in data.items():\n",
" print(key, value)\n",
" if int(month) in key:\n",
" if 1 <= int(date) <= value:\n",
" return True\n",
" return False\n",
" return False"
]
},
{
"cell_type": "code",
"execution_count": 75,
"metadata": {},
"outputs": [],
"source": [
"def signup():\n",
" print(\"signup\".center(90))\n",
" print(\"_\" * 100)\n",
" acc = 1001 + len(data[\"accno\"])\n",
" data[\"accno\"].append(acc)\n",
" ind = (data[\"accno\"]).index(acc)\n",
" name = input(\"enter your name : \")\n",
" data[\"name\"].append(name)\n",
" balance = int(input(\"enter your initial balance : \"))\n",
" data[\"balance\"].append(balance)\n",
" password = input(\"enter your password : \")\n",
" data[\"password\"].append(password)\n",
" ss = input(\"enter a secuirty quetion in form dd//mm\")\n",
" security_check(ss)\n",
" data[\"security_check\"].append(ss)\n",
" print(\".\" * 100)\n",
" print(f\"your account number --> {data['accno'][ind]}\".center(50))\n",
" print(f\"your name --> {data['name'][ind]}\".center(50))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" ------------------- \n",
" | Bank Application | \n",
"----------------------------------------------------------------------------------------------------\n",
"\n",
" 1. Login \n",
" 2. Signup \n",
" 3. Exit\n",
" enter what you want login, signup, exit : 2\n",
" signup \n",
"____________________________________________________________________________________________________\n",
"enter your name : am\n",
"enter your initial balance : 1000\n",
"enter your password : amn11\n",
"enter a secuirty quetion in form dd//mm1103\n",
"(1, 3, 5, 7, 8, 10, 12) 31\n",
"....................................................................................................\n",
" your account number --> 1013 \n",
" your name --> am \n",
"\n",
" 1. Login \n",
" 2. Signup \n",
" 3. Exit\n"
]
}
],
"source": [
"def main():\n",
" print(\"-------------------\".center(100))\n",
" print(\"| Bank Application |\".center(100))\n",
" print(\"-\" * 100)\n",
" while True:\n",
" print(\"\\n 1. Login \\n 2. Signup \\n 3. Exit\")\n",
" i1 = int(input(\"enter what you want login, signup, exit :\".center(50)))\n",
" # login part\n",
" if i1 == 1:\n",
" login()\n",
" # signup part\n",
" elif i1 == 2:\n",
" signup()\n",
" # exit part\n",
" elif i1 == 3:\n",
" print(\"exit\".center(90))\n",
" print(\"thank you for visiting\".center(90))\n",
" print(\".\" * 100)\n",
" break\n",
" else:\n",
" print(f\"wrong enter : {i1}\".center(50))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.5"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
================================================
FILE: Base Converter Number system.py
================================================
def base_check(xnumber, xbase):
for char in xnumber[len(xnumber) - 1]:
if int(char) >= int(xbase):
return False
return True
def convert_from_10(xnumber, xbase, arr, ybase):
if int(xbase) == 2 or int(xbase) == 4 or int(xbase) == 6 or int(xbase) == 8:
if xnumber == 0:
return arr
else:
quotient = int(xnumber) // int(xbase)
remainder = int(xnumber) % int(xbase)
arr.append(remainder)
dividend = quotient
convert_from_10(dividend, xbase, arr, base)
elif int(xbase) == 16:
if int(xnumber) == 0:
return arr
else:
quotient = int(xnumber) // int(xbase)
remainder = int(xnumber) % int(xbase)
if remainder > 9:
if remainder == 10:
remainder = "A"
if remainder == 11:
remainder = "B"
if remainder == 12:
remainder = "C"
if remainder == 13:
remainder = "D"
if remainder == 14:
remainder = "E"
if remainder == 15:
remainder = "F"
arr.append(remainder)
dividend = quotient
convert_from_10(dividend, xbase, arr, ybase)
def convert_to_10(xnumber, xbase, arr, ybase):
if int(xbase) == 10:
for char in xnumber:
arr.append(char)
flipped = arr[::-1]
ans = 0
j = 0
for i in flipped:
ans = ans + (int(i) * (int(ybase) ** j))
j = j + 1
return ans
arrayfrom = []
arrayto = []
is_base_possible = False
number = input("Enter the number you would like to convert: ")
while not is_base_possible:
base = input("What is the base of this number? ")
is_base_possible = base_check(number, base)
if not is_base_possible:
print(f"The number {number} is not a base {base} number")
base = input
else:
break
dBase = input("What is the base you would like to convert to? ")
if int(base) == 10:
convert_from_10(number, dBase, arrayfrom, base)
answer = arrayfrom[::-1] # reverses the array
print(f"In base {dBase} this number is: ")
print(*answer, sep="")
elif int(dBase) == 10:
answer = convert_to_10(number, dBase, arrayto, base)
print(f"In base {dBase} this number is: {answer} ")
else:
number = convert_to_10(number, 10, arrayto, base)
convert_from_10(number, dBase, arrayfrom, base)
answer = arrayfrom[::-1]
print(f"In base {dBase} this number is: ")
print(*answer, sep="")
================================================
FILE: Battery_notifier.py
================================================
from plyer import notification # pip install plyer
import psutil # pip install psutil
# psutil.sensors_battery() will return the information related to battery
battery = psutil.sensors_battery()
# battery percent will return the current battery prcentage
percent = battery.percent
charging = battery.power_plugged
# Notification(title, description, duration)--to send
# notification to desktop
# help(Notification)
if charging:
if percent == 100:
charging_message = "Unplug your Charger"
else:
charging_message = "Charging"
else:
charging_message = "Not Charging"
message = str(percent) + "% Charged\n" + charging_message
notification.notify("Battery Information", message, timeout=10)
================================================
FILE: Binary Coefficients.py
================================================
def pascal_triangle(lineNumber):
list1 = list()
list1.append([1])
i = 1
while i <= lineNumber:
j = 1
l = []
l.append(1)
while j < i:
l.append(list1[i - 1][j] + list1[i - 1][j - 1])
j = j + 1
l.append(1)
list1.append(l)
i = i + 1
return list1
def binomial_coef(n, k):
pascalTriangle = pascal_triangle(n)
return pascalTriangle[n][k - 1]
================================================
FILE: Binary_search.py
================================================
# It returns location of x in given array arr
# if present, else returns -1
def binary_search(arr, l, r, x):
# Base case: if left index is greater than right index, element is not present
if l > r:
return -1
# Calculate the mid index
mid = (l + r) // 2
# If element is present at the middle itself
if arr[mid] == x:
return mid
# If element is smaller than mid, then it can only be present in left subarray
elif arr[mid] > x:
return binary_search(arr, l, mid - 1, x)
# Else the element can only be present in right subarray
else:
return binary_search(arr, mid + 1, r, x)
# Main Function
if __name__ == "__main__":
# User input array
arr = [
int(x)
for x in input("Enter the array with elements separated by commas: ").split(",")
]
# User input element to search for
x = int(input("Enter the element you want to search for: "))
# Function call
result = binary_search(arr, 0, len(arr) - 1, x)
# printing the output
if result != -1:
print("Element is present at index {}".format(result))
else:
print("Element is not present in array")
================================================
FILE: Binary_to_Decimal.py
================================================
# Program to convert binary to decimal
def binaryToDecimal(binary):
"""
>>> binaryToDecimal(111110000)
496
>>> binaryToDecimal(10100)
20
>>> binaryToDecimal(101011)
43
"""
decimal, i, n = 0, 0, 0
while binary != 0:
dec = binary % 10
decimal = decimal + dec * pow(2, i)
binary = binary // 10
i += 1
print(decimal)
binaryToDecimal(100)
================================================
FILE: BlackJack_game/blackjack.py
================================================
# master
# master
# BLACK JACK - CASINO A GAME OF FORTUNE!!!
from time import sleep
# BLACK JACK - CASINO
# PYTHON CODE BASE
# master
import random
deck = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11] * 4
random.shuffle(deck)
print(f"{'*' * 58} \n Welcome to the game Casino - BLACK JACK ! \n{'*' * 58}")
sleep(2)
print("So Finally You Are Here To Accept Your Fate")
sleep(2)
print("I Mean Your Fortune")
sleep(2)
print("Lets Check How Lucky You Are Wish You All The Best")
sleep(2)
print("Loading---")
sleep(2)
print("Still Loading---")
sleep(2)
print(
"So You Are Still Here Not Gone I Gave You Chance But No Problem May Be You Trust Your Fortune A Lot \n Lets Begin Then"
)
sleep(2)
d_cards = [] # Initialising dealer's cards
p_cards = [] # Initialising player's cards
sleep(2)
while len(d_cards) != 2:
random.shuffle(deck)
d_cards.append(deck.pop())
if len(d_cards) == 2:
print("The cards dealer has are X ", d_cards[1])
# Displaying the Player's cards
while len(p_cards) != 2:
random.shuffle(deck)
p_cards.append(deck.pop())
if len(p_cards) == 2:
print("The total of player is ", sum(p_cards))
print("The cards Player has are ", p_cards)
if sum(p_cards) > 21:
print(f"You are BUSTED !\n {'*' * 14}Dealer Wins !!{'*' * 14}\n")
exit()
if sum(d_cards) > 21:
print(f"Dealer is BUSTED !\n {'*' * 14} You are the Winner !!{'*' * 18}\n")
exit()
if sum(d_cards) == 21:
print(f"{'*' * 24}Dealer is the Winner !!{'*' * 14}")
exit()
if sum(d_cards) == 21 and sum(p_cards) == 21:
print(f"{'*' * 17}The match is tie !!{'*' * 25}")
exit()
# function to show the dealer's choice
def dealer_choice():
if sum(d_cards) < 17:
while sum(d_cards) < 17:
random.shuffle(deck)
d_cards.append(deck.pop())
print("Dealer has total " + str(sum(d_cards)) + "with the cards ", d_cards)
if sum(p_cards) == sum(d_cards):
print(f"{'*' * 15}The match is tie !!{'*' * 15}")
exit()
if sum(d_cards) == 21:
if sum(p_cards) < 21:
print(f"{'*' * 23}Dealer is the Winner !!{'*' * 18}")
elif sum(p_cards) == 21:
print(f"{'*' * 20}There is tie !!{'*' * 26}")
else:
print(f"{'*' * 23}Dealer is the Winner !!{'*' * 18}")
elif sum(d_cards) < 21:
if sum(p_cards) < 21 and sum(p_cards) < sum(d_cards):
print(f"{'*' * 23}Dealer is the Winner !!{'*' * 18}")
if sum(p_cards) == 21:
print(f"{'*' * 22}Player is winner !!{'*' * 22}")
if 21 > sum(p_cards) > sum(d_cards):
print(f"{'*' * 22}Player is winner !!{'*' * 22}")
else:
if sum(p_cards) < 21:
print(f"{'*' * 22}Player is winner !!{'*' * 22}")
elif sum(p_cards) == 21:
print(f"{'*' * 22}Player is winner !!{'*' * 22}")
else:
print(f"{'*' * 23}Dealer is the Winner !!{'*' * 18}")
while sum(p_cards) < 21:
# to continue the game again and again !!
k = input("Want to hit or stay?\n Press 1 for hit and 0 for stay ")
if k == "1": # Amended 1 to a string
random.shuffle(deck)
p_cards.append(deck.pop())
print("You have a total of " + str(sum(p_cards)) + " with the cards ", p_cards)
if sum(p_cards) > 21:
print(f"{'*' * 13}You are BUSTED !{'*' * 13}\n Dealer Wins !!")
if sum(p_cards) == 21:
print(f"{'*' * 19}You are the Winner !!{'*' * 29}")
else:
dealer_choice()
break
================================================
FILE: BlackJack_game/blackjack_rr.py
================================================
import random
class Colour:
BLACK = "\033[30m"
RED = "\033[91m"
GREEN = "\033[32m"
END = "\033[0m"
suits = (
Colour.RED + "Hearts" + Colour.END,
Colour.RED + "Diamonds" + Colour.END,
Colour.BLACK + "Spades" + Colour.END,
Colour.BLACK + "Clubs" + Colour.END,
)
ranks = (
"Two",
"Three",
"Four",
"Five",
"Six",
"Seven",
"Eight",
"Nine",
"Ten",
"Jack",
"Queen",
"King",
"Ace",
)
values = {
"Two": 2,
"Three": 3,
"Four": 4,
"Five": 5,
"Six": 6,
"Seven": 7,
"Eight": 8,
"Nine": 9,
"Ten": 10,
"Jack": 10,
"Queen": 10,
"King": 10,
"Ace": 11,
}
playing = True
class Card:
def __init__(self, suit, rank):
self.suit = suit
self.rank = rank
def __str__(self):
return self.rank + " of " + self.suit
class Deck:
def __init__(self):
self.deck = []
for suit in suits:
for rank in ranks:
self.deck.append(Card(suit, rank))
def __str__(self):
deck_comp = ""
for card in self.deck:
deck_comp += "\n " + card.__str__()
def shuffle(self):
random.shuffle(self.deck)
def deal(self):
single_card = self.deck.pop()
return single_card
class Hand:
def __init__(self):
self.cards = []
self.value = 0
self.aces = 0 # to keep track of aces
def add_card(self, card):
self.cards.append(card)
self.value += values[card.rank]
if card.rank == "Ace":
self.aces += 1
def adjust_for_ace(self):
while self.value > 21 and self.aces:
self.value -= 10
self.aces -= 1
class Chips:
def __init__(self):
self.total = 100
self.bet = 0
def win_bet(self):
self.total += self.bet
def lose_bet(self):
self.total -= self.bet
def take_bet(chips):
while True:
try:
chips.bet = int(input("How many chips would you like to bet? "))
except ValueError:
print("Your bet must be an integer! Try again.")
else:
if chips.bet > chips.total or chips.bet <= 0:
print(
"Your bet cannot exceed your balance and you have to enter a positive bet! Your current balance is: ",
chips.total,
)
else:
break
def hit(deck, hand):
hand.add_card(deck.deal())
hand.adjust_for_ace()
def hit_or_stand(deck, hand):
global playing
while True:
x = input("Would you like to Hit or Stand? Enter '1' or '0' ")
if x.lower() == "1":
hit(deck, hand)
elif x.lower() == "0":
print("You chose to stand. Dealer will hit.")
playing = False
else:
print("Wrong input, please try again.")
continue
break
def show_some(player, dealer):
print("\nDealer's Hand:")
print(" { hidden card }")
print("", dealer.cards[1])
print("\nYour Hand:", *player.cards, sep="\n ")
def show_all(player, dealer):
print("\nDealer's Hand:", *dealer.cards, sep="\n ")
print("Dealer's Hand =", dealer.value)
print("\nYour Hand:", *player.cards, sep="\n ")
print("Your Hand =", player.value)
def player_busts(player, dealer, chips):
print("You are BUSTED !")
chips.lose_bet()
def player_wins(player, dealer, chips):
print("You are the winner!")
chips.win_bet()
def dealer_busts(player, dealer, chips):
print("Dealer has BUSTED !")
chips.win_bet()
def dealer_wins(player, dealer, chips):
print("Dealer is the winner!")
chips.lose_bet()
def push(player, dealer):
print("The match is tie !")
# GAMEPLAY
player_chips = Chips()
while True:
print("\t **********************************************************")
print(
"\t Welcome to the game Casino - BLACK JACK ! "
)
print("\t **********************************************************")
print(Colour.BLACK + "\t ***************")
print("\t * A *")
print("\t * *")
print("\t * * *")
print("\t * *** *")
print("\t * ***** *")
print("\t * *** *")
print("\t * * *")
print("\t * *")
print("\t * *")
print("\t ***************" + Colour.END)
print(
"\nRULES: Get as close to 21 as you can but if you get more than 21 you will lose!\n Aces count as 1 or 11."
)
deck = Deck()
deck.shuffle()
player_hand = Hand()
player_hand.add_card(deck.deal())
player_hand.add_card(deck.deal())
dealer_hand = Hand()
dealer_hand.add_card(deck.deal())
dealer_hand.add_card(deck.deal())
take_bet(player_chips)
show_some(player_hand, dealer_hand)
while playing:
hit_or_stand(deck, player_hand)
show_some(player_hand, dealer_hand)
if player_hand.value > 21:
player_busts(player_hand, dealer_hand, player_chips)
break
if player_hand.value <= 21:
while dealer_hand.value < 17:
hit(deck, dealer_hand)
show_all(player_hand, dealer_hand)
if dealer_hand.value > 21:
dealer_busts(player_hand, dealer_hand, player_chips)
elif dealer_hand.value > player_hand.value:
dealer_wins(player_hand, dealer_hand, player_chips)
elif dealer_hand.value < player_hand.value:
player_wins(player_hand, dealer_hand, player_chips)
else:
push(player_hand, dealer_hand)
print("\nYour current balance stands at", player_chips.total)
if player_chips.total > 0:
new_game = input("Would you like to play another hand? Enter '1' or '0' ")
if new_game.lower() == "1":
playing = True
continue
else:
print(
"Thanks for playing!\n"
+ Colour.GREEN
+ "\t$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n \t Congratulations! You won "
+ str(player_chips.total)
+ " coins!\n\t$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n "
+ Colour.END
)
break
else:
print(
"Oops! You have bet all your chips and we are sorry you can't play more.\nThanks for playing! Do come again to Casino BLACK JACK!"
)
break
================================================
FILE: BlackJack_game/blackjack_simulate.py
================================================
import os
import random
from functools import namedtuple
"""
Target: BlackJack 21 simulate
- Role
- Dealer: 1
- Insurance: (When dealer Get A(1) face up)
- When dealer got 21
- lost chips
- When dealer doesn't got 21
- win double chips (Your Insurance)
- Player: 1
- Bet: (Drop chip before gambling start)
- Hit: (Take other card from the dealer)
- Stand: (No more card dealer may take card when rank under 17)
- Double down: (When you got over 10 in first hand)
(Get one card)
- Surrender: (only available as first decision of a hand)
- Dealer return 50% chips
"""
__author__ = "Alopex Cheung"
__version__ = "0.2"
BLACK_JACK = 21
BASE_VALUE = 17
COLOR = {
"PURPLE": "\033[1;35;48m",
"CYAN": "\033[1;36;48m",
"BOLD": "\033[1;37;48m",
"BLUE": "\033[1;34;48m",
"GREEN": "\033[1;32;48m",
"YELLOW": "\033[1;33;48m",
"RED": "\033[1;31;48m",
"BLACK": "\033[1;30;48m",
"UNDERLINE": "\033[4;37;48m",
"END": "\033[1;37;0m",
}
class Card:
__slots__ = "suit", "rank", "is_face"
def __init__(self, suit, rank, face=True):
"""
:param suit: pattern in the card
:param rank: point in the card
:param face: show or cover the face(point & pattern on it)
"""
self.suit = suit
self.rank = rank
self.is_face = face
def __repr__(self):
fmt_card = "\t<rank: {rank:2}, suit: {suit:8}>"
if self.is_face:
return fmt_card.format(suit=self.suit, rank=self.rank)
return fmt_card.format(suit="*-Back-*", rank="*-Back-*")
def show(self):
print(str(self))
class Deck:
def __init__(self, num=1):
"""
:param num: the number of deck
"""
self.num = num
self.cards = []
self.built()
def __repr__(self):
return "\n".join([str(card) for card in self.cards])
def __len__(self):
return len(self.cards)
def built(self):
for _ in range(self.num):
ranks = [x for x in range(1, 14)]
suits = "Spades Heart Clubs Diamonds".split()
for suit in suits:
for rank in ranks:
card = Card(suit, rank)
self.cards.append(card)
def shuffle(self):
for _ in range(self.num):
for index in range(len(self.cards)):
i = random.randint(0, 51)
self.cards[index], self.cards[i] = self.cards[i], self.cards[index]
def rebuilt(self):
self.cards.clear()
self.built()
def deliver(self):
return self.cards.pop()
class Chips:
def __init__(self, amount):
"""
:param amount: the chips you own
"""
self._amount = amount
self._bet_amount = 0
self._insurance = 0
self.is_insurance = False
self.is_double = False
def __bool__(self):
return self.amount > 0
@staticmethod
def get_tips(content):
fmt_tips = "{color}** TIPS: {content}! **{end}"
return fmt_tips.format(
color=COLOR.get("YELLOW"), content=content, end=COLOR.get("END")
)
@property
def amount(self):
return self._amount
@amount.setter
def amount(self, value):
if not isinstance(value, int):
type_tips = "Please give a integer"
raise ValueError(Chips.get_tips(type_tips))
if value < 0:
amount_tips = "Your integer should bigger than 0"
raise ValueError(Chips.get_tips(amount_tips))
self._amount = value
@property
def bet_amount(self):
return self._bet_amount
@bet_amount.setter
def bet_amount(self, value):
type_tips = "Please give a integer"
amount_tips = "Your chips should between 1 - " + str(self.amount) + " "
try:
value = int(value)
except ValueError:
raise ValueError(Chips.get_tips(type_tips))
else:
if not isinstance(value, int):
raise ValueError(Chips.get_tips(type_tips))
if (value <= 0) or (value > self.amount):
raise ValueError(Chips.get_tips(amount_tips))
self._bet_amount = value
def double_bet(self):
if self.can_double():
self._bet_amount *= 2
self.is_double = True
else:
over_tips = "Not enough chips || "
cannot_double = "CAN'T DO DOUBLE"
raise ValueError(Chips.get_tips(over_tips + cannot_double))
@property
def insurance(self):
return self._insurance
@insurance.setter
def insurance(self, value):
if self.amount - value < 0:
over_tips = "Not enough chips"
raise ValueError(Chips.get_tips(over_tips))
self._insurance = value
self.is_insurance = True
def current_amount(self):
return self.amount - self.bet_amount - self.insurance
def reset_chip(self):
self._bet_amount = 0
self._insurance = 0
self.is_double = False
self.is_insurance = False
def can_double(self):
return self.current_amount() - self.bet_amount >= 0
class User:
def __init__(self, name, role, chips_amount=None, color="END"):
"""
:param name: User name
:param role: dealer or player
:param chips_amount: Casino tokens equal money
"""
self.name = name
self.prompt = "{role} >> ({name}) : ".format(role=role, name=self.name)
self.chips = Chips(chips_amount)
self.color = color
self.hand = []
self.point = 0
def __repr__(self):
return str(self.__dict__)
def obtain_card(self, deck, face=True):
card = deck.deliver()
card.is_face = face
self.hand.append(card)
def drop_card(self):
self.hand.clear()
self.point = 0
def show_card(self):
print("\t ** Here is my card **")
for card in self.hand:
card.show()
def unveil_card(self):
for card in self.hand:
card.is_face = True
self.show_card()
def calculate_point(self):
def _extract_rank():
raw_ranks = [card.rank for card in self.hand]
cook_ranks = [10 if rank > 10 else rank for rank in raw_ranks]
return cook_ranks
def _sum_up(ranks):
rank_one = sum(ranks)
rank_eleven = sum([11 if rank == 1 else rank for rank in ranks])
# Over or has 2 Ace
if (ranks[::-1] == ranks) and (1 in ranks):
return 11 + len(ranks) - 1
if rank_eleven <= BLACK_JACK:
return rank_eleven
return rank_one
points = _extract_rank()
self.point = _sum_up(points)
def is_point(self, opt, point):
self.calculate_point()
compare_fmt = "{user_point} {opt} {point}".format(
user_point=self.point, opt=opt, point=point
)
return eval(compare_fmt)
def speak(self, content="", end_char="\n"):
print("")
print(
COLOR.get(self.color) + self.prompt + COLOR.get("END") + content,
end=end_char,
)
def showing(self):
self.speak()
self.show_card()
def unveiling(self):
self.calculate_point()
points_fmt = "My point is: {}".format(str(self.point))
self.speak(points_fmt)
self.unveil_card()
class Dealer(User):
def __init__(self, name):
super().__init__(name=name, role="Dealer", color="PURPLE")
self.trigger = 0
def ask_insurance(self):
buy_insurance = (
"(Insurance pay 2 to 1)\n"
"\tMy Face card is an Ace.\n"
"\tWould your like buy a insurance ?"
)
self.speak(content=buy_insurance)
def strategy_trigger(self, deck):
if self.is_point("<", BASE_VALUE):
self.obtain_card(deck)
else:
self.trigger += random.randint(0, 5)
if self.trigger % 5 == 0:
self.obtain_card(deck)
class Player(User):
def __init__(self, name, amount):
super().__init__(name=name, chips_amount=amount, role="Player", color="CYAN")
self.refresh_prompt()
def refresh_prompt(self):
self.prompt = "{role} [ ${remain} ] >> ({name}) : ".format(
role="Player", name=self.name, remain=self.chips.current_amount()
)
def select_choice(self, pattern):
my_turn = "My turn now."
self.speak(content=my_turn)
operation = {
"I": "Insurance",
"H": "Hit",
"S": "Stand",
"D": "Double-down",
"U": "Surrender",
}
enu_choice = enumerate((operation.get(p) for p in pattern), 1)
dict_choice = dict(enu_choice)
for index, operator in dict_choice.items():
choice_fmt = "\t[{index}] {operation}"
print(choice_fmt.format(index=index, operation=operator))
return dict_choice
class Recorder:
def __init__(self):
self.data = []
self.winner = None
self.remain_chips = 0
self.rounds = 0
self.player_win_count = 0
self.dealer_win_count = 0
self.player_point = 0
self.dealer_point = 0
def update(self, winner, chips, player_point, dealer_point):
self.rounds += 1
self.remain_chips = chips
self.winner = winner
if self.winner == "Player":
self.player_win_count += 1
elif self.winner == "Dealer":
self.dealer_win_count += 1
self.player_point = player_point
self.dealer_point = dealer_point
def record(self, winner, chips, player_point, dealer_point):
self.update(winner, chips, player_point, dealer_point)
Row = namedtuple(
"Row", ["rounds", "player_point", "dealer_point", "winner", "remain_chips"]
)
row = Row(
self.rounds,
self.player_point,
self.dealer_point,
self.winner,
self.remain_chips,
)
self.data.append(row)
def draw_diagram(self):
content = "Record display"
bars = "--" * 14
content_bar = bars + content + bars
base_bar = bars + "-" * len(content) + bars
os.system("clear")
print(base_bar)
print(content_bar)
print(base_bar)
self.digram()
print(base_bar)
print(content_bar)
print(base_bar)
def digram(self):
title = "Round\tPlayer-Point\tDealer-Point\tWinner-is\tRemain-Chips"
row_fmt = "{}\t{}\t\t{}\t\t{}\t\t{}"
print(title)
for row in self.data:
print(
row_fmt.format(
row.rounds,
row.player_point,
row.dealer_point,
row.winner,
row.remain_chips,
)
)
print("")
win_rate_fmt = ">> Player win rate: {}%\n>> Dealer win rate: {}%"
try:
player_rate = round(self.player_win_count / self.rounds * 100, 2)
dealer_rate = round(self.dealer_win_count / self.rounds * 100, 2)
except ZeroDivisionError:
player_rate = 0
dealer_rate = 0
print(win_rate_fmt.format(player_rate, dealer_rate))
class BlackJack:
def __init__(self, username):
self.deck = Deck()
self.dealer = Dealer("Bob")
self.player = Player(username.title(), 1000)
self.recorder = Recorder()
self.go_on = True
self.first_hand = True
self.choice = None
self.winner = None
self.bust = False
self.res = None
def play(self):
while self.player.chips:
self.initial_game()
self.in_bet()
self.deal_card()
while self.go_on:
self.choice = self.menu()
# self.player.speak()
self.chips_manage()
try:
self.card_manage()
except ValueError as res:
self.bust = True
self.go_on = False
self.res = res
if not self.bust:
self.is_surrender()
self.winner = self.get_winner()
self.res = "Winner is " + self.winner
os.system("clear")
self.calculate_chips()
self.result_exhibit()
self.dealer.unveiling()
self.player.unveiling()
self.recorder.record(
self.winner,
self.player.chips.amount,
self.player.point,
self.dealer.point,
)
self.recorder.draw_diagram()
ending = "\n\tSorry I lost all chips!\n\tTime to say goodbye."
self.player.speak(ending)
print("\n" + "-" * 20 + " End Game " + "-" * 20)
def initial_game(self):
self.go_on = True
self.first_hand = True
self.choice = None
self.winner = None
self.bust = False
self.deck.rebuilt()
self.deck.shuffle()
self.player.chips.reset_chip()
self.player.drop_card()
self.player.refresh_prompt()
self.dealer.drop_card()
print("\n" + "-" * 20 + " Start Game " + "-" * 20)
def in_bet(self):
in_bet = "\n\tI want to bet: "
not_invalid = True
self.player.speak(in_bet, end_char="")
while not_invalid:
try:
self.player.chips.bet_amount = input()
except ValueError as e:
print(e)
self.player.speak(in_bet, end_char="")
continue
except KeyboardInterrupt:
print("")
self.recorder.draw_diagram()
quit()
else:
self.player.refresh_prompt()
# self.player.speak()
not_invalid = False
def deal_card(self):
# dealer
self.dealer.obtain_card(self.deck, face=False)
self.dealer.obtain_card(self.deck)
# player
self.player.obtain_card(self.deck)
self.player.obtain_card(self.deck)
self.dealer.showing()
self.player.showing()
def menu(self):
pattern = "HS"
if self.first_hand:
pattern += "U"
if self.dealer.hand[1].rank == 1 and self.player.chips.current_amount():
pattern += "I"
self.dealer.ask_insurance()
if self.player.is_point(">", 10) and self.player.chips.can_double():
pattern += "D"
self.first_hand = False
choices = self.player.select_choice(pattern)
select = self.get_select(len(choices), general_err="Select above number.")
return choices[select]
@staticmethod
def get_select(select_max, prompt=">> ", general_err=""):
while True:
try:
value = input(prompt)
select = int(value)
if select > select_max:
raise ValueError
except ValueError:
print(general_err)
continue
except KeyboardInterrupt:
print("")
quit()
else:
return select
def chips_manage(self):
if self.choice == "Insurance":
err = "The amount should under " + str(self.player.chips.current_amount())
pay_ins = self.get_select(
self.player.chips.current_amount(),
prompt="Insurance amount >> ",
general_err=err,
)
self.player.chips.insurance = pay_ins
if self.choice == "Double-down":
try:
self.player.chips.double_bet()
except ValueError as e:
print(e)
self.player.refresh_prompt()
if self.choice in ("Insurance", "Double-down", "Surrender"):
self.go_on = False
def card_manage(self):
if self.choice in ("Hit", "Double-down"):
self.player.obtain_card(self.deck)
if self.player.is_point(">", BLACK_JACK):
raise ValueError("Player BUST")
else:
self.dealer.strategy_trigger(self.deck)
if self.dealer.is_point(">", BLACK_JACK):
raise ValueError("Dealer BUST")
elif self.choice != "Surrender":
if not self.player.chips.is_insurance:
self.dealer.strategy_trigger(self.deck)
if self.dealer.is_point(">", BLACK_JACK):
raise ValueError("Dealer BUST")
self.dealer.showing()
self.player.showing()
if self.choice in ("Double-down", "Stand"):
self.go_on = False
def is_surrender(self):
if self.choice == "Surrender":
self.player.speak("Sorry, I surrender....\n")
def get_winner(self):
if self.bust:
return "Dealer" if self.player.is_point(">", BLACK_JACK) else "Player"
if self.choice == "Surrender":
return "Dealer"
elif self.choice == "Insurance":
if self.player.is_point("==", BLACK_JACK):
return "Dealer"
return "Player"
if self.choice in ("Double-down", "Stand"):
self.player.calculate_point()
self.dealer.calculate_point()
if self.player.point > self.dealer.point:
return "Player"
return "Dealer"
return "Both"
def calculate_chips(self):
if self.choice == "Surrender":
if self.player.chips.bet_amount == 1:
if self.player.chips.current_amount() == 0:
self.player.chips.amount = 0
else:
surrender_amount = self.player.chips.bet_amount // 2
self.player.chips.amount -= surrender_amount
elif self.choice in ("Double-down", "Stand", "Insurance", "Hit"):
if self.winner == "Player":
self.player.chips.amount += (
self.player.chips.bet_amount + self.player.chips.insurance * 2
)
elif self.winner == "Dealer":
self.player.chips.amount -= (
self.player.chips.bet_amount + self.player.chips.insurance
)
def result_exhibit(self):
def get_color():
if "BUST" in content:
return COLOR.get("RED" if "Player" in content else "GREEN")
if self.winner == "Player":
return COLOR.get("GREEN")
elif self.winner == "Dealer":
return COLOR.get("RED")
else:
return COLOR.get("YELLOW")
end = COLOR.get("END")
content = str(self.res)
color = get_color()
winner_fmt = color + "\n\t>> {content} <<\n" + end
print(winner_fmt.format(content=content))
def main():
try:
user_name = input("What is your name: ")
except KeyboardInterrupt:
print("")
else:
black_jack = BlackJack(username=user_name)
black_jack.play()
if __name__ == "__main__":
main()
================================================
FILE: BlackJack_game/requirements.txt
================================================
time
random
================================================
FILE: BoardGame-CLI/python.py
================================================
import random
# Define the game board with snakes and ladders
snakes_and_ladders = {
2: 38,
7: 14,
8: 31,
15: 26,
16: 6,
21: 42,
28: 84,
36: 44,
46: 25,
49: 11,
51: 67,
62: 19,
64: 60,
71: 91,
74: 53,
78: 98,
87: 94,
89: 68,
92: 88,
95: 75,
99: 80,
}
# Function to roll a six-sided die
def roll_die():
return random.randint(1, 6)
# Function to simulate a single turn
def take_turn(current_position, player_name):
# Roll the die
roll_result = roll_die()
print(f"{player_name} rolled a {roll_result}!")
# Calculate the new position after the roll
new_position = current_position + roll_result
# Check if the new position is a ladder or a snake
if new_position in snakes_and_ladders:
new_position = snakes_and_ladders[new_position]
if new_position > current_position:
print("Ladder! Climb up!")
else:
print("Snake! Slide down!")
# Check if the new position exceeds the board size
if new_position >= 100:
new_position = 100
print(f"Congratulations, {player_name} reached the final square!")
return new_position
# Main game loop
def play_snakes_and_ladders():
player1_position = 1
player2_position = 1
player1_name = input("Enter the name of Player 1: ")
player2_name = input("Enter the name of Player 2: ")
current_player = player1_name
while player1_position < 100 and player2_position < 100:
print(f"\n{current_player}'s turn:")
input("Press Enter to roll the die.")
if current_player == player1_name:
player1_position = take_turn(player1_position, player1_name)
current_player = player2_name
else:
player2_position = take_turn(player2_position, player2_name)
current_player = player1_name
print("\nGame Over!")
print(f"{player1_name} ended at square {player1_position}.")
print(f"{player2_name} ended at square {player2_position}.")
if player1_position == 100:
print(f"{player1_name} won!")
elif player2_position == 100:
print(f"{player2_name} won!")
# Start the game
if __name__ == "__main__":
play_snakes_and_ladders()
================================================
FILE: BoardGame-CLI/snakeLadder.py
================================================
import random
# Taking players data
players = {} # stores players name their locations
isReady = {}
current_loc = 1 # variable for iterating location
imp = True
# players input function
def player_input():
global players
global current_loc
global isReady
x = True
while x:
player_num = int(input("Enter the number of players: "))
if player_num > 0:
for i in range(player_num):
name = input(f"Enter player {i + 1} name: ")
players[name] = current_loc
isReady[name] = False
x = False
play() # play function call
else:
print("Number of player cannot be zero")
print()
# Dice roll method
def roll():
# print(players)
return random.randrange(1, 7)
# play method
def play():
global players
global isReady
global imp
while imp:
print("/" * 20)
print("1 -> roll the dice (or enter)")
print("2 -> start new game")
print("3 -> exit the game")
print("/" * 20)
for i in players:
n = input("{}'s turn: ".format(i)) or 1
n = int(n)
if players[i] < 100:
if n == 1:
temp1 = roll()
print(f"you got {temp1}")
print("")
if isReady[i] == False and temp1 == 6:
isReady[i] = True
if isReady[i]:
looproll = temp1
counter_6 = 0
while looproll == 6:
counter_6 += 1
looproll = roll()
temp1 += looproll
print(f"you got {looproll} ")
if counter_6 == 3:
temp1 -= 18
print("Three consectutives 6 got cancelled")
print("")
# print(temp1)
if (players[i] + temp1) > 100:
pass
elif (players[i] + temp1) < 100:
players[i] += temp1
players[i] = move(players[i], i)
elif (players[i] + temp1) == 100:
print(f"congrats {i} you won !!!")
imp = False
return
print(f"you are at position {players[i]}")
elif n == 2:
players = {} # stores player and their locations
isReady = {}
current_loc = 1 # reset starting location to 1
player_input()
elif n == 3:
print("Bye Bye")
imp = False
else:
print("pls enter a valid input")
# Move method
def move(a, i):
global players
global imp
temp_loc = players[i]
if (temp_loc) < 100:
temp_loc = ladder(temp_loc, i)
temp_loc = snake(temp_loc, i)
return temp_loc
# snake bite code
def snake(c, i):
if c == 32:
players[i] = 10
elif c == 36:
players[i] = 6
elif c == 48:
players[i] = 26
elif c == 63:
players[i] = 18
elif c == 88:
players[i] = 24
elif c == 95:
players[i] = 56
elif c == 97:
players[i] = 78
else:
return players[i]
print(f"You got bitten by a snake now you are at {players[i]}")
return players[i]
# ladder code
def ladder(a, i):
global players
if a == 4:
players[i] = 14
elif a == 8:
players[i] = 30
elif a == 20:
players[i] = 38
elif a == 40:
players[i] = 42
elif a == 28:
players[i] = 76
elif a == 50:
players[i] = 67
elif a == 71:
players[i] = 92
elif a == 88:
players[i] = 99
else:
return players[i]
print(f"You got a ladder now you are at {players[i]}")
return players[i]
# while run:
print("/" * 40)
print("Welcome to the snake ladder game !!!!!!!")
print("/" * 40)
if __name__ == "__main__":
player_input()
================================================
FILE: BoardGame-CLI/uno.py
================================================
# uno game #
import random
from typing import List
"""
Generate the UNO deck of 108 cards.
Doctest examples:
>>> deck = buildDeck()
>>> len(deck)
108
>>> sum(1 for c in deck if 'Wild' in c)
8
Return: list of card strings (e.g. 'Red 7', 'Wild Draw Four')
"""
def buildDeck() -> List[str]:
deck: List[str] = []
# example card:Red 7,Green 8, Blue skip
colours = ["Red", "Green", "Yellow", "Blue"]
values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, "Draw Two", "Skip", "Reverse"]
wilds = ["Wild", "Wild Draw Four"]
for colour in colours:
for value in values:
cardVal = "{} {}".format(colour, value)
deck.append(cardVal)
if value != 0:
deck.append(cardVal)
for i in range(4):
deck.append(wilds[0])
deck.append(wilds[1])
return deck
"""
Shuffles a list of items passed into it
Parameters: deck=>list
Return values: deck=>list
"""
def shuffleDeck(deck: List[str]) -> List[str]:
# use Python's built-in shuffle which is efficient and correct
random.shuffle(deck)
return deck
"""Draw card function that draws a specified number of cards off the top of the deck
Parameters: numCards -> integer
Return: cardsDrawn -> list
"""
def drawCards(numCards: int) -> List[str]:
"""
Draw a number of cards from the top of the global `unoDeck`.
Raises ValueError if the deck runs out of cards.
"""
cardsDrawn: List[str] = []
for x in range(numCards):
try:
cardsDrawn.append(unoDeck.pop(0))
except IndexError:
raise ValueError("The deck is empty; cannot draw more cards")
return cardsDrawn
"""
Print formatted list of player's hand
Parameter: player->integer , playerHand->list
Return: None
"""
def showHand(player: int, playerHand: List[str]) -> None:
print("Player {}'s Turn".format(players_name[player]))
print("Your Hand")
print("------------------")
y = 1
for card in playerHand:
print("{}) {}".format(y, card))
y += 1
print("")
"""
Check whether a player is able to play a card, or not
Parameters: discardCard->string,value->string, playerHand->list
Return: boolean
"""
def canPlay(colour: str, value: str, playerHand: List[str]) -> bool:
"""
Return True if any card in playerHand is playable on a discard with given colour and value.
>>> canPlay('Red','5',['Red 3','Green 5'])
True
>>> canPlay('Blue','7',['Green 1'])
False
"""
for card in playerHand:
if "Wild" in card:
return True
elif colour in card or value in card:
return True
return False
# --- Global deck and initial setup ---
unoDeck = buildDeck()
unoDeck = shuffleDeck(unoDeck)
unoDeck = shuffleDeck(unoDeck)
discards: List[str] = []
players_name: List[str] = []
players: List[List[str]] = []
colours = ["Red", "Green", "Yellow", "Blue"]
def main() -> None:
"""Run interactive UNO game (keeps original behavior).
Note: main() is interactive and not exercised by doctest.
"""
global players_name, players, discards
numPlayers = int(input("How many players?"))
while numPlayers < 2 or numPlayers > 4:
numPlayers = int(
input("Invalid. Please enter a number between 2-4.\nHow many players?")
)
for player in range(numPlayers):
players_name.append(input("Enter player {} name: ".format(player + 1)))
players.append(drawCards(5))
playerTurn = 0
playDirection = 1
playing = True
discards.append(unoDeck.pop(0))
splitCard = discards[0].split(" ", 1)
currentColour = splitCard[0]
if currentColour != "Wild":
cardVal = splitCard[1]
else:
cardVal = "Any"
while playing:
showHand(playerTurn, players[playerTurn])
print("Card on top of discard pile: {}".format(discards[-1]))
if canPlay(currentColour, cardVal, players[playerTurn]):
cardChosen = int(input("Which card do you want to play?"))
while not canPlay(
currentColour, cardVal, [players[playerTurn][cardChosen - 1]]
):
cardChosen = int(
input("Not a valid card. Which card do you want to play?")
)
print("You played {}".format(players[playerTurn][cardChosen - 1]))
discards.append(players[playerTurn].pop(cardChosen - 1))
# cheak if player won
if len(players[playerTurn]) == 0:
playing = False
# winner = "Player {}".format(playerTurn+1)
winner = players_name[playerTurn]
else:
# cheak for special cards
splitCard = discards[-1].split(" ", 1)
currentColour = splitCard[0]
if len(splitCard) == 1:
cardVal = "Any"
else:
cardVal = splitCard[1]
if currentColour == "Wild":
for x in range(len(colours)):
print("{}) {}".format(x + 1, colours[x]))
newColour = int(input("What colour would you like to choose? "))
while newColour < 1 or newColour > 4:
newColour = int(
input(
"Invalid option. What colour would you like to choose"
)
)
currentColour = colours[newColour - 1]
if cardVal == "Reverse":
playDirection = playDirection * -1
elif cardVal == "Skip":
playerTurn += playDirection
if playerTurn >= numPlayers:
playerTurn = 0
elif playerTurn < 0:
playerTurn = numPlayers - 1
elif cardVal == "Draw Two":
playerDraw = playerTurn + playDirection
if playerDraw == numPlayers:
playerDraw = 0
elif playerDraw < 0:
playerDraw = numPlayers - 1
players[playerDraw].extend(drawCards(2))
elif cardVal == "Draw Four":
playerDraw = playerTurn + playDirection
if playerDraw == numPlayers:
playerDraw = 0
elif playerDraw < 0:
playerDraw = numPlayers - 1
players[playerDraw].extend(drawCards(4))
print("")
else:
print("You can't play. You have to draw a card.")
players[playerTurn].extend(drawCards(1))
playerTurn += playDirection
if playerTurn >= numPlayers:
playerTurn = 0
elif playerTurn < 0:
playerTurn = numPlayers - 1
print("Game Over")
print("{} is the Winner!".format(winner))
if __name__ == "__main__":
main()
================================================
FILE: BrowserHistory/backend.py
================================================
class DLL:
"""
a doubly linked list that holds the current page,
next page, and previous page.
Used to enforce order in operations.
"""
def __init__(self, val: str = None):
self.val = val
self.nxt = None
self.prev = None
class BrowserHistory:
"""
This class designs the operations of a browser history
It works by using a doubly linked list to hold the urls with optimized
navigation using step counters and memory management
"""
def __init__(self, homepage: str):
"""
Returns - None
Input - str
----------
- Initialize doubly linked list which will serve as the
browser history and sets the current page
- Initialize navigation counters
"""
self._head = DLL(homepage)
self._curr = self._head
self._back_count = 0
self._forward_count = 0
def visit(self, url: str) -> None:
"""
Returns - None
Input - str
----------
- Adds the current url to the DLL
- Sets both the next and previous values
- Cleans up forward history to prevent memory leaks
- Resets forward count and increments back count
"""
# Clear forward history to prevent memory leaks
self._curr.nxt = None
self._forward_count = 0
# Create and link new node
url_node = DLL(url)
self._curr.nxt = url_node
url_node.prev = self._curr
# Update current node and counts
self._curr = url_node
self._back_count += 1
def back(self, steps: int) -> str:
"""
Returns - str
Input - int
----------
- Moves backwards through history up to available steps
- Updates navigation counters
- Returns current page URL
"""
# Only traverse available nodes
steps = min(steps, self._back_count)
while steps > 0:
self._curr = self._curr.prev
steps -= 1
self._back_count -= 1
self._forward_count += 1
return self._curr.val
def forward(self, steps: int) -> str:
"""
Returns - str
Input - int
----------
- Moves forward through history up to available steps
- Updates navigation counters
- Returns current page URL
"""
# Only traverse available nodes
steps = min(steps, self._forward_count)
while steps > 0:
self._curr = self._curr.nxt
steps -= 1
self._forward_count -= 1
self._back_count += 1
return self._curr.val
if __name__ == "__main__":
obj = BrowserHistory("google.com")
obj.visit("twitter.com")
param_2 = obj.back(1)
param_3 = obj.forward(1)
print(param_2)
print(param_3)
================================================
FILE: BrowserHistory/rock_paper_scissors.py
================================================
"""
Triple Round : Rock, Paper, Scissors Game (CLI Version)
Final round is the Winning Round
Author: Your Name
"""
import random
def get_user_choice():
"""Prompt the user to enter their choice."""
choice = input("Enter your choice (rock, paper, scissors): ").lower()
if choice in ["rock", "paper", "scissors"]:
return choice
else:
print("Invalid choice! Please enter rock, paper, or scissors.")
return get_user_choice()
def get_computer_choice():
"""Randomly select computer's choice."""
options = ["rock", "paper", "scissors"]
return random.choice(options)
def decide_winner(player, computer):
"""Decide the winner based on the choices."""
if player == computer:
return "It's a draw!"
elif (
(player == "rock" and computer == "scissors")
or (player == "paper" and computer == "rock")
or (player == "scissors" and computer == "paper")
):
return "You win!"
else:
return "Computer wins!"
def main():
"""Main function to play the game."""
for i in range(1, 4):
print(f"round -> {i}\n")
user_choice = get_user_choice()
computer_choice = get_computer_choice()
print(f"Computer chose: {computer_choice}")
print(f"Final result : {decide_winner(user_choice, computer_choice)}")
if __name__ == "__main__":
main()
================================================
FILE: BrowserHistory/tests/test_browser_history.py
================================================
import unittest
import sys
import os
# Add parent directory to path to import backend
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from backend import BrowserHistory
class TestBrowserHistory(unittest.TestCase):
def setUp(self):
"""Set up test cases"""
self.browser = BrowserHistory("homepage.com")
def test_initialization(self):
"""Test proper initialization of BrowserHistory"""
self.assertEqual(self.browser._curr.val, "homepage.com")
self.assertEqual(self.browser._back_count, 0)
self.assertEqual(self.browser._forward_count, 0)
self.assertIsNone(self.browser._curr.nxt)
self.assertIsNone(self.browser._curr.prev)
def test_visit(self):
"""Test visit functionality and forward history cleanup"""
self.browser.visit("page1.com")
self.assertEqual(self.browser._curr.val, "page1.com")
self.assertEqual(self.browser._back_count, 1)
self.assertEqual(self.browser._forward_count, 0)
# Test forward history cleanup
self.browser.visit("page2.com")
self.browser.back(1)
self.browser.visit("page3.com") # Should clear forward history
self.assertIsNone(self.browser._curr.nxt)
self.assertEqual(self.browser._forward_count, 0)
def test_back_navigation(self):
"""Test back navigation with counter validation"""
# Setup history
self.browser.visit("page1.com")
self.browser.visit("page2.com")
# Test normal back navigation
result = self.browser.back(1)
self.assertEqual(result, "page1.com")
self.assertEqual(self.browser._back_count, 1)
self.assertEqual(self.browser._forward_count, 1)
# Test back with more steps than available
result = self.browser.back(5) # Should only go back 1 step
self.assertEqual(result, "homepage.com")
self.assertEqual(self.browser._back_count, 0)
self.assertEqual(self.browser._forward_count, 2)
def test_forward_navigation(self):
"""Test forward navigation with counter validation"""
# Setup history and position
self.browser.visit("page1.com")
self.browser.visit("page2.com")
self.browser.back(2) # Go back to homepage
# Test normal forward navigation
result = self.browser.forward(1)
self.assertEqual(result, "page1.com")
self.assertEqual(self.browser._forward_count, 1)
self.assertEqual(self.browser._back_count, 1)
# Test forward with more steps than available
result = self.browser.forward(5) # Should only go forward remaining 1 step
self.assertEqual(result, "page2.com")
self.assertEqual(self.browser._forward_count, 0)
self.assertEqual(self.browser._back_count, 2)
def test_complex_navigation(self):
"""Test complex navigation patterns"""
self.browser.visit("page1.com")
self.browser.visit("page2.com")
self.browser.visit("page3.com")
# Back navigation
self.assertEqual(self.browser.back(2), "page1.com")
# New visit should clear forward history
self.browser.visit("page4.com")
self.assertEqual(self.browser._forward_count, 0)
self.assertIsNone(self.browser._curr.nxt)
# Verify we can't go forward to cleared history
self.assertEqual(self.browser.forward(1), "page4.com")
# starting point of code
if __name__ == "__main__":
unittest.main()
================================================
FILE: BruteForce.py
================================================
from itertools import product
def findPassword(chars, function, show=50, format_="%s"):
password = None
attempts = 0
size = 1
stop = False
while not stop:
# Obtém todas as combinações possíveis com os dígitos do parâmetro "chars".
for pw in product(chars, repeat=size):
password = "".join(pw)
# Imprime a senha que será tentada.
if attempts % show == 0:
print(format_ % password)
# Verifica se a senha é a correta.
if function(password):
stop = True
break
else:
attempts += 1
size += 1
return password, attempts
def getChars():
"""
Método para obter uma lista contendo todas as
letras do alfabeto e números.
"""
chars = []
# Acrescenta à lista todas as letras maiúsculas
for id_ in range(ord("A"), ord("Z") + 1):
chars.append(chr(id_))
# Acrescenta à lista todas as letras minúsculas
for id_ in range(ord("a"), ord("z") + 1):
chars.append(chr(id_))
# Acrescenta à lista todos os números
for number in range(10):
chars.append(str(number))
return chars
# Se este módulo não for importado, o programa será testado.
# Para realizar o teste, o usuário deverá inserir uma senha para ser encontrada.
if __name__ == "__main__":
import datetime
import time
# Pede ao usuário uma senha
pw = input("\n Type a password: ")
print("\n")
def testFunction(password):
global pw
if password == pw:
return True
else:
return False
# Obtém os dígitos que uma senha pode ter
chars = getChars()
t = time.process_time()
# Obtém a senha encontrada e o múmero de tentativas
password, attempts = findPassword(
chars, testFunction, show=1000, format_=" Trying %s"
)
t = datetime.timedelta(seconds=int(time.process_time() - t))
input(f"\n\n Password found: {password}\n Attempts: {attempts}\n Time: {t}\n")
================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct Easy to understand
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to make participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at . All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
================================================
FILE: CONTRIBUTING.md
================================================
# Contributing Notepad Sorting
When contributing to this repository, please first discuss the change you wish to make via issue,
email, or any other method with the owners of this repository before making a change.
Please note we have a code of conduct, please follow it in all your interactions with the project.
## Pull Request Process
1. Ensure any install or build dependencies are removed before the end of the layer when doing a
build.
2. Update the README.md with details of changes to the interface, this includes new environment
variables, exposed ports, useful file locations and container parameters.
3. Increase the version numbers in any examples files and the README.md to the new version that this
Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/).
4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you
do not have permission to do that, you may request the second reviewer to merge it for you.
## Code of Conduct
### Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.
### Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
### Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
### Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
### Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [INSERT EMAIL ADDRESS]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
### Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
================================================
FILE: CRC/crc.py
================================================
def crc_check(data, div):
l = len(div)
ct = 0
data = [int(i) for i in data]
div = [int(i) for i in div]
zero = [0 for i in range(l)]
temp_data = [data[i] for i in range(l)]
result = []
for j in range(len(data) - len(div) + 1):
print("Temp_dividend", temp_data)
msb = temp_data[0]
if msb == 0:
result.append(0)
for i in range(l - 1, -1, -1):
temp_data[i] = temp_data[i] ^ zero[i]
else:
result.append(1)
for i in range(l - 1, -1, -1):
temp_data[i] = temp_data[i] ^ div[i]
temp_data.pop(0)
if l + j < len(data):
temp_data.append(data[l + j])
crc = temp_data
print("Quotient: ", result, "remainder", crc)
return crc
# returning crc value
while 1 > 0:
print("Enter data: ")
data = input() # can use it like int(input())
print("Enter divisor")
div = input() # can use it like int(input())
original_data = data
data = data + ("0" * (len(div) - 1))
crc = crc_check(data, div)
crc_str = ""
for c in crc:
crc_str += c
print("Sent data: ", original_data + crc_str)
sent_data = original_data + crc_str
print(
"If again applying CRC algorithm, the remainder/CRC must be zero if errorless."
)
crc = crc_check(sent_data, div)
remainder = crc
print("Receiver side remainder: ", remainder)
print("Continue [Y/N]:")
ch = input()
if ch == "N" or ch == "n":
break
else:
continue
================================================
FILE: CSV_file.py
================================================
import pandas as pd
# loading the dataset
df = pd.read_csv(
r"c:\PROJECT\Drug_Recommendation_System\drug_recommendation_system\Drugs_Review_Datasets.csv"
)
print(df) # prints Dataset
# funtions
print(df.tail())
print(df.head())
print(df.info())
print(df.describe())
print(df.column)
print(df.shape())
================================================
FILE: Caesar Cipher Encoder & Decoder.py
================================================
# PROJECT1
# CAESAR CIPHER ENCODER/DECODER
# Author: InTruder
# Cloned from: https://github.com/InTruder-Sec/caesar-cipher
# Improved by: OfficialAhmed (https://github.com/OfficialAhmed)
def get_int() -> int:
"""
Get integer, otherwise redo
"""
try:
key = int(input("Enter number of characters you want to shift: "))
except:
print("Enter an integer")
key = get_int()
return key
def main():
print("[>] CAESAR CIPHER DECODER!!! \n")
print("[1] Encrypt\n[2] Decrypt")
match input("Choose one of the above(example for encode enter 1): "):
case "1":
encode()
case "2":
decode()
case _:
print("\n[>] Invalid input. Choose 1 or 2")
main()
def encode():
encoded_cipher = ""
text = input("Enter text to encode: ")
key = get_int()
for char in text:
ascii = ord(char) + key
encoded_cipher += chr(ascii)
print(f"Encoded text: {encoded_cipher}")
def decode():
decoded_cipher = ""
cipher = input("\n[>] Enter your cipher text: ")
key = get_int()
for character in cipher:
ascii = ord(character) - key
decoded_cipher += chr(ascii)
print(decoded_cipher)
if __name__ == "__main__":
main()
================================================
FILE: Calculate resistance.py
================================================
def res(R1, R2):
sum = R1 + R2
if option == "series":
return sum
elif option == "parallel":
return (R1 * R2) / sum
return 0
Resistance1 = float(input("Enter R1 : "))
Resistance2 = float(input("Enter R2 : "))
option = input("Enter series or parallel :")
print("\n")
R = res(Resistance1, Resistance2)
if R == 0:
print("Wrong Input!!")
else:
print("The total resistance is", R)
================================================
FILE: Calculator with simple ui.py
================================================
# Program make a simple calculator
class Calculator:
def __init__(self):
pass
def add(self, num1, num2):
"""
This function adds two numbers.
Examples:
>>> add(2, 3)
5
>>> add(5, 9)
14
>>> add(-1, 2)
1
"""
return num1 + num2
def subtract(self, num1, num2):
"""
This function subtracts two numbers.
Examples:
>>> subtract(5, 3)
2
>>> subtract(9, 5)
4
>>> subtract(4, 9)
-5
"""
return num1 - num2
def multiply(self, num1, num2):
"""
This function multiplies two numbers.
Examples:
>>> multiply(4, 2)
8
>>> multiply(3, 3)
9
>>> multiply(9, 9)
81
"""
return num1 * num2
def divide(self, num1, num2):
"""
This function divides two numbers.
Examples:
>>> divide(4, 4)
1
>>> divide(6, 3)
2
>>> divide(9, 1)
9
"""
if num2 == 0:
print("Cannot divide by zero")
else:
return num1 / num2
calculator = Calculator()
print("1.Add")
print("2.Subtract")
print("3.Multiply")
print("4.Divide")
while True:
# Take input from the user
choice = input("Enter choice(1/2/3/4): ")
# Check if choice is one of the four options
if choice in ("1", "2", "3", "4"):
num1 = float(input("Enter first number: "))
num2 = float(input("Enter second number: "))
if choice == "1":
print(calculator.add(num1, num2))
elif choice == "2":
print(calculator.subtract(num1, num2))
elif choice == "3":
print(calculator.multiply(num1, num2))
elif choice == "4":
print(calculator.divide(num1, num2))
break
else:
print("Invalid Input")
================================================
FILE: Calendar (GUI).py
================================================
from tkinter import *
import calendar
root = Tk()
# root.geometry("400x300")
root.title("Calendar")
# Function
def text():
month_int = int(month.get())
year_int = int(year.get())
cal = calendar.month(year_int, month_int)
textfield.delete(0.0, END)
textfield.insert(INSERT, cal)
# Creating Labels
label1 = Label(root, text="Month:")
label1.grid(row=0, column=0)
label2 = Label(root, text="Year:")
label2.grid(row=0, column=1)
# Creating spinbox
month = Spinbox(root, from_=1, to=12, width=8)
month.grid(row=1, column=0, padx=5)
year = Spinbox(root, from_=2000, to=2100, width=10)
year.grid(row=1, column=1, padx=10)
# Creating Button
button = Button(root, text="Go", command=text)
button.grid(row=1, column=2, padx=10)
# Creating Textfield
textfield = Text(root, width=25, height=10, fg="red")
textfield.grid(row=2, columnspan=2)
root.mainloop()
================================================
FILE: Cat/cat.py
================================================
"""
The 'cat' Program Implemented in Python 3
The Unix 'cat' utility reads the contents
of file(s) specified through stdin and 'conCATenates'
into stdout. If it is run without any filename(s) given,
then the program reads from standard input itself,
which means it simply copies stdin to stdout.
It is fairly easy to implement such a program
in Python, and as a result countless examples
exist online. This particular implementation
focuses on the basic functionality of the cat
utility. Compatible with Python 3.6 or higher.
Syntax:
python3 cat.py [filename1] [filename2] etc...
Separate filenames with spaces.
David Costell (DontEatThemCookies on GitHub)
v2 - 03/12/2022
"""
import sys
def with_files(files):
"""Executes when file(s) is/are specified."""
try:
# Read each file's contents and store them
file_contents = [contents for contents in [open(file).read() for file in files]]
except OSError as err:
# This executes when there's an error (e.g. FileNotFoundError)
exit(print(f"cat: error reading files ({err})"))
# Write all file contents into the standard output stream
for contents in file_contents:
sys.stdout.write(contents)
def no_files():
"""Executes when no file(s) is/are specified."""
try:
# Get input, output the input, repeat
while True:
print(input())
# Graceful exit for Ctrl + C, Ctrl + D
except KeyboardInterrupt:
exit()
# exit when no data found in file
except EOFError:
exit()
def main():
"""Entry point of the cat program."""
# Read the arguments passed to the program
if not sys.argv[1:]:
no_files()
else:
with_files(sys.argv[1:])
if __name__ == "__main__":
main()
================================================
FILE: Cat/text_a.txt
================================================
Sample Text Here
Lorem ipsum, dolor sit amet.
Hello,
World!
ABCD 1234
================================================
FILE: Cat/text_b.txt
================================================
I am another sample text file.
The knights who say ni!
Lines
of
Text!
This file does not end with a newline.
================================================
FILE: Cat/text_c.txt
================================================
I am the beginning of yet another text file.
Spam and eggs.
================================================
FILE: Checker_game_by_dz/__init__.py
================================================
================================================
FILE: Checker_game_by_dz/first.py
================================================
"""
Author : Dhruv B Kakadiya
"""
# import libraries
import pygame as pg
from modules import statics as st
from modules.statics import *
from modules.checker_board import *
from modules.checker import *
# static variables for this particular file
fps = 60
WIN = pg.display.set_mode((st.width, st.height))
pg.display.set_caption("Checkers")
# get row and col for mouse
def get_row_col_mouse(pos):
x, y = pos
row = y // sq_size
col = x // sq_size
return row, col
# main function
if __name__ == "__main__":
# represents the game
run = True
# certain clock value default because it is varries from diff pc to pc
clock = pg.time.Clock()
# create board
board = checker_board()
game = checker(WIN)
# main loop
while run:
clock.tick(fps)
if board.winner() != None:
print(board.winner())
# check if any events is running or not
for event in pg.event.get():
if event.type == pg.QUIT:
run = False
if event.type == pg.MOUSEBUTTONDOWN:
pos = pg.mouse.get_pos()
row, col = get_row_col_mouse(pos)
game.selectrc(row, col)
# piece = board.get_piece(row, col)
# board.move(piece, 4, 3)
game.update()
pg.quit()
================================================
FILE: Checker_game_by_dz/modules/__init__.py
================================================
"""
Author : Dhruv B Kakadiya
"""
================================================
FILE: Checker_game_by_dz/modules/checker.py
================================================
"""
Author : Dhruv B Kakadiya
"""
import pygame as pg
from .checker_board import *
from .statics import *
from .pieces import *
class checker:
def __init__(self, window):
self._init()
self.window = window
# to update the position
def update(self):
self.board.draw(self.window)
self.draw_moves(self.valid_moves)
pg.display.update()
def _init(self):
self.select = None
self.board = checker_board()
self.turn = black
self.valid_moves = {}
# to reset the position
def reset(self):
self._init()
# select row and column
def selectrc(self, row, col):
if self.select:
result = self._move(row, col)
if not result:
self.select = None
piece = self.board.get_piece(row, col)
if (piece != 0) and (piece.color == self.turn):
self.select = piece
self.valid_moves = self.board.get_valid_moves(piece)
return True
return False
# to move the pieces
def _move(self, row, col):
piece = self.board.get_piece(row, col)
if (self.select) and (piece == 0) and (row, col) in self.valid_moves:
self.board.move(self.select, row, col)
skip = self.valid_moves[(row, col)]
if skip:
self.board.remove(skip)
self.chg_turn()
else:
return False
return True
# to draw next possible move
def draw_moves(self, moves):
for move in moves:
row, col = move
pg.draw.circle(
self.window,
red,
(col * sq_size + sq_size // 2, row * sq_size + sq_size // 2),
15,
)
# for changing the turn
def chg_turn(self):
self.valid_moves = {}
if self.turn == black:
self.turn = white
else:
self.turn = black
================================================
FILE: Checker_game_by_dz/modules/checker_board.py
================================================
"""
Author : Dhruv B Kakadiya
"""
import pygame as pg
from .statics import *
from .pieces import *
# checker board creation
class checker_board:
def __init__(self):
self.board = []
self.selected = None
self.black_l = self.white_l = 12
self.black_k = self.white_k = 0
self.create_board()
# to design the board
def draw_cubes(self, window):
window.fill(green)
for row in range(rows):
for col in range(row % 2, cols, 2):
pg.draw.rect(
window, yellow, (row * sq_size, col * sq_size, sq_size, sq_size)
)
def move(self, piece, row, col):
self.board[piece.row][piece.col], self.board[row][col] = (
self.board[row][col],
self.board[piece.row][piece.col],
)
piece.move(row, col)
if row == rows - 1 or row == 0:
piece.make_king()
if piece.color == white:
self.white_k += 1
else:
self.black_k += 1
# to get piece whatever they want
def get_piece(self, row, col):
return self.board[row][col]
def create_board(self):
for row in range(rows):
self.board.append([])
for col in range(cols):
if col % 2 == ((row + 1) % 2):
if row < 3:
self.board[row].append(pieces(row, col, white))
elif row > 4:
self.board[row].append(pieces(row, col, black))
else:
self.board[row].append(0)
else:
self.board[row].append(0)
def draw(self, window):
self.draw_cubes(window)
for row in range(rows):
for col in range(cols):
piece = self.board[row][col]
if piece != 0:
piece.draw(window)
def get_valid_moves(self, piece):
moves = {}
l = piece.col - 1
r = piece.col + 1
row = piece.row
if piece.color == black or piece.king:
moves.update(
self._traverse_l(row - 1, max(row - 3, -1), -1, piece.color, l)
)
moves.update(
self._traverse_r(row - 1, max(row - 3, -1), -1, piece.color, r)
)
if piece.color == white or piece.king:
moves.update(
self._traverse_l(row + 1, min(row + 3, rows), 1, piece.color, l)
)
moves.update(
self._traverse_r(row + 1, min(row + 3, rows), 1, piece.color, r)
)
return moves
def remove(self, pieces):
for piece in pieces:
self.board[piece.row][piece.col] = 0
if piece != 0:
if piece.color == black:
self.black_l -= 1
else:
self.white_l -= 1
def winner(self):
if self.black_l <= 0:
return white
elif self.white_l <= 0:
return black
return None
# Traversal Left
def _traverse_l(self, start, stop, step, color, l, skip=[]):
moves = {}
last = []
for r in range(start, stop, step):
if l < 0:
break
current = self.board[r][l]
if current == 0:
if skip and not last:
break
elif skip:
moves[(r, l)] = last + skip
else:
moves[(r, l)] = last
if last:
if step == -1:
row = max(r - 3, 0)
else:
row = min(r + 3, rows)
moves.update(
self._traverse_l(r + step, row, step, color, l - 1, skip=last)
)
moves.update(
self._traverse_r(r + step, row, step, color, l + 1, skip=last)
)
break
elif current.color == color:
break
else:
last = [current]
l -= 1
return moves
# Traversal Right
def _traverse_r(self, start, stop, step, color, right, skip=[]):
moves = {}
last = []
for r in range(start, stop, step):
if right >= cols:
break
current = self.board[r][right]
if current == 0:
if skip and not last:
break
elif skip:
moves[(r, right)] = last + skip
else:
moves[(r, right)] = last
if last:
if step == -1:
row = max(r - 3, 0)
else:
row = min(r + 3, rows)
moves.update(
self._traverse_l(
r + step, row, step, color, right - 1, skip=last
)
)
moves.update(
self._traverse_r(
r + step, row, step, color, right + 1, skip=last
)
)
break
elif current.color == color:
break
else:
last = [current]
right += 1
return moves
================================================
FILE: Checker_game_by_dz/modules/pieces.py
================================================
"""
Author : Dhruv B Kakadiya
"""
from .statics import *
import pygame as pg
class pieces:
padding = 17
outline = 2
def __init__(self, row, col, color):
self.row = row
self.col = col
self.color = color
self.king = False
"""if (self.color == yellow):
self.direction = -1
else:
self.direction = 1"""
self.x = self.y = 0
self.calculate_pos()
# calculate the positions
def calculate_pos(self):
self.x = (sq_size * self.col) + (sq_size // 2)
self.y = (sq_size * self.row) + (sq_size // 2)
# for mak
gitextract_30r9y9e1/ ├── .circleci/ │ └── config.yml ├── .github/ │ ├── dependabot.yml │ └── workflows/ │ ├── Codeql.yml │ └── python.yml ├── .gitignore ├── 1 File handle/ │ ├── File handle binary/ │ │ ├── Update a binary file2.py │ │ ├── delete.py │ │ ├── question 1 (elegible for remedial, top marks).py │ │ ├── read.py │ │ ├── search record in binary file.py │ │ └── update2.py │ └── File handle text/ │ ├── counter.py │ ├── file handle 12 length of line in text file.py │ ├── happy.txt │ ├── input,output and error streams.py │ ├── question 2.py │ ├── question 5.py │ ├── question 6.py │ ├── question3.py │ ├── special symbol after word.py │ └── story.txt ├── 8_puzzle.py ├── A solution to project euler problem 3.py ├── AREA OF TRIANGLE.py ├── ARKA.py ├── ASCIIvaluecharacter.py ├── Add_two_Linked_List.py ├── Anonymous_TextApp.py ├── AreaOfTriangle.py ├── Armstrong_number ├── Armstrong_number.py ├── Assembler/ │ ├── GUIDE.txt │ ├── README.md │ ├── assembler.py │ ├── examples/ │ │ ├── code.txt │ │ ├── code2.txt │ │ ├── code3.txt │ │ ├── code4.txt │ │ ├── klmn │ │ └── test.txt │ └── requirements.txt ├── Audio_Summarizer.py ├── AutoComplete_App/ │ ├── backend.py │ └── frontend.py ├── Automated Scheduled Call Reminders/ │ ├── caller.py │ ├── requirements.txt │ └── schedular.py ├── Bank Application .ipynb ├── Base Converter Number system.py ├── Battery_notifier.py ├── Binary Coefficients.py ├── Binary_search.py ├── Binary_to_Decimal.py ├── BlackJack_game/ │ ├── blackjack.py │ ├── blackjack_rr.py │ ├── blackjack_simulate.py │ └── requirements.txt ├── BoardGame-CLI/ │ ├── python.py │ ├── snakeLadder.py │ └── uno.py ├── BrowserHistory/ │ ├── backend.py │ ├── rock_paper_scissors.py │ └── tests/ │ └── test_browser_history.py ├── BruteForce.py ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── CRC/ │ └── crc.py ├── CSV_file.py ├── Caesar Cipher Encoder & Decoder.py ├── Calculate resistance.py ├── Calculator with simple ui.py ├── Calendar (GUI).py ├── Cat/ │ ├── cat.py │ ├── text_a.txt │ ├── text_b.txt │ └── text_c.txt ├── Checker_game_by_dz/ │ ├── __init__.py │ ├── first.py │ └── modules/ │ ├── __init__.py │ ├── checker.py │ ├── checker_board.py │ ├── pieces.py │ └── statics.py ├── Chrome Dino Automater.py ├── Classification_human_or_horse.py ├── CliYoutubeDownloader/ │ ├── CliYoutubeDownloader.py │ └── requirements.txt ├── CliYoutubeDownloader.py ├── Collatz Sequence/ │ ├── Collatz Sequence.py │ └── Collaze-Visualize.py ├── Collatz-Conjecture.py ├── Colors/ │ ├── multicoloredline.py │ ├── pixel_sort.py │ ├── primary_colors.py │ └── print_colors.py ├── Compression_Analysis/ │ └── PSNR.py ├── Conversation.py ├── CountMillionCharacter.py ├── CountMillionCharacters-2.0.py ├── CountMillionCharacters-Variations/ │ └── variation1.py ├── Crack_password.py ├── Credit_Card_Validator.py ├── Cricket_score.py ├── Day_of_week.py ├── Decimal number to binary function.py ├── Decimal_To_Binary.py ├── Delete_Linked_List.py ├── Detect_Remove_loop.py ├── Dictionary opperations (input,update a dict).py ├── Divide Operator.py ├── Downloaded Files Organizer/ │ ├── browser_status.py │ ├── move_to_directory.py │ ├── obs.py │ ├── readme.md │ └── requirements.txt ├── Droplistmenu/ │ ├── GamesCalender.py │ └── README.md ├── Electronics_Algorithms/ │ ├── Ohms_law.py │ └── resistance.py ├── Email-Automation.py ├── Emoji Dictionary/ │ ├── QT_GUI.py │ ├── QT_GUI.ui │ ├── README.md │ ├── emoji_dictionary.py │ ├── requirements.txt │ └── untitled.ui ├── Encryption using base64.py ├── EncryptionTool.py ├── Exception_Handling_in_Python.py ├── Extract-Table-from-pdf-txt-docx/ │ ├── Parent/ │ │ ├── Child1/ │ │ │ ├── Document_Child1.docx │ │ │ └── Text_Child1.txt │ │ ├── Child2/ │ │ │ ├── Document_Child2.docx │ │ │ └── Text_Child2.txt │ │ └── Child3/ │ │ ├── Document_Child3.docx │ │ └── Text_Child3.txt │ └── main.py ├── ExtractThumbnailFromVideo/ │ ├── README.md │ └── extract_thumbnail_from_video.py ├── Extract_Text_from_image.py ├── FIND FACTORIAL OF A NUMBER.py ├── Face and eye Recognition/ │ ├── face_recofnation_first.py │ └── gesture_control.py ├── Face_Mask_detection (haarcascade)/ │ ├── Resources/ │ │ ├── haarcascade_frontalface_default.xml │ │ └── keras_model.h5 │ └── mask_detection.py ├── FibonacciNumbersWithGenerators.py ├── Fibonacci_sequence_recursive_sol.py ├── Find current weather of any city using openweathermap API.py ├── FindingResolutionOfAnImage.py ├── FizzBuzz.py ├── Flappy Bird - created with tkinter/ │ ├── .gitignore │ ├── Background.py │ ├── Bird.py │ ├── Flappy Bird.py │ ├── README.md │ ├── Settings.py │ └── Tubes.py ├── Generate a random number between 0 to 9.py ├── Google_Image_Downloader/ │ ├── create_dir.py │ └── image_grapper.py ├── Google_News.py ├── Gregorian_Calendar.py ├── Grocery calculator.py ├── GroupSms_Way2.py ├── Guess_the_number_game.py ├── Guessing_Game.py ├── HTML_to_PDF/ │ ├── index.html │ └── main.py ├── Hand-Motion-Detection/ │ ├── hand_motion_recognizer.py │ └── requirements.txt ├── HangMan Game.py ├── Hangman.py ├── Hotel-Management.py ├── Image-watermarker/ │ ├── README.md │ ├── app.py │ ├── requirements.txt │ └── watermark.py ├── ImageDownloader/ │ ├── img_downloader.py │ └── requirements.txt ├── Image_resize.py ├── Industrial_developed_hangman/ │ ├── Data/ │ │ ├── local_words.txt │ │ └── text_images.txt │ ├── Makefile │ ├── README.md │ ├── pyproject.toml │ ├── pytest.ini │ ├── setup.cfg │ ├── src/ │ │ └── hangman/ │ │ ├── __init__.py │ │ └── main.py │ └── tests/ │ ├── __init__.py │ └── test_hangman/ │ ├── __init__.py │ └── test_main.py ├── Infix_to_Postfix.py ├── Insert_operation_on_Linked_List.py ├── JARVIS/ │ ├── JARVIS_2.0.py │ ├── README.md │ └── requirements.txt ├── Job_scheduling.py ├── JsonParser.py ├── JustDialScrapperGUI/ │ └── Justdial Scrapper GUI.py ├── Key_Binding/ │ ├── key_binding.py │ └── requirement.txt ├── Kilometerstomile.py ├── Koch Curve/ │ ├── README.txt │ └── koch curve.py ├── LETTER GUESSER.py ├── LICENSE.md ├── Laundary System/ │ ├── README.md │ └── code.py ├── Letter_Counter.py ├── LinkedLists all Types/ │ ├── circular_linked_list.py │ ├── doubly_linked_list.py │ └── singly_linked_list.py ├── List.py ├── Luhn_Algorithm.py ├── ML/ │ ├── .gitignore │ ├── CLI_USAGE_SUMMARY.md │ ├── CMakeLists.txt │ ├── DATASETS.md │ ├── DOCUMENTATION.md │ ├── EXAMPLES.md │ ├── FEATURES.md │ ├── INSTALL_CLI.md │ ├── LAUNCH_GUI.bat │ ├── LAUNCH_GUI.sh │ ├── LICENSE │ ├── PROJECT_SUMMARY.md │ ├── QUICKSTART.md │ ├── QUICKSTART_GUI.md │ ├── README.md │ ├── examples/ │ │ ├── neural_architecture_search.py │ │ ├── train_cifar10.py │ │ └── train_custom.py │ ├── pyproject.toml │ ├── requirements.txt │ ├── run.ps1 │ ├── run.sh │ ├── src/ │ │ ├── cpp/ │ │ │ ├── extension.cpp │ │ │ ├── include/ │ │ │ │ └── cuda_ops.h │ │ │ └── operators.cpp │ │ ├── cuda/ │ │ │ ├── activations.cu │ │ │ ├── kernels.cu │ │ │ ├── matmul.cu │ │ │ └── optimizers.cu │ │ └── python/ │ │ └── neuralforge/ │ │ ├── __init__.py │ │ ├── cli/ │ │ │ ├── __init__.py │ │ │ ├── gui.py │ │ │ ├── nas.py │ │ │ ├── test.py │ │ │ └── train.py │ │ ├── config.py │ │ ├── data/ │ │ │ ├── __init__.py │ │ │ ├── augmentation.py │ │ │ ├── dataset.py │ │ │ ├── datasets.py │ │ │ └── transforms.py │ │ ├── models/ │ │ │ ├── __init__.py │ │ │ ├── efficientnet.py │ │ │ ├── resnet.py │ │ │ └── vit.py │ │ ├── nas/ │ │ │ ├── __init__.py │ │ │ ├── evaluator.py │ │ │ ├── evolution.py │ │ │ └── search_space.py │ │ ├── nn/ │ │ │ ├── __init__.py │ │ │ ├── activations.py │ │ │ ├── attention.py │ │ │ ├── convolution.py │ │ │ ├── layers.py │ │ │ └── modules.py │ │ ├── optim/ │ │ │ ├── __init__.py │ │ │ ├── optimizers.py │ │ │ └── schedulers.py │ │ ├── trainer.py │ │ └── utils/ │ │ ├── __init__.py │ │ ├── logger.py │ │ ├── metrics.py │ │ └── visualization.py │ ├── tests/ │ │ ├── README_GUI.md │ │ ├── SUPPORTED_DATASETS.txt │ │ ├── gui_test.py │ │ ├── quick_test.py │ │ └── test_model.py │ └── train.py ├── ML House Prediction.ipynb ├── Mad Libs Generator.py ├── Memory_game.py ├── Merge_linked_list.py ├── MobiusFunction.py ├── Model Usage.ipynb ├── Mp3_media_player.py ├── Multiply.py ├── MySQL_Databses.py ├── News_App/ │ ├── Newsapp.py │ ├── README.md │ ├── patterns.py │ └── requirements.txt ├── NumPy Array Exponentiation.py ├── Number reverse.py ├── Organise.py ├── PDF/ │ ├── basic.py │ ├── demerge_pdfs.py │ ├── header_footer.py │ ├── images.py │ └── requirements.txt ├── PDFtoAudiobook.py ├── PONG_GAME.py ├── PORT SCANNER.PY ├── Palindrome_Checker.py ├── Password Generator/ │ ├── pass_gen.py │ ├── requirements.txt │ └── requirements_new.txt ├── Password Manager Using Tkinter/ │ ├── PGV.py │ ├── README.md │ ├── data.json │ ├── data.txt │ ├── main.py │ └── requirements.txt ├── Patterns/ │ ├── half triangle pattern.py │ ├── pattern2.py │ ├── pattern5.py │ ├── pattern6.py │ └── patterns.py ├── Pc_information.py ├── Personal-Expense-Tracker/ │ ├── README.md │ └── expense_tracker.py ├── PingPong/ │ ├── Ball.py │ ├── Slab.py │ └── main.py ├── Polyline.py ├── Pomodoro (tkinter).py ├── PongPong_Game/ │ ├── README.md │ ├── pong/ │ │ ├── __init__.py │ │ ├── ball.py │ │ ├── load.py │ │ ├── paddle.py │ │ └── rectangle.py │ ├── pongpong.py │ └── requirements.txt ├── Prime_number.py ├── Python Distance.py ├── Python Programs/ │ ├── Program of Reverse of any number.py │ ├── Program to print table of given number.py │ ├── Program to reverse Linked List( Recursive solution).py │ ├── Python Program for Product of unique prime factors of a number.py │ ├── Python Program for Tower of Hanoi.py │ ├── Python Program for factorial of a number.py │ ├── Python Program to Count the Number of Each Vowel.py │ ├── Python Program to Display Fibonacci Sequence Using Recursion.py │ ├── Python Program to Find LCM.py │ ├── Python Program to Merge Mails.py │ ├── Python Program to Print the Fibonacci sequence.py │ ├── Python Program to Remove Punctuations from a String.py │ ├── Python Program to Reverse a linked list.py │ ├── Python Program to Sort Words in Alphabetic Order.py │ ├── Python Program to Transpose a Matrix.py │ └── python program for finding square root for positive number.py ├── Python Voice Generator.py ├── Python-Array-Equilibrium-Index.py ├── Python_chatting_application/ │ ├── README.md │ ├── client.py │ └── server.py ├── Python_swapping.py ├── QR_code_generator/ │ └── qrcode.py ├── QuadraticCalc.py ├── QuestionAnswerVirtualAssistant/ │ ├── backend.py │ ├── frontend.py │ └── requirements.txt ├── Quizzler Using Tkinter and Trivia DB API/ │ ├── README.md │ ├── data_dynamic.py │ ├── data_static.py │ ├── main.py │ ├── question_model.py │ ├── quiz_brain.py │ └── ui.py ├── README.md ├── Random Password Generator.py ├── RandomDice.py ├── RandomNumberGame.py ├── Randomnumber.py ├── ReadFromCSV.py ├── Recursion Visulaizer/ │ ├── .recursionVisualizer.py.swp │ ├── git │ └── recursionVisualizer.py ├── Reverse_list_in_groups.py ├── Rotate_Linked_List.py ├── SECURITY.md ├── SOUNDEX.py ├── Sanke-water-gun game.py ├── Search_Engine/ │ ├── README.md │ ├── backend.py │ ├── frontend.py │ └── test_data.py ├── Secret message generator GUI by tkinter.py ├── Shortest Distance between Two Lines.py ├── SimpleStopWatch.py ├── Snake Game Using Turtle/ │ ├── README.md │ ├── colors.py │ ├── food.py │ ├── highscore.txt │ ├── main.py │ ├── scoreboard.py │ ├── screenshots │ ├── snake.py │ └── wall.py ├── Snake-Water-Gun-Game.py ├── Snake_water_gun/ │ ├── README.md │ └── main.py ├── Sorting Algorithims/ │ ├── heapsort_linkedlist.py │ ├── mergesort_linkedlist.py │ └── quicksort_linkedlist.py ├── Sorting Algorithms/ │ ├── Binary_Insertion_Sort.py │ ├── Bubble_Sorting_Prog.py │ ├── Bubble_sort.py │ ├── Count sort.py │ ├── Counting Sort.py │ ├── Counting-sort.py │ ├── Cycle Sort.py │ ├── Heap sort.py │ ├── Iterative Merge Sort.py │ ├── Linear_Insertion_Sort.py │ ├── Merge Sort.py │ ├── Merge-sort.py │ ├── Quick sort.py │ ├── Shell Sort.py │ ├── Sort the values of first list using second list.py │ ├── Sorted_Inserted_Linked_List.py │ ├── SortingAStringAlphabetically.py │ ├── Sorting_List.py │ ├── Tim_sort.py │ ├── brickSort.py │ ├── bubblesortpgm.py │ ├── dual_pivot_quicksort.py │ ├── heap_sort.py │ ├── insertion_sort.py │ ├── merge_sort.py │ ├── pigeonhole_sort.py │ ├── quick_sort.py │ ├── recursive-quick-sort.py │ ├── selectionSort.py │ ├── selection_sort.py │ ├── sorting.py │ ├── stooge_sort.py │ └── wave_sort.py ├── SpeechToText.py ├── Split_Circular_Linked_List.py ├── Street_Fighter/ │ ├── LICENSE │ ├── docs/ │ │ ├── CODE_OF_CONDUCT.md │ │ ├── CONTRIBUTING.md │ │ ├── README.md │ │ ├── SECURITY.md │ │ └── requirements.txt │ └── src/ │ ├── fighter.py │ └── main.py ├── StringToBinary.py ├── String_Palindrome.py ├── Strings.py ├── Sum of digits of a number.py ├── TTS.py ├── TaskManager.py ├── TaskPlanner.py ├── Test-Case-Generator/ │ └── test_case.py ├── ThirdAI/ │ └── Terms and Conditions/ │ ├── Readme.md │ ├── ThirdAI.py │ └── TkinterUI.py ├── Tic-Tac-Toe Games/ │ ├── tic-tac-toe1.py │ ├── tic-tac-toe2.py │ ├── tic-tac-toe3.py │ ├── tic-tac-toe4.py │ ├── tic-tac-toe5.py │ └── tic-tac-toe6.py ├── Timetable_Operations.py ├── To find the largest number between 3 numbers.py ├── To print series 1,12,123,1234......py ├── Todo_GUi.py ├── Translator/ │ ├── README.md │ └── translator.py ├── Trending youtube videos ├── Trending youtube videos.py ├── Triplets with zero sum/ │ ├── Readme.md │ └── find_Triplets_with_zero_sum.py ├── Turn your PDFs into audio books/ │ ├── audiobook_gen.py │ └── requirements.txt ├── Turtle_Star.py ├── Tweet Pre-Processing.py ├── Type of angles of a triangle.py ├── Type_of_angles_of_triangle.py ├── UI-Apps/ │ ├── README.md │ └── clock.py ├── Unit Digit of a raised to power b.py ├── Untitled.ipynb ├── Voice Command Calculator.py ├── VoiceAssistant/ │ ├── DOCUMENTATION.md │ ├── GUIDE.md │ ├── PRE-REQUISITES.md │ ├── Project_Basic_struct/ │ │ ├── TextTospeech.py │ │ ├── VoiceAssistant_main.py │ │ ├── dictator.py │ │ ├── menu.py │ │ ├── speakListen.py │ │ ├── speechtotext.py │ │ ├── textRead.py │ │ └── websiteWork.py │ └── README.md ├── VoiceRepeater/ │ ├── __main__.py │ └── readme.md ├── Weather Scrapper/ │ ├── weather.csv │ └── weather.py ├── WeatherGUI.py ├── Web Socket.py ├── Web_Scraper.py ├── Webbrowser/ │ └── tk-browser.py ├── Wikipdedia/ │ ├── flask_rendering.py │ ├── main.py │ ├── practice_beautifulsoap.py │ ├── static/ │ │ └── js/ │ │ └── output.js │ └── template/ │ ├── index.html │ └── output.html ├── WikipediaModule.py ├── Windows_Wallpaper_Script/ │ ├── ReadMe.md │ └── wallpaper_extract.py ├── Word_Dictionary/ │ └── dictionary.py ├── Wordle/ │ ├── 5 letter word dictionary.txt │ ├── Dictionary.txt │ └── wordle.py ├── XML/ │ └── HTML parsing ├── XORcipher/ │ ├── README.md │ ├── XOR_cipher.py │ └── test_XOR_cipher.py ├── Youtube Downloader With GUI/ │ └── main.py ├── add_two_number.py ├── add_two_nums.py ├── advanced_calculator.py ├── agecalculator.py ├── alexa_news_headlines.py ├── area_of_square_app.py ├── armstrongnumber.py ├── async_downloader/ │ ├── async_downloader.py │ └── requirements.txt ├── automail.py ├── avg_xdspam_confidence.py ├── backup_automater_services.py ├── balance_parenthesis.py ├── bank_managment_system/ │ ├── QTFrontend.py │ ├── backend.py │ ├── frontend.py │ └── untitled.ui ├── basic_cal.py ├── batch_file_rename.py ├── billing.py ├── binary search.py ├── binarySTree isTrue_YashV1729.Java ├── binary_search_tree.py ├── binary_search_trees/ │ ├── delete_a_node_in_bst.py │ ├── inorder_successor.py │ ├── inorder_traversal.py │ ├── insert_in_bst.py │ ├── main.py │ ├── mirror_a_bst.py │ ├── print_in_range.py │ ├── root_to_leaf_paths.py │ ├── search_in_bst.py │ ├── tree_node.py │ └── validate_bst.py ├── binod.py ├── birthdays.py ├── blackJackGUI.py ├── blackjack.py ├── bodymass.py ├── bookstore_manangement_system.py ├── brickout-game/ │ ├── README.md │ └── brickout-game.py ├── calc_area.py ├── calci.py ├── calci2.py ├── calculator-gui.py ├── calculator.py ├── cartesian_product.py ├── changemac.py ├── chaos.py ├── check if a number positive , negative or zero ├── check whether the string is Symmetrical or Palindrome.py ├── check_file.py ├── check_for_sqlite_files.py ├── check_input.py ├── check_internet_con.py ├── check_prime.py ├── chicks_n_rabs.py ├── cicd ├── classicIndianCardMatch.py ├── cli_master/ │ ├── cli_master.py │ ├── database_import_countries.py │ └── validation_page.py ├── cloning_a_list.py ├── colorma_as_color.py ├── colour spiral.py ├── communication/ │ ├── file.py │ ├── pipe.py │ └── socket_conn.py ├── compass_code.py ├── consonant.py ├── convert celsius into fahrenheit.py ├── convert_time.py ├── convert_wind_direction_to_degrees.py ├── count the numbers of two vovels.py ├── create password validity in python.py ├── create_dir_if_not_there.py ├── cricket_live_score.py ├── cricket_news.py ├── currency converter/ │ ├── README.md │ ├── country.txt │ ├── gui.ui │ └── main.py ├── daily_checks.py ├── daily_horoscope.py ├── date-timeclient.py ├── date-timeserver.py ├── days_from_date.py ├── dec_to_hex.py ├── decimal to binary.py ├── depreciated_programs/ │ └── corona_cases.py ├── dialogs/ │ ├── README.md │ ├── messagebox.py │ └── requirements.txt ├── diamond.py ├── dice.py ├── diceV2_dynamic.py ├── dice_rolling_simulator.py ├── diction.py ├── digital_clock.py ├── dir_test.py ├── divisors_of_a_number.py ├── email id dictionary/ │ ├── README.md │ ├── dict1.py │ └── mbox-short.txt ├── encrypter-decrypter-gui.py ├── encrypter_decrypter_gui.py ├── encryptsys.py ├── env_check.py ├── environment.yml ├── equations.py ├── ex20.py ├── fF ├── facebook id hack.py ├── facebook-autologin-bot.py ├── factorial_perm_comp.py ├── factors.py ├── fastapi.py ├── fetch_news.py ├── fibonacci.py ├── fibonacci_SIMPLIFIED ├── fibonici series.py ├── file_ext_changer.py ├── file_handle/ │ ├── File handle binary/ │ │ ├── Update a binary file2.py │ │ ├── delete.py │ │ ├── question 1 (elegible for remedial, top marks).py │ │ ├── read.py │ │ ├── search record in binary file.py │ │ └── update2.py │ └── File handle text/ │ ├── counter.py │ ├── file handle 12 length of line in text file.py │ ├── happy.txt │ ├── input,output and error streams.py │ ├── question 2.py │ ├── question 5.py │ ├── question 6.py │ ├── question3.py │ ├── special symbol after word.py │ └── story.txt ├── fileinfo.py ├── find_cube_root.py ├── find_prime.py ├── finding LCM.py ├── findlargestno.md ├── flappyBird_pygame/ │ ├── README.md │ └── flappy_bird.py ├── floodfill/ │ └── floodfill.py ├── folder_size.py ├── four_digit_num_combination.py ├── framework/ │ └── quo.md ├── friday.py ├── ftp_send_receive.py ├── gambler.py ├── game_of_life/ │ ├── 05_mixed_sorting.py │ └── game_o_life.py ├── gcd.py ├── generate_permutations.py ├── get_crypto_price.py ├── get_info_remoute_srv.py ├── get_likes_on_FB.py ├── get_youtube_view.py ├── google.py ├── googlemaps.py ├── googleweb.py ├── greaterno.py ├── greattwono.py ├── gstin_scraper.py ├── gui_calculator.py ├── hamming-numbers.py ├── happy_num.py ├── heap_sort.py ├── helloworld.py ├── how to display the fibonacci sequence up to n-.py ├── image2pdf/ │ ├── image2pdf.py │ └── requirements.txt ├── image_compressor.py ├── index.html ├── index.py ├── inheritance_YahV1729.py ├── input matrice,product any order!.py ├── insertion_sort.py ├── insta_image_saving/ │ ├── driver/ │ │ └── file │ ├── instagram_image_scrapping.ipynb │ ├── instructions.txt │ ├── output/ │ │ └── file │ └── readme.txt ├── insta_monitering/ │ ├── con_file.py │ ├── insta_api.py │ ├── insta_datafetcher.py │ ├── ipList.txt │ └── subpinsta.py ├── internet_connection_py3.py ├── invisible_clock.py ├── iprint.py ├── is_number.py ├── jee_result.py ├── kilo_to_miles.py ├── kmp_str_search.py ├── large_files_reading.py ├── largestno.py ├── lcm.py ├── leap year.py ├── length.py ├── letter_frequency.py ├── levenshtein_distance.py ├── libs/ │ ├── haarcascade_eye.xml │ ├── haarcascade_eye_tree_eyeglasses.xml │ └── haarcascade_frontalface_default.xml ├── linear search.py ├── linear-algebra-python/ │ ├── README.md │ └── src/ │ ├── Transformations2D.py │ ├── lib.py │ └── tests.py ├── linear_search.py ├── live_sketch.py ├── loader.py ├── local_weighted_learning/ │ ├── local_weighted_learning.md │ └── local_weighted_learning.py ├── login.py ├── logs.py ├── longest_increasing_subsequence_length.py ├── loops.py ├── love_turtle.py ├── luhn_algorithm_for_credit_card_validation.py ├── magic8ball.py ├── magic_8_ball.py ├── mapit.py ├── mathfunctions.py ├── meme_maker.py ├── memorygame.py ├── merge.py ├── missing number from list.py ├── mobilePhoneSpecsScrapper.py ├── move_files_over_x_days.py ├── movie_details.py ├── multiple_comditions.py ├── multiplication_table.py ├── nDigitNumberCombinations.py ├── nasa_apod_with_requests/ │ ├── README.md │ ├── run.py │ └── settings.py ├── new.py ├── new_pattern.py ├── new_script.py ├── news_articles__scraper.py ├── news_oversimplifier.py ├── next_number.py ├── nitkarshchourasia/ │ └── to_sort/ │ ├── GUI_apps/ │ │ └── tkinter_apps/ │ │ ├── counter_app/ │ │ │ └── counter_app.py │ │ ├── hello_world_excla_increment_app/ │ │ │ └── hello_world_incre_decre_(!).py │ │ └── simple_calc_GUI/ │ │ └── simple_calculator_GUI.py │ ├── JARVIS_python_bot/ │ │ ├── JARVIS_2.0.py │ │ ├── README.md │ │ ├── check_internet_con.py │ │ ├── features_to_add.py │ │ └── requirements.txt │ ├── determine_sign.py │ ├── django_projects/ │ │ └── ToDo_webapp/ │ │ ├── db.sqlite3 │ │ ├── manage.py │ │ ├── todo/ │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── forms.py │ │ │ ├── migrations/ │ │ │ │ ├── 0001_initial.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── templates/ │ │ │ │ └── todo/ │ │ │ │ └── index.html │ │ │ ├── tests.py │ │ │ └── views.py │ │ └── todo_site/ │ │ ├── __init__.py │ │ ├── asgi.py │ │ ├── settings.py │ │ ├── urls.py │ │ └── wsgi.py │ ├── one_rep_max_calculator/ │ │ ├── README.md │ │ ├── one_rep_max_calculator.py │ │ └── one_rep_max_calculator_gui.py │ ├── pdf_to_docx_converter/ │ │ ├── pdf_to_docx.py │ │ └── requirements.txt │ └── word2number/ │ └── word2number.py ├── nmap_scan.py ├── nodepad/ │ ├── README.md │ ├── notepad.py │ └── src/ │ └── notepad.tcl ├── notepad/ │ └── notepad_support.py ├── nslookup_check.py ├── number guessing.py ├── numberguessinggame/ │ └── index.py ├── numeric_password_cracker.py ├── oneeven.py ├── oryx-build-commands.txt ├── osinfo.py ├── other_pepole/ │ └── get_ip_gui ├── palindrome.py ├── pan.py ├── password guessing.py ├── passwordGen.py ├── passwordGenerator.py ├── password_checker.py ├── password_checker_code.py ├── password_cracker.py ├── password_manager.py ├── password_programs_multiple/ │ ├── animal_name_scraiper.py │ └── passwordGenerator.py ├── personal_translator.py ├── ph_email.py ├── photo_timestamp_renamer.py ├── ping_servers.py ├── ping_subnet.py ├── polygon.py ├── portscanner.py ├── positiveNegetive.py ├── power_of_n.py ├── power_of_two.py ├── powerdown_startup.py ├── powers of 2.py ├── powerup_checks.py ├── primelib/ │ ├── Prime.txt │ ├── README │ └── primelib.py ├── print hello world.py ├── printing_hello_world.py ├── prison_break_scrapper.py ├── pscheck.py ├── psunotify.py ├── puttylogs.py ├── pyhton_array.py ├── pythagoreanTriplets.py ├── python Space Invader game.py ├── pythonVideoDownloader.py ├── python_sms.py ├── python_webscraper.py ├── qrcode.py ├── qrdecoder.py ├── quiz_game.py ├── quote.py ├── random-sentences.py ├── random_file_move.py ├── random_password_gen.py ├── randomloadingmessage.py ├── rangoli.py ├── read_excel_file.py ├── reading_csv.py ├── rearrange-files/ │ └── rearrange-files.py ├── recursive-fibonacci.py ├── recursiveStrings.py ├── recyclebin.py ├── remoteok_jobs_scraper/ │ └── remoteok_jobs.py ├── remove a character from a file and rewrite.py ├── repeat.py ├── replacetext.py ├── repo_website/ │ ├── docs/ │ │ └── README_og.md │ └── mkdocs.yml ├── requirements.txt ├── requirements_with_versions.txt ├── reversed_pattern3.py ├── rock_paper_scissors.py ├── rook.py ├── rotate_string.py ├── rotatelist.py ├── russian_roulette.py ├── saving_input_into_list.py ├── scalg.py ├── scientific_cal.py ├── scrap_file.py ├── script_count.py ├── script_listing.py ├── send_message_automation/ │ ├── README.md │ ├── author_name_NC.txt │ └── message_automation.py ├── sendemail.py ├── sensors_information.py ├── serial_scanner.py ├── sha1.py ├── sierpinski_triangle.py ├── simpleInterest.py ├── simple_calcu.py ├── simple_calculator/ │ └── simple_calculator.py ├── simple_calculator.py ├── simulate_memory_cpu.py ├── singly_linked_list.py ├── size(resolution)image.py ├── slack_message.py ├── smart_file_organizer.py ├── snake.py ├── snake_case_renamer_depth_one.py ├── socket-programming/ │ ├── README.md │ ├── client.py │ ├── requirements.txt │ └── server.py ├── solution to euler project problem 10.py ├── sorting_algos.py ├── soundex_algorithm.py ├── spiralmatrix.py ├── spotifyAccount.py ├── sqlite_check.py ├── sqlite_table_check.py ├── square_root.py ├── stack.py ├── stackF_Harsh2255.py ├── stone_paper_scissor/ │ ├── main.py │ └── utils.py ├── string_palin.py ├── string_rotation.py ├── sudoku.py ├── sum_of_digits_of_a_number.py ├── swap.py ├── testlines.py ├── text-to-audio/ │ ├── README.md │ ├── hello.txt │ ├── main.py │ ├── requirements.txt │ └── text-file-to-audio.py ├── text_file_replace.py ├── text_to_audio/ │ ├── README.md │ ├── author_name_NC.txt │ ├── main.py │ ├── requirements.txt │ └── special_file.txt ├── text_to_pig_latin.py ├── tf_idf_generator.py ├── thired-party-haarcascade-mustache-on-face/ │ ├── Nose.xml │ ├── face.xml │ ├── mustache-add-on-face.py │ └── utils.py ├── thread_signal.py ├── tic-tac-toe.py ├── tik_tak.py ├── time_delta.py ├── to check leap year.py ├── totaldigits.py ├── translation_of_sizes_of_underwear_RU.py ├── triangles.py ├── tuple.py ├── turtal game.ipynb ├── turtle module ├── turtle_shapes_made.py ├── tweeter.py ├── twitter_post_scraper.py ├── two_num.py ├── ultimate-phone-book/ │ ├── contacts.py │ └── readme.md ├── url_shortner.py ├── venv/ │ ├── Lib/ │ │ └── site-packages/ │ │ ├── pip/ │ │ │ ├── __init__.py │ │ │ ├── __main__.py │ │ │ ├── __pip-runner__.py │ │ │ ├── _internal/ │ │ │ │ ├── __init__.py │ │ │ │ ├── build_env.py │ │ │ │ ├── cache.py │ │ │ │ ├── cli/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── autocompletion.py │ │ │ │ │ ├── base_command.py │ │ │ │ │ ├── cmdoptions.py │ │ │ │ │ ├── command_context.py │ │ │ │ │ ├── index_command.py │ │ │ │ │ ├── main.py │ │ │ │ │ ├── main_parser.py │ │ │ │ │ ├── parser.py │ │ │ │ │ ├── progress_bars.py │ │ │ │ │ ├── req_command.py │ │ │ │ │ ├── spinners.py │ │ │ │ │ └── status_codes.py │ │ │ │ ├── commands/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── cache.py │ │ │ │ │ ├── check.py │ │ │ │ │ ├── completion.py │ │ │ │ │ ├── configuration.py │ │ │ │ │ ├── debug.py │ │ │ │ │ ├── download.py │ │ │ │ │ ├── freeze.py │ │ │ │ │ ├── hash.py │ │ │ │ │ ├── help.py │ │ │ │ │ ├── index.py │ │ │ │ │ ├── inspect.py │ │ │ │ │ ├── install.py │ │ │ │ │ ├── list.py │ │ │ │ │ ├── search.py │ │ │ │ │ ├── show.py │ │ │ │ │ ├── uninstall.py │ │ │ │ │ └── wheel.py │ │ │ │ ├── configuration.py │ │ │ │ ├── distributions/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── base.py │ │ │ │ │ ├── installed.py │ │ │ │ │ ├── sdist.py │ │ │ │ │ └── wheel.py │ │ │ │ ├── exceptions.py │ │ │ │ ├── index/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── collector.py │ │ │ │ │ ├── package_finder.py │ │ │ │ │ └── sources.py │ │ │ │ ├── locations/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── _distutils.py │ │ │ │ │ ├── _sysconfig.py │ │ │ │ │ └── base.py │ │ │ │ ├── main.py │ │ │ │ ├── metadata/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── _json.py │ │ │ │ │ ├── base.py │ │ │ │ │ ├── importlib/ │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── _compat.py │ │ │ │ │ │ ├── _dists.py │ │ │ │ │ │ └── _envs.py │ │ │ │ │ └── pkg_resources.py │ │ │ │ ├── models/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── candidate.py │ │ │ │ │ ├── direct_url.py │ │ │ │ │ ├── format_control.py │ │ │ │ │ ├── index.py │ │ │ │ │ ├── installation_report.py │ │ │ │ │ ├── link.py │ │ │ │ │ ├── scheme.py │ │ │ │ │ ├── search_scope.py │ │ │ │ │ ├── selection_prefs.py │ │ │ │ │ ├── target_python.py │ │ │ │ │ └── wheel.py │ │ │ │ ├── network/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── auth.py │ │ │ │ │ ├── cache.py │ │ │ │ │ ├── download.py │ │ │ │ │ ├── lazy_wheel.py │ │ │ │ │ ├── session.py │ │ │ │ │ ├── utils.py │ │ │ │ │ └── xmlrpc.py │ │ │ │ ├── operations/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── build/ │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── build_tracker.py │ │ │ │ │ │ ├── metadata.py │ │ │ │ │ │ ├── metadata_editable.py │ │ │ │ │ │ ├── metadata_legacy.py │ │ │ │ │ │ ├── wheel.py │ │ │ │ │ │ ├── wheel_editable.py │ │ │ │ │ │ └── wheel_legacy.py │ │ │ │ │ ├── check.py │ │ │ │ │ ├── freeze.py │ │ │ │ │ ├── install/ │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── editable_legacy.py │ │ │ │ │ │ └── wheel.py │ │ │ │ │ └── prepare.py │ │ │ │ ├── pyproject.py │ │ │ │ ├── req/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── constructors.py │ │ │ │ │ ├── req_file.py │ │ │ │ │ ├── req_install.py │ │ │ │ │ ├── req_set.py │ │ │ │ │ └── req_uninstall.py │ │ │ │ ├── resolution/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── base.py │ │ │ │ │ ├── legacy/ │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ └── resolver.py │ │ │ │ │ └── resolvelib/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── base.py │ │ │ │ │ ├── candidates.py │ │ │ │ │ ├── factory.py │ │ │ │ │ ├── found_candidates.py │ │ │ │ │ ├── provider.py │ │ │ │ │ ├── reporter.py │ │ │ │ │ ├── requirements.py │ │ │ │ │ └── resolver.py │ │ │ │ ├── self_outdated_check.py │ │ │ │ ├── utils/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── _jaraco_text.py │ │ │ │ │ ├── _log.py │ │ │ │ │ ├── appdirs.py │ │ │ │ │ ├── compat.py │ │ │ │ │ ├── compatibility_tags.py │ │ │ │ │ ├── datetime.py │ │ │ │ │ ├── deprecation.py │ │ │ │ │ ├── direct_url_helpers.py │ │ │ │ │ ├── egg_link.py │ │ │ │ │ ├── encoding.py │ │ │ │ │ ├── entrypoints.py │ │ │ │ │ ├── filesystem.py │ │ │ │ │ ├── filetypes.py │ │ │ │ │ ├── glibc.py │ │ │ │ │ ├── hashes.py │ │ │ │ │ ├── logging.py │ │ │ │ │ ├── misc.py │ │ │ │ │ ├── packaging.py │ │ │ │ │ ├── retry.py │ │ │ │ │ ├── setuptools_build.py │ │ │ │ │ ├── subprocess.py │ │ │ │ │ ├── temp_dir.py │ │ │ │ │ ├── unpacking.py │ │ │ │ │ ├── urls.py │ │ │ │ │ ├── virtualenv.py │ │ │ │ │ └── wheel.py │ │ │ │ ├── vcs/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── bazaar.py │ │ │ │ │ ├── git.py │ │ │ │ │ ├── mercurial.py │ │ │ │ │ ├── subversion.py │ │ │ │ │ └── versioncontrol.py │ │ │ │ └── wheel_builder.py │ │ │ ├── _vendor/ │ │ │ │ ├── __init__.py │ │ │ │ ├── cachecontrol/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── _cmd.py │ │ │ │ │ ├── adapter.py │ │ │ │ │ ├── cache.py │ │ │ │ │ ├── caches/ │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── file_cache.py │ │ │ │ │ │ └── redis_cache.py │ │ │ │ │ ├── controller.py │ │ │ │ │ ├── filewrapper.py │ │ │ │ │ ├── heuristics.py │ │ │ │ │ ├── py.typed │ │ │ │ │ ├── serialize.py │ │ │ │ │ └── wrapper.py │ │ │ │ ├── certifi/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── __main__.py │ │ │ │ │ ├── cacert.pem │ │ │ │ │ ├── core.py │ │ │ │ │ └── py.typed │ │ │ │ ├── distlib/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── compat.py │ │ │ │ │ ├── database.py │ │ │ │ │ ├── index.py │ │ │ │ │ ├── locators.py │ │ │ │ │ ├── manifest.py │ │ │ │ │ ├── markers.py │ │ │ │ │ ├── metadata.py │ │ │ │ │ ├── resources.py │ │ │ │ │ ├── scripts.py │ │ │ │ │ ├── util.py │ │ │ │ │ ├── version.py │ │ │ │ │ └── wheel.py │ │ │ │ ├── distro/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── __main__.py │ │ │ │ │ ├── distro.py │ │ │ │ │ └── py.typed │ │ │ │ ├── idna/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── codec.py │ │ │ │ │ ├── compat.py │ │ │ │ │ ├── core.py │ │ │ │ │ ├── idnadata.py │ │ │ │ │ ├── intranges.py │ │ │ │ │ ├── package_data.py │ │ │ │ │ ├── py.typed │ │ │ │ │ └── uts46data.py │ │ │ │ ├── msgpack/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── exceptions.py │ │ │ │ │ ├── ext.py │ │ │ │ │ └── fallback.py │ │ │ │ ├── packaging/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── _elffile.py │ │ │ │ │ ├── _manylinux.py │ │ │ │ │ ├── _musllinux.py │ │ │ │ │ ├── _parser.py │ │ │ │ │ ├── _structures.py │ │ │ │ │ ├── _tokenizer.py │ │ │ │ │ ├── markers.py │ │ │ │ │ ├── metadata.py │ │ │ │ │ ├── py.typed │ │ │ │ │ ├── requirements.py │ │ │ │ │ ├── specifiers.py │ │ │ │ │ ├── tags.py │ │ │ │ │ ├── utils.py │ │ │ │ │ └── version.py │ │ │ │ ├── pkg_resources/ │ │ │ │ │ └── __init__.py │ │ │ │ ├── platformdirs/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── __main__.py │ │ │ │ │ ├── android.py │ │ │ │ │ ├── api.py │ │ │ │ │ ├── macos.py │ │ │ │ │ ├── py.typed │ │ │ │ │ ├── unix.py │ │ │ │ │ ├── version.py │ │ │ │ │ └── windows.py │ │ │ │ ├── pygments/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── __main__.py │ │ │ │ │ ├── cmdline.py │ │ │ │ │ ├── console.py │ │ │ │ │ ├── filter.py │ │ │ │ │ ├── filters/ │ │ │ │ │ │ └── __init__.py │ │ │ │ │ ├── formatter.py │ │ │ │ │ ├── formatters/ │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── _mapping.py │ │ │ │ │ │ ├── bbcode.py │ │ │ │ │ │ ├── groff.py │ │ │ │ │ │ ├── html.py │ │ │ │ │ │ ├── img.py │ │ │ │ │ │ ├── irc.py │ │ │ │ │ │ ├── latex.py │ │ │ │ │ │ ├── other.py │ │ │ │ │ │ ├── pangomarkup.py │ │ │ │ │ │ ├── rtf.py │ │ │ │ │ │ ├── svg.py │ │ │ │ │ │ ├── terminal.py │ │ │ │ │ │ └── terminal256.py │ │ │ │ │ ├── lexer.py │ │ │ │ │ ├── lexers/ │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── _mapping.py │ │ │ │ │ │ └── python.py │ │ │ │ │ ├── modeline.py │ │ │ │ │ ├── plugin.py │ │ │ │ │ ├── regexopt.py │ │ │ │ │ ├── scanner.py │ │ │ │ │ ├── sphinxext.py │ │ │ │ │ ├── style.py │ │ │ │ │ ├── styles/ │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ └── _mapping.py │ │ │ │ │ ├── token.py │ │ │ │ │ ├── unistring.py │ │ │ │ │ └── util.py │ │ │ │ ├── pyproject_hooks/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── _compat.py │ │ │ │ │ ├── _impl.py │ │ │ │ │ └── _in_process/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── _in_process.py │ │ │ │ ├── requests/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── __version__.py │ │ │ │ │ ├── _internal_utils.py │ │ │ │ │ ├── adapters.py │ │ │ │ │ ├── api.py │ │ │ │ │ ├── auth.py │ │ │ │ │ ├── certs.py │ │ │ │ │ ├── compat.py │ │ │ │ │ ├── cookies.py │ │ │ │ │ ├── exceptions.py │ │ │ │ │ ├── help.py │ │ │ │ │ ├── hooks.py │ │ │ │ │ ├── models.py │ │ │ │ │ ├── packages.py │ │ │ │ │ ├── sessions.py │ │ │ │ │ ├── status_codes.py │ │ │ │ │ ├── structures.py │ │ │ │ │ └── utils.py │ │ │ │ ├── resolvelib/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── compat/ │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ └── collections_abc.py │ │ │ │ │ ├── providers.py │ │ │ │ │ ├── py.typed │ │ │ │ │ ├── reporters.py │ │ │ │ │ ├── resolvers.py │ │ │ │ │ └── structs.py │ │ │ │ ├── rich/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── __main__.py │ │ │ │ │ ├── _cell_widths.py │ │ │ │ │ ├── _emoji_codes.py │ │ │ │ │ ├── _emoji_replace.py │ │ │ │ │ ├── _export_format.py │ │ │ │ │ ├── _extension.py │ │ │ │ │ ├── _fileno.py │ │ │ │ │ ├── _inspect.py │ │ │ │ │ ├── _log_render.py │ │ │ │ │ ├── _loop.py │ │ │ │ │ ├── _null_file.py │ │ │ │ │ ├── _palettes.py │ │ │ │ │ ├── _pick.py │ │ │ │ │ ├── _ratio.py │ │ │ │ │ ├── _spinners.py │ │ │ │ │ ├── _stack.py │ │ │ │ │ ├── _timer.py │ │ │ │ │ ├── _win32_console.py │ │ │ │ │ ├── _windows.py │ │ │ │ │ ├── _windows_renderer.py │ │ │ │ │ ├── _wrap.py │ │ │ │ │ ├── abc.py │ │ │ │ │ ├── align.py │ │ │ │ │ ├── ansi.py │ │ │ │ │ ├── bar.py │ │ │ │ │ ├── box.py │ │ │ │ │ ├── cells.py │ │ │ │ │ ├── color.py │ │ │ │ │ ├── color_triplet.py │ │ │ │ │ ├── columns.py │ │ │ │ │ ├── console.py │ │ │ │ │ ├── constrain.py │ │ │ │ │ ├── containers.py │ │ │ │ │ ├── control.py │ │ │ │ │ ├── default_styles.py │ │ │ │ │ ├── diagnose.py │ │ │ │ │ ├── emoji.py │ │ │ │ │ ├── errors.py │ │ │ │ │ ├── file_proxy.py │ │ │ │ │ ├── filesize.py │ │ │ │ │ ├── highlighter.py │ │ │ │ │ ├── json.py │ │ │ │ │ ├── jupyter.py │ │ │ │ │ ├── layout.py │ │ │ │ │ ├── live.py │ │ │ │ │ ├── live_render.py │ │ │ │ │ ├── logging.py │ │ │ │ │ ├── markup.py │ │ │ │ │ ├── measure.py │ │ │ │ │ ├── padding.py │ │ │ │ │ ├── pager.py │ │ │ │ │ ├── palette.py │ │ │ │ │ ├── panel.py │ │ │ │ │ ├── pretty.py │ │ │ │ │ ├── progress.py │ │ │ │ │ ├── progress_bar.py │ │ │ │ │ ├── prompt.py │ │ │ │ │ ├── protocol.py │ │ │ │ │ ├── py.typed │ │ │ │ │ ├── region.py │ │ │ │ │ ├── repr.py │ │ │ │ │ ├── rule.py │ │ │ │ │ ├── scope.py │ │ │ │ │ ├── screen.py │ │ │ │ │ ├── segment.py │ │ │ │ │ ├── spinner.py │ │ │ │ │ ├── status.py │ │ │ │ │ ├── style.py │ │ │ │ │ ├── styled.py │ │ │ │ │ ├── syntax.py │ │ │ │ │ ├── table.py │ │ │ │ │ ├── terminal_theme.py │ │ │ │ │ ├── text.py │ │ │ │ │ ├── theme.py │ │ │ │ │ ├── themes.py │ │ │ │ │ ├── traceback.py │ │ │ │ │ └── tree.py │ │ │ │ ├── tomli/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── _parser.py │ │ │ │ │ ├── _re.py │ │ │ │ │ ├── _types.py │ │ │ │ │ └── py.typed │ │ │ │ ├── truststore/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── _api.py │ │ │ │ │ ├── _macos.py │ │ │ │ │ ├── _openssl.py │ │ │ │ │ ├── _ssl_constants.py │ │ │ │ │ ├── _windows.py │ │ │ │ │ └── py.typed │ │ │ │ ├── typing_extensions.py │ │ │ │ ├── urllib3/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── _collections.py │ │ │ │ │ ├── _version.py │ │ │ │ │ ├── connection.py │ │ │ │ │ ├── connectionpool.py │ │ │ │ │ ├── contrib/ │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── _appengine_environ.py │ │ │ │ │ │ ├── _securetransport/ │ │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ │ ├── bindings.py │ │ │ │ │ │ │ └── low_level.py │ │ │ │ │ │ ├── appengine.py │ │ │ │ │ │ ├── ntlmpool.py │ │ │ │ │ │ ├── pyopenssl.py │ │ │ │ │ │ ├── securetransport.py │ │ │ │ │ │ └── socks.py │ │ │ │ │ ├── exceptions.py │ │ │ │ │ ├── fields.py │ │ │ │ │ ├── filepost.py │ │ │ │ │ ├── packages/ │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── backports/ │ │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ │ ├── makefile.py │ │ │ │ │ │ │ └── weakref_finalize.py │ │ │ │ │ │ └── six.py │ │ │ │ │ ├── poolmanager.py │ │ │ │ │ ├── request.py │ │ │ │ │ ├── response.py │ │ │ │ │ └── util/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── connection.py │ │ │ │ │ ├── proxy.py │ │ │ │ │ ├── queue.py │ │ │ │ │ ├── request.py │ │ │ │ │ ├── response.py │ │ │ │ │ ├── retry.py │ │ │ │ │ ├── ssl_.py │ │ │ │ │ ├── ssl_match_hostname.py │ │ │ │ │ ├── ssltransport.py │ │ │ │ │ ├── timeout.py │ │ │ │ │ ├── url.py │ │ │ │ │ └── wait.py │ │ │ │ └── vendor.txt │ │ │ └── py.typed │ │ └── pip-24.2.dist-info/ │ │ ├── AUTHORS.txt │ │ ├── INSTALLER │ │ ├── LICENSE.txt │ │ ├── METADATA │ │ ├── RECORD │ │ ├── REQUESTED │ │ ├── WHEEL │ │ ├── entry_points.txt │ │ └── top_level.txt │ ├── Scripts/ │ │ ├── Activate.ps1 │ │ ├── activate │ │ ├── activate.bat │ │ └── deactivate.bat │ └── pyvenv.cfg ├── very_easy/ │ └── is_number.py ├── video-operations/ │ ├── slow-motion.py │ └── timelapse.py ├── videodownloder.py ├── vigenere_cipher.py ├── voice.py ├── vowel remover function.py ├── webcam.py ├── whatsapp-monitor.py ├── whatsapp-schedule.py ├── wifi hack by brutefore.py ├── wiki/ │ ├── requirements.txt │ └── wiki.py ├── wiki_random.py ├── wikipedia.py ├── work_connect.py ├── write_excel_file.py └── youtubedownloader.py
Showing preview only (527K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (6899 symbols across 797 files)
FILE: 1 File handle/File handle binary/Update a binary file2.py
function update (line 6) | def update():
FILE: 1 File handle/File handle binary/delete.py
function b_read (line 14) | def b_read():
function b_modify (line 28) | def b_modify():
FILE: 1 File handle/File handle binary/question 1 (elegible for remedial, top marks).py
function remcount (line 32) | def remcount():
function firstmark (line 49) | def firstmark():
FILE: 1 File handle/File handle binary/read.py
function binary_read (line 4) | def binary_read():
FILE: 1 File handle/File handle binary/search record in binary file.py
function search (line 7) | def search():
FILE: 1 File handle/File handle binary/update2.py
function update (line 12) | def update():
FILE: 1 File handle/File handle text/counter.py
class Counter (line 9) | class Counter:
method __init__ (line 10) | def __init__(self, text: str) -> None:
method count (line 18) | def count(self) -> None:
method get_total_lower (line 27) | def get_total_lower(self) -> int:
method get_total_upper (line 30) | def get_total_upper(self) -> int:
method get_total (line 33) | def get_total(self) -> int:
FILE: 1 File handle/File handle text/file handle 12 length of line in text file.py
function write_to_file (line 9) | def write_to_file(file_name):
function longlines (line 23) | def longlines():
FILE: 1 File handle/File handle text/question 2.py
function display_words (line 9) | def display_words(file_path):
FILE: 1 File handle/File handle text/question 5.py
function lowercase (line 19) | def lowercase(file_path):
FILE: 1 File handle/File handle text/question 6.py
function lowercase (line 7) | def lowercase():
FILE: 1 File handle/File handle text/question3.py
function write_to_file (line 14) | def write_to_file(file_name):
function check_first_letter (line 29) | def check_first_letter():
FILE: 8_puzzle.py
class PuzzleState (line 5) | class PuzzleState:
method __init__ (line 8) | def __init__(
method __lt__ (line 20) | def __lt__(self, other: "PuzzleState") -> bool:
method priority (line 24) | def priority(self) -> int:
method manhattan (line 28) | def manhattan(self) -> int:
method is_goal (line 43) | def is_goal(self) -> bool:
method neighbors (line 47) | def neighbors(self) -> List["PuzzleState"]:
function solve_puzzle (line 62) | def solve_puzzle(
function print_solution (line 87) | def print_solution(solution: Optional[PuzzleState]) -> None:
FILE: A solution to project euler problem 3.py
function solution (line 11) | def solution(n: int = 600851475143) -> int:
FILE: AREA OF TRIANGLE.py
function get_valid_side (line 1) | def get_valid_side(prompt:str):
FILE: ARKA.py
function sumOfSeries (line 1) | def sumOfSeries(n):
FILE: Add_two_Linked_List.py
class Node (line 1) | class Node:
method __init__ (line 2) | def __init__(self, data):
class LinkedList (line 7) | class LinkedList:
method __init__ (line 8) | def __init__(self):
method insert_at_beginning (line 11) | def insert_at_beginning(self, new_data):
method add_two_no (line 19) | def add_two_no(self, first, second):
method __str__ (line 42) | def __str__(self):
FILE: Anonymous_TextApp.py
function message (line 14) | def message():
function save_and_send (line 95) | def save_and_send():
FILE: Armstrong_number.py
function is_armstrong_number (line 1) | def is_armstrong_number(number: str) -> bool:
FILE: Assembler/assembler.py
class InvalidSyntax (line 33) | class InvalidSyntax(Exception):
method __init__ (line 34) | def __init__(self):
class Token (line 39) | class Token:
method __init__ (line 40) | def __init__(self, token, t):
function loadFile (line 51) | def loadFile(fileName):
function scanner (line 62) | def scanner(string):
function scan (line 746) | def scan():
function parser (line 759) | def parser():
function setZeroFlag (line 1238) | def setZeroFlag(token, tmpToken):
function registerLabels (line 1276) | def registerLabels():
function resetInterpreter (line 1287) | def resetInterpreter():
function main (line 1313) | def main():
FILE: Audio_Summarizer.py
function transcript_generator (line 7) | def transcript_generator():
function provide_summarizer (line 18) | def provide_summarizer(Text):
FILE: AutoComplete_App/backend.py
class AutoComplete (line 5) | class AutoComplete:
method __init__ (line 33) | def __init__(self):
method train (line 66) | def train(self, sentence):
method predict (line 129) | def predict(self, word):
FILE: AutoComplete_App/frontend.py
function train (line 5) | def train():
function predict_word (line 11) | def predict_word():
FILE: Automated Scheduled Call Reminders/caller.py
function search (line 25) | def search():
FILE: Base Converter Number system.py
function base_check (line 1) | def base_check(xnumber, xbase):
function convert_from_10 (line 8) | def convert_from_10(xnumber, xbase, arr, ybase):
function convert_to_10 (line 42) | def convert_to_10(xnumber, xbase, arr, ybase):
FILE: Binary Coefficients.py
function pascal_triangle (line 1) | def pascal_triangle(lineNumber):
function binomial_coef (line 18) | def binomial_coef(n, k):
FILE: Binary_search.py
function binary_search (line 3) | def binary_search(arr, l, r, x):
FILE: Binary_to_Decimal.py
function binaryToDecimal (line 4) | def binaryToDecimal(binary):
FILE: BlackJack_game/blackjack.py
function dealer_choice (line 69) | def dealer_choice():
FILE: BlackJack_game/blackjack_rr.py
class Colour (line 4) | class Colour:
class Card (line 51) | class Card:
method __init__ (line 52) | def __init__(self, suit, rank):
method __str__ (line 56) | def __str__(self):
class Deck (line 60) | class Deck:
method __init__ (line 61) | def __init__(self):
method __str__ (line 67) | def __str__(self):
method shuffle (line 72) | def shuffle(self):
method deal (line 75) | def deal(self):
class Hand (line 80) | class Hand:
method __init__ (line 81) | def __init__(self):
method add_card (line 86) | def add_card(self, card):
method adjust_for_ace (line 92) | def adjust_for_ace(self):
class Chips (line 98) | class Chips:
method __init__ (line 99) | def __init__(self):
method win_bet (line 103) | def win_bet(self):
method lose_bet (line 106) | def lose_bet(self):
function take_bet (line 110) | def take_bet(chips):
function hit (line 126) | def hit(deck, hand):
function hit_or_stand (line 131) | def hit_or_stand(deck, hand):
function show_some (line 150) | def show_some(player, dealer):
function show_all (line 157) | def show_all(player, dealer):
function player_busts (line 164) | def player_busts(player, dealer, chips):
function player_wins (line 169) | def player_wins(player, dealer, chips):
function dealer_busts (line 174) | def dealer_busts(player, dealer, chips):
function dealer_wins (line 179) | def dealer_wins(player, dealer, chips):
function push (line 184) | def push(player, dealer):
FILE: BlackJack_game/blackjack_simulate.py
class Card (line 44) | class Card:
method __init__ (line 47) | def __init__(self, suit, rank, face=True):
method __repr__ (line 57) | def __repr__(self):
method show (line 63) | def show(self):
class Deck (line 67) | class Deck:
method __init__ (line 68) | def __init__(self, num=1):
method __repr__ (line 76) | def __repr__(self):
method __len__ (line 79) | def __len__(self):
method built (line 82) | def built(self):
method shuffle (line 91) | def shuffle(self):
method rebuilt (line 97) | def rebuilt(self):
method deliver (line 101) | def deliver(self):
class Chips (line 105) | class Chips:
method __init__ (line 106) | def __init__(self, amount):
method __bool__ (line 116) | def __bool__(self):
method get_tips (line 120) | def get_tips(content):
method amount (line 127) | def amount(self):
method amount (line 131) | def amount(self, value):
method bet_amount (line 141) | def bet_amount(self):
method bet_amount (line 145) | def bet_amount(self, value):
method double_bet (line 159) | def double_bet(self):
method insurance (line 169) | def insurance(self):
method insurance (line 173) | def insurance(self, value):
method current_amount (line 180) | def current_amount(self):
method reset_chip (line 183) | def reset_chip(self):
method can_double (line 189) | def can_double(self):
class User (line 193) | class User:
method __init__ (line 194) | def __init__(self, name, role, chips_amount=None, color="END"):
method __repr__ (line 207) | def __repr__(self):
method obtain_card (line 210) | def obtain_card(self, deck, face=True):
method drop_card (line 215) | def drop_card(self):
method show_card (line 219) | def show_card(self):
method unveil_card (line 224) | def unveil_card(self):
method calculate_point (line 229) | def calculate_point(self):
method is_point (line 248) | def is_point(self, opt, point):
method speak (line 255) | def speak(self, content="", end_char="\n"):
method showing (line 262) | def showing(self):
method unveiling (line 266) | def unveiling(self):
class Dealer (line 273) | class Dealer(User):
method __init__ (line 274) | def __init__(self, name):
method ask_insurance (line 278) | def ask_insurance(self):
method strategy_trigger (line 286) | def strategy_trigger(self, deck):
class Player (line 295) | class Player(User):
method __init__ (line 296) | def __init__(self, name, amount):
method refresh_prompt (line 300) | def refresh_prompt(self):
method select_choice (line 305) | def select_choice(self, pattern):
class Recorder (line 323) | class Recorder:
method __init__ (line 324) | def __init__(self):
method update (line 334) | def update(self, winner, chips, player_point, dealer_point):
method record (line 345) | def record(self, winner, chips, player_point, dealer_point):
method draw_diagram (line 359) | def draw_diagram(self):
method digram (line 374) | def digram(self):
class BlackJack (line 401) | class BlackJack:
method __init__ (line 402) | def __init__(self, username):
method play (line 414) | def play(self):
method initial_game (line 450) | def initial_game(self):
method in_bet (line 464) | def in_bet(self):
method deal_card (line 484) | def deal_card(self):
method menu (line 496) | def menu(self):
method get_select (line 511) | def get_select(select_max, prompt=">> ", general_err=""):
method chips_manage (line 527) | def chips_manage(self):
method card_manage (line 546) | def card_manage(self):
method is_surrender (line 566) | def is_surrender(self):
method get_winner (line 570) | def get_winner(self):
method calculate_chips (line 590) | def calculate_chips(self):
method result_exhibit (line 609) | def result_exhibit(self):
function main (line 627) | def main():
FILE: BoardGame-CLI/python.py
function roll_die (line 30) | def roll_die():
function take_turn (line 35) | def take_turn(current_position, player_name):
function play_snakes_and_ladders (line 60) | def play_snakes_and_ladders():
FILE: BoardGame-CLI/snakeLadder.py
function player_input (line 12) | def player_input():
function roll (line 34) | def roll():
function play (line 40) | def play():
function move (line 105) | def move(a, i):
function snake (line 118) | def snake(c, i):
function ladder (line 141) | def ladder(a, i):
FILE: BoardGame-CLI/uno.py
function buildDeck (line 21) | def buildDeck() -> List[str]:
function shuffleDeck (line 46) | def shuffleDeck(deck: List[str]) -> List[str]:
function drawCards (line 58) | def drawCards(numCards: int) -> List[str]:
function showHand (line 80) | def showHand(player: int, playerHand: List[str]) -> None:
function canPlay (line 98) | def canPlay(colour: str, value: str, playerHand: List[str]) -> bool:
function main (line 126) | def main() -> None:
FILE: BrowserHistory/backend.py
class DLL (line 1) | class DLL:
method __init__ (line 8) | def __init__(self, val: str = None):
class BrowserHistory (line 14) | class BrowserHistory:
method __init__ (line 22) | def __init__(self, homepage: str):
method visit (line 36) | def visit(self, url: str) -> None:
method back (line 59) | def back(self, steps: int) -> str:
method forward (line 77) | def forward(self, steps: int) -> str:
FILE: BrowserHistory/rock_paper_scissors.py
function get_user_choice (line 10) | def get_user_choice():
function get_computer_choice (line 20) | def get_computer_choice():
function decide_winner (line 26) | def decide_winner(player, computer):
function main (line 40) | def main():
FILE: BrowserHistory/tests/test_browser_history.py
class TestBrowserHistory (line 10) | class TestBrowserHistory(unittest.TestCase):
method setUp (line 11) | def setUp(self):
method test_initialization (line 15) | def test_initialization(self):
method test_visit (line 23) | def test_visit(self):
method test_back_navigation (line 37) | def test_back_navigation(self):
method test_forward_navigation (line 55) | def test_forward_navigation(self):
method test_complex_navigation (line 74) | def test_complex_navigation(self):
FILE: BruteForce.py
function findPassword (line 4) | def findPassword(chars, function, show=50, format_="%s"):
function getChars (line 30) | def getChars():
function testFunction (line 63) | def testFunction(password):
FILE: CRC/crc.py
function crc_check (line 1) | def crc_check(data, div):
FILE: Caesar Cipher Encoder & Decoder.py
function get_int (line 10) | def get_int() -> int:
function main (line 24) | def main():
function encode (line 40) | def encode():
function decode (line 52) | def decode():
FILE: Calculate resistance.py
function res (line 1) | def res(R1, R2):
FILE: Calculator with simple ui.py
class Calculator (line 4) | class Calculator:
method __init__ (line 5) | def __init__(self):
method add (line 8) | def add(self, num1, num2):
method subtract (line 22) | def subtract(self, num1, num2):
method multiply (line 36) | def multiply(self, num1, num2):
method divide (line 50) | def divide(self, num1, num2):
FILE: Calendar (GUI).py
function text (line 11) | def text():
FILE: Cat/cat.py
function with_files (line 27) | def with_files(files):
function no_files (line 41) | def no_files():
function main (line 55) | def main():
FILE: Checker_game_by_dz/first.py
function get_row_col_mouse (line 21) | def get_row_col_mouse(pos):
FILE: Checker_game_by_dz/modules/checker.py
class checker (line 12) | class checker:
method __init__ (line 13) | def __init__(self, window):
method update (line 18) | def update(self):
method _init (line 23) | def _init(self):
method reset (line 30) | def reset(self):
method selectrc (line 34) | def selectrc(self, row, col):
method _move (line 48) | def _move(self, row, col):
method draw_moves (line 61) | def draw_moves(self, moves):
method chg_turn (line 72) | def chg_turn(self):
FILE: Checker_game_by_dz/modules/checker_board.py
class checker_board (line 12) | class checker_board:
method __init__ (line 13) | def __init__(self):
method draw_cubes (line 21) | def draw_cubes(self, window):
method move (line 29) | def move(self, piece, row, col):
method get_piece (line 43) | def get_piece(self, row, col):
method create_board (line 46) | def create_board(self):
method draw (line 60) | def draw(self, window):
method get_valid_moves (line 68) | def get_valid_moves(self, piece):
method remove (line 92) | def remove(self, pieces):
method winner (line 101) | def winner(self):
method _traverse_l (line 109) | def _traverse_l(self, start, stop, step, color, l, skip=[]):
method _traverse_r (line 145) | def _traverse_r(self, start, stop, step, color, right, skip=[]):
FILE: Checker_game_by_dz/modules/pieces.py
class pieces (line 10) | class pieces:
method __init__ (line 14) | def __init__(self, row, col, color):
method calculate_pos (line 29) | def calculate_pos(self):
method make_king (line 34) | def make_king(self):
method draw (line 37) | def draw(self, window):
method move (line 47) | def move(self, row, col):
method __repr__ (line 53) | def __repr__(self):
FILE: Chrome Dino Automater.py
function hit (line 8) | def hit(key):
function isCollide (line 13) | def isCollide(data):
FILE: CliYoutubeDownloader.py
class YouTubeDownloder (line 5) | class YouTubeDownloder:
method __init__ (line 6) | def __init__(self):
method showTitle (line 13) | def showTitle(self):
method showStreams (line 17) | def showStreams(self):
method chooseStream (line 28) | def chooseStream(self):
method validateChooseValue (line 32) | def validateChooseValue(self):
method getStream (line 39) | def getStream(self):
method getFileSize (line 43) | def getFileSize(self):
method getPermisionToContinue (line 48) | def getPermisionToContinue(self):
method download (line 63) | def download(self):
method onProgress (line 67) | def onProgress(stream=None, chunk=None, remaining=None):
method main (line 74) | def main(self):
FILE: CliYoutubeDownloader/CliYoutubeDownloader.py
class YouTubeDownloder (line 7) | class YouTubeDownloder:
method __init__ (line 8) | def __init__(self):
method showTitle (line 15) | def showTitle(self):
method showStreams (line 19) | def showStreams(self):
method chooseStream (line 30) | def chooseStream(self):
method validateChooseValue (line 34) | def validateChooseValue(self):
method getStream (line 41) | def getStream(self):
method getFileSize (line 45) | def getFileSize(self):
method getPermisionToContinue (line 50) | def getPermisionToContinue(self):
method download (line 65) | def download(self):
method onProgress (line 69) | def onProgress(stream=None, chunk=None, remaining=None):
method main (line 76) | def main(self):
FILE: Collatz Sequence/Collatz Sequence.py
function collatz_sequence (line 1) | def collatz_sequence(n):
FILE: Collatz Sequence/Collaze-Visualize.py
function collatz_sequence (line 4) | def collatz_sequence(n):
function visualize (line 13) | def visualize(sequence, title="Collatz Sequence"):
function auto_mode (line 24) | def auto_mode(interval):
FILE: Collatz-Conjecture.py
function main (line 40) | def main():
FILE: Colors/pixel_sort.py
function createDataSet (line 35) | def createDataSet(val=0, data=[]):
function generateColors (line 45) | def generateColors(c_sorted, frame, row):
function measure (line 61) | def measure(count, row, col, height, width):
function step (line 69) | def step(bgr, repetitions=1):
function findThreshold (line 92) | def findThreshold(lst, add):
function makeVideo (line 98) | def makeVideo():
function main (line 113) | def main():
FILE: Colors/primary_colors.py
function diff (line 1) | def diff(a, b):
function simpleColor (line 8) | def simpleColor(r, g, b):
FILE: Colors/print_colors.py
class colors (line 4) | class colors:
function printc (line 13) | def printc(color, message):
FILE: Compression_Analysis/PSNR.py
function Representational (line 8) | def Representational(r, g, b):
function calculate (line 12) | def calculate(img):
function main (line 18) | def main():
FILE: CountMillionCharacters-2.0.py
function main (line 11) | def main():
FILE: CountMillionCharacters-Variations/variation1.py
function count_chars (line 7) | def count_chars(filename):
function main (line 18) | def main():
FILE: Credit_Card_Validator.py
class CreditCard (line 4) | class CreditCard:
method __init__ (line 5) | def __init__(self, card_no):
method company (line 9) | def company(self):
method first_check (line 37) | def first_check(self):
method validate (line 45) | def validate(self):
method checksum (line 70) | def checksum(self):
method set_card (line 74) | def set_card(cls, card_to_check):
FILE: Day_of_week.py
function process_date (line 8) | def process_date(user_input):
function find_day (line 14) | def find_day(date):
FILE: Decimal_To_Binary.py
function dtbconverter (line 5) | def dtbconverter(num):
function DecimalToBinary (line 52) | def DecimalToBinary(num):
FILE: Delete_Linked_List.py
class Node (line 1) | class Node:
method __init__ (line 2) | def __init__(self, data):
class Linked_List (line 7) | class Linked_List:
method __init__ (line 8) | def __init__(self):
method Insert_At_End (line 11) | def Insert_At_End(self, new_data):
method Delete (line 21) | def Delete(self, key):
method Display (line 37) | def Display(self):
FILE: Detect_Remove_loop.py
class Node (line 1) | class Node:
method __init__ (line 2) | def __init__(self, data):
class Linked_List (line 7) | class Linked_List:
method __init__ (line 8) | def __init__(self):
method Insert_At_End (line 11) | def Insert_At_End(self, new_data):
method Detect_and_Remove_Loop (line 21) | def Detect_and_Remove_Loop(self):
method Remove_loop (line 32) | def Remove_loop(self, Loop_node):
method Display (line 43) | def Display(self):
FILE: Dictionary opperations (input,update a dict).py
function Dictionary (line 6) | def Dictionary(Dict, key, value):
FILE: Divide Operator.py
class DivisionOperation (line 1) | class DivisionOperation:
method __init__ (line 4) | def __init__(self, num1, num2):
method perform_division (line 8) | def perform_division(self):
FILE: Downloaded Files Organizer/move_to_directory.py
function add_to_dir (line 24) | def add_to_dir(ex, src_path, path):
function rename (line 51) | def rename(search, ex, dest_path):
FILE: Downloaded Files Organizer/obs.py
function watcher (line 1) | def watcher(path):
FILE: Droplistmenu/GamesCalender.py
function show (line 15) | def show():
FILE: Electronics_Algorithms/Ohms_law.py
function ohms_law (line 1) | def ohms_law(v=0, i=0, r=0):
FILE: Electronics_Algorithms/resistance.py
function resistance_calculator (line 1) | def resistance_calculator(
FILE: Emoji Dictionary/QT_GUI.py
class MainWindow (line 12) | class MainWindow(QMainWindow):
method __init__ (line 13) | def __init__(self):
FILE: Emoji Dictionary/emoji_dictionary.py
class Keypad (line 12) | class Keypad(tk.Frame):
method __init__ (line 86) | def __init__(self, *args, **kwargs):
method get (line 166) | def get(self):
method append (line 170) | def append(self, text):
method clear (line 174) | def clear(self):
method backspace (line 178) | def backspace(self):
method space (line 185) | def space(self):
method tab (line 192) | def tab(self): # 5 spaces
method copy (line 199) | def copy(self):
method paste (line 206) | def paste(self):
method show (line 211) | def show(self, entry):
method hide (line 216) | def hide(self):
function clear_text (line 223) | def clear_text():
function search_emoji (line 229) | def search_emoji():
function on_inputentry_click (line 258) | def on_inputentry_click(event):
function exit_win (line 317) | def exit_win():
FILE: EncryptionTool.py
function encryptChar (line 19) | def encryptChar(target):
function decryptChar (line 25) | def decryptChar(target):
function encrypt (line 30) | def encrypt(input_text):
function decrypt (line 39) | def decrypt(enc_text):
function readAndDecrypt (line 48) | def readAndDecrypt(filename):
function readAndEncrypt (line 64) | def readAndEncrypt(filename):
function readAndEncryptAndSave (line 78) | def readAndEncryptAndSave(inp_file, out_file):
function readAndDecryptAndSave (line 86) | def readAndDecryptAndSave(inp_file, out_file):
FILE: ExtractThumbnailFromVideo/extract_thumbnail_from_video.py
function extract_thumbnail (line 5) | def extract_thumbnail(video_path, frame_size):
FILE: FIND FACTORIAL OF A NUMBER.py
function factorial (line 4) | def factorial(n):
FILE: Face and eye Recognition/face_recofnation_first.py
function detect_faces_and_eyes (line 4) | def detect_faces_and_eyes():
FILE: FibonacciNumbersWithGenerators.py
function fibonacci_generator (line 1) | def fibonacci_generator(n=None):
FILE: Fibonacci_sequence_recursive_sol.py
function fib (line 1) | def fib(term):
FILE: FindingResolutionOfAnImage.py
function jpeg_res (line 1) | def jpeg_res(filename):
FILE: FizzBuzz.py
function FizzBuzz (line 9) | def FizzBuzz(num):
FILE: Flappy Bird - created with tkinter/Background.py
class Background (line 7) | class Background(Canvas):
method __init__ (line 15) | def __init__(self, tk_instance, *geometry, fp="background.png", animat...
method getBackgroundID (line 60) | def getBackgroundID(self):
method getPhotoImage (line 67) | def getPhotoImage(
method reset (line 113) | def reset(self):
method run (line 146) | def run(self):
method stop (line 175) | def stop(self):
FILE: Flappy Bird - created with tkinter/Bird.py
class Bird (line 8) | class Bird(Thread):
method __init__ (line 23) | def __init__(
method birdIsAlive (line 83) | def birdIsAlive(self):
method checkCollision (line 90) | def checkCollision(self):
method getTag (line 132) | def getTag(self):
method getPhotoImage (line 140) | def getPhotoImage(
method jumps (line 186) | def jumps(self, event=None):
method kill (line 217) | def kill(self):
method run (line 224) | def run(self):
FILE: Flappy Bird - created with tkinter/Flappy Bird.py
class Bird (line 20) | class Bird:
method __init__ (line 21) | def __init__(self):
method update (line 28) | def update(self):
method flap (line 32) | def flap(self):
method draw (line 35) | def draw(self, screen):
class Pipe (line 40) | class Pipe:
method __init__ (line 41) | def __init__(self):
method update (line 47) | def update(self):
method draw (line 50) | def draw(self, screen):
function main (line 58) | def main():
FILE: Flappy Bird - created with tkinter/Settings.py
class Settings (line 6) | class Settings(object):
method setOptions (line 73) | def setOptions(self):
FILE: Flappy Bird - created with tkinter/Tubes.py
class Tubes (line 10) | class Tubes(Thread):
method __init__ (line 19) | def __init__(
method createNewTubes (line 96) | def createNewTubes(self):
method deleteAll (line 187) | def deleteAll(self):
method getPhotoImage (line 202) | def getPhotoImage(
method move (line 248) | def move(self):
method run (line 280) | def run(self):
method stop (line 325) | def stop(self):
FILE: Google_Image_Downloader/create_dir.py
function create_directory (line 24) | def create_directory(name):
function delete_directory (line 32) | def delete_directory(name):
function rename_directory (line 37) | def rename_directory(direct, name):
function set_working_directory (line 42) | def set_working_directory():
function backup_files (line 47) | def backup_files(name_dir, folder):
function move_folder (line 53) | def move_folder(filename, name_dir, folder):
FILE: Google_Image_Downloader/image_grapper.py
function search_for_image (line 45) | def search_for_image():
function download_wallpapers_1080p (line 75) | def download_wallpapers_1080p():
function view_images_directory (line 115) | def view_images_directory():
function set_directory (line 123) | def set_directory():
function quit (line 134) | def quit():
FILE: Google_News.py
function news (line 7) | def news(xml_news_url, counter):
FILE: Gregorian_Calendar.py
function is_leap (line 11) | def is_leap(year):
FILE: Grocery calculator.py
class GroceryList (line 12) | class GroceryList(dict):
method __init__ (line 13) | def __init__(self):
method addToList (line 16) | def addToList(self, item, price):
method Total (line 19) | def Total(self):
method Subtotal (line 25) | def Subtotal(self):
method returnList (line 31) | def returnList(self):
FILE: Guess_the_number_game.py
function new_game (line 8) | def new_game():
function range_of_100 (line 13) | def range_of_100():
function range_of_1000 (line 19) | def range_of_1000():
function input_guess (line 25) | def input_guess(guess):
FILE: Guessing_Game.py
function guessing_game (line 5) | def guessing_game(GUESS_RANGE, GUESS_LIMIT):
function InputValidation (line 44) | def InputValidation(GUESS, GUESS_RANGE):
function easy (line 51) | def easy():
function medium (line 56) | def medium():
function hard (line 61) | def hard():
function try_again (line 66) | def try_again():
function welcome (line 78) | def welcome():
FILE: Hotel-Management.py
function menu (line 1) | def menu():
function add (line 23) | def add():
function modify (line 121) | def modify():
function search (line 166) | def search():
function remove (line 200) | def remove():
function view (line 260) | def view():
function exit (line 299) | def exit():
function exit_menu (line 305) | def exit_menu():
FILE: Image-watermarker/app.py
function load_image (line 29) | def load_image():
function move_logo (line 68) | def move_logo(e):
function move_text (line 90) | def move_text(e):
function choose_color (line 112) | def choose_color():
function add_text_on_canvas (line 121) | def add_text_on_canvas():
function upload_logo (line 162) | def upload_logo():
function save_image (line 198) | def save_image():
FILE: Image-watermarker/watermark.py
class Watermark (line 6) | class Watermark:
method __init__ (line 7) | def __init__(self):
method add_text_watermark (line 10) | def add_text_watermark(
method add_logo (line 18) | def add_logo(self, image, logo, position=(0, 0)):
method save_image (line 32) | def save_image(self, image):
FILE: ImageDownloader/img_downloader.py
function ImageDownloader (line 4) | def ImageDownloader(url):
FILE: Image_resize.py
function jpeg_res (line 1) | def jpeg_res(filename):
FILE: Industrial_developed_hangman/src/hangman/main.py
class Source (line 18) | class Source(Enum):
function print_wrong (line 25) | def print_wrong(text: str, print_function: Callable[[str], None]) -> None:
function print_right (line 36) | def print_right(text: str, print_function: Callable[[str], None]) -> None:
function parse_word_from_local (line 46) | def parse_word_from_local(
function parse_word_from_site (line 64) | def parse_word_from_site(
class MainProcess (line 85) | class MainProcess(object):
method __init__ (line 88) | def __init__(
method get_word (line 107) | def get_word(self) -> str:
method user_lose (line 121) | def user_lose(self) -> None:
method user_win (line 127) | def user_win(self) -> None:
method game_process (line 131) | def game_process(self, user_character: str) -> bool:
method start_game (line 152) | def start_game(self) -> None:
FILE: Industrial_developed_hangman/tests/test_hangman/test_main.py
class FkPrint (line 13) | class FkPrint(object):
method __init__ (line 14) | def __init__(self) -> None:
method __call__ (line 17) | def __call__(self, value_to_print: str) -> None:
class FkInput (line 21) | class FkInput(object):
method __init__ (line 22) | def __init__(self, values_to_input: List[str]) -> None:
method __call__ (line 25) | def __call__(self) -> str:
function choice_fn (line 30) | def choice_fn() -> Callable:
function test_parse_word_from_site (line 35) | def test_parse_word_from_site() -> None:
function test_parse_word_from_site_no_internet (line 39) | def test_parse_word_from_site_no_internet() -> None:
function test_parse_word_from_site_err (line 45) | def test_parse_word_from_site_err() -> None:
function test_get_word (line 50) | def test_get_word(choice_fn: Callable) -> None:
function test_start_game_win (line 60) | def test_start_game_win(choice_fn: Callable) -> None:
function test_start_game_loose (line 75) | def test_start_game_loose(input_str: List[str], choice_fn: Callable) -> ...
function test_wow_year (line 87) | def test_wow_year(freezer, choice_fn: Callable) -> None:
FILE: Infix_to_Postfix.py
class Conversion (line 4) | class Conversion:
method __init__ (line 6) | def __init__(self, capacity):
method isEmpty (line 16) | def isEmpty(self):
method peek (line 20) | def peek(self):
method pop (line 24) | def pop(self):
method push (line 32) | def push(self, op):
method isOperand (line 38) | def isOperand(self, ch):
method notGreater (line 43) | def notGreater(self, i):
method infixToPostfix (line 53) | def infixToPostfix(self, exp):
FILE: Insert_operation_on_Linked_List.py
class Node (line 1) | class Node:
method __init__ (line 2) | def __init__(self, data):
class Linked_List (line 7) | class Linked_List:
method __init__ (line 8) | def __init__(self):
method Insert_At_Beginning (line 11) | def Insert_At_Beginning(self, new_data):
method Insert_After (line 16) | def Insert_After(self, node, new_data):
method Insert_At_End (line 23) | def Insert_At_End(self, new_data):
method Display (line 33) | def Display(self):
FILE: JARVIS/JARVIS_2.0.py
function speak (line 58) | def speak(audio):
function speak_news (line 63) | def speak_news():
function sendEmail (line 78) | def sendEmail(to, content):
function ask_gpt3 (line 96) | def ask_gpt3(que):
function wishme (line 112) | def wishme():
function takecommand (line 125) | def takecommand():
function voice (line 145) | def voice(p):
function on_press (line 154) | def on_press(key):
function on_release (line 169) | def on_release(key):
function get_app (line 226) | def get_app(Q):
FILE: Job_scheduling.py
class Scheduling (line 12) | class Scheduling:
method __init__ (line 13) | def __init__(self, jobs: List[int]) -> None:
method schedule (line 19) | def schedule(self, total_jobs: int, deadline: List[int]) -> List[int]:
method feasible (line 42) | def feasible(self, profit_jobs: List[int], deadline: List[int]) -> bool:
function main (line 89) | def main():
FILE: JsonParser.py
class JsonParser (line 4) | class JsonParser:
method convert_json_to_python (line 9) | def convert_json_to_python(self, par_json_file):
method convert_python_to_json (line 19) | def convert_python_to_json(self, par_data_dic, par_json_file=""):
method get_json_value (line 34) | def get_json_value(self, par_value, par_json_file):
FILE: JustDialScrapperGUI/Justdial Scrapper GUI.py
class ScrapperLogic (line 10) | class ScrapperLogic:
method __init__ (line 11) | def __init__(self, query, location, file_name, progressbar, label_prog...
method inner_html (line 19) | def inner_html(element):
method get_name (line 23) | def get_name(body):
method which_digit (line 27) | def which_digit(html):
method get_phone_number (line 46) | def get_phone_number(self, body):
method get_rating (line 72) | def get_rating(body):
method get_rating_count (line 82) | def get_rating_count(body):
method get_address (line 90) | def get_address(body):
method get_location (line 94) | def get_location(body):
method start_scrapping_logic (line 105) | def start_scrapping_logic(self):
class JDScrapperGUI (line 192) | class JDScrapperGUI:
method __init__ (line 193) | def __init__(self, master):
method start_scrapping (line 211) | def start_scrapping(self):
method start (line 221) | def start(self):
FILE: Key_Binding/key_binding.py
function _ (line 8) | def _(event):
FILE: Koch Curve/koch curve.py
function snowflake (line 7) | def snowflake(lengthSide, levels):
FILE: Laundary System/code.py
class LaundryService (line 4) | class LaundryService:
method __init__ (line 5) | def __init__(
method customerDetails (line 23) | def customerDetails(self):
method calculateCharge (line 36) | def calculateCharge(self):
method finalDetails (line 57) | def finalDetails(self):
FILE: Letter_Counter.py
function printt (line 10) | def printt():
FILE: LinkedLists all Types/circular_linked_list.py
class Node (line 4) | class Node:
method __init__ (line 5) | def __init__(self, data, next=None):
class CircularLinkedList (line 10) | class CircularLinkedList:
method __init__ (line 11) | def __init__(self):
method insert_at_beginning (line 15) | def insert_at_beginning(self, data):
method insert_at_end (line 26) | def insert_at_end(self, data):
method len (line 37) | def len(self):
method pop_at_beginning (line 40) | def pop_at_beginning(self):
method pop_at_end (line 48) | def pop_at_end(self):
method insert_values (line 62) | def insert_values(self, arr: list):
method print (line 68) | def print(self):
method insert_at (line 79) | def insert_at(self, idx, data):
method remove_at (line 100) | def remove_at(self, idx):
function main (line 120) | def main():
FILE: LinkedLists all Types/doubly_linked_list.py
class Node (line 12) | class Node:
method __init__ (line 13) | def __init__(self, val=None, next=None, prev=None):
class DoublyLinkedList (line 19) | class DoublyLinkedList:
method __init__ (line 20) | def __init__(self):
method insert_front (line 24) | def insert_front(self, data):
method insert_back (line 32) | def insert_back(self, data):
method insert_values (line 42) | def insert_values(self, data_values: list):
method pop_front (line 48) | def pop_front(self):
method pop_back (line 57) | def pop_back(self):
method print (line 67) | def print(self):
method len (line 82) | def len(self):
method remove_at (line 93) | def remove_at(self, idx):
method insert_at (line 111) | def insert_at(self, idx: int, data):
method insert_after_value (line 129) | def insert_after_value(self, idx_data, data):
method remove_by_value (line 147) | def remove_by_value(self, idx_data):
method index (line 165) | def index(self, data):
method search (line 179) | def search(self, idx):
method reverse (line 192) | def reverse(self):
method mid_element (line 206) | def mid_element(self):
method __dir__ (line 217) | def __dir__(self):
function main (line 237) | def main():
FILE: LinkedLists all Types/singly_linked_list.py
class Node (line 12) | class Node:
method __init__ (line 13) | def __init__(self, val=None, next=None):
class LinkedList (line 18) | class LinkedList:
method __init__ (line 19) | def __init__(self):
method insert_front (line 23) | def insert_front(self, data):
method insert_back (line 30) | def insert_back(self, data):
method insert_values (line 40) | def insert_values(self, data_values: list):
method pop_front (line 46) | def pop_front(self):
method pop_back (line 56) | def pop_back(self):
method print (line 68) | def print(self):
method len (line 79) | def len(self):
method remove_at (line 90) | def remove_at(self, idx):
method insert_at (line 105) | def insert_at(self, idx: int, data):
method insert_after_value (line 120) | def insert_after_value(self, idx_data, data):
method remove_by_value (line 138) | def remove_by_value(self, idx_data):
method index (line 154) | def index(self, data):
method search (line 168) | def search(self, idx):
method reverse (line 181) | def reverse(self):
method mid_element (line 195) | def mid_element(self):
method __dir__ (line 206) | def __dir__(self):
function main (line 226) | def main():
FILE: ML/examples/neural_architecture_search.py
function main (line 11) | def main():
FILE: ML/examples/train_cifar10.py
function main (line 15) | def main():
FILE: ML/examples/train_custom.py
function main (line 12) | def main():
FILE: ML/src/cpp/extension.cpp
function PYBIND11_MODULE (line 19) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {
FILE: ML/src/cpp/operators.cpp
function vector_add_cuda (line 5) | torch::Tensor vector_add_cuda(torch::Tensor a, torch::Tensor b) {
function vector_mul_cuda (line 19) | torch::Tensor vector_mul_cuda(torch::Tensor a, torch::Tensor b) {
function matmul_cuda (line 33) | torch::Tensor matmul_cuda(torch::Tensor a, torch::Tensor b, bool use_til...
function batched_matmul_cuda (line 63) | torch::Tensor batched_matmul_cuda(torch::Tensor a, torch::Tensor b) {
function relu_forward_cuda (line 86) | torch::Tensor relu_forward_cuda(torch::Tensor input) {
function relu_backward_cuda (line 99) | torch::Tensor relu_backward_cuda(torch::Tensor grad_output, torch::Tenso...
function sigmoid_forward_cuda (line 113) | torch::Tensor sigmoid_forward_cuda(torch::Tensor input) {
function gelu_forward_cuda (line 126) | torch::Tensor gelu_forward_cuda(torch::Tensor input) {
function gelu_backward_cuda (line 139) | torch::Tensor gelu_backward_cuda(torch::Tensor grad_output, torch::Tenso...
function softmax_forward_cuda (line 153) | torch::Tensor softmax_forward_cuda(torch::Tensor input) {
function batch_norm_forward_cuda (line 171) | torch::Tensor batch_norm_forward_cuda(
function max_pool2d_forward_cuda (line 204) | std::vector<torch::Tensor> max_pool2d_forward_cuda(
function adam_update_cuda (line 235) | void adam_update_cuda(
function adamw_update_cuda (line 258) | void adamw_update_cuda(
FILE: ML/src/python/neuralforge/cli/gui.py
function main (line 4) | def main():
FILE: ML/src/python/neuralforge/cli/nas.py
function main (line 10) | def main():
FILE: ML/src/python/neuralforge/cli/test.py
function main (line 16) | def main():
FILE: ML/src/python/neuralforge/cli/train.py
function set_seed (line 17) | def set_seed(seed):
function create_simple_model (line 25) | def create_simple_model(num_classes=10):
function main (line 46) | def main():
FILE: ML/src/python/neuralforge/config.py
class Config (line 7) | class Config:
method save (line 38) | def save(self, path: str):
method load (line 44) | def load(cls, path: str) -> 'Config':
method update (line 49) | def update(self, **kwargs):
method __str__ (line 54) | def __str__(self) -> str:
FILE: ML/src/python/neuralforge/data/augmentation.py
class RandAugment (line 7) | class RandAugment:
method __init__ (line 8) | def __init__(self, n: int = 2, m: int = 9):
method __call__ (line 28) | def __call__(self, img):
method auto_contrast (line 36) | def auto_contrast(img, _):
method equalize (line 40) | def equalize(img, _):
method invert (line 44) | def invert(img, _):
method rotate (line 48) | def rotate(img, magnitude):
method posterize (line 52) | def posterize(img, magnitude):
method solarize (line 57) | def solarize(img, magnitude):
method color (line 61) | def color(img, magnitude):
method contrast (line 65) | def contrast(img, magnitude):
method brightness (line 69) | def brightness(img, magnitude):
method sharpness (line 73) | def sharpness(img, magnitude):
method shear_x (line 77) | def shear_x(img, magnitude):
method shear_y (line 81) | def shear_y(img, magnitude):
method translate_x (line 85) | def translate_x(img, magnitude):
method translate_y (line 90) | def translate_y(img, magnitude):
class MixUp (line 94) | class MixUp:
method __init__ (line 95) | def __init__(self, alpha: float = 1.0, num_classes: int = 1000):
method __call__ (line 99) | def __call__(self, images, labels):
class CutMix (line 115) | class CutMix:
method __init__ (line 116) | def __init__(self, alpha: float = 1.0, num_classes: int = 1000):
method __call__ (line 120) | def __call__(self, images, labels):
class GridMask (line 149) | class GridMask:
method __init__ (line 150) | def __init__(self, d1: int = 96, d2: int = 224, rotate: float = 1, rat...
method __call__ (line 156) | def __call__(self, img):
class RandomErasing (line 179) | class RandomErasing:
method __init__ (line 180) | def __init__(self, probability: float = 0.5, sl: float = 0.02, sh: flo...
method __call__ (line 186) | def __call__(self, img):
FILE: ML/src/python/neuralforge/data/dataset.py
class ImageDataset (line 9) | class ImageDataset(Dataset):
method __init__ (line 10) | def __init__(
method _load_dataset (line 26) | def _load_dataset(self):
method __len__ (line 46) | def __len__(self) -> int:
method __getitem__ (line 49) | def __getitem__(self, idx: int) -> Tuple[torch.Tensor, int]:
class SyntheticDataset (line 66) | class SyntheticDataset(Dataset):
method __init__ (line 67) | def __init__(
method __len__ (line 79) | def __len__(self) -> int:
method __getitem__ (line 82) | def __getitem__(self, idx: int) -> Tuple[torch.Tensor, int]:
class MemoryDataset (line 87) | class MemoryDataset(Dataset):
method __init__ (line 88) | def __init__(self, data: torch.Tensor, labels: torch.Tensor):
method __len__ (line 93) | def __len__(self) -> int:
method __getitem__ (line 96) | def __getitem__(self, idx: int) -> Tuple[torch.Tensor, int]:
class DataLoaderBuilder (line 99) | class DataLoaderBuilder:
method __init__ (line 100) | def __init__(self, config):
method build_train_loader (line 103) | def build_train_loader(self, dataset: Dataset) -> DataLoader:
method build_val_loader (line 114) | def build_val_loader(self, dataset: Dataset) -> DataLoader:
method build_test_loader (line 125) | def build_test_loader(self, dataset: Dataset) -> DataLoader:
class CachedDataset (line 135) | class CachedDataset(Dataset):
method __init__ (line 136) | def __init__(self, dataset: Dataset, cache_size: int = 1000):
method __len__ (line 141) | def __len__(self) -> int:
method __getitem__ (line 144) | def __getitem__(self, idx: int) -> Tuple[torch.Tensor, int]:
class MultiScaleDataset (line 155) | class MultiScaleDataset(Dataset):
method __init__ (line 156) | def __init__(
method __len__ (line 164) | def __len__(self) -> int:
method __getitem__ (line 167) | def __getitem__(self, idx: int) -> Tuple[torch.Tensor, int]:
class PrefetchDataset (line 176) | class PrefetchDataset(Dataset):
method __init__ (line 177) | def __init__(self, dataset: Dataset, prefetch_size: int = 100):
method __len__ (line 181) | def __len__(self) -> int:
method __getitem__ (line 184) | def __getitem__(self, idx: int) -> Tuple[torch.Tensor, int]:
FILE: ML/src/python/neuralforge/data/datasets.py
class CIFAR10Dataset (line 7) | class CIFAR10Dataset:
method __init__ (line 8) | def __init__(self, root='./data', train=True, transform=None, download...
method __len__ (line 26) | def __len__(self):
method __getitem__ (line 29) | def __getitem__(self, idx):
class CIFAR100Dataset (line 32) | class CIFAR100Dataset:
method __init__ (line 33) | def __init__(self, root='./data', train=True, transform=None, download...
method __len__ (line 51) | def __len__(self):
method __getitem__ (line 54) | def __getitem__(self, idx):
class MNISTDataset (line 57) | class MNISTDataset:
method __init__ (line 58) | def __init__(self, root='./data', train=True, transform=None, download...
method __len__ (line 68) | def __len__(self):
method __getitem__ (line 71) | def __getitem__(self, idx):
class FashionMNISTDataset (line 74) | class FashionMNISTDataset:
method __init__ (line 75) | def __init__(self, root='./data', train=True, transform=None, download...
method __len__ (line 86) | def __len__(self):
method __getitem__ (line 89) | def __getitem__(self, idx):
class STL10Dataset (line 92) | class STL10Dataset:
method __init__ (line 93) | def __init__(self, root='./data', split='train', transform=None, downl...
method __len__ (line 111) | def __len__(self):
method __getitem__ (line 114) | def __getitem__(self, idx):
function get_dataset (line 117) | def get_dataset(name='cifar10', root='./data', train=True, download=True):
class ImageNetDataset (line 134) | class ImageNetDataset:
method __init__ (line 135) | def __init__(self, root='./data/imagenet', split='train', transform=No...
method __len__ (line 160) | def __len__(self):
method __getitem__ (line 163) | def __getitem__(self, idx):
class TinyImageNetDataset (line 166) | class TinyImageNetDataset:
method __init__ (line 167) | def __init__(self, root='./data', train=True, transform=None, download...
method __len__ (line 204) | def __len__(self):
method __getitem__ (line 207) | def __getitem__(self, idx):
class Food101Dataset (line 210) | class Food101Dataset:
method __init__ (line 211) | def __init__(self, root='./data', split='train', transform=None, downl...
method __len__ (line 232) | def __len__(self):
method __getitem__ (line 235) | def __getitem__(self, idx):
class Caltech256Dataset (line 238) | class Caltech256Dataset:
method __init__ (line 239) | def __init__(self, root='./data', transform=None, download=True):
method __len__ (line 250) | def __len__(self):
method __getitem__ (line 253) | def __getitem__(self, idx):
class OxfordPetsDataset (line 256) | class OxfordPetsDataset:
method __init__ (line 257) | def __init__(self, root='./data', split='trainval', transform=None, do...
method __len__ (line 268) | def __len__(self):
method __getitem__ (line 271) | def __getitem__(self, idx):
function get_dataset (line 274) | def get_dataset(name='cifar10', root='./data', train=True, download=True):
function get_num_classes (line 304) | def get_num_classes(dataset_name):
function get_class_names (line 324) | def get_class_names(dataset_name):
FILE: ML/src/python/neuralforge/data/transforms.py
function get_transforms (line 5) | def get_transforms(image_size: int = 224, is_training: bool = True, mean...
class RandomMixup (line 30) | class RandomMixup:
method __init__ (line 31) | def __init__(self, alpha: float = 1.0):
method __call__ (line 34) | def __call__(self, batch):
class RandomCutmix (line 48) | class RandomCutmix:
method __init__ (line 49) | def __init__(self, alpha: float = 1.0):
method __call__ (line 52) | def __call__(self, batch):
class GaussianNoise (line 81) | class GaussianNoise:
method __init__ (line 82) | def __init__(self, mean: float = 0.0, std: float = 0.1):
method __call__ (line 86) | def __call__(self, tensor):
class RandomGaussianBlur (line 89) | class RandomGaussianBlur:
method __init__ (line 90) | def __init__(self, kernel_size: int = 5, sigma: Tuple[float, float] = ...
method __call__ (line 94) | def __call__(self, img):
function get_strong_augmentation (line 97) | def get_strong_augmentation(image_size: int = 224):
FILE: ML/src/python/neuralforge/models/efficientnet.py
class EfficientNetB0 (line 4) | class EfficientNetB0(nn.Module):
method __init__ (line 5) | def __init__(self, num_classes=1000):
method forward (line 39) | def forward(self, x):
FILE: ML/src/python/neuralforge/models/resnet.py
function ResNet18 (line 4) | def ResNet18(num_classes=1000, in_channels=3):
function ResNet34 (line 8) | def ResNet34(num_classes=1000, in_channels=3):
function ResNet50 (line 12) | def ResNet50(num_classes=1000, in_channels=3):
FILE: ML/src/python/neuralforge/models/vit.py
function VisionTransformer (line 4) | def VisionTransformer(
FILE: ML/src/python/neuralforge/nas/evaluator.py
class ModelEvaluator (line 8) | class ModelEvaluator:
method __init__ (line 9) | def __init__(
method evaluate (line 23) | def evaluate(self, architecture: Architecture, search_space: SearchSpa...
method _quick_evaluate (line 51) | def _quick_evaluate(self, model: nn.Module, criterion: nn.Module, opti...
method _full_evaluate (line 92) | def _full_evaluate(self, model: nn.Module, criterion: nn.Module, optim...
class ProxyEvaluator (line 123) | class ProxyEvaluator:
method __init__ (line 124) | def __init__(self, device: str = 'cuda'):
method evaluate (line 127) | def evaluate(self, architecture: Architecture, search_space: SearchSpa...
FILE: ML/src/python/neuralforge/nas/evolution.py
class EvolutionarySearch (line 9) | class EvolutionarySearch:
method __init__ (line 10) | def __init__(
method initialize_population (line 32) | def initialize_population(self):
method evaluate_population (line 42) | def evaluate_population(self):
method tournament_selection (line 55) | def tournament_selection(self) -> Architecture:
method select_parents (line 59) | def select_parents(self) -> List[Architecture]:
method create_offspring (line 64) | def create_offspring(self, parents: List[Architecture]) -> Architecture:
method evolve_generation (line 75) | def evolve_generation(self):
method search (line 88) | def search(self) -> Architecture:
method get_top_k_architectures (line 127) | def get_top_k_architectures(self, k: int = 5) -> List[Architecture]:
FILE: ML/src/python/neuralforge/nas/search_space.py
class Architecture (line 7) | class Architecture:
method __init__ (line 8) | def __init__(self, genome: List[int]):
method __repr__ (line 15) | def __repr__(self):
class SearchSpace (line 18) | class SearchSpace:
method __init__ (line 19) | def __init__(self, config: Dict[str, Any]):
method random_architecture (line 30) | def random_architecture(self) -> Architecture:
method build_model (line 54) | def build_model(self, architecture: Architecture, input_channels: int ...
method _get_activation (line 115) | def _get_activation(self, activation: str) -> nn.Module:
method mutate (line 127) | def mutate(self, architecture: Architecture, mutation_rate: float = 0....
method crossover (line 145) | def crossover(self, parent1: Architecture, parent2: Architecture) -> A...
method estimate_complexity (line 153) | def estimate_complexity(self, architecture: Architecture, input_size: ...
FILE: ML/src/python/neuralforge/nn/activations.py
class GELU (line 5) | class GELU(nn.Module):
method __init__ (line 6) | def __init__(self):
method forward (line 9) | def forward(self, x):
class Swish (line 12) | class Swish(nn.Module):
method __init__ (line 13) | def __init__(self):
method forward (line 16) | def forward(self, x):
class Mish (line 19) | class Mish(nn.Module):
method __init__ (line 20) | def __init__(self):
method forward (line 23) | def forward(self, x):
class HardSwish (line 26) | class HardSwish(nn.Module):
method __init__ (line 27) | def __init__(self):
method forward (line 30) | def forward(self, x):
class HardSigmoid (line 33) | class HardSigmoid(nn.Module):
method __init__ (line 34) | def __init__(self):
method forward (line 37) | def forward(self, x):
class FReLU (line 40) | class FReLU(nn.Module):
method __init__ (line 41) | def __init__(self, channels, kernel_size=3):
method forward (line 46) | def forward(self, x):
class GLU (line 50) | class GLU(nn.Module):
method __init__ (line 51) | def __init__(self, dim=-1):
method forward (line 55) | def forward(self, x):
class ReGLU (line 59) | class ReGLU(nn.Module):
method __init__ (line 60) | def __init__(self):
method forward (line 63) | def forward(self, x):
class GEGLU (line 67) | class GEGLU(nn.Module):
method __init__ (line 68) | def __init__(self):
method forward (line 72) | def forward(self, x):
class SiLU (line 76) | class SiLU(nn.Module):
method __init__ (line 77) | def __init__(self):
method forward (line 80) | def forward(self, x):
class ELU (line 83) | class ELU(nn.Module):
method __init__ (line 84) | def __init__(self, alpha=1.0):
method forward (line 88) | def forward(self, x):
class SELU (line 91) | class SELU(nn.Module):
method __init__ (line 92) | def __init__(self):
method forward (line 97) | def forward(self, x):
class PReLU (line 100) | class PReLU(nn.Module):
method __init__ (line 101) | def __init__(self, num_parameters=1, init=0.25):
method forward (line 105) | def forward(self, x):
class LeakyReLU (line 108) | class LeakyReLU(nn.Module):
method __init__ (line 109) | def __init__(self, negative_slope=0.01):
method forward (line 113) | def forward(self, x):
class Softplus (line 116) | class Softplus(nn.Module):
method __init__ (line 117) | def __init__(self, beta=1):
method forward (line 121) | def forward(self, x):
FILE: ML/src/python/neuralforge/nn/attention.py
class MultiHeadAttention (line 7) | class MultiHeadAttention(nn.Module):
method __init__ (line 8) | def __init__(self, embed_dim, num_heads, dropout=0.1, bias=True):
method forward (line 21) | def forward(self, x, mask=None):
class CrossAttention (line 41) | class CrossAttention(nn.Module):
method __init__ (line 42) | def __init__(self, embed_dim, num_heads, dropout=0.1):
method forward (line 55) | def forward(self, query, key, value, mask=None):
class FeedForward (line 76) | class FeedForward(nn.Module):
method __init__ (line 77) | def __init__(self, embed_dim, hidden_dim, dropout=0.1, activation='gel...
method forward (line 92) | def forward(self, x):
class TransformerBlock (line 100) | class TransformerBlock(nn.Module):
method __init__ (line 101) | def __init__(self, embed_dim, num_heads, mlp_ratio=4.0, dropout=0.1, d...
method forward (line 111) | def forward(self, x, mask=None):
class TransformerEncoder (line 116) | class TransformerEncoder(nn.Module):
method __init__ (line 117) | def __init__(self, embed_dim, num_heads, num_layers, mlp_ratio=4.0, dr...
method forward (line 125) | def forward(self, x, mask=None):
class VisionTransformerBlock (line 130) | class VisionTransformerBlock(nn.Module):
method __init__ (line 131) | def __init__(self, img_size=224, patch_size=16, in_channels=3, embed_d...
method forward (line 148) | def forward(self, x):
class SelfAttention2D (line 163) | class SelfAttention2D(nn.Module):
method __init__ (line 164) | def __init__(self, in_channels):
method forward (line 171) | def forward(self, x):
class LocalAttention (line 184) | class LocalAttention(nn.Module):
method __init__ (line 185) | def __init__(self, embed_dim, window_size=7, num_heads=8):
method forward (line 196) | def forward(self, x):
FILE: ML/src/python/neuralforge/nn/convolution.py
class ResNetBlock (line 6) | class ResNetBlock(nn.Module):
method __init__ (line 7) | def __init__(self, in_channels, out_channels, stride=1, downsample=None):
method forward (line 16) | def forward(self, x):
class ResNet (line 34) | class ResNet(nn.Module):
method __init__ (line 35) | def __init__(self, block, layers, num_classes=1000, in_channels=3):
method _make_layer (line 52) | def _make_layer(self, block, out_channels, blocks, stride=1):
method forward (line 69) | def forward(self, x):
class EfficientNetBlock (line 86) | class EfficientNetBlock(nn.Module):
method __init__ (line 87) | def __init__(self, in_channels, out_channels, kernel_size, stride, exp...
method forward (line 122) | def forward(self, x):
class UNetBlock (line 140) | class UNetBlock(nn.Module):
method __init__ (line 141) | def __init__(self, in_channels, out_channels, down=True):
method forward (line 166) | def forward(self, x, skip=None):
class ConvNeXtBlock (line 178) | class ConvNeXtBlock(nn.Module):
method __init__ (line 179) | def __init__(self, dim, drop_path=0.0, layer_scale_init_value=1e-6):
method forward (line 191) | def forward(self, x):
class DilatedConvBlock (line 205) | class DilatedConvBlock(nn.Module):
method __init__ (line 206) | def __init__(self, in_channels, out_channels, dilation_rates=[1, 2, 4,...
method forward (line 217) | def forward(self, x):
class PyramidPoolingModule (line 220) | class PyramidPoolingModule(nn.Module):
method __init__ (line 221) | def __init__(self, in_channels, out_channels, pool_sizes=[1, 2, 3, 6]):
method forward (line 233) | def forward(self, x):
FILE: ML/src/python/neuralforge/nn/layers.py
class ConvBlock (line 6) | class ConvBlock(nn.Module):
method __init__ (line 7) | def __init__(self, in_channels, out_channels, kernel_size=3, stride=1,...
method forward (line 26) | def forward(self, x):
class ResidualBlock (line 33) | class ResidualBlock(nn.Module):
method __init__ (line 34) | def __init__(self, channels, kernel_size=3, drop_rate=0.0):
method forward (line 40) | def forward(self, x):
class BottleneckBlock (line 48) | class BottleneckBlock(nn.Module):
method __init__ (line 49) | def __init__(self, in_channels, out_channels, stride=1, expansion=4):
method forward (line 66) | def forward(self, x):
class InvertedResidualBlock (line 75) | class InvertedResidualBlock(nn.Module):
method __init__ (line 76) | def __init__(self, in_channels, out_channels, stride=1, expand_ratio=6):
method forward (line 93) | def forward(self, x):
class DenseLayer (line 98) | class DenseLayer(nn.Module):
method __init__ (line 99) | def __init__(self, in_channels, growth_rate, drop_rate=0.0):
method forward (line 111) | def forward(self, x):
class DenseBlock (line 117) | class DenseBlock(nn.Module):
method __init__ (line 118) | def __init__(self, num_layers, in_channels, growth_rate, drop_rate=0.0):
method forward (line 125) | def forward(self, x):
class TransitionLayer (line 128) | class TransitionLayer(nn.Module):
method __init__ (line 129) | def __init__(self, in_channels, out_channels):
method forward (line 136) | def forward(self, x):
class SEBlock (line 141) | class SEBlock(nn.Module):
method __init__ (line 142) | def __init__(self, channels, reduction=16):
method forward (line 152) | def forward(self, x):
class DepthwiseSeparableConv (line 158) | class DepthwiseSeparableConv(nn.Module):
method __init__ (line 159) | def __init__(self, in_channels, out_channels, kernel_size=3, stride=1,...
method forward (line 167) | def forward(self, x):
FILE: ML/src/python/neuralforge/nn/modules.py
class DynamicConv2d (line 7) | class DynamicConv2d(nn.Module):
method __init__ (line 8) | def __init__(self, in_channels, out_channels, kernel_size, stride=1, p...
method forward (line 22) | def forward(self, x):
class DynamicLinear (line 25) | class DynamicLinear(nn.Module):
method __init__ (line 26) | def __init__(self, in_features, out_features, bias=True):
method forward (line 43) | def forward(self, x):
class AdaptiveBatchNorm2d (line 46) | class AdaptiveBatchNorm2d(nn.Module):
method __init__ (line 47) | def __init__(self, num_features, eps=1e-5, momentum=0.1):
method forward (line 59) | def forward(self, x):
class LayerNorm (line 75) | class LayerNorm(nn.Module):
method __init__ (line 76) | def __init__(self, normalized_shape, eps=1e-5):
method forward (line 83) | def forward(self, x):
class GroupNorm (line 88) | class GroupNorm(nn.Module):
method __init__ (line 89) | def __init__(self, num_groups, num_channels, eps=1e-5):
method forward (line 97) | def forward(self, x):
class DropPath (line 106) | class DropPath(nn.Module):
method __init__ (line 107) | def __init__(self, drop_prob=0.0):
method forward (line 111) | def forward(self, x):
class GlobalAvgPool2d (line 121) | class GlobalAvgPool2d(nn.Module):
method __init__ (line 122) | def __init__(self):
method forward (line 125) | def forward(self, x):
class GlobalMaxPool2d (line 128) | class GlobalMaxPool2d(nn.Module):
method __init__ (line 129) | def __init__(self):
method forward (line 132) | def forward(self, x):
class AdaptiveAvgMaxPool2d (line 135) | class AdaptiveAvgMaxPool2d(nn.Module):
method __init__ (line 136) | def __init__(self):
method forward (line 141) | def forward(self, x):
class Flatten (line 146) | class Flatten(nn.Module):
method __init__ (line 147) | def __init__(self, start_dim=1):
method forward (line 151) | def forward(self, x):
class SqueezeExcitation (line 154) | class SqueezeExcitation(nn.Module):
method __init__ (line 155) | def __init__(self, channels, reduction=16):
method forward (line 160) | def forward(self, x):
class SpatialAttention (line 167) | class SpatialAttention(nn.Module):
method __init__ (line 168) | def __init__(self, kernel_size=7):
method forward (line 172) | def forward(self, x):
class CBAM (line 179) | class CBAM(nn.Module):
method __init__ (line 180) | def __init__(self, channels, reduction=16, kernel_size=7):
method forward (line 185) | def forward(self, x):
FILE: ML/src/python/neuralforge/optim/optimizers.py
class AdamW (line 5) | class AdamW(Optimizer):
method __init__ (line 6) | def __init__(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-8, weig...
method step (line 19) | def step(self, closure=None):
class LAMB (line 69) | class LAMB(Optimizer):
method __init__ (line 70) | def __init__(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-6, weig...
method step (line 74) | def step(self, closure=None):
class RAdam (line 120) | class RAdam(Optimizer):
method __init__ (line 121) | def __init__(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-8, weig...
method step (line 125) | def step(self, closure=None):
class AdaBound (line 177) | class AdaBound(Optimizer):
method __init__ (line 178) | def __init__(self, params, lr=1e-3, betas=(0.9, 0.999), final_lr=0.1, ...
method step (line 182) | def step(self, closure=None):
class Lookahead (line 226) | class Lookahead(Optimizer):
method __init__ (line 227) | def __init__(self, optimizer, k=5, alpha=0.5):
method update (line 237) | def update(self, group):
method step (line 250) | def step(self, closure=None):
method state_dict (line 261) | def state_dict(self):
FILE: ML/src/python/neuralforge/optim/schedulers.py
class WarmupScheduler (line 5) | class WarmupScheduler(_LRScheduler):
method __init__ (line 6) | def __init__(self, optimizer, warmup_epochs, base_scheduler=None, last...
method get_lr (line 11) | def get_lr(self):
method step (line 20) | def step(self, epoch=None):
class CosineAnnealingWarmRestarts (line 26) | class CosineAnnealingWarmRestarts(_LRScheduler):
method __init__ (line 27) | def __init__(self, optimizer, T_0, T_mult=1, eta_min=0, last_epoch=-1):
method get_lr (line 35) | def get_lr(self):
method step (line 41) | def step(self, epoch=None):
class OneCycleLR (line 67) | class OneCycleLR(_LRScheduler):
method __init__ (line 68) | def __init__(self, optimizer, max_lr, total_steps, pct_start=0.3, anne...
method get_lr (line 82) | def get_lr(self):
class PolynomialLR (line 102) | class PolynomialLR(_LRScheduler):
method __init__ (line 103) | def __init__(self, optimizer, total_iters, power=1.0, last_epoch=-1):
method get_lr (line 108) | def get_lr(self):
class LinearWarmupCosineAnnealingLR (line 115) | class LinearWarmupCosineAnnealingLR(_LRScheduler):
method __init__ (line 116) | def __init__(self, optimizer, warmup_epochs, max_epochs, warmup_start_...
method get_lr (line 123) | def get_lr(self):
class ExponentialWarmup (line 132) | class ExponentialWarmup(_LRScheduler):
method __init__ (line 133) | def __init__(self, optimizer, warmup_epochs, gamma=0.9, last_epoch=-1):
method get_lr (line 138) | def get_lr(self):
FILE: ML/src/python/neuralforge/trainer.py
class Trainer (line 13) | class Trainer:
method __init__ (line 14) | def __init__(
method train_epoch (line 50) | def train_epoch(self) -> Dict[str, float]:
method validate (line 105) | def validate(self) -> Dict[str, float]:
method train (line 137) | def train(self):
method save_checkpoint (line 191) | def save_checkpoint(self, filename: str):
method load_checkpoint (line 212) | def load_checkpoint(self, checkpoint_path: str):
method test (line 230) | def test(self, test_loader: DataLoader) -> Dict[str, float]:
FILE: ML/src/python/neuralforge/utils/logger.py
class Logger (line 7) | class Logger:
method __init__ (line 8) | def __init__(self, log_dir: str, name: str = "neuralforge"):
method info (line 42) | def info(self, message: str):
method warning (line 45) | def warning(self, message: str):
method error (line 48) | def error(self, message: str):
method debug (line 51) | def debug(self, message: str):
method log_metrics (line 54) | def log_metrics(self, metrics: dict, step: Optional[int] = None):
method log_model_summary (line 66) | def log_model_summary(self, model):
method separator (line 78) | def separator(self, char: str = "=", length: int = 80):
class TensorBoardLogger (line 81) | class TensorBoardLogger:
method __init__ (line 82) | def __init__(self, log_dir: str):
method log_scalar (line 93) | def log_scalar(self, tag: str, value: float, step: int):
method log_scalars (line 97) | def log_scalars(self, main_tag: str, tag_scalar_dict: dict, step: int):
method log_histogram (line 101) | def log_histogram(self, tag: str, values, step: int):
method log_image (line 105) | def log_image(self, tag: str, img_tensor, step: int):
method log_graph (line 109) | def log_graph(self, model, input_to_model):
method close (line 113) | def close(self):
FILE: ML/src/python/neuralforge/utils/metrics.py
class MetricsTracker (line 6) | class MetricsTracker:
method __init__ (line 7) | def __init__(self):
method update (line 11) | def update(self, metrics: Dict[str, Any]):
method get_history (line 24) | def get_history(self, key: str) -> List[Any]:
method get_latest (line 27) | def get_latest(self, key: str) -> Any:
method get_best (line 33) | def get_best(self, key: str) -> Any:
method get_average (line 36) | def get_average(self, key: str, last_n: int = None) -> float:
method save (line 46) | def save(self, filepath: str):
method load (line 57) | def load(self, filepath: str):
method summary (line 64) | def summary(self) -> str:
class AverageMeter (line 77) | class AverageMeter:
method __init__ (line 78) | def __init__(self):
method reset (line 81) | def reset(self):
method update (line 87) | def update(self, val, n=1):
class EarlyStopping (line 93) | class EarlyStopping:
method __init__ (line 94) | def __init__(self, patience: int = 10, min_delta: float = 0.0, mode: s...
method __call__ (line 102) | def __call__(self, score: float) -> bool:
class ConfusionMatrix (line 122) | class ConfusionMatrix:
method __init__ (line 123) | def __init__(self, num_classes: int):
method update (line 127) | def update(self, predictions: np.ndarray, targets: np.ndarray):
method reset (line 131) | def reset(self):
method compute_metrics (line 134) | def compute_metrics(self) -> Dict[str, float]:
method get_matrix (line 153) | def get_matrix(self) -> np.ndarray:
function accuracy (line 156) | def accuracy(predictions, targets):
function top_k_accuracy (line 161) | def top_k_accuracy(output, target, k=5):
FILE: ML/src/python/neuralforge/utils/visualization.py
function plot_training_curves (line 6) | def plot_training_curves(
function plot_learning_rate (line 47) | def plot_learning_rate(
function plot_confusion_matrix (line 67) | def plot_confusion_matrix(
function visualize_architecture (line 101) | def visualize_architecture(architecture, save_path: Optional[str] = None):
function plot_nas_history (line 124) | def plot_nas_history(
function plot_gradient_flow (line 162) | def plot_gradient_flow(named_parameters, save_path: Optional[str] = None):
FILE: ML/tests/gui_test.py
class PredictionThread (line 20) | class PredictionThread(QThread):
method __init__ (line 24) | def __init__(self, model, image_path, classes, device):
method run (line 31) | def run(self):
class NeuralForgeGUI (line 64) | class NeuralForgeGUI(QMainWindow):
method __init__ (line 65) | def __init__(self):
method init_ui (line 75) | def init_ui(self):
method create_left_panel (line 91) | def create_left_panel(self):
method create_right_panel (line 172) | def create_right_panel(self):
method apply_stylesheet (line 224) | def apply_stylesheet(self):
method browse_model (line 313) | def browse_model(self):
method use_default_model (line 323) | def use_default_model(self):
method browse_image (line 327) | def browse_image(self):
method display_image (line 338) | def display_image(self, image_path):
method load_model (line 347) | def load_model(self):
method predict_image (line 438) | def predict_image(self):
method display_results (line 460) | def display_results(self, predictions, confidences, main_prediction):
method display_error (line 478) | def display_error(self, error_msg):
function main (line 485) | def main():
FILE: ML/tests/test_model.py
class ModelTester (line 15) | class ModelTester:
method __init__ (line 16) | def __init__(self, model_path='./models/best_model.pt', dataset='cifar...
method create_model (line 55) | def create_model(self, num_classes):
method predict_image (line 59) | def predict_image(self, image_tensor):
method test_random_samples (line 70) | def test_random_samples(self, num_samples=10):
method test_specific_sample (line 100) | def test_specific_sample(self, index):
method test_class_accuracy (line 118) | def test_class_accuracy(self):
method test_custom_image (line 149) | def test_custom_image(self, image_path):
method interactive_mode (line 176) | def interactive_mode(self):
function main (line 237) | def main():
FILE: ML/train.py
function set_seed (line 19) | def set_seed(seed):
function create_simple_model (line 27) | def create_simple_model(num_classes=10):
function main (line 48) | def main():
FILE: Memory_game.py
function display_text (line 67) | def display_text(text, font, color, x, y):
function draw_cards (line 73) | def draw_cards():
FILE: Merge_linked_list.py
class Node (line 5) | class Node:
method __init__ (line 6) | def __init__(self, data):
class LinkedList (line 12) | class LinkedList:
method __init__ (line 14) | def __init__(self):
method printList (line 19) | def printList(self):
method append (line 27) | def append(self, new_data):
function mergeLists (line 39) | def mergeLists(head1, head2):
FILE: MobiusFunction.py
function is_square_free (line 1) | def is_square_free(factors):
function prime_factors (line 12) | def prime_factors(n):
function mobius_function (line 29) | def mobius_function(n):
FILE: Mp3_media_player.py
function directorychooser (line 22) | def directorychooser():
function updatelabel (line 42) | def updatelabel():
function nextsong (line 49) | def nextsong(event):
function prevsong (line 57) | def prevsong(event):
function stopsong (line 65) | def stopsong(event):
FILE: Multiply.py
function product (line 1) | def product(a, b):
FILE: News_App/Newsapp.py
function News (line 12) | def News(symbol):
function Page (line 42) | def Page():
FILE: NumPy Array Exponentiation.py
function get_array (line 19) | def get_array(x: np.ndarray, y: np.ndarray) -> None:
FILE: Organise.py
function ChangeDirectory (line 52) | def ChangeDirectory(dir):
function Organize (line 64) | def Organize(dirs, name):
FILE: PDF/header_footer.py
class MyPdf (line 7) | class MyPdf(FPDF):
method header (line 8) | def header(self):
method footer (line 15) | def footer(self):
FILE: PONG_GAME.py
function spawn_ball (line 24) | def spawn_ball(direction):
function reset (line 33) | def reset():
function new_game (line 40) | def new_game():
function draw (line 47) | def draw(canvas):
function keydown (line 124) | def keydown(key):
function keyup (line 137) | def keyup(key):
FILE: Password Generator/pass_gen.py
class PasswordGenerator (line 5) | class PasswordGenerator:
method gen_sequence (line 7) | def gen_sequence(
method gen_password (line 25) | def gen_password(sequence, passlength=8):
class Interface (line 30) | class Interface:
method change_has_characters (line 39) | def change_has_characters(cls, change):
method show_has_characters (line 53) | def show_has_characters(cls):
method generate_password (line 56) | def generate_password(self, lenght):
function list_to_vertical_string (line 61) | def list_to_vertical_string(list):
class Run (line 68) | class Run:
method decide_operation (line 69) | def decide_operation(self):
method run (line 80) | def run(self):
FILE: Password Manager Using Tkinter/main.py
function generate_password (line 16) | def generate_password():
function save (line 36) | def save():
function find_password (line 70) | def find_password():
function view_all_passwords (line 90) | def view_all_passwords():
function show_passwords_window (line 99) | def show_passwords_window():
FILE: Patterns/half triangle pattern.py
function main (line 22) | def main():
function upper_half_repeat_pattern (line 45) | def upper_half_repeat_pattern(lines=5):
function lower_half_repeat_pattern (line 50) | def lower_half_repeat_pattern(lines=5):
function upper_half_incremental_pattern (line 55) | def upper_half_incremental_pattern(lines=5):
function lower_half_incremental_pattern (line 62) | def lower_half_incremental_pattern(lines=5):
FILE: Patterns/pattern2.py
function main (line 10) | def main():
function pattern (line 15) | def pattern(lines):
FILE: Patterns/pattern5.py
function main (line 9) | def main():
function pattern (line 14) | def pattern(rows):
FILE: Patterns/pattern6.py
function alphabetpattern (line 7) | def alphabetpattern(n):
FILE: Patterns/patterns.py
function main (line 18) | def main():
function pattern (line 23) | def pattern(lines):
FILE: Personal-Expense-Tracker/expense_tracker.py
function add_expense (line 4) | def add_expense(expenses):
function view_expenses (line 20) | def view_expenses(expenses, period="all", category_filter=None):
function save_expenses (line 81) | def save_expenses(expenses, filename="expenses.txt"):
function load_expenses (line 90) | def load_expenses(filename="expenses.txt"):
function main (line 109) | def main():
FILE: PingPong/Ball.py
class Ball (line 6) | class Ball:
method __init__ (line 7) | def __init__(self, pos, vel, win, rad, minCoord, maxCoord):
method drawBall (line 15) | def drawBall(self):
method doHorizontalFlip (line 18) | def doHorizontalFlip(self):
method doVerticalFlip (line 22) | def doVerticalFlip(self):
method borderCollisionCheck (line 25) | def borderCollisionCheck(self):
method updatePos (line 32) | def updatePos(self):
method checkSlabCollision (line 35) | def checkSlabCollision(self, slabPos): # slab pos = [xmin, ymin, xmax...
FILE: PingPong/Slab.py
class Slab (line 6) | class Slab:
method __init__ (line 7) | def __init__(self, win, size, pos, player, minPos, maxPos):
method draw (line 15) | def draw(self):
method getCoords (line 22) | def getCoords(self):
method updatePos (line 30) | def updatePos(self):
FILE: Polyline.py
function click (line 8) | def click(pos):
function clear (line 13) | def clear():
function draw (line 18) | def draw(canvas):
FILE: Pomodoro (tkinter).py
function change_background (line 30) | def change_background(*args):
function show_notification (line 42) | def show_notification(message):
function reset_timer (line 76) | def reset_timer():
function start_timer (line 93) | def start_timer():
function count_down (line 111) | def count_down(count):
function pause_timer (line 137) | def pause_timer():
function resume_timer (line 147) | def resume_timer():
function set_custom_durations (line 156) | def set_custom_durations():
FILE: PongPong_Game/pong/ball.py
class BallObject (line 8) | class BallObject(pyglet.shapes.Circle):
method __init__ (line 9) | def __init__(self, *args, **kwargs):
method update (line 14) | def update(self, win_size: Tuple, border: Tuple, other_object, dt) -> ...
FILE: PongPong_Game/pong/load.py
function load_balls (line 7) | def load_balls(win_size: Tuple, radius: float, speed: Tuple, batch=None):
function load_paddles (line 17) | def load_paddles(
function load_rectangles (line 30) | def load_rectangles(win_size: Tuple, border: float, batch=None):
FILE: PongPong_Game/pong/paddle.py
class Paddle (line 8) | class Paddle(pyglet.shapes.Rectangle):
method __init__ (line 9) | def __init__(self, *args, **kwargs):
method update (line 17) | def update(self, win_size: Tuple, border: float, other_object, dt):
FILE: PongPong_Game/pong/rectangle.py
class RectangleObject (line 6) | class RectangleObject(pyglet.shapes.Rectangle):
method __init__ (line 7) | def __init__(self, *args, **kwargs):
FILE: PongPong_Game/pongpong.py
class PongPongWindow (line 20) | class PongPongWindow(pyglet.window.Window):
method __init__ (line 21) | def __init__(self, *args, **kwargs):
method on_draw (line 35) | def on_draw(self):
function update (line 48) | def update(dt):
FILE: Prime_number.py
function is_prime_a (line 11) | def is_prime_a(n):
function is_prime_b (line 21) | def is_prime_b(n):
function is_prime_c (line 32) | def is_prime_c(n):
FILE: Python Programs/Program to reverse Linked List( Recursive solution).py
class Node (line 7) | class Node:
method __init__ (line 8) | def __init__(self, data):
function reverseLinkedListRec (line 13) | def reverseLinkedListRec(head):
function takeInput (line 25) | def takeInput():
function printLinkedList (line 49) | def printLinkedList(head):
FILE: Python Programs/Python Program for Product of unique prime factors of a number.py
function productPrimeFactors (line 5) | def productPrimeFactors(n):
FILE: Python Programs/Python Program for Tower of Hanoi.py
function TowerOfHanoi (line 2) | def TowerOfHanoi(n, source, destination, auxiliary):
FILE: Python Programs/Python Program for factorial of a number.py
function factorial (line 13) | def factorial(n):
function factorial (line 28) | def factorial(n):
FILE: Python Programs/Python Program to Display Fibonacci Sequence Using Recursion.py
function recur_fibo (line 1) | def recur_fibo(n):
FILE: Python Programs/Python Program to Find LCM.py
function compute_lcm (line 4) | def compute_lcm(x, y):
FILE: Python Programs/Python Program to Reverse a linked list.py
class Node (line 6) | class Node:
method __init__ (line 8) | def __init__(self, data):
class LinkedList (line 13) | class LinkedList:
method __init__ (line 15) | def __init__(self):
method reverse (line 19) | def reverse(self):
method push (line 30) | def push(self, new_data):
method printList (line 36) | def printList(self):
FILE: Python-Array-Equilibrium-Index.py
function equilibrium (line 19) | def equilibrium(arr):
FILE: Python_chatting_application/client.py
function recieve (line 11) | def recieve():
function Write (line 27) | def Write():
FILE: Python_chatting_application/server.py
function Client_Handler (line 13) | def Client_Handler(cli):
function BroadCasating (line 37) | def BroadCasating(msg):
function recieve (line 42) | def recieve():
FILE: Python_swapping.py
function swapList (line 5) | def swapList(newList):
FILE: QuadraticCalc.py
function findLinear (line 7) | def findLinear(numbers): # find a & b of linear sequence
FILE: QuestionAnswerVirtualAssistant/backend.py
class QuestionAnswerVirtualAssistant (line 7) | class QuestionAnswerVirtualAssistant:
method __init__ (line 18) | def __init__(self):
method index_question_answer (line 46) | def index_question_answer(self, question, answer):
method _add_to_IdToQuesAns (line 82) | def _add_to_IdToQuesAns(self, question, answer):
method find_questions (line 101) | def find_questions(self, user_input):
method _find_questions_with_idx (line 135) | def _find_questions_with_idx(self, idxs):
method find_most_matched_question (line 152) | def find_most_matched_question(self, user_input, corpus):
method provide_answer (line 178) | def provide_answer(self, user_input):
FILE: QuestionAnswerVirtualAssistant/frontend.py
function index_question_answer (line 5) | def index_question_answer():
function provide_answer (line 15) | def provide_answer():
FILE: Quizzler Using Tkinter and Trivia DB API/question_model.py
class Question (line 1) | class Question:
method __init__ (line 2) | def __init__(self, q_text, q_answer, q_options):
FILE: Quizzler Using Tkinter and Trivia DB API/quiz_brain.py
class QuizBrain (line 6) | class QuizBrain:
method __init__ (line 7) | def __init__(self, q_list):
method still_has_questions (line 13) | def still_has_questions(self):
method next_question (line 16) | def next_question(self):
method check_answer (line 22) | def check_answer(self, user_answer):
FILE: Quizzler Using Tkinter and Trivia DB API/ui.py
class QuizInterface (line 25) | class QuizInterface:
method __init__ (line 27) | def __init__(self, quiz_brain: QuizBrain):
method create_radio_buttons (line 57) | def create_radio_buttons(self):
method get_next_question (line 70) | def get_next_question(self):
method display_options (line 85) | def display_options(self):
method submit_answer (line 90) | def submit_answer(self):
method display_result (line 114) | def display_result(self):
method display_error_message (line 138) | def display_error_message(self, message):
FILE: RandomDice.py
function roll (line 10) | def roll():
FILE: RandomNumberGame.py
function get_players (line 28) | def get_players(n: int) -> List[str]:
function play_turn (line 48) | def play_turn(player: str) -> int:
function play_game (line 81) | def play_game() -> Tuple[List[str], List[int], List[str]]:
FILE: Recursion Visulaizer/recursionVisualizer.py
function tree (line 11) | def tree(i):
function cycle (line 45) | def cycle(i):
function fractal (line 59) | def fractal(i):
FILE: Reverse_list_in_groups.py
class Node (line 1) | class Node:
method __init__ (line 2) | def __init__(self, data):
class Reverse_Linked_List (line 7) | class Reverse_Linked_List:
method __init__ (line 8) | def __init__(self):
method Insert_At_End (line 11) | def Insert_At_End(self, new_data):
method Reverse_list_Groups (line 21) | def Reverse_list_Groups(self, head, k):
method Display (line 35) | def Display(self):
FILE: Rotate_Linked_List.py
class Node (line 1) | class Node:
method __init__ (line 2) | def __init__(self, data):
class Linked_List (line 7) | class Linked_List:
method __init__ (line 8) | def __init__(self):
method Insert_At_Beginning (line 11) | def Insert_At_Beginning(self, new_data):
method Rotation (line 19) | def Rotation(self, key):
method Display (line 36) | def Display(self):
FILE: SOUNDEX.py
function SOUNDEX (line 4) | def SOUNDEX(TERM: str):
FILE: Sanke-water-gun game.py
function determine_winner (line 38) | def determine_winner(user: str, computer: str) -> str:
function play_game (line 75) | def play_game(rounds: int = 10) -> None:
FILE: Search_Engine/backend.py
class SearchEngine (line 5) | class SearchEngine:
method __init__ (line 13) | def __init__(self):
method index_document (line 41) | def index_document(self, document):
method _add_to_IdToDoc (line 77) | def _add_to_IdToDoc(self, document):
method find_documents (line 90) | def find_documents(self, search_term):
method _find_documents_with_idx (line 124) | def _find_documents_with_idx(self, idxs):
FILE: Search_Engine/frontend.py
function add_document (line 5) | def add_document():
function find_term (line 11) | def find_term():
FILE: Secret message generator GUI by tkinter.py
function show1 (line 59) | def show1():
function show2 (line 136) | def show2():
FILE: Snake Game Using Turtle/food.py
class Food (line 10) | class Food(Turtle):
method __init__ (line 12) | def __init__(self):
method refresh (line 20) | def refresh(self, left_wall, right_wall, bottom_wall, top_wall):
FILE: Snake Game Using Turtle/main.py
function create_button (line 46) | def create_button(name, x, y, width=120, height=40):
function hide_button (line 72) | def hide_button(name):
function manage_buttons (line 78) | def manage_buttons():
function start_game (line 97) | def start_game():
function toggle_pause_resume (line 103) | def toggle_pause_resume():
function restart_game (line 112) | def restart_game():
function is_click_on_button (line 120) | def is_click_on_button(name, x, y):
function handle_click (line 128) | def handle_click(x, y):
function handle_snake_up (line 140) | def handle_snake_up():
function handle_snake_down (line 144) | def handle_snake_down():
function handle_snake_left (line 148) | def handle_snake_left():
function handle_snake_right (line 152) | def handle_snake_right():
function game_loop (line 169) | def game_loop():
FILE: Snake Game Using Turtle/scoreboard.py
class Scoreboard (line 14) | class Scoreboard(Turtle):
method __init__ (line 16) | def __init__(self):
method load_high_score (line 25) | def load_high_score(self):
method update_scoreboard (line 33) | def update_scoreboard(self):
method increase_score (line 43) | def increase_score(self):
method reset (line 48) | def reset(self):
method game_over (line 57) | def game_over(self):
method display_pause (line 65) | def display_pause(self):
method display_start_message (line 73) | def display_start_message(self):
FILE: Snake Game Using Turtle/snake.py
class Snake (line 12) | class Snake:
method __init__ (line 14) | def __init__(self):
method create_snake (line 19) | def create_snake(self):
method add_segment (line 25) | def add_segment(self, position):
method extend (line 33) | def extend(self):
method move (line 38) | def move(self):
method reset (line 46) | def reset(self):
method up (line 54) | def up(self):
method down (line 59) | def down(self):
method left (line 64) | def left(self):
method right (line 69) | def right(self):
FILE: Snake Game Using Turtle/wall.py
class Wall (line 6) | class Wall:
method __init__ (line 8) | def __init__(self):
method create_wall (line 12) | def create_wall(self):
FILE: Snake_water_gun/main.py
class bcolors (line 11) | class bcolors:
FILE: Sorting Algorithims/heapsort_linkedlist.py
class Node (line 1) | class Node:
method __init__ (line 2) | def __init__(self, data):
class LinkedList (line 7) | class LinkedList:
method __init__ (line 8) | def __init__(self):
method push (line 11) | def push(self, data):
method print_list (line 16) | def print_list(self):
method heapify (line 23) | def heapify(self, n, i):
method swap (line 42) | def swap(self, i, j):
method heap_sort (line 54) | def heap_sort(self):
FILE: Sorting Algorithims/mergesort_linkedlist.py
class Node (line 4) | class Node:
method __init__ (line 5) | def __init__(self, data: int) -> None:
class LinkedList (line 10) | class LinkedList:
method __init__ (line 11) | def __init__(self):
method insert (line 14) | def insert(self, new_data: int) -> None:
method printLL (line 19) | def printLL(self) -> None:
function merge (line 31) | def merge(left, right):
function merge_sort (line 48) | def merge_sort(head):
FILE: Sorting Algorithims/quicksort_linkedlist.py
class Node (line 10) | class Node:
method __init__ (line 11) | def __init__(self, data: int) -> None:
class LinkedList (line 16) | class LinkedList:
method __init__ (line 17) | def __init__(self):
method insert (line 21) | def insert(self, new_data: int) -> None:
method printLL (line 27) | def printLL(self) -> None:
function partition (line 41) | def partition(start, end):
function quicksort_LL (line 60) | def quicksort_LL(start, end):
FILE: Sorting Algorithms/Binary_Insertion_Sort.py
function Binary_Search (line 1) | def Binary_Search(Test_arr, low, high, k):
function Insertion_Sort (line 14) | def Insertion_Sort(Test_arr):
FILE: Sorting Algorithms/Bubble_Sorting_Prog.py
function bubblesort (line 1) | def bubblesort(list):
FILE: Sorting Algorithms/Bubble_sort.py
function bubble_sort (line 1) | def bubble_sort(Lists):
FILE: Sorting Algorithms/Count sort.py
function counting_sort (line 1) | def counting_sort(array1, max_val):
FILE: Sorting Algorithms/Counting Sort.py
function countingSort (line 4) | def countingSort(array):
FILE: Sorting Algorithms/Counting-sort.py
function counting_sort (line 9) | def counting_sort(tlist, k, n):
FILE: Sorting Algorithms/Cycle Sort.py
function cycleSort (line 4) | def cycleSort(array):
FILE: Sorting Algorithms/Heap sort.py
function heapify (line 5) | def heapify(arr, n, i):
function heapSort (line 29) | def heapSort(arr):
FILE: Sorting Algorithms/Iterative Merge Sort.py
function mergeSort (line 5) | def mergeSort(a):
function merge (line 40) | def merge(a, l, m, r):
FILE: Sorting Algorithms/Linear_Insertion_Sort.py
function Linear_Search (line 1) | def Linear_Search(Test_arr, val):
function Insertion_Sort (line 9) | def Insertion_Sort(Test_arr):
FILE: Sorting Algorithms/Merge Sort.py
function merge (line 8) | def merge(arr, l, m, r):
function mergeSort (line 56) | def mergeSort(arr, l, r):
FILE: Sorting Algorithms/Merge-sort.py
function merge (line 12) | def merge(ori_lst, left, mid, right):
function merge_sort (line 40) | def merge_sort(L, left, right):
FILE: Sorting Algorithms/Quick sort.py
function partition (line 1) | def partition(arr, low, high):
function quickSort (line 25) | def quickSort(arr, low, high):
FILE: Sorting Algorithms/Shell Sort.py
function shellSort (line 4) | def shellSort(arr):
FILE: Sorting Algorithms/Sort the values of first list using second list.py
function sort_list (line 5) | def sort_list(list1, list2):
FILE: Sorting Algorithms/Sorted_Inserted_Linked_List.py
class Node (line 1) | class Node:
method __init__ (line 2) | def __init__(self, data):
class Circular_Linked_List (line 7) | class Circular_Linked_List:
method __init__ (line 8) | def __init__(self):
method Sorted_Insert (line 11) | def Sorted_Insert(self, new_node):
method Display (line 28) | def Display(self):
FILE: Sorting Algorithms/Sorting_List.py
class Node (line 1) | class Node:
method __init__ (line 2) | def __init__(self, data):
class Linked_List (line 7) | class Linked_List:
method __init__ (line 8) | def __init__(self):
method Insert_At_End (line 11) | def Insert_At_End(self, new_data):
method Sort (line 21) | def Sort(self):
method Display (line 35) | def Display(self):
FILE: Sorting Algorithms/Tim_sort.py
function insertionSort (line 15) | def insertionSort(arr, left, right):
function merge (line 27) | def merge(arr, l, m, r):
function timSort (line 66) | def timSort(arr, n):
function printArray (line 93) | def printArray(arr, n):
FILE: Sorting Algorithms/brickSort.py
function oddEvenSort (line 5) | def oddEvenSort(arr, n):
FILE: Sorting Algorithms/bubblesortpgm.py
function bubbleSort (line 26) | def bubbleSort(arr):
FILE: Sorting Algorithms/dual_pivot_quicksort.py
function dual_pivot_quicksort (line 1) | def dual_pivot_quicksort(arr, low, high):
function partition (line 30) | def partition(arr, low, high):
FILE: Sorting Algorithms/heap_sort.py
function heapify (line 1) | def heapify(nums, heap_size, root_index):
function heap_sort (line 23) | def heap_sort(nums):
FILE: Sorting Algorithms/insertion_sort.py
function insertion_sort (line 1) | def insertion_sort(nums):
FILE: Sorting Algorithms/merge_sort.py
function merge (line 1) | def merge(left_list, right_list):
function merge_sort (line 36) | def merge_sort(nums):
FILE: Sorting Algorithms/pigeonhole_sort.py
function pigeonhole_sort (line 5) | def pigeonhole_sort(a):
FILE: Sorting Algorithms/quick_sort.py
function partition (line 1) | def partition(nums, low, high):
function quick_sort (line 26) | def quick_sort(nums):
FILE: Sorting Algorithms/recursive-quick-sort.py
function quick_sort (line 1) | def quick_sort(l):
FILE: Sorting Algorithms/selection_sort.py
function selection_sort (line 1) | def selection_sort(nums):
FILE: Sorting Algorithms/stooge_sort.py
function stooge_sort_ (line 5) | def stooge_sort_(arr, l, h):
FILE: Sorting Algorithms/wave_sort.py
function sortInWave (line 1) | def sortInWave(arr, n):
FILE: Split_Circular_Linked_List.py
class Node (line 1) | class Node:
method __init__ (line 2) | def __init__(self, data):
class Circular_Linked_List (line 7) | class Circular_Linked_List:
method __init__ (line 8) | def __init__(self):
method Push (line 11) | def Push(self, data):
method Split_List (line 23) | def Split_List(self, head1, head2):
method Display (line 39) | def Display(self):
FILE: Street_Fighter/src/fighter.py
class Fighter (line 4) | class Fighter:
method __init__ (line 5) | def __init__(self, player, x, y, flip, data, sprite_sheet, animation_s...
method load_images (line 28) | def load_images(self, sprite_sheet, animation_steps):
method move (line 46) | def move(self, screen_width, screen_height, target, round_over):
method update (line 132) | def update(self):
method attack (line 177) | def attack(self, target):
method update_action (line 192) | def update_action(self, new_action):
method draw (line 200) | def draw(self, surface):
FILE: Street_Fighter/src/main.py
function resource_path (line 12) | def resource_path(relative_path):
function draw_text (line 99) | def draw_text(text, font, color, x, y):
function blur_bg (line 104) | def blur_bg(image):
function draw_bg (line 110) | def draw_bg(image, is_game_started=False):
function draw_button (line 122) | def draw_button(text, font, text_col, button_col, x, y, width, height):
function victory_screen (line 131) | def victory_screen(winner_img):
function draw_gradient_text (line 161) | def draw_gradient_text(text, font, x, y, colors):
function main_menu (line 171) | def main_menu():
function scores_screen (line 259) | def scores_screen():
function reset_game (line 328) | def reset_game():
function draw_health_bar (line 345) | def draw_health_bar(health, x, y):
function countdown (line 352) | def countdown():
function game_loop (line 369) | def game_loop():
FILE: Sum of digits of a number.py
function get_integer (line 6) | def get_integer():
function addition (line 26) | def addition(num):
FILE: TTS.py
function text2Speech (line 11) | def text2Speech():
FILE: TaskManager.py
function load_tasks (line 4) | def load_tasks(filename="tasks.csv"):
function save_tasks (line 13) | def save_tasks(tasks, filename="tasks.csv"):
function add_task (line 20) | def add_task(task, deadline):
function show_tasks (line 27) | def show_tasks():
FILE: TaskPlanner.py
function load_tasks (line 4) | def load_tasks(filename="tasks.csv"):
function save_tasks (line 13) | def save_tasks(tasks, filename="tasks.csv"):
function add_task (line 20) | def add_task(task, deadline):
function show_tasks (line 27) | def show_tasks():
FILE: Test-Case-Generator/test_case.py
class Case (line 15) | class Case:
method __init__ (line 16) | def __init__(self, master):
method home (line 21) | def home(self):
method newformat (line 173) | def newformat(self):
method forget_home (line 177) | def forget_home(self):
method retrieve_home (line 192) | def retrieve_home(self):
method cpy (line 208) | def cpy(self):
method done (line 213) | def done(self, output):
method display (line 219) | def display(self):
method try_forget (line 306) | def try_forget(self):
method get_t (line 320) | def get_t(self, r):
method get_n (line 330) | def get_n(self, r):
method get_m (line 344) | def get_m(self, r):
method get_k (line 358) | def get_k(self, r):
method get_a (line 372) | def get_a(self, r):
method get_b (line 386) | def get_b(self, r):
method get_char_list (line 400) | def get_char_list(self, r):
method show_button (line 412) | def show_button(self, r):
method submit (line 431) | def submit(self):
method forget_testcase_take_input_screen (line 535) | def forget_testcase_take_input_screen(self, check=0):
class Type1 (line 590) | class Type1(Case):
method __init__ (line 591) | def __init__(self, master):
method take_input (line 596) | def take_input(self):
method generate (line 606) | def generate(self): # Type 1
class Type2 (line 622) | class Type2(Case): # Type 2
method __init__ (line 623) | def __init__(self, master):
method take_input (line 628) | def take_input(self): # Type 2
method generate (line 639) | def generate(self): # Type 2
class Type3 (line 657) | class Type3(Case):
method __init__ (line 658) | def __init__(self, master):
method take_input (line 663) | def take_input(self): # Type 3
method generate (line 673) | def generate(self): # Type 3
class Type4 (line 686) | class Type4(Case):
method __init__ (line 687) | def __init__(self, master):
method take_input (line 692) | def take_input(self): # Type 4
method generate (line 704) | def generate(self): # Type 4
class Type5 (line 734) | class Type5(Case):
method __init__ (line 735) | def __init__(self, master):
method take_input (line 740) | def take_input(self): # Type 5
method generate (line 751) | def generate(self): # Type 5
class Type6 (line 767) | class Type6(Case):
method __init__ (line 768) | def __init__(self, master): # Type 6
method take_input (line 773) | def take_input(self): # Type 6
method generate (line 792) | def generate(self): # Type 6
class Type7 (line 808) | class Type7(Case):
method __init__ (line 809) | def __init__(self, master): # Type 7
method take_input (line 814) | def take_input(self): # Type 7
method generate (line 824) | def generate(self): # Type 7
class Type8 (line 837) | class Type8(Case):
method __init__ (line 838) | def __init__(self, master): # Type 8
method take_input (line 843) | def take_input(self):
method generate (line 855) | def generate(self): # Type 8
class Type9 (line 875) | class Type9(Case):
method __init__ (line 876) | def __init__(self, master):
method take_input (line 881) | def take_input(self): # Type 9
method generate (line 891) | def generate(self): # Type 9
class Type10 (line 902) | class Type10(Case):
method __init__ (line 903) | def __init__(self, master):
method take_input (line 908) | def take_input(self): # Type 10
method generate (line 920) | def generate(self): # Type 10
FILE: ThirdAI/Terms and Conditions/ThirdAI.py
class NeuralDBClient (line 4) | class NeuralDBClient:
method __init__ (line 5) | def __init__(self):
method train (line 12) | def train(self, file_paths):
method query (line 24) | def query(self, question):
FILE: ThirdAI/Terms and Conditions/TkinterUI.py
class ThirdAIApp (line 8) | class ThirdAIApp:
method __init__ (line 13) | def __init__(self, root):
method custom_font (line 98) | def custom_font(size):
method file_input (line 110) | def file_input(self):
method clear_all (line 123) | def clear_all(self):
method training (line 131) | def training(self):
method processing (line 145) | def processing(self):
method display_output (line 159) | def display_output(self, output_data):
FILE: Tic-Tac-Toe Games/tic-tac-toe1.py
function print_board (line 21) | def print_board(board: Board) -> None:
function check_winner (line 28) | def check_winner(board: Board, player: str) -> bool:
function is_full (line 42) | def is_full(board: Board) -> bool:
function get_valid_input (line 47) | def get_valid_input(prompt: str) -> int:
function main (line 59) | def main() -> None:
FILE: Tic-Tac-Toe Games/tic-tac-toe2.py
function draw_board (line 31) | def draw_board() -> None:
function check_position (line 41) | def check_position(b: List[str], pos: int) -> bool:
function check_win (line 62) | def check_win() -> None:
function main (line 86) | def main() -> None:
FILE: Tic-Tac-Toe Games/tic-tac-toe3.py
function check_winner (line 21) | def check_winner(board: Board, player: str) -> bool:
function is_board_full (line 35) | def is_board_full(board: Board) -> bool:
function minimax (line 40) | def minimax(board: Board, depth: int, is_max: bool) -> int:
function best_move (line 69) | def best_move(board: Board) -> Optional[Tuple[int, int]]:
function make_move (line 85) | def make_move(row: int, col: int) -> None:
function ai_move (line 102) | def ai_move() -> None:
FILE: Tic-Tac-Toe Games/tic-tac-toe4.py
function create_board (line 31) | def create_board() -> np.ndarray:
function possibilities (line 36) | def possibilities(board: np.ndarray) -> List[Tuple[int, int]]:
function random_place (line 41) | def random_place(board: np.ndarray, player: int) -> np.ndarray:
function row_win (line 49) | def row_win(board: np.ndarray, player: int) -> bool:
function col_win (line 54) | def col_win(board: np.ndarray, player: int) -> bool:
function diag_win (line 59) | def diag_win(board: np.ndarray, player: int) -> bool:
function evaluate (line 68) | def evaluate(board: np.ndarray) -> int:
function play_game (line 85) | def play_game() -> int:
FILE: Tic-Tac-Toe Games/tic-tac-toe5.py
function introduction (line 23) | def introduction() -> None:
function draw_board (line 30) | def draw_board(board: List[str]) -> None:
function input_player_letter (line 45) | def input_player_letter() -> Tuple[str, str]:
function first_player (line 57) | def first_player() -> str:
function play_again (line 62) | def play_again() -> bool:
function make_move (line 68) | def make_move(board: List[str], letter: str, move: int) -> None:
function is_winner (line 73) | def is_winner(board: List[str], le: str) -> bool:
function get_board_copy (line 94) | def get_board_copy(board: List[str]) -> List[str]:
function is_space_free (line 99) | def is_space_free(board: List[str], move: int) -> bool:
function get_player_move (line 111) | def get_player_move(board: List[str]) -> int:
function choose_random_move_from_list (line 122) | def choose_random_move_from_list(
function get_computer_move (line 136) | def get_computer_move(board: List[str], computer_letter: str) -> int:
function is_board_full (line 169) | def is_board_full(board: List[str]) -> bool:
function main (line 174) | def main() -> None:
FILE: Tic-Tac-Toe Games/tic-tac-toe6.py
function print_tic_tac_toe (line 22) | def print_tic_tac_toe(values: List[str]) -> None:
function print_scoreboard (line 37) | def print_scoreboard(score_board: Dict[str, int]) -> None:
function check_win (line 48) | def check_win(player_pos: Dict[str, List[int]], cur_player: str) -> bool:
function check_draw (line 77) | def check_draw(player_pos: Dict[str, List[int]]) -> bool:
function single_game (line 95) | def single_game(cur_player: str) -> str:
function main (line 131) | def main() -> None:
FILE: Timetable_Operations.py
function clock_diff (line 20) | def clock_diff(t1: str, t2: str) -> str:
function calculate (line 35) | def calculate() -> None:
FILE: To print series 1,12,123,1234......py
function print_pattern (line 1) | def print_pattern(rows: int) -> None:
function start (line 6) | def start():
FILE: Todo_GUi.py
function add_Button (line 6) | def add_Button():
function del_Button (line 13) | def del_Button():
FILE: Translator/translator.py
function translate (line 6) | def translate():
FILE: Trending youtube videos.py
function get_trending_videos (line 24) | def get_trending_videos():
FILE: Triplets with zero sum/find_Triplets_with_zero_sum.py
function find_Triplets_with_zero_sum (line 9) | def find_Triplets_with_zero_sum(arr, num):
FILE: Type of angles of a triangle.py
function angle_type (line 3) | def angle_type():
FILE: Type_of_angles_of_triangle.py
function angle_type (line 5) | def angle_type():
FILE: UI-Apps/clock.py
function time (line 15) | def time():
FILE: Unit Digit of a raised to power b.py
function last_digit (line 1) | def last_digit(a, b):
FILE: Voice Command Calculator.py
function get_operator_fn (line 15) | def get_operator_fn(op):
function eval_binary_expr (line 32) | def eval_binary_expr(op1, oper, op2):
FILE: VoiceAssistant/Project_Basic_struct/TextTospeech.py
function tts (line 4) | def tts():
FILE: VoiceAssistant/Project_Basic_struct/VoiceAssistant_main.py
function main (line 10) | def main():
FILE: VoiceAssistant/Project_Basic_struct/dictator.py
function big_text (line 8) | def big_text():
function colours (line 35) | def colours():
FILE: VoiceAssistant/Project_Basic_struct/menu.py
function print_menu (line 6) | def print_menu():
FILE: VoiceAssistant/Project_Basic_struct/speakListen.py
function speak (line 16) | def speak(text):
function greet (line 26) | def greet(g):
function hear (line 50) | def hear():
function recognizing (line 87) | def recognizing():
function long_hear (line 96) | def long_hear(duration_time=60):
function short_hear (line 135) | def short_hear(duration_time=5):
FILE: VoiceAssistant/Project_Basic_struct/speechtotext.py
function stt (line 7) | def stt():
FILE: VoiceAssistant/Project_Basic_struct/textRead.py
function ms_word (line 11) | def ms_word():
function pdf_read (line 38) | def pdf_read():
function doubleslash (line 248) | def doubleslash(text):
function print_index (line 260) | def print_index(toc):
function print_n_speak_index (line 276) | def print_n_speak_index(toc):
function search_in_toc (line 293) | def search_in_toc(toc, key, totalpg):
function book_details (line 323) | def book_details(author, title, total_pages):
FILE: VoiceAssistant/Project_Basic_struct/websiteWork.py
function google_search (line 13) | def google_search():
function wiki_search (line 29) | def wiki_search():
FILE: VoiceRepeater/__main__.py
function callback (line 14) | def callback(recognizer, audio):
FILE: WeatherGUI.py
function getWeather (line 8) | def getWeather():
FILE: Webbrowser/tk-browser.py
class Browser (line 11) | class Browser(Tk):
method __init__ (line 12) | def __init__(self):
function main (line 23) | def main():
FILE: Wikipdedia/flask_rendering.py
function index (line 8) | def index():
function output (line 14) | def output():
FILE: Wikipdedia/main.py
function print_hi (line 7) | def print_hi(name):
FILE: Wikipdedia/practice_beautifulsoap.py
function lang (line 7) | def lang():
function data (line 25) | def data(selected_topic, selected_language):
function get_image_urls (line 54) | def get_image_urls(query):
FILE: Wikipdedia/static/js/output.js
function validateForm (line 1) | function validateForm() {
FILE: WikipediaModule.py
function wiki (line 13) | def wiki():
function fullPage (line 48) | def fullPage(page):
function randomWiki (line 53) | def randomWiki():
FILE: Windows_Wallpaper_Script/wallpaper_extract.py
class Wallpaper (line 8) | class Wallpaper:
method time_gap (line 36) | def time_gap(string):
method copy_wallpapers (line 45) | def copy_wallpapers():
method change_ext (line 54) | def change_ext():
method extract_wall (line 69) | def extract_wall():
method arr_desk_wallpapers (line 87) | def arr_desk_wallpapers():
method exec_all (line 115) | def exec_all():
FILE: Word_Dictionary/dictionary.py
class Dictionary (line 4) | class Dictionary:
method __init__ (line 5) | def __init__(self):
method add_word (line 8) | def add_word(self, word: str) -> None:
method word_exists (line 16) | def word_exists(self, word: str) -> bool:
method list_words_from_node (line 24) | def list_words_from_node(self, node: Dict, spelling: str) -> None:
method print_all_words_in_dictionary (line 31) | def print_all_words_in_dictionary(self) -> List[str]:
method suggest_words_starting_with (line 37) | def suggest_words_starting_with(self, prefix: str) -> List[str]:
FILE: XORcipher/XOR_cipher.py
class XORCipher (line 21) | class XORCipher(object):
method __init__ (line 22) | def __init__(self, key=0):
method encrypt (line 31) | def encrypt(self, content, key):
method decrypt (line 56) | def decrypt(self, content, key):
method encrypt_string (line 81) | def encrypt_string(self, content, key=0):
method decrypt_string (line 106) | def decrypt_string(self, content, key=0):
method encrypt_file (line 131) | def encrypt_file(self, file, key=0):
method decrypt_file (line 155) | def decrypt_file(self, file, key):
FILE: XORcipher/test_XOR_cipher.py
class TestXORCipher (line 21) | class TestXORCipher(TestCase):
method setUp (line 26) | def setUp(self):
method test__init__ (line 37) | def test__init__(self, mock__init__):
method test_encrypt (line 53) | def test_encrypt(self, mock_encrypt):
method test_decrypt (line 67) | def test_decrypt(self, mock_decrypt):
method test_encrypt_string (line 81) | def test_encrypt_string(self, mock_encrypt_string):
method test_decrypt_string (line 95) | def test_decrypt_string(self, mock_decrypt_string):
method test_encrypt_file (line 109) | def test_encrypt_file(self, mock_encrypt_file):
method test_decrypt_file (line 122) | def test_decrypt_file(self, mock_decrypt_file):
FILE: Youtube Downloader With GUI/main.py
function progress (line 18) | def progress(stream=None, chunk=None, remaining=None):
function startDownload (line 25) | def startDownload():
function startDownloadthread (line 68) | def startDownloadthread():
FILE: add_two_nums.py
function addition (line 5) | def addition(num1: typing.Union[int, float], num2: typing.Union[int, flo...
FILE: advanced_calculator.py
class Calculator (line 30) | class Calculator:
method __init__ (line 31) | def __init__(self):
method add (line 34) | def add(self):
method sub (line 42) | def sub(self):
method multi (line 50) | def multi(self):
method div (line 58) | def div(self):
method power (line 67) | def power(self):
method root (line 75) | def root(self):
method remainer (line 83) | def remainer(self):
method cube_root (line 93) | def cube_root(self):
method cube_exponent (line 101) | def cube_exponent(self):
method square_root (line 109) | def square_root(self):
method square_exponent (line 117) | def square_exponent(self):
method factorial (line 125) | def factorial(self):
method list_factors (line 129) | def list_factors(self):
method factorial (line 133) | def factorial(self):
method LCM (line 137) | def LCM(self):
method HCF (line 141) | def HCF(self):
method age_calculator (line 146) | def age_calculator(self):
method days_calculator (line 152) | def days_calculator(self):
method leap_year (line 156) | def leap_year(self):
method perimeter (line 160) | def perimeter(self):
class Trigonometry (line 164) | class Trigonometry:
method pythagorean_theorem (line 167) | def pythagorean_theorem(self):
method find_hypotenuse (line 171) | def find_hypotenuse(self):
method find_base (line 175) | def find_base(self):
method find_perpendicular (line 179) | def find_perpendicular(self):
method quadratic_equation (line 186) | def quadratic_equation(self):
method open_system_calculator (line 190) | def open_system_calculator(self):
method take_inputs (line 199) | def take_inputs(self):
method greeting (line 217) | def greeting(self):
method user_name (line 232) | def user_name(self):
method user_name_art (line 248) | def user_name_art(self):
class unitConversion (line 272) | class unitConversion:
method __init__ (line 277) | def __init__(self):
method length (line 281) | def length(self):
method area (line 288) | def area(self):
method volume (line 295) | def volume(self):
method mass (line 299) | def mass(self):
method time (line 302) | def time(self):
method speed (line 305) | def speed(self):
method temperature (line 308) | def temperature(self):
method data (line 311) | def data(self):
method pressure (line 314) | def pressure(self):
method energy (line 317) | def energy(self):
method power (line 320) | def power(self):
method angle (line 323) | def angle(self):
method force (line 326) | def force(self):
method frequency (line 329) | def frequency(self):
method take_inputs (line 332) | def take_inputs(self):
class CurrencyConverter (line 335) | class CurrencyConverter:
method __init__ (line 336) | def __init__(self):
method take_inputs (line 339) | def take_inputs(self):
method convert (line 342) | def convert(self):
class Commands (line 345) | class Commands:
method __init__ (line 346) | def __init__(self):
method previous_number (line 349) | def previous_number(self):
method previous_operation (line 352) | def previous_operation(self):
method previous_result (line 355) | def previous_result(self):
method clear_screen (line 358) | def clear_screen(self):
FILE: agecalculator.py
function age_cal (line 54) | def age_cal():
FILE: alexa_news_headlines.py
function get_headlines (line 13) | def get_headlines():
function homepage (line 31) | def homepage():
function start_skill (line 36) | def start_skill():
function share_headlines (line 42) | def share_headlines():
function no_intent (line 49) | def no_intent():
FILE: area_of_square_app.py
function convert_words_to_number (line 10) | def convert_words_to_number(word_str):
class Square (line 30) | class Square:
method __init__ (line 31) | def __init__(self, side=None):
method calculate_square (line 52) | def calculate_square(self):
method ask_side (line 58) | def ask_side(self):
method truncate_decimals (line 75) | def truncate_decimals(self):
method calculate_perimeter (line 84) | def calculate_perimeter(self):
method calculate_perimeter_prettify (line 87) | def calculate_perimeter_prettify(self):
method calculate_area_prettify (line 90) | def calculate_area_prettify(self):
method truncate_decimals_prettify (line 93) | def truncate_decimals_prettify(self):
FILE: async_downloader/async_downloader.py
function download (line 14) | def download(ways):
function async_downloader (line 46) | async def async_downloader(ways, loop, success_files, failure_files):
function download_file_by_url (line 65) | async def download_file_by_url(url, session=None):
function test (line 111) | def test():
FILE: balance_parenthesis.py
class Stack (line 1) | class Stack:
method __init__ (line 2) | def __init__(self):
method push (line 5) | def push(self, item):
method pop (line 8) | def pop(self):
method is_empty (line 11) | def is_empty(self):
method peek (line 14) | def peek(self):
method display (line 17) | def display(self):
function is_same (line 21) | def is_same(p1, p2):
function is_balanced (line 32) | def is_balanced(check_string):
FILE: bank_managment_system/QTFrontend.py
function create_styled_frame (line 37) | def create_styled_frame(parent, min_size=None, style=""):
function create_styled_label (line 48) | def create_styled_label(
function create_styled_button (line 63) | def create_styled_button(parent, text, min_size=None):
function create_input_field (line 90) | def create_input_field(parent, label_text, min_label_size=(120, 0)):
function create_input_field_V (line 114) | def create_input_field_V(parent, label_text, min_label_size=(120, 0)):
function show_popup_message (line 138) | def show_popup_message(
function search_result (line 209) | def search_result(parent, title, label_text):
function create_page_with_header (line 243) | def create_page_with_header(parent, title_text):
function get_employee_name (line 261) | def get_employee_name(parent, name_field_text="Enter Employee Name"):
function create_login_page (line 329) | def create_login_page(
function on_login_button_clicked (line 378) | def on_login_button_clicked(parent, name_field, password_field):
function create_home_page (line 402) | def create_home_page(parent, on_admin_clicked, on_employee_clicked, on_e...
function create_admin_menu_page (line 462) | def create_admin_menu_page(parent):
function create_add_employee_page (line 502) | def create_add_employee_page(
function show_employee_list_page (line 587) | def show_employee_list_page(parent, title):
function show_total_money (line 691) | def show_total_money(parent, title):
function create_employee_menu_page (line 729) | def create_employee_menu_page(parent, title):
function create_account_page (line 773) | def create_account_page(parent, title, update_btn=False):
function create_show_details_page1 (line 891) | def create_show_details_page1(parent, title):
function create_show_details_page2 (line 922) | def create_show_details_page2(parent, title):
function update_user (line 1007) | def update_user(parent, title, input_fields_label, input_fielf: bool = T...
function setup_main_window (line 1098) | def setup_main_window(main_window: QtWidgets.QMainWindow):
function main (line 1746) | def main():
FILE: bank_managment_system/backend.py
class DatabaseManager (line 5) | class DatabaseManager:
method __init__ (line 6) | def __init__(self, db_name="bankmanaging.db"):
method _setup_tables (line 13) | def _setup_tables(self):
method _get_last_acc_no (line 39) | def _get_last_acc_no(self):
method check_admin (line 45) | def check_admin(self, name, password):
method create_employee (line 52) | def create_employee(self, name, password, salary, position):
method check_employee (line 58) | def check_employee(self, name, password):
method show_employees (line 64) | def show_employees(self):
method update_employee (line 68) | def update_employee(self, field, new_value, name):
method check_name_in_staff (line 74) | def check_name_in_staff(self, name):
method create_customer (line 79) | def create_customer(self, name, age, address, balance, acc_type, mobil...
method check_acc_no (line 89) | def check_acc_no(self, acc_no):
method get_details (line 93) | def get_details(self, acc_no):
method get_detail (line 97) | def get_detail(self, acc_no):
method update_customer (line 101) | def update_customer(self, field, new_value, acc_no):
method update_balance (line 109) | def update_balance(self, amount, acc_no):
method deduct_balance (line 115) | def deduct_balance(self, amount, acc_no):
method check_balance (line 126) | def check_balance(self, acc_no):
method list_all_customers (line 131) | def list_all_customers(self):
method delete_acc (line 135) | def delete_acc(self, acc_no):
method all_money (line 140) | def all_money(self):
method close (line 146) | def close(self):
FILE: bank_managment_system/frontend.py
function check_string_in_account_no (line 11) | def check_string_in_account_no(check_acc_no):
function create (line 17) | def create():
function search_acc (line 100) | def search_acc():
function show (line 119) | def show():
function add (line 186) | def add():
function withdraw (line 269) | def withdraw():
function check (line 362) | def check():
function update (line 440) | def update():
function allmembers (line 609) | def allmembers():
function delete (line 641) | def delete():
function page2 (line 693) | def page2():
function create_employee (line 746) | def create_employee():
function update_employee (line 816) | def update_employee():
function show_employee (line 1014) | def show_employee():
function Total_money (line 1055) | def Total_money():
function back_to_main (line 1086) | def back_to_main():
function page1 (line 1106) | def page1():
function employee_login (line 1190) | def employee_login():
function admin_login (line 1261) | def admin_login():
FILE: batch_file_rename.py
function batch_rename (line 17) | def batch_rename(work_dir, old_ext, new_ext):
function get_parser (line 39) | def get_parser():
function main (line 59) | def main():
FILE: binary search.py
function binarySearchAppr (line 1) | def binarySearchAppr(arr, start, end, x):
FILE: binarySTree isTrue_YashV1729.Java
class Node (line 6) | class Node
method Node (line 11) | public Node(int item)
class BinaryTree (line 18) | public class BinaryTree
method isBST (line 28) | boolean isBST() {
method isBSTUtil (line 35) | boolean isBSTUtil(Node node, int min, int max)
method main (line 53) | public static void main(String args[])
FILE: binary_search_tree.py
class Node (line 1) | class Node:
method __init__ (line 4) | def __init__(self, info):
method __str__ (line 11) | def __str__(self):
method __del__ (line 14) | def __del__(self):
class BinarySearchTree (line 18) | class BinarySearchTree:
method __init__ (line 21) | def __init__(self):
method insert (line 25) | def insert(self, val):
method search (line 49) | def search(self, val, to_delete=False):
method delete (line 69) | def delete(self, val):
method __str__ (line 143) | def __str__(self):
function is_bst (line 147) | def is_bst(node, lower_lim=None, upper_lim=None):
function postorder (line 162) | def postorder(node):
function inorder (line 173) | def inorder(node):
function preorder (line 184) | def preorder(node):
function bfs (line 196) | def bfs(node):
function preorder_itr (line 209) | def preorder_itr(node):
function inorder_itr (line 224) | def inorder_itr(node):
function postorder_itr (line 248) | def postorder_itr(node):
function bst_frm_pre (line 266) | def bst_frm_pre(pre_list):
function lca (line 291) | def lca(t_node, c1, c2):
function vertical_middle_level (line 306) | def vertical_middle_level(t_node):
function get_level (line 322) | def get_level(n, val):
function depth (line 337) | def depth(node):
FILE: binary_search_trees/delete_a_node_in_bst.py
function delete_node (line 7) | def delete_node(root: Node, val: int) -> Optional[Node]:
FILE: binary_search_trees/inorder_successor.py
function inorder_successor (line 4) | def inorder_successor(root: Node) -> Node:
FILE: binary_search_trees/inorder_traversal.py
function inorder (line 5) | def inorder(root: Optional[Node]) -> None:
FILE: binary_search_trees/insert_in_bst.py
function insert (line 5) | def insert(root: Optional[Node], val: int) -> Node:
FILE: binary_search_trees/main.py
function main (line 12) | def main() -> None:
FILE: binary_search_trees/mirror_a_bst.py
function create_mirror_bst (line 5) | def create_mirror_bst(root: Optional[Node]) -> Optional[Node]:
FILE: binary_search_trees/print_in_range.py
function print_in_range (line 5) | def print_in_range(root: Optional[Node], k1: int, k2: int) -> None:
FILE: binary_search_trees/root_to_leaf_paths.py
function print_root_to_leaf_paths (line 5) | def print_root_to_leaf_paths(root: Optional[Node], path: List[int]) -> N...
FILE: binary_search_trees/search_in_bst.py
function search (line 5) | def search(root: Optional[Node], val: int) -> bool:
FILE: binary_search_trees/tree_node.py
class Node (line 5) | class Node:
method __init__ (line 6) | def __init__(self, data: int) -> None:
FILE: binary_search_trees/validate_bst.py
function is_valid_bst (line 5) | def is_valid_bst(
FILE: binod.py
function checkBinod (line 22) | def checkBinod(file): # Trying to find Binod In File Insted Of Manohar ...
FILE: blackJackGUI.py
class Card (line 34) | class Card:
method __init__ (line 35) | def __init__(self, suit, rank):
method __str__ (line 44) | def __str__(self):
method get_suit (line 47) | def get_suit(self):
method get_rank (line 50) | def get_rank(self):
method draw (line 53) | def draw(self, canvas, pos):
function string_list_join (line 67) | def string_list_join(string, string_list):
class Hand (line 74) | class Hand:
method __init__ (line 75) | def __init__(self):
method __str__ (line 78) | def __str__(self):
method add_card (line 81) | def add_card(self, card):
method get_value (line 84) | def get_value(self):
method draw (line 99) | def draw(self, canvas, pos):
class Deck (line 106) | class Deck:
method __init__ (line 107) | def __init__(self):
method shuffle (line 110) | def shuffle(self):
method deal_card (line 113) | def deal_card(self):
method __str__ (line 116) | def __str__(self):
function deal (line 120) | def deal():
function stand (line 135) | def stand():
function hit (line 149) | def hit():
function draw (line 162) | def draw(canvas):
FILE: blackjack.py
function welcome (line 8) | def welcome():
function start_game (line 20) | def start_game():
FILE: bookstore_manangement_system.py
function DBZ (line 18) | def DBZ():
function separator (line 32) | def separator():
function end_separator (line 38) | def end_separator():
function login (line 43) | def login():
function ViewAll (line 75) | def ViewAll():
function CNB1 (line 89) | def CNB1():
function CNB2 (line 113) | def CNB2():
FILE: brickout-game/brickout-game.py
class Ball (line 41) | class Ball(object):
method __init__ (line 42) | def __init__(self, screen, radius, x, y):
method getXVel (line 53) | def getXVel(self):
method getYVel (line 56) | def getYVel(self):
method draw (line 59) | def draw(self):
method update (line 65) | def update(self, paddle, brickwall):
class Paddle (line 110) | class Paddle(object):
method __init__ (line 111) | def __init__(self, screen, width, height, x, y):
method draw (line 121) | def draw(self):
method update (line 129) | def update(self):
class Brick (line 144) | class Brick(pygame.sprite.Sprite):
method __init__ (line 145) | def __init__(self, screen, width, height, x, y):
method draw (line 156) | def draw(self):
method add (line 168) | def add(self, group):
method remove (line 175) | def remove(self, group):
method alive (line 182) | def alive(self):
method collide (line 189) | def collide(self, ball):
class BrickWall (line 220) | class BrickWall(pygame.sprite.Group):
method __init__ (line 221) | def __init__(self, screen, x, y, width, height):
method add (line 238) | def add(self, brick):
method remove (line 244) | def remove(self, brick):
method draw (line 250) | def draw(self):
method update (line 258) | def update(self, ball):
method hasWin (line 271) | def hasWin(self):
method collide (line 277) | def collide(self, ball):
FILE: calc_area.py
function main (line 4) | def main():
FILE: calculator-gui.py
class Inside (line 10) | class Inside:
method __init__ (line 11) | def __init__(self, parent):
method output_box (line 28) | def output_box(self):
method press_7 (line 40) | def press_7(self):
method press_8 (line 48) | def press_8(self):
method press_9 (line 56) | def press_9(self):
method press_4 (line 64) | def press_4(self):
method press_5 (line 72) | def press_5(self):
method press_6 (line 80) | def press_6(self):
method press_1 (line 88) | def press_1(self):
method press_2 (line 96) | def press_2(self):
method press_3 (line 104) | def press_3(self):
method press_0 (line 112) | def press_0(self):
method press_clear (line 121) | def press_clear(self):
method press_reset (line 124) | def press_reset(self):
method press_plus (line 127) | def press_plus(self):
method press_min (line 137) | def press_min(self):
method press_mul (line 147) | def press_mul(self):
method press_div (line 157) | def press_div(self):
method press_equal (line 169) | def press_equal(self):
method cal_buttons (line 203) | def cal_buttons(self):
class Main (line 381) | class Main(tk.Tk):
method __init__ (line 382) | def __init__(self, *args, **kwargs):
method geometry_settings (line 391) | def geometry_settings(self):
FILE: calculator.py
function calc (line 33) | def calc(term):
function result (line 91) | def result(term):
function main (line 101) | def main():
FILE: cartesian_product.py
function cartesian_product (line 7) | def cartesian_product(list1, list2):
FILE: changemac.py
function cret (line 11) | def cret(command):
function randmac (line 17) | def randmac():
function retrandmac (line 28) | def retrandmac(mac):
FILE: chaos.py
function main (line 4) | def main():
FILE: check whether the string is Symmetrical or Palindrome.py
function palindrome (line 1) | def palindrome(a):
function symmetry (line 22) | def symmetry(a):
FILE: check_file.py
function usage (line 20) | def usage():
function readfile (line 25) | def readfile(filename):
function main (line 34) | def main():
FILE: check_for_sqlite_files.py
function isSQLite3 (line 16) | def isSQLite3(filename):
FILE: check_input.py
function get_user_input (line 1) | def get_user_input(start, end):
FILE: check_internet_con.py
function checkInternetConnectivity (line 12) | def checkInternetConnectivity():
FILE: check_prime.py
function is_prime_a (line 11) | def is_prime_a(n):
function is_prime_b (line 21) | def is_prime_b(n):
function is_prime_c (line 33) | def is_prime_c(n):
FILE: chicks_n_rabs.py
function solve (line 11) | def solve(num_heads, num_legs):
FILE: classicIndianCardMatch.py
class card (line 23) | class card:
method __init__ (line 24) | def __init__(self, suit, rank):
method __str__ (line 33) | def __str__(self):
method getRank (line 36) | def getRank(self):
method getSuit (line 39) | def getSuit(self):
class deck (line 43) | class deck:
method __init__ (line 44) | def __init__(self):
method shuffle (line 47) | def shuffle(self):
method dealCard (line 50) | def dealCard(self):
method __str__ (line 53) | def __str__(self):
FILE: cli_master/cli_master.py
class Validation (line 21) | class Validation:
method phone_validation (line 23) | def phone_validation(answer, current):
method email_validation (line 28) | def email_validation(answer, current):
method password_validation (line 32) | def password_validation(answer, current):
method username_validation (line 36) | def username_validation():
method fname_validation (line 40) | def fname_validation(answer, current):
method lname_validation (line 45) | def lname_validation(answer, current):
method country_validation (line 50) | def country_validation(answer, current):
method state_validation (line 57) | def state_validation(answer, current):
method city_validation (line 63) | def city_validation(answer, current):
method password_confirmation (line 69) | def password_confirmation(answer, current):
method address_validation (line 73) | def address_validation(answer, current):
method login_username (line 77) | def login_username(answer, current):
method login_password (line 82) | def login_password(answer, current):
FILE: cli_master/validation_page.py
function phone_validation (line 4) | def phone_validation(phone_number):
function email_validation (line 18) | def email_validation(email):
function password_validation (line 32) | def password_validation(password):
function username_validation (line 45) | def username_validation(username):
function country_validation (line 58) | def country_validation(country):
FILE: cloning_a_list.py
function Cloning (line 3) | def Cloning(li1):
FILE: communication/file.py
function slice (line 9) | def slice(mink, maxk):
function pi (line 16) | def pi(n):
FILE: communication/pipe.py
function slice (line 10) | def slice(mink, maxk):
function pi (line 17) | def pi(n):
FILE: communication/socket_conn.py
function slice (line 11) | def slice(mink, maxk):
function pi (line 18) | def pi(n):
FILE: compass_code.py
function degree_to_direction (line 1) | def degree_to_direction(deg):
FILE: consonant.py
function count_con (line 16) | def count_con(string):
FILE: convert_time.py
function convert_time (line 6) | def convert_time(input_str):
FILE: convert_wind_direction_to_degrees.py
function degrees_to_compass (line 1) | def degrees_to_compass(degrees):
FILE: create password validity in python.py
function IInd_func (line 6) | def IInd_func():
FILE: cricket_news.py
function speak (line 10) | def speak(audio):
FILE: currency converter/main.py
function getVal (line 11) | def getVal(cont1, cont2):
function main (line 45) | def main():
function changeBtn (line 49) | def changeBtn():
FILE: daily_checks.py
function clear_screen (line 23) | def clear_screen(): # Function to clear the screen
function print_docs (line 30) | def print_docs(): # Function to print the daily checks automatically
function putty_sessions (line 43) | def putty_sessions(conffilename): # Function to load the putty sessions...
function rdp_sessions (line 50) | def rdp_sessions():
function euroclear_docs (line 57) | def euroclear_docs():
function main (line 71) | def main():
FILE: daily_horoscope.py
function check_sign (line 11) | def check_sign():
function horoscope (line 66) | def horoscope(zodiac_sign: int, day: str) -> str:
FILE: days_from_date.py
function process_date (line 11) | def process_date(user_input):
function find_day (line 17) | def find_day(date):
function printt (line 29) | def printt():
FILE: decimal to binary.py
function decimalToBinary (line 1) | def decimalToBinary(num):
FILE: depreciated_programs/corona_cases.py
function world (line 31) | def world():
function india (line 46) | def india():
function choices (line 79) | def choices():
FILE: diamond.py
function draw_diamond (line 1) | def draw_diamond(n):
FILE: dice.py
class Die (line 3) | class Die:
method __init__ (line 11) | def __init__(self, sides=6):
method set_sides (line 16) | def set_sides(self, num_sides):
method roll (line 30) | def roll(self):
FILE: diceV2_dynamic.py
class Dice (line 5) | class Dice:
method __init__ (line 6) | def __init__(self):
method setSides (line 9) | def setSides(self, sides):
method roll (line 18) | def roll(self):
function checkInput (line 27) | def checkInput(sides):
function pickNumber (line 44) | def pickNumber(item, question_string, lower_limit):
function getDices (line 57) | def getDices():
function output (line 81) | def output():
FILE: dice_rolling_simulator.py
function start (line 22) | def start():
function bye (line 31) | def bye():
function result (line 36) | def result():
function dice6 (line 61) | def dice6():
function dice8 (line 69) | def dice8():
function dice12 (line 76) | def dice12():
function user_exit_checker (line 83) | def user_exit_checker():
FILE: diction.py
function speak (line 12) | def speak(audio):
function takeCommand (line 17) | def takeCommand():
function translate (line 39) | def translate(word):
FILE: digital_clock.py
function def_time (line 26) | def def_time():
function dig_clock (line 53) | def dig_clock():
FILE: dir_test.py
function main (line 19) | def main():
FILE: encrypter-decrypter-gui.py
class Main (line 11) | class Main(tk.Tk):
method __init__ (line 12) | def __init__(self, *args, **kwargs):
method geometry_settings (line 18) | def geometry_settings(self):
class Notebook (line 32) | class Notebook:
method __init__ (line 33) | def __init__(self, parent):
method page1_inside (line 145) | def page1_inside(self):
method encrypt_now (line 172) | def encrypt_now(self):
method page2_inside (line 185) | def page2_inside(self):
method decrypt_now (line 211) | def decrypt_now(self):
method backend_work (line 222) | def backend_work(self, todo, text_coming):
FILE: encrypter_decrypter_gui.py
class Main (line 11) | class Main(tk.Tk):
method __init__ (line 12) | def __init__(self, *args, **kwargs):
method geometry_settings (line 18) | def geometry_settings(self):
class Notebook (line 32) | class Notebook:
method __init__ (line 33) | def __init__(self, parent):
method page1_inside (line 145) | def page1_inside(self):
method encrypt_now (line 172) | def encrypt_now(self):
method page2_inside (line 185) | def page2_inside(self):
method decrypt_now (line 211) | def decrypt_now(self):
method backend_work (line 222) | def backend_work(self, todo, text_coming):
FILE: encryptsys.py
function decrypt (line 5) | def decrypt():
function encrypt (line 39) | def encrypt():
FILE: ex20.py
function print_all (line 6) | def print_all(f):
function rewind (line 11) | def rewind(f):
function print_a_line (line 15) | def print_a_line(line_count, f):
FILE: facebook id hack.py
function create_form (line 26) | def create_form():
function function (line 39) | def function(email, passw, i):
FILE: facebook-autologin-bot.py
function welcome (line 11) | def welcome():
function speak (line 22) | def speak(text):
FILE: factorial_perm_comp.py
function factorial (line 12) | def factorial(n):
function permutation (line 21) | def permutation(n, r):
function combination (line 25) | def combination(n, r):
function main (line 29) | def main():
FILE: fastapi.py
class Course (line 12) | class Course(BaseModel):
function read_root (line 21) | def read_root():
function get_courses (line 27) | def get_courses():
function get_a_course (line 33) | def get_a_course(course_id: int):
function add_course (line 40) | def add_course(course: Course):
function delete_course (line 47) | def delete_course(course_id: int):
FILE: fetch_news.py
function fetch_bbc_news (line 6) | def fetch_bbc_news(bbc_news_api_key: str) -> None:
FILE: fibonacci.py
function getFibonacciIterative (line 7) | def getFibonacciIterative(n: int) -> int:
function getFibonacciRecursive (line 21) | def getFibonacciRecursive(n: int) -> int:
function getFibonacciDynamic (line 39) | def getFibonacciDynamic(n: int, fib: list) -> int:
function main (line 52) | def main():
function compareFibonacciCalculators (line 58) | def compareFibonacciCalculators(n: int) -> None:
FILE: file_ext_changer.py
function chxten_ (line 9) | def chxten_(files, xten):
FILE: file_handle/File handle binary/Update a binary file2.py
function update (line 15) | def update():
FILE: file_handle/File handle binary/delete.py
function b_read (line 14) | def b_read():
function b_modify (line 28) | def b_modify():
FILE: file_handle/File handle binary/question 1 (elegible for remedial, top marks).py
function remcount (line 32) | def remcount():
function firstmark (line 49) | def firstmark():
FILE: file_handle/File handle binary/read.py
function binary_read (line 4) | def binary_read():
FILE: file_handle/File handle binary/search record in binary file.py
function search (line 7) | def search():
FILE: file_handle/File handle binary/update2.py
function update (line 10) | def update():
FILE: file_handle/File handle text/counter.py
class Counter (line 22) | class Counter:
method __init__ (line 23) | def __init__(self, text: str) -> None:
method compute (line 30) | def compute(self) -> None:
method get_total_lower (line 37) | def get_total_lower(self) -> int:
method get_total_upper (line 40) | def get_total_upper(self) -> int:
method get_total_chars (line 43) | def get_total_chars(self) -> int:
FILE: file_handle/File handle text/file handle 12 length of line in text file.py
function write_to_file (line 9) | def write_to_file(file_name):
function longlines (line 23) | def longlines():
FILE: file_handle/File handle text/question 2.py
function display_words (line 9) | def display_words(file_path):
FILE: file_handle/File handle text/question 5.py
function lowercase (line 19) | def lowercase(file_path):
FILE: file_handle/File handle text/question 6.py
function lowercase (line 7) | def lowercase():
FILE: file_handle/File handle text/question3.py
function write_to_file (line 14) | def write_to_file(file_name):
function check_first_letter (line 29) | def check_first_letter():
FILE: find_cube_root.py
function cubeRoot (line 7) | def cubeRoot():
FILE: find_prime.py
function find_prime (line 31) | def find_prime(num):
FILE: finding LCM.py
function compute_lcm (line 4) | def compute_lcm(x, y):
FILE: flappyBird_pygame/flappy_bird.py
class Bird (line 23) | class Bird(pygame.sprite.Sprite):
method __init__ (line 30) | def __init__(self, x, y, ms_to_up, images):
method update (line 38) | def update(self, delta_frames=1):
method image (line 51) | def image(self):
method mask (line 59) | def mask(self):
method rect (line 67) | def rect(self):
class PipePair (line 72) | class PipePair(pygame.sprite.Sprite):
method __init__ (line 77) | def __init__(self, pipe_end_img, pipe_body_img):
method top_height_px (line 117) | def top_height_px(self):
method bottom_height_px (line 122) | def bottom_height_px(self):
method visible (line 126) | def visible(self):
method rect (line 131) | def rect(self):
method update (line 135) | def update(self, delta_frames=1):
method collides_with (line 138) | def collides_with(self, bird):
function load_images (line 142) | def load_images():
function frames_to_msec (line 160) | def frames_to_msec(frames, fps=FPS):
function msec_to_frames (line 164) | def msec_to_frames(milliseconds, fps=FPS):
function main (line 175) | def main():
FILE: floodfill/floodfill.py
class FloodFill (line 10) | class FloodFill:
method __init__ (line 11) | def __init__(self, window_width, window_height):
method generateClosedPolygons (line 25) | def generateClosedPolygons(self):
method run (line 56) | def run(self):
method update (line 71) | def update(self, events):
method inBounds (line 120) | def inBounds(self, coord):
FILE: four_digit_num_combination.py
function four_digit_combinations (line 5) | def four_digit_combinations():
function one_line_combinations (line 15) | def one_line_combinations():
FILE: ftp_send_receive.py
function receive_file (line 23) | def receive_file(filename="example.txt"):
function send_file (line 35) | def send_file(filename="example.txt"):
FILE: game_of_life/05_mixed_sorting.py
function mixed_sorting (line 28) | def mixed_sorting(nums):
class TestMixedSorting (line 62) | class TestMixedSorting(unittest.TestCase):
method test_1 (line 63) | def test_1(self):
method test_2 (line 66) | def test_2(self):
FILE: game_of_life/game_o_life.py
function create_canvas (line 48) | def create_canvas(size):
function seed (line 53) | def seed(canvas):
function run (line 59) | def run(canvas):
function __judge_point (line 83) | def __judge_point(pt, neighbours):
FILE: generate_permutations.py
function generate (line 1) | def generate(A, k):
FILE: get_crypto_price.py
function getprice (line 4) | def getprice(symbol, exchange_id):
FILE: google.py
function main (line 18) | def main():
FILE: googleweb.py
function SearchResults (line 11) | def SearchResults():
FILE: gstin_scraper.py
function get_company_list (line 32) | def get_company_list():
function fetch_gstins (line 44) | def fetch_gstins(company_name, csrf_token):
function main (line 61) | def main():
FILE: gui_calculator.py
function calc1 (line 11) | def calc1():
function calc2 (line 18) | def calc2():
function calc3 (line 25) | def calc3():
function calc4 (line 32) | def calc4():
function calc5 (line 39) | def calc5():
function calc6 (line 46) | def calc6():
function calc7 (line 53) | def calc7():
function calc8 (line 60) | def calc8():
function calc9 (line 67) | def calc9():
function calc0 (line 74) | def calc0():
function add (line 86) | def add():
function subtract (line 93) | def subtract():
function get (line 100) | def get():
function equals (line 104) | def equals():
function cls (line 126) | def cls():
function multiply (line 132) | def multiply():
function divide (line 139) | def divide():
FILE: hamming-numbers.py
function hamming (line 8) | def hamming(n_element: int) -> list:
FILE: happy_num.py
function isHappyNumber (line 4) | def isHappyNumber(num):
FILE: heap_sort.py
function refineHeap (line 7) | def refineHeap(arr, n, i):
function heapSort (line 30) | def heapSort(arr):
FILE: image2pdf/image2pdf.py
class image2pdf (line 5) | class image2pdf:
method __init__ (line 6) | def __init__(self):
method getUserDir (line 13) | def getUserDir(self):
method filter (line 27) | def filter(self, item):
method sortFiles (line 30) | def sortFiles(self):
method getPictures (line 33) | def getPictures(self):
method selectPictures (line 43) | def selectPictures(self, pictures):
method convertPictures (line 69) | def convertPictures(self):
method save (line 112) | def save(self, image=None, title="All-PDFs", isMergeAll=True):
FILE: image_compressor.py
function compress_image (line 5) | def compress_image(image_path, quality=60):
FILE: inheritance_YahV1729.py
class Person (line 7) | class Person(object):
method __init__ (line 9) | def __init__(self, name):
method getName (line 13) | def getName(self):
method isEmployee (line 17) | def isEmployee(self):
class Employee (line 22) | class Employee(Person):
method isEmployee (line 24) | def isEmployee(self):
FILE: insertion_sort.py
function input_list (line 6) | def input_list():
function insertion_sort (line 14) | def insertion_sort(list, n):
function insertion_sort_desc (line 37) | def insertion_sort_desc(list, n):
FILE: insta_monitering/insta_api.py
class StartHandlerinsta (line 18) | class StartHandlerinsta(tornado.web.RequestHandler):
method background_task (line 22) | def background_task(self, user, tags, type, productId):
method get (line 29) | def get(self):
class StopHandlerinsta (line 53) | class StopHandlerinsta(tornado.web.RequestHandler):
method get (line 54) | def get(self):
class StatusHandlerinsta (line 77) | class StatusHandlerinsta(tornado.web.RequestHandler):
method get (line 78) | def get(self):
class SenderHandlerinstaLess (line 115) | class SenderHandlerinstaLess(tornado.web.RequestHandler):
method get (line 116) | def get(self):
class SenderHandlerinstaGreater (line 132) | class SenderHandlerinstaGreater(tornado.web.RequestHandler):
method get (line 133) | def get(self):
FILE: insta_monitering/insta_datafetcher.py
class PorxyApplyingDecorator (line 27) | class PorxyApplyingDecorator(object):
method __init__ (line 28) | def __init__(self):
method __call__ (line 34) | def __call__(self, function_to_call_for_appling_proxy):
function dataprocess (line 55) | async def dataprocess(htmldata):
function datapullpost (line 78) | async def datapullpost(future, url):
class MoniteringClass (line 105) | class MoniteringClass:
method __init__ (line 106) | def __init__(self, user, tags, type, productId):
method _dataProcessing (line 119) | def _dataProcessing(self, data):
method _insertFunction (line 157) | def _insertFunction(self, record):
method _lastProcess (line 167) | def _lastProcess(self, userdata, media_post, top_post):
method request_data_from_instagram (line 199) | def request_data_from_instagram(self):
method __del__ (line 232) | def __del__(self):
function hashtags (line 236) | def hashtags(user, tags, type, productId):
class theradPorcess (line 245) | class theradPorcess(multiprocessing.Process):
method __init__ (line 246) | def __init__(self, user, tags, type, productId):
method run (line 257) | def run(self):
class InstaPorcessClass (line 267) | class InstaPorcessClass:
method _dbProcessReader (line 268) | def _dbProcessReader(self, user, tags, productId):
method _processstart (line 290) | def _processstart(self, user, tags, productId):
method startprocess (line 306) | def startprocess(self, user, tags, type, productId):
method deletProcess (line 323) | def deletProcess(self, user, tags, productId):
method statusCheck (line 341) | def statusCheck(self, user, tags, productId):
class DBDataFetcher (line 363) | class DBDataFetcher:
method __init__ (line 364) | def __init__(self, user, tags, type, productId):
method dbFetcher (line 373) | def dbFetcher(self, limit=20):
method DBFetcherGreater (line 386) | def DBFetcherGreater(self, limit, date):
method DBFetcherLess (line 417) | def DBFetcherLess(self, limit, date):
method __del__ (line 443) | def __del__(self):
function main (line 447) | def main():
FILE: insta_monitering/subpinsta.py
function instasubprocess (line 7) | def instasubprocess(user, tags, type, productId):
FILE: is_number.py
function check_number (line 12) | def check_number(input_value: Any) -> str:
FILE: kmp_str_search.py
function kmp (line 12) | def kmp(pattern, text, len_p=None, len_t=None):
FILE: lcm.py
function lcm (line 1) | def lcm(x, y):
FILE: levenshtein_distance.py
function levenshtein_dis (line 1) | def levenshtein_dis(wordA, wordB):
FILE: linear search.py
function linearsearch (line 4) | def linearsearch(arr, x):
FILE: linear-algebra-python/src/Transformations2D.py
function scaling (line 8) | def scaling(scaling_factor):
function rotation (line 12) | def rotation(angle):
function projection (line 24) | def projection(angle):
function reflection (line 36) | def reflection(angle):
FILE: linear-algebra-python/src/lib.py
class Vector (line 27) | class Vector(object):
method __init__ (line 48) | def __init__(self, components):
method set (line 55) | def set(self, components):
method __str__ (line 66) | def __str__(self):
method component (line 81) | def component(self, i):
method size (line 91) | def size(self):
method eulidLength (line 97) | def eulidLength(self):
method __add__ (line 106) | def __add__(self, other):
method __sub__ (line 121) | def __sub__(self, other):
method __mul__ (line 136) | def __mul__(self, other):
method copy (line 155) | def copy(self):
method changeComponent (line 162) | def changeComponent(self, pos, value):
method norm (line 172) | def norm(self):
method __eq__ (line 182) | def __eq__(self, other):
function zeroVector (line 198) | def zeroVector(dimension):
function unitBasisVector (line 210) | def unitBasisVector(dimension, pos):
function axpy (line 226) | def axpy(scalar, x, y):
function randomVector (line 241) | def randomVector(N, a, b):
class Matrix (line 255) | class Matrix(object):
method __init__ (line 273) | def __init__(self, matrix, w, h):
method __str__ (line 282) | def __str__(self):
method changeComponent (line 297) | def changeComponent(self, x, y, value):
method component (line 306) | def component(self, x, y):
method width (line 315) | def width(self):
method height (line 321) | def height(self):
method __mul__ (line 327) | def __mul__(self, other):
method __add__ (line 356) | def __add__(self, other):
method __sub__ (line 371) | def __sub__(self, other):
method __eq__ (line 386) | def __eq__(self, other):
function squareZeroMatrix (line 402) | def squareZeroMatrix(N):
function randomMatrix (line 415) | def randomMatrix(W, H, a, b):
FILE: linear-algebra-python/src/tests.py
class Test (line 17) | class Test(unittest.TestCase):
method test_component (line 18) | def test_component(self):
method test_str (line 31) | def test_str(self):
method test_size (line 38) | def test_size(self):
method test_euclidLength (line 45) | def test_euclidLength(self):
method test_add (line 52) | def test_add(self):
method test_sub (line 62) | def test_sub(self):
method test_mul (line 72) | def test_mul(self):
method test_zeroVector (line 82) | def test_zeroVector(self):
method test_unitBasisVector (line 88) | def test_unitBasisVector(self):
method test_axpy (line 94) | def test_axpy(self):
method test_copy (line 102) | def test_copy(self):
method test_changeComponent (line 110) | def test_changeComponent(self):
method test_str_matrix (line 119) | def test_str_matrix(self):
method test__mul__matrix (line 123) | def test__mul__matrix(self):
method test_changeComponent_matrix (line 129) | def test_changeComponent_matrix(self):
method test_component_matrix (line 134) | def test_component_matrix(self):
method test__add__matrix (line 138) | def test__add__matrix(self):
method test__sub__matrix (line 143) | def test__sub__matrix(self):
method test_squareZeroMatrix (line 148) | def test_squareZeroMatrix(self):
method test_norm_vector (line 154) | def test_norm_vector(self):
method test__eq__vector (line 159) | def test__eq__vector(self):
method test__eq__matrix (line 165) | def test__eq__matrix(self):
FILE: live_sketch.py
function sketch (line 4) | def sketch(image):
FILE: loader.py
function animate (line 17) | def animate(message="loading", endmessage="Done!"):
FILE: local_weighted_learning/local_weighted_learning.py
function weighted_matrix (line 7) | def weighted_matrix(point: np.mat, training_data_x: np.mat, bandwidth: f...
function local_weight (line 27) | def local_weight(
function local_weight_regression (line 41) | def local_weight_regression(
function load_data (line 58) | def load_data(dataset_name: str, cola_name: str, colb_name: str) -> np.mat:
function get_preds (line 80) | def get_preds(training_data: np.mat, mcol_b: np.mat, tau: float) -> np.n...
function plot_preds (line 88) | def plot_preds(
FILE: login.py
function logo (line 7) | def logo():
function login (line 25) | def login():
FILE: longest_increasing_subsequence_length.py
function lis (line 7) | def lis(a):
FILE: love_turtle.py
function heart_red (line 4) | def heart_red():
FILE: luhn_algorithm_for_credit_card_validation.py
function verify_card_number (line 11) | def verify_card_number(card_number):
function main (line 30) | def main():
FILE: magic8ball.py
function get_user_name (line 31) | def get_user_name():
function display_greeting (line 37) | def display_greeting(name):
function magic_8_ball (line 41) | def magic_8_ball():
function try_again (line 48) | def try_again():
FILE: magic_8_ball.py
function get_user_name (line 31) | def get_user_name():
function display_greeting (line 37) | def display_greeting(name):
function magic_8_ball (line 41) | def magic_8_ball():
function try_again (line 48) | def try_again():
FILE: meme_maker.py
function input_par (line 6) | def input_par():
function main (line 17) | def main():
FILE: memorygame.py
function square (line 11) | def square(x, y):
function index (line 24) | def index(x, y):
function xy (line 29) | def xy(count):
function tap (line 34) | def tap(x, y):
function draw (line 47) | def draw():
FILE: merge.py
function merge (line 14) | def merge():
function main (line 41) | def main():
FILE: missing number from list.py
function missing_number (line 4) | def missing_number(num_list):
FILE: mobilePhoneSpecsScrapper.py
class Phonearena (line 11) | class Phonearena:
method __init__ (line 12) | def __init__(self):
method crawl_html_page (line 23) | def crawl_html_page(self, sub_url):
method crawl_phone_urls (line 41) | def crawl_phone_urls(self):
method crawl_phones_models_specification (line 53) | def crawl_phones_models_specification(self, li):
FILE: multiplication_table.py
function table (line 20) | def table(rows, columns):
FILE: nDigitNumberCombinations.py
function nDigitCombinations (line 2) | def nDigitCombinations(n):
FILE: new_pattern.py
function main (line 1) | def main():
function pattern (line 18) | def pattern(lines: int) -> str:
FILE: news_oversimplifier.py
function main (line 13) | def main():
function word_count (line 73) | def word_count(text): # pytest in test file
function summarize_text (line 86) | def summarize_text(text, ratio=0.6): # pytest in test file
function capitalize_title (line 104) | def capitalize_title(title): # pytest in test file
function fetch_news (line 117) | def fetch_news(api_key, query, max_articles=5): # no pytest
function save_summary (line 140) | def save_summary(title, summary, path="summaries.txt"): # no pytest
FILE: nitkarshchourasia/to_sort/GUI_apps/tkinter_apps/counter_app/counter_app.py
class MyApplication (line 9) | class MyApplication:
method __init__ (line 12) | def __init__(self, master):
method create_widgets (line 23) | def create_widgets(self):
method on_add_click (line 45) | def on_add_click(self):
method on_remove_click (line 54) | def on_remove_click(self):
FILE: nitkarshchourasia/to_sort/GUI_apps/tkinter_apps/hello_world_excla_increment_app/hello_world_incre_decre_(!).py
class MyApplication (line 5) | class MyApplication:
method __init__ (line 6) | def __init__(self, master):
method create_widgets (line 13) | def create_widgets(self):
method on_button_click (line 31) | def on_button_click(self):
method on_remove_click (line 38) | def on_remove_click(self):
FILE: nitkarshchourasia/to_sort/GUI_apps/tkinter_apps/simple_calc_GUI/simple_calculator_GUI.py
function start_reloader (line 19) | def start_reloader():
function press (line 26) | def press(num):
function equalpress (line 43) | def equalpress():
function clear_func (line 81) | def clear_func():
function close_app (line 88) | def close_app():
function main (line 95) | def main():
class Metadata (line 338) | class Metadata:
method __init__ (line 339) | def __init__(self):
method display_author_info (line 363) | def display_author_info(self):
method display_project_info (line 370) | def display_project_info(self):
method display_edit_info (line 377) | def display_edit_info(self):
method open_github_profile (line 389) | def open_github_profile(self) -> None:
FILE: nitkarshchourasia/to_sort/JARVIS_python_bot/JARVIS_2.0.py
function speak (line 57) | def speak(audio):
function speak_news (line 62) | def speak_news():
function sendEmail (line 77) | def sendEmail(to, content):
function ask_gpt3 (line 96) | def ask_gpt3(que):
function wishme (line 112) | def wishme():
function takecommand (line 125) | def takecommand():
function voice (line 145) | def voice(p):
function on_press (line 154) | def on_press(key):
function on_release (line 169) | def on_release(key):
function get_app (line 226) | def get_app(Q):
FILE: nitkarshchourasia/to_sort/JARVIS_python_bot/check_internet_con.py
function checkInternetConnectivity (line 12) | def checkInternetConnectivity():
FILE: nitkarshchourasia/to_sort/determine_sign.py
class DetermineSign (line 12) | class DetermineSign:
method __init__ (line 13) | def __init__(self, num=None):
method convert_to_float (line 23) | def convert_to_float(self, input_value):
method get_number (line 36) | def get_number(self):
method determine_sign (line 43) | def determine_sign(self):
method __repr__ (line 51) | def __repr__(self):
FILE: nitkarshchourasia/to_sort/django_projects/ToDo_webapp/manage.py
function main (line 8) | def main():
FILE: nitkarshchourasia/to_sort/django_projects/ToDo_webapp/todo/apps.py
class TodoConfig (line 4) | class TodoConfig(AppConfig):
FILE: nitkarshchourasia/to_sort/django_projects/ToDo_webapp/todo/forms.py
class TodoForm (line 5) | class TodoForm(forms.ModelForm):
class Meta (line 6) | class Meta:
FILE: nitkarshchourasia/to_sort/django_projects/ToDo_webapp/todo/migrations/0001_initial.py
class Migration (line 7) | class Migration(migrations.Migration):
FILE: nitkarshchourasia/to_sort/django_projects/ToDo_webapp/todo/models.py
class Todo (line 7) | class Todo(models.Model):
method __str__ (line 12) | def __str__(self) -> str:
FILE: nitkarshchourasia/to_sort/django_projects/ToDo_webapp/todo/views.py
function index (line 12) | def index(request):
function remove (line 32) | def remove(request, item_id):
FILE: nitkarshchourasia/to_sort/one_rep_max_calculator/one_rep_max_calculator.py
class OneRepMaxCalculator (line 1) | class OneRepMaxCalculator:
method __init__ (line 6) | def __init__(self):
method get_user_input (line 13) | def get_user_input(self):
method calculate_one_rep_max (line 20) | def calculate_one_rep_max(self):
method display_one_rep_max (line 26) | def display_one_rep_max(self):
function main (line 34) | def main():
FILE: nitkarshchourasia/to_sort/one_rep_max_calculator/one_rep_max_calculator_gui.py
class OneRepMaxCalculator (line 4) | class OneRepMaxCalculator:
method __init__ (line 29) | def __init__(self):
method calculate_1rm (line 50) | def calculate_1rm(self):
method display_result (line 56) | def display_result(self):
method run (line 61) | def run(self):
FILE: nitkarshchourasia/to_sort/pdf_to_docx_converter/pdf_to_docx.py
function convert_pdf_to_docx (line 6) | def convert_pdf_to_docx(pdf_file_path, docx_file_path):
FILE: nitkarshchourasia/to_sort/word2number/word2number.py
function word_to_number (line 1) | def word_to_number(word):
FILE: nmap_scan.py
function nmapScan (line 17) | def nmapScan(tgtHost, tgtPort): # Create the function, this fucntion do...
function main (line 24) | def main(): # Main Program
FILE: nodepad/notepad.py
function vp_start_gui (line 24) | def vp_start_gui():
function create_Notepads_managment (line 37) | def create_Notepads_managment(root, *args, **kwargs):
function destroy_Notepads_managment (line 47) | def destroy_Notepads_managment():
class Notepads_managment (line 53) | class Notepads_managment:
method __init__ (line 54) | def __init__(self, top=None):
FILE: notepad/notepad_support.py
function delete_button (line 35) | def delete_button(p1):
function create_button (line 51) | def create_button(p1):
function add_button (line 70) | def add_button(p1):
function back_button (line 86) | def back_button(p1):
function clear_button (line 98) | def clear_button(p1):
function exit_button (line 106) | def exit_button(p1):
function search_button (line 114) | def search_button(p1):
function next_button (line 133) | def next_button(p1):
function init (line 146) | def init(top, gui, *args, **kwargs):
function destroy_window (line 153) | def destroy_window():
FILE: number guessing.py
function show_score (line 6) | def show_score():
function start_game (line 13) | def start_game():
FILE: numberguessinggame/index.py
function number_guessing_game (line 4) | def number_guessing_game():
FILE: numeric_password_cracker.py
function generate_password_permutations (line 4) | def generate_password_permutations(length):
function password_cracker (line 12) | def password_cracker(target_password, max_length=8):
FILE: osinfo.py
class bcolors (line 34) | class bcolors:
FILE: palindrome.py
function is_palindrome (line 1) | def is_palindrome(text):
FILE: password guessing.py
function guess_password_simulation (line 26) | def guess_password_simulation(password: str) -> str:
FILE: password_checker.py
function IInd_func (line 6) | def IInd_func():
FILE: password_checker_code.py
function check_password_strength (line 3) | def check_password_strength(password):
FILE: password_cracker.py
function testPass (line 24) | def testPass(cryptPass): # Start the function
function main (line 37) | def main():
FILE: password_manager.py
function get_password (line 18) | def get_password(service_):
function add_password (line 27) | def add_password(service_, username_, password_):
function update_password (line 41) | def update_password(service_, password_):
function delete_service (line 54) | def delete_service(service_):
function get_all (line 61) | def get_all():
function is_service_present (line 74) | def is_service_present(service_):
FILE: password_programs_multiple/passwordGenerator.py
function generate_password (line 8) | def generate_password():
FILE: personal_translator.py
function text_translator (line 17) | def text_translator(Text):
function eng2punj_translator (line 36) | def eng2punj_translator(Text): # english to punjabi translator
function eng2beng_translator (line 45) | def eng2beng_translator(Text): # english to bengali translator
FILE: photo_timestamp_renamer.py
function is_photo (line 37) | def is_photo(p: Path) -> bool:
function sanitize_prefix (line 41) | def sanitize_prefix(s: str) -> str:
function exif_datetime_original (line 49) | def exif_datetime_original(path: Path) -> datetime | None:
function file_mtime (line 88) | def file_mtime(path: Path) -> datetime:
function unique_name (line 92) | def unique_name(dest_dir: Path, base: str, ext: str) -> Path:
class Options (line 108) | class Options:
function already_formatted (line 116) | def already_formatted(name: str) -> bool:
function gather_photos (line 122) | def gather_photos(folder: Path, recursive: bool) -> list[Path]:
function rename_photos (line 128) | def rename_photos(opts: Options) -> int:
function main (line 168) | def main(argv: list[str]) -> int:
FILE: portscanner.py
function connScan (line 18) | def connScan(tgtHost, tgtPort): # Start of the function
function portScan (line 35) | def portScan(tgtHost, tgtPorts): # Start of the function
function main (line 52) | def main():
FILE: power_of_n.py
function binaryExponentiation (line 7) | def binaryExponentiation(x: float, n: int) -> float:
FILE: powerdown_startup.py
function windows (line 16) | def windows(): # This is the function to run if it detects the OS is wi...
function linux (line 38) | def linux():
FILE: powerup_checks.py
function windows (line 43) | def windows(): # This is the function to run if it detects the OS is wi...
function linux (line 62) | def linux(): # This is the function to run if it detects the OS is nix.
function get_servers (line 81) | def get_servers(query): # Function to get the servers from the database
function main (line 98) | def main(): # Main Function
FILE: primelib/primelib.py
function pi (line 43) | def pi(maxK=70, prec=1008, disp=1007):
function isPrime (line 64) | def isPrime(number):
function sieveEr (line 93) | def sieveEr(N):
function getPrimeNumbers (line 126) | def getPrimeNumbers(N):
function primeFactorization (line 153) | def primeFactorization(number):
function greatestPrimeFactor (line 194) | def greatestPrimeFactor(number):
function smallestPrimeFactor (line 221) | def smallestPrimeFactor(number):
function isEven (line 248) | def isEven(number):
function isOdd (line 264) | def isOdd(number):
function goldbach (line 280) | def goldbach(number):
function gcd (line 333) | def gcd(number1, number2):
function kgV (line 366) | def kgV(number1, number2):
function getPrime (line 438) | def getPrime(n):
function getPrimesBetween (line 472) | def getPrimesBetween(pNumber1, pNumber2):
function getDivisors (line 515) | def getDivisors(n):
function isPerfectNumber (line 539) | def isPerfectNumber(number):
function simplifyFraction (line 566) | def simplifyFraction(numerator, denominator):
function factorial (line 596) | def factorial(n):
function fib (line 616) | def fib(n):
FILE: prison_break_scrapper.py
function download_files (line 15) | def download_files(links, idx):
function main (line 22) | def main():
FILE: pscheck.py
function ps (line 22) | def ps():
function main (line 52) | def main():
FILE: python Space Invader game.py
function show_score (line 65) | def show_score(x, y):
function game_over_text (line 70) | def game_over_text():
function player (line 76) | def player(x, y):
function enemy (line 83) | def enemy(x, y, i):
function fire_bullet (line 87) | def fire_bullet(x, y):
function iscollision (line 93) | def iscollision(enemyx, enemyy, bulletx, bullety):
FILE: pythonVideoDownloader.py
function get_video_links (line 16) | def get_video_links():
function download_video_series (line 34) | def download_video_series(video_links):
FILE: quote.py
function return_quote (line 12) | def return_quote():
FILE: random-sentences.py
function random_int (line 16) | def random_int():
function random_sentence (line 20) | def random_sentence():
FILE: random_file_move.py
function check_ratio (line 14) | def check_ratio(x):
FILE: random_password_gen.py
function generate_password (line 15) | def generate_password(length=12):
function main (line 21) | def main():
FILE: rangoli.py
function print_rangoli (line 5) | def print_rangoli(n):
FILE: rearrange-files/rearrange-files.py
class RearrangeFile (line 9) | class RearrangeFile(object):
method __init__ (line 10) | def __init__(self):
method make_folder_and_return_name (line 14) | def make_folder_and_return_name(self, foldername):
method check_folder_existance (line 22) | def check_folder_existance(self):
FILE: recursive-fibonacci.py
function fib (line 1) | def fib(n):
FILE: recursiveStrings.py
function CheckTwoStrings (line 8) | def CheckTwoStrings(str1, str2):
function main (line 20) | def main():
FILE: recyclebin.py
function sid2user (line 20) | def sid2user(sid): # Start of the function to gather the user
function returnDir (line 33) | def returnDir(): # Start of the function to search through the recyclebin
function findRecycled (line 42) | def findRecycled(
function main (line 55) | def main():
FILE: remoteok_jobs_scraper/remoteok_jobs.py
function get_job_postings (line 12) | def get_job_postings():
function save_jobs_to_excel (line 23) | def save_jobs_to_excel(jobs, filename='remoteok_jobs.xls'):
FILE: repeat.py
function Repeat (line 1) | def Repeat(x):
FILE: replacetext.py
function replacetext (line 14) | def replacetext(text: str) -> str:
FILE: reversed_pattern3.py
function main (line 9) | def main():
function pattern (line 14) | def pattern(lines):
FILE: rock_paper_scissors.py
function get_user_choice (line 9) | def get_user_choice():
function get_computer_choice (line 19) | def get_computer_choice():
function decide_winner (line 25) | def decide_winner(player, computer):
function main (line 39) | def main():
FILE: rotate_string.py
function left_rotate (line 1) | def left_rotate(s, val):
function right_rotate (line 7) | def right_rotate(s, val):
function circular_rotate (line 13) | def circular_rotate(s):
FILE: russian_roulette.py
function main (line 10) | def main():
FILE: scalg.py
function score (line 30) | def score(source_data: list, weights: list, *args) -> list:
function score_columns (line 106) | def score_columns(source_data: list, columns: list, weights: list) -> list:
FILE: scrap_file.py
function download (line 9) | def download(url, filename):
FILE: script_count.py
function clear_screen (line 24) | def clear_screen(): # Function to clear the screen
function count_files (line 31) | def count_files(
function github (line 43) | def github(): # Start of the function just to count the files in the gi...
function development (line 63) | def development(): # Start of the function just to count the files in t...
FILE: send_message_automation/message_automation.py
function send_message (line 12) | def send_message(message):
function send_repeatedly (line 17) | def send_repeatedly(message, repetitions, delay):
FILE: sendemail.py
function get_credentials (line 19) | def get_credentials():
function SendMessage (line 37) | def SendMessage(sender, to, subject, msgHtml, msgPlain, attachmentFile=N...
function SendMessageInternal (line 51) | def SendMessageInternal(service, user_id, message):
function createMessageWithAttachment (line 66) | def createMessageWithAttachment(sender, to, subject, msgHtml, msgPlain, ...
function CreateMessageHtml (line 124) | def CreateMessageHtml(sender, to, subject, msgHtml, msgPlain):
function main (line 134) | def main():
FILE: sensors_information.py
function python_version (line 5) | def python_version():
function ip_addresses (line 7) | def ip_addresses():
function cpu_load (line 17) | def cpu_load():
function ram_available (line 21) | def ram_available():
function ac_connected (line 25) | def ac_connected():
function show_sensors (line 29) | def show_sensors():
function command_line (line 38) | def command_line(argv):
FILE: serial_scanner.py
function ListAvailablePorts (line 17) | def ListAvailablePorts():
FILE: sha1.py
class SHA1Hash (line 7) | class SHA1Hash:
method __init__ (line 12) | def __init__(self, data):
method rotate (line 23) | def rotate(n, b):
method padding (line 29) | def padding(self):
method split_blocks (line 37) | def split_blocks(self):
method expand_block (line 46) | def expand_block(self, block):
method final_hash (line 56) | def final_hash(self):
class SHA1HashTest (line 100) | class SHA1HashTest(unittest.TestCase):
method testMatchHashes (line 105) | def testMatchHashes(self):
function main (line 110) | def main():
FILE: sierpinski_triangle.py
function getMid (line 42) | def getMid(p1, p2):
function triangle (line 46) | def triangle(points, depth):
FILE: simple_calculator.py
function add (line 18) | def add(x: float, y: float) -> float:
function subtract (line 23) | def subtract(x: float, y: float) -> float:
function multiply (line 28) | def multiply(x: float, y: float) -> float:
function divide (line 33) | def divide(x: float, y: float) -> float:
function calculator (line 38) | def calculator() -> None:
FILE: simple_calculator/simple_calculator.py
function add (line 2) | def add(x, y):
function subtract (line 6) | def subtract(x, y):
function multiply (line 10) | def multiply(x, y):
function divide (line 14) | def divide(x, y):
function display_menu (line 22) | def display_menu():
FILE: simulate_memory_cpu.py
function print_help (line 13) | def print_help():
function mem (line 23) | def mem():
function deadloop (line 43) | def deadloop():
function cpu (line 51) | def cpu():
function mem_cpu (line 70) | def mem_cpu():
FILE: singly_linked_list.py
class Node (line 1) | class Node:
method __init__ (line 2) | def __init__(self, data):
class LinkedList (line 7) | class LinkedList:
method __init__ (line 8) | def __init__(self):
method length (line 11) | def length(self):
method add_node (line 19) | def add_node(self, data):
method insert_at_head (line 29) | def insert_at_head(self, data):
method insert (line 36) | def insert(self, pos, data):
method delete_head (line 58) | def delete_head(self):
method delete_end (line 63) | def delete_end(self):
method delete (line 74) | def delete(self, pos):
method display (line 96) | def display(self):
FILE: size(resolution)image.py
function jpeg_res (line 1) | def jpeg_res(filename):
FILE: smart_file_organizer.py
function create_folder (line 37) | def create_folder(folder_path: str) -> None:
function get_category (line 48) | def get_category(file_ext: str) -> str:
function organize_files (line 64) | def organize_files(base_path: str) -> None:
function main (line 96) | def main() -> None:
FILE: snake_case_renamer_depth_one.py
function generate_unique_name (line 5) | def generate_unique_name(directory: str, name: str) -> str:
function rename_files_and_folders (line 28) | def rename_files_and_folders(directory: str) -> None:
function main (line 59) | def main() -> None:
FILE: sorting_algos.py
function selection_sort (line 4) | def selection_sort(arr: list) -> list:
function bubble_sort (line 51) | def bubble_sort(arr: list) -> list:
function insertion_sort (line 65) | def insertion_sort(arr: list) -> list:
function merge_sort (line 78) | def merge_sort(arr: list) -> list:
function quick_sort (line 117) | def quick_sort(arr: list) -> list:
function counting_sort (line 133) | def counting_sort(arr: list) -> list:
function main (line 153) | def main():
FILE: soundex_algorithm.py
function soundex_al (line 1) | def soundex_al(word):
FILE: spotifyAccount.py
function randomName (line 16) | def randomName(size=10, chars=string.ascii_letters + string.digits):
function randomPassword (line 20) | def randomPassword(size=14, chars=string.ascii_letters + string.digits):
class proxy (line 31) | class proxy:
method update (line 32) | def update(self):
method get_proxy (line 43) | def get_proxy(self):
method FormatProxy (line 47) | def FormatProxy(self):
method __init__ (line 51) | def __init__(self):
function creator (line 60) | def creator():
FILE: square_root.py
function square_root (line 4) | def square_root(number):
FILE: stack.py
function createStack (line 5) | def createStack():
function size (line 11) | def size(stack):
function isEmpty (line 16) | def isEmpty(stack):
function push (line 23) | def push(stack, item):
function pop (line 29) | def pop(stack):
function reverse (line 36) | def reverse(string):
FILE: stackF_Harsh2255.py
function createStack (line 9) | def createStack():
function isEmpty (line 15) | def isEmpty(stack):
function push (line 20) | def push(stack, item):
function pop (line 26) | def pop(stack):
function peek (line 34) | def peek(stack):
FILE: stone_paper_scissor/utils.py
function validate (line 1) | def validate(hand):
function print_hand (line 7) | def print_hand(hand, name="Guest"):
function judge (line 12) | def judge(player, computer):
FILE: string_rotation.py
function rotate (line 7) | def rotate(n):
FILE: sudoku.py
function solve (line 14) | def solve(bo):
function valid (line 33) | def valid(bo, num, pos):
function print_board (line 56) | def print_board(bo):
function find_empty (line 71) | def find_empty(bo):
FILE: sum_of_digits_of_a_number.py
function get_integer_input (line 23) | def get_integer_input(prompt: str, attempts: int) -> int | None:
function sum_of_digits (line 49) | def sum_of_digits(n: int) -> int:
function main (line 77) | def main() -> None:
FILE: swap.py
class Swapper (line 1) | class Swapper:
method __init__ (line 18) | def __init__(self, x, y):
method display_values (line 36) | def display_values(self, message):
method swap_tuple_unpacking (line 39) | def swap_tuple_unpacking(self):
method swap_temp_variable (line 48) | def swap_temp_variable(self):
method swap_arithmetic_operations (line 59) | def swap_arithmetic_operations(self):
FILE: testlines.py
function write_to_file (line 12) | def write_to_file(filename, txt):
FILE: text_file_replace.py
function text_file_replace (line 13) | def text_file_replace(file, encoding, old, new):
FILE: text_to_audio/main.py
class userAudio (line 46) | class userAudio:
method __init__ (line 47) | def __init__(
method user_input (line 68) | def user_input(self):
method save_only (line 76) | def save_only(self, filename="default.mp3"):
method play_only (line 81) | def play_only(self):
class fun_secret_generator_string (line 162) | class fun_secret_generator_string:
method __init__ (line 164) | def __init__(self, string):
FILE: text_to_pig_latin.py
function pig_latin_word (line 13) | def pig_latin_word(word):
function pig_latin_sentence (line 22) | def pig_latin_sentence(text):
FILE: tf_idf_generator.py
function paint (line 52) | def paint(str, color="r"):
function find_tf_idf (line 73) | def find_tf_idf(file_names=None, prev_file_path=None, dump_path=None):
FILE: thired-party-haarcascade-mustache-on-face/utils.py
function image_resize (line 7) | def image_resize(image, width=None, height=None, inter=cv2.INTER_AREA):
class CFEVideoConf (line 35) | class CFEVideoConf(object):
method __init__ (line 58) | def __init__(self, capture, filepath, res="480p", *args, **kwargs):
method change_res (line 66) | def change_res(self, width, height):
method get_dims (line 70) | def get_dims(self, res="480p"):
method get_video_type (line 78) | def get_video_type(self):
FILE: thread_signal.py
class producer (line 8) | class producer(threading.Thread):
method __init__ (line 9) | def __init__(self, event):
method run (line 13) | def run(self):
function handler_thread (line 22) | def handler_thread(event):
function handler (line 27) | def handler(signum, frame):
FILE: tic-tac-toe.py
function print_board (line 5) | def print_board():
function check_winner (line 14) | def check_winner(player):
function is_draw (line 25) | def is_draw():
FILE: tik_tak.py
function print_board (line 10) | def print_board():
function enter_number (line 25) | def enter_number(p1_sign, p2_sign):
function checkwin (line 77) | def checkwin():
function play (line 99) | def play():
FILE: time_delta.py
function parse_timestamp (line 38) | def parse_timestamp(timestamp: str) -> datetime.datetime:
function calculate_time_delta (line 53) | def calculate_time_delta(t1: str, t2: str) -> int:
function read_test_cases (line 73) | def read_test_cases() -> Tuple[int, List[Tuple[str, str]]]:
function main (line 96) | def main() -> None:
FILE: to check leap year.py
function is_leap_year (line 19) | def is_leap_year(year: int) -> bool:
FILE: translation_of_sizes_of_underwear_RU.py
function my_found (line 2) | def my_found(req):
FILE: turtle_shapes_made.py
class ShapeDrawer (line 4) | class ShapeDrawer:
method __init__ (line 5) | def __init__(self, color, pensize):
method draw_rectangle (line 10) | def draw_rectangle(self, width, height):
method draw_triangle (line 17) | def draw_triangle(self, length):
function main (line 23) | def main():
FILE: tweeter.py
function get_status (line 10) | def get_status():
function tweet_text (line 21) | def tweet_text(api, user):
function tweet_picture (line 31) | def tweet_picture(api, user):
function initialize_api (line 43) | def initialize_api():
function main (line 56) | def main():
FILE: twitter_post_scraper.py
function tweeter_scrapper (line 9) | def tweeter_scrapper():
FILE: two_num.py
function two_sum (line 20) | def two_sum(nums: List[int], target: int) -> Optional[List[int]]:
FILE: venv/Lib/site-packages/pip/__init__.py
function main (line 6) | def main(args: Optional[List[str]] = None) -> int:
FILE: venv/Lib/site-packages/pip/__pip-runner__.py
function version_str (line 15) | def version_str(version): # type: ignore
class PipImportRedirectingFinder (line 36) | class PipImportRedirectingFinder:
method find_spec (line 38) | def find_spec(self, fullname, path=None, target=None): # type: ignore
FILE: venv/Lib/site-packages/pip/_internal/__init__.py
function main (line 10) | def main(args: Optional[List[str]] = None) -> int:
FILE: venv/Lib/site-packages/pip/_internal/build_env.py
function _dedup (line 32) | def _dedup(a: str, b: str) -> Union[Tuple[str], Tuple[str, str]]:
class _Prefix (line 36) | class _Prefix:
method __init__ (line 37) | def __init__(self, path: str) -> None:
function get_runnable_pip (line 45) | def get_runnable_pip() -> str:
function _get_system_sitepackages (line 61) | def _get_system_sitepackages() -> Set[str]:
class BuildEnvironment (line 81) | class BuildEnvironment:
method __init__ (line 84) | def __init__(self) -> None:
method __enter__ (line 138) | def __enter__(self) -> None:
method __exit__ (line 159) | def __exit__(
method check_requirements (line 171) | def check_requirements(
method install_requirements (line 205) | def install_requirements(
method _install_requirements (line 227) | def _install_requirements(
class NoOpBuildEnvironment (line 287) | class NoOpBuildEnvironment(BuildEnvironment):
method __init__ (line 290) | def __init__(self) -> None:
method __enter__ (line 293) | def __enter__(self) -> None:
method __exit__ (line 296) | def __exit__(
method cleanup (line 304) | def cleanup(self) -> None:
method install_requirements (line 307) | def install_requirements(
FILE: venv/Lib/site-packages/pip/_internal/cache.py
function _hash_dict (line 26) | def _hash_dict(d: Dict[str, str]) -> str:
class Cache (line 32) | class Cache:
method __init__ (line 38) | def __init__(self, cache_dir: str) -> None:
method _get_cache_path_parts (line 43) | def _get_cache_path_parts(self, link: Link) -> List[str]:
method _get_candidates (line 76) | def _get_candidates(self, link: Link, canonical_package_name: str) -> ...
method get_path_for_link (line 86) | def get_path_for_link(self, link: Link) -> str:
method get (line 90) | def get(
class SimpleWheelCache (line 102) | class SimpleWheelCache(Cache):
method __init__ (line 105) | def __init__(self, cache_dir: str) -> None:
method get_path_for_link (line 108) | def get_path_for_link(self, link: Link) -> str:
method get (line 128) | def get(
class EphemWheelCache (line 172) | class EphemWheelCache(SimpleWheelCache):
method __init__ (line 175) | def __init__(self) -> None:
class CacheEntry (line 184) | class CacheEntry:
method __init__ (line 185) | def __init__(
class WheelCache (line 208) | class WheelCache(Cache):
method __init__ (line 215) | def __init__(self, cache_dir: str) -> None:
method get_path_for_link (line 220) | def get_path_for_link(self, link: Link) -> str:
method get_ephem_path_for_link (line 223) | def get_ephem_path_for_link(self, link: Link) -> str:
method get (line 226) | def get(
method get_cache_entry (line 237) | def get_cache_entry(
method record_download_origin (line 266) | def record_download_origin(cache_dir: str, download_info: DirectUrl) -...
FILE: venv/Lib/site-packages/pip/_internal/cli/autocompletion.py
function autocomplete (line 15) | def autocomplete() -> None:
function get_path_completion_type (line 124) | def get_path_completion_type(
function auto_complete_paths (line 148) | def auto_complete_paths(current: str, completion_type: str) -> Iterable[...
FILE: venv/Lib/site-packages/pip/_internal/cli/base_command.py
class Command (line 44) | class Command(CommandContextMixIn):
method __init__ (line 48) | def __init__(self, name: str, summary: str, isolated: bool = False) ->...
method add_options (line 78) | def add_options(self) -> None:
method handle_pip_version_check (line 81) | def handle_pip_version_check(self, options: Values) -> None:
method run (line 90) | def run(self, options: Values, args: List[str]) -> int:
method _run_wrapper (line 93) | def _run_wrapper(self, level_number: int, options: Values, args: List[...
method parse_args (line 150) | def parse_args(self, args: List[str]) -> Tuple[Values, List[str]]:
method main (line 154) | def main(self, args: List[str]) -> int:
method _main (line 161) | def _main(self, args: List[str]) -> int:
FILE: venv/Lib/site-packages/pip/_internal/cli/cmdoptions.py
function raise_option_error (line 36) | def raise_option_error(parser: OptionParser, option: Option, msg: str) -...
function make_option_group (line 50) | def make_option_group(group: Dict[str, Any], parser: ConfigOptionParser)...
function check_dist_restriction (line 62) | def check_dist_restriction(options: Values, check_target: bool = False) ...
function _path_option_check (line 102) | def _path_option_check(option: Option, opt: str, value: str) -> str:
function _package_name_option_check (line 106) | def _package_name_option_check(option: Option, opt: str, value: str) -> ...
class PipOption (line 110) | class PipOption(Option):
function exists_action (line 299) | def exists_action() -> Option:
function extra_index_url (line 354) | def extra_index_url() -> Option:
function find_links (line 377) | def find_links() -> Option:
function trusted_host (line 393) | def trusted_host() -> Option:
function constraints (line 405) | def constraints() -> Option:
function requirements (line 418) | def requirements() -> Option:
function editable (line 431) | def editable() -> Option:
function _handle_src (line 446) | def _handle_src(option: Option, opt_str: str, value: str, parser: Option...
function _get_format_control (line 469) | def _get_format_control(values: Values, option: Option) -> Any:
function _handle_no_binary (line 474) | def _handle_no_binary(
function _handle_only_binary (line 485) | def _handle_only_binary(
function no_binary (line 496) | def no_binary() -> Option:
function only_binary (line 514) | def only_binary() -> Option:
function _convert_python_version (line 548) | def _convert_python_version(value: str) -> Tuple[Tuple[int, ...], Option...
function _handle_python_version (line 577) | def _handle_python_version(
function add_target_python_options (line 646) | def add_target_python_options(cmd_opts: OptionGroup) -> None:
function make_target_python (line 653) | def make_target_python(options: Values) -> TargetPython:
function prefer_binary (line 664) | def prefer_binary() -> Option:
function _handle_no_cache_dir (line 688) | def _handle_no_cache_dir(
function _handle_no_use_pep517 (line 765) | def _handle_no_use_pep517(
function _handle_config_settings (line 821) | def _handle_config_settings(
function _handle_merge_hash (line 910) | def _handle_merge_hash(
function check_list_path_option (line 971) | def check_list_path_option(options: Values) -> None:
FILE: venv/Lib/site-packages/pip/_internal/cli/command_context.py
class CommandContextMixIn (line 7) | class CommandContextMixIn:
method __init__ (line 8) | def __init__(self) -> None:
method main_context (line 14) | def main_context(self) -> Generator[None, None, None]:
method enter_context (line 24) | def enter_context(self, context_provider: ContextManager[_T]) -> _T:
FILE: venv/Lib/site-packages/pip/_internal/cli/index_command.py
function _create_truststore_ssl_context (line 28) | def _create_truststore_ssl_context() -> Optional["SSLContext"]:
class SessionCommandMixin (line 50) | class SessionCommandMixin(CommandContextMixIn):
method __init__ (line 55) | def __init__(self) -> None:
method _get_index_urls (line 60) | def _get_index_urls(cls, options: Values) -> Optional[List[str]]:
method get_default_session (line 73) | def get_default_session(self, options: Values) -> "PipSession":
method _build_session (line 83) | def _build_session(
function _pip_self_version_check (line 134) | def _pip_self_version_check(session: "PipSession", options: Values) -> N...
class IndexGroupCommand (line 140) | class IndexGroupCommand(Command, SessionCommandMixin):
method handle_pip_version_check (line 147) | def handle_pip_version_check(self, options: Values) -> None:
FILE: venv/Lib/site-packages/pip/_internal/cli/main.py
function main (line 47) | def main(args: Optional[List[str]] = None) -> int:
FILE: venv/Lib/site-packages/pip/_internal/cli/main_parser.py
function create_main_parser (line 19) | def create_main_parser() -> ConfigOptionParser:
function identify_python_interpreter (line 50) | def identify_python_interpreter(python: str) -> Optional[str]:
function parse_command (line 69) | def parse_command(args: List[str]) -> Tuple[str, List[str]]:
FILE: venv/Lib/site-packages/pip/_internal/cli/parser.py
class PrettyHelpFormatter (line 18) | class PrettyHelpFormatter(optparse.IndentedHelpFormatter):
method __init__ (line 21) | def __init__(self, *args: Any, **kwargs: Any) -> None:
method format_option_strings (line 28) | def format_option_strings(self, option: optparse.Option) -> str:
method _format_option_strings (line 31) | def _format_option_strings(
method format_heading (line 57) | def format_heading(self, heading: str) -> str:
method format_usage (line 62) | def format_usage(self, usage: str) -> str:
method format_description (line 70) | def format_description(self, description: Optional[str]) -> str:
method format_epilog (line 88) | def format_epilog(self, epilog: Optional[str]) -> str:
method indent_lines (line 95) | def indent_lines(self, text: str, indent: str) -> str:
class UpdatingDefaultsHelpFormatter (line 100) | class UpdatingDefaultsHelpFormatter(PrettyHelpFormatter):
method expand_default (line 109) | def expand_default(self, option: optparse.Option) -> str:
class CustomOptionParser (line 132) | class CustomOptionParser(optparse.OptionParser):
method insert_option_group (line 133) | def insert_option_group(
method option_list_all (line 145) | def option_list_all(self) -> List[optparse.Option]:
class ConfigOptionParser (line 154) | class ConfigOptionParser(CustomOptionParser):
method __init__ (line 158) | def __init__(
method check_default (line 171) | def check_default(self, option: optparse.Option, key: str, val: Any) -...
method _get_ordered_configuration_items (line 178) | def _get_ordered_configuration_items(
method _update_defaults (line 206) | def _update_defaults(self, defaults: Dict[str, Any]) -> Dict[str, Any]:
method get_default_values (line 270) | def get_default_values(self) -> optparse.Values:
method error (line 292) | def error(self, msg: str) -> None:
FILE: venv/Lib/site-packages/pip/_internal/cli/progress_bars.py
function _rich_progress_bar (line 24) | def _rich_progress_bar(
function _raw_progress_bar (line 60) | def _raw_progress_bar(
function get_download_progress_renderer (line 82) | def get_download_progress_renderer(
FILE: venv/Lib/site-packages/pip/_internal/cli/req_command.py
function with_cleanup (line 50) | def with_cleanup(func: Any) -> Any:
class RequirementCommand (line 78) | class RequirementCommand(IndexGroupCommand):
method __init__ (line 79) | def __init__(self, *args: Any, **kw: Any) -> None:
method determine_resolver_variant (line 85) | def determine_resolver_variant(options: Values) -> str:
method make_requirement_preparer (line 93) | def make_requirement_preparer(
method make_resolver (line 148) | def make_resolver(
method get_requirements (line 206) | def get_requirements(
method trace_basic_info (line 293) | def trace_basic_info(finder: PackageFinder) -> None:
method _build_package_finder (line 303) | def _build_package_finder(
FILE: venv/Lib/site-packages/pip/_internal/cli/spinners.py
class SpinnerInterface (line 14) | class SpinnerInterface:
method spin (line 15) | def spin(self) -> None:
method finish (line 18) | def finish(self, final_status: str) -> None:
class InteractiveSpinner (line 22) | class InteractiveSpinner(SpinnerInterface):
method __init__ (line 23) | def __init__(
method _write (line 43) | def _write(self, status: str) -> None:
method spin (line 55) | def spin(self) -> None:
method finish (line 62) | def finish(self, final_status: str) -> None:
class NonInteractiveSpinner (line 75) | class NonInteractiveSpinner(SpinnerInterface):
method __init__ (line 76) | def __init__(self, message: str, min_update_interval_seconds: float = ...
method _update (line 82) | def _update(self, status: str) -> None:
method spin (line 87) | def spin(self) -> None:
method finish (line 94) | def finish(self, final_status: str) -> None:
class RateLimiter (line 101) | class RateLimiter:
method __init__ (line 102) | def __init__(self, min_update_interval_seconds: float) -> None:
method ready (line 106) | def ready(self) -> bool:
method reset (line 111) | def reset(self) -> None:
function open_spinner (line 116) | def open_spinner(message: str) -> Generator[SpinnerInterface, None, None]:
function hidden_cursor (line 144) | def hidden_cursor(file: IO[str]) -> Generator[None, None, None]:
FILE: venv/Lib/site-packages/pip/_internal/commands/__init__.py
function create_command (line 109) | def create_command(name: str, **kwargs: Any) -> Command:
function get_similar_commands (line 121) | def get_similar_commands(name: str) -> Optional[str]:
FILE: venv/Lib/site-packages/pip/_internal/commands/cache.py
class CacheCommand (line 15) | class CacheCommand(Command):
method add_options (line 39) | def add_options(self) -> None:
method ru
Copy disabled (too large)
Download .json
Condensed preview — 1428 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (16,541K chars).
[
{
"path": ".circleci/config.yml",
"chars": 1542,
"preview": "# Use the latest 2.1 version of CircleCI pipeline process engine.\n# See: https://circleci.com/docs/reference/configurati"
},
{
"path": ".github/dependabot.yml",
"chars": 501,
"preview": "# To get started with Dependabot version updates, you'll need to specify which\n# package ecosystems to update and where "
},
{
"path": ".github/workflows/Codeql.yml",
"chars": 852,
"preview": "name: \"CodeQL Python Security and Quality Scan\"\n\non:\n push:\n branches: [ main, master ]\n pull_request:\n branches"
},
{
"path": ".github/workflows/python.yml",
"chars": 1211,
"preview": "name: Python Checks\n\non:\n pull_request:\n types: [opened, synchronize, reopened]\n push:\n branches:\n - main\n\n"
},
{
"path": ".gitignore",
"chars": 317,
"preview": ".idea\n*.pyc\nstring=sorted(input())\nlower=\"\"\neven=\"\"\nodd=\"\"\nupper=\"\"\nfor i in string:\n if i.islower():\n lower+="
},
{
"path": "1 File handle/File handle binary/Update a binary file2.py",
"chars": 930,
"preview": "# updating records in a binary file\r\n\r\nimport pickle\r\n\r\n\r\ndef update():\r\n with open(\"studrec.dat\", \"rb+\") as File:\r\n "
},
{
"path": "1 File handle/File handle binary/delete.py",
"chars": 1115,
"preview": "import logging\nimport os\nimport pickle\n\nfrom dotenv import load_dotenv\n\nbase = os.path.dirname(__file__)\nload_dotenv(os."
},
{
"path": "1 File handle/File handle binary/question 1 (elegible for remedial, top marks).py",
"chars": 1796,
"preview": "\"\"\"Amit is a monitor of class XII-A and he stored the record of all\r\nthe students of his class in a file named “student_"
},
{
"path": "1 File handle/File handle binary/read.py",
"chars": 507,
"preview": "import pickle\n\n\ndef binary_read():\n with open(\"studrec.dat\", \"rb\") as b:\n stud = pickle.load(b)\n print("
},
{
"path": "1 File handle/File handle binary/search record in binary file.py",
"chars": 535,
"preview": "# binary file to search a given record\r\n\r\nimport pickle\r\nfrom dotenv import load_dotenv\r\n\r\n\r\ndef search():\r\n with ope"
},
{
"path": "1 File handle/File handle binary/update2.py",
"chars": 769,
"preview": "# Updating records in a binary file\n# ! Have a .env file please\nimport pickle\nimport os\nfrom dotenv import load_dotenv\n\n"
},
{
"path": "1 File handle/File handle text/counter.py",
"chars": 848,
"preview": "\"\"\"\nClass resposible for counting words for different files:\n- Reduce redundant code\n- Easier code management/debugging\n"
},
{
"path": "1 File handle/File handle text/file handle 12 length of line in text file.py",
"chars": 997,
"preview": "import os\r\nimport time\r\n\r\nfile_name = input(\"Enter the file name to create:- \")\r\n\r\nprint(file_name)\r\n\r\n\r\ndef write_to_fi"
},
{
"path": "1 File handle/File handle text/happy.txt",
"chars": 319,
"preview": "hello how are you\r\nwhat is your name\r\ndo not worry everything is alright\r\neverything will be alright\r\nplease don't lose "
},
{
"path": "1 File handle/File handle text/input,output and error streams.py",
"chars": 447,
"preview": "# practicing with streams\r\nimport sys\r\n\r\nsys.stdout.write(\"Enter the name of the file\")\r\nfile = sys.stdin.readline()\r\n\r\n"
},
{
"path": "1 File handle/File handle text/question 2.py",
"chars": 929,
"preview": "\"\"\"Write a method/function DISPLAYWORDS() in python to read lines\r\n from a text file STORY.TXT,\r\n using read function\r\na"
},
{
"path": "1 File handle/File handle text/question 5.py",
"chars": 1136,
"preview": "\"\"\"Write a function in python to count the number of lowercase\r\nalphabets present in a text file “happy.txt\"\"\"\r\n\r\nimport"
},
{
"path": "1 File handle/File handle text/question 6.py",
"chars": 609,
"preview": "\"\"\"Write a function in python to count the number of lowercase\r\nalphabets present in a text file “happy.txt”\"\"\"\r\n\r\nfrom "
},
{
"path": "1 File handle/File handle text/question3.py",
"chars": 1280,
"preview": "\"\"\"Write a user-defined function named count() that will read\r\nthe contents of text file named “happy.txt” and count\r\nth"
},
{
"path": "1 File handle/File handle text/special symbol after word.py",
"chars": 269,
"preview": "with open(\"happy.txt\", \"r\") as F:\r\n # method 1\r\n for i in F.read().split():\r\n print(i, \"*\", end=\"\")\r\n pr"
},
{
"path": "1 File handle/File handle text/story.txt",
"chars": 144,
"preview": "once upon a time there was a king.\r\nhe was powerful and happy.\r\nhe \r\nall the flowers in his garden were beautiful.\r\nhe l"
},
{
"path": "8_puzzle.py",
"chars": 3521,
"preview": "from queue import PriorityQueue\nfrom typing import List, Tuple, Optional, Set\n\n\nclass PuzzleState:\n \"\"\"Represents a s"
},
{
"path": "A solution to project euler problem 3.py",
"chars": 1606,
"preview": "\"\"\"\nProblem:\nThe prime factors of 13195 are 5,7,13 and 29. What is the largest prime factor\nof a given number N?\n\ne.g. f"
},
{
"path": "AREA OF TRIANGLE.py",
"chars": 482,
"preview": "def get_valid_side(prompt:str):\n while True:\n try:\n value = float(input(prompt))\n if value <=0:\n pr"
},
{
"path": "ARKA.py",
"chars": 116,
"preview": "def sumOfSeries(n):\n x = n * (n + 1) / 2\n return (int)(x * x)\n\n\n# Driver Function\nn = 5\nprint(sumOfSeries(n))\n"
},
{
"path": "ASCIIvaluecharacter.py",
"chars": 117,
"preview": "# Program to find the ASCII value of the given character\n\nc = \"p\"\nprint(\"The ASCII value of '\" + c + \"' is\", ord(c))\n"
},
{
"path": "Add_two_Linked_List.py",
"chars": 1878,
"preview": "class Node:\r\n def __init__(self, data):\r\n self.data = data\r\n self.next = None\r\n\r\n\r\nclass LinkedList:\r\n "
},
{
"path": "Anonymous_TextApp.py",
"chars": 3191,
"preview": "import tkinter as tk\nfrom PIL import Image, ImageTk\nfrom twilio.rest import Client\n\nwindow = tk.Tk()\nwindow.title(\"Anony"
},
{
"path": "AreaOfTriangle.py",
"chars": 444,
"preview": "# Python Program to find the area of triangle when all three side-lengths are known!\n\na = 5\nb = 6\nc = 7\n\n# Uncomment bel"
},
{
"path": "Armstrong_number",
"chars": 278,
"preview": "def is_armstrong_number(number):\n numberstr = str(number)\n length = len(numberstr)\n num = number\n rev = 0\n "
},
{
"path": "Armstrong_number.py",
"chars": 708,
"preview": "def is_armstrong_number(number: str) -> bool:\r\n \"\"\"Check if a number (as a string) is a narcissistic/Armstrong number"
},
{
"path": "Assembler/GUIDE.txt",
"chars": 3000,
"preview": "# Guide for Python_Assembler\n\n### Register\n\nIn this programming language you can use four registers. \n* eax\n* ebx\n* ecx\n"
},
{
"path": "Assembler/README.md",
"chars": 683,
"preview": "# hy your name \n# Python-Assembler\n# WE need A FREE T-SHIRT\nThis program is a simple assembler-like (intel-syntax) inter"
},
{
"path": "Assembler/assembler.py",
"chars": 39047,
"preview": "from __future__ import print_function\n\nimport sys\n\nlines = [] # contains the lines of the file.\ntokens = [] # contains"
},
{
"path": "Assembler/examples/code.txt",
"chars": 168,
"preview": "; begin program \n; variable section\n$var1 db 56\n$var2 db 44\nmov ecx, $var1\npush ecx \nmov eax, 3\nint 0x80\npop eax\na"
},
{
"path": "Assembler/examples/code2.txt",
"chars": 89,
"preview": "$msg db \"hello world\"\n\nmov ecx, $msg \nmov eax, 4\nint 0x80\nmov eax, 1\nmov ebx, 0\nint 0x80\n"
},
{
"path": "Assembler/examples/code3.txt",
"chars": 217,
"preview": "\nmov ecx, 5\ncall _double\ncall _cube\ncall _inc\nmov eax, 4\nint 0x80\nmov eax, 1\nmov ebx, 0\nint 0x80\n\n\n\n_double:\nadd ecx, ec"
},
{
"path": "Assembler/examples/code4.txt",
"chars": 128,
"preview": "mov eax, 8\nmov ebx, 2\nmul ebx\nmov ecx, eax\nmov eax, 4\nint 0x80\n\nmov eax, 8\nmov ebx, 2\ndiv ebx\nmov ecx, eax\nmov eax, 4\nin"
},
{
"path": "Assembler/examples/klmn",
"chars": 41,
"preview": "Assembler/examples/code2.txt\nhello world\n"
},
{
"path": "Assembler/examples/test.txt",
"chars": 99,
"preview": "\n; variables\nVAR1 db 56\n$var1 db 10\n\nmov ecx, VAR1\nmov ebx, $var1\nsub ecx, ebx\nmov eax, 4\nint 0x80 "
},
{
"path": "Assembler/requirements.txt",
"chars": 19,
"preview": "print_function\nsys\n"
},
{
"path": "Audio_Summarizer.py",
"chars": 1522,
"preview": "import whisper\nimport re\nimport openai\nimport os\n\n\ndef transcript_generator():\n # Load Whisper model\n model = whis"
},
{
"path": "AutoComplete_App/backend.py",
"chars": 5339,
"preview": "import sqlite3\nimport json\n\n\nclass AutoComplete:\n \"\"\"\n It works by building a `WordMap` that stores words to word-"
},
{
"path": "AutoComplete_App/frontend.py",
"chars": 853,
"preview": "from tkinter import *\nimport backend\n\n\ndef train():\n sentence = train_entry.get()\n ac = backend.AutoComplete()\n "
},
{
"path": "Automated Scheduled Call Reminders/caller.py",
"chars": 2006,
"preview": "# The project automates calls for people from the firebase cloud database and the schedular keeps it running and checks "
},
{
"path": "Automated Scheduled Call Reminders/requirements.txt",
"chars": 119,
"preview": "APScheduler\nsearch\nos\ntime\ngmtime\nstrftime\nClient\ntwilio\ndatetime\ntimedelta\ncredentials\nfirestore\ninitialize_app\nTwilio"
},
{
"path": "Automated Scheduled Call Reminders/schedular.py",
"chars": 341,
"preview": "# schedular code for blocking schedular as we have only 1 process to run\n\nfrom apscheduler.schedulers.blocking import Bl"
},
{
"path": "Bank Application .ipynb",
"chars": 21100,
"preview": "{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": "
},
{
"path": "Base Converter Number system.py",
"chars": 2660,
"preview": "def base_check(xnumber, xbase):\n for char in xnumber[len(xnumber) - 1]:\n if int(char) >= int(xbase):\n "
},
{
"path": "Battery_notifier.py",
"chars": 720,
"preview": "from plyer import notification # pip install plyer\nimport psutil # pip install psutil\n\n# psutil.sensors_battery() will"
},
{
"path": "Binary Coefficients.py",
"chars": 445,
"preview": "def pascal_triangle(lineNumber):\n list1 = list()\n list1.append([1])\n i = 1\n while i <= lineNumber:\n j"
},
{
"path": "Binary_search.py",
"chars": 1184,
"preview": "# It returns location of x in given array arr\n# if present, else returns -1\ndef binary_search(arr, l, r, x):\n # Base "
},
{
"path": "Binary_to_Decimal.py",
"chars": 414,
"preview": "# Program to convert binary to decimal\n\n\ndef binaryToDecimal(binary):\n \"\"\"\n >>> binaryToDecimal(111110000)\n 496"
},
{
"path": "BlackJack_game/blackjack.py",
"chars": 3539,
"preview": "# master\n# master\n# BLACK JACK - CASINO A GAME OF FORTUNE!!!\nfrom time import sleep\n\n# BLACK JACK - CASINO\n# PYTHON CODE"
},
{
"path": "BlackJack_game/blackjack_rr.py",
"chars": 6982,
"preview": "import random\n\n\nclass Colour:\n BLACK = \"\\033[30m\"\n RED = \"\\033[91m\"\n GREEN = \"\\033[32m\"\n END = \"\\033[0m\"\n\n\ns"
},
{
"path": "BlackJack_game/blackjack_simulate.py",
"chars": 19598,
"preview": "import os\nimport random\nfrom functools import namedtuple\n\n\"\"\"\nTarget: BlackJack 21 simulate\n - Role\n - Dealer:"
},
{
"path": "BlackJack_game/requirements.txt",
"chars": 12,
"preview": "time\nrandom\n"
},
{
"path": "BoardGame-CLI/python.py",
"chars": 2274,
"preview": "import random\n\n# Define the game board with snakes and ladders\nsnakes_and_ladders = {\n 2: 38,\n 7: 14,\n 8: 31,\n "
},
{
"path": "BoardGame-CLI/snakeLadder.py",
"chars": 4302,
"preview": "import random\n\n# Taking players data\nplayers = {} # stores players name their locations\nisReady = {}\ncurrent_loc = 1 #"
},
{
"path": "BoardGame-CLI/uno.py",
"chars": 7023,
"preview": "# uno game #\n\nimport random\nfrom typing import List\n\n\"\"\"\nGenerate the UNO deck of 108 cards.\n\nDoctest examples"
},
{
"path": "BrowserHistory/backend.py",
"chars": 2870,
"preview": "class DLL:\n \"\"\"\n a doubly linked list that holds the current page,\n next page, and previous page.\n Used to e"
},
{
"path": "BrowserHistory/rock_paper_scissors.py",
"chars": 1392,
"preview": "\"\"\"\nTriple Round : Rock, Paper, Scissors Game (CLI Version)\nFinal round is the Winning Round\nAuthor: Your Name\n\"\"\"\n\nimpo"
},
{
"path": "BrowserHistory/tests/test_browser_history.py",
"chars": 3525,
"preview": "import unittest\nimport sys\nimport os\n\n# Add parent directory to path to import backend\nsys.path.append(os.path.dirname(o"
},
{
"path": "BruteForce.py",
"chars": 2067,
"preview": "from itertools import product\n\n\ndef findPassword(chars, function, show=50, format_=\"%s\"):\n password = None\n attemp"
},
{
"path": "CODE_OF_CONDUCT.md",
"chars": 3348,
"preview": "# Contributor Covenant Code of Conduct Easy to understand\n\n## Our Pledge\n\nIn the interest of fostering an open and welco"
},
{
"path": "CONTRIBUTING.md",
"chars": 4233,
"preview": "# Contributing Notepad Sorting\n\nWhen contributing to this repository, please first discuss the change you wish to make v"
},
{
"path": "CRC/crc.py",
"chars": 1616,
"preview": "def crc_check(data, div):\r\n l = len(div)\r\n ct = 0\r\n data = [int(i) for i in data]\r\n div = [int(i) for i in d"
},
{
"path": "CSV_file.py",
"chars": 309,
"preview": "import pandas as pd\n\n# loading the dataset\n\ndf = pd.read_csv(\n r\"c:\\PROJECT\\Drug_Recommendation_System\\drug_recommend"
},
{
"path": "Caesar Cipher Encoder & Decoder.py",
"chars": 1300,
"preview": "# PROJECT1\n# CAESAR CIPHER ENCODER/DECODER\n\n# Author: InTruder\n# Cloned from: https://github.com/InTruder-Sec/caesar-cip"
},
{
"path": "Calculate resistance.py",
"chars": 417,
"preview": "def res(R1, R2):\n sum = R1 + R2\n if option == \"series\":\n return sum\n elif option == \"parallel\":\n "
},
{
"path": "Calculator with simple ui.py",
"chars": 1950,
"preview": "# Program make a simple calculator\n\n\nclass Calculator:\n def __init__(self):\n pass\n\n def add(self, num1, num"
},
{
"path": "Calendar (GUI).py",
"chars": 878,
"preview": "from tkinter import *\nimport calendar\n\nroot = Tk()\n# root.geometry(\"400x300\")\nroot.title(\"Calendar\")\n\n# Function\n\n\ndef t"
},
{
"path": "Cat/cat.py",
"chars": 1835,
"preview": "\"\"\"\r\nThe 'cat' Program Implemented in Python 3\r\n\r\nThe Unix 'cat' utility reads the contents\r\nof file(s) specified throug"
},
{
"path": "Cat/text_a.txt",
"chars": 79,
"preview": "Sample Text Here\r\n\r\nLorem ipsum, dolor sit amet.\r\nHello,\r\nWorld!\r\n\r\nABCD 1234\r\n"
},
{
"path": "Cat/text_b.txt",
"chars": 117,
"preview": "I am another sample text file.\r\n\r\nThe knights who say ni!\r\n\r\nLines\r\nof\r\nText!\r\nThis file does not end with a newline."
},
{
"path": "Cat/text_c.txt",
"chars": 64,
"preview": "I am the beginning of yet another text file.\r\n\r\nSpam and eggs.\r\n"
},
{
"path": "Checker_game_by_dz/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "Checker_game_by_dz/first.py",
"chars": 1335,
"preview": "\"\"\"\nAuthor : Dhruv B Kakadiya\n\n\"\"\"\n\n# import libraries\nimport pygame as pg\nfrom modules import statics as st\nfrom module"
},
{
"path": "Checker_game_by_dz/modules/__init__.py",
"chars": 35,
"preview": "\"\"\"\nAuthor : Dhruv B Kakadiya\n\n\"\"\"\n"
},
{
"path": "Checker_game_by_dz/modules/checker.py",
"chars": 1967,
"preview": "\"\"\"\nAuthor : Dhruv B Kakadiya\n\n\"\"\"\n\nimport pygame as pg\nfrom .checker_board import *\nfrom .statics import *\nfrom .pieces"
},
{
"path": "Checker_game_by_dz/modules/checker_board.py",
"chars": 5492,
"preview": "\"\"\"\nAuthor : Dhruv B Kakadiya\n\n\"\"\"\n\nimport pygame as pg\nfrom .statics import *\nfrom .pieces import *\n\n\n# checker board c"
},
{
"path": "Checker_game_by_dz/modules/pieces.py",
"chars": 1272,
"preview": "\"\"\"\nAuthor : Dhruv B Kakadiya\n\n\"\"\"\n\nfrom .statics import *\nimport pygame as pg\n\n\nclass pieces:\n padding = 17\n outl"
},
{
"path": "Checker_game_by_dz/modules/statics.py",
"chars": 388,
"preview": "\"\"\"\nAuthor : Dhruv B Kakadiya\n\n\"\"\"\n\nimport pygame as pg\n\n# size of board\nwidth, height = 800, 800\nrows, cols = 8, 8\nsq_s"
},
{
"path": "Chrome Dino Automater.py",
"chars": 1193,
"preview": "import pyautogui # pip install pyautogui\nfrom PIL import ImageGrab # pip install pillow\n\n# from numpy import asarray\ni"
},
{
"path": "Classification_human_or_horse.py",
"chars": 1734,
"preview": "import pickle\r\n\r\nimport tensorflow as tf\r\n\r\nmodel = tf.keras.models.Sequential(\r\n [\r\n tf.keras.layers.Conv2D(\r"
},
{
"path": "CliYoutubeDownloader/CliYoutubeDownloader.py",
"chars": 2527,
"preview": "# libraraies\n\nimport sys\nimport pytube\n\n\nclass YouTubeDownloder:\n def __init__(self):\n self.url = str(input(\"E"
},
{
"path": "CliYoutubeDownloader/requirements.txt",
"chars": 6,
"preview": "pytube"
},
{
"path": "CliYoutubeDownloader.py",
"chars": 2601,
"preview": "from pytube import *\r\nimport sys\r\n\r\n\r\nclass YouTubeDownloder:\r\n def __init__(self):\r\n self.url = str(input(\"En"
},
{
"path": "Collatz Sequence/Collatz Sequence.py",
"chars": 659,
"preview": "def collatz_sequence(n):\n \"\"\"Generate and print the Collatz sequence for n.\"\"\"\n steps = [n]\n while n != 1:\n "
},
{
"path": "Collatz Sequence/Collaze-Visualize.py",
"chars": 1729,
"preview": "import time\nimport matplotlib.pyplot as plt\n\ndef collatz_sequence(n):\n \"\"\"Generate the Collatz sequence for n.\"\"\"\n "
},
{
"path": "Collatz-Conjecture.py",
"chars": 2514,
"preview": "#!/usr/bin/env python3\n\n# Recommended: Python 3.6+\n\n\"\"\"\nCollatz Conjecture - Python\n\nThe Collatz conjecture, also known "
},
{
"path": "Colors/multicoloredline.py",
"chars": 1550,
"preview": "from rich.console import Console\nfrom rich.syntax import Syntax\nfrom rich.progress import Progress, SpinnerColumn, BarCo"
},
{
"path": "Colors/pixel_sort.py",
"chars": 5466,
"preview": "\"\"\"Pixel Sorting\"\"\"\n\n# Importing Libraries\nimport cv2\nimport numpy as np\nimport math\nimport colorsys\nimport pandas as pd"
},
{
"path": "Colors/primary_colors.py",
"chars": 5990,
"preview": "def diff(a, b):\n \"\"\"\n TODO: fix this function!!\n \"\"\"\n return a - b\n\n\ndef simpleColor(r, g, b):\n \"\"\"simple"
},
{
"path": "Colors/print_colors.py",
"chars": 400,
"preview": "import sys\n\n\nclass colors:\n CYAN = \"\\033[36m\"\n GREEN = \"\\033[32m\"\n YELLOW = \"\\033[33m\"\n BLUE = \"\\033[34m\"\n "
},
{
"path": "Compression_Analysis/PSNR.py",
"chars": 913,
"preview": "import math\n\n# using opencv3\nimport cv2\nimport numpy as np\n\n\ndef Representational(r, g, b):\n return 0.299 * r + 0.287"
},
{
"path": "Conversation.py",
"chars": 1188,
"preview": "# imports modules\nimport sys\nimport time\nfrom getpass import getuser\n\n# user puts in their name\nname = getuser()\nname_ch"
},
{
"path": "CountMillionCharacter.py",
"chars": 11404,
"preview": "\"\"\"\nSimple million word count program.\nmain idea is Python pairs words\nwith the number of times\nthat number appears in t"
},
{
"path": "CountMillionCharacters-2.0.py",
"chars": 589,
"preview": "\"\"\"Get the number of each character in any given text.\nInputs:\nA txt file -- You will be asked for an input file. Simply"
},
{
"path": "CountMillionCharacters-Variations/variation1.py",
"chars": 737,
"preview": "try:\n input = raw_input\nexcept NameError:\n pass\n\n\ndef count_chars(filename):\n count = {}\n\n with open(filenam"
},
{
"path": "Crack_password.py",
"chars": 786,
"preview": "from random import *\n\nuser_pass = input(\"Enter your password: \")\npassword = [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e"
},
{
"path": "Credit_Card_Validator.py",
"chars": 2374,
"preview": "# luhn algorithm\r\n\r\n\r\nclass CreditCard:\r\n def __init__(self, card_no):\r\n self.card_no = card_no\r\n\r\n @proper"
},
{
"path": "Cricket_score.py",
"chars": 833,
"preview": "from urllib import request\n\n# import os\nimport pyttsx3\n\nimport bs4 # Beautiful Soup for Web Scraping\nfrom win10toast im"
},
{
"path": "Day_of_week.py",
"chars": 1096,
"preview": "# Python program to Find day of\n# the week for a given date\nimport re # regular expressions\nimport calendar # module o"
},
{
"path": "Decimal number to binary function.py",
"chars": 150,
"preview": "# decimal number\nnumber = int(input(\"Enter any decimal number: \"))\n\n# print equivalent binary number\nprint(\"Equivalent B"
},
{
"path": "Decimal_To_Binary.py",
"chars": 1352,
"preview": "# patch-255\r\ndecimal_accuracy = 7\r\n\r\n\r\ndef dtbconverter(num):\r\n whole = []\r\n fractional = [\".\"]\r\n\r\n decimal = r"
},
{
"path": "Delete_Linked_List.py",
"chars": 1469,
"preview": "class Node:\r\n def __init__(self, data):\r\n self.data = data\r\n self.next = None\r\n\r\n\r\nclass Linked_List:\r\n"
},
{
"path": "Detect_Remove_loop.py",
"chars": 1794,
"preview": "class Node:\r\n def __init__(self, data):\r\n self.data = data\r\n self.next = None\r\n\r\n\r\nclass Linked_List:\r\n"
},
{
"path": "Dictionary opperations (input,update a dict).py",
"chars": 474,
"preview": "# Update the value of dictionary written by the user...\r\n\r\nprint(\"Dictinary opperations\")\r\n\r\n\r\ndef Dictionary(Dict, key,"
},
{
"path": "Divide Operator.py",
"chars": 1098,
"preview": "class DivisionOperation:\n INT_MAX = float(\"inf\")\n\n def __init__(self, num1, num2):\n self.num1 = num1\n "
},
{
"path": "Downloaded Files Organizer/browser_status.py",
"chars": 405,
"preview": "import psutil\nfrom obs import watcher\n\nbrowsers = [\"chrome.exe\", \"firefox.exe\", \"edge.exe\", \"iexplore.exe\"]\n\n# ADD DOWNL"
},
{
"path": "Downloaded Files Organizer/move_to_directory.py",
"chars": 2312,
"preview": "import os\nimport shutil\n\next = {\n \"web\": \"css less scss wasm \",\n \"audio\": \"aac aiff ape au flac gsm it m3u m4a mid"
},
{
"path": "Downloaded Files Organizer/obs.py",
"chars": 767,
"preview": "def watcher(path):\n # python script to observe changes in a folder\n import time\n import os\n from watchdog.ob"
},
{
"path": "Downloaded Files Organizer/readme.md",
"chars": 796,
"preview": "# Downloaded files organizer using python \n##### Operating System : Windows Only\n### Modules used\n1.Built-in Modules: \n"
},
{
"path": "Downloaded Files Organizer/requirements.txt",
"chars": 28,
"preview": "sys\nos\ntime\npsutil\nwatchdog\n"
},
{
"path": "Droplistmenu/GamesCalender.py",
"chars": 1391,
"preview": "from tkinter import *\r\nfrom tkcalendar import Calendar\r\nimport tkinter as tk\r\n\r\n\r\nwindow = tk.Tk()\r\n\r\n# Adjust size\r\nwin"
},
{
"path": "Droplistmenu/README.md",
"chars": 111,
"preview": "The code is to show using tkinter GUI to creat droplist and calender, and using .place() manage the positions.\n"
},
{
"path": "Electronics_Algorithms/Ohms_law.py",
"chars": 240,
"preview": "def ohms_law(v=0, i=0, r=0):\n if v == 0:\n result = i * r\n return result\n elif i == 0:\n result"
},
{
"path": "Electronics_Algorithms/resistance.py",
"chars": 1281,
"preview": "def resistance_calculator(\n material: str, length: float, section: float, temperature: float\n):\n \"\"\"\n material "
},
{
"path": "Email-Automation.py",
"chars": 603,
"preview": "import smtplib\r\nfrom email.mime.multipart import MIMEMultipart\r\nfrom email.mime.text import MIMEText\r\n\r\nfro_add = \"dilip"
},
{
"path": "Emoji Dictionary/QT_GUI.py",
"chars": 4189,
"preview": "# -*- coding: utf-8 -*-\n\nimport sys\nfrom PyQt5.QtCore import *\nfrom PyQt5.QtGui import *\nfrom PyQt5.QtWidgets import *\nf"
},
{
"path": "Emoji Dictionary/QT_GUI.ui",
"chars": 12904,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>MainWindow</class>\n <widget class=\"QMainWindow\" name=\""
},
{
"path": "Emoji Dictionary/README.md",
"chars": 1967,
"preview": "## ✔ EMOJI DICTIONARY\n- An \"Emoji Dictionary\" created in python with tkinter gui.\n- Using this dictionary, user will be "
},
{
"path": "Emoji Dictionary/emoji_dictionary.py",
"chars": 8008,
"preview": "# Emoji Dictionary\n\n# --------------------------------------------------------------------------------------------------"
},
{
"path": "Emoji Dictionary/requirements.txt",
"chars": 25,
"preview": "tkinter\nmessagebox\nemoji\n"
},
{
"path": "Emoji Dictionary/untitled.ui",
"chars": 12777,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>MainWindow</class>\n <widget class=\"QMainWindow\" name=\""
},
{
"path": "Encryption using base64.py",
"chars": 364,
"preview": "import base64\n\n# Encryption\nmessage = input()\nmessage_bytes = message.encode(\"ascii\")\nbase64_bytes = base64.b64encode(me"
},
{
"path": "EncryptionTool.py",
"chars": 2481,
"preview": "# GGearing\n# Simple encryption script for text\n# This was one my first versions of this script\n# 09/07/2017\nfrom __futur"
},
{
"path": "Exception_Handling_in_Python.py",
"chars": 1911,
"preview": "# Exception handling using python\n\n\na = 12\nb = 0\n# a = int(input())\n# b = int(input())\n\ntry:\n c = a / b\n print(c)\n"
},
{
"path": "Extract-Table-from-pdf-txt-docx/Parent/Child1/Text_Child1.txt",
"chars": 145,
"preview": "AB,DF,G,DF,SDF,ADA,QW,WE,ER,FD\r2,45,56,7,8,9,65,3,5436,78\r12,34,345,667,56,5657,768,45,46,67\r67,89,8,9,89,8,78,9,67,67\r1"
},
{
"path": "Extract-Table-from-pdf-txt-docx/Parent/Child2/Text_Child2.txt",
"chars": 162,
"preview": "AC,DXFC,GB,DCF,SCDF,BADA,QB,W,R,F,C\r2,45,56,7,8,9,65,3,5436,78,34\r12,34,345,667,56,5657,768,45,46,67,34\r67,89,8,9,89,8,7"
},
{
"path": "Extract-Table-from-pdf-txt-docx/Parent/Child3/Text_Child3.txt",
"chars": 160,
"preview": "AF,FC,GFB,DW,SF,BA,Q,WS,RR,FR,CW\r2,45,56,7,8,9,65,3,5436,78,34\r12,34,345,667,56,5657,768,45,46,67,34\r67,89,8,9,89,8,78,9"
},
{
"path": "Extract-Table-from-pdf-txt-docx/main.py",
"chars": 2727,
"preview": "# %%\nimport pandas as pd\nimport os\nimport tabula\nfrom docx.api import Document\n\n# %%\n\nif os.path.isdir(\"Parent\") == True"
},
{
"path": "ExtractThumbnailFromVideo/README.md",
"chars": 1719,
"preview": "# Thumbnail Extractor\n\nThis Python function extracts a thumbnail frame from a video and saves it as an image file. It ut"
},
{
"path": "ExtractThumbnailFromVideo/extract_thumbnail_from_video.py",
"chars": 1848,
"preview": "import cv2\nimport os\n\n\ndef extract_thumbnail(video_path, frame_size):\n \"\"\"\n Extracts a thumbnail frame from a vide"
},
{
"path": "Extract_Text_from_image.py",
"chars": 624,
"preview": "# extract text from a img and its coordinates using the pytesseract module\nimport cv2\nimport pytesseract\n\n# You need to "
},
{
"path": "FIND FACTORIAL OF A NUMBER.py",
"chars": 580,
"preview": "# Python program to find the factorial of a number provided by the user.\n\n\ndef factorial(n):\n if n < 0: # factorial "
},
{
"path": "Face and eye Recognition/face_recofnation_first.py",
"chars": 1538,
"preview": "import cv2 as cv\n\n\ndef detect_faces_and_eyes():\n \"\"\"\n Detects faces and eyes in real-time using the webcam.\n\n P"
},
{
"path": "Face and eye Recognition/gesture_control.py",
"chars": 940,
"preview": "import cv2 as cv\n\n# Read the image in grayscale\nimg = cv.imread(r\"..\\img\\hand1.jpg\", cv.IMREAD_GRAYSCALE)\n\n# Apply thres"
},
{
"path": "Face_Mask_detection (haarcascade)/Resources/haarcascade_frontalface_default.xml",
"chars": 930127,
"preview": "<?xml version=\"1.0\"?>\n<!--\n Stump-based 24x24 discrete(?) adaboost frontal face detector.\n Created by Rainer Lienh"
},
{
"path": "Face_Mask_detection (haarcascade)/mask_detection.py",
"chars": 1188,
"preview": "import tensorflow.keras\nimport numpy as np\nimport cv2\n\n# import os\n\nstr = \"\"\nfaceCascade = cv2.CascadeClassifier(\"Resour"
},
{
"path": "FibonacciNumbersWithGenerators.py",
"chars": 358,
"preview": "def fibonacci_generator(n=None):\n \"\"\"\n Generating function up to n fibonacci numbers iteratively\n Params:\n "
},
{
"path": "Fibonacci_sequence_recursive_sol.py",
"chars": 259,
"preview": "def fib(term):\n if term <= 1:\n return term\n else:\n return fib(term - 1) + fib(term - 2)\n\n\n# Change t"
},
{
"path": "Find current weather of any city using openweathermap API.py",
"chars": 1832,
"preview": "# Python program to find current\n# weather details of any city\n# using openweathermap api\n\n# import required modules\nimp"
},
{
"path": "FindingResolutionOfAnImage.py",
"chars": 618,
"preview": "def jpeg_res(filename):\n \"\"\" \"This function prints the resolution of the jpeg image file passed into it\"\"\"\n\n # ope"
},
{
"path": "FizzBuzz.py",
"chars": 622,
"preview": "# FizzBuzz\n# A program that prints the numbers from 1 to num (User given number)!\n# For multiples of ‘3’ print “Fizz” in"
},
{
"path": "Flappy Bird - created with tkinter/.gitignore",
"chars": 4,
"preview": "Data"
},
{
"path": "Flappy Bird - created with tkinter/Background.py",
"chars": 6162,
"preview": "from tkinter import Tk, Canvas\n\nfrom PIL.Image import open as openImage\nfrom PIL.ImageTk import PhotoImage\n\n\nclass Backg"
},
{
"path": "Flappy Bird - created with tkinter/Bird.py",
"chars": 7845,
"preview": "from threading import Thread\n\nfrom Background import Background\nfrom PIL.Image import open as openImage\nfrom PIL.ImageTk"
},
{
"path": "Flappy Bird - created with tkinter/Flappy Bird.py",
"chars": 2109,
"preview": "import pygame\nimport random\n\n# Initialize Pygame\npygame.init()\n\n# Set up display\nscreen_width = 500\nscreen_height = 700\n"
},
{
"path": "Flappy Bird - created with tkinter/README.md",
"chars": 261,
"preview": "# Description:\nThis is a simple game created with tkinter. <br />\nEnjoy and do give feedback <br/>\nWarning: If the game "
},
{
"path": "Flappy Bird - created with tkinter/Settings.py",
"chars": 3389,
"preview": "import os\nfrom json import dumps\nfrom json import loads\n\n\nclass Settings(object):\n \"\"\"\n Classe com todas as config"
},
{
"path": "Flappy Bird - created with tkinter/Tubes.py",
"chars": 11527,
"preview": "from random import randint\nfrom threading import Thread\n\nfrom Background import Background\nfrom Bird import Bird\nfrom PI"
},
{
"path": "Generate a random number between 0 to 9.py",
"chars": 128,
"preview": "# Program to generate a random number between 0 and 9\n\n# importing the random module\nimport random\n\nprint(random.randint"
},
{
"path": "Google_Image_Downloader/create_dir.py",
"chars": 1515,
"preview": "\"\"\"\nCode to directly use in file to\ncreate directory in home location\n\nNote:- I Have used python package so if you want\n"
},
{
"path": "Google_Image_Downloader/image_grapper.py",
"chars": 4643,
"preview": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n# importing required libraries\nimport json\nfrom os import chdir, system\nfrom o"
},
{
"path": "Google_News.py",
"chars": 1216,
"preview": "import ssl\nfrom urllib.request import urlopen\n\nfrom bs4 import BeautifulSoup as soup\n\n\ndef news(xml_news_url, counter):\n"
},
{
"path": "Gregorian_Calendar.py",
"chars": 1022,
"preview": "# An extra day is added to the calendar almost every four years as February 29, and the day is called a leap day. It cor"
},
{
"path": "Grocery calculator.py",
"chars": 1573,
"preview": "\"\"\"This will be a Python script that functions as a grocery calculator. It will take in key-value pairs for items\nand th"
},
{
"path": "GroupSms_Way2.py",
"chars": 1560,
"preview": "from __future__ import print_function\n\nimport sys\nfrom getpass import getpass\n\nimport cookielib\nimport urllib2\n\ntry:\n "
},
{
"path": "Guess_the_number_game.py",
"chars": 802,
"preview": "# using codeSkulpter\n\nimport random\n\nimport simplegui\n\n\ndef new_game():\n global num\n print(\"new game starts\")\n\n\nde"
},
{
"path": "Guessing_Game.py",
"chars": 3129,
"preview": "from random import randint\nfrom time import sleep\n\n\ndef guessing_game(GUESS_RANGE, GUESS_LIMIT):\n # Set the initial v"
},
{
"path": "HTML_to_PDF/index.html",
"chars": 5540,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width"
},
{
"path": "HTML_to_PDF/main.py",
"chars": 1066,
"preview": "import pdfkit\nimport os\n\n# Download wkhtmltopdf from https://wkhtmltopdf.org/downloads.html\n# Set the path to the wkhtml"
},
{
"path": "Hand-Motion-Detection/hand_motion_recognizer.py",
"chars": 1459,
"preview": "import mediapipe as mp\nimport cv2\n\nmp_drawing = mp.solutions.drawing_utils\nmp_hands = mp.solutions.hands\n\ncap = cv2.Vide"
},
{
"path": "Hand-Motion-Detection/requirements.txt",
"chars": 57,
"preview": "numpy==2.4.0\nopencv_python==4.12.0.88\nmediapipe==0.10.31\n"
},
{
"path": "HangMan Game.py",
"chars": 3373,
"preview": "# Program for HangMan Game.\nimport random\nimport HangMan_Includes as incl\n\nwhile True:\n chances = 6\n inp_lst = []\n"
},
{
"path": "Hangman.py",
"chars": 2210,
"preview": "# importing the time module\nimport time\n\n# importing the random module\nimport random\n\n# welcoming the user\nname = input("
},
{
"path": "Hotel-Management.py",
"chars": 9365,
"preview": "def menu():\n options = {\n 1: {\"title\": \"Add new customer details\", \"method\": lambda: add()},\n 2: {\n "
},
{
"path": "Image-watermarker/README.md",
"chars": 2803,
"preview": "# Watermarking Application\n\nA Python-based watermarking application built using `CustomTkinter` and `PIL` that allows us"
},
{
"path": "Image-watermarker/app.py",
"chars": 9662,
"preview": "import customtkinter as ctk\nfrom customtkinter import filedialog\nfrom CTkMessagebox import CTkMessagebox\nfrom PIL import"
},
{
"path": "Image-watermarker/watermark.py",
"chars": 1379,
"preview": "from PIL import ImageDraw, ImageFont\nfrom customtkinter import filedialog\nfrom CTkMessagebox import CTkMessagebox\n\n\nclas"
},
{
"path": "ImageDownloader/img_downloader.py",
"chars": 676,
"preview": "# ImageDownloader - Muhammed Shokr its amazing\n\n\ndef ImageDownloader(url):\n import os\n import re\n import reques"
},
{
"path": "ImageDownloader/requirements.txt",
"chars": 17,
"preview": "requests==2.32.5\n"
},
{
"path": "Image_resize.py",
"chars": 618,
"preview": "def jpeg_res(filename):\n \"\"\" \"This function prints the resolution of the jpeg image file passed into it\"\"\"\n\n # ope"
},
{
"path": "Industrial_developed_hangman/Data/local_words.txt",
"chars": 1526,
"preview": "jam\nveteran\nenvironmental\nsound\nmake\nfirst-hand\ndisposition\nhandy\ndance\nexpression\ntake\nprofessor\nswipe\npublisher\ntube\nt"
},
{
"path": "Industrial_developed_hangman/Data/text_images.txt",
"chars": 478,
"preview": "╔══╗─╔╗╔╗╔══╗╔═══╗─╔══╗╔╗╔╗╔╗╔╗╔══╗\n║╔╗║─║║║║║╔═╝║╔══╝─║╔╗║║║║║║║║║║╔╗║\n║╚╝╚╗║║║║║║──║╚══╗─║║║║║║║║║║║║║╚╝║\n║╔═╗║║║╔║║║─"
},
{
"path": "Industrial_developed_hangman/Makefile",
"chars": 213,
"preview": "lint:\n\tpoetry run isort src tests\n\tpoetry run flake8 src tests\n\tpoetry run mypy src\n\tpoetry run mypy tests\n\ntest:\n\tpoetr"
},
{
"path": "Industrial_developed_hangman/README.md",
"chars": 314,
"preview": "This is a simple game hangman\n\nto install dependencies got to repository \"Industrial_developed_hangman\" by `cd .\\Industr"
},
{
"path": "Industrial_developed_hangman/pyproject.toml",
"chars": 763,
"preview": "[tool.poetry]\nname = \"Hangman\"\nversion = \"0.2.0\"\ndescription = \"\"\nauthors = [\"DiodDan <danilaprig@gmail.com>\"]\nreadme = "
},
{
"path": "Industrial_developed_hangman/pytest.ini",
"chars": 157,
"preview": "[pytest]\nmarkers =\n internet_required: marks tests that requires internet connection (deselect with '-m \"not internet"
},
{
"path": "Industrial_developed_hangman/setup.cfg",
"chars": 1131,
"preview": "[flake8]\nmax-line-length = 120\ndocstring_style = sphinx\nmax-arguments = 6\nexps-for-one-empty-line = 0\nignore =\n D100,\n "
},
{
"path": "Industrial_developed_hangman/src/hangman/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "Industrial_developed_hangman/src/hangman/main.py",
"chars": 6436,
"preview": "import json\nimport random\nimport time\nfrom enum import Enum\nfrom pathlib import Path\nfrom typing import Callable, List\n\n"
},
{
"path": "Industrial_developed_hangman/tests/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "Industrial_developed_hangman/tests/test_hangman/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "Industrial_developed_hangman/tests/test_hangman/test_main.py",
"chars": 2598,
"preview": "from typing import Callable, List\n\nimport pytest\nimport requests_mock\n\nfrom src.hangman.main import (\n MainProcess,\n "
},
{
"path": "Infix_to_Postfix.py",
"chars": 2773,
"preview": "# Python program to convert infix expression to postfix\n\n# Class to convert the expression\nclass Conversion:\n # Const"
},
{
"path": "Insert_operation_on_Linked_List.py",
"chars": 1463,
"preview": "class Node:\r\n def __init__(self, data):\r\n self.data = data\r\n self.next = None\r\n\r\n\r\nclass Linked_List:\r\n"
},
{
"path": "JARVIS/JARVIS_2.0.py",
"chars": 9435,
"preview": "#########\n\n__author__ = \"Mohammed Shokr <mohammedshokr2014@gmail.com>\"\n__version__ = \"v 0.1\"\n\n\"\"\"\nJARVIS:\n- Control wind"
},
{
"path": "JARVIS/README.md",
"chars": 788,
"preview": "# JARVIS\npatch-5<br>\nIt can Control windows programs with your voice.<br>\nWhat can it do:\n1. It can tell you time.<br/>\n"
},
{
"path": "JARVIS/requirements.txt",
"chars": 109,
"preview": "datetime\npyjokes\nrequests\nPillow\nImage\nImageGrab\ngTTS\nkeyboard\nkey\nplaysound\npyttsx3\nSpeechRecognition\nopenai"
},
{
"path": "Job_scheduling.py",
"chars": 3856,
"preview": "#!/usr/bin/env python3\n\n\"\"\"\nAuthor : Mohit Kumar\nJob Sequencing Problem implemented in python\n\"\"\"\n\nfrom collections impo"
},
{
"path": "JsonParser.py",
"chars": 1452,
"preview": "import json\n\n\nclass JsonParser:\n \"\"\"\n this class to handle anything related to json file [as implementation of fac"
},
{
"path": "JustDialScrapperGUI/Justdial Scrapper GUI.py",
"chars": 8694,
"preview": "import csv\nimport threading\nimport urllib.request\nfrom tkinter import HORIZONTAL, Button, Entry, Label, Tk\nfrom tkinter."
},
{
"path": "Key_Binding/key_binding.py",
"chars": 159,
"preview": "from quo.keys import bind\nfrom quo.prompt import Prompt\n\nsession = Prompt()\n\n\n@bind.add(\"ctrl-h\")\ndef _(event):\n prin"
},
{
"path": "Key_Binding/requirement.txt",
"chars": 12,
"preview": "quo>=2022.4\n"
},
{
"path": "Kilometerstomile.py",
"chars": 255,
"preview": "# Taking kilometers input from the user\nkilometers = float(input(\"Enter value in kilometers: \"))\n\n# conversion factor\nco"
},
{
"path": "Koch Curve/README.txt",
"chars": 1913,
"preview": "The Koch snowflake (also known as the Koch curve, Koch star, or Koch island) is a mathematical curve and one of the earl"
},
{
"path": "Koch Curve/koch curve.py",
"chars": 1064,
"preview": "# importing the libraries\r\n# turtle standard graphics library for python\r\nimport turtle\r\n\r\n\r\n# function to create koch s"
}
]
// ... and 1228 more files (download for full content)
About this extraction
This page contains the full source code of the geekcomputers/Python GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 1428 files (16.3 MB), approximately 4.0M tokens, and a symbol index with 6899 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.