This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ast | |
import discord | |
from discord.ext import commands | |
def insert_returns(body): | |
# insert return stmt if the last expression is a expression statement | |
if isinstance(body[-1], ast.Expr): | |
body[-1] = ast.Return(body[-1].value) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bpy | |
def strVector3( v3 ): | |
return str(v3.x) + "," + str(v3.y) + "," + str(v3.z) | |
# create a new cube | |
bpy.ops.mesh.primitive_cube_add() | |
# newly created cube will be automatically selected | |
cube = bpy.context.selected_objects[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include_once 'db.php'; | |
global $con; | |
define('ERROR','404');//Define Your Error message HERE | |
define('REQADDR', '127.0.0.1');//Define your REQUESTIN SERVER ADDR | |
if($_SERVER['REMOTE_ADDR']=='127.0.0.1'){ | |
//process it | |
if(isset($_GET['q'])){ | |
$q=mysql_real_escape_string($_GET['q']);//TO get rid of SQL Enjection |