# Functions¶

## Summary¶

function

class parent

truncated documentation

AUC

Compute the AUC.

AUC_multi

Compute the AUC.

AUC_multi_multi

Compute the AUC.

_complete_subset_streets

Extends a set of edges to have less extermities into the graph composed by the sets of edges.

_default_name

_delete_edge

Removes an edge from the graph.

_enumerate_close

Enumerates close streets from a starting point.

_euler_path

Computes an Eulerian path.

_explore_path

Explores an Eulerian path, remove used edges from edges_from.

_search_images_dogcat_keras

_search_images_dogcat_torch

_setup_hook

does nothing

add_missing_time

After aggregation, it usually happens that the series is sparse. This function adds rows for missing time.

added

Retrieves added.zip.

anyzip

Any zip.

appariement

On veut apparier les événemens -1 aux événemens +1. On s’attend aux colonnes suivantes: “file”, “collect_date”, …

bellman_distances

Computes shortest distances between all vertices. It assumes edges are symmetric.

besancon_df

Retrieves Besancon.df.zip.

best_euler_path

Computes the final solution for the Eulerian path.

build_streets_vertices

Returns vertices and edges based on the subset of edges.

cached_property

A memoize decorator for class properties.

change_encoding

Changes the encoding of a text file and removes quotes. By default process is process_line().

change_encoding_improve

Changes the encoding of a text file, removes quotes. By default process is process_line() but the function …

check

Checks the library is working. It raises an exception.

clean_column_name_sql_dump

Removes quotes in a line which looks like:

clean_function_notebook

Cleans cells when unittesting notebooks.

compute_degrees

Compute the degree of vertices.

connect_streets

Tells if streets st1, st2 are connected.

convert_dates

Converts a string into a date.

cresus_dummy_file

decrypt_dataframe

df2rsthtml

Writes a table into RST or HTML format.

df_crossjoin

Makes a cross join (cartesian product) between two dataframes by using a constant temporary key. Also sets a MultiIndex …

dijkstra_path

Returns the best path between two vertices. Uses Dikjstra

distance

Calcule une distance pour un appariement conçu ici comme la variance de la vitesse de chaque déplacement + la somme …

distance_path

Calcule la vitesse moyenne lorsque le chemin est connu.

distance_solution

Checks if a solution is really a solution and returns the distance of it, None if it is not a solution. The function …

distance_vertices

Computes the length of edges if distances is None.

encrypt_file

Encrypts a file with a specific password.

enumerate_batch_features

Enumerates all batches saved in a folder.

enumerate_events

Construit la liste des événements (vélo réposé ou retiré).

enumerate_image_class

Lists all images in one folder assuming subfolders indicates the class of each image belongs to.

enumerate_json_items

Enumerates items from a JSON file or string.

enumerate_text_lines

Enumerates all lines from a text file and does some cleaning (see the list of parameters).

euler_path

Computes an Eulerian path.

execute_notebooks

Executes a list of notebooks.

extract_bing_result

Extract the first results from a search page assuming it comes from Bing Image.

extract_images_from_json_2017

Extracts fields from a JSON files such as images.

folder_split_train_test

Splits images from a folder into train and test. The function saves images into two separate folders.

folium_html_stations_map

Returns a folium map which shows stations in different colors.

folium_html_street_map

Returns a folium map which represents the streets.

get_additional_paths

Returns a list of paths to add before running the notebooks, paths to pyquickhelper, pyensae.

get_chicago_stations

Retrieves processed data from Divvy Data.

get_data

Récupère les données.

get_fields_description

Retrieves a dataframe which describes the meaning of the metadata.

get_max_delta

Returns the maximal value by which we can improve the dual solution by adjusting charges on alternating trees.

get_meaning

Retrieves data related to the meaning of a table.

get_password

get_password

Retrieves a password assocatied to key. Relies on module keyring.

get_password_from_keyring_or_env

Gets the password from keyring first, then from the environment variables. …

get_seattle_streets

Retrieves processed data from Seattle Streets. …

haversine_distance

Computes Haversine formula.

histogram_image_size

Computes the distribution of images size.

image_zoom

Resizes an image (from PIL).

img2gray

Converts an image (PIL) to gray scale.

last_element

Returns the last element of sequence assuming they were generated by an iterator or a generator.

load_batch_features

Loads a batch file saved by stream_image2features().

ls_notebooks

Lists the notebooks in a particular subfolder.

main_codalab_wrapper_binary_classification

adapt the tempate available at evaluate.py

main_codalab_wrapper_multi_classification

adapt the tempate available at evaluate.py

matching_vertices

Finds the best match between vertices.

merge_schema

Merges schemas of various databases.

plot_gallery_random_images

Plots a gallery of images using matplotlib. Extracts a random sample from a folder which contains many images. …

plot_streets_network

Plots the network based on cartopy.

plot_streets_network_projection

Returns the default projection for plot_streets_network(). See projection. …

prepare_cresus_data

Prepares the data for the challenge.

private_codalab_wrapper_binary_classification

Wraps the function following the guidelines User_Building a Scoring Program for a Competition. …

private_codalab_wrapper_multi_classification

Wraps the function following the guidelines User_Building a Scoring Program for a Competition. …

process_cresus_sql

Processes the database sent by cresus and produces a list of flat files.

process_cresus_whole_process

Processes the database from Cresus until it splits the data into two two sets of files.

query_bing_image

Returns the search page from Bing Image for a specific query.

read_image

read_input

resize_image

Resizes an image until one of its dimension becomes smaller than maxdim after dividing the dimensions by two many …

search_images_dogcat

Defines a REST application. It returns a list of neighbors among a small set of images representing dogs …

seattle_streets_set_level

Returns a graph of streets.

seattle_streets_set_level2

Returns a small graph of streets.

seattle_streets_set_level3

Returns a small graph of streets.

seattle_streets_set_small

Returns a small graph of streets.

set_password

set_password

Stores a password assocatied to key. Relies on module keyring.

shapely_records

Uses pyshp to return shapes and records from shapefiles.

split_XY_bind_dataset_cresus_data

Splits XY for the blind set.

split_train_test_cresus_data

Splits the tables into two sets for tables (based on users).

stream_apply_image_transform

Applies a transform on every image in a folder, saves it in another one. It keeps the same subfolders.

stream_copy_images

Copies all images from src_folder to dest_folder if valid(name) is True.

stream_download_images

stream_image2features

Considers all images in a folder, transform them into features (function transform) and saves them with pickle

stream_random_sample

Extracts a random sample from a folder which contains many images. Relies on fonction enumerate_image_class(). …

update_tree_structures

vitesse

Calcule la vitesse d’un déplacement.