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
ffmpeg \ | |
-framerate 1 \ | |
-pattern_type glob \ | |
-i '*.png' \ | |
-c:v libx264 \ | |
-vf 'pad=ceil(iw/2)*2:ceil(ih/2)*2' \ | |
-pix_fmt yuv420p \ | |
slideshow.mp4 |
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
default_language_version: | |
python: python3 | |
repos: | |
- repo: https://github.com/pre-commit/pre-commit-hooks | |
rev: v4.4.0 | |
hooks: | |
# list of supported hooks: https://pre-commit.com/hooks.html | |
- id: trailing-whitespace | |
- id: end-of-file-fixer |
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
git clone -b thread_reuse https://github.com/hagb/docker-easyconnect.git | |
cd docker-easyconnect | |
git submodule update --init --recursive | |
docker image build -f Dockerfile.compile -t compile . | |
EC_VER=7.6.7 # 替换成需要的版本 | |
DOCKER_USERNAME="your-name" | |
docker image build \ | |
--build-arg EC_URL=$(cat ec_urls/${EC_VER}.txt) \ | |
-t "${DOCKER_USERNAME}/docker-easyconnect:${EC_VER}-aarch64" \ |
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
# \begin{}...\end{} | |
snippet begin | |
\begin{${1:env}} | |
${2} | |
\end{$1} | |
# Align(ed) | |
snippet ali | |
\begin{align${1:ed}} | |
${2} | |
\end{align$1} |
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 numpy as np | |
import pandas as pd | |
import requests | |
# Interested genes | |
df = pd.read_excel("yeast_genes.xlsx") | |
pom_genes = df["Schizosaccharomyces pombe"][ | |
df["Schizosaccharomyces pombe"].notnull() | |
].tolist() | |
cer_genes = df["Saccharomyces cerevisiae"][ |
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
{{/* $index is an array of json objects that we'll submit to Algolia */}} | |
{{ $index := slice }} | |
{{ range site.RegularPages }} | |
{{ $page := . }} | |
{{/* Split long posts into 1000-word chunks for less noise in results */}} | |
{{ $chunked := slice }} | |
{{ $post_len := len .PlainWords }} | |
{{ range $i := (seq 0 1000 $post_len) }} | |
{{ $chunked = $chunked | append (delimit (first 1000 (after $i $page.PlainWords) ) " " ) }} |
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
pref("general.smoothScroll.mouseWheel.durationMinMS", 50); | |
pref("general.smoothScroll.mouseWheel.durationMaxMS", 150); | |
pref("general.smoothScroll.currentVelocityWeighting", 0); | |
pref("general.smoothScroll.stopDecelerationWeighting", 0.82); | |
pref("mousewheel.default.delta_multiplier_y", 200); | |
pref("mousewheel.min_line_scroll_amount", 25); |
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
#!/usr/bin/env bash | |
# | |
# Description: Auto test download & I/O speed script | |
# | |
# Copyright (C) 2015 - 2016 Teddysun <[email protected]> | |
# | |
# Thanks: LookBack <[email protected]> | |
# | |
# URL: https://teddysun.com/444.html | |
# |
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
from itertools import islice | |
def next_n_lines(file_opened, N): | |
return [x.strip() for x in islice(file_opened, N)] | |
with open("samplefile", 'r') as f: | |
x = "" | |
while x != []: |