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
from PySide6 import QtCore, QtGui | |
import shiboken6 | |
import numpy as np | |
import itertools | |
from time import perf_counter | |
class Points: | |
def __init__(self, use_array): | |
self.use_array = use_array |
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
from PySide6 import QtCore, QtGui | |
import shiboken6 | |
import numpy as np | |
import itertools | |
from time import perf_counter | |
class LineSegments: | |
def __init__(self, use_array): | |
self.use_array = use_array |
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 <stdlib.h> | |
#include <assert.h> | |
#include <uv.h> | |
int num_jobs; | |
#define NUM_ELEMS 1001 | |
int g_terminate; | |
int g_jobs_done; | |
uv_work_t *jobs; |
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 <stdio.h> | |
#include <assert.h> | |
#include <vector> | |
#include <chrono> | |
#include <string> | |
#include <cufftXt.h> | |
int main(int argc, char **argv) |
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 socket | |
sock = socket.socket(type=socket.SOCK_DGRAM) | |
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) | |
sock.bind(('192.168.0.255', 12345)) | |
while 1: | |
data, addr = sock.recvfrom(100) | |
print(data, addr) |
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
from cython cimport floating | |
def add_fused(floating [:] ain): | |
cdef int r | |
for r in range(ain.size): | |
ain[r] += 1 | |
def add_f64(double [:] ain): | |
cdef int r | |
for r in range(ain.size): |