<commit_before>{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "##On CLI under sudo\n",
    "#!pip3 install 'git+https://github.com/Troxid/vrep-api-python'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "\n",
    "if \"VREP_VM\" in os.environ:\n",
    "    os.environ[\"VREP\"]='/opt/V-REP_PRO_EDU_V3_4_0_Linux'\n",
    "    os.environ[\"VREP_LIBRARY\"]=os.environ[\"VREP\"]+'/programming/remoteApiBindings/lib/lib/64Bit/'\n",
    "else:\n",
    "    os.environ[\"VREP\"]='/Applications/V-REP_PRO_EDU_V3_4_0_Mac'\n",
    "    os.environ[\"VREP_LIBRARY\"]=os.environ[\"VREP\"]+'/programming/remoteApiBindings/lib/lib/'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def show_methods(c):\n",
    "    if type(c) != type: c=type(c)\n",
    "    methods = [method for method in dir(c) if not method.startswith('_')]\n",
    "    print('Methods available in {}:\\n\\t{}'.format(c.__name__ , '\\n\\t'.join(methods)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def show_attributes(r):\n",
    "    print('State elements for the {}:\\n\\t{}'.format(type(r).__name__ ,\n",
    "                                                    '\\n\\t'.join(list(vars(r).keys()))))\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from pyrep import VRep\n",
    "\n",
    "from __future__ import print_function\n",
    "from IPython.core.magic import (Magics, magics_class, line_magic,\n",
    "                                cell_magic, line_cell_magic)\n",
    "import shlex\n",
    "\n",
    "# The class MUST call this class decorator at creation time\n",
    "@magics_class\n",
    "class Vrep_Sim(Magics):\n",
    "\n",
    "    @cell_magic\n",
    "    def vrepsim(self, line, cell):\n",
    "        \"V-REP magic\"\n",
    "        \n",
    "        #Use shlex.split to handle quoted strings containing a space character\n",
    "        loadSceneRelativeToClient(shlex.split(line)[0])\n",
    "        \n",
    "        #Get the robot class from the string\n",
    "        robotclass=eval(line.split()[1])\n",<commit_msg>Fix error in line split<commit_after>{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "##On CLI under sudo\n",
    "#!pip3 install 'git+https://github.com/Troxid/vrep-api-python'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "\n",
    "if \"VREP_VM\" in os.environ:\n",
    "    os.environ[\"VREP\"]='/opt/V-REP_PRO_EDU_V3_4_0_Linux'\n",
    "    os.environ[\"VREP_LIBRARY\"]=os.environ[\"VREP\"]+'/programming/remoteApiBindings/lib/lib/64Bit/'\n",
    "else:\n",
    "    os.environ[\"VREP\"]='/Applications/V-REP_PRO_EDU_V3_4_0_Mac'\n",
    "    os.environ[\"VREP_LIBRARY\"]=os.environ[\"VREP\"]+'/programming/remoteApiBindings/lib/lib/'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def show_methods(c):\n",
    "    if type(c) != type: c=type(c)\n",
    "    methods = [method for method in dir(c) if not method.startswith('_')]\n",
    "    print('Methods available in {}:\\n\\t{}'.format(c.__name__ , '\\n\\t'.join(methods)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def show_attributes(r):\n",
    "    print('State elements for the {}:\\n\\t{}'.format(type(r).__name__ ,\n",
    "                                                    '\\n\\t'.join(list(vars(r).keys()))))\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from pyrep import VRep\n",
    "\n",
    "from __future__ import print_function\n",
    "from IPython.core.magic import (Magics, magics_class, line_magic,\n",
    "                                cell_magic, line_cell_magic)\n",
    "import shlex\n",
    "\n",
    "# The class MUST call this class decorator at creation time\n",
    "@magics_class\n",
    "class Vrep_Sim(Magics):\n",
    "\n",
    "    @cell_magic\n",
    "    def vrepsim(self, line, cell):\n",
    "        \"V-REP magic\"\n",
    "        \n",
    "        #Use shlex.split to handle quoted strings containing a space character\n",
    "        loadSceneRelativeToClient(shlex.split(line)[0])\n",
    "        \n",
    "        #Get the robot class from the string\n",
    "        robotclass=eval(shlex.split(line)[1])\n",
{'fraction_non_alphanumeric': 0.21438878581735724, 'fraction_numerical': 0.0045351473922902496, 'mean_word_length': 2.3392980041293874, 'pattern_counts': {'":': 52, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '752915', 'n_tokens_mistral': 1882, 'n_tokens_neox': 1851, 'n_words': 297}