python3 setup.py build
- From current directory,
cd build/lib.linux-x86_64-3.6
(tested on Ubuntu 18.04 with python 3.6.7). python3
to enter interactive modeimport spam
spam.system('ls -la')
then it should print the current directory listing as output
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
#ifdef _WIN32 | |
#include <malloc.h> | |
#endif | |
#include <cstdint> | |
#include <vector> | |
#include <iostream> | |
/** | |
* Allocator for aligned data. |
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
/** | |
* Input: n - number of random numbers to generate | |
* Output: n random numbers printed onto standard output separated by a space. | |
*/ | |
#include <iostream> | |
#include <cstdlib> | |
#include <ctime> | |
int main() |
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
/** | |
* Generation of UVa's progress in markdown file. | |
* | |
* Input: | |
* A problem set number separated by a new line, each set will contains 100 problems with number running | |
* from it to a hundred. Terminate with 0 at the last line. | |
* | |
* 1 | |
* 19 | |
* 201 |
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
#if __cplusplus >= 201103L | |
private: | |
// Constant-time move assignment when source object's memory can be | |
// moved, either because the source's allocator will move too | |
// or because the allocators are equal. | |
void | |
_M_move_assign(vector&& __x, std::true_type) noexcept | |
{ | |
vector __tmp(get_allocator()); | |
this->_M_impl._M_swap_data(__tmp._M_impl); |
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
//@{ | |
/** | |
* @brief String inserters | |
* @param __out An output stream. | |
* @param __s A character string. | |
* @return out | |
* @pre @p __s must be a non-NULL pointer | |
* | |
* Behaves like one of the formatted arithmetic inserters described in | |
* std::basic_ostream. After constructing a sentry object with good |
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
#include <iostream> | |
#include <string> | |
struct PublicData | |
{ | |
int a; | |
float b; | |
// private data | |
// this is a technique to hide the struct information thus users won't be able to know its layout |
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
#include "Dialog.h" | |
#include "ui_Dialog.h" | |
Dialog::Dialog(QWidget *parent) : | |
QDialog(parent), | |
ui(new Ui::Dialog) | |
{ | |
ui->setupUi(this); | |
} |
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
/** Downloader app following https://www.youtube.com/watch?v=_z-RS0rXg9s but | |
* use libcurl (C API) with some adjusted API usage. | |
* | |
* Compile with | |
* g++ -std=c++11 -DNO_PROXY SimpleDownloader.cpp -lpthread -lcurl | |
* */ | |
#include <iostream> | |
#include <fstream> | |
#include <string> |
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
libmono-system-web-extensions4.0-cil | |
install -y libmono-system-data-datasetextensions4.0-cil | |
libmono-csharp4.0c-cil libmono-microsoft-csharp4.0-cil mono-dmcs mono-mcs | |
mono-dmcs | |
mono-xbuild | |
mono-devel | |
libmono-system-runtime4.0-cil | |
libmono-system-io-compression-filesystem4.0-cil | |
libmono-system-io-compression4.0-cil | |
libmono-windowsbase4.0-cil |