结构色,也被称为构造色或物理色,是一种通过物体表面的微小物理结构与光相互作用而产生的颜色效果。这种颜色不是由吸收某些波长的光线形成(如传统意义下的色素颜色),而是基于光波的干涉、衍射或者散射等光学效应形成的。
This file contains hidden or 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
| # The VLLM servers were launched using something like: | |
| # CUDA_VISIBLE_DEVICES=2 vllm serve Qwen/Qwen2.5-32B-Instruct-GPTQ-Int4 --quantization gptq --max-model-len 4096 --port 8003 | |
| from openai import OpenAI | |
| import ray | |
| from ray.util import ActorPool | |
| from tqdm import tqdm | |
| def read_file(file_path: str) -> list[str]: | |
| """ |
This file contains hidden or 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 base64 | |
| import requests | |
| import json | |
| def get_cloudiness(image_path): | |
| # 读取OpenAI API Key | |
| api_key = os.getenv('OPENAI_API_KEY') | |
| if not api_key: |
This file contains hidden or 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
| """ | |
| A class supporting the auto-focusing of a telescope. | |
| """ | |
| from astropy.io import fits | |
| from astropy.stats import sigma_clipped_stats | |
| from photutils.detection import DAOStarFinder | |
| from glob import glob | |
| from tqdm import tqdm | |
| from typing import List, Dict, Any | |
| from time import time |
This file contains hidden or 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 zwoasi | |
| import cv2 | |
| import numpy as np | |
| from simple_pid import PID | |
| from alpaca import Telescope | |
| def initializeCamera(): | |
| zwoasi.init('./ASICamera2.dll') | |
| camera = zwoasi.Camera(0) | |
| controls = camera.get_controls() |
This file contains hidden or 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
| # Initial imports | |
| import os | |
| import sys | |
| import logging | |
| logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO) | |
| from caffe2.proto import caffe2_pb2 | |
| import numpy as np | |
| import skimage.io | |
| import skimage.transform |
This file contains hidden or 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
| set -g default-terminal "screen-256color" | |
| set -g status-right '#[fg=black] #(hostname), %H:%M, #(uptime | egrep -o "average.*"|perl -pe "s|average: ||")' | |
| setw -g automatic-rename | |
| # mouse mode | |
| set -g mode-mouse on | |
| setw -g mouse-select-window on | |
| setw -g mouse-select-pane on | |
| setw -g mode-keys vi |
This file contains hidden or 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
| # Path to your oh-my-zsh configuration. | |
| ZSH=$HOME/.oh-my-zsh | |
| # Set name of the theme to load. | |
| # Look in ~/.oh-my-zsh/themes/ | |
| # Optionally, if you set this to "random", it'll load a random theme each | |
| # time that oh-my-zsh is loaded. | |
| ZSH_THEME="robbyrussell" | |
| # Example aliases |
This file contains hidden or 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
| sudo apt-get install llvm cython python-pip python-llvm | |
| git clone https://github.com/numba/numba.git # Not sure whether this is necessary | |
| cd numba | |
| sudo pip install -r requirements.txt | |
| sudo pip install numba |
This file contains hidden or 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
| <? | |
| $r = 'This is an automatically generated message notifying you that someone pushed new commits to the github repo <project>.' . " Don't forget to do git pull before your editing.\r\n\r\nEdit summary: \r\n"; | |
| $payload = $_REQUEST['payload']; | |
| preg_match_all('@"name":"([\w ]*?)","email@', $payload, $matches); | |
| $authors = $matches[1]; | |
| preg_match_all('@"message":"([^"]*)"@', $payload, $matches); | |
| $messages = $matches[1]; | |
| preg_match_all('@"url":"([^"]*)"@', $payload, $matches); | |
| $links= $matches[1]; | |
| for ($i = 0; $i < count($messages) - 1; ++$i) |