Skip to content

Instantly share code, notes, and snippets.

View karngyan's full-sized avatar
🛌
working from my bed

Karn karngyan

🛌
working from my bed
View GitHub Profile
export SENDPOST_API_KEY='YOUR_API_KEY'
@karngyan
karngyan / cpp17errichto.sublime-build
Created September 12, 2020 13:04
C++ Competitive Programming Sublime 3 Build + Terminus + Sanitizers
{
"target": "terminus_exec", // "terminus_open" - if using this you dont need cancel, simply close tab and watch this: https://youtu.be/etIJMVIvVgg
"cancel": "terminus_cancel_build",
"focus": false,
"timeit": true,
"shell_cmd": "g++ -std=c++17 -Wshadow -Wall -o \"${file_path}/${file_base_name}.o\" \"${file}\" -O2 -Wno-unused-result",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
#include<stdlib.h>
#include<stdio.h>
#include<sys/time.h>
#define n 4096
#define THRESHOLD 32
double A[n][n];
double B[n][n];
double C[n][n];
#include<stdlib.h>
#include<stdio.h>
#include<sys/time.h>
#define n 4096
double A[n][n];
double B[n][n];
double C[n][n];
import java.util.Random;
public class MatrixMultiply {
static int n = 4096;
static double[][] A = new double[n][n];
static double[][] B = new double[n][n];
static double[][] C = new double[n][n];
public static void main(String[] args) {
Random random = new Random();
import sys, random
from time import time
n = 4096
A = [[random.random()
for row in range(n)]
for col in range(n)]
B = [[random.random()
//g++ 7.4.0
/*
* Min Sparse Table Example
*
* @author Karn, [email protected]
*/
#include <bits/stdc++.h>
@karngyan
karngyan / majorit_element.cpp
Last active April 29, 2020 13:13
Majority_Element_Divide_n_Conquer
/*
Author: @karngyan
Team: BlundersPride
*/
#include<bits/stdc++.h>
{
message: 'Starting Java server with: /usr/lib/jvm/java-8-openjdk-amd64/bin/java -Declipse.application=org.eclipse.jdt.ls.core.id1 -Dosgi.bundles.defaultStartLevel=4 -Declipse.product=org.eclipse.jdt.ls.core.product -Dfile.encoding=UTF-8 -noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication -jar /home/crio-user/.vscode-builtin-extensions/redhat.java-0.55.1/server/plugins/org.eclipse.equinox.launcher_1.5.600.v20191014-2022.jar -configuration /home/crio-user/.vscode-builtin-extensions/redhat.java-0.55.1/server/config_linux -data /tmp/vscodesws_6e6be/jdt_ws',
level: 'info',
timestamp: '2020-03-12 08:19:20.051'
}
{
message: 'An exception occurred while writing to the platform log:\n',
level: 'info',
timestamp: '2020-03-12 08:19:20.258'
}
kind: Pod
apiVersion: v1
metadata:
name: pod-user1
spec:
containers:
- name: pod-user1
image: ubuntu:18.04
command:
- "/bin/sh"