Skip to content

Instantly share code, notes, and snippets.

View JIElite's full-sized avatar
😹

Jie-Han Chen JIElite

😹
View GitHub Profile
def __iter__(self)
# self.raw_list: record the absolute path for each wav file
for path in self.raw_list:
wav_tensor, sample_rate = torchaudio.load(path)
yield dict(wav=wav_tensor, sample_rate=sample_rate)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
def encode_city_land_usage(x):
# Encode {'其他': 0, '住': 1, '農': 2, '工': 3, '商': 4,
# '住商': 5, '其他住宅': 6, nan: nan}
# nan remains
if not isinstance(x, str):
return x
if '非都市' in x:
return ""
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"id": "72f6f12b",
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd"
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
鋼筋混凝土造 839129
見其他登記事項 72403
加強磚造 61893
鋼筋混凝土構造 23041
見其它登記事項 15936
鋼筋混凝土加強磚造 15666
鋼骨鋼筋混凝土造 13623
nan 12699
鋼筋混凝土 7046
磚造 3425