Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
👨‍🎓 🛌

Daiki Nishikawa nd-02110114

💭
👨‍🎓 🛌
View GitHub Profile
View benchmark.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View jax_tutorials.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View deepchem_with_openmm.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nd-02110114
nd-02110114 / deepchem_installer.py
Last active Aug 4, 2020
deepchem installer for google colab
View deepchem_installer.py
"""
Original code by @philopon
https://gist.github.com/philopon/a75a33919d9ae41dbed5bc6a39f5ede2
"""
import sys
import os
import requests
import subprocess
import shutil
@nd-02110114
nd-02110114 / lighthouse.js
Created Feb 26, 2019
try lighthouse in headless chrome (using puppeteer)
View lighthouse.js
#!/usr/bin/env node
const puppeteer = require('puppeteer');
const lighthouse = require('lighthouse');
const chalk = require('chalk')
const { exec } = require('child_process');
const { URL } = require('url');
const PORT = 3000;
const checkedUrl = `http://localhost:${PORT}`
@nd-02110114
nd-02110114 / setup-puppeteer
Last active Feb 26, 2019
setup script for puppeteer in circleci
View setup-puppeteer
sudo apt-get update
sudo apt-get install -yq gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \
libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 \
libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 \
libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 \
ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
View sleep.js
const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms))
@nd-02110114
nd-02110114 / lazy-load.js
Last active Feb 24, 2019
lazy load example (IntersectionObserver API)
View lazy-load.js
// https://sbfl.net/blog/2017/07/04/javascript-intersection-observer/
// IE対応にはpolyfill必要 : https://caniuse.com/#feat=intersectionobserver
// lazy-loadを利用する画像の取得
const images = document.querySelectorAll('.lazy');
// options
const options = {
rootMargin: '5%', // 画面内に入る直前にイベントが起こるように,画面領域にマージンを設ける
}
You can’t perform that action at this time.