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 "main.h" | |
// Gościu nie umie nawet zapamiętać jak nazywa klasy | |
class Wektor{ | |
private: | |
int x, y, z; | |
public: | |
Wektor(int x, int y, int z): x(x), y(y), z(z){} | |
Wektor(int x): x(x), y(0), z(0){} |
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
namespace Example; // Optional namespace, without it everything in this file would be global | |
import <stdlib> // Importing namespace | |
import <math.Random> // Importing specific class from namespace | |
class Example{ // Everything must be inside of a class, like in Java | |
int n; // Variables that don't recieve a value immediately when declared *MUST* have a type | |
arr = foo(10); // Automatic variable type |
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
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
################################### | |
# IMPORTANT: Copy from old config # | |
################################### | |
# Path to your oh-my-zsh installation. | |
export ZSH="~/.oh-my-zsh" | |
# Set name of the theme to load --- if set to "random", it will |
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 lab2; | |
import java.util.Scanner; | |
public class Cw6 { | |
public static void main(String[] args) { | |
Scanner scanner = new Scanner(System.in); | |
System.out.println("Podaj kwotę (max: 300 000"); | |
int kwota = scanner.nextInt(); |
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 lab2; | |
import java.util.ArrayList; | |
import java.util.Scanner; | |
public class Cw4 { | |
public static void main(String[] args){ | |
Scanner in = new Scanner(System.in); |
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
#/bin/bash | |
# Get the first device listed by kdeconnect-cli | |
DEVICE=$(kdeconnect-cli --id-only -a | sed '1q') | |
# Which qdbus service | |
SERVICE="org.kde.kdeconnect" | |
# Path depends on device | |
QPATH="/modules/kdeconnect/devices/$DEVICE/share" |
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.*; | |
public class dfs { | |
static class Node{ | |
int id; | |
static int lastid = 0; | |
{ | |
this.id = lastid++; | |
} |
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.util.function.BiFunction; | |
public class Graphs { | |
static class Node{ | |
public double g = 0; | |
public double f = 0; | |
public double h = 0; |
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
const tf = require("@tensorflow/tfjs"); | |
require('@tensorflow/tfjs-node'); | |
const model = tf.sequential(); | |
const inputs = [ | |
[0,0], | |
[0,1], | |
[1,0], |
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.text.DecimalFormat; | |
import java.util.Random; | |
public class Perceptron { | |
public static void main (String[] args) { | |
double[][] inputs = { | |
{1, 1}, | |
{1, 0}, | |
{0, 1}, | |
{0, 0} |