Skip to content

Instantly share code, notes, and snippets.

View hehehwang's full-sized avatar
🍒

Hwang H. hehehwang

🍒
  • Hyundai Mobis
  • Republic of Korea
View GitHub Profile
@hehehwang
hehehwang / getLabeledPathContext.py
Last active October 3, 2021 19:00
code2seq-jb prediction with single method
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 = "|"
@hehehwang
hehehwang / client.py
Last active October 29, 2021 06:46
rpi-comm
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")
@hehehwang
hehehwang / mac_cpp_tasks.json
Last active April 10, 2024 08:34
vscode problem-solving related settings
{
"version": "2.0.0",
"tasks": [
{
"label": "Build with Clang",
"type": "shell",
"command": "clang++",
"args": [
"-std=c++17",
"-stdlib=libc++",
@hehehwang
hehehwang / tuple_comare_timeit.py
Created February 17, 2022 15:18
tuple comare benchmark
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