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 <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <math.h> | |
#include <time.h> | |
#include <omp.h> // Include OpenMP header | |
/********************************************************** | |
* DATA STRUCTURES | |
**********************************************************/ |
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
import os | |
# Define the path to the Python script you want to analyze | |
# path of this file | |
my_path = os.path.dirname(os.path.realpath(__file__)) | |
file_path = os.path.join(my_path, 'main.py') | |
import subprocess | |
import json | |
class LSPClient: |
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
# check ping and return ping | |
from pythonping import ping | |
import time | |
import re | |
class bcolors: | |
HEADER = '\033[95m' | |
OKBLUE = '\033[94m' | |
OKCYAN = '\033[96m' | |
OKGREEN = '\033[92m' |
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
# AVL Tree by vox and kritjo | |
class AVLTree: | |
root = None | |
def left_rotate(self, z): | |
y = z.right | |
T = y.left | |
y.left = z | |
z.right = T | |
z.height = 1 + max(self.height(z.left), self.height(z.right)) |
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
# VERSION: 3.6 | |
# AUTHORS: Diego de las Heras ([email protected]) | |
# CONTRIBUTORS: TheVoxcraft | |
# ukharley | |
# hannsen (github.com/hannsen) | |
import json | |
import os | |
import xml.etree.ElementTree | |
from urllib.parse import urlencode, unquote |
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 <stdio.h> | |
#include <stdbool.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#include <pthread.h> | |
#include <math.h> | |
struct thread_args{ | |
int start_number; | |
int end_number; |
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
import multiprocessing as mp | |
import time | |
#max number to look up to | |
max_number = 200_000 | |
#four processes per cpu | |
num_processes = mp.cpu_count() * 6 | |
def chunks(seq, chunks): | |
size = len(seq) |
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
boolean trykketRiktig; | |
boolean tapt; | |
long startTid; | |
int G1=2; | |
int G2=3; | |
int G3=4; | |
int G4=6; | |
int G5=7; | |
int G6=8; |
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
boolean trykketRiktig; | |
long startTid; | |
int G1=2; | |
int G2=3; | |
int G3=4; | |
int R1=5; | |
int G4=6; | |
int G5=7; | |
int G6=8; |
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
import math | |
class Vector3: | |
x = 0 | |
y = 0 | |
z = 0 | |
def __init__(self, _x, _y, _z): | |
self.x = _x | |
self.y = _y | |
self.z = _z | |
def __add__(self, other): |
NewerOlder