This file contains hidden or 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
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: |
This file contains hidden or 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 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 |
This file contains hidden or 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 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) |
This file contains hidden or 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 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") |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
""" | |
Spyder Editor | |
This is a temporary script file. | |
""" | |
import json | |
import datetime |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
""" | |
Spyder Editor | |
This is a temporary script file. | |
""" | |
import json | |
import datetime |
This file contains hidden or 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 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 |
This file contains hidden or 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
$ 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) |
This file contains hidden or 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 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 |
This file contains hidden or 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
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 |
NewerOlder