由于带有ä的文件名,我的git情况很糟糕.这是一个很久以来可能存在的旧文件:
因此它被标记为未跟踪\ 303\244但是如果我将其删除,则将其标记为已删除,但使用\ 314\210.很混乱.我真的不关心文件,但想知道未来...
~/d/p/uniply ??? git status master ?
On branch master
Your branch is up-to-date with 'origin/master'.
Untracked files:
(use "git add <file>..." to include in what will be committed)
"deployment/ec2/Prods\303\244ttning"
nothing added to commit but untracked files present (use "git add" to track)
~/d/p/uniply ??? rm deployment/ec2/Prodsättning master ?
~/d/p/uniply ??? git status master ?
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
(use "git add/rm <file>..." to update what will …Run Code Online (Sandbox Code Playgroud) 当我跑步时
python manage.py runserver
Run Code Online (Sandbox Code Playgroud)
它有效,但是当我想登录“http://127.0.0.1:8000/admin”时它不起作用。
它给了我这样的信息:
TemplateDoesNotExist at /admin/login/django/forms/widgets/text.html
Run Code Online (Sandbox Code Playgroud)
但我已经创建了一个超级用户,并且我已经安装了 django.contrib.adminsetting.py
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'templates'),
os.path.join(BASE_DIR, 'venv/lib/site-packages/django/contrib/admin/templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
Run Code Online (Sandbox Code Playgroud)
为什么会出现这个错误?我该如何解决它?
我从 powershell 提示符启动 Jupyter jupyter notebook,它会正确加载,但是当我打开新的或现有的笔记本时,内核会忙碌大约 10 秒,然后弹出一个窗口,提示 Python 已停止工作。在我的终端中,我得到了Invalid argument (C:\ci\zeromq_1602704446950\work\src\epoll.cpp:100)(见下文)。您有什么解决方案吗?我尝试过使用不同的环境并卸载/重新安装pyzmq。
[I 12:58:16.682 NotebookApp] Serving notebooks from local directory: C:\Users\tobinp
[I 12:58:16.682 NotebookApp] Jupyter Notebook 6.1.6 is running at:
[I 12:58:16.684 NotebookApp] http://localhost:8888/?token=9eee2cc4e598b193ad42fc05ff620a43d0e5f29e885170b3
[I 12:58:16.684 NotebookApp] or http://127.0.0.1:8888/?token=9eee2cc4e598b193ad42fc05ff620a43d0e5f29e885170b3
[I 12:58:16.685 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 12:58:18.289 NotebookApp]
To access the notebook, open this file in a browser: file:///C:/Users/tobinp/AppData/Roaming/jupyter/runtime/nbserver-18144-open.html Or copy and paste …Run Code Online (Sandbox Code Playgroud) 我正在尝试生成不同的箱线图,描述某些产品系列和行业组(“生产”、“贸易”、“商业”、“休闲与福祉”)的变量分布。
我想知道:
在我正在使用的代码下方,这里有一张图像向您展示我得到的内容 --> Catplot Image。
import matplotlib.pyplot as plt
import seaborn as sns
sns.set_context("talk")
boxplot = sns.catplot(
x='family',
y='lag',
hue="SF_type",
col="industry_group",
data=df1,
kind="box",
orient="v",
height=8,
aspect=2,
col_wrap=1,
order=fam_sort,
palette='Set3',
notch=True,
legend=True,
legend_out=True,
showfliers=False,
showmeans=True,
meanprops={
"marker":"o",
"markerfacecolor":"white",
"markeredgecolor":"black",
"markersize":"10"
}
)
boxplot.fig.suptitle("Boxplots by Product Basket, Industry Group & SF Type", y=1.14)
#repeat xticks for each plot
for ax in boxplot.axes:
plt.setp(ax.get_xticklabels(), visible=True, rotation=75)
plt.subplots_adjust(hspace=1.2, top = 1.1)
#remove axis titles
for ax in boxplot.axes.flatten(): …Run Code Online (Sandbox Code Playgroud) #include <iostream>
using namespace std;
template <class U>
U add (U a, U b)
{
U c = 0 ;
c = a + b;
return c;
}
int main()
{
int first = 2;
int second = 2;
U result = 0;
result = add(first, second);
cout << result << endl;
return 0;
}
Run Code Online (Sandbox Code Playgroud)
我想使用模板数据类型声明结果变量的数据类型,以便我的添加程序是通用的,但编译器给我这个错误"结果未在此范围内声明".
我的老师给了我这个问题:编写一个读取整数并打印它的程序。所以我找到了这段代码:
integer_number = int(input("Enter an integer: "))
print("You entered:", integer_number)
Run Code Online (Sandbox Code Playgroud)
我想了解为什么函数:“int”先于“input”
我希望“input”函数比“int”函数先出现,因为“input”具有向用户请求信息以便用户填写信息的功能,而“int”则将给定的字符串转换为整数。
试图阅读议会的日常工作,我发现文件被分成许多PDF文件,不能简单地通过浏览器打开阅读,必须单独下载。我的基本想法是下载所有文档并提取所有决策的标题
以前的线程建议使用 PyPDF2。显然,这在我的情况下根本不起作用。PDF 中的字符是希腊字母,因此编码可能与它有关。最重要的是,在文档的末尾,添加了一些图片(我不感兴趣)。
PyPDF2 有没有可能解决这个问题,还是我应该看看其他地方?