Skip to content

Instantly share code, notes, and snippets.

from pynput import mouse, keyboard
import sys
import time
class ClickRecorder:
def __init__(self):
self.clicks = []
def click(self, x, y, button, press):
if press and button == mouse.Button.left:
import paho.mqtt.client as mqtt
import json
import os
import datetime
SIMULATION_IP = "82.165.25.152"
SIMULATION_PORT = 1884
CAR_IP = "82.165.25.152"
CAR_PORT = 1883
ON_SIMULATION = False
import os
import json
import csv
import datetime
combine_channels = False
root = os.path.join("discorddata", "messages")
with open(os.path.join(root, "index.json"), "r", encoding="UTF-8") as f:
indexdata = json.load(f)
import requests
import time
DROP_TIME_IN_SECONDS = 5 * 60
REFRESH_PERIOD = 20
old_data = []
while True:
req = requests.get("https://api.binance.com/api/v3/ticker/price")
# -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
import json
import datetime
# -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
import json
import datetime
void ServerNetworker::registerlobby(Gamestate &state)
{
xg::Guid message_type(LOBBY_MESSAGE_TYPE_REGISTER);
xg::Guid lobbyid(GG2_IDENTIFIER);
xg::Guid compatibility(COMPATIBILITY_IDENTIFIER);
WriteBuffer buffer;
// See https://github.com/Medo42/Faucet-Lobby/blob/master/Protocol%20Spec.txt for reference
// https://github.com/PyGG2/PyGG2/blob/master/server/lobby.py is also helpful
$ python 1dconv.py
Traceback (most recent call last):
File "1dconv.py", line 30, in <module>
outputs = cnn(inputs)
File "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py", line 202, in __call__
result = self.forward(*input, **kwargs)
File "1dconv.py", line 22, in forward
out = self.layer(x)
File "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py", line 202, in __call__
result = self.forward(*input, **kwargs)
import torch
import torch.nn as nn
import torch.utils.data
from torch.autograd import Variable
# Minimal dataset
class Dataset(torch.utils.data.Dataset):
def __len__(self):
return 12
@Orpheon
Orpheon / lava.lua
Last active September 11, 2016 14:08
while true do
turtle.select(1)
i = 1
while i <= 16 do
successful = turtle.suck(1)
successful = successful or turtle.suckUp(1)
successful = successful or turtle.suckDown(1)
if successful then
i = i+1
end