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 android.util.Log; | |
public class CondensationAlgo { | |
// http://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/ISARD1/condensation.html | |
// "model_parameters.h" | |
/** The following are all the constants controlling the behaviour of the system and output. */ | |
/** How many samples in the distribution? */ | |
int NSamples = 1000; | |
/** How many iterations to run the filter? */ |
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
<!-- | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
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
contract TheBarCounter { | |
address private owner; | |
//Stored variables | |
uint private balance = 0; | |
uint private uniqueUsers = 0; | |
uint private usersProfits = 0; | |
uint private rescues = 0; | |
uint private collectedFees = 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
#[ | |
This Nim source file is a multiple threaded implementation to perform an | |
extremely fast Segmented Sieve of Zakiya (SSoZ) to find Twin Primes <= N. | |
Inputs are single values N, or ranges N1 and N2, of 64-bits, 0 -- 2^64 - 1. | |
Output is the number of twin primes <= N, or in range N1 to N2; the last | |
twin prime value for the range; and the total time of execution. | |
This code was developed on a System76 laptop with an Intel I7 6700HQ cpu, | |
2.6-3.5 GHz clock, with 8 threads, and 16GB of memory. Parameter tuning |
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 fr.cridp.sieve; | |
import java.math.BigInteger; | |
import java.util.ArrayDeque; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Comparator; | |
import java.util.LinkedList; | |
import java.util.List; | |
import java.util.Scanner; |
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 fr.cridp.sieve; | |
import com.aparapi.Kernel; | |
import com.aparapi.ProfileInfo; | |
import com.aparapi.Range; | |
import com.aparapi.internal.kernel.KernelManager; | |
import java.math.BigInteger; | |
import java.util.ArrayDeque; | |
import java.util.Arrays; |
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 fr.cridp.sieve; | |
import java.math.BigInteger; | |
import java.util.ArrayDeque; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.BitSet; | |
import java.util.Comparator; | |
import java.util.LinkedList; | |
import java.util.List; |
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
""" | |
Rules: | |
IF room_temperature IS LOW AND humidity IS LOW AND number_of_people IS FEW THEN thermostat_temperature IS VERY HIGH | |
IF room_temperature IS LOW AND humidity IS LOW AND number_of_people IS ALOT THEN thermostat_temperature IS HIGH | |
IF room_temperature IS LOW AND humidity IS LOW THEN thermostat_temperature IS HIGH | |
IF room_temperature IS LOW AND humidity IS HIGH THEN thermostat_temperature IS QUITE HIGH | |
IF room_temperature IS LOW AND humidity IS LOW AND number_of_people IS FEW THEN thermostat_temperature IS QUITE LOW | |
IF room_temperature IS LOW AND humidity IS LOW AND number_of_people IS ALOT THEN thermostat_temperature IS LOW | |
IF room_temperature IS LOW AND humidity IS LOW THEN thermostat_temperature IS VERY LOW | |
IF room_temperature IS LOW AND humidity IS HIGH AND number_of_people IS FEW THEN thermostat_temperature IS LOW |
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 <utils.h> | |
#include <RadioLib.h> | |
// Heltec WiFi LoRa has the following connections: | |
#define I2C_SDA 21 | |
#define I2C_SCL 22 | |
// #define OLED_RST UNUSE_PIN | |
#define RADIO_SCLK_PIN 5 // OK Heltec | |
#define RADIO_MISO_PIN 19 // OK Heltec |