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
/*###ICF### Section handled by ICF editor, don't touch! ****/ | |
/*-Editor annotation file-*/ | |
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ | |
/*-Specials-*/ | |
define symbol __ICFEDIT_intvec_start__ = 0x08000000; |
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
__global__ void cubic_interp(float* x, float* y, int n, float* x_new, float* y_new, int m) { | |
int idx = blockIdx.x * blockDim.x + threadIdx.x; | |
if (idx >= m) return; | |
int i = 1; | |
while (i < n && x[i] <= x_new[idx]) { |
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
Q: | |
By default, Linux builds user-space programs as dynamically linked applications. Please describe scenarios where you would change the default behavior to compile your application as a statically linked one. | |
A: | |
There are several scenarios where you would change the default behavior to compile your application as a statically linked one: | |
1. Portability: If you want to ensure that your application will run on any system without having to worry about missing shared libraries or different versions of the same libraries, then compiling it statically is a good option. | |
2. Security: If you want to reduce the attack surface of your application by eliminating the need for external dependencies, then compiling it statically can help improve security. | |
3. Performance: If your application requires fast startup times and low memory usage, then compiling it statically can provide a performance boost since it eliminates the overhead of dynamic linking. |
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 <fstream> | |
#include <vector> | |
#include <nlohmann/json.hpp> | |
using namespace std; | |
using json = nlohmann::json; | |
struct HistoryEntry { | |
std::string action; |
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 <thread> | |
#include <vector> | |
#include <deque> | |
#include <mutex> | |
#include <condition_variable> | |
#include <boost/asio.hpp> | |
using boost::asio::ip::tcp; |
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
import numpy as np | |
from scipy.fft import fft2 | |
from scipy.ndimage import sobel, gaussian_filter | |
from PIL import Image | |
def compute_dqe(image_path): | |
# Load the X-ray image | |
image = Image.open(image_path).convert("L") | |
image = np.array(image) |
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
package main | |
import ( | |
"crypto/sha1" | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"os" | |
"strings" | |
) |
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
import cupy as cp | |
from tqdm import tnrange | |
@cp.fuse() | |
def rol32(x, n): | |
return (x << n | x >> (32 - n)) | |
@cp.fuse() | |
def simon_round_function(x): | |
return (rol32(x, 1) & rol32(x, 8)) ^ rol32(x, 2) |
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 <fstream> | |
#include <string> | |
#include <vector> | |
#include "sqlite3.h" | |
using namespace std; | |
// Функция обработки результатов запроса к базе данных | |
static int callback(void* data, int argc, char** argv, char** azColName) { |
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
package main | |
import ( | |
"fmt" | |
"sync" | |
) | |
// ConnectionManager интерфейс определяет методы для управления соединениями | |
type ConnectionManager interface { | |
AddConnection(connection Connection) |