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
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; |
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 <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); |
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 "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]; |
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
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 |
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
package drzewasplay; | |
class BSTree { | |
// korzen drzewa | |
public Node root; | |
//konstruktor | |
BSTree() { root = null; } | |
//konstruktor |
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 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; |
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
package binsearchtree; | |
import java.util.Scanner; | |
class Node { | |
public int info; | |
public Node left; | |
public Node right; | |
public Node() { |
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
#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: |
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
#python3 | |
import fileinput | |
import sys | |
import urllib.request | |
import re | |
import os | |
class Dict: | |
## | |
# Konstruktor |
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 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): |
OlderNewer