Python | C++ |
---|
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 subprocess import Popen | |
while True: | |
popen = Popen("jupyter notebook", shell=True) | |
try: | |
popen.wait() | |
except: | |
pass | |
popen.kill() |
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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: jupyter | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start jupyter | |
# Description: This file should be used to construct scripts to be | |
# placed in /etc/init.d. |
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
apt update | |
apt ugrade | |
apt install -y python3-pip | |
pip3 install --upgrade pip | |
pip3 install jupyter sympy scipy matplotlib | |
mkdir ~/.jupyter | |
mkdir notebooks | |
touch ~/.jupyter/jupyter_notebook_config.py | |
echo c.NotebookApp.ip = \'*\' > ~/.jupyter/jupyter_notebook_config.py | |
echo c.NotebookApp.port = 9999 >> ~/.jupyter/jupyter_notebook_config.py |
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
#include <cstdio> | |
#include <iostream> | |
#include <string> | |
#include <vector> | |
#include <algorithm> | |
#include <set> | |
using namespace std; | |
vector<pair<int, int>> v; | |
set<pair<int, int>> ms; |
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
package ru.psqq; | |
import javax.crypto.Cipher; | |
import javax.crypto.spec.IvParameterSpec; | |
import javax.crypto.spec.SecretKeySpec; | |
import java.io.*; | |
import java.security.Key; | |
import java.security.MessageDigest; | |
import java.util.Base64; |
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
#include <iostream> | |
#include <ostream> | |
#include <string> | |
#include <sstream> | |
#include <vector> | |
#include <algorithm> | |
#include <limits> | |
#include <iomanip> | |
#include <cmath> | |
using namespace std; |
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
apt-get clean | |
apt-get autoclean | |
apt-get autoremove |
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
A = Matrix([[1, 2], [3, 4]]) | |
B = Matrix([[5, 6], [7, 8]]) | |
C = Matrix([[9, 1], [5, 7]]) | |
n, _ = A.shape | |
X = Matrix( [ [symbols("x_{}_{}".format(i+1, j+1)) for j in range(n)] for i in range(n) ] ) | |
solve(X*A + B*X - C) |
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
#include <iostream> // для cout cin | |
#include <cstdlib> // для system | |
using namespace std; // пространсто имен std:: | |
int main() { | |
float s = 0, t; // две переменные | |
int n; | |
cout << "Vvedite kolichestvo chisel:"; | |
cin >> n; | |
for(int i=1; i<=n; ++i) |