Found 6 repositories(showing 6)
hai-x
Rust version of magic-string. Inspired by magic-string-rs
Ragnerflokki
0x00-python-hello_world This begins the learning of python with alx software engineering programme(holberton school) Each file is a test on my knowledge on each concept of python Tasks 0-run 0-run - is a shell script that runs a python script, The python file name would be saved in the environment variable PYFILE USAGE export PYFILE=tests/main.py ./0-run 1-run_inline 1-run_inline - is a shell script that runs Python code. The Python code will be saved in the environment variable $PYCODE USAGE guillaume@ubuntu:~/py/0x00$ export PYCODE='print(f"Best School: {88+10}")' guillaume@ubuntu:~/py/0x00$ ./1-run_inline Best School: 98 guillaume@ubuntu:~/py/0x00$ 2-print.py 2-print.py - A python script that prints "Programming is like building a multilingual puzzle followed by new line USAGE guillaume@ubuntu:~/py/0x00$ ./2-print.py "Programming is like building a multilingual puzzle guillaume@ubuntu:~/py/0x00$ 3-print_number.py 3-print_number.py - A python script that print a number stored in variable followed by a string using f-string string formatter to substitute the variable in the output USAGE guillaume@ubuntu:~/py/0x00$ ./3-print_number.py 98 Battery street guillaume@ubuntu:~/py/0x00$ 4-print_float.py 4-print_float.py - The python scripts prints a floating number with a precision of 2 digits alongside a string USAGE guillaume@ubuntu:~/py/0x00$ ./4-print_float.py Float: 3.14 guillaume@ubuntu:~/py/0x00$ 5-print_string.py 5-print_string.py - The python script print 3 times a string stored in the variable str, followed by its first 9 characters. USAGE guillaume@ubuntu:~/py/0x00$ ./5-print_string.py Holberton SchoolHolberton SchoolHolberton School Holberton guillaume@ubuntu:~/py/0x00$ 6-concat.py 6-concat.py - This is a python script that prints Welcome to Holberton School! from 2 different strings using string concatenation in python guillaume@ubuntu:~/py/0x00$ ./6-concat.py Welcome to Holberton School! guillaume@ubuntu:~/py/0x00$ wc -l 6-concat.py 5 6-concat.py guillaume@ubuntu:~/py/0x00$ 7-edges.py 7-edges.py - This python scripts prints words using the python string slice feature. word_first_3 should contain the first 3 letters of the variable word word_last_2 should contain the last 2 letters of the variable word middle_word should contain the value of the variable word without the first and last letters USAGE guillaume@ubuntu:~/py/0x00$ ./7-edges.py First 3 letters: Hol Last 2 letters: on Middle word: olberto guillaume@ubuntu:~/py/0x00$ wc -l 7-edges.py 8 7-edges.py guillaume@ubuntu:~/py/0x00$ 8-concat_edges.py 8-concat_edges.py - A python script that prints a string from an existing string without using string literals.. it prints object-oriented programming with Python from a given string str = "Python is an interpreted, interactive, object-oriented programming\ language that combines remarkable power with very clear syntax" USAGE guillaume@ubuntu:~/py/0x00$ ./8-concat_edges.py object-oriented programming with Python guillaume@ubuntu:~/py/0x00$ wc -l 8-concat_edges.py 5 8-concat_edges.py guillaume@ubuntu:~/py/0x00$ 9-easter_egg.py 9-easter_egg.py - A python script that prints “The Zen of Python”, by TimPeters, followed by a new line USAGE guillaume@ubuntu:~/py/0x00$ ./9-easter_egg.py The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts. Special cases aren't special enough to break the rules. Although practicality beats purity. Errors should never pass silently. Unless explicitly silenced. In the face of ambiguity, refuse the temptation to guess. There should be one-- and preferably only one --obvious way to do it. Although that way may not be obvious at first unless you're Dutch. Now is better than never. Although never is often better than *right* now. If the implementation is hard to explain, it's a bad idea. If the implementation is easy to explain, it may be a good idea. Namespaces are one honking great idea -- let's do more of those! guillaume@ubuntu:~/py/0x00$ 10-* This check-cycle file detects a cycle in a linked list and the other files creates, prints and frees the memory allocation needed for a linked list creation USAGE carrie@ubuntu:~/0x00$ gcc -Wall -Werror -Wextra -pedantic -std=gnu89 10-main.c 10-check_cycle.c 10-linked_lists.c -o cycle carrie@ubuntu:~/0x00$$ ./cycle 1024 402 98 4 3 2 1 0 Linked list has no cycle Linked list has a cycle carrie@ubuntu:~/0x00$ 100-write.py 100-write.py - A python script that prints exactly and that piece of art is useful - Dora Korpar, 2015-10-19, followed by a new line. to the standard error and exiting with status 1 USAGE guillaume@ubuntu:~/py/0x00$ ./100-write.py and that piece of art is useful - Dora Korpar, 2015-10-19 guillaume@ubuntu:~/py/0x00$ echo $? 1 guillaume@ubuntu:~/py/0x00$ ./100-write.py 2> q guillaume@ubuntu:~/py/0x00$ cat q and that piece of art is useful - Dora Korpar, 2015-10-19 guillaume@ubuntu:~/py/0x00$ 101-compile 101-compile - script that compiles a Python script file. USAGE guillaume@ubuntu:~/py/0x00$ cat main.py #!/usr/bin/python3 print("Best School") guillaume@ubuntu:~/py/0x00$ export PYFILE=main.py guillaume@ubuntu:~/py/0x00$ ./101-compile Compiling main.py ... guillaume@ubuntu:~/py/0x00$ ls 101-compile main.py main.pyc guillaume@ubuntu:~/py/0x00$ cat main.pyc | zgrep -c "Best School" 1 guillaume@ubuntu:~/py/0x00$ od -t x1 main.pyc # SYSTEM DEPENDANT => CAN BE DIFFERENT 0000000 ee 0c 0d 0a 91 26 3e 58 31 00 00 00 e3 00 00 00 0000020 00 00 00 00 00 00 00 00 00 02 00 00 00 40 00 00 0000040 00 73 0e 00 00 00 65 00 00 64 00 00 83 01 00 01 0000060 64 01 00 53 29 02 7a 10 48 6f 6c 62 65 72 74 6f 0000100 6e 20 53 63 68 6f 6f 6c 4e 29 01 da 05 70 72 69 0000120 6e 74 a9 00 72 02 00 00 00 72 02 00 00 00 fa 07 0000140 6d 61 69 6e 2e 70 79 da 08 3c 6d 6f 64 75 6c 65 0000160 3e 02 00 00 00 73 00 00 00 00 0000172 guillaume@ubuntu:~/py/0x00$ 102-magic_calculation.py 102-magic_calculation.py - it interpretes a bytecode.. The byte code 3 0 LOAD_CONST 1 (98) 3 LOAD_FAST 0 (a) 6 LOAD_FAST 1 (b) 9 BINARY_POWER 10 BINARY_ADD 11 RETURN_VALUE
braydentibbs32
// ==UserScript== // @name Krunker Powered WheelChair // @namespace https://github.com/hrt // @version 1.8.7 // @description WheelChair // @author hrt x ttap x MasterP // @match *://krunker.io/* // @run-at document-start // @require https://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js // @require https://krunkr.com/assets/js/canvas.gui.js?ver=0.7 // @grant none // ==/UserScript== WebFont.load({ google: { families: ['Roboto'] } }); (function () { const options = { aimbot: true, silentAim: true, boxEsp: true, boxColor: "rgba(244,100,80,1)", weaponEsp: true, healthEsp: true, nameEsp: true, chams: true, autoReload: true, autoJump: true, orgNameTags: false, aimThroughWalls: false, chamsColorStr: "rgba(255,0,0,1)", chamsRed: 255, chamsBlue: 0, chamsGreen: 0, }; window.options = options; const styles = { fontFamily: "Roboto", itemHeight: 28, setup: { background: "#0B132B", color: "#4c698d", fontSize: "16px", header: { color: "#839cbc", fontSize: "20px", borderBottom: "#3A506B", paddingBottom: 20 }, steps: { background: "white", selected: "#5BC0BE", } }, profiles: { background: "#090F22", borderBottom: "#4c698d" }, folder: { header: { color: "#4c698d", fontSize: "15.4px", background: "#0B132B" } }, item: { color: "#839cbc", fontSize: "13.2px", background: "#1C2541" }, button: { background: "#1C2541", lineTop: "#5BC0BE", color: "#4c698d", hovered: "#5BC0BE", hoveredColor: "#242f53" }, checkbox: { background: "#242f53", checkedBg: "#5BC0BE", hovered: "rgba(91,192,190,0.3)", width: 18, height: 18 }, input: { background: "#242f53", color: "#4c698d", cursor: "#839cbc", width: 120, height: 22 }, select: { background: "#242f53", color: "#4c698d", hovered: "#3A506B", width: 80, height: 20, }, option: { background: "#242f53", color: "#4c698d", hovered: "#3A506B", hoveredColor: "white", outline: "#0B132B" }, slider: { background: "#242f53", color: "#5BC0BE", slider: "#5BC0BE", hovered: "#3A506B", width: 89, height: 20, leftPadding: 100, input: { width: 43, } } } const replace = String.prototype.replace; var hideHook = function (fn, oFn) { fn.toString = oFn.toString.bind(oFn); } const menu = new MyGUI(false, 0, 0, 250, 250, styles, "wheelchair", 1) menu.remember(window.options) window.menu = menu; const poweredWheelAimbot = menu.addFolder("Aimbot", true) const poweredWheelVisuals = menu.addFolder("Visuals", true) poweredWheelAimbot.add("Aimbot", window.options, "aimbot", "Check") poweredWheelAimbot.add("Silent Aim", window.options, "silentAim", "Check") poweredWheelAimbot.add("Auto Reload", window.options, "autoReload", "Check") poweredWheelAimbot.add("Aim Through Walls", window.options, "aimThroughWalls", "Check") poweredWheelVisuals.add("Game Esp", window.options, "orgNameTags", "Check") .onChange((val) => { if (val) { window.options.nameEsp = false; window.options.boxEsp = false; window.options.weaponEsp = false; window.options.healthEsp = false; } }) poweredWheelVisuals.add("Name Esp", window.options, "nameEsp", "Check") .onChange((val) => { if (val && window.options.orgNameTags) window.options.orgNameTags = !window.options.orgNameTags }) poweredWheelVisuals.add("Box Esp", window.options, "boxEsp", "Check") .onChange((val) => { if (val && window.options.orgNameTags) window.options.orgNameTags = !window.options.orgNameTags }) poweredWheelVisuals.add("Weapon Esp", window.options, "weaponEsp", "Check") .onChange((val) => { if (val && window.options.orgNameTags) window.options.orgNameTags = !window.options.orgNameTags }) poweredWheelVisuals.add("Health Esp", window.options, "healthEsp", "Check") .onChange((val) => { if (val && window.options.orgNameTags) window.options.orgNameTags = !window.options.orgNameTags }) poweredWheelVisuals.add("Chams", window.options, "chams", "Check") poweredWheelVisuals.add("Box Color", window.options, "boxColor", "Color") poweredWheelVisuals.add("Chams Color", window.options, "chamsColorStr", "Color") .onChange((val) => { const { 1: r, 2: g, 3: b } = val.match(/rgba\((\d+),(\d+),(\d+),\d+\)/) window.options.chamsRed = (r - 0) / (255 - 0) window.options.chamsGreen = (g - 0) / (255 - 0) window.options.chamsBlue = (b - 0) / (255 - 0) }) window.hrtCheat = function (me, inputs, world, consts, math) { var controls = world.controls; const SHOOT = 5, SCOPE = 6, xDr = 3, yDr = 2, JUMP = 7, CROUCH = 8; var isEnemy = function (player) { return !me.team || player.team != me.team }; var canHit = function (player) { return null == (window.options.aimThroughWalls ? world.canHit(me, player.x3, player.y3 - player.crouchVal * consts.crouchDst, player.z3) : world.canSee(me, player.x3, player.y3 - player.crouchVal * consts.crouchDst, player.z3)) }; var normaliseYaw = function (yaw) { return (yaw % Math.PI2 + Math.PI2) % Math.PI2; }; var dAngleTo = function (x, y, z) { var ty = normaliseYaw(math.getDir(controls.object.position.z, controls.object.position.x, z, x)); var tx = math.getXDire(controls.object.position.x, controls.object.position.y, controls.object.position.z, x, y, z); var oy = normaliseYaw(controls.object.rotation.y); var ox = controls.pchObjc.rotation.x; var dYaw = Math.min(Math.abs(ty - oy), Math.abs(ty - oy - Math.PI2), Math.abs(ty - oy + Math.PI2)); var dPitch = tx - ox; return Math.hypot(dYaw, dPitch); }; var calcAngleTo = function (player) { return dAngleTo(e.x3, e.y3 + consts.playerHeight - (consts.headScale + consts.hitBoxPad) / 2 - e.crouchVal * consts.crouchDst, e.z3); }; var calcDistanceTo = function (player) { return math.getD3D(player.x3, player.y3, player.z3, me.x, me.y, me.z) }; var isCloseEnough = function (player) { var distance = calcDistanceTo(player); return me.weapon.range >= distance && ("Shotgun" != me.weapon.name || distance < 70) && ("Akimbo Uzi" != me.weapon.name || distance < 100); }; var haveAmmo = function () { return me.ammos[me.weaponIndex]; }; // runs once if (!window.init) { window.init = true; /*************************************/ /* crimpeek / faster bullets removed */ /*************************************/ window.drawVisuals = function (c, scalingFactor, perspective) { if (!window.ctx) { window.ctx = c.getContext("2d") } c = window.ctx; var scaledWidth = c.canvas.width / scalingFactor; var scaledHeight = c.canvas.height / scalingFactor; var worldPosition = perspective.camera.getWorldPosition(); for (var i = 0; i < world.players.list.length; i++) { var player = world.players.list[i]; var e = players[i]; if (e.isYou || !e.active || !e.objInstances || !isEnemy(e)) { continue; } // find min x, max x, min y, max y // optimisation: we can already tell what ymin ymax is var xmin = Infinity; var xmax = -Infinity; var ymin = Infinity; var ymax = -Infinity; var br = false; for (var j = -1; !br && j < 2; j += 2) { for (var k = -1; !br && k < 2; k += 2) { for (var l = 0; !br && l < 2; l++) { var position = e.objInstances.position.clone(); position.x += j * consts.playerScale; position.z += k * consts.playerScale; position.y += l * (consts.playerHeight - e.crouchVal * consts.crouchDst); if (!perspective.frustum.containsPoint(position)) { br = true; break; } position.project(perspective.camera); xmin = Math.min(xmin, position.x); xmax = Math.max(xmax, position.x); ymin = Math.min(ymin, position.y); ymax = Math.max(ymax, position.y); } } } if (br) { continue; } xmin = (xmin + 1) / 2; ymin = (ymin + 1) / 2; xmax = (xmax + 1) / 2; ymax = (ymax + 1) / 2; c.save(); c.scale(scalingFactor, scalingFactor) // perfect box esp var distanceScale = Math.max(.3, 1 - math.getD3D(worldPosition.x, worldPosition.y, worldPosition.z, e.x, e.y, e.z) / 600); c.scale(distanceScale, distanceScale); var xScale = scaledWidth / distanceScale; var yScale = scaledHeight / distanceScale; ymin = yScale * (1 - ymin); ymax = yScale * (1 - ymax); xmin = xScale * xmin; xmax = xScale * xmax; if (window.options.boxEsp) { c.lineWidth = 5; c.strokeStyle = window.options.boxColor; c.beginPath(); c.moveTo(xmin, ymin); c.lineTo(xmin, ymax); c.lineTo(xmax, ymax); c.lineTo(xmax, ymin); c.lineTo(xmin, ymin); c.stroke(); } // health bar if (window.options.healthEsp) { c.fillStyle = "rgba(255,50,50,1)"; var barMaxHeight = ymax - ymin; c.fillRect(xmin - 7, ymin, -10, barMaxHeight); c.fillStyle = "#00FFFF"; c.fillRect(xmin - 7, ymin, -10, barMaxHeight * (e.health / e.maxHealth)); } // info var x = xmax + 7; var y = ymax; c.fillStyle = "white"; c.strokeStyle = 'black'; c.lineWidth = 1; if (window.options.nameEsp) { c.font = "60px Roboto"; c.fillText(e.name, x, y); c.strokeText(e.name, x, y); } c.font = "30px Sans-serif"; if (window.options.weaponEsp) { y += 35; c.fillText(e.weapon.name, x, y); c.strokeText(e.weapon.name, x, y); } if (window.options.healthEsp) { y += 35; c.fillText(e.health + ' HP', x, y); c.strokeText(e.health + ' HP', x, y); } c.restore(); // skelly chams // note: this should probably be else where - it affects all players var material = e.legMeshes[0].material; if (window.options.chams) { material.alphaTest = 1; material.depthTest = false; material.fog = false; material.emissive.r = window.options.chamsRed material.emissive.g = window.options.chamsGreen material.emissive.b = window.options.chamsBlue material.wireframe = true; } else if (!window.options.chams) { material.alphaTest = 0; material.depthTest = true; material.fog = true; material.emissive.r = 0; material.emissive.g = 0; material.emissive.b = 0; material.wireframe = false; } } } } // auto reload if (window.options.autoReload) controls.keys[controls.reloadKey] = !haveAmmo(); // auto jump if (window.options.autoJump) inputs[JUMP] = (controls.keys[controls.jumpKey] && !me.didJump) * 1; // target selector - based on closest to aim var closest = null, closestAngle = Infinity; var players = world.players.list; if (!window.options.aimbot) return; for (var i = 0; me.active && i < players.length; i++) { var e = players[i]; if (e.isYou || !e.active || !e.objInstances || !isEnemy(e)) { continue; } // experimental prediction // just use normal xyz values instead for potentially better aim :shrug: var scale = Math.min(1.6, e.dt / (consts.serverSendRate * consts.interpolation)); // this check is so that we don't shoot people that just respawn if (math.getD3D(e.x2, e.y2, e.z2, e.x, e.y, e.z) < 100) { e.x3 = e.x + (e.x2 - e.x) * scale; e.y3 = e.y + (e.y2 - e.y) * scale; e.z3 = e.z + (e.z2 - e.z) * scale; } else { e.x3 = e.x; e.y3 = e.y; e.z3 = e.z; } if (!isCloseEnough(e) || !canHit(e)) { continue; } var angle = calcAngleTo(e); if (angle < closestAngle) { closestAngle = angle; closest = e; } } // aimbot // hrt's big brain got a six pack var ty = controls.object.rotation.y, tx = controls.pchObjc.rotation.x; if (closest) { var target = closest; // No idea why public cheats are using target distance in aimbot calc // No idea why it's so difficult for people to not use magic numbers here var y = target.y3 + consts.playerHeight - (consts.headScale /* + consts.hitBoxPad*/ ) / 2 - target.crouchVal * consts.crouchDst; if (me.weapon.nAuto && me.didShoot) { inputs[SHOOT] = 0; } else if (!me.aimVal) { // me.recoilAnimY < 0.1 - if you want to shoot more slower and perhaps more accurately // inputs[CROUCH] = 1; // auto crouch inputs[SHOOT] = 1; inputs[SCOPE] = 1; } else { // inputs[CROUCH] = 1; // auto crouch inputs[SCOPE] = 1; } ty = math.getDir(controls.object.position.z, controls.object.position.x, target.z3, target.x3); tx = math.getXDire(controls.object.position.x, controls.object.position.y, controls.object.position.z, target.x3, y, target.z3); // perfect recoil control..? tx -= .3 * me.recoilAnimY; } else { inputs[SHOOT] = controls.mouseDownL; inputs[SCOPE] = controls.mouseDownR; // inputs[CROUCH] = controls.keys[controls.crouchKey] * 1; // auto crouch } // silent aim const newY = (ty % Math.PI2).round(3); const newX = (tx % Math.PI2).round(3); inputs[xDr] = newX; inputs[yDr] = newY; if (!window.options.silentAim) { controls.object.rotation.y = newY controls.pchObjc.rotation.x = newX } } // only big iq people read this ttap#4547 // big up my boy hrt and ttap for releasing const handler = { construct(target, args) { if (args.length == 2 && args[1].includes('Seen')) { var script = args[1]; // anti retard / version fix var version = script.match(/\w+\['exports'\]=(0[xX][0-9a-fA-F]+);/)[1]; if (version !== "0x14d41") { document.write('Version missmatch, wait for hrt'); document.write('Version missmatch ( ' + version + ')'); window.location.href = atob('aHR0cHM6Ly9naXRodWIuY29tL2hydC93aGVlbGNoYWly'); } var hook = /(\w+)\['tmpInputs'\]\['push'\]\((\w+)\),/; var tokens = script.match(hook); var inputs = tokens[2]; var world = script.match(/(\w+)\['players'\]\['updateMesh'\]/)[1]; var consts = script.match(/(\w+)\['thirdPX'\],/)[1]; var me = script.match(/\((\w+)\|\|window\['spectating'\]\)/)[1]; var math = script.match(/\['xDr'\]\+(\w+)\['getDir'\]/)[1]; var ttapParams = [me, inputs, world, consts, math]; // Doesn't make sense to hook aimbot anywhere else - unlike every other public cheat script = replace.call(script, hook, tokens[0] + '(' + hrtCheat.toString() + ')(' + ttapParams + '),'); //Remove clear rect inside overlay render. script = replace.call(script, /,\w+\['clearRect'\]\(0x0,0x0,\w+,\w+\)/, ""); // remove renders script = replace.call(script, /'none'==menuHolder\['style'\]\['display'\]&&'none'==endUI\['style'\]\['display'\]\)/g, '!window.options.boxEsp && !window.options.weaponEsp && !window.options.healthEsp && !window.options.healthEsp)'); //Hook overlay render and force menu to clear frame script = replace.call(script, /(\w+)\[\'render\'\]\((\w+),\w+,(\w+),\w+,\w+\),/, (a, b, c, d) => `window.menu.draw(${b}.canvas,true),(window.drawVisuals && window.drawVisuals(${b}.canvas,${c},${d})),${a} `); // all weapons trails on script = replace.call(script, /\w+\['weapon'\]&&\w+\['weapon'\]\['trail'\]/g, "true") // color blind mode script = replace.call(script, /#9eeb56/g, '#00FFFF'); // no zoom script = replace.call(script, /,'zoom':.+?(?=,)/g, ",'zoom':1"); // an extremely old canHit / autowall function creator that doesn't alter canSee // dumb asf but if it still works then should I touch it :thinking: var canSee = script.match(/this\['canSee'\]\=function.+?(?=return null;})/)[0] + "return null;}"; var canHit = replace.call(canSee, /canSee/g, "canHit"); canHit = replace.call(canHit, /\|\|0x0;/, "||0x0;var pcount=0;"); var player = canHit.match(/function\(([a-zA-Z0-9]*),/)[1]; var object = canHit.match(/([a-zA-Z0-9]*)\=this\['map'\]\['manager'\]\['objects'/)[1]; var statement = canHit.match(/\['transparent'\]\){(.+?(?=}))/)[1]; var ret = statement.match(/return [a-zA-Z0-9]*/)[0]; statement = replace.call(statement, ret, "{pcount+=1; if(pcount>1&&" + player + ".weapon.pierce>0.8){" + ret + "}}"); var search = canHit.match(/return [a-zA-Z0-9]*;\}/)[0]; canHit = replace.call(canHit, search, search + 'else if(' + object + '.active&&' + object + '.penetrable){' + statement + '}') search = canHit.match(/\![a-zA-Z0-9]*\['transparent'\]/)[0]; // todo: onhit logic doesn't make sense canHit = replace.call(canHit, search, "(!" + object + ".penetrable||!" + player + ".weapon.pierce)"); script = replace.call(script, ",this['canSee']", "," + canHit + ",this['canSee']"); args[1] = script; } return new target(...args); } }; // credits for bypass: https://github.com/hrt/ var original_Function = Function; Function = new Proxy(Function, handler); hideHook(Function, original_Function); })()
Aryia-Behroziuan
Tutorials This is a guide to many pandas tutorials, geared mainly for new users. Internal Guides pandas own 10 Minutes to pandas More complex recipes are in the Cookbook pandas Cookbook The goal of this cookbook (by Julia Evans) is to give you some concrete examples for getting started with pandas. These are examples with real-world data, and all the bugs and weirdness that that entails. Here are links to the v0.1 release. For an up-to-date table of contents, see the pandas-cookbook GitHub repository. To run the examples in this tutorial, you’ll need to clone the GitHub repository and get IPython Notebook running. See How to use this cookbook. A quick tour of the IPython Notebook: Shows off IPython’s awesome tab completion and magic functions. Chapter 1: Reading your data into pandas is pretty much the easiest thing. Even when the encoding is wrong! Chapter 2: It’s not totally obvious how to select data from a pandas dataframe. Here we explain the basics (how to take slices and get columns) Chapter 3: Here we get into serious slicing and dicing and learn how to filter dataframes in complicated ways, really fast. Chapter 4: Groupby/aggregate is seriously my favorite thing about pandas and I use it all the time. You should probably read this. Chapter 5: Here you get to find out if it’s cold in Montreal in the winter (spoiler: yes). Web scraping with pandas is fun! Here we combine dataframes. Chapter 6: Strings with pandas are great. It has all these vectorized string operations and they’re the best. We will turn a bunch of strings containing “Snow” into vectors of numbers in a trice. Chapter 7: Cleaning up messy data is never a joy, but with pandas it’s easier. Chapter 8: Parsing Unix timestamps is confusing at first but it turns out to be really easy. Lessons for New pandas Users For more resources, please visit the main repository. 01 - Lesson: - Importing libraries - Creating data sets - Creating data frames - Reading from CSV - Exporting to CSV - Finding maximums - Plotting data 02 - Lesson: - Reading from TXT - Exporting to TXT - Selecting top/bottom records - Descriptive statistics - Grouping/sorting data 03 - Lesson: - Creating functions - Reading from EXCEL - Exporting to EXCEL - Outliers - Lambda functions - Slice and dice data 04 - Lesson: - Adding/deleting columns - Index operations 05 - Lesson: - Stack/Unstack/Transpose functions 06 - Lesson: - GroupBy function 07 - Lesson: - Ways to calculate outliers 08 - Lesson: - Read from Microsoft SQL databases 09 - Lesson: - Export to CSV/EXCEL/TXT 10 - Lesson: - Converting between different kinds of formats 11 - Lesson: - Combining data from various sources Practical data analysis with Python This guide is a comprehensive introduction to the data analysis process using the Python data ecosystem and an interesting open dataset. There are four sections covering selected topics as follows: Munging Data Aggregating Data Visualizing Data Time Series Excel charts with pandas, vincent and xlsxwriter Using Pandas and XlsxWriter to create Excel charts Various Tutorials Wes McKinney’s (pandas BDFL) blog Statistical analysis made easy in Python with SciPy and pandas DataFrames, by Randal Olson Statistical Data Analysis in Python, tutorial videos, by Christopher Fonnesbeck from SciPy 2013 Financial analysis in python, by Thomas Wiecki Intro to pandas data structures, by Greg Reda Pandas and Python: Top 10, by Manish Amde Pandas Tutorial, by Mikhail Semeniuk indexmodules |next |previous |pandas 0.15.2 documentation » © Copyright 2008-2014, the pandas development team
Mineralized
// ==UserScript== // @name Krunker Powered WheelChair // @namespace https://github.com/hrt // @version 1.8.8 // @description WheelChair // @author hrt x ttap x MasterP // @match *://krunker.io/* // @run-at document-start // @require https://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js // @require https://krunkr.com/assets/js/canvas.gui.js?ver=0.6 // @grant none // ==/UserScript== WebFont.load({ google: { families: ['Roboto'] } }); (function () { const replace = String.prototype.replace; function conceal_function(original_Function, hook_Function) { var anti_map = []; var original_toString = Function.prototype.toString; function hook_toString(...args) { for (var i = 0; i < anti_map.length; i++) { if (anti_map[i].from === this) { return anti_map[i].to; } } return original_toString.apply(this, args); } anti_map.push({ from: hook_Function, to: original_Function.toString() }); anti_map.push({ from: hook_toString, to: original_toString.toString() }); Function.prototype.toString = hook_toString; }; const options = { aimbot: true, silentAim: false, boxEsp: true, boxColor: "rgba(244,100,80,1)", weaponEsp: true, healthEsp: true, nameEsp: true, chams: true, autoReload: true, autoJump: true, chamsColorStr: "rgba(255,0,0,1)", chamsRed: 255, chamsBlue: 0, chamsGreen: 0, }; window.options = options; const styles = { fontFamily: "Roboto", itemHeight: 28, setup: { background: "#0B132B", color: "#4c698d", fontSize: "16px", header: { color: "#839cbc", fontSize: "20px", borderBottom: "#3A506B", paddingBottom: 20 }, steps: { background: "white", selected: "#5BC0BE", } }, profiles: { background: "#090F22", borderBottom: "#4c698d" }, folder: { header: { color: "#4c698d", fontSize: "15.4px", background: "#0B132B" } }, item: { color: "#839cbc", fontSize: "13.2px", background: "#1C2541" }, button: { background: "#1C2541", lineTop: "#5BC0BE", color: "#4c698d", hovered: "#5BC0BE", hoveredColor: "#242f53" }, checkbox: { background: "#242f53", checkedBg: "#5BC0BE", hovered: "rgba(91,192,190,0.3)", width: 18, height: 18 }, input: { background: "#242f53", color: "#4c698d", cursor: "#839cbc", width: 120, height: 22 }, select: { background: "#242f53", color: "#4c698d", hovered: "#3A506B", width: 80, height: 20, }, option: { background: "#242f53", color: "#4c698d", hovered: "#3A506B", hoveredColor: "white", outline: "#0B132B" }, slider: { background: "#242f53", color: "#5BC0BE", slider: "#5BC0BE", hovered: "#3A506B", width: 89, height: 20, leftPadding: 100, input: { width: 43, } } } const menu = new MyGUI(false, 0, 0, 250, 250, styles, "wheelchair", 1) menu.remember(window.options) window.menu = menu; const poweredWheelAimbot = menu.addFolder("Aimbot", true) const poweredWheelVisuals = menu.addFolder("Visuals", true) const poweredWheelOther = menu.addFolder("Other", true) poweredWheelAimbot.add("Aimbot", window.options, "aimbot", "Check") poweredWheelAimbot.add("Silent Aim", window.options, "silentAim", "Check") poweredWheelAimbot.add("Auto Reload", window.options, "autoReload", "Check") poweredWheelVisuals.add("Name Esp", window.options, "nameEsp", "Check") poweredWheelVisuals.add("Box Esp", window.options, "boxEsp", "Check") poweredWheelVisuals.add("Weapon Esp", window.options, "weaponEsp", "Check") poweredWheelVisuals.add("Health Esp", window.options, "healthEsp", "Check") poweredWheelVisuals.add("Chams", window.options, "chams", "Check") poweredWheelVisuals.add("Box Color", window.options, "boxColor", "Color") poweredWheelOther.add("Auto Jump", window.options, "autoJump", "Check") poweredWheelVisuals.add("Chams Color", window.options, "chamsColorStr", "Color") .onChange((val) => { const { 1: r, 2: g, 3: b } = val.match(/rgba\((\d+),(\d+),(\d+),\d+\)/) window.options.chamsRed = (r - 0) / (255 - 0) window.options.chamsGreen = (g - 0) / (255 - 0) window.options.chamsBlue = (b - 0) / (255 - 0) }) // no longer public offset finding var inputs = "cEE"; var world = "cEy"; var consts = "cDv"; var me = "cEA"; var math = "cEp"; var hrtCheat = function (me, inputs, world, consts, math, conceal_function) { /* Wanna update yourself? Write a script which finds these */ var canSee = "BwftfwWS"; var getDir = "ujHYahTl"; var getXDire = "SbPUccYE"; var getDistance = "kwpNBTcj"; var getD3D = "OmPMwAzs"; var pchObjc = "vKPtJVFI"; var objInstances = "eKoEYKcC"; var playerScale = "playerScale"; var isYou = "OFnPTTpe"; var recoilAnimY = "psKrGopm"; var playerHeight = "playerHeight"; var mouseDownL = "sMTFGWrl"; var mouseDownR = "hhLaRzBY"; var controls = world.controls; const SHOOT = 5, SCOPE = 6, xDr = 3, yDr = 2, JUMP = 7, CROUCH = 8; var isEnemy = function (player) { return !me.team || player.team != me.team }; var canHit = function (player) { return null == world[canSee](me, player.x3, player.y3 - player.crouchVal * consts.crouchDst, player.z3) }; var normaliseYaw = function (yaw) { return (yaw % Math.PI2 + Math.PI2) % Math.PI2; }; var dAngleTo = function (x, y, z) { var ty = normaliseYaw(math[getDir](controls.object.position.z, controls.object.position.x, z, x)); var tx = math[getXDire](controls.object.position.x, controls.object.position.y, controls.object.position.z, x, y, z); var oy = normaliseYaw(controls.object.rotation.y); var ox = controls[pchObjc].rotation.x; var dYaw = Math.min(Math.abs(ty - oy), Math.abs(ty - oy - Math.PI2), Math.abs(ty - oy + Math.PI2)); var dPitch = tx - ox; return Math.hypot(dYaw, dPitch); }; var calcAngleTo = function (player) { return dAngleTo(e.x3, e.y3 + consts[playerHeight] - (consts.headScale + consts.hitBoxPad) / 2 - e.crouchVal * consts.crouchDst, e.z3); }; var calcDistanceTo = function (player) { return math[getD3D](player.x3, player.y3, player.z3, me.x, me.y, me.z) }; var isCloseEnough = function (player) { var distance = calcDistanceTo(player); return me.weapon.range >= distance && ("Shotgun" != me.weapon.name || distance < 70) && ("Akimbo Uzi" != me.weapon.name || distance < 100); }; var haveAmmo = function () { return !(me.ammos[me.weaponIndex] !== undefined && me.ammos[me.weaponIndex] == 0); }; // runs once if (!window.init) { window.init = true; /*************************************/ /* crimpeek / faster bullets removed */ /*************************************/ var drawVisuals = function (c) { if (!arguments.callee.caller.caller.arguments[0] || !arguments.callee.caller.caller.arguments[2]) return; var scalingFactor = arguments.callee.caller.caller.arguments[0]; var perspective = arguments.callee.caller.caller.arguments[2]; if (!perspective && !perspective.camera) return; var scaledWidth = c.canvas.width / scalingFactor; var scaledHeight = c.canvas.height / scalingFactor; var worldPosition = perspective.camera.getWorldPosition(); for (var i = 0; i < world.players.list.length; i++) { var player = world.players.list[i]; var e = players[i]; if (e[isYou] || !e.active || !e[objInstances] || !isEnemy(e)) { continue; } // find min x, max x, min y, max y // optimisation: we can already tell what ymin ymax is var xmin = Infinity; var xmax = -Infinity; var ymin = Infinity; var ymax = -Infinity; var br = false; for (var j = -1; !br && j < 2; j += 2) { for (var k = -1; !br && k < 2; k += 2) { for (var l = 0; !br && l < 2; l++) { var position = e[objInstances].position.clone(); position.x += j * consts[playerScale]; position.z += k * consts[playerScale]; position.y += l * (consts[playerHeight] - e.crouchVal * consts.crouchDst); if (!perspective.frustum.containsPoint(position)) { br = true; break; } position.project(perspective.camera); xmin = Math.min(xmin, position.x); xmax = Math.max(xmax, position.x); ymin = Math.min(ymin, position.y); ymax = Math.max(ymax, position.y); } } } if (br) { continue; } xmin = (xmin + 1) / 2; ymin = (ymin + 1) / 2; xmax = (xmax + 1) / 2; ymax = (ymax + 1) / 2; c.save(); // perfect box esp var distanceScale = Math.max(.3, 1 - math[getD3D](worldPosition.x, worldPosition.y, worldPosition.z, e.x, e.y, e.z) / 600); c.scale(distanceScale, distanceScale); var xScale = scaledWidth / distanceScale; var yScale = scaledHeight / distanceScale; ymin = yScale * (1 - ymin); ymax = yScale * (1 - ymax); xmin = xScale * xmin; xmax = xScale * xmax; if (window.options.boxEsp) { c.lineWidth = 5; c.strokeStyle = window.options.boxColor; c.beginPath(); c.moveTo(xmin, ymin); c.lineTo(xmin, ymax); c.lineTo(xmax, ymax); c.lineTo(xmax, ymin); c.lineTo(xmin, ymin); c.stroke(); } // health bar if (window.options.healthEsp) { c.fillStyle = "rgba(255,50,50,1)"; var barMaxHeight = ymax - ymin; c.fillRect(xmin - 7, ymin, -10, barMaxHeight); c.fillStyle = "#00FFFF"; c.fillRect(xmin - 7, ymin, -10, barMaxHeight * (e.health / e.maxHealth)); } // info var x = xmax + 7; var y = ymax; c.fillStyle = "white"; c.strokeStyle = 'black'; c.lineWidth = 1; if (window.options.nameEsp) { c.font = "60px Roboto"; c.fillText(e.name, x, y); c.strokeText(e.name, x, y); } c.font = "30px Sans-serif"; if (window.options.weaponEsp) { y += 35; c.fillText(e.weapon.name, x, y); c.strokeText(e.weapon.name, x, y); } if (window.options.healthEsp) { y += 35; c.fillText(e.health + ' HP', x, y); c.strokeText(e.health + ' HP', x, y); } c.restore(); // skelly chams // note: this should probably be else where - it affects all players var material = e.legMeshes[0].material; if (window.options.chams) { material.alphaTest = 1; material.depthTest = false; material.fog = false; material.emissive.r = window.options.chamsRed material.emissive.g = window.options.chamsGreen material.emissive.b = window.options.chamsBlue material.wireframe = true; } else if (!window.options.chams) { material.alphaTest = 0; material.depthTest = true; material.fog = true; material.emissive.r = 0; material.emissive.g = 0; material.emissive.b = 0; material.wireframe = false; } } } // render all the visuals var original_clearRect = CanvasRenderingContext2D.prototype.clearRect; var hook_clearRect = function (...args) { if (arguments.length === 5) { original_clearRect.apply(this, args); } else { drawVisuals(this); } }; var original_scale = CanvasRenderingContext2D.prototype.scale; var hook_scale = function (...args) { original_scale.apply(this, args); // console.log(arguments[0]) if (uiBase.style.transform.match(/scale\((.+)\)/)[1] === arguments[0].toFixed(3)) { this.save(); this.setTransform(1, 0, 0, 1, 0, 0); window.menu.draw(this, true) this.restore() } }; conceal_function(original_clearRect, hook_clearRect); conceal_function(original_scale, original_scale); CanvasRenderingContext2D.prototype.scale = hook_scale; CanvasRenderingContext2D.prototype.clearRect = hook_clearRect; } // auto reload if (window.options.autoReload) controls.keys[controls.reloadKey] = !haveAmmo(); // auto jump if (window.options.autoJump) inputs[JUMP] = (controls.keys[controls.jumpKey] && !me.didJump) * 1; // target selector - based on closest to aim var closest = null, closestAngle = Infinity; var players = world.players.list; if (!window.options.aimbot) return; for (var i = 0; me.active && i < players.length; i++) { var e = players[i]; if (e[isYou] || !e.active || !e[objInstances] || !isEnemy(e)) { continue; } // experimental prediction removed - otherwise they'd be in x3 y3 z3 e.x3 = e.x; e.y3 = e.y; e.z3 = e.z; if (!isCloseEnough(e) || !canHit(e)) { continue; } var angle = calcAngleTo(e); if (angle < closestAngle) { closestAngle = angle; closest = e; } } // aimbot // hrt's big brain got a six pack var ty = controls.object.rotation.y, tx = controls[pchObjc].rotation.x; if (closest) { var target = closest; // No idea why public cheats are using target distance in aimbot calc // No idea why it's so difficult for people to not use magic numbers here var y = target.y3 + consts[playerHeight] - (consts.headScale /* + consts.hitBoxPad*/ ) / 2 - target.crouchVal * consts.crouchDst; if (me.weapon.nAuto && me.didShoot) { inputs[SHOOT] = 0; } else if (!me.aimVal) { // me.recoilAnimY < 0.1 - if you want to shoot more slower and perhaps more accurately // inputs[CROUCH] = 1; // auto crouch inputs[SHOOT] = 1; inputs[SCOPE] = 1; } else { // inputs[CROUCH] = 1; // auto crouch inputs[SCOPE] = 1; } ty = math[getDir](controls.object.position.z, controls.object.position.x, target.z3, target.x3); tx = math[getXDire](controls.object.position.x, controls.object.position.y, controls.object.position.z, target.x3, y, target.z3); // perfect recoil control..? tx -= .3 * me[recoilAnimY]; } else { inputs[SHOOT] = controls[mouseDownL]; inputs[SCOPE] = controls[mouseDownR]; // inputs[CROUCH] = controls.keys[controls.crouchKey] * 1; // auto crouch } // silent aim const newY = (ty % Math.PI2).round(3); const newX = (tx % Math.PI2).round(3); inputs[xDr] = newX; inputs[yDr] = newY; if (!window.options.silentAim) { controls.object.rotation.y = newY controls[pchObjc].rotation.x = newX } } // only big iq people read this ttap#4547 // big up my boy hrt and ttap for releasing const handler = { construct(target, args) { if (args.length == 2 && args[1].length > 1337) { var script = args[1]; // anti anti chet var version = script.match(/\w+\['exports'\]=(0[xX][0-9a-fA-F]+);/)[1]; if (version !== "0x16589") { window[atob('ZG9jdW1lbnQ=')][atob('d3JpdGU=')](atob('VmVyc2lvbiBtaXNzbWF0Y2gg') + version); window[atob('bG9jYX' + 'Rpb24' + '=')][atob('aHJ' + 'lZg=' + '=')] = atob('aHR0cHM6' + 'Ly9naXRodWIuY2' + '9tL2hydC93aGVlb' + 'GNoYWly'); } var hook = /(\w+)\['tmpInpts'\]\['push'\]\((\w+)\),/; var tokens = script.match(hook); var ttapParams = [me, inputs, world, consts, math, conceal_function.toString()]; // Doesn't make sense to hook aimbot anywhere else - unlike every other public cheat script = replace.call(script, hook, tokens[0] + '(' + hrtCheat.toString() + ')(' + ttapParams + '),'); // all weapons trails on //script = replace.call(script, /\w+\['weapon'\]&&\w+\['weapon'\]\['trail'\]/g, "true") // color blind mode //script = replace.call(script, /#9eeb56/g, '#00FFFF'); // no zoom //script = replace.call(script, /,'zoom':.+?(?=,)/g, ",'zoom':1"); args[1] = script; } return new target(...args); } }; // credits for bypass: https://github.com/hrt/ var original_Function = Function; var hook_Function = new Proxy(Function, handler); conceal_function(original_Function, hook_Function); Function = hook_Function; })()
sharbel256
In this version of the search engine, each web page has a URL ("Uniform Resource Locator") that serves as its unique id and a string containing the body text of the page. The magic of search is enabled by pre-processing the body text of each page and storing the contents into a data structure optimized for fast retrieval of pages matching the search query.
All 6 repositories loaded