将数据加载到没有关联密钥对的ec2实例上(由NotebookCloud生成)(Load data onto an ec2 instance with no associated key-pair (generated by NotebookCloud))
我正在尝试在亚马逊ec2实例中运行iPython笔记本(我使用免费套餐,如果这有任何区别),使用NotebookCloud( https://notebookcloud.appspot.com/ )来处理iPython笔记本界面。 但是,我想在笔记本中运行的代码需要访问各种数据文件和补充python文件。 当NotebookCloud生成一个新的ec2实例时,它没有为它分配一个密钥对,我找不到让它这样做的方法。 据我所知,如果没有关联的密钥对,就无法通过SSH进入实例。 是否仍然有一些偷偷摸摸的方式来获取数据到实例?
I'm trying to run iPython notebook in an Amazon ec2 instance (I'm using the free tier, if that makes any difference), using NotebookCloud (https://notebookcloud.appspot.com/) to handle the iPython notebook interface. However, the code I want to run in the notebook needs access to a variety of datafiles and supplemental python files. When NotebookCloud generates a new ec2 instance, it doesn't assign a key-pair to it, and I can't find a way to make it do so. As far as I can tell from other questions, there's no way to SSH into an instance if it doesn't have an associated key-pair. Is there still some sneaky way to get data onto the instance though?
原文:https://stackoverflow.com/questions/17067054
最满意答案
使用静态bool并将其设置在cpp文件中。
private: static bool preload;
在.cpp文件中
//file declarations bool Sprite::preload = false; //class functions below...
static关键字将使所有对象共享同一个变量,允许您在程序的整个生命周期中只调用一次函数。
use a static bool and set it in the cpp file.
private: static bool preload;
in .cpp file
//file declarations bool Sprite::preload = false; //class functions below...
the static keyword will make all object share this same variable, allowing you to call a function just once for the entire life of a program.
相关问答
更多-
TCP/IP模型是一个________。[2023-10-02]
a -
下列中不属于面向对象的编程语言的是?[2022-05-30]
a -
使用静态bool并将其设置在cpp文件中。 private: static bool preload; 在.cpp文件中 //file declarations bool Sprite::preload = false; //class functions below... static关键字将使所有对象共享同一个变量,允许您在程序的整个生命周期中只调用一次函数。 use a static bool and set it in the cpp file. private: static ...
-
在按钮的事件侦听器中,禁用该按钮并显示另一个活动。 Button b = (Button) view; b.setEnabled(false); Intent i = new Intent(this, AnotherActitivty.class); startActivity(i); 覆盖onResume()以重新启用该按钮。 @Override protected void onResume() { super.onResume(); ...
-
使用int vs bool(Using int vs bool)[2021-11-06]
如果需要使用Interlocked.CompareExchange原子操作,则可能需要使用int而不是bool 。 PS:我知道Interlocked.CompareExchange,但它是在.NET 3.5中引入的,仅支持引用类型。 You might want to use int instead of bool if you need to use atomic operations such as Interlocked.CompareExchange. PS: I know about I ... -
在bool中加载延迟(Lazy loading in a bool)[2023-07-11]
实体框架中的延迟加载默认情况下处于打开状态。 你不能强迫某些东西“懒惰地加载”。 你所能做的就是关闭延迟加载(顺便说一下,实际上并不是急切加载,而是“无加载”)。 所以答案是你不能。 然而,事实上,正如评论指出的那样,如果Owners类具有导航属性,例如, public class Owners{ public string UNQ4 {get;set;} public virtual OtherClass NavigationProperty {get;set;} } 然后,当您执行诸如 ... -
我如何将BOOL投给BOOL?(How do I cast a bool to a BOOL?)[2022-06-12]
你的意思是 bool b; ... BOOL apiboolean = b ? TRUE : FALSE; 如果是这样,那么是的,这将起作用。 Do you mean bool b; ... BOOL apiboolean = b ? TRUE : FALSE; If so, then yes, this will work. -
反转BOOL(Reversing a BOOL)[2023-10-13]
是的,那会起作用。 BOOL只是一个整数。 YES是1 , NO是0 。 !1 == 0和!0 == 1 。 Yes, that will work. BOOL is just an integer. YES is 1 and NO is 0. !1 == 0 and !0 == 1. -
信号QWebPage :: loadFinished(bool)返回两次?(Signal QWebPage::loadFinished(bool) returns twice?)[2022-10-12]
我也看到了这个qt 4.7.4(与phantomjs)。 我使用框架的loadFinished而不是页面,它不会发送两次。 im seeing this too with qt 4.7.4 (with phantomjs). i used the frame's loadFinished instead of the page's and it isn't sent twice. -
保持BOOL而不是bool(Keep BOOL instead of bool)[2024-03-02]
由于BOOL被定义为int ,所以你不知道没有检查你移植的代码是否依赖于它是一个int 。 因此,我会去做类似的事情: #if NOT_MICROSOFT typedef int BOOL; #define TRUE 1 #define FALSE 0 #endif 如果你有机会检查你正在移植的代码是否能够正常工作,无论BOOL类型是int还是bool ,那么很可能你有机会改变它来使用bool (或者使用int8_t ,你比较喜欢)。 Since BOOL is defined a ...