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 openai | |
from dotenv import load_dotenv | |
from llama_index import GPTSimpleVectorIndex, SimpleDirectoryReader, LLMPredictor, PromptHelper | |
from langchain.llms import AzureOpenAI | |
from langchain.embeddings import OpenAIEmbeddings | |
from llama_index import LangchainEmbedding | |
# Load env variables (create .env with OPENAI_API_KEY and OPENAI_API_BASE) | |
load_dotenv() |
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 openai | |
from dotenv import load_dotenv | |
from llama_index import GPTSimpleVectorIndex, SimpleDirectoryReader, LLMPredictor, PromptHelper | |
from langchain.llms import AzureOpenAI | |
from langchain.embeddings import OpenAIEmbeddings | |
from llama_index import LangchainEmbedding | |
# Load env variables (create .env with OPENAI_API_KEY and OPENAI_API_BASE) | |
load_dotenv() |
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 ubuntu:14.04 | |
ENV DEBIAN_FRONTEND noninteractive | |
##///*******************************************************/ | |
##//------------------------ | |
## append apt mirror for ubuntu, update & install | |
##//------------------------ | |
## RUN sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list | |
RUN echo "deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse" > /etc/apt/sources.list | |
RUN echo "deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse" >> /etc/apt/sources.list | |
RUN echo "deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse" >> /etc/apt/sources.list |
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
const toList: any = ({ childrens, ...data }: any) => { | |
return (childrens || []).reduce( | |
(prev: any[], { childrens, ...curr }: any) => { | |
if (childrens?.length) { | |
prev = prev.concat(recursionFlatten({ childrens, ...curr })) | |
} else { | |
prev = prev.concat(curr) | |
} | |
return prev |
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
[Unit] | |
Description=Daemon to start Shadowsocks Client | |
Wants=network-online.target | |
After=network.target | |
[Service] | |
Type=simple | |
ExecStart=/usr/bin/sslocal -c /etc/shadowsocks/client.json --pid-file /var/run/sslocal.pid --log-file /var/log/sslocal.log | |
[Install] |
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
<template> | |
<view class="container"> | |
<view> | |
DEBUG MODE: {{ debug }} | |
</view> | |
<view> | |
<switch :checked='debug' @change='handleChanged' /> | |
</view> | |
</view> |
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
<template> | |
<view class="container"> | |
<view @click='handleRandom'> | |
更新状态: {{ current }} | |
</view> | |
<view v-if='house'> | |
<map | |
:longitude='house.location.longitude' | |
:latitude='house.location.latitude' | |
:makers='house.location.makers' |
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
<template> | |
<view class="container"> | |
<view> | |
<view> | |
父组件 | |
</view> | |
<view> | |
{{ data.today.format('YYYY-MM-DD') }} | |
</view> |
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
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
root /your/root/path; | |
index index.html; | |
server_name you.server.com; |
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'; | |
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); | |
function test(args) { | |
var _args = _slicedToArray(args, 2); | |
var a = _args[0]; | |
var b = _args[1]; |
NewerOlder