Skip to content

Instantly share code, notes, and snippets.

netsh wlan start hostednetwork
grep -rnw '/path/to/somewhere/' -e 'pattern'
def convert(value, sep):
list_value = list(value)
big = [chr(i + 65) for i in range(26)]
_return_value = list()
for index, i in enumerate(list_value):
t = i
if i in big and index is not 0:
t = sep + i.lower()
import torch
import tensorflow as tf
pytorch_tensor = torch.zeros(10)
np_tensor = pytorch_tensor.numpy()
tf_tensor = tf.convert_to_tensor(np_tensor)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@LewisGet
LewisGet / mic_client.py
Created May 11, 2021 06:53 — forked from fopina/mic_client.py
microphone streaming with pyAudio
#!/usr/bin/env python
import pyaudio
import socket
import sys
FORMAT = pyaudio.paInt16
CHANNELS = 1
RATE = 44100
CHUNK = 4096
function get_content(dom) {
if (!dom.document)
return false;
if (!dom.document.getElementsByTagName("ul"))
return false;
return dom.document.getElementsByTagName("ul")[1].innerText;
}
import shutil
import json
import os
with open(os.path.sep.join(["indexes", "1.12.json"])) as json_file:
data = json.load(json_file)
for k, v in data['objects'].items():
name = os.path.sep.join((os.path.splitext(k)[0]).split("/"))
path = os.path.sep.join(os.path.dirname(name).split("/"))
document.querySelectorAll("yt-live-chat-text-message-renderer #content #message").forEach(function (ele) { console.log(ele.innerText); });
import win32clipboard as clip
clip.OpenClipboard()
# 複製時間
data = clip.GetClipboardData(data_formats)
data_handle = clip.GetClipboardDataHandle(data_formats)
clip.CloseClipboard()
print(data)