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
module("modules/testmod/testmod") | |
function parse_message(bot, msg) | |
local i,j,s,c = string.find(msg, ":(.-)!.- PRIVMSG (.-) :poopshoot") | |
if not (i == nil) then | |
bot:say(c, "Hey, " .. tostring(s) .. ", watch your language!!") | |
end | |
end |
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
local socket = require("socket") | |
function create_bot(nick, channels) | |
local bot = {nick = nick, -- nickname of bot | |
firstresponse = false, -- got any data? | |
connection_ok = false, | |
channels = channels | |
} | |
function bot:connect(serv, port) |
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
local socket = require("socket") | |
function create_bot(nick, channels) | |
local bot = {nick = nick, -- nickname of bot | |
firstresponse = false, -- got any data? | |
connection_ok = false, | |
channels = channels | |
} | |
function bot:connect(serv, port) |
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
local socket = require("socket") | |
function create_bot(nick, channels) | |
local bot = {nick = nick, -- nickname of bot | |
firstresponse = false, -- got any data? | |
connection_ok = false, | |
channels = channels | |
} | |
function bot:connect(serv, port) |
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
local socket = require("socket") | |
function create_bot(nick, channels) | |
local bot = {nick = nick, -- nickname of bot | |
firstresponse = false, -- got any data? | |
connection_ok = false, | |
channels = channels | |
} | |
function bot:connect(serv, port) |
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
def read_file(filename): | |
v = [] | |
w = [] | |
capacity = 0 | |
f = open(filename) | |
for line in f: | |
if line.startswith("capacity="): | |
capacity = int(line[9:]) | |
else: | |
v_, w_ = (eval(line)) |
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
void draw_geometry_pass(void) | |
{ | |
glViewport(0,0,window_width,window_hight); | |
camera->updateProjection(); | |
camera->updateModelview(); | |
// Get projection matrix, and create inverse for DF pass 2. | |
glGetFloatv(GL_MODELVIEW_MATRIX, matrix_modelview); | |
glGetFloatv(GL_PROJECTION_MATRIX, matrix_projection); |
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
void main (void) | |
{ | |
float depth = texture2D(tex_depth, gl_TexCoord[0].st).r * 2.0 - 1.0; | |
vec3 norm = texture2D(tex_norm, gl_TexCoord[0].st).xyz * 2.0 - 1.0; | |
//norm = normalize(norm); // no need? | |
vec4 ambient = texture2D(tex_motion, gl_TexCoord[0].st); // currently holds ambient colors | |
// will be used for velocity in future | |
// Viewport position at this pixel in the range -1 to 1. | |
vec4 projection_pos = vec4(gl_TexCoord[0].st * 2.0 - 1.0, depth, 1.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
Task 2A: | |
X = 12 | |
x = 9 | |
Since: 18^9 % 23 = 12 | |
Task 2B: | |
m = 16 | |
X = 12 | |
k = 5 | |
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
# >> iser o so ei a e o rinrah e titnorthnoa satr o areahehns itainth o r theo nso snt er et eitraita th theiat seto ier e ro o r ore th ernsan o a e o ro h t arenneisa ehoseitnantohth t snth ohense ah re o n a erah no a oah n tr e nseohe thnseonser tnsi r rtith e nertn |