Skip to content

Instantly share code, notes, and snippets.

View shri's full-sized avatar

Shri Ganeshram shri

  • Founder, Stealth
  • United States
View GitHub Profile
#begin serializer https://github.com/Strangemother/django-djasoner
from io import StringIO
try:
from django.db.models import Model
from django.db.models.query import QuerySet
from django.utils.encoding import smart_unicode
from django.utils.simplejson import dumps
from django.utils import simplejson
@shri
shri / pokemon.json
Last active October 21, 2023 16:31
JSON of pokemon to go with my pokemonMoves.json file
{
"1":{
"name":"Bulbasaur",
"attack":49,
"defense":49,
"evolveLevel":16,
"evolveTo":"2",
"type":"grass",
"moves":[
"tackle",
@shri
shri / pokemonMoves.json
Created March 25, 2014 03:55
list of pokemon moves to go with my pokemon.json file
{"struggle":{"name":"Struggle","power":35,"accuracy":0.95,"type":"normal"},"air cutter":{"name":"Air Cutter","power":55,"accuracy":0.95,"type":"flying"},"crabhammer":{"name":"Crabhammer","power":90,"accuracy":0.85,"type":"water"},"cross chop":{"name":"Cross Chop","power":100,"accuracy":0.8,"type":"fighting"},"drill peck":{"name":"Drill Peck","power":80,"accuracy":1,"type":"flying"},"egg bomb":{"name":"Egg Bomb","power":100,"accuracy":0.75,"type":"normal"},"horn attack":{"name":"Horn Attack","power":65,"accuracy":1,"type":"normal"},"hydro pump":{"name":"Hydro Pump","power":120,"accuracy":0.8,"type":"water"},"hyper voice":{"name":"Hyper Voice","power":90,"accuracy":1,"type":"normal"},"karate chop":{"name":"Karate Chop","power":50,"accuracy":1,"type":"fighting"},"megahorn":{"name":"Megahorn","power":120,"accuracy":0.85,"type":"bug"},"mega kick":{"name":"Mega Kick","power":120,"accuracy":0.75,"type":"normal"},"mega punch":{"name":"Mega Punch","power":80,"accuracy":0.85,"type":"normal"},"peck":{"name":"Peck","powe
@shri
shri / pokemonTypes.json
Created March 25, 2014 04:44
json of types for pokemon
{
"ghost": {
"ghost": 2.0,
"steel": 0.5,
"psychic": 2.0,
"dark": 0.5,
"normal": 0.0
},
"steel": {
@shri
shri / pokemonImages.json
Created March 25, 2014 13:31
a json file containing images of pokemon
{"Bulbasaur":"http://img.pokemondb.net/artwork/bulbasaur.jpg","Ivysaur":"http://img.pokemondb.net/artwork/ivysaur.jpg","Venusaur":"http://img.pokemondb.net/artwork/venusaur.jpg","Charmander":"http://img.pokemondb.net/artwork/charmander.jpg","Charmeleon":"http://img.pokemondb.net/artwork/charmeleon.jpg","Charizard":"http://img.pokemondb.net/artwork/charizard.jpg","Squirtle":"http://img.pokemondb.net/artwork/squirtle.jpg","Wartortle":"http://img.pokemondb.net/artwork/wartortle.jpg","Blastoise":"http://img.pokemondb.net/artwork/blastoise.jpg","Caterpie":"http://img.pokemondb.net/artwork/caterpie.jpg","Metapod":"http://img.pokemondb.net/artwork/metapod.jpg","Butterfree":"http://img.pokemondb.net/artwork/butterfree.jpg","Weedle":"http://img.pokemondb.net/artwork/weedle.jpg","Kakuna":"http://img.pokemondb.net/artwork/kakuna.jpg","Beedrill":"http://img.pokemondb.net/artwork/beedrill.jpg","Pidgey":"http://img.pokemondb.net/artwork/pidgey.jpg","Pidgeotto":"http://img.pokemondb.net/artwork/pidgeotto.jpg","Pidgeot":"htt
@shri
shri / glass.html
Created April 22, 2014 22:04
[wearscript] whosonfirst
<html style="width:100%; height:100%; overflow:hidden">
<head>
<!-- You can include external scripts here like so... -->
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>-->
</head>
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<canvas id="canvas" width="640" height="360" style="display:block"></canvas>
<script>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script type="text/javascript">
function kimonoCallback(data) {
console.log(data);
if(data.lastrunstatus=="success"){
$("#a").text(JSON.stringify(data));
@shri
shri / glass.html
Created May 6, 2014 02:22
[wearscript] ar tags on glass
<html style="width:100%; height:100%; overflow:hidden">
<body style="width:100%; height:100%; overflow:hidden; margin:0" bgcolor="#000">
<script>
function centralTag(tags){
var distances = [];
var numTags = tags[0].length / 9;
var minDist = 1000;
var center = tags[0][0];
for (var i = 0; i < numTags; i++) {
@shri
shri / glass.html
Created June 10, 2014 01:14
[wearscript] pebblespanish
<html style="width:100%; height:100%; overflow:hidden">
<head>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
</head>
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<script>
// Fisher-Yates shuffling algorithm (http://stackoverflow.com/questions/2450954/how-to-randomize-shuffle-a-javascript-array)
@shri
shri / glass.html
Created June 14, 2014 16:35
[wearscript] fuckkillmarry
<html style="width:100%; height:100%; overflow:hidden">
<head>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
</head>
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<script>
// Fisher-Yates shuffling algorithm (http://stackoverflow.com/questions/2450954/how-to-randomize-shuffle-a-javascript-array)