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
from random import shuffle | |
from typing import Dict, List, Optional | |
from code2seq.data.path_context import LabeledPathContext, Path | |
from code2seq.data.vocabulary import Vocabulary | |
from omegaconf import DictConfig | |
class PathContextConvert: | |
_separator = "|" |
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 socket | |
from time import time | |
def client(): | |
clientSocket = socket.socket() | |
serverHost = "192.168.0.26" | |
serverPort = 5689 | |
clientSocket.connect((serverHost, serverPort)) | |
print("connection successful") |
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
{ | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "Build with Clang", | |
"type": "shell", | |
"command": "clang++", | |
"args": [ | |
"-std=c++17", | |
"-stdlib=libc++", |
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
from random import randint | |
from timeit import timeit | |
def concat_bitshift(a, b, c): | |
return a << 40 | b << 20 | c | |
def deconcat_bitshift(c): | |
mask = 0xFFFFF |