- Read 4 batchs of 10 audio signals sequentially without converting into spectrogram via numpy (code not shown in this gist): 30.084 sec
- Read 4 batchs of 10 audio signals and convert into dB mel spectrograms via tf.data.Dataset sequentially without optimization: 9.423 sec
- Read 4 batchs of 10 audio signals and convert into dB mel spectrograms via tf.data.Dataset with optimization: 3.922sec
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
# 関数を使わず書きます | |
# 改行関係のない40文字. | |
# o: 荷物 | |
# O: ゴールの上の荷物 | |
# p: プレイヤー | |
# P: ゴールの上のプレイヤー | |
# .: ゴール | |
# #: 壁 | |
soko = \ |
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
;;; init.el --- My init.el -*- lexical-binding: t; -*- | |
;; Copyright (C) 2020 Naoya Yamashita | |
;; Author: Naoya Yamashita <[email protected]> | |
;; This program is free software: you can redistribute it and/or modify | |
;; it under the terms of the GNU General Public License as published by | |
;; the Free Software Foundation, either version 3 of the License, or | |
;; (at your option) any later version. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 React from 'react'; | |
import { BrowserRouter as Router, Switch, Route} from "react-router-dom"; | |
import Users from './Users'; | |
export default function App() { | |
return ( | |
<Router> | |
<Switch> | |
<Route exact path="/users/:id"> | |
<Users /> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Add Map</title> | |
<script src="./positions.js" defer></script> | |
<script | |
src="https://maps.googleapis.com/maps/api/js?key=GOOGLE_MAP_JS_API_KEY&callback=initMap&libraries=&v=weekly" | |
defer | |
></script> | |
<style type="text/css"> |
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 os | |
import firebase_admin | |
from firebase_admin import credentials | |
from firebase_admin import firestore | |
cred = credentials.Certificate('../your_project_credential.json') | |
firebase_admin.initialize_app(cred, { | |
'projectId': 'your_project_id' | |
}) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 React from 'react'; | |
import { BrowserRouter as Router, Route, Switch} from 'react-router-dom' | |
import { ThemeProvider } from '@material-ui/styles'; | |
import {Elements} from '@stripe/react-stripe-js'; | |
import {loadStripe} from '@stripe/stripe-js'; | |
import theme from './Theme' | |
import { AuthProvider } from './Auth' | |
import SignUp from './SignUp' |
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 tensorflow as tf | |
class LogMelspectrogramLayer(tf.keras.layers.Layer): | |
""" | |
signals = librosa.load('path/to/audio.mp3') | |
log_melspectrogram_layer = LogMelspectrogramLayer() | |
logmelspectrogram = log_melspectrogram_layer(signals) | |
""" | |
def __init__(self, num_fft=2048, hop_length=512, sr=24000, fmin=125., fmax=3800., num_mel=128, **kwargs): | |
super(LogMelgramLayer, self).__init__(**kwargs) |
NewerOlder