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 * as React from 'react'; | |
import { withRouter } from 'react-router-dom'; | |
import { RouteComponentProps, Form } from 'antd'; | |
import compose from './compose'; | |
interface DecoratorProps { | |
id: number; | |
} |
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
# https://editorconfig.org | |
# https://gist.github.com/ryerh/4c9215a95cc8d8c4872f1ca43d52dbda | |
root = true | |
[*] | |
indent_style = space | |
indent_size = 2 | |
end_of_line = lf | |
charset = utf-8 |
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
from sqlalchemy.engine import create_engine | |
from sqlalchemy.orm import sessionmaker | |
def create_engine_from_django_settings(database='default'): | |
from django.conf import settings | |
db = settings.DATABASES[database] | |
engine = db['ENGINE'].lower() | |
if 'postgresql' in engine: | |
sqlalchemy_engine = 'postgresql' |
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
private void buttonSyntacParse_Click(object sender, EventArgs e) | |
{ | |
//依存句法分析 | |
var dictMode = new Dictionary<string, int>{ | |
{"web模型", 0}, | |
{"query模型", 1} | |
}; | |
var options = new Dictionary<string, object>{ | |
{"mode", dictMode[comboBoxSyntacParse.Text.ToString()]}}; | |
var result = client.DepParser(textBoxLexiAnaly.Text, options); |
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
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows.Forms; |
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
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows.Forms; |
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 random | |
import time | |
from concurrent import futures | |
def run_parallel_processes(worker_func, job_args, max_workers=None): | |
""" | |
每个进程执行一个 worker_func, | |
每个 worker_func 只从 job_args 中取一条任务处理, | |
最大并行粒度 max_workers 默认等于 CPU 核心数量。 |
OlderNewer