Skip to content

Instantly share code, notes, and snippets.

View rpasta42's full-sized avatar

Anony Moose rpasta42

  • Florida
View GitHub Profile
webpackJsonp([0],{"+0OL":function(e,t,a){"use strict";e.exports={Action:{None:0,Reload:1,UseItem:2,Revive:3},WeaponSlot:{Primary:0,Secondary:1,Throwable:3,Melee:2,Count:4},WeaponType:["gun","gun","melee","throwable"],DamageType:{Player:0,Bleeding:1,Gas:2},Anim:{None:0,Melee:1,Cook:2,Throw:3,CrawlForward:4,CrawlBackward:5,Revive:6},GasMode:{Inactive:0,Waiting:1,Moving:2},protocolVersion:26,map:{baseWidth:512,baseHeight:512,gridSize:16,shoreDivisions:64,shoreInset:32,shoreVariation:3,grassInset:18,grassVariation:2,extension:80},player:{radius:1,maxVisualRadius:3.75,maxInteractionRad:3.5,minActiveTime:10,moveSpeed:12,health:100,boostDecay:.33,boostMoveSpeed:2,boostHealAmount:.33,boostBreakpoints:[1,1,1.5,.5],scopeDelay:.25,baseSwitchDelay:.25,freeSwitchCooldown:1,headshotChance:.15,img:{scale:1},spectateDeadTimeout:2,bleedTickRate:1,bleedDamage:2,downedMoveSpeed:4,downedRezMoveSpeed:2,reviveDuration:8,reviveMaxRange:5,reviveHealth:24,crawlTime:.75,emoteSoftCooldown:2,emoteHardCooldown:6,emoteThreshold:6,throwabl
//pseudo-code
M = matrix(initialize matrix to 0, 62, 62)
for i in 1:62 {
for j in 1:62 {
M[i][j] = rbf_kernel(X[i,], X[j,], 3)
}
}
<html>
<head>
<script src='https://unpkg.com/vue/dist/vue.js'></script>
</head>
<body>
<div id='app'>
{{message}}
</div>
===================backend code serv.py
from flask import render_template
#we open database file which lets us store stuff in it
database = OpenDatabase("C:/location/of/database/filename.db")
@app.route('/hello/')
<html><head>
<script src="https://code.jquery.com/jquery-2.2.4.js" integrity="sha256-iT6Q9iMJYuQiMWNd9lDyBUStIq/8PuOW33aOqmvFpqI=" crossorigin="anonymous"></script>
<style>
#back {
width: 100%;
height: 100%;
opacity: 0.7;
/*filter: blur(5px);*/
}
<!DOCTYPE html>
<html>
<head>
<title>Pokemon clone</title>
<style>
body { margin: 0; }
canvas { width: 100%; height: 100% }
</style>
</head>
<body>
@rpasta42
rpasta42 / pywatch.py
Created June 2, 2016 19:47
Script for reloading python files in ERPNext without running "bench restart"
#!/usr/bin/python
# Usage: ./pywatch.py <path> [-d]
# path is location of your python code which you want
# to monitor for changes.
# Example:
# Throw this script in the home directory of your
# ERPNext server and run
#./pywatch frappe-bench/apps/ &
@rpasta42
rpasta42 / init_glium.rs
Last active May 3, 2016 00:36
Problem initializing glium and glutin window.
//Hello rusters, I'm writing a rust graphics environment with a custom scripting language using glium.
//As example program, I'm writing a tic-tac-toe game which needs to be able to capture location of mouse clicks.
//I want to find mouse location on screen, and glutin event returns location in pixels.
//But I need location as a ratio of OpenGL display size.
//It appears I can use glium::glutin::Window.get_inner_size_pixels(&self).
//But to initialize glium, it captures WindowBuilder,
// preventing me from building the window.
use glium::glutin::WindowBuilder;