This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
public enum Suit { Spades = '♠', Clubs = '♣', Diamonds = '♦', Hearts = '♥' } | |
public enum Rank { Two = '2', Three = '3', Four = '4', Five = '5', Six = '6', Seven = '7', Eight = '8', Nine = '9', Ten = 'T', Jack = 'J', Queen = 'Q', King = 'K', Ace = 'A' } | |
public class Card { | |
public static Card Parse(string rankSuit) { | |
if (rankSuit.Length != 2) { |
This file contains hidden or 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
[_QWERTY] = LAYOUT_preonic_grid( \ | |
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ | |
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, \ | |
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ | |
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT, \ | |
KC_LCTL, KC_LGUI, KC_LALT, KC_BSLASH, LOWER, KC_SPC, KC_SPC, RAISE, KC_SLSH, KC_LEFT, KC_DOWN, KC_RIGHT \ | |
), | |
[_LOWER] = LAYOUT_preonic_grid( \ | |
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \ |
This file contains hidden or 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 * as promiseLimit from "promise-limit"; | |
function getRandomInt(min, max) { | |
return Math.floor(Math.random() * (max - min + 1)) + min; | |
} | |
function log(value: any) { | |
// tslint:disable-next-line:no-console | |
console.log(`>> ${value}`); | |
} |
This file contains hidden or 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
"use strict"; | |
var typicalCallbackFunction = function(argument, callback) { | |
argument = '<' + argument + '>'; | |
callback(null, argument); | |
} | |
var promisifiedTypicalCallbackFunction = (argument) => new Promise((resolve, reject) => { | |
typicalCallbackFunction(argument, (err, result) => err ? reject(err) : resolve(result)); | |
}); |
This file contains hidden or 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
PokerStars Hand #174088855475: Hold'em No Limit (50/100) - 2017/08/08 23:16:30 MSK [2017/08/08 16:16:30 ET] | |
Table 'Euphemia II' 6-max (Play Money) Seat #3 is the button | |
Seat 1: adevlupec (53368 in chips) | |
Seat 2: Dette32 (10845 in chips) | |
Seat 3: Drug08 (9686 in chips) | |
Seat 4: FluffyStutt (11326 in chips) | |
FluffyStutt: posts small blind 50 | |
adevlupec: posts big blind 100 | |
*** HOLE CARDS *** | |
Dealt to FluffyStutt [2h Ks] |
This file contains hidden or 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
let handleEx ex = | |
printfn "Exception: %s" (ex.ToString()) | |
false | |
let DelDir dir = | |
try | |
Directory.Delete(dir, true) | |
true | |
with ex -> handleEx ex |
This file contains hidden or 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
float KP = 300, KI = 15, KD = 600; | |
float pTerm = 0, iTerm = 0, dTerm = 0; | |
float last_pitch = 0; | |
void loop() | |
{ | |
float pitch = get_pitch(); // угол отклонения от вертикальной оси | |
pTerm = KP * pitch; | |
iTerm = KI * pitch + iTerm; |
This file contains hidden or 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
> Arduino: scenario_track request: 1 | |
> SoundHandler: player: stop | |
> SoundHandler: player: playfile scenario 001 | |
>>> Player::play: /usr/bin/aplay /home/pi/woodbot/sounds/card.reader/scenario/001.wav | |
> Sending: controls: mouth=1; hgurdy=0 | |
/home/pi/woodbot/sounds/card.reader/scenario/001.wav: No such file or directory | |
>>> Player::run(): playback finished... | |
> Play back finished |
This file contains hidden or 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 http.client | |
import time | |
import json | |
import ctypes | |
import os | |
from tkinter import * | |
import urllib.parse | |
import hashlib | |
import re | |
import socket |
This file contains hidden or 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 WpfSonarAnalyzer | |
{ | |
/// <summary> | |
/// https://en.wikipedia.org/wiki/Low-pass_filter | |
/// </summary> | |
public class Lowpass | |
{ | |
private double x, xPrev, | |
y, yPrev; |
NewerOlder