eshangj/stackoverflow_q_and_a_sample huggingface dataset:
Question: I have trouble getting different versions of PySpark to work correctly on my windows machine in combination with different versions of Python installed via PyEnv. The setup:  I installed pyenv and let it set the environment variables (PYENV, PYENV_HOME, PYENV_ROOT and the entry in PATH) I installed Amazon Coretto Java JDK (jdk1.8.0_412) and set the JAVA_HOME environment variable. I downloaded the winutils.exe & hadoop.dll from here and set the HADOOP_HOME environment variable. Via pyenv I installed Python 3.10.10 and then pyspark 3.4.1 Via pyenv I installed Python 3.8.10 and then pyspark 3.2.1  Python works as expected:  I can switch between different versions with pyenv global <version> When I use python --version in PowerShell it always shows the version that I set before with pyenv.  But I'm having trouble with PySpark. For one, I cannot start PySpark via the powershell console by running pyspark >>> The term 'pyspark' is not recognized as the name of a cmdlet, function, script file..... More annoyingly, my repo-scripts (with a .venv created via pyenv & poetry) also fail:  Caused by: java.io.IOException: Cannot run program "python3": CreateProcess error=2, The system cannot find the file specified [...] Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified  However, both work after I add the following two entries to the PATH environment variable:  C:\Users\myuser\.pyenv\pyenv-win\versions\3.10.10 C:\Users\myuser\.pyenv\pyenv-win\versions\3.10.10\Scripts  but I would have to "hardcode" the Python Version - which is exactly what I don't want to do while using pyenv. If I hardcode the path, even if I switch to another Python version (pyenv global 3.8.10), once I run pyspark in Powershell, the version PySpark 3.4.1 starts from the environment PATH entry for Python 3.10.10. I also cannot just do anything with python in the command line as it always points to the hardcoded python version, no matter what I do with pyenv. I was hoping to be able to start PySpark 3.2.1 from Python 3.8.10 which I just "activated" with pyenv globally. What do I have to do to be able to switch between the Python installations (and thus also between PySparks) with pyenv without "hardcoding" the Python paths? Example PySpark script: from pyspark.sql import SparkSession spark = ( SparkSession .builder .master("local[*]") .appName("myapp") .getOrCreate() ) data = [("Finance", 10), ("Marketing", 20), ] df = spark.createDataFrame(data=data) df.show(10, False) 

Answer: I "solved" the issue by completely removing the Python path from the PATH environment variable and doing everything exclusively via pyenv. I suppose my original task is not possible. I can still start a Python process by running pyenv exec python in the terminal. But disappointingly I cannot launch a Spark process from the terminal anymore. At least my repositories work as expected when setting the pyenv versions (pyenv local 3.8.10 / pyenv global 3.10.10).
Question: I am using XGBoost with SHAP to analyze feature importance in a multiclass classification problem and need help plotting the SHAP summary plots for all classes at once. Currently, I can only generate plots one class at a time. SHAP version: 0.45.0 Python version: 3.10.12  Here is my code: import xgboost as xgb import shap import numpy as np import pandas as pd from sklearn.model_selection import train_test_split from sklearn.datasets import make_classification from sklearn.metrics import accuracy_score # Generate synthetic data X, y = make_classification(n_samples=500, n_features=20, n_informative=4, n_classes=6, random_state=42) X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.25, random_state=42) # Train a XGBoost model for multiclass classification model = xgb.XGBClassifier(objective="multi:softprob", random_state=42) model.fit(X_train, y_train)  I then tried to plot the shape values: # Create a SHAP TreeExplainer explainer = shap.TreeExplainer(model) # Calculate SHAP values for the test set shap_values = explainer.shap_values(X_test) # Attempt to plot summary for all classes shap.summary_plot(shap_values, X_test, plot_type="bar")  I got this interaction plot instead:  I remedied the problem with help from this post: shap.summary_plot(shap_values[:,:,0], X_test, plot_type="bar")  which gives a normal bar plot for class 0:  I can then do the same with classes 1, 2, 3, etc. The question is, how can you make a summary plot for all the classes? I.e., a single plot showing the contribution of a feature to each class?

Answer: The issue is that explainer.shap_values(X_test) will return a 3D DataFrame of shape (rows, features, classes) and to show a bar plot summary_plot(shap_values) requires shap_values to be a list of (rows, features) where the list is: length = number of classes. For my own purposes, I used the following function which converts your shap_values into the format that you need: def shap_values_to_list(shap_values, model): shap_as_list=[] for i in range(len(model.classes_)): shap_as_list.append(shap_values[:,:,i]) return shap_as_list  Then you can do: shap_as_list = shap_values_to_list(shap_values, model) shap.summary_plot(shap_as_list, X_test, plot_type="bar")  You can always add feature_names and class_names to the summary_plot if you need. With my own example I went from having the same kind of interaction plot that you did to the following: Example of shap.summary_plot output using shap_values converted to a list of shap_values
Question: In LLM studio, when I try to download any model, I am facing following error: Download Failed: unable to get local issuer certificate 

Answer: I've experienced the same in a corporate network. To get around I have been manually downloading through my browser (the url is to the left of the error message in your screenshot) and manually loading the models into the appropriate dir: ~/.cache/lm-studio/models in the appropriate subpath. ie ~/.cache/lm-studio/models/Mistral-7B-Instruct-v0.2-GGUF/mistral-7b-instruct-v0.2.Q6_K.gguf Not the most elegant solution but I have yet to find information on a better workaround.
Question: I am using pyvista to mesh 3D scan data of terrain and save them to stl files to save in blender. Some of the .xyz files contain data for a single continuous area while others include a number of smaller areas, with no data inbetwean. I have managed to get this to work for the continuous regions: import numpy as np import pyvista as pv xyz_path = r"Path_to_file.xyz" stl_path = r"Path_to_file.stlr" data = np.loadtxt(xyz_path) cloud = pv.PolyData(data) surf = cloud.delaunay_2d() surf.plot(show_edges=True) surf.save(stl_name)  for the discontinuous reqions I got large faces linking the different areas that I would like to delete. I found a way to do this based on the area of the face. import numpy as np import pyvista as pv xyz_path = r"Path_to_file.xyz" stl_path = r"Path_to_file.stlr" data = np.loadtxt(xyz_path) cloud = pv.PolyData(data) surf = cloud.delaunay_2d() cell_sizes = surf.compute_cell_sizes(length=False, area=True, volume=False) areas = cell_sizes['Area'] max_area_threshold = 100 # Set the area threshold # Create a mask for cells that meet the area criteria valid_cells = areas < max_area_threshold # Use the mask to filter out large triangles filtered_mesh = surf.extract_cells(valid_cells) filtered_mesh.plot(show_edges=True, scalars='Area') surf.save(stl_name)  From the plot I can see that the correct elements have been deleted. However, this process also converts the data structure from core.pointset.PolyData (which can be saved to stl) to core.pointset.UnstructuredGrid (which cant be saved to stl). Is there a way I con convert the core.pointset.UnstructuredGrid object to a format that can be saved to stl or delete the unwanted elements in a way that I can still save the surface to stl. My current workaround is to create the STL file leaving in the unwanted faces then delete these in MeshLab but if possible I would like to avoid this step if there is a simple solution.

Answer: Based on the input from Andras I used extract_surface() to extract the surface and save to stl file. import numpy as np import pyvista as pv xyz_path = r"Path_to_file.xyz" stl_path = r"Path_to_file.stlr" data = np.loadtxt(xyz_path) cloud = pv.PolyData(data) surf = cloud.delaunay_2d() cell_sizes = surf.compute_cell_sizes(length=False, area=True, volume=False) areas = cell_sizes['Area'] max_area_threshold = 100 # Set the area threshold #Create a mask for cells that meet the area criteria valid_cells = areas < max_area_threshold #Use the mask to filter out large triangles filtered_mesh = surf.extract_cells(valid_cells) filtered_mesh.plot(show_edges=True, scalars='Area') #Extract surface filtered_mesh_surface = filtered_mesh.extract_surface() filtered_mesh_surface.save(stl_path_filtered)  This is covered in the documentation here: https://docs.pyvista.org/version/stable/examples/01-filter/extract-surface.html.
Question: How can I create a colorbar in matplotlib that looks like this:  Here is what I tried: import matplotlib.pyplot as plt from matplotlib.colors import LinearSegmentedColormap from matplotlib.cm import ScalarMappable from matplotlib.colors import Normalize # Define the custom colormap colors = ['red', 'cyan', 'darkgreen'] cmap = LinearSegmentedColormap.from_list( 'custom_colormap', [(0.0, colors[0]), (0.5 / 2.0, colors[0]), (0.5 / 2.0, colors[1]), (1.5 / 2.0, colors[1]), (1.5 / 2.0, colors[2]), (2.0 / 2.0, colors[2])] ) # Create a scalar mappable object with the colormap sm = ScalarMappable(norm=Normalize(vmin=3.5, vmax=4.5), cmap=cmap) # Create the colorbar plt.figure(figsize=(3, 1)) cb = plt.colorbar(sm, orientation='horizontal', ticks=[3.5, 4.5], extend='neither') cb.set_label('') 

Answer: One solution is to draw wide white edges around the color segments (using cb.solids.set below), hide the spines (cb.outline.set_visible) and draw vertical lines as dividers (cb.ax.axvline). To match the desired colorbar, make sure to pass a ymin that is greater than 0. import matplotlib.pyplot as plt from matplotlib.colors import ListedColormap, Normalize from matplotlib.cm import ScalarMappable fig, ax = plt.subplots(figsize=(3, 1), layout='tight') colors = ['red', 'cyan', 'darkgreen'] ticks = [3.5, 4.5] cmap = ListedColormap(colors) norm = Normalize(vmin=2.5, vmax=5.5) cb = fig.colorbar( mappable=ScalarMappable(norm=norm, cmap=cmap), cax=ax, ticks=ticks, ticklocation='top', orientation='horizontal', ) cb.solids.set(edgecolor='white', linewidth=5) cb.outline.set_visible(False) cb.ax.tick_params(width=1, length=10, color='k') for bound in ticks: cb.ax.axvline(bound, c='k', linewidth=1, ymin=0.3, alpha=0.6) plt.setp(cb.ax.xaxis.get_ticklines(), alpha=0.6) cb.set_ticklabels(ticks, alpha=0.6, color='k', fontsize=15, fontfamily='Arial')   Another solution is instead of drawing vertical lines as dividers, just use the divider lines defined on colorbar object itself (pass drawedges=True). However, the end result will be a little different from the desired result because the divider line draws from the bottom to the top (can't pass ymin like above). fig, ax = plt.subplots(figsize=(3, 1), layout='tight') colors = ['red', 'cyan', 'darkgreen'] ticks = [3.5, 4.5] cmap = ListedColormap(colors) norm = Normalize(vmin=2.5, vmax=5.5) cb = fig.colorbar( mappable=ScalarMappable(norm=norm, cmap=cmap), cax=ax, ticks=ticks, ticklocation='top', orientation='horizontal', drawedges=True ) cb.solids.set(edgecolor='white', linewidth=5) cb.outline.set_visible(False) cb.dividers.set(linewidth=1, alpha=0.6) cb.ax.tick_params(width=1, length=10, color='k') plt.setp(cb.ax.xaxis.get_ticklines(), alpha=0.6) cb.set_ticklabels(ticks, alpha=0.6, color='k', fontsize=15, fontfamily='Arial')
Question: I have an excel file in which one of the columns has multiple values seperated by a comma (please see the attached image)  For the StuType column, the numbers go all the way from 1 to 13 including some blank rows (as can be seen in ResponseID = 8538 and 8562). I am reading the file into pandas. The goal is to have 13 different columns with values 0 and 1 in there. My question is very similar to this one, however, both the solutions suggested there do not work for me. Can someone please help me? Thank you so very much! Edit: The solution from @ouroboros1 is perfect! There are some issues with my Excel file though (notice, how '5,8' is to the left and '10', '12', etc. are to the right...I fixed that in Excel before running the solutions provided). Once again, thanks a lot for everyone's help!

Answer: Edit: all credits to @mozway for the refactored solution (see this comment).  Here's an approach with Series.str.get_dummies: df = ( df.join( df.pop('StuType') .str.get_dummies(sep=',') .rename(columns=int) .reindex(range(1, 14), axis=1, fill_value=0) ) )  Output  Response 1 2 3 4 5 6 7 8 9 10 11 12 13 0 8524 0 0 0 0 1 0 0 1 0 0 0 0 0 1 8528 0 0 0 0 0 0 0 0 0 1 0 0 0 2 8538 0 0 0 0 0 0 0 0 0 0 0 1 0 3 8548 0 1 0 0 1 0 0 0 0 1 0 0 0 4 8558 0 0 0 0 0 0 0 0 0 0 0 0 1 5 8568 0 0 0 0 0 0 0 0 0 0 0 0 0 6 8578 0 0 0 0 0 0 1 0 0 0 0 0 0 7 8588 0 0 0 0 0 0 0 0 0 0 0 1 0 8 8598 0 0 0 0 1 0 0 0 0 0 0 0 0 9 8608 0 0 0 0 0 0 0 0 0 0 0 0 1 10 8618 0 0 0 0 0 0 0 0 0 0 0 0 1 11 8628 0 0 0 0 0 0 0 0 0 0 0 0 0 12 8638 0 0 0 0 1 0 0 1 0 1 1 0 0  Explanation  Use df.pop to work with df['StuType'], while dropping it from df, and apply Series.str.get_dummies with `sep=','). Cast string column names of the resulting df to int with df.rename. Chain df.reindex to add columns (axis=1) within range(1, 14) that are not yet present, populating NaN values with 0 by setting fill_value=0. Join to original df (now without 'StuType' column) with df.join.  If for some reason you want to keep the original df intact (df.pop will alter it), you can use pd.concat instead of df.pop + df.join: out = ( pd.concat([ df['Response'], ( df['StuType'] .str.get_dummies(sep=',') .rename(columns=int) .reindex(range(1, 14), axis=1, fill_value=0) ) ], axis=1) )   Solution before refactoring suggested by @mozway (edited): Here's an approach with pd.get_dummies: out = ( pd.concat([ df['Response'], ( pd.get_dummies(df['StuType'].str.split(',').explode()) .rename(columns=int) .groupby(level=0).sum() .reindex(range(1,14), axis=1, fill_value=0) ) ], axis=1) ) # same output  Data used import pandas as pd import numpy as np data = {'Response': {0: 8524, 1: 8528, 2: 8538, 3: 8548, 4: 8558, 5: 8568, 6: 8578, 7: 8588, 8: 8598, 9: 8608, 10: 8618, 11: 8628, 12: 8638}, 'StuType': {0: '5,8', 1: '10', 2: '12', 3: '2,5,10', 4: '13', 5: np.nan, 6: '7', 7: '12', 8: '5', 9: '13', 10: '13', 11: np.nan, 12: '5,8,10,11'} } df = pd.DataFrame(data) df Response StuType 0 8524 5,8 1 8528 10 2 8538 12 3 8548 2,5,10 4 8558 13 5 8568 NaN 6 8578 7 7 8588 12 8 8598 5 9 8608 13 10 8618 13 11 8628 NaN 12 8638 5,8,10,11
Question: I have a Polars dataframe where I'd like to derive a new column using a when/then expression. The values of the new column should be taken from a different column in the same dataframe. However, the column from which to take the values differs from row to row. Here's a simple example: df = pl.DataFrame( { "frequency": [0.5, None, None, None], "frequency_ref": ["a", "z", "a", "a"], "a": [1, 2, 3, 4], "z": [5, 6, 7, 8], } )  The resulting dataframe should look like this: res = pl.DataFrame( { "frequency": [0.5, None, None, None], "frequency_ref": ["a", "z", "a", "a"], "a": [1, 2, 3, 4], "z": [5, 6, 7, 8], "res": [0.5, 6, 3, 4] } )  I tried to create a dynamic reference using a nested pl.col: # Case 1) Fixed value is given fixed_freq_condition = pl.col("frequency").is_not_null() & pl.col("frequency").is_not_nan() # Case 2) Reference to distribution data is given ref_freq_condition = pl.col("frequency_ref").is_not_null() # Apply the conditions to calculate res df = df.with_columns( pl.when(fixed_freq_condition) .then(pl.col("frequency")) .when(ref_freq_condition) .then( pl.col(pl.col("frequency_ref")) ) .otherwise(0.0) .alias("res"), )  Which fails with TypeError: invalid input for "col". Expected "str" or "DataType", got 'Expr'. What works (but only as an intermediate solution) is by explicitly listing every possible column value in a very long when/then expression. This is far from optimal as the column names might change in the future and produces a lot of code repititon. df = df.with_columns( pl.when(fixed_freq_condition) .then(pl.col("frequency")) .when(pl.col("frequency_ref") == "a") .then(pl.col("a")) # ... more entries .when(pl.col("frequency_ref") == "z") .then(pl.col("z")) .otherwise(0.0) .alias("res"), ) 

Answer: You could build the when/then in a loop: freq_refs = df.get_column("frequency_ref") expr = pl.when(False).then(None) # dummy starter value for c in freq_refs: expr = expr.when(pl.col("frequency_ref") == c).then(pl.col(c)) expr = expr.otherwise(0) # Apply the conditions to calculate res df = df.with_columns( pl.when(fixed_freq_condition) .then(pl.col("frequency")) .when(ref_freq_condition) .then(expr) .otherwise(0.0) .alias("res"), ) df  shape: (4, 5) ┌───────────┬───────────────┬─────┬─────┬─────┐ │ frequency ┆ frequency_ref ┆ a ┆ b ┆ res │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ str ┆ i64 ┆ i64 ┆ f64 │ ╞═══════════╪═══════════════╪═════╪═════╪═════╡ │ 1 ┆ a ┆ 1 ┆ 5 ┆ 1.0 │ │ null ┆ b ┆ 2 ┆ 6 ┆ 6.0 │ │ null ┆ a ┆ 3 ┆ 7 ┆ 3.0 │ │ null ┆ a ┆ 4 ┆ 8 ┆ 4.0 │ └───────────┴───────────────┴─────┴─────┴─────┘
Question: I have previously successfully solved a mechanical system using the gekko package. However, without having changed anything in my code, I now get the following error message: --------------------------------------------------------------------------- Exception Traceback (most recent call last) Cell In[3], line 15 13 m.Equation (F_r == (((1-a)/3)**2 + (2*(1+a)/3)**2 * v)) 14 m.Equation (a == (1000 - F_l)/mass) ---> 15 m.solve(disp=False) 16 plt.plot(x) 17 print(x) File ~/anaconda3/envs/conda_calculator/lib/python3.11/site-packages/gekko/gekko.py:2210, in GEKKO.solve(self, disp, debug, GUI, **kwargs) 2208 #print APM error message and die 2209 if (debug >= 1) and ('@error' in response): -> 2210 raise Exception(response) 2212 #load results 2213 def byte2str(byte): Exception: @error: Model File Not Found Model file does not exist: 130.92.213.86_gk_model0.apm STOPPING...  To understand how gekko is working, I have run examples that are presented here. # Pendulum - Index 3 DAE from gekko import GEKKO import numpy as np mass = 1 g = 9.81 s = 1 m = GEKKO() x = m.Var(0) y = m.Var(-s) v = m.Var(1) w = m.Var(0) lam = m.Var(mass*(1+s*g)/2*s**2) m.Equation(x**2+y**2==s**2) m.Equation(x.dt()==v) m.Equation(y.dt()==w) m.Equation(mass*v.dt()==-2*x*lam) m.Equation(mass*w.dt()==-mass*g-2*y*lam) m.time = np.linspace(0,2*np.pi,100) m.options.IMODE=4 m.options.NODES=3 m.solve(disp=False) import matplotlib.pyplot as plt plt.figure(figsize=(10,5)) plt.subplot(3,1,1) plt.plot(m.time,x.value,label='x') plt.plot(m.time,y.value,label='y') plt.ylabel('Position') plt.legend(); plt.grid() plt.subplot(3,1,2) plt.plot(m.time,v.value,label='v') plt.plot(m.time,w.value,label='w') plt.ylabel('Velocity') plt.legend(); plt.grid() plt.subplot(3,1,3) plt.plot(m.time,lam.value,label=r'$\lambda$') plt.legend(); plt.grid() plt.xlabel('Time') plt.savefig('index3.png',dpi=600) plt.show()  These were also working, and now show the same error message. Any idea what is going on or what I missed? Thanks!

Answer: The public server is under significant load with ~315,000 downloads of the gekko package each month. I recommend switching to remote=False for a faster and more reliable response by solving locally instead of through the public server. m = GEKKO(remote=False)  This may change the behavior because there are more solver options on the public server, but should be the same in most cases. While it isn't a problem in this case, it is also a good idea to keep the version of gekko up-to-date with: pip install gekko --upgrade  There are new features such as a gekko support agent. from gekko import support a = support.agent() a.ask("Can you optimize the Rosenbrock function?")
Question: I have a dataframe which contains a column labeled Pool. I want to create a new column labeled "Volume" which is 310 divided by the occurrence of each value of Pool. For example there are three occurrences of Pool 1 so 310/3 = 103.3. There are 4 occurrences of Pool 2 so 310/4 = 77.5 and so forth. Any ideas on how to do this with Pandas?    Pool Volume     1 103.3   1 103.3   1 103.3   2 77.5   2 77.5   2 77.5   2 77.5   3 62   3 62   3 62   3 62   3 62    I tried: df["Volume"] = 310 / pool.get_group(1).value_counts()  Thanks for your help.

Answer: Use Series.map with Series.value_counts for counts per groups: df["Volume"] = 310 / df['Pool'].map(df['Pool'].value_counts()) #alternative with division from right side - rdiv #df["Volume"] = df['Pool'].map(df['Pool'].value_counts()).rdiv(310)  Or GroupBy.transform: df["Volume"] = 310 / df.groupby('Pool')['Pool'].transform('size')   print (df) Pool Volume 0 1 103.333333 1 1 103.333333 2 1 103.333333 3 2 77.500000 4 2 77.500000 5 2 77.500000 6 2 77.500000 7 3 62.000000 8 3 62.000000 9 3 62.000000 10 3 62.000000 11 3 62.000000
Question: I want to render depth from mesh file, and camera parameters, to do so I tried RaycastingScene from open3d with this mesh file as follows: #!/usr/bin/env python3 import numpy as np import open3d as o3d import matplotlib.pyplot as plt def render_depth( intrins:o3d.core.Tensor, width:int, height:int, extrins:o3d.core.Tensor, tmesh:o3d.t.geometry.TriangleMesh )->np.ndarray: """ Render depth from mesh file Parameters ---------- intrins : o3d.core.Tensor Camera Intrinsics matrix K: 3x3 width : int image width height : int image height extrins : o3d.core.Tensor camera extrinsics matrix 4x4 tmesh : o3d.t.geometry.TriangleMesh TriangleMesh Returns ------- np.ndarray Rendred depth image """ scene = o3d.t.geometry.RaycastingScene() scene.add_triangles(tmesh) rays = scene.create_rays_pinhole( intrinsic_matrix=intrins, extrinsic_matrix=extrins, width_px=width, height_px=height ) ans = scene.cast_rays(rays) t_hit = ans["t_hit"].numpy() / 1000.0 return t_hit if __name__=="__main__": import os mesh_path = f"{os.getenv('HOME')}/bbq_sauce.ply" mesh = o3d.t.io.read_triangle_mesh(mesh_path) mesh.compute_vertex_normals() # camera_info[k].reshape(3, 3) intrins_ = np.array([ [606.9275512695312, 0.0, 321.9704895019531], [0.0, 606.3505859375, 243.5377197265625], [0.0, 0.0, 1.0] ]) width_ = 640 # camera_info.width height_ = 480 # camera_info.height # root2cam 4x4 extrens_ = np.eye(4) # intrins_t = o3d.core.Tensor(intrins_) extrins_t = o3d.core.Tensor(extrens_) rendered_depth = render_depth( intrins=intrins_t, width=width_, height=height_, extrins = extrins_t, tmesh=mesh ) plt.imshow(rendered_depth) plt.show()  but I'm getting a depth image which doesn't seem to be correct! Can you please tell me how can I fix that? thanks. 

Answer: The raycasting scene is working correctly. However, your extrinsic matrix is setting the camera inside the mesh and thus you are seeing how mesh looks from inside. I roughly measured the mesh bbq_sauce in meshlab and it is of width ~53 units. You can either move the camera away from the mesh, using either: extrens_[2, 3] = 200  or instead of moving the object, just move the camera pose. rays = o3d.t.geometry.RaycastingScene.create_rays_pinhole( fov_deg=90, # Not computed from intrinsic parameters. center=[0, 0, 0], # Look towards eye=[100, 100, 0], # Look from up=[0, 1, 0], # This helps in orienting the camera so object is not inverted. width_px=640, height_px=480, )