├── Chapter10 ├── ESLint_Config.js └── XML_Maven_PMD_Config.xml ├── Chapter2 ├── Prompt1 │ ├── Prompt1_comments.txt │ └── hello_world_button.html ├── Prompt2 │ └── temperature_conversion.py ├── Prompt3 │ └── plot_data.py ├── Prompt4 │ └── load_image.py ├── Prompt5 │ ├── Flask │ │ ├── app.py │ │ └── templates │ │ │ └── index.html │ └── html │ │ └── Prompt5_Claude3Sonnet.html └── requirements.txt ├── Chapter3 ├── refactored_DCT.py └── requirements.txt ├── Chapter4 ├── LZMAcompress_bad.py ├── LZMAcompress_good.py └── crypto_price_and_indictators.py ├── Chapter5 └── recommend_jobs.py ├── LICENSE └── README.md /Chapter10/ESLint_Config.js: -------------------------------------------------------------------------------- 1 | /*Here is an example of an ESLint configuration: 2 | env: Specifies the environment in which the code will be run. In this case, it's configured for both browser and ES6 environments. 3 | 4 | extends: This setting extends the recommended ESLint ruleset, providing a good starting point for enforcing common coding standards. 5 | 6 | rules: This section allows you to customize specific rules. Here, you've enforced the use of semicolons and single quotes. */ 7 | 8 | module.exports = { 9 | 10 | "env": { 11 | 12 | "browser": true, 13 | 14 | "es6": true 15 | 16 | }, 17 | 18 | "extends": "eslint:recommended", 19 | 20 | "rules": { 21 | 22 | "semi": ["error", "always"], 23 | 24 | "quotes": ["error", "single"] 25 | 26 | } 27 | 28 | }; 29 | 30 | 31 | /*Use code with caution, as the LLMs say.*/ 32 | -------------------------------------------------------------------------------- /Chapter10/XML_Maven_PMD_Config.xml: -------------------------------------------------------------------------------- 1 | /*Example (Maven): 2 | 3 | This is XML code. 4 | This XML code snippet is a configuration for the Maven PMD plugin. Maven is a popular build automation tool for Java projects, and plugins extend its functionality. 5 | 6 | Here's a breakdown of what each part does: 7 | 8 | tag: This tag defines a plugin configuration. 9 | , , and tags: These tags specify the group ID, artifact ID, and version of the PMD plugin, respectively. This information is used by Maven to locate and download the plugin. 10 | tag: This tag contains the specific configuration settings for the PMD plugin. In this case, the configuration is empty, which means the plugin will use its default settings. 11 | The PMD plugin is a static code analysis tool that helps identify potential bugs, code smells, and other issues in Java code. By configuring this plugin in your Maven project, you can automatically run code analysis during your build process and improve the quality of your code. 12 | */ 13 | 14 | 15 | 16 | org.apache.maven.plugins 17 | 18 | maven-pmd-plugin 19 | 20 | 3.19.0 21 | 22 |   23 | 24 | 25 | 26 | 27 | 28 | /*Always use code with caution, as the LLMs say.*/ 29 | -------------------------------------------------------------------------------- /Chapter2/Prompt1/Prompt1_comments.txt: -------------------------------------------------------------------------------- 1 | #Prompt 1: Please give me an example of python code to make a button for a webpage where if you click the button it says "hello". 2 | # Written by Vincent Hall of Build Intellect Ltd. and ABT NEWS Ltd. 12 Feb 2024. 3 | 4 | 5 | #This is html, so should be put into a webpage on a website editor or can be tested and played with in an HTML interpreter, like https://htmledit.squarefree.com/ , https://onecompiler.com/html #or https://www.w3schools.com/tryit/ . 6 | 7 | #Code 1: 8 | -------------------------------------------------------------------------------- /Chapter2/Prompt1/hello_world_button.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Button Click 8 | 9 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /Chapter2/Prompt2/temperature_conversion.py: -------------------------------------------------------------------------------- 1 | """Prompt 2: Please give me an example of python code to make a simple script where if you put in Fahrenheit it gives Celsius but if you put in Celsius temperature it gives you Fahrenheit. 2 | 3 | This will need a Python interpreter or IDE. 4 | 5 | Copy it in and run it, see how well it works. 6 | 7 | Code 2: 8 | Written by Vincent Hall of Build Intellect Ltd. and ABT NEWS Ltd. 12 Feb 2024.""" 9 | 10 | def convert_temperature(temperature, unit): 11 | 12 | if unit.lower() == "f": 13 | 14 | celsius = (temperature - 32) * 5 / 9 15 | 16 | return celsius, "Celsius" 17 | 18 | elif unit.lower() == "c": 19 | 20 | fahrenheit = temperature * 9 / 5 + 32 21 | 22 | return fahrenheit, "Fahrenheit" 23 | 24 | else: 25 | 26 | return None, "Invalid unit" 27 | 28 | 29 | 30 | # Example usage 31 | 32 | temperature = float(input("Enter temperature: ")) 33 | 34 | unit = input("Enter unit (F/C): ") 35 | 36 | 37 | 38 | result, new_unit = convert_temperature(temperature, unit) 39 | 40 | 41 | 42 | if result is not None: 43 | 44 | print(f"{temperature} {unit} is equal to {result} {new_unit}") 45 | 46 | else: 47 | 48 | print("Invalid input") 49 | 50 | 51 | -------------------------------------------------------------------------------- /Chapter2/Prompt3/plot_data.py: -------------------------------------------------------------------------------- 1 | """Prompt 3: A block of code for Jupiter notebook that will if given a column of data display a plot a graph. 2 | Written by Vincent Hall of Build Intellect Ltd. and ABT NEWS Ltd. 12 Feb 2024.""" 3 | 4 | import pandas as pd 5 | 6 | import matplotlib.pyplot as plt 7 | 8 | 9 | 10 | # Sample data (replace with your data) 11 | 12 | data = pd.Series([1, 2, 3, 4, 5]) 13 | 14 | 15 | 16 | # Assuming the data is in a column named "values" 17 | 18 | fig, ax = plt.subplots() 19 | 20 | ax.plot(data) 21 | 22 | ax.set_xlabel("Index") 23 | 24 | ax.set_ylabel("Value") 25 | 26 | ax.set_title("Line Plot of Data") 27 | 28 | plt.show() 29 | -------------------------------------------------------------------------------- /Chapter2/Prompt4/load_image.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on Mon Feb 12 12:11:03 2024 4 | 5 | @author: Written by Vincent Hall 6 | of Build Intellect Ltd. and ABT NEWS Ltd. 12 Feb 2024. 7 | """ 8 | 9 | from tkinter import Tk, Label, Button, filedialog 10 | from PIL import Image, ImageTk 11 | 12 | # Initialize Tkinter window 13 | root = Tk() 14 | 15 | # Create a label to display the image 16 | label = Label(root) 17 | label.pack() 18 | 19 | # Define a function to load an image 20 | def load_image(): 21 | filename = filedialog.askopenfilename(title="Select an image", filetypes=[("Image Files", "*.jpg;*.png")]) 22 | if filename: 23 | try: 24 | # Open the image using PIL 25 | img = Image.open(filename) 26 | 27 | # Convert the image to Tkinter format 28 | tk_img = ImageTk.PhotoImage(img, master=root) 29 | 30 | # Update the label with the new image 31 | label.config(image=tk_img) 32 | label.image = tk_img # Keep a reference to the image to prevent garbage collection 33 | except Exception as e: 34 | print("Error loading image:", e) 35 | 36 | # Create a button to trigger the image loading 37 | button = Button(root, text="Load Image", command=load_image) 38 | button.pack() 39 | 40 | # Run the window's main loop 41 | root.mainloop() 42 | -------------------------------------------------------------------------------- /Chapter2/Prompt5/Flask/app.py: -------------------------------------------------------------------------------- 1 | # -*-- coding: utf-8 -*- 2 | """ 3 | Created on Wed Mar 20 12:52:02 2024 4 | @author: Vincent Hall, Build Intellect Ltd. 5 | 6 | run this code from a simple, short file path like C:/Users/username/code/ (That's the Windows example.) 7 | """ 8 | 9 | from flask import Flask, render_template 10 | 11 | #app = Flask(__name__, template_folder=os.path.abspath('C:/Users/mutan/code/Python Script/Prompt5/templates/')) 12 | app = Flask(__name__)#, template_folder='/templates/') 13 | print(app.template_folder) 14 | @app.route('/') 15 | def index(): 16 | return render_template('index.html') 17 | 18 | if __name__ == '__main__': 19 | app.run(debug=True) 20 | 21 | -------------------------------------------------------------------------------- /Chapter2/Prompt5/Flask/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Calculator 5 | 30 | 31 | 32 |
33 | 34 |
35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 |
52 |
53 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /Chapter2/Prompt5/html/Prompt5_Claude3Sonnet.html: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on Wed Mar 6 17:12:16 2024 4 | 5 | @author: Vincent Hall and Claude 3 Sonet by Anthropic. 6 | 7 | """ 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | Calculator 16 | 48 | 49 | 50 |
51 | 52 |
53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 |
72 |
73 | 74 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /Chapter2/requirements.txt: -------------------------------------------------------------------------------- 1 | alabaster @ file:///home/ktietz/src/ci/alabaster_1611921544520/work 2 | anaconda-client==1.11.2 3 | anaconda-navigator==2.4.0 4 | anaconda-project @ file:///C:/Windows/TEMP/abs_91fu4tfkih/croots/recipe/anaconda-project_1660339890874/work 5 | anyio @ file:///C:/ci/anyio_1644481856696/work/dist 6 | appdirs==1.4.4 7 | argon2-cffi @ file:///opt/conda/conda-bld/argon2-cffi_1645000214183/work 8 | argon2-cffi-bindings @ file:///C:/ci/argon2-cffi-bindings_1644569876605/work 9 | arrow @ file:///C:/b/abs_cal7u12ktb/croot/arrow_1676588147908/work 10 | astroid @ file:///C:/b/abs_d4lg3_taxn/croot/astroid_1676904351456/work 11 | astropy @ file:///C:/ci/astropy_1657719642921/work 12 | asttokens @ file:///opt/conda/conda-bld/asttokens_1646925590279/work 13 | atomicwrites==1.4.0 14 | attrs @ file:///C:/b/abs_09s3y775ra/croot/attrs_1668696195628/work 15 | Automat @ file:///tmp/build/80754af9/automat_1600298431173/work 16 | autopep8 @ file:///opt/conda/conda-bld/autopep8_1650463822033/work 17 | Babel @ file:///C:/b/abs_a2shv_3tqi/croot/babel_1671782804377/work 18 | backcall @ file:///home/ktietz/src/ci/backcall_1611930011877/work 19 | backports.functools-lru-cache @ file:///tmp/build/80754af9/backports.functools_lru_cache_1618170165463/work 20 | backports.tempfile @ file:///home/linux1/recipes/ci/backports.tempfile_1610991236607/work 21 | backports.weakref==1.0.post1 22 | bcrypt @ file:///C:/Windows/Temp/abs_36kl66t_aw/croots/recipe/bcrypt_1659554334050/work 23 | beautifulsoup4 @ file:///C:/ci/beautifulsoup4_1650293028159/work 24 | binaryornot @ file:///tmp/build/80754af9/binaryornot_1617751525010/work 25 | bitarray==2.9.2 26 | black @ file:///C:/ci/black_1660221726201/work 27 | bleach @ file:///opt/conda/conda-bld/bleach_1641577558959/work 28 | blis==0.7.9 29 | bokeh @ file:///C:/Windows/TEMP/abs_4a259bc2-ed05-4a1f-808e-ac712cc0900cddqp8sp7/croots/recipe/bokeh_1658136660686/work 30 | boltons @ file:///C:/b/abs_707eo7c09t/croot/boltons_1677628723117/work 31 | Bottleneck @ file:///C:/Windows/Temp/abs_3198ca53-903d-42fd-87b4-03e6d03a8381yfwsuve8/croots/recipe/bottleneck_1657175565403/work 32 | brotlipy==0.7.0 33 | catalogue==2.0.8 34 | certifi @ file:///C:/b/abs_85o_6fm0se/croot/certifi_1671487778835/work/certifi 35 | cffi @ file:///C:/b/abs_49n3v2hyhr/croot/cffi_1670423218144/work 36 | chardet @ file:///C:/ci_310/chardet_1642114080098/work 37 | charset-normalizer @ file:///tmp/build/80754af9/charset-normalizer_1630003229654/work 38 | click @ file:///C:/ci/click_1646056762388/work 39 | cloudpickle @ file:///tmp/build/80754af9/cloudpickle_1632508026186/work 40 | clyent==1.2.2 41 | colorama @ file:///C:/b/abs_a9ozq0l032/croot/colorama_1672387194846/work 42 | colorcet @ file:///C:/b/abs_46vyu0rpdl/croot/colorcet_1668084513237/work 43 | comm @ file:///C:/b/abs_1419earm7u/croot/comm_1671231131638/work 44 | conda==23.3.1 45 | conda-build==3.24.0 46 | conda-content-trust @ file:///C:/Windows/TEMP/abs_4589313d-fc62-4ccc-81c0-b801b4449e833j1ajrwu/croots/recipe/conda-content-trust_1658126379362/work 47 | conda-pack @ file:///tmp/build/80754af9/conda-pack_1611163042455/work 48 | conda-package-handling @ file:///C:/b/abs_fcga8w0uem/croot/conda-package-handling_1672865024290/work 49 | conda-repo-cli==1.0.41 50 | conda-token @ file:///Users/paulyim/miniconda3/envs/c3i/conda-bld/conda-token_1662660369760/work 51 | conda-verify==3.4.2 52 | conda_package_streaming @ file:///C:/b/abs_0e5n5hdal3/croot/conda-package-streaming_1670508162902/work 53 | confection==0.0.4 54 | constantly==15.1.0 55 | contourpy @ file:///C:/b/abs_d5rpy288vc/croots/recipe/contourpy_1663827418189/work 56 | cookiecutter @ file:///opt/conda/conda-bld/cookiecutter_1649151442564/work 57 | cryptography @ file:///C:/b/abs_8ecplyc3n2/croot/cryptography_1677533105000/work 58 | cssselect==1.1.0 59 | cycler @ file:///tmp/build/80754af9/cycler_1637851556182/work 60 | cymem==2.0.7 61 | cytoolz @ file:///C:/b/abs_61m9vzb4qh/croot/cytoolz_1667465938275/work 62 | daal4py==2023.0.2 63 | dask @ file:///C:/ci/dask-core_1658497112560/work 64 | datashader @ file:///C:/b/abs_e80f3d7ac0/croot/datashader_1676023254070/work 65 | datashape==0.5.4 66 | debugpy @ file:///C:/ci_310/debugpy_1642079916595/work 67 | decorator @ file:///opt/conda/conda-bld/decorator_1643638310831/work 68 | defusedxml @ file:///tmp/build/80754af9/defusedxml_1615228127516/work 69 | diff-match-patch @ file:///Users/ktietz/demo/mc3/conda-bld/diff-match-patch_1630511840874/work 70 | dill @ file:///C:/b/abs_42h_07z1yj/croot/dill_1667919550096/work 71 | distributed @ file:///C:/ci/distributed_1658523963030/work 72 | docstring-to-markdown @ file:///C:/b/abs_cf10j8nr4q/croot/docstring-to-markdown_1673447652942/work 73 | docutils @ file:///C:/Windows/TEMP/abs_24e5e278-4d1c-47eb-97b9-f761d871f482dy2vg450/croots/recipe/docutils_1657175444608/work 74 | entrypoints @ file:///C:/ci/entrypoints_1649926676279/work 75 | et-xmlfile==1.1.0 76 | executing @ file:///opt/conda/conda-bld/executing_1646925071911/work 77 | fastjsonschema @ file:///C:/Users/BUILDE~1/AppData/Local/Temp/abs_ebruxzvd08/croots/recipe/python-fastjsonschema_1661376484940/work 78 | filelock @ file:///C:/b/abs_c7yrhs9uz2/croot/filelock_1672387617533/work 79 | flake8 @ file:///C:/b/abs_9f6_n1jlpc/croot/flake8_1674581816810/work 80 | Flask @ file:///C:/b/abs_ef16l83sif/croot/flask_1671217367534/work 81 | flit_core @ file:///opt/conda/conda-bld/flit-core_1644941570762/work/source/flit_core 82 | fonttools==4.25.0 83 | fsspec @ file:///C:/b/abs_5bjz6v0w_f/croot/fsspec_1670336608940/work 84 | future @ file:///C:/b/abs_3dcibf18zi/croot/future_1677599891380/work 85 | gensim @ file:///C:/b/abs_a5vat69tv8/croot/gensim_1674853640591/work 86 | glob2 @ file:///home/linux1/recipes/ci/glob2_1610991677669/work 87 | greenlet @ file:///C:/b/abs_47lk_w2ajq/croot/greenlet_1670513248400/work 88 | h5py @ file:///C:/ci/h5py_1659089830381/work 89 | HeapDict @ file:///Users/ktietz/demo/mc3/conda-bld/heapdict_1630598515714/work 90 | holoviews @ file:///C:/b/abs_bbf97_0kcd/croot/holoviews_1676372911083/work 91 | huggingface-hub @ file:///C:/b/abs_8d8wo2z8c6/croot/huggingface_hub_1667490298905/work 92 | hvplot @ file:///C:/b/abs_13un17_4x_/croot/hvplot_1670508919193/work 93 | hyperlink @ file:///tmp/build/80754af9/hyperlink_1610130746837/work 94 | idna @ file:///C:/b/abs_bdhbebrioa/croot/idna_1666125572046/work 95 | imagecodecs @ file:///C:/b/abs_f0cr12h73p/croot/imagecodecs_1677576746499/work 96 | imageio @ file:///C:/b/abs_27kq2gy1us/croot/imageio_1677879918708/work 97 | imagesize @ file:///C:/Windows/TEMP/abs_3cecd249-3fc4-4bfc-b80b-bb227b0d701en12vqzot/croots/recipe/imagesize_1657179501304/work 98 | imbalanced-learn @ file:///C:/b/abs_1911ryuksz/croot/imbalanced-learn_1677191585237/work 99 | importlib-metadata @ file:///C:/ci/importlib-metadata_1648544469310/work 100 | incremental @ file:///tmp/build/80754af9/incremental_1636629750599/work 101 | inflection==0.5.1 102 | iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work 103 | intake @ file:///C:/b/abs_42yyb2lhwx/croot/intake_1676619887779/work 104 | intervaltree @ file:///Users/ktietz/demo/mc3/conda-bld/intervaltree_1630511889664/work 105 | ipykernel @ file:///C:/b/abs_b4f07tbsyd/croot/ipykernel_1672767104060/work 106 | ipython @ file:///C:/b/abs_d3h279dv3h/croot/ipython_1676582236558/work 107 | ipython-genutils @ file:///tmp/build/80754af9/ipython_genutils_1606773439826/work 108 | ipywidgets @ file:///tmp/build/80754af9/ipywidgets_1634143127070/work 109 | isort @ file:///tmp/build/80754af9/isort_1628603791788/work 110 | itemadapter @ file:///tmp/build/80754af9/itemadapter_1626442940632/work 111 | itemloaders @ file:///opt/conda/conda-bld/itemloaders_1646805235997/work 112 | itsdangerous @ file:///tmp/build/80754af9/itsdangerous_1621432558163/work 113 | jedi @ file:///C:/ci/jedi_1644315428305/work 114 | jellyfish @ file:///C:/ci/jellyfish_1647962737334/work 115 | Jinja2 @ file:///C:/b/abs_7cdis66kl9/croot/jinja2_1666908141852/work 116 | jinja2-time @ file:///opt/conda/conda-bld/jinja2-time_1649251842261/work 117 | jmespath @ file:///Users/ktietz/demo/mc3/conda-bld/jmespath_1630583964805/work 118 | joblib @ file:///C:/b/abs_e60_bwl1v6/croot/joblib_1666298845728/work 119 | json5 @ file:///tmp/build/80754af9/json5_1624432770122/work 120 | jsonpatch @ file:///tmp/build/80754af9/jsonpatch_1615747632069/work 121 | jsonpointer==2.1 122 | jsonschema @ file:///C:/b/abs_6ccs97j_l8/croot/jsonschema_1676558690963/work 123 | jupyter @ file:///C:/Windows/TEMP/abs_56xfdi__li/croots/recipe/jupyter_1659349053177/work 124 | jupyter-console @ file:///C:/b/abs_68ttzd5p9c/croot/jupyter_console_1677674667636/work 125 | jupyter-server @ file:///C:/b/abs_1cfi3__jl8/croot/jupyter_server_1671707636383/work 126 | jupyter_client @ file:///C:/ci/jupyter_client_1661834530766/work 127 | jupyter_core @ file:///C:/b/abs_bd7elvu3w2/croot/jupyter_core_1676538600510/work 128 | jupyterlab @ file:///C:/b/abs_513jt6yy74/croot/jupyterlab_1675354138043/work 129 | jupyterlab-pygments @ file:///tmp/build/80754af9/jupyterlab_pygments_1601490720602/work 130 | jupyterlab-widgets @ file:///tmp/build/80754af9/jupyterlab_widgets_1609884341231/work 131 | jupyterlab_server @ file:///C:/b/abs_d1z_g1swc8/croot/jupyterlab_server_1677153204814/work 132 | keyring @ file:///C:/ci_310/keyring_1642165564669/work 133 | kiwisolver @ file:///C:/b/abs_88mdhvtahm/croot/kiwisolver_1672387921783/work 134 | langcodes==3.3.0 135 | lazy-object-proxy @ file:///C:/ci_310/lazy-object-proxy_1642083437654/work 136 | libarchive-c @ file:///tmp/build/80754af9/python-libarchive-c_1617780486945/work 137 | llvmlite==0.39.1 138 | locket @ file:///C:/ci/locket_1652904090946/work 139 | lxml @ file:///C:/ci/lxml_1657527492694/work 140 | lz4 @ file:///C:/ci_310/lz4_1643300078932/work 141 | Markdown @ file:///C:/b/abs_98lv_ucina/croot/markdown_1671541919225/work 142 | MarkupSafe @ file:///C:/ci/markupsafe_1654508036328/work 143 | matplotlib @ file:///C:/b/abs_b2d7uv90hg/croot/matplotlib-suite_1677674332463/work 144 | matplotlib-inline @ file:///C:/ci/matplotlib-inline_1661934094726/work 145 | mccabe @ file:///opt/conda/conda-bld/mccabe_1644221741721/work 146 | menuinst @ file:///C:/Users/BUILDE~1/AppData/Local/Temp/abs_455sf5o0ct/croots/recipe/menuinst_1661805970842/work 147 | mistune @ file:///C:/ci_310/mistune_1642084168466/work 148 | mkl-fft==1.3.1 149 | mkl-random @ file:///C:/ci_310/mkl_random_1643050563308/work 150 | mkl-service==2.4.0 151 | mock @ file:///tmp/build/80754af9/mock_1607622725907/work 152 | mpmath==1.2.1 153 | msgpack @ file:///C:/ci/msgpack-python_1652348582618/work 154 | multipledispatch @ file:///C:/ci_310/multipledispatch_1642084438481/work 155 | munkres==1.1.4 156 | murmurhash==1.0.9 157 | mypy-extensions==0.4.3 158 | navigator-updater==0.3.0 159 | nbclassic @ file:///C:/b/abs_d0_ze5q0j2/croot/nbclassic_1676902914817/work 160 | nbclient @ file:///C:/ci/nbclient_1650308592199/work 161 | nbconvert @ file:///C:/b/abs_4av3q4okro/croot/nbconvert_1668450658054/work 162 | nbformat @ file:///C:/b/abs_85_3g7dkt4/croot/nbformat_1670352343720/work 163 | nest-asyncio @ file:///C:/b/abs_3a_4jsjlqu/croot/nest-asyncio_1672387322800/work 164 | networkx @ file:///C:/ci/networkx_1657716953747/work 165 | nltk @ file:///opt/conda/conda-bld/nltk_1645628263994/work 166 | notebook @ file:///C:/b/abs_ca13hqvuzw/croot/notebook_1668179888546/work 167 | notebook_shim @ file:///C:/b/abs_ebfczttg6x/croot/notebook-shim_1668160590914/work 168 | numba @ file:///C:/b/abs_e53pp2e4k7/croot/numba_1670258349527/work 169 | numexpr @ file:///C:/b/abs_a7kbak88hk/croot/numexpr_1668713882979/work 170 | numpy @ file:///C:/b/abs_datssh7cer/croot/numpy_and_numpy_base_1672336199388/work 171 | numpydoc @ file:///C:/b/abs_cfdd4zxbga/croot/numpydoc_1668085912100/work 172 | opencv-python==4.9.0.80 173 | openpyxl==3.0.10 174 | packaging @ file:///C:/b/abs_cfsup8ur87/croot/packaging_1671697442297/work 175 | pandas @ file:///C:/b/abs_b9kefbuby2/croot/pandas_1677835593760/work 176 | pandocfilters @ file:///opt/conda/conda-bld/pandocfilters_1643405455980/work 177 | panel @ file:///C:/b/abs_55ujq2fpyh/croot/panel_1676379705003/work 178 | param @ file:///C:/b/abs_d799n8xz_7/croot/param_1671697759755/work 179 | paramiko @ file:///opt/conda/conda-bld/paramiko_1640109032755/work 180 | parsel @ file:///C:/ci/parsel_1646722035970/work 181 | parso @ file:///opt/conda/conda-bld/parso_1641458642106/work 182 | partd @ file:///opt/conda/conda-bld/partd_1647245470509/work 183 | pathlib @ file:///Users/ktietz/demo/mc3/conda-bld/pathlib_1629713961906/work 184 | pathspec @ file:///C:/b/abs_9cu5_2yb3i/croot/pathspec_1674681579249/work 185 | pathy==0.10.2 186 | patsy==0.5.3 187 | pdfreader==0.1.12 188 | pep8==1.7.1 189 | pexpect @ file:///tmp/build/80754af9/pexpect_1605563209008/work 190 | pickleshare @ file:///tmp/build/80754af9/pickleshare_1606932040724/work 191 | Pillow==9.4.0 192 | pkginfo @ file:///C:/b/abs_d18srtr68x/croot/pkginfo_1679431192239/work 193 | platformdirs @ file:///C:/b/abs_73cc5cz_1u/croots/recipe/platformdirs_1662711386458/work 194 | plotly @ file:///C:/ci/plotly_1658160673416/work 195 | pluggy @ file:///C:/ci/pluggy_1648042746254/work 196 | ply==3.11 197 | pooch @ file:///tmp/build/80754af9/pooch_1623324770023/work 198 | poyo @ file:///tmp/build/80754af9/poyo_1617751526755/work 199 | preshed==3.0.8 200 | prometheus-client @ file:///C:/Windows/TEMP/abs_ab9nx8qb08/croots/recipe/prometheus_client_1659455104602/work 201 | prompt-toolkit @ file:///C:/b/abs_6coz5_9f2s/croot/prompt-toolkit_1672387908312/work 202 | Protego @ file:///tmp/build/80754af9/protego_1598657180827/work 203 | psutil @ file:///C:/Windows/Temp/abs_b2c2fd7f-9fd5-4756-95ea-8aed74d0039flsd9qufz/croots/recipe/psutil_1656431277748/work 204 | ptyprocess @ file:///tmp/build/80754af9/ptyprocess_1609355006118/work/dist/ptyprocess-0.7.0-py2.py3-none-any.whl 205 | pure-eval @ file:///opt/conda/conda-bld/pure_eval_1646925070566/work 206 | py @ file:///opt/conda/conda-bld/py_1644396412707/work 207 | pyasn1 @ file:///Users/ktietz/demo/mc3/conda-bld/pyasn1_1629708007385/work 208 | pyasn1-modules==0.2.8 209 | pycodestyle @ file:///C:/b/abs_d77nxvklcq/croot/pycodestyle_1674267231034/work 210 | pycosat @ file:///C:/b/abs_4b1rrw8pn9/croot/pycosat_1666807711599/work 211 | pycparser @ file:///tmp/build/80754af9/pycparser_1636541352034/work 212 | pycryptodome==3.20.0 213 | pyct @ file:///C:/b/abs_92z17k7ig2/croot/pyct_1675450330889/work 214 | pycurl==7.45.1 215 | pydantic==1.10.9 216 | PyDispatcher==2.0.5 217 | pydocstyle @ file:///C:/b/abs_6dz687_5i3/croot/pydocstyle_1675221688656/work 218 | pyerfa @ file:///C:/ci_310/pyerfa_1642088497201/work 219 | pyflakes @ file:///C:/b/abs_6dve6e13zh/croot/pyflakes_1674165143327/work 220 | Pygments @ file:///opt/conda/conda-bld/pygments_1644249106324/work 221 | PyHamcrest @ file:///tmp/build/80754af9/pyhamcrest_1615748656804/work 222 | PyJWT @ file:///C:/ci/pyjwt_1657529477795/work 223 | pylint @ file:///C:/b/abs_83sq99jc8i/croot/pylint_1676919922167/work 224 | pylint-venv @ file:///C:/b/abs_bf0lepsbij/croot/pylint-venv_1673990138593/work 225 | pyls-spyder==0.4.0 226 | PyNaCl @ file:///C:/Windows/Temp/abs_d5c3ajcm87/croots/recipe/pynacl_1659620667490/work 227 | pyodbc @ file:///C:/Windows/Temp/abs_61e3jz3u05/croots/recipe/pyodbc_1659513801402/work 228 | pyOpenSSL @ file:///C:/b/abs_552w85x1jz/croot/pyopenssl_1677607703691/work 229 | pyparsing @ file:///C:/Users/BUILDE~1/AppData/Local/Temp/abs_7f_7lba6rl/croots/recipe/pyparsing_1661452540662/work 230 | PyPDF2==3.0.1 231 | PyQt5==5.15.7 232 | PyQt5-sip @ file:///C:/Windows/Temp/abs_d7gmd2jg8i/croots/recipe/pyqt-split_1659273064801/work/pyqt_sip 233 | PyQtWebEngine==5.15.4 234 | pyrsistent @ file:///C:/ci_310/pyrsistent_1642117077485/work 235 | PySocks @ file:///C:/ci_310/pysocks_1642089375450/work 236 | pytest==7.1.2 237 | python-dateutil @ file:///tmp/build/80754af9/python-dateutil_1626374649649/work 238 | python-lsp-black @ file:///C:/Users/BUILDE~1/AppData/Local/Temp/abs_dddk9lhpp1/croots/recipe/python-lsp-black_1661852041405/work 239 | python-lsp-jsonrpc==1.0.0 240 | python-lsp-server @ file:///C:/b/abs_e44khh1wya/croot/python-lsp-server_1677296772730/work 241 | python-slugify @ file:///tmp/build/80754af9/python-slugify_1620405669636/work 242 | python-snappy @ file:///C:/b/abs_61b1fmzxcn/croot/python-snappy_1670943932513/work 243 | pytoolconfig @ file:///C:/b/abs_18sf9z_iwl/croot/pytoolconfig_1676315065270/work 244 | pytz @ file:///C:/b/abs_22fofvpn1x/croot/pytz_1671698059864/work 245 | pyviz-comms @ file:///tmp/build/80754af9/pyviz_comms_1623747165329/work 246 | PyWavelets @ file:///C:/b/abs_a8r4b1511a/croot/pywavelets_1670425185881/work 247 | pywin32==305.1 248 | pywin32-ctypes @ file:///C:/ci_310/pywin32-ctypes_1642657835512/work 249 | pywinpty @ file:///C:/b/abs_73vshmevwq/croot/pywinpty_1677609966356/work/target/wheels/pywinpty-2.0.10-cp310-none-win_amd64.whl 250 | PyYAML @ file:///C:/b/abs_d0g7dqt2xw/croot/pyyaml_1670514768165/work 251 | pyzmq @ file:///C:/ci/pyzmq_1657616000714/work 252 | QDarkStyle @ file:///tmp/build/80754af9/qdarkstyle_1617386714626/work 253 | qstylizer @ file:///C:/b/abs_ef86cgllby/croot/qstylizer_1674008538857/work/dist/qstylizer-0.2.2-py2.py3-none-any.whl 254 | QtAwesome @ file:///C:/b/abs_c5evilj98g/croot/qtawesome_1674008690220/work 255 | qtconsole @ file:///C:/b/abs_5bap7f8n0t/croot/qtconsole_1674008444833/work 256 | QtPy @ file:///C:/ci/qtpy_1662015130233/work 257 | queuelib==1.5.0 258 | regex @ file:///C:/ci/regex_1658258299320/work 259 | requests @ file:///C:/ci/requests_1657735340829/work 260 | requests-file @ file:///Users/ktietz/demo/mc3/conda-bld/requests-file_1629455781986/work 261 | requests-toolbelt @ file:///Users/ktietz/demo/mc3/conda-bld/requests-toolbelt_1629456163440/work 262 | rope @ file:///C:/b/abs_55g_tm_6ff/croot/rope_1676675029164/work 263 | Rtree @ file:///C:/b/abs_e116ltblik/croot/rtree_1675157871717/work 264 | ruamel-yaml-conda @ file:///C:/b/abs_6ejaexx82s/croot/ruamel_yaml_1667489767827/work 265 | ruamel.yaml @ file:///C:/b/abs_30ee5qbthd/croot/ruamel.yaml_1666304562000/work 266 | ruamel.yaml.clib @ file:///C:/b/abs_aarblxbilo/croot/ruamel.yaml.clib_1666302270884/work 267 | scikit-image @ file:///C:/b/abs_63r0vmx78u/croot/scikit-image_1669241746873/work 268 | scikit-learn @ file:///C:/b/abs_7ck_bnw91r/croot/scikit-learn_1676911676133/work 269 | scikit-learn-intelex==20230228.214818 270 | scipy==1.10.0 271 | Scrapy @ file:///C:/b/abs_9fn69i_d86/croot/scrapy_1677738199744/work 272 | seaborn @ file:///C:/b/abs_68ltdkoyoo/croot/seaborn_1673479199997/work 273 | Send2Trash @ file:///tmp/build/80754af9/send2trash_1632406701022/work 274 | service-identity @ file:///Users/ktietz/demo/mc3/conda-bld/service_identity_1629460757137/work 275 | sip @ file:///C:/Windows/Temp/abs_b8fxd17m2u/croots/recipe/sip_1659012372737/work 276 | six @ file:///tmp/build/80754af9/six_1644875935023/work 277 | smart-open @ file:///C:/ci/smart_open_1651235038100/work 278 | sniffio @ file:///C:/ci_310/sniffio_1642092172680/work 279 | snowballstemmer @ file:///tmp/build/80754af9/snowballstemmer_1637937080595/work 280 | sortedcontainers @ file:///tmp/build/80754af9/sortedcontainers_1623949099177/work 281 | soupsieve @ file:///C:/b/abs_fasraqxhlv/croot/soupsieve_1666296394662/work 282 | spacy==3.5.3 283 | spacy-legacy==3.0.12 284 | spacy-loggers==1.0.4 285 | Sphinx @ file:///C:/ci/sphinx_1657617157451/work 286 | sphinxcontrib-applehelp @ file:///home/ktietz/src/ci/sphinxcontrib-applehelp_1611920841464/work 287 | sphinxcontrib-devhelp @ file:///home/ktietz/src/ci/sphinxcontrib-devhelp_1611920923094/work 288 | sphinxcontrib-htmlhelp @ file:///tmp/build/80754af9/sphinxcontrib-htmlhelp_1623945626792/work 289 | sphinxcontrib-jsmath @ file:///home/ktietz/src/ci/sphinxcontrib-jsmath_1611920942228/work 290 | sphinxcontrib-qthelp @ file:///home/ktietz/src/ci/sphinxcontrib-qthelp_1611921055322/work 291 | sphinxcontrib-serializinghtml @ file:///tmp/build/80754af9/sphinxcontrib-serializinghtml_1624451540180/work 292 | spyder @ file:///C:/b/abs_93s9xkw3pn/croot/spyder_1677776163871/work 293 | spyder-kernels @ file:///C:/b/abs_feh4xo1mrn/croot/spyder-kernels_1673292245176/work 294 | SQLAlchemy @ file:///C:/Windows/Temp/abs_f8661157-660b-49bb-a790-69ab9f3b8f7c8a8s2psb/croots/recipe/sqlalchemy_1657867864564/work 295 | srsly==2.4.6 296 | stack-data @ file:///opt/conda/conda-bld/stack_data_1646927590127/work 297 | statsmodels @ file:///C:/b/abs_bdqo3zaryj/croot/statsmodels_1676646249859/work 298 | sympy @ file:///C:/b/abs_95fbf1z7n6/croot/sympy_1668202411612/work 299 | tables==3.7.0 300 | tabulate @ file:///C:/ci/tabulate_1657600805799/work 301 | TBB==0.2 302 | tblib @ file:///Users/ktietz/demo/mc3/conda-bld/tblib_1629402031467/work 303 | tenacity @ file:///C:/Windows/TEMP/abs_980d07a6-8e21-4174-9c17-7296219678ads7dhdov_/croots/recipe/tenacity_1657899108023/work 304 | terminado @ file:///C:/b/abs_25nakickad/croot/terminado_1671751845491/work 305 | text-unidecode @ file:///Users/ktietz/demo/mc3/conda-bld/text-unidecode_1629401354553/work 306 | textdistance @ file:///tmp/build/80754af9/textdistance_1612461398012/work 307 | thinc==8.1.10 308 | threadpoolctl @ file:///Users/ktietz/demo/mc3/conda-bld/threadpoolctl_1629802263681/work 309 | three-merge @ file:///tmp/build/80754af9/three-merge_1607553261110/work 310 | tifffile @ file:///tmp/build/80754af9/tifffile_1627275862826/work 311 | tinycss2 @ file:///C:/b/abs_52w5vfuaax/croot/tinycss2_1668168823131/work 312 | tldextract @ file:///opt/conda/conda-bld/tldextract_1646638314385/work 313 | tokenizers @ file:///C:/ci/tokenizers_1651821358528/work 314 | toml @ file:///tmp/build/80754af9/toml_1616166611790/work 315 | tomli @ file:///C:/Windows/TEMP/abs_ac109f85-a7b3-4b4d-bcfd-52622eceddf0hy332ojo/croots/recipe/tomli_1657175513137/work 316 | tomlkit @ file:///C:/Windows/TEMP/abs_3296qo9v6b/croots/recipe/tomlkit_1658946894808/work 317 | toolz @ file:///C:/b/abs_cfvk6rc40d/croot/toolz_1667464080130/work 318 | torch==1.12.1 319 | tornado @ file:///C:/ci_310/tornado_1642093111997/work 320 | tqdm @ file:///C:/b/abs_0axbz66qik/croots/recipe/tqdm_1664392691071/work 321 | traitlets @ file:///C:/b/abs_e5m_xjjl94/croot/traitlets_1671143896266/work 322 | transformers @ file:///C:/b/abs_8byf5_j714/croot/transformers_1667919454001/work 323 | Twisted @ file:///C:/Windows/Temp/abs_ccblv2rzfa/croots/recipe/twisted_1659592764512/work 324 | twisted-iocpsupport @ file:///C:/ci/twisted-iocpsupport_1646817083730/work 325 | typer==0.7.0 326 | typing_extensions @ file:///C:/b/abs_89eui86zuq/croot/typing_extensions_1669923792806/work 327 | ujson @ file:///C:/ci/ujson_1657525893897/work 328 | Unidecode @ file:///tmp/build/80754af9/unidecode_1614712377438/work 329 | urllib3 @ file:///C:/b/abs_9bcwxczrvm/croot/urllib3_1673575521331/work 330 | w3lib @ file:///Users/ktietz/demo/mc3/conda-bld/w3lib_1629359764703/work 331 | wasabi==1.1.2 332 | watchdog @ file:///C:/ci_310/watchdog_1642113443984/work 333 | wcwidth==0.2.13 334 | webencodings==0.5.1 335 | websocket-client @ file:///C:/ci_310/websocket-client_1642093970919/work 336 | Werkzeug @ file:///C:/b/abs_17q5kgb8bo/croot/werkzeug_1671216014857/work 337 | whatthepatch @ file:///C:/Users/BUILDE~1/AppData/Local/Temp/abs_e7bihs8grh/croots/recipe/whatthepatch_1661796085215/work 338 | widgetsnbextension @ file:///C:/ci/widgetsnbextension_1645009839917/work 339 | win-inet-pton @ file:///C:/ci_310/win_inet_pton_1642658466512/work 340 | wincertstore==0.2 341 | wrapt @ file:///C:/Windows/Temp/abs_7c3dd407-1390-477a-b542-fd15df6a24085_diwiza/croots/recipe/wrapt_1657814452175/work 342 | xarray @ file:///C:/b/abs_2fi_umrauo/croot/xarray_1668776806973/work 343 | xlwings @ file:///C:/b/abs_1ejhh6s00l/croot/xlwings_1677024180629/work 344 | yapf @ file:///tmp/build/80754af9/yapf_1615749224965/work 345 | zict==2.1.0 346 | zipp @ file:///C:/b/abs_b9jfdr908q/croot/zipp_1672387552360/work 347 | zope.interface @ file:///C:/ci_310/zope.interface_1642113633904/work 348 | zstandard==0.19.0 349 | -------------------------------------------------------------------------------- /Chapter3/refactored_DCT.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on Wed Mar 20 14:50:12 2024 4 | 5 | @author: Vince Hall ABT NEWS LTD. and Claude 3 Sonnet. 6 | """ 7 | import numpy as np 8 | from scipy.fft import dct, idct 9 | 10 | def compute_dct(data): 11 | """ 12 | Compute the Discrete Cosine Transform (DCT) of the input data. 13 | """ 14 | return dct(data, norm='ortho') 15 | 16 | def truncate_coefficients(coefficients, num_coefficients): 17 | """ 18 | Truncate the DCT coefficients to keep only the specified number of coefficients. 19 | """ 20 | return coefficients[:num_coefficients] 21 | 22 | def compress_timeseries(data, num_coefficients): 23 | """ 24 | Compress the time series data using DCT and return the truncated coefficients. 25 | """ 26 | half_len = len(data) // 2 27 | dct1 = compute_dct(data[:half_len]) 28 | dct2 = compute_dct(data[half_len:]) 29 | # coefficients = np.concatenate((truncate_coefficients(dct1, num_coefficients), 30 | # truncate_coefficients(dct2, num_coefficients))) 31 | 32 | 33 | # change from Gemini 1 Pro 34 | coefficients = [truncate_coefficients(dct1, num_coefficients), 35 | truncate_coefficients(dct2, num_coefficients)] 36 | 37 | 38 | return coefficients 39 | 40 | # Example usage 41 | data = [0.15, 9.347, -5.136, 8.764, 4.17, 12.056, 2.45, 9.03, 16.125] 42 | compressed_data = compress_timeseries(data, 3) 43 | print(compressed_data) 44 | -------------------------------------------------------------------------------- /Chapter3/requirements.txt: -------------------------------------------------------------------------------- 1 | alabaster @ file:///home/ktietz/src/ci/alabaster_1611921544520/work 2 | anaconda-client==1.11.2 3 | anaconda-navigator==2.4.0 4 | anaconda-project @ file:///C:/Windows/TEMP/abs_91fu4tfkih/croots/recipe/anaconda-project_1660339890874/work 5 | anyio @ file:///C:/ci/anyio_1644481856696/work/dist 6 | appdirs==1.4.4 7 | argon2-cffi @ file:///opt/conda/conda-bld/argon2-cffi_1645000214183/work 8 | argon2-cffi-bindings @ file:///C:/ci/argon2-cffi-bindings_1644569876605/work 9 | arrow @ file:///C:/b/abs_cal7u12ktb/croot/arrow_1676588147908/work 10 | astroid @ file:///C:/b/abs_d4lg3_taxn/croot/astroid_1676904351456/work 11 | astropy @ file:///C:/ci/astropy_1657719642921/work 12 | asttokens @ file:///opt/conda/conda-bld/asttokens_1646925590279/work 13 | atomicwrites==1.4.0 14 | attrs @ file:///C:/b/abs_09s3y775ra/croot/attrs_1668696195628/work 15 | Automat @ file:///tmp/build/80754af9/automat_1600298431173/work 16 | autopep8 @ file:///opt/conda/conda-bld/autopep8_1650463822033/work 17 | Babel @ file:///C:/b/abs_a2shv_3tqi/croot/babel_1671782804377/work 18 | backcall @ file:///home/ktietz/src/ci/backcall_1611930011877/work 19 | backports.functools-lru-cache @ file:///tmp/build/80754af9/backports.functools_lru_cache_1618170165463/work 20 | backports.tempfile @ file:///home/linux1/recipes/ci/backports.tempfile_1610991236607/work 21 | backports.weakref==1.0.post1 22 | bcrypt @ file:///C:/Windows/Temp/abs_36kl66t_aw/croots/recipe/bcrypt_1659554334050/work 23 | beautifulsoup4 @ file:///C:/ci/beautifulsoup4_1650293028159/work 24 | binaryornot @ file:///tmp/build/80754af9/binaryornot_1617751525010/work 25 | bitarray==2.9.2 26 | black @ file:///C:/ci/black_1660221726201/work 27 | bleach @ file:///opt/conda/conda-bld/bleach_1641577558959/work 28 | blis==0.7.9 29 | bokeh @ file:///C:/Windows/TEMP/abs_4a259bc2-ed05-4a1f-808e-ac712cc0900cddqp8sp7/croots/recipe/bokeh_1658136660686/work 30 | boltons @ file:///C:/b/abs_707eo7c09t/croot/boltons_1677628723117/work 31 | Bottleneck @ file:///C:/Windows/Temp/abs_3198ca53-903d-42fd-87b4-03e6d03a8381yfwsuve8/croots/recipe/bottleneck_1657175565403/work 32 | brotlipy==0.7.0 33 | catalogue==2.0.8 34 | certifi @ file:///C:/b/abs_85o_6fm0se/croot/certifi_1671487778835/work/certifi 35 | cffi @ file:///C:/b/abs_49n3v2hyhr/croot/cffi_1670423218144/work 36 | chardet @ file:///C:/ci_310/chardet_1642114080098/work 37 | charset-normalizer @ file:///tmp/build/80754af9/charset-normalizer_1630003229654/work 38 | click @ file:///C:/ci/click_1646056762388/work 39 | cloudpickle @ file:///tmp/build/80754af9/cloudpickle_1632508026186/work 40 | clyent==1.2.2 41 | colorama @ file:///C:/b/abs_a9ozq0l032/croot/colorama_1672387194846/work 42 | colorcet @ file:///C:/b/abs_46vyu0rpdl/croot/colorcet_1668084513237/work 43 | comm @ file:///C:/b/abs_1419earm7u/croot/comm_1671231131638/work 44 | conda==23.3.1 45 | conda-build==3.24.0 46 | conda-content-trust @ file:///C:/Windows/TEMP/abs_4589313d-fc62-4ccc-81c0-b801b4449e833j1ajrwu/croots/recipe/conda-content-trust_1658126379362/work 47 | conda-pack @ file:///tmp/build/80754af9/conda-pack_1611163042455/work 48 | conda-package-handling @ file:///C:/b/abs_fcga8w0uem/croot/conda-package-handling_1672865024290/work 49 | conda-repo-cli==1.0.41 50 | conda-token @ file:///Users/paulyim/miniconda3/envs/c3i/conda-bld/conda-token_1662660369760/work 51 | conda-verify==3.4.2 52 | conda_package_streaming @ file:///C:/b/abs_0e5n5hdal3/croot/conda-package-streaming_1670508162902/work 53 | confection==0.0.4 54 | constantly==15.1.0 55 | contourpy @ file:///C:/b/abs_d5rpy288vc/croots/recipe/contourpy_1663827418189/work 56 | cookiecutter @ file:///opt/conda/conda-bld/cookiecutter_1649151442564/work 57 | cryptography @ file:///C:/b/abs_8ecplyc3n2/croot/cryptography_1677533105000/work 58 | cssselect==1.1.0 59 | cycler @ file:///tmp/build/80754af9/cycler_1637851556182/work 60 | cymem==2.0.7 61 | cytoolz @ file:///C:/b/abs_61m9vzb4qh/croot/cytoolz_1667465938275/work 62 | daal4py==2023.0.2 63 | dask @ file:///C:/ci/dask-core_1658497112560/work 64 | datashader @ file:///C:/b/abs_e80f3d7ac0/croot/datashader_1676023254070/work 65 | datashape==0.5.4 66 | debugpy @ file:///C:/ci_310/debugpy_1642079916595/work 67 | decorator @ file:///opt/conda/conda-bld/decorator_1643638310831/work 68 | defusedxml @ file:///tmp/build/80754af9/defusedxml_1615228127516/work 69 | diff-match-patch @ file:///Users/ktietz/demo/mc3/conda-bld/diff-match-patch_1630511840874/work 70 | dill @ file:///C:/b/abs_42h_07z1yj/croot/dill_1667919550096/work 71 | distributed @ file:///C:/ci/distributed_1658523963030/work 72 | docstring-to-markdown @ file:///C:/b/abs_cf10j8nr4q/croot/docstring-to-markdown_1673447652942/work 73 | docutils @ file:///C:/Windows/TEMP/abs_24e5e278-4d1c-47eb-97b9-f761d871f482dy2vg450/croots/recipe/docutils_1657175444608/work 74 | entrypoints @ file:///C:/ci/entrypoints_1649926676279/work 75 | et-xmlfile==1.1.0 76 | executing @ file:///opt/conda/conda-bld/executing_1646925071911/work 77 | fastjsonschema @ file:///C:/Users/BUILDE~1/AppData/Local/Temp/abs_ebruxzvd08/croots/recipe/python-fastjsonschema_1661376484940/work 78 | filelock @ file:///C:/b/abs_c7yrhs9uz2/croot/filelock_1672387617533/work 79 | flake8 @ file:///C:/b/abs_9f6_n1jlpc/croot/flake8_1674581816810/work 80 | Flask @ file:///C:/b/abs_ef16l83sif/croot/flask_1671217367534/work 81 | flit_core @ file:///opt/conda/conda-bld/flit-core_1644941570762/work/source/flit_core 82 | fonttools==4.25.0 83 | fsspec @ file:///C:/b/abs_5bjz6v0w_f/croot/fsspec_1670336608940/work 84 | future @ file:///C:/b/abs_3dcibf18zi/croot/future_1677599891380/work 85 | gensim @ file:///C:/b/abs_a5vat69tv8/croot/gensim_1674853640591/work 86 | glob2 @ file:///home/linux1/recipes/ci/glob2_1610991677669/work 87 | greenlet @ file:///C:/b/abs_47lk_w2ajq/croot/greenlet_1670513248400/work 88 | h5py @ file:///C:/ci/h5py_1659089830381/work 89 | HeapDict @ file:///Users/ktietz/demo/mc3/conda-bld/heapdict_1630598515714/work 90 | holoviews @ file:///C:/b/abs_bbf97_0kcd/croot/holoviews_1676372911083/work 91 | huggingface-hub @ file:///C:/b/abs_8d8wo2z8c6/croot/huggingface_hub_1667490298905/work 92 | hvplot @ file:///C:/b/abs_13un17_4x_/croot/hvplot_1670508919193/work 93 | hyperlink @ file:///tmp/build/80754af9/hyperlink_1610130746837/work 94 | idna @ file:///C:/b/abs_bdhbebrioa/croot/idna_1666125572046/work 95 | imagecodecs @ file:///C:/b/abs_f0cr12h73p/croot/imagecodecs_1677576746499/work 96 | imageio @ file:///C:/b/abs_27kq2gy1us/croot/imageio_1677879918708/work 97 | imagesize @ file:///C:/Windows/TEMP/abs_3cecd249-3fc4-4bfc-b80b-bb227b0d701en12vqzot/croots/recipe/imagesize_1657179501304/work 98 | imbalanced-learn @ file:///C:/b/abs_1911ryuksz/croot/imbalanced-learn_1677191585237/work 99 | importlib-metadata @ file:///C:/ci/importlib-metadata_1648544469310/work 100 | incremental @ file:///tmp/build/80754af9/incremental_1636629750599/work 101 | inflection==0.5.1 102 | iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work 103 | intake @ file:///C:/b/abs_42yyb2lhwx/croot/intake_1676619887779/work 104 | intervaltree @ file:///Users/ktietz/demo/mc3/conda-bld/intervaltree_1630511889664/work 105 | ipykernel @ file:///C:/b/abs_b4f07tbsyd/croot/ipykernel_1672767104060/work 106 | ipython @ file:///C:/b/abs_d3h279dv3h/croot/ipython_1676582236558/work 107 | ipython-genutils @ file:///tmp/build/80754af9/ipython_genutils_1606773439826/work 108 | ipywidgets @ file:///tmp/build/80754af9/ipywidgets_1634143127070/work 109 | isort @ file:///tmp/build/80754af9/isort_1628603791788/work 110 | itemadapter @ file:///tmp/build/80754af9/itemadapter_1626442940632/work 111 | itemloaders @ file:///opt/conda/conda-bld/itemloaders_1646805235997/work 112 | itsdangerous @ file:///tmp/build/80754af9/itsdangerous_1621432558163/work 113 | jedi @ file:///C:/ci/jedi_1644315428305/work 114 | jellyfish @ file:///C:/ci/jellyfish_1647962737334/work 115 | Jinja2 @ file:///C:/b/abs_7cdis66kl9/croot/jinja2_1666908141852/work 116 | jinja2-time @ file:///opt/conda/conda-bld/jinja2-time_1649251842261/work 117 | jmespath @ file:///Users/ktietz/demo/mc3/conda-bld/jmespath_1630583964805/work 118 | joblib @ file:///C:/b/abs_e60_bwl1v6/croot/joblib_1666298845728/work 119 | json5 @ file:///tmp/build/80754af9/json5_1624432770122/work 120 | jsonpatch @ file:///tmp/build/80754af9/jsonpatch_1615747632069/work 121 | jsonpointer==2.1 122 | jsonschema @ file:///C:/b/abs_6ccs97j_l8/croot/jsonschema_1676558690963/work 123 | jupyter @ file:///C:/Windows/TEMP/abs_56xfdi__li/croots/recipe/jupyter_1659349053177/work 124 | jupyter-console @ file:///C:/b/abs_68ttzd5p9c/croot/jupyter_console_1677674667636/work 125 | jupyter-server @ file:///C:/b/abs_1cfi3__jl8/croot/jupyter_server_1671707636383/work 126 | jupyter_client @ file:///C:/ci/jupyter_client_1661834530766/work 127 | jupyter_core @ file:///C:/b/abs_bd7elvu3w2/croot/jupyter_core_1676538600510/work 128 | jupyterlab @ file:///C:/b/abs_513jt6yy74/croot/jupyterlab_1675354138043/work 129 | jupyterlab-pygments @ file:///tmp/build/80754af9/jupyterlab_pygments_1601490720602/work 130 | jupyterlab-widgets @ file:///tmp/build/80754af9/jupyterlab_widgets_1609884341231/work 131 | jupyterlab_server @ file:///C:/b/abs_d1z_g1swc8/croot/jupyterlab_server_1677153204814/work 132 | keyring @ file:///C:/ci_310/keyring_1642165564669/work 133 | kiwisolver @ file:///C:/b/abs_88mdhvtahm/croot/kiwisolver_1672387921783/work 134 | langcodes==3.3.0 135 | lazy-object-proxy @ file:///C:/ci_310/lazy-object-proxy_1642083437654/work 136 | libarchive-c @ file:///tmp/build/80754af9/python-libarchive-c_1617780486945/work 137 | llvmlite==0.39.1 138 | locket @ file:///C:/ci/locket_1652904090946/work 139 | lxml @ file:///C:/ci/lxml_1657527492694/work 140 | lz4 @ file:///C:/ci_310/lz4_1643300078932/work 141 | Markdown @ file:///C:/b/abs_98lv_ucina/croot/markdown_1671541919225/work 142 | MarkupSafe @ file:///C:/ci/markupsafe_1654508036328/work 143 | matplotlib @ file:///C:/b/abs_b2d7uv90hg/croot/matplotlib-suite_1677674332463/work 144 | matplotlib-inline @ file:///C:/ci/matplotlib-inline_1661934094726/work 145 | mccabe @ file:///opt/conda/conda-bld/mccabe_1644221741721/work 146 | menuinst @ file:///C:/Users/BUILDE~1/AppData/Local/Temp/abs_455sf5o0ct/croots/recipe/menuinst_1661805970842/work 147 | mistune @ file:///C:/ci_310/mistune_1642084168466/work 148 | mkl-fft==1.3.1 149 | mkl-random @ file:///C:/ci_310/mkl_random_1643050563308/work 150 | mkl-service==2.4.0 151 | mock @ file:///tmp/build/80754af9/mock_1607622725907/work 152 | mpmath==1.2.1 153 | msgpack @ file:///C:/ci/msgpack-python_1652348582618/work 154 | multipledispatch @ file:///C:/ci_310/multipledispatch_1642084438481/work 155 | munkres==1.1.4 156 | murmurhash==1.0.9 157 | mypy-extensions==0.4.3 158 | navigator-updater==0.3.0 159 | nbclassic @ file:///C:/b/abs_d0_ze5q0j2/croot/nbclassic_1676902914817/work 160 | nbclient @ file:///C:/ci/nbclient_1650308592199/work 161 | nbconvert @ file:///C:/b/abs_4av3q4okro/croot/nbconvert_1668450658054/work 162 | nbformat @ file:///C:/b/abs_85_3g7dkt4/croot/nbformat_1670352343720/work 163 | nest-asyncio @ file:///C:/b/abs_3a_4jsjlqu/croot/nest-asyncio_1672387322800/work 164 | networkx @ file:///C:/ci/networkx_1657716953747/work 165 | nltk @ file:///opt/conda/conda-bld/nltk_1645628263994/work 166 | notebook @ file:///C:/b/abs_ca13hqvuzw/croot/notebook_1668179888546/work 167 | notebook_shim @ file:///C:/b/abs_ebfczttg6x/croot/notebook-shim_1668160590914/work 168 | numba @ file:///C:/b/abs_e53pp2e4k7/croot/numba_1670258349527/work 169 | numexpr @ file:///C:/b/abs_a7kbak88hk/croot/numexpr_1668713882979/work 170 | numpy @ file:///C:/b/abs_datssh7cer/croot/numpy_and_numpy_base_1672336199388/work 171 | numpydoc @ file:///C:/b/abs_cfdd4zxbga/croot/numpydoc_1668085912100/work 172 | opencv-python==4.9.0.80 173 | openpyxl==3.0.10 174 | packaging @ file:///C:/b/abs_cfsup8ur87/croot/packaging_1671697442297/work 175 | pandas @ file:///C:/b/abs_b9kefbuby2/croot/pandas_1677835593760/work 176 | pandocfilters @ file:///opt/conda/conda-bld/pandocfilters_1643405455980/work 177 | panel @ file:///C:/b/abs_55ujq2fpyh/croot/panel_1676379705003/work 178 | param @ file:///C:/b/abs_d799n8xz_7/croot/param_1671697759755/work 179 | paramiko @ file:///opt/conda/conda-bld/paramiko_1640109032755/work 180 | parsel @ file:///C:/ci/parsel_1646722035970/work 181 | parso @ file:///opt/conda/conda-bld/parso_1641458642106/work 182 | partd @ file:///opt/conda/conda-bld/partd_1647245470509/work 183 | pathlib @ file:///Users/ktietz/demo/mc3/conda-bld/pathlib_1629713961906/work 184 | pathspec @ file:///C:/b/abs_9cu5_2yb3i/croot/pathspec_1674681579249/work 185 | pathy==0.10.2 186 | patsy==0.5.3 187 | pdfreader==0.1.12 188 | pep8==1.7.1 189 | pexpect @ file:///tmp/build/80754af9/pexpect_1605563209008/work 190 | pickleshare @ file:///tmp/build/80754af9/pickleshare_1606932040724/work 191 | Pillow==9.4.0 192 | pkginfo @ file:///C:/b/abs_d18srtr68x/croot/pkginfo_1679431192239/work 193 | platformdirs @ file:///C:/b/abs_73cc5cz_1u/croots/recipe/platformdirs_1662711386458/work 194 | plotly @ file:///C:/ci/plotly_1658160673416/work 195 | pluggy @ file:///C:/ci/pluggy_1648042746254/work 196 | ply==3.11 197 | pooch @ file:///tmp/build/80754af9/pooch_1623324770023/work 198 | poyo @ file:///tmp/build/80754af9/poyo_1617751526755/work 199 | preshed==3.0.8 200 | prometheus-client @ file:///C:/Windows/TEMP/abs_ab9nx8qb08/croots/recipe/prometheus_client_1659455104602/work 201 | prompt-toolkit @ file:///C:/b/abs_6coz5_9f2s/croot/prompt-toolkit_1672387908312/work 202 | Protego @ file:///tmp/build/80754af9/protego_1598657180827/work 203 | psutil @ file:///C:/Windows/Temp/abs_b2c2fd7f-9fd5-4756-95ea-8aed74d0039flsd9qufz/croots/recipe/psutil_1656431277748/work 204 | ptyprocess @ file:///tmp/build/80754af9/ptyprocess_1609355006118/work/dist/ptyprocess-0.7.0-py2.py3-none-any.whl 205 | pure-eval @ file:///opt/conda/conda-bld/pure_eval_1646925070566/work 206 | py @ file:///opt/conda/conda-bld/py_1644396412707/work 207 | pyasn1 @ file:///Users/ktietz/demo/mc3/conda-bld/pyasn1_1629708007385/work 208 | pyasn1-modules==0.2.8 209 | pycodestyle @ file:///C:/b/abs_d77nxvklcq/croot/pycodestyle_1674267231034/work 210 | pycosat @ file:///C:/b/abs_4b1rrw8pn9/croot/pycosat_1666807711599/work 211 | pycparser @ file:///tmp/build/80754af9/pycparser_1636541352034/work 212 | pycryptodome==3.20.0 213 | pyct @ file:///C:/b/abs_92z17k7ig2/croot/pyct_1675450330889/work 214 | pycurl==7.45.1 215 | pydantic==1.10.9 216 | PyDispatcher==2.0.5 217 | pydocstyle @ file:///C:/b/abs_6dz687_5i3/croot/pydocstyle_1675221688656/work 218 | pyerfa @ file:///C:/ci_310/pyerfa_1642088497201/work 219 | pyflakes @ file:///C:/b/abs_6dve6e13zh/croot/pyflakes_1674165143327/work 220 | Pygments @ file:///opt/conda/conda-bld/pygments_1644249106324/work 221 | PyHamcrest @ file:///tmp/build/80754af9/pyhamcrest_1615748656804/work 222 | PyJWT @ file:///C:/ci/pyjwt_1657529477795/work 223 | pylint @ file:///C:/b/abs_83sq99jc8i/croot/pylint_1676919922167/work 224 | pylint-venv @ file:///C:/b/abs_bf0lepsbij/croot/pylint-venv_1673990138593/work 225 | pyls-spyder==0.4.0 226 | PyNaCl @ file:///C:/Windows/Temp/abs_d5c3ajcm87/croots/recipe/pynacl_1659620667490/work 227 | pyodbc @ file:///C:/Windows/Temp/abs_61e3jz3u05/croots/recipe/pyodbc_1659513801402/work 228 | pyOpenSSL @ file:///C:/b/abs_552w85x1jz/croot/pyopenssl_1677607703691/work 229 | pyparsing @ file:///C:/Users/BUILDE~1/AppData/Local/Temp/abs_7f_7lba6rl/croots/recipe/pyparsing_1661452540662/work 230 | PyPDF2==3.0.1 231 | PyQt5==5.15.7 232 | PyQt5-sip @ file:///C:/Windows/Temp/abs_d7gmd2jg8i/croots/recipe/pyqt-split_1659273064801/work/pyqt_sip 233 | PyQtWebEngine==5.15.4 234 | pyrsistent @ file:///C:/ci_310/pyrsistent_1642117077485/work 235 | PySocks @ file:///C:/ci_310/pysocks_1642089375450/work 236 | pytest==7.1.2 237 | python-dateutil @ file:///tmp/build/80754af9/python-dateutil_1626374649649/work 238 | python-lsp-black @ file:///C:/Users/BUILDE~1/AppData/Local/Temp/abs_dddk9lhpp1/croots/recipe/python-lsp-black_1661852041405/work 239 | python-lsp-jsonrpc==1.0.0 240 | python-lsp-server @ file:///C:/b/abs_e44khh1wya/croot/python-lsp-server_1677296772730/work 241 | python-slugify @ file:///tmp/build/80754af9/python-slugify_1620405669636/work 242 | python-snappy @ file:///C:/b/abs_61b1fmzxcn/croot/python-snappy_1670943932513/work 243 | pytoolconfig @ file:///C:/b/abs_18sf9z_iwl/croot/pytoolconfig_1676315065270/work 244 | pytz @ file:///C:/b/abs_22fofvpn1x/croot/pytz_1671698059864/work 245 | pyviz-comms @ file:///tmp/build/80754af9/pyviz_comms_1623747165329/work 246 | PyWavelets @ file:///C:/b/abs_a8r4b1511a/croot/pywavelets_1670425185881/work 247 | pywin32==305.1 248 | pywin32-ctypes @ file:///C:/ci_310/pywin32-ctypes_1642657835512/work 249 | pywinpty @ file:///C:/b/abs_73vshmevwq/croot/pywinpty_1677609966356/work/target/wheels/pywinpty-2.0.10-cp310-none-win_amd64.whl 250 | PyYAML @ file:///C:/b/abs_d0g7dqt2xw/croot/pyyaml_1670514768165/work 251 | pyzmq @ file:///C:/ci/pyzmq_1657616000714/work 252 | QDarkStyle @ file:///tmp/build/80754af9/qdarkstyle_1617386714626/work 253 | qstylizer @ file:///C:/b/abs_ef86cgllby/croot/qstylizer_1674008538857/work/dist/qstylizer-0.2.2-py2.py3-none-any.whl 254 | QtAwesome @ file:///C:/b/abs_c5evilj98g/croot/qtawesome_1674008690220/work 255 | qtconsole @ file:///C:/b/abs_5bap7f8n0t/croot/qtconsole_1674008444833/work 256 | QtPy @ file:///C:/ci/qtpy_1662015130233/work 257 | queuelib==1.5.0 258 | regex @ file:///C:/ci/regex_1658258299320/work 259 | requests @ file:///C:/ci/requests_1657735340829/work 260 | requests-file @ file:///Users/ktietz/demo/mc3/conda-bld/requests-file_1629455781986/work 261 | requests-toolbelt @ file:///Users/ktietz/demo/mc3/conda-bld/requests-toolbelt_1629456163440/work 262 | rope @ file:///C:/b/abs_55g_tm_6ff/croot/rope_1676675029164/work 263 | Rtree @ file:///C:/b/abs_e116ltblik/croot/rtree_1675157871717/work 264 | ruamel-yaml-conda @ file:///C:/b/abs_6ejaexx82s/croot/ruamel_yaml_1667489767827/work 265 | ruamel.yaml @ file:///C:/b/abs_30ee5qbthd/croot/ruamel.yaml_1666304562000/work 266 | ruamel.yaml.clib @ file:///C:/b/abs_aarblxbilo/croot/ruamel.yaml.clib_1666302270884/work 267 | scikit-image @ file:///C:/b/abs_63r0vmx78u/croot/scikit-image_1669241746873/work 268 | scikit-learn @ file:///C:/b/abs_7ck_bnw91r/croot/scikit-learn_1676911676133/work 269 | scikit-learn-intelex==20230228.214818 270 | scipy==1.10.0 271 | Scrapy @ file:///C:/b/abs_9fn69i_d86/croot/scrapy_1677738199744/work 272 | seaborn @ file:///C:/b/abs_68ltdkoyoo/croot/seaborn_1673479199997/work 273 | Send2Trash @ file:///tmp/build/80754af9/send2trash_1632406701022/work 274 | service-identity @ file:///Users/ktietz/demo/mc3/conda-bld/service_identity_1629460757137/work 275 | sip @ file:///C:/Windows/Temp/abs_b8fxd17m2u/croots/recipe/sip_1659012372737/work 276 | six @ file:///tmp/build/80754af9/six_1644875935023/work 277 | smart-open @ file:///C:/ci/smart_open_1651235038100/work 278 | sniffio @ file:///C:/ci_310/sniffio_1642092172680/work 279 | snowballstemmer @ file:///tmp/build/80754af9/snowballstemmer_1637937080595/work 280 | sortedcontainers @ file:///tmp/build/80754af9/sortedcontainers_1623949099177/work 281 | soupsieve @ file:///C:/b/abs_fasraqxhlv/croot/soupsieve_1666296394662/work 282 | spacy==3.5.3 283 | spacy-legacy==3.0.12 284 | spacy-loggers==1.0.4 285 | Sphinx @ file:///C:/ci/sphinx_1657617157451/work 286 | sphinxcontrib-applehelp @ file:///home/ktietz/src/ci/sphinxcontrib-applehelp_1611920841464/work 287 | sphinxcontrib-devhelp @ file:///home/ktietz/src/ci/sphinxcontrib-devhelp_1611920923094/work 288 | sphinxcontrib-htmlhelp @ file:///tmp/build/80754af9/sphinxcontrib-htmlhelp_1623945626792/work 289 | sphinxcontrib-jsmath @ file:///home/ktietz/src/ci/sphinxcontrib-jsmath_1611920942228/work 290 | sphinxcontrib-qthelp @ file:///home/ktietz/src/ci/sphinxcontrib-qthelp_1611921055322/work 291 | sphinxcontrib-serializinghtml @ file:///tmp/build/80754af9/sphinxcontrib-serializinghtml_1624451540180/work 292 | spyder @ file:///C:/b/abs_93s9xkw3pn/croot/spyder_1677776163871/work 293 | spyder-kernels @ file:///C:/b/abs_feh4xo1mrn/croot/spyder-kernels_1673292245176/work 294 | SQLAlchemy @ file:///C:/Windows/Temp/abs_f8661157-660b-49bb-a790-69ab9f3b8f7c8a8s2psb/croots/recipe/sqlalchemy_1657867864564/work 295 | srsly==2.4.6 296 | stack-data @ file:///opt/conda/conda-bld/stack_data_1646927590127/work 297 | statsmodels @ file:///C:/b/abs_bdqo3zaryj/croot/statsmodels_1676646249859/work 298 | sympy @ file:///C:/b/abs_95fbf1z7n6/croot/sympy_1668202411612/work 299 | tables==3.7.0 300 | tabulate @ file:///C:/ci/tabulate_1657600805799/work 301 | TBB==0.2 302 | tblib @ file:///Users/ktietz/demo/mc3/conda-bld/tblib_1629402031467/work 303 | tenacity @ file:///C:/Windows/TEMP/abs_980d07a6-8e21-4174-9c17-7296219678ads7dhdov_/croots/recipe/tenacity_1657899108023/work 304 | terminado @ file:///C:/b/abs_25nakickad/croot/terminado_1671751845491/work 305 | text-unidecode @ file:///Users/ktietz/demo/mc3/conda-bld/text-unidecode_1629401354553/work 306 | textdistance @ file:///tmp/build/80754af9/textdistance_1612461398012/work 307 | thinc==8.1.10 308 | threadpoolctl @ file:///Users/ktietz/demo/mc3/conda-bld/threadpoolctl_1629802263681/work 309 | three-merge @ file:///tmp/build/80754af9/three-merge_1607553261110/work 310 | tifffile @ file:///tmp/build/80754af9/tifffile_1627275862826/work 311 | tinycss2 @ file:///C:/b/abs_52w5vfuaax/croot/tinycss2_1668168823131/work 312 | tldextract @ file:///opt/conda/conda-bld/tldextract_1646638314385/work 313 | tokenizers @ file:///C:/ci/tokenizers_1651821358528/work 314 | toml @ file:///tmp/build/80754af9/toml_1616166611790/work 315 | tomli @ file:///C:/Windows/TEMP/abs_ac109f85-a7b3-4b4d-bcfd-52622eceddf0hy332ojo/croots/recipe/tomli_1657175513137/work 316 | tomlkit @ file:///C:/Windows/TEMP/abs_3296qo9v6b/croots/recipe/tomlkit_1658946894808/work 317 | toolz @ file:///C:/b/abs_cfvk6rc40d/croot/toolz_1667464080130/work 318 | torch==1.12.1 319 | tornado @ file:///C:/ci_310/tornado_1642093111997/work 320 | tqdm @ file:///C:/b/abs_0axbz66qik/croots/recipe/tqdm_1664392691071/work 321 | traitlets @ file:///C:/b/abs_e5m_xjjl94/croot/traitlets_1671143896266/work 322 | transformers @ file:///C:/b/abs_8byf5_j714/croot/transformers_1667919454001/work 323 | Twisted @ file:///C:/Windows/Temp/abs_ccblv2rzfa/croots/recipe/twisted_1659592764512/work 324 | twisted-iocpsupport @ file:///C:/ci/twisted-iocpsupport_1646817083730/work 325 | typer==0.7.0 326 | typing_extensions @ file:///C:/b/abs_89eui86zuq/croot/typing_extensions_1669923792806/work 327 | ujson @ file:///C:/ci/ujson_1657525893897/work 328 | Unidecode @ file:///tmp/build/80754af9/unidecode_1614712377438/work 329 | urllib3 @ file:///C:/b/abs_9bcwxczrvm/croot/urllib3_1673575521331/work 330 | w3lib @ file:///Users/ktietz/demo/mc3/conda-bld/w3lib_1629359764703/work 331 | wasabi==1.1.2 332 | watchdog @ file:///C:/ci_310/watchdog_1642113443984/work 333 | wcwidth==0.2.13 334 | webencodings==0.5.1 335 | websocket-client @ file:///C:/ci_310/websocket-client_1642093970919/work 336 | Werkzeug @ file:///C:/b/abs_17q5kgb8bo/croot/werkzeug_1671216014857/work 337 | whatthepatch @ file:///C:/Users/BUILDE~1/AppData/Local/Temp/abs_e7bihs8grh/croots/recipe/whatthepatch_1661796085215/work 338 | widgetsnbextension @ file:///C:/ci/widgetsnbextension_1645009839917/work 339 | win-inet-pton @ file:///C:/ci_310/win_inet_pton_1642658466512/work 340 | wincertstore==0.2 341 | wrapt @ file:///C:/Windows/Temp/abs_7c3dd407-1390-477a-b542-fd15df6a24085_diwiza/croots/recipe/wrapt_1657814452175/work 342 | xarray @ file:///C:/b/abs_2fi_umrauo/croot/xarray_1668776806973/work 343 | xlwings @ file:///C:/b/abs_1ejhh6s00l/croot/xlwings_1677024180629/work 344 | yapf @ file:///tmp/build/80754af9/yapf_1615749224965/work 345 | zict==2.1.0 346 | zipp @ file:///C:/b/abs_b9jfdr908q/croot/zipp_1672387552360/work 347 | zope.interface @ file:///C:/ci_310/zope.interface_1642113633904/work 348 | zstandard==0.19.0 349 | -------------------------------------------------------------------------------- /Chapter4/LZMAcompress_bad.py: -------------------------------------------------------------------------------- 1 | """ 2 | Please give me some Python 3.10 code that compresses tabular data with LZMA2 that is very hard to understand because it’s badly-written. 3 | 4 | Here's an intentionally obfuscated and poorly written Python 3.10 code that compresses tabular data using the LZMA2 algorithm. This code is designed to be hard to understand and maintain: 5 | """ 6 | import lzma 7 | from typing import Any 8 | 9 | def j(b): 10 | c=[] 11 | d=lzma.LZMACompressor(lzma.FORMAT_ALONE) 12 | for a in b:e=''.join([str(f)+'\t'for f in a]);e=e[:-1].encode();c.extend(list(d.compress(e))) 13 | c.extend(list(d.flush())) 14 | return bytes(c) 15 | 16 | def l(m): 17 | o=[];p=lzma.LZMADecompressor();q=b'' 18 | for s in [m]: # Change: Iterate over a list containing the compressed data 19 | try: 20 | t=p.decompress(s) 21 | q+=t 22 | except lzma.LZMAError: 23 | u=p.flush() 24 | o.append(q.decode().split('\t')) 25 | q=u 26 | if q: 27 | o.append(q.decode().split('\t')) 28 | return o 29 | 30 | def k(v): 31 | w=[];x=[] 32 | for y in v:x.extend([z.split('\t')for z in y]) 33 | for a in zip(*x):w.append(list(a)) 34 | return w 35 | 36 | if __name__=='__main__': 37 | A=k([['Name','Age','City'],['Alice','25','New York'],['Bob','30','Los Angeles'],['Charlie','35','Chicago']]) 38 | B=j(A) 39 | with open('compressed.lzma','wb')as C:C.write(B) 40 | with open('compressed.lzma','rb')as D:E=D.read() 41 | F=l(E) 42 | G=k(F) 43 | print(G) 44 | 45 | """ 46 | What Claude 3 says about this code: 47 | 48 | The intentionally obfuscated and poorly written code that compresses tabular data using the LZMA2 algorithm in Python 3.10 exhibits several characteristics that make it hard to read and understand. Here are some of the main issues with the code: 49 | 1. Poor Variable Naming: The code uses single-letter variable names like a, b, c, d, e, f, m, n, o, p, q, r, s, t, u, v, w, x, y, and z, which provide no meaningful information about the purpose or content of the variables. This makes it extremely difficult to understand what each variable represents or what it's being used for. 50 | 2. Lack of Comments: The code is completely devoid of comments or docstrings, which would normally provide explanations for the code's purpose, functionality, and logic. Without any comments, it becomes a guessing game to understand what the code is trying to accomplish. 51 | 3. Convoluted Logic: The logic for compressing and decompressing the tabular data is spread across multiple functions (j, l, and k) and is unnecessarily complex. The code uses nested list comprehensions, unnecessary type conversions, and obscure operations that make it challenging to follow the flow of execution. 52 | 4. Violation of Coding Conventions: The code violates several Python coding conventions and best practices, such as using meaningful variable names, proper indentation and formatting, and separation of concerns. This makes it harder for developers familiar with Python conventions to understand the code. 53 | 5. Lack of Error Handling: The code does not include any error handling mechanisms or exception handling, which can lead to unexpected behavior and crashes in case of errors or edge cases. 54 | 6. Mixing of Functionality: The code mixes functionality related to compression, decompression, and data manipulation, making it harder to follow and maintain. Ideally, these concerns should be separated into distinct functions or modules. 55 | 7. Obscure Type Annotations: While the code uses type annotations, the annotations themselves are obscure and unhelpful due to the poor variable naming conventions. For example, the type annotation Any is used for all variables, which defeats the purpose of type annotations. 56 | 8. Unnecessary Complexity: The code introduces unnecessary complexity by using obscure techniques and terse expressions, sacrificing readability for brevity. This makes it harder for developers to understand and maintain the code, especially if they are unfamiliar with such techniques. 57 | 9. Lack of Modularity: The code is not designed in a modular way, making it difficult to integrate or reuse in larger applications or libraries. 58 | 10. Limited Extensibility: Due to the obfuscated nature of the code and the lack of proper documentation or comments, it becomes challenging to extend or modify the code without risking unintended consequences or introducing new bugs. 59 | Overall, the code exhibits numerous examples of poor coding practices and intentional obfuscation, making it extremely difficult to read, understand, and maintain. While this exercise is valuable for understanding the challenges of working with poorly written code, it serves as a reminder of the importance of writing clear, readable, and well-documented code in real-world software development scenarios. 60 | """ 61 | -------------------------------------------------------------------------------- /Chapter4/LZMAcompress_good.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on Wed Apr 10 16:08:55 2024 4 | 5 | @author: Vincent Hall, Build Intellect Ltd. 6 | 7 | Asking Claude 3 for some good code like that earlier: data compression with Python 8 | Prompt for Claude 3: Please give me some Python 3.10 code that compresses tabular data with LZMA2 that is easy to understand because it’s well-written. 9 | Here's a well-written Python 3.10 code that compresses tabular data using the LZMA2 algorithm. This code follows best practices and is designed to be easy to read and understand: 10 | python""" 11 | 12 | import lzma 13 | from typing import List 14 | 15 | def compress_tabular_data(tabular_data: List[List[str]]) -> bytes: 16 | """ 17 | Compresses tabular data using the LZMA2 algorithm. 18 | 19 | Args: 20 | tabular_data: A list of lists representing tabular data, where each inner list is a row. 21 | 22 | Returns: 23 | A bytes object containing the compressed tabular data. 24 | """ 25 | compressor = lzma.LZMACompressor(lzma.FORMAT_ALONE) 26 | compressed_data = [] 27 | 28 | for row in tabular_data: 29 | row_bytes = '\t'.join(row).encode() + b'\n' 30 | compressed_data.append(compressor.compress(row_bytes)) 31 | 32 | compressed_data.append(compressor.flush()) 33 | 34 | return b''.join(compressed_data) 35 | 36 | def decompress_tabular_data(compressed_data: bytes) -> List[List[str]]: 37 | """ 38 | Decompresses tabular data compressed using the LZMA2 algorithm. 39 | 40 | Args: 41 | compressed_data: A bytes object containing the compressed tabular data. 42 | 43 | Returns: 44 | A list of lists representing the decompressed tabular data, where each inner list is a row. 45 | """ 46 | decompressor = lzma.LZMADecompressor() 47 | decompressed_data = decompressor.decompress(compressed_data) 48 | rows = [row.split('\t') for row in decompressed_data.decode().split('\n') if row] 49 | return rows 50 | 51 | if __name__ == '__main__': 52 | tabular_data = [ 53 | ['Name', 'Age', 'City'], 54 | ['Alice', '25', 'New York'], 55 | ['Bob', '30', 'Los Angeles'], 56 | ['Charlie', '35', 'Chicago'] 57 | ] 58 | 59 | # Compress tabular data 60 | compressed_data = compress_tabular_data(tabular_data) 61 | 62 | # Save compressed data to a file 63 | with open('compressed_data.lzma', 'wb') as file: 64 | file.write(compressed_data) 65 | 66 | # Load compressed data from the file 67 | with open('compressed_data.lzma', 'rb') as file: 68 | compressed_data = file.read() 69 | 70 | # Decompress tabular data 71 | decompressed_data = decompress_tabular_data(compressed_data) 72 | print(decompressed_data) 73 | 74 | """What Claude 3 says about its own good code 75 | 76 | This code is easy to read and understand for the following reasons: 77 | 1. Clear Function Names: The function names compress_tabular_data and decompress_tabular_data clearly describe the purpose of each function. 78 | 2. Type Hints: The code uses type hints to specify the expected types of function arguments and return values, making it easier to understand the input and output formats. 79 | 3. Docstrings: Each function has a docstring that provides a brief description of the function's purpose, its arguments, and its return value. 80 | 4. Meaningful Variable Names: The variable names used in the code are descriptive and self-explanatory, making it easier to understand what each variable represents. 81 | 5. Separation of Concerns: The code separates the compression and decompression logic into two distinct functions, making it easier to maintain and extend. 82 | 6. Proper Indentation and Formatting: The code is properly indented and formatted, making it more readable and visually appealing. 83 | 7. Error Handling: While not explicitly shown in this example, the code can be extended to include error handling mechanisms to handle potential exceptions or errors during compression or decompression. 84 | 8. Modular Design: The code is designed in a modular way, allowing for easy integration into larger applications or libraries. 85 | 9. Use of Standard Library: The code uses the standard lzma module from the Python standard library, which is well-documented and widely used. 86 | 10. Example Usage: The code includes an example usage in the if __name__ == '__main__' block, making it easy to understand how to use the functions. 87 | Overall, this code follows best practices for writing clean, readable, and maintainable Python code. It should be easy to understand for developers familiar with Python and the LZMA2 compression algorithm. 88 | 89 | """ 90 | -------------------------------------------------------------------------------- /Chapter4/crypto_price_and_indictators.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on Fri Apr 12 13:31:27 2024 4 | 5 | @author: Vincent Hall and Gemini from Alphabet. 6 | I don't know what this code does, Gemini just gave it to me. 7 | """ 8 | # Gemini code corrected by Claude. 9 | import requests 10 | from datetime import datetime, timedelta 11 | import pandas as pd 12 | import matplotlib.pyplot as plt 13 | 14 | def fetch_data(url, params): 15 | response = requests.get(url, params=params) 16 | response.raise_for_status() # Raise an exception for non-200 status codes 17 | return response.json() 18 | 19 | def calculate_indicators(data): 20 | # Convert 'Close' column to float 21 | data['Close'] = data['Close'].astype(float) 22 | data["SMA"] = data["Close"].rolling(window=20).mean() 23 | data["RSI"] = calculate_rsi(data["Close"]) 24 | return data 25 | 26 | def calculate_rsi(closes, window=14): 27 | delta = closes.diff() 28 | delta = delta.dropna() 29 | gains = delta[delta > 0] 30 | losses = -delta[delta < 0] 31 | avg_gain = gains.ewm(alpha=1/window, min_periods=window).mean() 32 | avg_loss = losses.ewm(alpha=1/window, min_periods=window).mean().abs() 33 | rsi = 100 - 100 / (1 + avg_gain / avg_loss) 34 | return rsi 35 | 36 | def plot_data(data, title): 37 | data[["Close", "SMA"]].plot(figsize=(12, 6), style=["b-", "g-"]) 38 | data["RSI"].plot(ax=plt.twinx(), style="r-") 39 | plt.title(title) 40 | plt.show() 41 | 42 | if __name__ == "__main__": 43 | base_url = "https://api.binance.com/api/v3/klines" 44 | symbol = "BTCUSDT" 45 | interval = "1d" # Daily data 46 | 47 | today = datetime.utcnow() 48 | one_year_ago = today - timedelta(days=365) 49 | 50 | params = { 51 | "symbol": symbol, 52 | "interval": interval, 53 | "startTime": int(one_year_ago.timestamp() * 1000), # Convert to Unix timestamp in milliseconds 54 | "endTime": int(today.timestamp() * 1000), # Convert to Unix timestamp in milliseconds 55 | } 56 | 57 | data = fetch_data(base_url, params) 58 | data = pd.DataFrame(data) 59 | data.columns = ["Open Time", "Open", "High", "Low", "Close", "Volume", "Close Time", "Quote Asset Volume", "Number of Trades", "Taker Buy Base Asset Volume", "Taker Buy Quote Asset Volume", "Ignore"] 60 | data["Open Time"] = pd.to_datetime(data["Open Time"], unit="ms") 61 | data.set_index("Open Time", inplace=True) 62 | data = calculate_indicators(data.copy()) 63 | plot_data(data, f"{symbol} Price & Indicators (Past Year)") 64 | 65 | 66 | -------------------------------------------------------------------------------- /Chapter5/recommend_jobs.py: -------------------------------------------------------------------------------- 1 | import pandas as pd 2 | def recommend_jobs(user_skills, user_interests, user_values): 3 | """Recommends jobs based on user skills, interests, and values. 4 | Args: 5 | user_skills: A list of the user's skills. 6 | user_interests: A list of the user's interests. 7 | Detecting bias – tools and strategies 7 8 | user_values: A list of the user's values. 9 | Returns: 10 | A list of recommended job titles. 11 | """ 12 | # Load a dataset of jobs, their required skills, interests, and 13 | values 14 | job_data = pd.read_csv("job_data.csv") 15 | # Calculate similarity scores between the user's profile and each 16 | job 17 | similarity_scores = job_data.apply(lambda job: calculate_ 18 | similarity(user_skills, user_interests, user_values, job), axis=1) 19 | # Sort jobs by similarity score and return the top recommendations 20 | recommended_jobs = job_data.loc[similarity_scores.nlargest(5). 21 | index, "job_title"] 22 | return recommended_jobs 23 | def calculate_similarity(user_skills, user_interests, user_values, 24 | job): 25 | """Calculates the similarity between a user's profile and a job. 26 | Args: 27 | user_skills: A list of the user's skills. 28 | user_interests: A list of the user's interests. 29 | user_values: A list of the user's values. 30 | job: A job row from the job data. 31 | Returns: 32 | The similarity score between the user and the job. 33 | """ 34 | # Calculate similarity scores for skills, interests, and values 35 | skill_similarity = calculate_set_similarity(user_skills, 36 | job["required_skills"]) 37 | interest_similarity = calculate_set_similarity(user_interests, 38 | job["required_interests"]) 39 | value_similarity = calculate_set_similarity(user_values, 40 | job["required_values"]) 41 | # Combine similarity scores 42 | overall_similarity = (skill_similarity + interest_similarity + 43 | value_similarity) / 3 44 | return overall_similarity 45 | def calculate_set_similarity(set1, set2): 46 | """Calculates the Jaccard similarity between two sets. 47 | Args: 48 | set1: The first set. 49 | set2: The second set. 50 | Returns: 51 | The Jaccard similarity between the two sets. 52 | """ 53 | intersection = len(set1.intersection(set2)) 54 | union = len(set1.union(set2)) 55 | if union == 0: 56 | return 0 57 | else: 58 | return intersection / union 59 | 60 | """ Always be careful when using code from AIs.""" 61 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Packt 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Coding with ChatGPT and Other LLMs 2 | 3 | Coding with ChatGPT and Other LLMs 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | This is the code repository for [Coding with ChatGPT and Other LLMs](https://www.packtpub.com/en-us/product/coding-with-chatgpt-and-other-llms-9781805125051), published by Packt. 17 | 18 | **Navigate LLMs for effective coding, debugging, and AI-driven development** 19 | 20 | 21 | ## What is this book about? 22 | 23 | The software development landscape has evolved with exciting tools for almost instantly producing code. Coding with ChatGPT and other LLMs covers how to get high-quality code to advance your career super-fast, while avoiding legal trouble and bias. 24 | 25 | This book covers the following exciting features: 26 | * Utilize LLMs for advanced coding tasks, such as refactoring and optimization 27 | * Understand how IDEs and LLM tools help coding productivity 28 | * Master advanced debugging to resolve complex coding issues 29 | * Identify and avoid common pitfalls in LLM-generated code 30 | * Explore advanced strategies for code generation, testing, and description 31 | * Develop practical skills to advance your coding career with LLMs 32 | 33 | If you feel this book is for you, get your [copy](https://www.amazon.com/dp/1805125052) today! 34 | 35 | 36 | ## Instructions and Navigations 37 | All of the code is organized into folders. 38 | 39 | The code will look like the following: 40 | ```html 41 | 42 | 43 | 44 | Button Click 45 | 50 | 51 | 52 | 53 | 54 | 55 | ``` 56 | 57 | **Following is what you need for this book:** 58 | This book is for experienced coders and new developers aiming to master LLMs, data scientists and machine learning engineers looking for advanced techniques for coding with LLMs, and AI enthusiasts exploring ethical and legal implications. Tech professionals will find practical insights for innovation and career growth in this book, while AI consultants and tech hobbyists will discover new methods for training and personal projects. 59 | 60 | With the following software and hardware list you can run all code files present in the book (Chapter 1-12). 61 | 62 | ### Software and Hardware List 63 | 64 | | Chapter | Software required | OS required | 65 | | -------- | -------------------------------------------------------------------------------------| -----------------------------------| 66 | | 1-12 | Python | Windows, macOS, or Linux | 67 | | 1-12 | Java | Windows, macOS, or Linux | 68 | | 1-12 | HTML | Windows, macOS, or Linux | 69 | | 1-12 | JavaScript | Windows, macOS, or Linux | 70 | 71 | ### Related products 72 | * Building AI Applications with ChatGPT APIs [[Packt]](https://www.packtpub.com/en-us/product/building-ai-applications-with-chatgpt-apis-9781805127567) [[Amazon]](https://www.amazon.com/Building-Applications-ChatGPT-APIs-DALL/dp/180512756X/ref=tmm_pap_swatch_0?_encoding=UTF8&sr=1-2) 73 | 74 | * The AI Product Manager's Handbook [[Packt]](https://www.packtpub.com/en-us/product/the-ai-product-managers-handbook-9781804612934) [[Amazon]](https://www.amazon.com/AI-Product-Managers-Handbook-advantage/dp/1804612936/ref=sr_1_1?s=books&sr=1-1) 75 | 76 | ## Get to Know the Author 77 | **Dr. Vincent Austin Hall** is a computer science lecturer at Birmingham Newman University and CEO of Build Intellect Ltd, an AI consultancy. Build Intellect works closely with ABT News LTD, based in Reading, England. He holds a physics degree from the University of Leeds, an MSc in biology, chemistry, maths, and coding from Warwick, and a PhD in machine learning and chemistry, also from Warwick, where he developed licensed software for pharma applications. With experience in tech firms and academia, he’s worked on ML projects in the automotive and medtech sectors. He supervises dissertations at the University of Exeter, consults on AI strategies, coaches students and professionals, and shares insights through blogs and YouTube content. 78 | 79 | ## **Note** that this README for _Coding with ChatGPT and other LLMs_ is by Dr Vincent Hall 80 | 81 | ## Chapter 1 has no code. 82 | 83 | ## Chapters 2 and 3 84 | Chapter 2 and 3 share much of the code but it is debugged in Chapter 3. 85 | The code is stored in Chapter2 folder. 86 | 87 | There should be 5 prompts for these chapters. 88 | Prompt 5 has 2 versions. 89 | 90 | Chapter 3 has additional code for the refactoring section. 91 | DCT or Discrete Cosine Transform code is refactored here. 92 | 93 | ## Chapter 4 94 | This chapter has data compression software and crypto price code. 95 | 96 | ## Chapter 5 97 | Chapter 5 has one piece of code to display how LLMs can help you avoid biased code. 98 | This is a job recommender. 99 | 100 | ## Chapter 10 101 | Contains 2 config files: JavaScript and XML. 102 | Code with just 2-3 lines is not in this repository (2024 Oct 29). 103 | --------------------------------------------------------------------------------