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
int coin(double propability, int times) { | |
std::srand((unsigned int) std::time(0)); | |
int sum = 0; | |
for (int i = 0; i < times; ++i) { | |
double gen = ((double) rand() / (RAND_MAX)); | |
if (gen < propability) | |
sum += 1; | |
else | |
break; |
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
#!/usr/bin/env bash | |
function transform(){ | |
for file in "$(ls $1 | grep .gv)" | |
do | |
ofile=${file::-3} | |
dot -Tpng "$file" -o "$ofile.png" | |
done | |
} | |
if [ -z "$1" ]; then |
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 com.drankov; | |
import java.math.BigInteger; | |
import java.util.ArrayList; | |
import java.util.stream.Stream; | |
public class BigIntegerStream { | |
/** |
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 com.drankov; | |
import java.io.BufferedWriter; | |
import java.io.IOException; | |
import java.math.BigInteger; | |
import java.nio.charset.Charset; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; |
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 | |
# ./script [time] -m [message] | |
# ./script [time] -p [programm] | |
# time format 2017-06-04T21:58:00 | |
function main(){ | |
#проверяем что подано кака минимум 3 аргемнта на вход | |
if [ -n $3 ]; then | |
# проверяем что второй аргумент или -m или -p, инчае |
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
/* | |
Client-server interaction on different QOS levels | |
QOS =0 | |
if server would like to publish something to the client | |
_______________________________________________________________ |
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
sudo apt-get update | |
sudo apt-get install -y maven default-jdk zip unzip | |
git clone https://github.com/Sammers21/Ashbringer | |
cd Ashbringer | |
mvn clean install | |
java -jar ashbringer-cli/target/ashbringer-cli-1.0-SNAPSHOT.jar \ | |
0 13.95.146.39 8080 1000 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
sammers-nix:vmqtc2 sammers$ mvn clean install | |
[INFO] Scanning for projects... | |
[INFO] | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] Building Vert.x MQTT client 3.5.0-SNAPSHOT | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] | |
[INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ vertx-mqtt-client --- | |
[INFO] Deleting /Users/sammers/Desktop/workspace/vmqtc2/target | |
[INFO] Deleting /Users/sammers/Desktop/workspace/vmqtc2/src/main/asciidoc (includes = [], excludes = [images/**]) |
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
%define module mymodule | |
Summary: multidict implementation | |
Name: python-%{module} | |
Version: 3.1.4a3 | |
Release: 1 | |
License: Apache 2 | |
Group: Development/Python | |
Url: https://github.com/aio-libs/multidict/ | |
Source0: https://pypi.python.org/packages/37/e3/f7fe70024be82c628fbe0a3e43aad114dc0eba6f11d4580e6955 |
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
# Created by pyp2rpm-1.0.1 | |
%global pypi_name opuscoords | |
Name: python-opuscoords | |
Version: 1.0.1 | |
Release: %mkrel 9 | |
Group: Sciences/Astronomy | |
Summary: Python Tools for OPUS Coordinate Conversions | |
License: BSD |
OlderNewer