From b31939c0a6c07e793a316aba067154a36d396303 Mon Sep 17 00:00:00 2001
From: Trupti Kini
Date: Wed, 15 Mar 2017 23:30:23 +0600
Subject: Added(A)/Deleted(D) following books A
Advanced_Measurements_And_Instrumentation_by_A._K._Sawhney/README.txt A
BSc_3rd_Year_Physics_Paper_4_by_Sanjeeva_Rao,_Bhikshmaiah,_Ramakrishna_Reddy,_Ananta_Ramaiah/README.txt
M MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10.ipynb M
MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2.ipynb M
MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3.ipynb M
MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4.ipynb M
MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6.ipynb M
MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter8.ipynb A
Solid_State_Physics_by_Dr_M_Arumugam/README.txt
---
.../Chapter6.ipynb | 103 +++++++++++----------
1 file changed, 56 insertions(+), 47 deletions(-)
(limited to 'MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6.ipynb')
diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6.ipynb
index d5de1827..85985309 100644
--- a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6.ipynb
+++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6.ipynb
@@ -16,7 +16,7 @@
},
{
"cell_type": "code",
- "execution_count": 1,
+ "execution_count": 73,
"metadata": {
"collapsed": false
},
@@ -68,7 +68,7 @@
},
{
"cell_type": "code",
- "execution_count": 2,
+ "execution_count": 74,
"metadata": {
"collapsed": false
},
@@ -114,19 +114,15 @@
]
},
{
- "cell_type": "code",
- "execution_count": 3,
- "metadata": {
- "collapsed": true
- },
- "outputs": [],
+ "cell_type": "markdown",
+ "metadata": {},
"source": [
- "#Example 6.3"
+ "# Example 6.3"
]
},
{
"cell_type": "code",
- "execution_count": 4,
+ "execution_count": 75,
"metadata": {
"collapsed": false
},
@@ -178,7 +174,7 @@
},
{
"cell_type": "code",
- "execution_count": 5,
+ "execution_count": 76,
"metadata": {
"collapsed": false
},
@@ -196,6 +192,7 @@
"/* Put everything inside the global mpl namespace */\n",
"window.mpl = {};\n",
"\n",
+ "\n",
"mpl.get_websocket_type = function() {\n",
" if (typeof(WebSocket) !== 'undefined') {\n",
" return WebSocket;\n",
@@ -254,6 +251,9 @@
" this.ws.onopen = function () {\n",
" fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n",
" fig.send_message(\"send_image_mode\", {});\n",
+ " if (mpl.ratio != 1) {\n",
+ " fig.send_message(\"set_dpi_ratio\", {'dpi_ratio': mpl.ratio});\n",
+ " }\n",
" fig.send_message(\"refresh\", {});\n",
" }\n",
"\n",
@@ -323,6 +323,15 @@
" this.canvas = canvas[0];\n",
" this.context = canvas[0].getContext(\"2d\");\n",
"\n",
+ " var backingStore = this.context.backingStorePixelRatio ||\n",
+ "\tthis.context.webkitBackingStorePixelRatio ||\n",
+ "\tthis.context.mozBackingStorePixelRatio ||\n",
+ "\tthis.context.msBackingStorePixelRatio ||\n",
+ "\tthis.context.oBackingStorePixelRatio ||\n",
+ "\tthis.context.backingStorePixelRatio || 1;\n",
+ "\n",
+ " mpl.ratio = (window.devicePixelRatio || 1) / backingStore;\n",
+ "\n",
" var rubberband = $('');\n",
" rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n",
"\n",
@@ -379,8 +388,9 @@
" canvas_div.css('width', width)\n",
" canvas_div.css('height', height)\n",
"\n",
- " canvas.attr('width', width);\n",
- " canvas.attr('height', height);\n",
+ " canvas.attr('width', width * mpl.ratio);\n",
+ " canvas.attr('height', height * mpl.ratio);\n",
+ " canvas.attr('style', 'width: ' + width + 'px; height: ' + height + 'px;');\n",
"\n",
" rubberband.attr('width', width);\n",
" rubberband.attr('height', height);\n",
@@ -513,10 +523,10 @@
"}\n",
"\n",
"mpl.figure.prototype.handle_rubberband = function(fig, msg) {\n",
- " var x0 = msg['x0'];\n",
- " var y0 = fig.canvas.height - msg['y0'];\n",
- " var x1 = msg['x1'];\n",
- " var y1 = fig.canvas.height - msg['y1'];\n",
+ " var x0 = msg['x0'] / mpl.ratio;\n",
+ " var y0 = (fig.canvas.height - msg['y0']) / mpl.ratio;\n",
+ " var x1 = msg['x1'] / mpl.ratio;\n",
+ " var y1 = (fig.canvas.height - msg['y1']) / mpl.ratio;\n",
" x0 = Math.floor(x0) + 0.5;\n",
" y0 = Math.floor(y0) + 0.5;\n",
" x1 = Math.floor(x1) + 0.5;\n",
@@ -672,8 +682,8 @@
" this.canvas_div.focus();\n",
" }\n",
"\n",
- " var x = canvas_pos.x;\n",
- " var y = canvas_pos.y;\n",
+ " var x = canvas_pos.x * mpl.ratio;\n",
+ " var y = canvas_pos.y * mpl.ratio;\n",
"\n",
" this.send_message(name, {x: x, y: y, button: event.button,\n",
" step: event.step,\n",
@@ -794,6 +804,7 @@
"};\n",
"\n",
"mpl.figure.prototype.handle_close = function(fig, msg) {\n",
+ " var width = fig.canvas.width/mpl.ratio\n",
" fig.root.unbind('remove')\n",
"\n",
" // Update the output cell to use the data from the current canvas.\n",
@@ -802,7 +813,7 @@
" // Re-enable the keyboard manager in IPython - without this line, in FF,\n",
" // the notebook keyboard shortcuts fail.\n",
" IPython.keyboard_manager.enable()\n",
- " $(fig.parent_element).html('');\n",
+ " $(fig.parent_element).html('');\n",
" fig.close_ws(fig, msg);\n",
"}\n",
"\n",
@@ -813,8 +824,9 @@
"\n",
"mpl.figure.prototype.push_to_output = function(remove_interactive) {\n",
" // Turn the data on the canvas into data in the output cell.\n",
+ " var width = this.canvas.width/mpl.ratio\n",
" var dataURL = this.canvas.toDataURL();\n",
- " this.cell_info[1]['text/html'] = '';\n",
+ " this.cell_info[1]['text/html'] = '';\n",
"}\n",
"\n",
"mpl.figure.prototype.updated_canvas_event = function() {\n",
@@ -903,12 +915,9 @@
" // Check for shift+enter\n",
" if (event.shiftKey && event.which == 13) {\n",
" this.canvas_div.blur();\n",
- " event.shiftKey = false;\n",
- " // Send a \"J\" for go to next cell\n",
- " event.which = 74;\n",
- " event.keyCode = 74;\n",
- " manager.command_mode();\n",
- " manager.handle_keydown(event);\n",
+ " // select the cell after this one\n",
+ " var index = IPython.notebook.find_cell_index(this.cell_info[0]);\n",
+ " IPython.notebook.select(index + 1);\n",
" }\n",
"}\n",
"\n",
@@ -957,7 +966,7 @@
{
"data": {
"text/html": [
- ""
+ ""
],
"text/plain": [
""
@@ -1014,7 +1023,7 @@
},
{
"cell_type": "code",
- "execution_count": 6,
+ "execution_count": 77,
"metadata": {
"collapsed": false
},
@@ -1069,7 +1078,7 @@
},
{
"cell_type": "code",
- "execution_count": 7,
+ "execution_count": 78,
"metadata": {
"collapsed": false
},
@@ -1114,7 +1123,7 @@
},
{
"cell_type": "code",
- "execution_count": 8,
+ "execution_count": 79,
"metadata": {
"collapsed": false
},
@@ -1148,7 +1157,7 @@
},
{
"cell_type": "code",
- "execution_count": 9,
+ "execution_count": 80,
"metadata": {
"collapsed": false
},
@@ -1183,7 +1192,7 @@
},
{
"cell_type": "code",
- "execution_count": 10,
+ "execution_count": 81,
"metadata": {
"collapsed": false
},
@@ -1221,7 +1230,7 @@
},
{
"cell_type": "code",
- "execution_count": 11,
+ "execution_count": 82,
"metadata": {
"collapsed": false
},
@@ -1255,7 +1264,7 @@
},
{
"cell_type": "code",
- "execution_count": 12,
+ "execution_count": 83,
"metadata": {
"collapsed": false
},
@@ -1294,7 +1303,7 @@
},
{
"cell_type": "code",
- "execution_count": 13,
+ "execution_count": 84,
"metadata": {
"collapsed": false
},
@@ -1332,7 +1341,7 @@
},
{
"cell_type": "code",
- "execution_count": 14,
+ "execution_count": 85,
"metadata": {
"collapsed": false
},
@@ -1369,7 +1378,7 @@
},
{
"cell_type": "code",
- "execution_count": 15,
+ "execution_count": 86,
"metadata": {
"collapsed": false
},
@@ -1378,7 +1387,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "Effort is 1741.88034188 N\n"
+ "Effort is 348.376068376 N\n"
]
}
],
@@ -1389,7 +1398,7 @@
"W=40000.0 #effort\n",
"R = 400 #Lever length\n",
"u = 0.12 #coefficient of friction between screw and nut\n",
- "P = (d/(2*R))*W*((u+(p/(3.14*D)))/(1-u*(p/(3.14*D)))) #Effort\n",
+ "P = (D/(2*R))*W*((u+(p/(3.14*D)))/(1-u*(p/(3.14*D)))) #Effort\n",
"print \"Effort is\",P,\"N\"\n"
]
},
@@ -1402,7 +1411,7 @@
},
{
"cell_type": "code",
- "execution_count": 16,
+ "execution_count": 87,
"metadata": {
"collapsed": false
},
@@ -1450,7 +1459,7 @@
},
{
"cell_type": "code",
- "execution_count": 17,
+ "execution_count": 88,
"metadata": {
"collapsed": false
},
@@ -1486,7 +1495,7 @@
},
{
"cell_type": "code",
- "execution_count": 18,
+ "execution_count": 89,
"metadata": {
"collapsed": false
},
@@ -1538,7 +1547,7 @@
},
{
"cell_type": "code",
- "execution_count": 19,
+ "execution_count": 90,
"metadata": {
"collapsed": false
},
@@ -1573,9 +1582,9 @@
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
- "display_name": "Python [Root]",
+ "display_name": "Python [conda root]",
"language": "python",
- "name": "Python [Root]"
+ "name": "conda-root-py"
},
"language_info": {
"codemirror_mode": {
@@ -1587,7 +1596,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
- "version": "2.7.12"
+ "version": "2.7.13"
}
},
"nbformat": 4,
--
cgit