Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
var myArray = ['Bobby', 'Jack', 'Danny']; | |
var favCities = ['Atlanta', 'Miami']; | |
function listFirst(array) { | |
return array[0]; | |
} | |
console.log(listFirst(myArray)); | |
console.log(listFirst(favCities)); |
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
var tmi = require('tmi.js'); | |
var config = require('./config.js'); | |
var client = new tmi.client(config.tmi); | |
client.connect(); | |
client.on("subscription", function (channel, username, method, message, userstate) { | |
if (method.prime === true) { | |
console.log("Prime Sub"); |
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
const tmi = require('tmi.js'); | |
const discord = require('discord.js'); | |
const config = require('./config/config.js'); // see https://github.com/d0p3t/d0p3tbot/blob/master/config/config_sample.js for an example | |
// Initialize tmi twitch bot and connect | |
const client = new tmi.client(config.tmi); | |
client.connect(); | |
// Initialize discord bot and connect | |
const discordClient = new Discord.Client(); |
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
var tmi = require('tmi.js') | |
var options = { | |
options: { | |
debug: true | |
}, | |
connection: { | |
reconnect: true | |
}, | |
identity: { |
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
RegisterServerEvent('vRP:payment') | |
RegisterServerEvent('vRP:salary') | |
AddEventHandler('vRP:payment',function(player, amount) | |
local user_id = vRP.getUserId(player) | |
if user_id ~= nil then | |
vRP.giveMoney(user_id, amount) | |
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
var anchors = {} | |
anchors["minimap"] = []; | |
anchors["center"] = []; | |
anchors["botright"] = []; | |
function ProgressBar(data) | |
{ | |
this.data = data; | |
this.value = data.value; | |
this.disp_value = data.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 numpy as np | |
import cv2 | |
from PIL import ImageGrab | |
fourcc = cv2.cv.CV_FOURCC(*'XVID') # or cv2.VideoWriter_fourcc('X','V','I','D') if you use opencv 3.0 | |
vid = cv2.VideoWriter('record.avi', fourcc, 8, (500,490)) | |
while(True): | |
img = ImageGrab.grab(bbox=(100, 10, 600, 500)) #x, y, w, h | |
img_np = np.array(img) | |
#frame = cv2.cvtColor(img_np, cv2.COLOR_BGR2GRAY) |
NewerOlder