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 shutil | |
import logging | |
from argparse import ArgumentParser | |
import shutil | |
import re | |
# This Python script is based on the shell converter script provided in the MipNerF 360 repository. | |
parser = ArgumentParser("Colmap converter") | |
parser.add_argument("--no_gpu", action='store_true') |
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
'use strict'; | |
exports.handler = (event, context, callback) => { | |
// リクエスト | |
const request = event.Records[0].cf.request; | |
// `/moja` から `/moja/` にリダイレクト | |
if (request.uri.match(/\/([^\.\/]+)$/)) { | |
const url = request.uri.replace(/(\/[^\.\/]+\/?)$/, '$1/').replace(/\/\/+/g, '/'); |
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
/** | |
* 日時を成形した文字列で取得する | |
* @param {Date} dateTime 日付(オプション) | |
* @param {String} formatStr フォーマット(オプション) | |
* @return {String} フォーマット後の文字列 | |
*/ | |
export const formatDate = ( | |
dateTime?: Date | number, | |
formatStr?: string | null, | |
): string => { |
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
b=document.body;a=b.querySelectorAll('a.rg_l');a=Array.prototype.slice.apply(a);c=document.createElement('div');s=c.style;s.position='fixed';s.zIndex=1000;s.top=s.left=0;s.width=s.height='100%';s.background='rgba(0,0,0,.8)';s.opacity=0;s.transition='opacity 1s linear 0s';b.appendChild(c);setTimeout(function(){s.opacity=1},10);l=[];a.forEach(function(i){m=i.href.match(/imgurl=(https?.+?\.(jpe?g|png|gif))/i);if(!m)return;l.push(decodeURIComponent(m[1]))});n=function(u,i,s){u=l.shift();i=new Image;s=i.style;i.onload=function(){s.width='auto';s.height='70%';s.opacity='1';l.push(u);setTimeout(function(){s.opacity='0';setTimeout(function(){c.removeChild(i)},500)},2800,i);setTimeout(n,3000)};i.onerror=function(){c.removeChild(i);n()};i.src=u;s.position='absolute';s.top=s.left='50%';s.boxShadow='0 0 30px #000';s.opacity='0';s.transform='translate(-50%,-50%)';s.transition='opacity 0.5s linear 0s';c.appendChild(i)};setTimeout(n,1000) |
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
package xxx | |
import ( | |
"fmt" | |
"net" | |
) | |
// 使える TCP ポートを探すんだ | |
func searchUsablePort(startPort, endPort int) int { |
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
'use strict'; | |
// イベントリスナーの入れ物 | |
let listenerMap = new Map; | |
/** | |
EventEmitter クラス | |
*/ |
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
#FlexFormatter settings | |
#Thu Oct 13 10:41:32 JST 2011 | |
ActionScript.metatagsOnSameLineAsTargetFunction=Bindable | |
Actionscript.advancedSpacesInsideParensInParameterLists=0 | |
MXML.keepRelativeIndentInMultilineComments=true | |
MXML.attrsPerLine=1 | |
MXML.blankLinesBeforeTags=0 | |
ASRearr_GroupGettersAndSettersWithStaticProperties=false | |
Actionscript.keepBlankLines=true | |
MXML.tagsDoNotFormatInside=.*\:Model,.*\:XML, |