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
Double N = new Double( | |
"16260595201356777876687102055392856230368799478725437225418970788404092751540966827614883675066492383688147288741223234174448378892794567789551235835087027626536919406320142455677084743499141155821894102610573207343199194327005172833989486958434982393556326206485954223151805798621294965926069728816780985683043030371485847746616146554612001066554175545753760388987584593091716701780398711910886679925612838955858736102229719042291682456480437908426849734556856917891628730543729446245974891735371991588505429152639045721840213451875487038496578525189542369448895368117152818687795094021869963915318643663536132393791"); | |
double delta = 0.26; | |
System.out.print(Math.pow(N.doubleValue(), delta)); |
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
Ring ring1 = new Ring("x^2 + 23 *3y + x^3y^z"); | |
Ring ring2 = new Ring("x^2 + 23 *3y + x*3y+z"); | |
Ring ring3 = new Ring("x^2 + (23 *3y) + x^3y^z"); | |
Ring ring4 = new Ring("x^2 + (23 *(2 + x)*3y)+z"); | |
Ring ring5 = new Ring("2+16/2^4"); | |
Ring ring6 = new Ring("2+16/2^4*2"); | |
Ring ring7 = new Ring("2+16/2^4*2+(3-1*3-4^4^5)"); | |
Ring ring8 = new Ring("4^4^5"); | |
Ring ring9 = new Ring("4^4^5*3/3-1^4^5"); | |
Ring ring10 = new Ring("4^4^5*3/3-1^(4^5)"); |
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 random import randint | |
def generate_matrix(dimention, modulus): | |
array = [] | |
upper_limit = modulus * dimention | |
for i in range(0, dimention): | |
f = 0 | |
for j in range(0, dimention): | |
f = f + (randrange(modulus, upper_limit) * x^j) |
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 sage.stats.distributions.discrete_gaussian_lattice import DiscreteGaussianDistributionLatticeSampler | |
n = 256 | |
D = DiscreteGaussianDistributionLatticeSampler(ZZ^n, 3.0) | |
arr = [list(D()) for i in range(n)] | |
flat = flatten(list(arr)) |
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 asyncio | |
from time import sleep | |
from threading import Thread, Lock | |
from .task_model import Task | |
from typing import List | |
lock = Lock() | |
class TaskManager: |
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
public static Func<TArg1, Func<TArg2, TResult>> Curry<TArg1, TArg2, TResult>(this Func<TArg1, TArg2, TResult> source) | |
{ | |
return x => y => source(x, y); | |
} | |
public static Func<TArg1, Func<TArg2, Func<TArg3, TResult>>> Curry<TArg1, TArg2, TArg3, TResult>(this Func<TArg1, TArg2, TArg3, TResult> source) | |
{ | |
return x => y => z => source(x, y, z); | |
} | |
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
"A,B\na,b".split(/\r?\n/).map(x => x.split(',').map(x => `"${x}"`).join(',')).join('\n') |
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
Glassdoor questions: | |
- Given a game to you which is running on an instance and hasMySQL installed on it locally, now with the game popularity increasing, suggest ways that it stays highly secure and highly available and then with every step he was adding more things on it, like we want to use JWT on it, should we use it? session maintenance etc. | |
- URL shortener in Go | |
- MRU cache implementation in java or Go | |
- Distributed Systems, Coding Comprehension | |
- garbage collection in Java | |
- SFDC related experience | |
- debounce function | |
- Memory management for Java applications |
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
SPECS=First Follow | |
EXAMPLES_PATH=../.. | |
ROOT_PATH=../${EXAMPLES_PATH} | |
SCALAV=2.12 | |
APSLIB=${ROOT_PATH}/lib/aps-library-${SCALAV}.jar | |
SCALA_FLAGS=.:${APSLIB} | |
APS2SCALA=${ROOT_PATH}/bin/aps2scala | |
.PHONY: | |
all: $(addsuffix Spec.compile, $(SPECS)) $(addsuffix Spec.run, $(SPECS)) |
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
public record Cfg<T>(T Root, HashSet<T> Vertices, HashSet<(T, T)> Edges) where T : IEquatable<T> | |
{ | |
private Dictionary<(T, T), bool> reach => Reach(); | |
private readonly Dictionary<T, HashSet<T>> dom = new(); | |
private readonly Dictionary<T, HashSet<T>> pred = new(); | |
/// <summary> | |
/// <see href="https://en.wikipedia.org/wiki/Dominator_(graph_theory)#Algorithms"/> |
OlderNewer