Skip to content

Instantly share code, notes, and snippets.

package liczbydoskonale;
import java.util.Arrays;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
class Zero implements Runnable {
public ExecutorService exec = Executors.newCachedThreadPool();
Zero(int pos, int n, int array[]) {
this.pos = pos;
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <gsl/gsl_errno.h>
#include <gsl/gsl_spline.h>
#include <gsl/gsl_interp.h>
static double fun(double x)
{
return x + cos(x*x);
#include "mpi.h" /* wlacza plik naglowkowy potrzebny dla biblioteki MPI */
#include <stdio.h> /* potrzebny dla funkcji 'fprintf()' */
#include <stdlib.h>
#include <time.h> /* potrzebny dla funcji 'time()' */
int main(int argc, char **argv)
{
int myid, namelen, i;
char computer_name[512]; /* nazwa komputera na ktorym */
int a[2];
package philosopher;
import java.util.Random;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
class Chopstick {
private boolean taken = false; //znacznik zajętości pałeczki
public synchronized void take() throws InterruptedException { //filozof chce wziac paleczke
package drzewasplay;
class BSTree {
// korzen drzewa
public Node root;
//konstruktor
BSTree() { root = null; }
//konstruktor
import java.util.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
class Array {
private int[] a;
private int nElements;
private int wielkosc;
package binsearchtree;
import java.util.Scanner;
class Node {
public int info;
public Node left;
public Node right;
public Node() {
#python3
import fileinput
import sys
import urllib.request
import re
from xml.dom.minidom import parse, parseString
from urllib.parse import unquote
from urllib.parse import urlencode
class WikiBot:
#python3
import fileinput
import sys
import urllib.request
import re
import os
class Dict:
##
# Konstruktor
from pyevolve import G1DList, GSimpleGA
from pyevolve import Initializators, Mutators, Consts
from pyevolve import DBAdapters
import math
# Implementacja funkcji Rastrigina
def rastrigin(xlist):
n = len(xlist)
total = 0
for i in range(n):