text:
<file_sep>

                Прив.

                1

                2

                ...

                16

                След.

<file_sep><div class="col-xs-6 col-xs-push-<?=$j%2==0?1:2?> col-sm-push-0 col-sm-3 forums__item">
    <a href="<?=$info['link'][$j]?>" class="forums__item-a">

<span class="<?=$info['ico'][$j]?> ico-forums">

                <?=$info['name'][$j]?>

<file_sep>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=8">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />

<link rel="stylesheet/less" type="text/css" href="/source/css/main.less" />

<file_sep>/* ---------------------------------------------------------------------------------

 * File :           forms.less
 * Description :    Styles for main header
 * Project :        ubc
 * Author :         <NAME>

 --------------------------------------------------------------------------------------- */

.form {
    &__input {
        background-color: #fff;
        border: 0;
        padding: 3px 4px;
        color: @text-dark;
        outline: none;
        height: 25px;
        width: 100%;
        .border-radius(2px);
        &:focus {
            .box-shadow(~"0 0px 2px @{text-dark}");
        }
    }
    &__textarea {
        background-color: #fff;
        border: 0;
        padding: 3px 4px;
        color: @text-dark;
        outline: none;
        min-height: 50px;
        width: 100%;
        resize: none;
        .border-radius(2px);
        &:focus {
            .box-shadow(~"0 0px 2px @{text-dark}");
        }
    }
    &__label {
        color: @text-dark;
        font-family: @font-ptsans;
        font-weight: normal;
        font-size: 16px;
        display: block;
        margin-bottom: 3px;
    }
    &__btn {
        width: 100%;
        .transition(all 0.5s ease-in-out 0s);
        &:hover {
            background-color: #fff;
            color: @text-blue-light;
        }
    }
}<file_sep>

<file_sep>

<img src="/assets/img/elm/img/items/<?=$info['img'][$j]?>.png" alt=""/>

<?=$info['name'][$j]?>

<?=$info['text'][$j]?>

Читать далее

<file_sep><!DOCTYPE html>

        <title>Build</title>

        <?php include 'source/inc/meta/head.php'; ?>

            <?php include 'source/inc/blocks/header.php'; ?>

            <?php include 'source/inc/blocks/carousel.php'; ?>

                    Наши партнеры

                        <?php
                            for ($i = 1; $i < 6; $i++) { include 'source/inc/el/partners.php'; }
                        ?>

                        <?php
                            for ($i = 6; $i < 11; $i++) { include 'source/inc/el/partners.php'; }
                        ?>

            <?php include 'source/inc/blocks/footer.php'; ?>

    <?php include 'source/inc/meta/js.php'; ?>

<file_sep>/* ---------------------------------------------------------------------------------

 * File :           header.less
 * Description :    Styles for main header
 * Project :        ubc
 * Author :         <NAME>

 --------------------------------------------------------------------------------------- */

.header {
  padding: 30px 0 20px;
    border-bottom: 1px solid #cecece;

  .logo {

    display: block;
    @media screen and (min-width: @screen-xs) and (max-width: @screen-md) {
      margin-left: 13px;
    }
    img {
      display: block;
      width: 100%;
    }

  }

  #navbar-toggle {
    background-image: url("/assets/img/elm/menu.png");
    background-repeat: no-repeat;
    background-position: center center;

    .border-radius(3px);
    border: 1px solid @text-dark;
    padding: 13px 5px;
    margin-top: 4px;
    &:hover {
      border-color: @text-blue-light;
      cursor: pointer;
      .transition(~"all 0.3s linear 0s");
    }
  }

  &-lang {
    &-wrap {
      min-width: 30%;
    }
    list-style-type: none;
    padding: 0;
    margin: 0;
    margin-top: 5px;
    margin-right: 34px;
    float: right;

    @media (max-width: @screen-md) {
      margin-right: 11px;
    }
    @media (max-width: @screen-sm) {
      margin-right: 11px;
    }
    @media screen and (min-width: @screen-md) and (max-width: 1300px) {
      margin-right: 34px;
    }

    &__item {
      float: left;
      list-style-type: none;
      margin-left: 3px;
      font-weight: bold;

      a {
        display: block;
        text-decoration: none;
        width: 28px;
        height: 28px;

        color: #323946;
        font-size: 16px;
        line-height: 28px;
        text-align: center;

          .border-radius(3px);

        -webkit-transition: all 0.4s linear;
        transition: all 0.4s linear;
      }

      &.active,
      &:hover {
        a {
          color: #fff;
          background-color: @text-blue-light;
        }
      }
    }

  }

  nav {
    margin: 30px -19px 0;
  }

  &-menu {
    list-style-type: none;
//    padding: 0;
    margin: 0;
      @media (max-width: @screen-sm) {
          display: none;
      }

    &__item {
      float: left;
      list-style-type: none;
      margin-right: 16.5px;
      height: 22px;
        font-family: @font-else;
      &:first-child {
        margin-left: -10px;
        @media (max-width: @screen-lg) {
          margin-left: 0;
        }
      }
      &:last-child {
        margin-right: 0;
      }

      @media (max-width: @screen-sm) {
        list-style-type: none;
        margin-right: 0;
        height: 22px;
        margin-bottom: 5px;
        margin-left: 0;
        text-align: right;
      }

      @media (max-width: @screen-md) {
        padding-top: 3px;
        height: 22px;
        padding-left: 4px;
        margin-right: 0;
        margin-left: 0;
        width: 50%;
        box-sizing: border-box;
        -webkitbox-sizing: border-box;
        -moz-box-sizing: border-box;
      }

      &:nth-child(even) {
        a {
          float: right;
        }
      }

      &-img {
          .opacity(0.9);
        span {
          background-image: url("/assets/img/sprites/spr-menu.png");
          display: inline-block;
          margin-right: 6px;
        }
        display: table-cell;
        vertical-align: middle;

        width: 20px;
        height: 20px;

        text-align: center;
      }

      &-text {
        display: table-cell;
        color: @text-dark;
        font-size: 12px;
        height: 20px;
        vertical-align: middle;
      }

        a {
            text-decoration: none;
            color: @text-dark;
            display: block;
            .transition(all 0.5s ease-in-out 0s);
            &:hover {
                text-decoration: underline;
                .header-menu__item-img {
                    .opacity(1);
                }
            }
        }

    }

  }

    & + .carousel {
        margin-top: -2px;
    }

}

.ico-bulb {
  background-position: -0px -0px; width: 14px; height: 20px;
}
.ico-kist {
  background-position: -0px -23px; width: 13px; height: 18px;
}
.ico-exchange {
  background-position: -0px -44px; width: 16px; height: 18px;
}
.ico-house {
  background-position: -0px -65px; width: 20px; height: 17px
}
.ico-fire {
  background-position: -0px -85px; width: 15px; height: 18px
}
.ico-info {
  background-position: -0px -106px; width: 20px; height: 15px
}
.ico-portfolio {
  background-position: -0px -124px; width: 18px; height: 18px;
}
.ico-umbrella {
  background-position: -0px -145px; width: 18px; height: 18px
}
<file_sep>

            Контакты

                        +38 (044) 361-34-07

                        <EMAIL>

                        Украина, г. Киев ул. Хорива, 2

                                Обратная связь

                            Имя
                            <input type="text" class="form__input"/>

                            Email
                            <input type="text" class="form__input"/>

                            Ваше сообщение
                            <textarea type="text" class="form__textarea"/></textarea>

Отправить

<file_sep><!DOCTYPE html>

        <title>Build</title>

        <?php include 'source/inc/meta/head.php'; ?>

            <?php include 'source/inc/blocks/header.php'; ?>

                            Заголовок про строительство

                    <?php include 'source/inc/blocks/slider-content.php'; ?>

                                Наші можливості

                                Ми представляємо інтереси групи торговельно-будівельних компаній, які спеціалізуються на професійному виконанні робіт з улаштування та реконструкції скатних і плоских покрівель, та гідроізоляції об’єктів будь-якої складності.

Відмінною рисою діяльності нашої групи є:

використання новітніх технологій та дотримання вимог діючих норм законодавства;

професійне складання кошторисів об’єктів;

повна комплектація об’єктів сертифікованими і якісними матеріалами;

професійне, високоякісне виконання робіт з улаштування нових і реконструкції існуючих, плоских і скатних покрівель;

надання гарантій на виконані роботи від 10 років;

своєчасне виконання в повному обсязі взятих на себе зобов’язань;

наявність сертифікованої, професійної матеріально-технічної бази, яка дозволяє реалізовувати проекти будь-якої складності, у тому числі з урахуванням дефіциту часу;

наявність всього необхідного професійного інструменту та обладнання.

            <?php include 'source/inc/blocks/footer.php'; ?>

    <?php include 'source/inc/meta/js.php'; ?>

<file_sep>

    <div class="content-partners partners-<?=$i?>">

            <img src="/assets/img/elm/partners/part-<?=$i<10?"0".$i:$i?>.png" alt=""/>

<file_sep><!DOCTYPE html>

        <title>Build</title>

        <?php include 'source/inc/meta/head.php'; ?>

            <?php include 'source/inc/blocks/header.php'; ?>

                        Архитектура и дизайн

                                Наші можливості

                                Ми представляємо інтереси групи торговельно-будівельних компаній, які спеціалізуються на професійному виконанні робіт з улаштування та реконструкції скатних і плоских покрівель, та гідроізоляції об’єктів будь-якої складності.

Відмінною рисою діяльності нашої групи є:

використання новітніх технологій та дотримання вимог діючих норм законодавства;

професійне складання кошторисів об’єктів;

повна комплектація об’єктів сертифікованими і якісними матеріалами;

професійне, високоякісне виконання робіт з улаштування нових і реконструкції існуючих, плоских і скатних покрівель;

надання гарантій на виконані роботи від 10 років;

своєчасне виконання в повному обсязі взятих на себе зобов’язань;

наявність сертифікованої, професійної матеріально-технічної бази, яка дозволяє реалізовувати проекти будь-якої складності, у тому числі з урахуванням дефіциту часу;

наявність всього необхідного професійного інструменту та обладнання.

                        Разделы

                            <?php
                                $info = array(
                                    'ico' => array(
                                        'ico-arcitech', 'ico-big-bulb', 'ico-port', 'ico-house', 'ico-paint'
                                    ),
                                    'name' => array(
                                        'Архитектура','Конструктивная часть','Инженерия','Благоустройство','Дизайн'
                                    ),
                                    'link' => array(
                                        '#','#','#','/beautification.php','#'
                                    )
                                );
                                for ($j = 0; $j < 5; $j++) { include 'source/inc/el/forums.php'; }
                            ?>

На сьогоднішній день наш досвід підтверджений великим переліком об’єктів, який постійно доповнюється, і відсутністю рекламацій протягом всього часу існування компанії. Якість робіт наших фахівців підтверджено сертифікатами міжнародної системи якості ISO 9001. Ми зацікавлені в укладанні договорів на виконання таких видів робіт:

            <?php include 'source/inc/blocks/footer.php'; ?>

    <?php include 'source/inc/meta/js.php'; ?>

<file_sep>/* ---------------------------------------------------------------------------------

 * File :           footer.less
 * Description :    Styles for main header
 * Project :        ubc
 * Author :         <NAME>

 --------------------------------------------------------------------------------------- */

.footer {
    background-image: url("/assets/img/footer/bg-footer.png");
    background-repeat: repeat;
    background-position: 0 0;
    position: relative;

    &:before {
        content: '';
        .absolute(0px,auto,auto,50%);
        margin-left: -23px;
        border-top: 9px solid #fff;
        border-left: 9px solid transparent;
        border-right: 9px solid transparent;

        z-index: 1;
    }

    &-list {

        &__left {
          padding-top: 28px;
          margin-left: 87px;
          @media screen and (max-width: @screen-xs){
            margin-left: 7px;
          }
          @media screen and (max-width: @screen-sm){
            margin-left: 20px;
          }
            &-item {
              margin: 18px 0;

                &-img {
                    display: table-cell;
                    vertical-align: middle;
                    width: 70px;
                    text-align: center;
                    height: 34px;
                }

                ._text {
                  @media screen and (min-width: @screen-xs){
                    font-size: 18px;
                    word-break: break-all;
                  }
                  @media screen and (min-width: @screen-sm){
                    font-size: 18px;
                  }
                    font-family: @font-ptsans-bold;
                    font-size: 26px;
                    display: table-cell;

                }
            }
        }

        &__right {
          margin-left: 94px;
          margin-right: -74px;
          margin-top: -16px;
            .footer-list__left-item {
                margin: 10px 0 0;

                &-img {
                    width: 30px;
                    text-align: left;
                }
            }
            &-item {
              &._button {
                margin-top: 10px;
                padding-right: 35px;
              }
            }
        }

    }

    .h1:first-child {
        margin-bottom: 40px;
        padding-top: 25px;
    }

    &-bottom {
        margin-top: 54px;
        text-align: center;
        height: 163px;
        background-image: url("/assets/img/footer/bg-f.png");
        background-repeat: no-repeat;
        background-size: 100% 100%;
        position: relative;
        img {
            .absolute(50%,auto,auto,left);
            margin-left: -50px;
            margin-top: -20px;
        }
    }
}

.ico-icons {
    background-image: url("/assets/img/sprites/spr-menu.png");
    display: inline-block;
}
.ico-map {
    background-position: -21px 0px; width: 24px; height: 32px;
}
.ico-phone {
    background-position: -46px 0px; width: 32px; height: 32px;
}
.ico-mail {
    background-position: -21px -33px; width: 32px; height: 21px;
}
.ico-mail-l {
    background-position: -54px -33px; width: 20px; height: 14px;
}
<file_sep>/* ---------------------------------------------------------------------------------

 * File :           carousel.less
 * Description :    Styles for main header
 * Project :        ubc
 * Author :         <NAME>

 --------------------------------------------------------------------------------------- */

.carousel {

  .content & {
    height: 450px;
  }

    &-indicators {
        li {

            background-color: #fff;
            border: 1px solid #fff;
            width: 12px;
            height: 12px;
            margin: 1px !important;
            &.active {
                background-color: transparent;
            }

        }
    }

  &-caption {
    bottom: 0;
    top: 121px;
    left: 14%;
    right: 14%;
    @media (max-width: @screen-md) {
      top: 0px;
    }
    @media (max-width: @screen-xs) {
      font-size: 50px;
    }

    .text {
      font-size: 60px;
      line-height: 61px;
      overflow: hidden;

      margin-bottom: 35px;
      @media (max-width: @screen-md) {
        max-height: 73%;
      }
    }
  }

  .item {
    img {
      height: 450px;
      max-width: 100%;
      display: block;
      @media screen and (min-width: @screen-lg) {
        width: 100%;
      }
    }
  }

  .glyphicon {
    width: 25px;
    height: 50px;
    &.glyphicon-chevron-left {
      .sprite(-26px,0);
    }
    &.glyphicon-chevron-right {
      .sprite(0,0);
    }
    &:before {
      display: none;
    }
  }

  &._blue {
    height: 264px;
    .carousel-control {
      width: 143px;
      background-image: none;
      background-color: @text-blue-light;
      @media screen and (max-width: @screen-md) {
        width: 50px;
      }
    }
    .carousel-inner {
      height: 264px;
      margin: 0 150px;
      width: auto;
      a {
        display: block;
        position: relative;
        height: 264px;
        margin-right: -25px;
      }
      @media screen and (max-width: @screen-md) {
        margin: 0 56px;
      }
    }
    .carousel-caption {
      left: 0;
      top: 0;
      right: 0;
      bottom: 0;
      padding: 0;
    }
  }

  &-text {
    font-family: @font-scada;
    font-size: 16px;
    height: 40px;
    width: 100%;
    background-color: rgba(0,0,0,0.3);
    color: #fff;
    position: absolute;
    bottom: 0;
    left: 0;
    text-align: left;
    line-height: 40px;
      padding-left: 17px;
      &-hover {
          visibility: hidden;
          .transition(all 0.2s ease-in-out 0s);
          max-height: 40px;
          margin-top: 15px;
          line-height: 20px;
          .text-overflow();
          white-space: normal;
          text-decoration: none !important;
          font-size: 13px;
      }
      &:hover {
          height: 80px;
          line-height: 20px;
          .transition(all 0.2s ease-in-out 0s);
          .carousel-text-hover {
              visibility: visible;
          }
      }
    span {
      text-decoration: none;
        display: block;
      &:hover {
        text-decoration: underline;
      }
    }
  }
}<file_sep><!DOCTYPE html>

    <title>Build</title>

    <?php include 'source/inc/meta/head.php'; ?>

        <?php include 'source/inc/blocks/header.php'; ?>

                    Благоустройство

                    <?php
                    $info = array(
                        'img' => array(
                            'img-01', 'img-02', 'img-03'
                        ),
                        'name' => array(
                            'Гидроизоляционная ПВХ-мембрана Ruvimat',
                            'Открытая терраса,плюсы и минусы',
                            'Зеленая кровля'
                        ),
                        'text' => array(
                            'Відмінною рисою діяльності нашої групи є: використання новітніх технологій та дотримання вимог діючих норм законодавства; професійне складання кошторисів об’єктів; повна комплектація об’єктів сертифікованими і якісними матеріалами; професійне, високоякісне виконання робіт з улаштування нових і реконструкції існуючих, плоских і скатних покрівель;',
                            '«Центр надійної покрівлі» виконує гідроізоляцію відкритих терас за допомогою спеціальної системи, розробленої в Німеччині, яка успішно зарекомендувала себе у всіх країнах Європи.',
                            'Зелені дахи» з кожним роком набувають все більшої популярності у всьому світі. Нами технологія виготовлення такої покрівлі освоєна ще у 2009 році. Основна перевага такої покрівлі в тому, що висаджені на даху рослини не допускають попадання ультрафіолету до гідроізоляційного шару покрівлі, таким чином не допускаючи руйнування пвх-мембрани. Отже, така покрівля може прослужити дуже довго.'
                        )
                    );
                    for ($j = 0; $j < 3; $j++) { include 'source/inc/el/info-block.php'; }
                    ?>

                <?php

                include 'source/inc/el/pagination.php';

                ?>

        <?php include 'source/inc/blocks/footer.php'; ?>

<?php include 'source/inc/meta/js.php'; ?>

<file_sep>// Colors of text
@text-blue-light: #2ca7dc;
@text-dark: #323946;

// Colors of everything
@brand-orange: #fc9c0b;
@brand-grey: #cecece;

.sprite(@l,@r) {
  background-image: url("/assets/img/sprites/spr-main.png");
  background-position: @l @r;
}

@font-face {
    font-family: 'PTSansRegular';
    src: url('/assets/fonts/ptsans/PTS55F_W.eot');
    src:
    url('/assets/fonts/ptsans/PTS55F_W.eot?#iefix') format('embedded-opentype'),
    url('/assets/fonts/ptsans/PTS55F_W.woff') format('woff'),
    url('/assets/fonts/ptsans/PTS55F_W.ttf') format('truetype'),
    url('/assets/fonts/ptsans/PTS55F_W.svg#PTSans-Regular') format('svg');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'PTSansBold';
    src: url('/assets/fonts/ptsans/PTS75F_W.eot');
    src:
    url('/assets/fonts/ptsans/PTS75F_W.eot?#iefix') format('embedded-opentype'),
    url('/assets/fonts/ptsans/PTS75F_W.woff') format('woff'),
    url('/assets/fonts/ptsans/PTS75F_W.ttf') format('truetype'),
    url('/assets/fonts/ptsans/PTS75F_W.svg#PTSans-Bold') format('svg');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Scada-Bold';
    src: url('/assets/fonts/scada/Scada-Bold.eot');
    src:
    url('/assets/fonts/scada/Scada-Bold.eot?#iefix') format('embedded-opentype'),
    url('/assets/fonts/scada/Scada-Bold.woff') format('woff'),
    url('/assets/fonts/scada/Scada-Bold.ttf') format('truetype'),
    url('/assets/fonts/scada/Scada-Bold.svg#Scada-Bold') format('svg');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Scada-Italic';
    src: url('/assets/fonts/scada/Scada-Italic.eot');
    src:
    url('/assets/fonts/scada/Scada-Italic.eot?#iefix') format('embedded-opentype'),
    url('/assets/fonts/scada/Scada-Italic.woff') format('woff'),
    url('/assets/fonts/scada/Scada-Italic.ttf') format('truetype'),
    url('/assets/fonts/scada/Scada-Italic.svg#Scada-Italic') format('svg');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Scada-Regular';
    src: url('/assets/fonts/scada/Scada-Regular.eot');
    src:
    url('/assets/fonts/scada/Scada-Regular.eot?#iefix') format('embedded-opentype'),
    url('/assets/fonts/scada/Scada-Regular.woff') format('woff'),
    url('/assets/fonts/scada/Scada-Regular.ttf') format('truetype'),
    url('/assets/fonts/scada/Scada-Regular.svg#Scada-Regular') format('svg');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Scada-BoldItalic';
    src: url('/assets/fonts/scada/Scada-BoldItalic.eot');
    src:
    url('/assets/fonts/scada/Scada-BoldItalic.eot?#iefix') format('embedded-opentype'),
    url('/assets/fonts/scada/Scada-BoldItalic.woff') format('woff'),
    url('/assets/fonts/scada/Scada-BoldItalic.ttf') format('truetype'),
    url('/assets/fonts/scada/Scada-BoldItalic.svg#Scada-BoldItalic') format('svg');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Font_else';
    src: url('/assets/fonts/else/sYfDtpCK.eot');
    src:
    url('/assets/fonts/else/sYfDtpCK.eot?#iefix') format('embedded-opentype'),
    url('/assets/fonts/else/sYfDtpCK.woff') format('woff'),
    url('/assets/fonts/else/sYfDtpCK.ttf') format('truetype'),
    url('/assets/fonts/else/sYfDtpCK.svg#sYfDtpCK') format('svg');
    font-weight: normal;
    font-style: normal;
}

@font-ptsans: 'PTSansRegular';
@font-ptsans-bold: 'PTSansBold';

@font-scada: 'Scada-Regular';
@font-scada-bold: 'Scada-Bold';
@font-scada-italic: 'Scada-Italic';
@font-scada-bolditalic: 'Scada-BoldItalic';

@font-else: 'Font_else';
<file_sep>body {
  font: 14px @font-ptsans,sans-serif;
    font-family: @font-ptsans;
  color: #252525;
    background-color: #fff;
  min-width: 480px;
  margin:  0 auto;
}

.container {
  max-width: 1500px;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
  width: 100%;

  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;

  overflow: hidden;
  @media (min-width: @screen-xs) {
    width: 100%;
  }
  @media (min-width: @screen-sm) {
    width: 750px;
  }
  @media (min-width: @screen-md) {
    width: 970px;
  }
  @media (min-width: @screen-lg) {
    width: 1170px;
  }

    &._arr {
        position: relative;
        &:before,
        &:after {
            content: '';
            .absolute(0,auto,auto,0);
            margin-left: 130px;
            border-top: 4px solid #fff;
            border-left: 4px solid transparent;
            border-right: 4px solid transparent;

            z-index: 2;
        }
        &:after {
            margin-left: 129px;
            border-top: 5px solid @brand-grey;
            border-left-width: 5px;
            border-right-width: 5px;

            z-index: 1;
        }
        &:before {
            margin-top: -1px;
        }
    }
}

.content-block {
    .container._arr {
        &:before,
        &:after {
            margin-top: -51px;
        }
    }
}

.row-half {
    width: 50%;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    padding: 5px;
    padding-left: 15px;
    padding-right: 15px;
    margin-left: -15px;
    margin-right: -15px;
    float: left;
}

.h1 {
    text-transform: uppercase;
    color: @text-dark;
    font-size: 22px;
    text-align: center;
    padding: 0 18px;
    position: relative;
    font-family: @font-ptsans-bold;
}

.list-simple {
    margin: 0;
    padding: 0;
    list-style-type: none;
    li {
        margin: 0;
        padding: 0;
        list-style-type: none;
        line-height: 20px;
        color: #8c8c8c;
        font-family: @font-ptsans;
        font-size: 16px;

        text-indent: 10px;
    }
}<file_sep>/* ---------------------------------------------------------------------------------

 * File :           pagination.less
 * Description :    Styles for main pagination
 * Project :        ubc
 * Author :         <NAME>

 --------------------------------------------------------------------------------------- */

.pagination {
    text-align: center;
    display: block;
    margin: 104px 0 0;

    &-wrap {
        display: inline-block;
        margin: 0 auto;
        height: 40px;
    }

    &-item {
        float: left;
        height: 36px;
        width: auto;
        margin-top: 2px;
        background-color: #ebebeb;
        color: #7b7b7b;
        font-family: @font-ptsans-bold;
        font-size: 16px;
        border: 1px solid transparent;
        margin-right: 3px;
        .transition(all 0.5s ease-in-out 0s);
        &:last-child {
            margin-right: 0;
        }

        a {
            text-decoration: none;
            display: block;
            padding: 6px 18px 8px;
            color: #7b7b7b;
            font-family: @font-ptsans-bold;
            font-size: 16px;
            &:hover {
                color: @text-blue-light;
            }
        }

        &._nn {
         width: auto;
        }

        &.active,
        &:hover {
            background-color: #fff;
            border: 1px solid @text-blue-light;
        }
    }
}<file_sep>/* ---------------------------------------------------------------------------------

 * File :           content.less
 * Description :    Main content styles
 * Project :        ubc
 * Author :         <NAME>

 --------------------------------------------------------------------------------------- */

.content {

    p {
        color: #8c8c8c;
        font-family: @font-ptsans;
        font-size: 16px;

        img {
            float: right;
            margin-right: -15px;
            max-width: 100%;
          @media screen and (max-width: @screen-sm) {
            float: left;
          }
        }
    }

  &-text {
    @media screen and (max-width: @screen-sm) {
      margin: 15px;
    }
    &-img {
      @media screen and (max-width: @screen-sm) {
        margin-bottom: 15px;
        text-align: center;
        img {
          float: none !important;margin:0 auto;
        }
      }
    }
  }

  &-center {
    margin: 57px 0 64px;
    &.article {
      margin-top: 42px;
    }
  }

    &-header {
        margin: 0 0 11px 0;
        &-img {
            width: 82px;
            display: table-cell;
            vertical-align: middle;
            height: 70px;
        }
        &-text {
            display: table-cell;
            vertical-align: middle;
            color: @text-dark;
            font-family: @font-ptsans-bold;
            font-size: 40px;
          @media screen and (max-width: @screen-md) {
            text-align: center;
            display: block;
            text-align: center;
            .content-header-img + & {
              display: table-cell;
            }
          }
        }
      & ~ .row p img {
        margin-right: 19px;
      }
    }

  &-fieldset {
    text-transform: uppercase;
    color: @text-dark;
    font-size: 22px;
    text-align: center;
    padding: 0 18px;
    position: relative;
      font-family: @font-ptsans-bold;

    span {
      position: relative;
      z-index: 1;

      background-color: #fff;
      padding: 0 18px;
    }

    &:before {
      content: '';
      position: absolute;
      left: 0;
      right: 0;
      top: 50%;
      margin-top: -2px;
      z-index: -1;
      border-top: 2px solid #cecece;
    }
      &._no-line {
          &:before {
              border-top: 0;
          }
      }
      &._ntt {
          text-transform: none;
      }
  }

  &-partners {

    @media (min-width: @screen-lg) {
      &.partners-1 {
        margin-left: 68px;
        margin-top: 40px;
      }
      &.partners-2 {
        margin-left: 50px;
        margin-top: 49px;
      }
      &.partners-3 {
        margin-left: -10px;
        margin-top: 42px;
      }
      &.partners-4 {
        margin-left: -49px;
        margin-top: 40px;
      }
      &.partners-5 {
        margin-left: -85px;
        margin-top: 40px;
      }
      &.partners-6 {
        margin-left: 60px;
        margin-top: 5px;
      }
      &.partners-7 {
        margin-left: 35px;
        margin-top: 7px;
      }
      &.partners-8 {
        margin-left: -8px;
        margin-top: 8px;
      }
      &.partners-9 {
        margin-left: -43px;
        margin-top: 9px;
      }
      &.partners-10 {
        margin-left: -72px;
        margin-top: 12px;
      }
    }

    @media (max-width: @screen-md) {
      margin: 0 0%;
      height: 180px;
    }
    @media (max-width: @screen-sm) {
      margin: 0 11%;
      height: 180px;
    }

    position: relative;
    height: 133px;
    margin: 0 -15px;
    margin-bottom: 50px;

    @op: 0.85;

    &-wrap {
      display: table-cell;
      height: 180px;
      width: 196px;
      vertical-align: middle;
      text-align: center;

      -webkit-transition: all 0.4s linear;
      transition: all 0.4s linear;

        .opacity(@op);

      img {
        display: block;
          margin: 0 auto;
      }
    }

    &:hover {
      .content-partners-wrap {
          .opacity(1);
      }
    }

  }

    &-block {
        border-top: 1px solid @brand-grey;
        padding: 50px 0 0px;
        margin-bottom: -7px;
    }

  &-slider {
    margin-bottom: 45px;
  }
}

.partners {
  margin: 38px auto 45px;
}

.forums {
    margin-top: 39px;
    &__list {
        padding: 50px 0 70px;
    }
    &__item {
        &-a {
            display: block;
            text-decoration: none !important;
            .transition(all 0.5s ease-in-out 0s);
            .opacity(0.8);
            &:hover {
                .opacity(1);
                .forums__item-text {
                    .transition(all 0.2s ease-in-out 0s);
                    text-decoration: underline !important;
                    color: @text-blue-light;
                }
            }
        }
        &-img {
            height: 190px;
            width: 178px;
            display: table-cell;
            vertical-align: middle;
            text-align: center;
            padding-bottom: 30px;
            .ico-forums {
                background-image: url("/assets/img/sprites/spr-forums.png");
                display: inline-block;
                &.ico-arcitech {
                    background-position: -120px 0px;
                    width: 143px;
                    height: 138px;
                }
                &.ico-big-bulb {
                    background-position: -264px 0px;
                    width: 128px;
                    height: 127px;
                }
                &.ico-house {
                    background-position: 0px -159px;
                    width: 136px;
                    height: 124px;
                }
                &.ico-paint {
                    background-position: 0px 0px;
                    width: 119px;
                    height: 158px;
                }
                &.ico-port {
                    background-position: -137px -159px;
                    width: 114px;
                    height: 98px;
                }

            }
        }
        &-text {
            color: @text-dark;
            font-family: @font-ptsans-bold;
            font-size: 20px;
            text-align: center;
            margin-top: -30px;
            @media screen and (max-width: @screen-sm) {
              text-align: left;
              text-indent: 30px;
            }
        }
    }
}

.info {
    &__item {
        margin: 40px 0 70px;

        &-info {
            padding-left: 42px;
            position: relative;
            height: 250px;
          @media screen and (min-width: @screen-xs) {
            padding-left: 0;
            padding-top: 10px;
          }
          @media screen and (min-width: @screen-xs) and (max-width: @screen-sm) {
            height: 203px;
          }
        }

        &-text {
            max-height: 120px;
            .text-overflow();
            white-space: normal;
          @media screen and (min-width: @screen-xs) and (max-width: @screen-md) {
            max-height: 72px;
          }
        }

        &-more {
            position: absolute;
          bottom: -4px;
          right: 44px;
          width: 125px;
          @media screen and (min-width: @screen-xs) and (max-width: @screen-md) {
            right: 0;
          }
            .btn {
              width: 145px;
            }
        }

        &-img {
            img {
                display: block;
                float: left;
                max-width: 100%;
                @media (max-width: @screen-sm) {
                  float: none;margin: 0 auto;
                }
            }
        }

        &-name {
            color: @text-dark;
            font-family: @font-ptsans-bold;
            font-size: 30px;

            margin-bottom: 2px;
            margin-top: -1px;
            overflow: hidden;
            @media screen and (min-width: @screen-sm) {
              max-height: 117px;
            }
        }
    }
}

.p-centered {
    margin-left: 30px;
}<file_sep>@import "less/sys/bootstrap/bootstrap";

@import "less/sys/_var";
@import "less/sys/mixins";
@import "less/elements/btn";
@import "less/elements/forms";
@import "less/elements/carousel";
@import "less/elements/pagination";

@import "less/base";
@import "less/content";

@import "less/header";
@import "less/footer";

<file_sep>

                            En

                            Ru

                        Архитектура и дизайн

                        Строительство

                        Электрификация

                        Отопление

                        Климат

                        Энергозбережение

                        Портфолио

                        О нас

<file_sep>/* ---------------------------------------------------------------------------------

 * File :           btn.less
 * Description :    Styles for buttons in project
 * Project :        ubc
 * Author :         <NAME>

 --------------------------------------------------------------------------------------- */

.btn {
    &-orange {
        .border-radius(5px);
        background-color: @brand-orange;
        color: #fff;
        font-family: @font-ptsans-bold;

        &.btn-md {
            height: 31px;
            line-height: 31px;

            font-size: 20px;
        }
    }
    &-blue {
        .border-radius(5px);
        background-color: transparent;
        border: 1px solid @text-blue-light;
        color: @text-dark;
        font-family: @font-ptsans-bold;

        &.btn-md {
            height: 31px;
            line-height: 31px;

            font-size: 20px;
        }
    }
}<file_sep>

                                Кровля крыши
                                Кровля крыши для вашего дома!!!

                                Кровля крыши
                                Кровля крыши для вашего дома!!!

                                Кровля крыши
                                Кровля крыши для вашего дома!!!Кровля крыши для вашего дома!!!Кровля крыши для вашего дома!!!

                                Кровля крыши
                                Кровля крыши для вашего дома!!!

                                Кровля крыши
                                Кровля крыши для вашего дома!!!

                                Кровля крыши
                                Кровля крыши для вашего дома!!!

        Previous

        Next

languages: Hack Less PHP

repo_language: Hack


text:
<file_sep># docker-build-tools
My personal collection of random scripts for building docker images

branch_name: refs/heads/master

repo_language: Markdown

repo_name: samthecodingman/docker-build-tools


text:
<repo_name>szucsatti/kata<file_sep>/README.md
# katas
coding katas
<file_sep>/src/main/java/com/szucsatti/kata/gildedrose/strategy/AgedBrieUpdateStrategy.java
package com.szucsatti.kata.gildedrose.strategy;

import com.szucsatti.kata.gildedrose.Item;

public class AgedBrieUpdateStrategy implements UpdateStrategy {

	@Override
	public void updateQuality(final Item item) {
		int quality = item.getQuality();
		int qualityIncrease = item.getSellIn() <= 0 ? 2 : 1;
		item.setQuality(Math.min(quality + qualityIncrease, 50));
		item.decreaseSellIn();
	}

}
<file_sep>/src/test/java/com/szucsatti/kata/gildedrose/TestBase.groovy
package com.szucsatti.kata.gildedrose

class TestBase {

	final int ZERO = 0

	final int ONE = 1

	final int TWO = 2

	final int THREE = 3

	final int FOUR = 4

	final int FIVE = 5

	final int NINE = 9

	final int TEN = 10

	final int ELEVEN = 11

	final int MAX_QUALITY = 50
}
<file_sep>/src/test/java/com/szucsatti/kata/gildedrose/GildedRoseTest.groovy
package com.szucsatti.kata.gildedrose;

import org.junit.Test

import com.szucsatti.kata.gildedrose.GildedRose;
import com.szucsatti.kata.gildedrose.Item;

public class GildedRoseTest extends TestBase {

	@Test
	public void "quality degrades before sell by date"(){
		def items = [
			new Item("Basketball", 1, FIVE) ] as Item[]
		def classToTest = new GildedRose(items)
		classToTest.updateQuality()
		assert (FIVE - 1) == classToTest.items[0].quality
		assert ZERO == classToTest.items[0].sellIn
	}

	@Test
	public void "quality degrades after sell by date passes"(){
		def items = [
			new Item("Basketball", -1, FIVE) ] as Item[]
		def classToTest = new GildedRose(items)
		classToTest.updateQuality()
		assert (FIVE - 2) == classToTest.items[0].quality
		assert  -2 == classToTest.items[0].sellIn
	}

	@Test
	public void "quality is never negative"(){
		def items = [
			new Item("Basketball", -1, ONE) ] as Item[]
		def classToTest = new GildedRose(items)
		classToTest.updateQuality()
		assert ZERO == classToTest.items[0].quality
		assert -2 == classToTest.items[0].sellIn
	}

	@Test
	public void "aged brie's quality increases as time passes"(){
		def items = [
			new Item("Aged Brie", 4, ONE) ] as Item[]
		def classToTest = new GildedRose(items)
		classToTest.updateQuality()
		assert TWO == classToTest.items[0].quality
		assert THREE == classToTest.items[0].sellIn
	}

	@Test
	public void "aged brie's quality increases by two after sell by date passes" (){
		def items = [
			new Item("Aged Brie", ZERO, ONE) ] as Item[]
		def classToTest = new GildedRose(items)
		classToTest.updateQuality()
		assert THREE == classToTest.items[0].quality
		assert -1 == classToTest.items[0].sellIn
	}

	@Test
	public void "maximum quality is fifty"(){
		def items = [
			new Item("Aged Brie", FOUR, MAX_QUALITY) ] as Item[]
		def classToTest = new GildedRose(items)
		classToTest.updateQuality()
		assert MAX_QUALITY == classToTest.items[0].quality
		assert THREE == classToTest.items[0].sellIn
	}

	@Test
	public void "sulfuras's quality never decreases"(){
		def items = [
			new Item("Sulfuras, Hand of Ragnaros", FOUR, TWO) ] as Item[]
		def classToTest = new GildedRose(items)
		classToTest.updateQuality()
		assert TWO == classToTest.items[0].quality
	}

	@Test
	public void "sulfuras's sell by date never decreases"(){
		def items = [
			new Item("Sulfuras, Hand of Ragnaros", FOUR, TWO) ] as Item[]
		def classToTest = new GildedRose(items)
		classToTest.updateQuality()
		assert FOUR == classToTest.items[0].sellIn
	}

	@Test
	public void "backstage passes increases in quality before sell by date"(){
		def items = [
			new Item("Backstage passes to a TAFKAL80ETC concert", ELEVEN, TWO) ] as Item[]
		def classToTest = new GildedRose(items)
		classToTest.updateQuality()
		assert THREE == classToTest.items[0].quality
		assert TEN == classToTest.items[0].sellIn
	}

	@Test
	public void "backstage pass's quality increases by two before sell by date"(){
		def items = [
			new Item("Backstage passes to a TAFKAL80ETC concert", TEN, TWO) ] as Item[]
		def classToTest = new GildedRose(items)
		classToTest.updateQuality()
		assert FOUR == classToTest.items[0].quality
		assert NINE == classToTest.items[0].sellIn
	}

	@Test
	public void "backstage pass's quality increases by three before sell by date"(){
		def items = [
			new Item("Backstage passes to a TAFKAL80ETC concert", FIVE, TWO) ] as Item[]
		def classToTest = new GildedRose(items)
		classToTest.updateQuality()
		assert FIVE == classToTest.items[0].quality
		assert FOUR == classToTest.items[0].sellIn
	}

	@Test
	public void "backstage pass's quality drops after sell by date passes"(){
		def items = [
			new Item("Backstage passes to a TAFKAL80ETC concert", ZERO, TWO) ] as Item[]
		def classToTest = new GildedRose(items)
		classToTest.updateQuality()
		assert ZERO == classToTest.items[0].quality
		assert -1 == classToTest.items[0].sellIn
	}
}
<file_sep>/src/main/java/com/szucsatti/kata/gildedrose/strategy/BackstagePassesUpdateStrategy.java
package com.szucsatti.kata.gildedrose.strategy;

import com.szucsatti.kata.gildedrose.Item;

public class BackstagePassesUpdateStrategy implements UpdateStrategy {

	@Override
	public void updateQuality(final Item item) {
		int quality = item.getQuality();
		int delta = qualityIncrease(item);
		item.setQuality(Math.min(quality + delta, 50));
		item.decreaseSellIn();
	}

	private int qualityIncrease(final Item item) {
		if (item.getSellIn() <= 0)
			return item.getQuality() * -1;
		int count = 1;
		if (item.getSellIn() <= 10)
			count++;
		if (item.getSellIn() <= 5)
			count++;
		return count;
	}

}
<file_sep>/src/main/java/com/szucsatti/kata/gildedrose/strategy/SulfurasUpdateStrategy.java
package com.szucsatti.kata.gildedrose.strategy;

import com.szucsatti.kata.gildedrose.Item;

public class SulfurasUpdateStrategy implements UpdateStrategy {

	@Override
	public void updateQuality(final Item item) {
		// literally do nothing
	}

}
<file_sep>/src/main/java/com/szucsatti/kata/gildedrose/factory/UpdateStrategyFactory.java
package com.szucsatti.kata.gildedrose.factory;

import com.szucsatti.kata.gildedrose.Item;
import com.szucsatti.kata.gildedrose.strategy.AgedBrieUpdateStrategy;
import com.szucsatti.kata.gildedrose.strategy.BackstagePassesUpdateStrategy;
import com.szucsatti.kata.gildedrose.strategy.StandardUpdateStrategy;
import com.szucsatti.kata.gildedrose.strategy.SulfurasUpdateStrategy;
import com.szucsatti.kata.gildedrose.strategy.UpdateStrategy;

public class UpdateStrategyFactory {

	public UpdateStrategy createUpdateStrategy(final Item item) {
		switch (item.getName()) {
		case "Aged Brie":
			return new AgedBrieUpdateStrategy();
		case "Sulfuras, Hand of Ragnaros":
			return new SulfurasUpdateStrategy();
		case "Backstage passes to a TAFKAL80ETC concert":
			return new BackstagePassesUpdateStrategy();
		default:
			return new StandardUpdateStrategy();
		}
	}

}
<file_sep>/src/test/java/com/szucsatti/kata/gildedrose/strategy/AgedBrieUpdateStrategyTest.groovy
package com.szucsatti.kata.gildedrose.strategy

import org.junit.Test

import com.szucsatti.kata.gildedrose.Item
import com.szucsatti.kata.gildedrose.TestBase

class AgedBrieUpdateStrategyTest extends TestBase{

	@Test
	public void "aged brie increases in quality before sell by date"(){
		def item = createAgedBrieItem(2, FIVE)
		def classToTest = new AgedBrieUpdateStrategy()
		classToTest.updateQuality(item)
		assert (FIVE + 1) == item.quality
		assert  1 == item.sellIn
	}

	@Test
	public void "maximum quality is fifty"(){
		def item = createAgedBrieItem(2, MAX_QUALITY)
		def classToTest = new AgedBrieUpdateStrategy()
		classToTest.updateQuality(item)
		assert MAX_QUALITY == item.quality
		assert  1 == item.sellIn
	}

	@Test
	public void "aged brie quality increases by two after sell by date"(){
		def item = createAgedBrieItem(-1, NINE)
		def classToTest = new AgedBrieUpdateStrategy()
		classToTest.updateQuality(item)
		assert ELEVEN == item.quality
		assert  -2 == item.sellIn
	}

	@Test
	public void "aged brie quality increases by two on sell by date"(){
		def item = createAgedBrieItem(0, NINE)
		def classToTest = new AgedBrieUpdateStrategy()
		classToTest.updateQuality(item)
		assert ELEVEN == item.quality
		assert  -1 == item.sellIn
	}

	private Item createAgedBrieItem(int sellIn, int quality){
		return new Item("Aged Brie", sellIn, quality);
	}
}
<file_sep>/src/test/java/com/szucsatti/kata/gildedrose/strategy/StandardUpdateStrategyTest.groovy
package com.szucsatti.kata.gildedrose.strategy

import org.junit.Test

import com.szucsatti.kata.gildedrose.Item
import com.szucsatti.kata.gildedrose.TestBase

class StandardUpdateStrategyTest extends TestBase {

	@Test
	public void "standard item decreases in quality before sell by date"(){
		def item = createStandardItem(2, FIVE)
		def classToTest = new StandardUpdateStrategy()
		classToTest.updateQuality(item)
		assert (FIVE - 1) == item.quality
		assert  1 == item.sellIn
	}

	@Test
	public void "standard item decreases twice as fast in quality after sell by date"(){
		def item = createStandardItem(-1, FIVE)
		def classToTest = new StandardUpdateStrategy()
		classToTest.updateQuality(item)
		assert (FIVE - 2) == item.quality
		assert -2 == item.sellIn
	}

	@Test
	public void "item quality is never negative"(){
		def item = createStandardItem(-1, ZERO)
		def classToTest = new StandardUpdateStrategy()
		classToTest.updateQuality(item)
		assert 0 == item.quality
		assert -2 == item.sellIn
	}

	private Item createStandardItem(int sellIn, int quality ){
		return new Item("Standard", sellIn, quality);
	}
}
<file_sep>/src/test/java/com/szucsatti/kata/gildedrose/strategy/BackstagePassesUpdateStrategyTest.groovy
package com.szucsatti.kata.gildedrose.strategy

import org.junit.Test

import com.szucsatti.kata.gildedrose.Item
import com.szucsatti.kata.gildedrose.TestBase

class BackstagePassesUpdateStrategyTest extends TestBase{

	@Test
	public void "backstage pass's quality increases by one before sell by date"(){
		def item = createBackstagePassItem(ELEVEN, FIVE)
		def classToTest = new BackstagePassesUpdateStrategy()
		classToTest.updateQuality(item)
		assert (FIVE + 1) == item.quality
		assert  TEN == item.sellIn
	}

	@Test
	public void "backstage pass's quality increases by two before sell by date"(){
		def item = createBackstagePassItem(TEN, FIVE)
		def classToTest = new BackstagePassesUpdateStrategy()
		classToTest.updateQuality(item)
		assert (FIVE + 2) == item.quality
		assert  NINE == item.sellIn
	}

	@Test
	public void "backstage pass's quality increases by three before sell by date"(){
		def item = createBackstagePassItem(FIVE, FIVE)
		def classToTest = new BackstagePassesUpdateStrategy()
		classToTest.updateQuality(item)
		assert (FIVE + 3) == item.quality
		assert  FOUR == item.sellIn
	}

	@Test
	public void "backstage pass's quality drops after sell by date passes"(){
		def item = createBackstagePassItem(-1, FIVE)
		def classToTest = new BackstagePassesUpdateStrategy()
		classToTest.updateQuality(item)
		assert 0 == item.quality
		assert  -2 == item.sellIn
	}

	@Test
	public void "backstage pass's quality drops on sell by date passes"(){
		def item = createBackstagePassItem(0, FIVE)
		def classToTest = new BackstagePassesUpdateStrategy()
		classToTest.updateQuality(item)
		assert 0 == item.quality
		assert  -1 == item.sellIn
	}

	private Item createBackstagePassItem(int sellIn, int quality){
		return new Item("Backstage passes to a TAFKAL80ETC concert", sellIn, quality);
	}
}

languages: Java Markdown Groovy

repo_language: Java

repo_name: szucsatti/kata


text:
<repo_name>Skylore/pylabs<file_sep>/lab3/quicksortLomoto.py
from ast import literal_eval

data = input().split()

def parseType(var):
    try:
        return type(literal_eval(var))
    except ValueError:
        return str

for i in range(len(data)):
    parseVar = parseType(data[i])
    data[i] = parseVar(data[i])

def sort(A):
    if len(A) <= 1:
        return A

    middle = int(len(A) / 2)
    left = sort(A[:middle])
    right = sort(A[middle:])

    return merge(left, right)

def merge(left, right):
    res = []

    while len(left) > 0 and len(right) > 0:
        if left[0] <= right[0]:
            res.append(left[0])
            left = left[1:]
        else:
            res.append(right[0])
            right = right[1:]

    if len(left) > 0:
        res += left
    if len(right) > 0:
        res += right

    return res

print(" ".join([str(i) for i in sort(data)]))
<file_sep>/queueOnList(2.4).py
class Queue:
    def __init__(self):
        self.memory = []

    push = lambda self, val: self.memory.append(val)
    pop = lambda self: self.memory.pop(0) if len(self.memory) > 0 else None
    reverse = lambda self: self.memory.reverse()
    print = lambda self: print(' '.join([str(i) for i in self.memory]).strip())

if __name__ == '__main__':
    n = int(input())
    actions = [input() for i in range(n)]

    q = Queue()

    for action in actions:
        action = action.split()

        if action[0] == 'push':
            q.push(float(action[1]))
        else:
            getattr(q, action[0])()

    q.print()

<file_sep>/PrefixTreeUpDown.py
#!/bin/python3

import math
import os
import random
import re
import sys

def bubble(arr):
    data = arr
    while True:
        swapped = False
        for i in range(len(data) - 1):
            if data[i] > data[i+1]:
                a = data[i]
                data[i] = data[i + 1]
                data[i + 1] = a
                swapped = True;
        if not swapped: break
    return data

class Node:
  def __init__(self, val):
    self.value = val[0]
    self.width = 1
    ln = len(val)
    self.depth = ln
    if ln > 1: self.root = [Node(val[1:])]
    else: self.root = []

  def put(self, val):
    ln = len(val)
    if ln == 1: return 0
    dw = self.depth
    if ln > dw: self.depth = ln
    for i in self.root:
      if val[1] == i.value:
        dw = i.put(val[1:])
        self.width += dw
        return dw
    self.root.append(Node(val[1:]))
    if dw == 1: dw = 0
    else: dw = 1
    self.width += dw
    return dw

  def layout(self):
    sr = self.width - 1
    dd = (self.depth << 1) - 1
    lines = [''] * dd
    lines[0] = ' ' * sr + self.value + ' ' * sr
    if dd == 1: return lines
    srl = len(self.root)
    if srl == 1:
      lines[1] = ' ' * sr + '\u2502' + ' ' * sr
    else:
      sw = self.root[0].width - 1
      line = ' ' * sw + '\u250C' + '\u2500' * sw + '\u2500'
      for i in range(1, srl - 1):
        sw = self.root[i].width - 1
        line += '\u2500' * sw + '\u252C' + '\u2500' * sw + '\u2500'
      sw = self.root[-1].width - 1
      line += '\u2500' * sw + '\u2510' + ' ' * sw
      if line[sr] == '\u2500':
        lin = line[0:sr] + '\u2534' + line[sr + 1:]
      else:
        lin = line[0:sr] + '\u253C' + line[sr + 1:]
      lines[1] = lin
    for i in range(srl):
      a = self.root[i].layout()
      sw = self.root[i].width << 1
      for j in range(2, dd):
        try: lines[j] += a[j - 2] + ' '
        except: lines[j] += ' ' * sw
    for j in range(2, dd):
      lines[j] = lines[j][:-1]
    return lines

class Trie:

  def __init__(self):
    self.root = None

  def put(self, val):
    if val == '': return
    try: self.root.put('*' + val)
    except: self.root = Node('*' + val)

  def printout(self):
    a = self.root.layout()
    b = len(a)
    for i in range(b):
      print(a[i])
    return

if __name__ == '__main__':
  tree = Trie()
  wn = int(input())
  a = [None] * wn
  for i in range(wn):
   a[i] = input().strip()
  a = bubble(a)
  for i in range(wn):
    tree.put(a[i])
  tree.printout()
<file_sep>/lab3/radix(4.2).py
def sort(arr, base=10):
    if arr == []:
        return

    def key_factory(digit, base):
        def key(arr, index):
            return ((arr[index] // (base ** digit)) % base)

        return key

    largest = max(arr)
    exp = 0
    while base ** exp <= largest:
        arr = counting_sort(arr, base - 1, key_factory(exp, base))
        exp = exp + 1
    return arr

def counting_sort(arr, largest, key):
    c = [0] * (largest + 1)
    for i in range(len(arr)):
        c[key(arr, i)] = c[key(arr, i)] + 1

    c[0] = c[0] - 1
    for i in range(1, largest + 1):
        c[i] = c[i] + c[i - 1]

    result = [None] * len(arr)
    for i in range(len(arr) - 1, -1, -1):
        result[c[key(arr, i)]] = arr[i]
        c[key(arr, i)] = c[key(arr, i)] - 1

    return result

print(" ".join([str(i) for i in sort(list(map(int, input().split())))]))<file_sep>/lab3/counting(4.1).py
def sort(array, maxval):
    n = len(array)
    m = maxval + 1
    count = [0] * m
    for a in array:
        count[a] += 1
    i = 0
    for a in range(m):
        for c in range(count[a]):
            array[i] = a
            i += 1
    return array

arr = list(map(int, input().split()))
print(" ".join([str(i) for i in sort(arr, max(arr))]))<file_sep>/queryQueueCanary(3.2).py
class Query:
    def __init__(self, value, next=None):
        self.value = value
        self.next = next

    def __str__(self):
        return str(self.value)

class Queue:
    def __init__(self, length):
        self.length = length
        self.head = self.tail = None
        self.__size = 0

    def push(self, value):
        q = Query(value)

        if self.__size < self.length:
            if self.__size == 0:
                self.head = self.tail = q
            elif self.__size > 0:
                self.tail.next = q
                self.tail = q
        else:
            q.next = self.head
            self.head = q

        self.__size += 1

    def pop(self):
        value = self.head

        if self.__size == 1:
            self.head = self.tail = None
        elif self.__size > 1:
            self.head = value.next
            value.next = None

        if value is not None:
            self.__size -= 1

        return value

    def __iter__(self):
        self.current = self.head
        return self

    def __next__(self):
        try:
            value = self.current
            self.current = value.next
            return value
        except AttributeError:
            raise StopIteration

    def __str__(self):
        res = ''

        for i in self:
            res += str(i) + ' '

        return res.strip()

if __name__ == '__main__':
    length = int(input())
    n = int(input())
    actions = [input() for i in range(n)]

    q = Queue(length)

    for action in actions:
        action = action.split()

        q.push(float(action[1])) if len(action) == 2 else q.pop()

    print(q)
<file_sep>/lab3/insertion.py
from ast import literal_eval

data = input().split()

def parseType(data):
    try:
        return type(literal_eval(data))
    except (ValueError, SyntaxError):
        return str

for i in range(len(data)):
    parse = parseType(data[i])
    data[i] = parse(data[i])

def sort(arr):
    for i in range(1, len(arr)):
        key = arr[i]

        j = i - 1
        while j >= 0 and key < arr[j]:
            arr[j + 1] = arr[j]
            j -= 1
        arr[j + 1] = key

    return arr

print(" ".join([str(i) for i in sort(data)]))<file_sep>/lab3/bubble(1.1).py
from ast import literal_eval

data = input().split()

def parseType(data):
    try:
        return type(literal_eval(data))
    except (ValueError, SyntaxError):
        return str

for i in range(len(data)):
    parse = parseType(data[i])
    data[i] = parse(data[i])

def sort(arr):
    n = len(arr)

    for i in range(n):
        for j in range(0, n - i - 1):
            if arr[j] > arr[j+1]:
                arr[j], arr[j+1] = arr[j+1], arr[j]
    return arr

print(" ".join([str(i) for i in sort(data)]))

repo_language: Python

repo_name: Skylore/pylabs


text:
<repo_name>oahayder/feedme<file_sep>/feedme/proximitysearch/tests.py
from django.test import TestCase
from proximitysearch.models import FoodFacility
from proximitysearch.src.locationController import LocationController
from proximitysearch.src.locationValidator import LocationValidator

class NearbyFoodFacilityTestCase(TestCase):
    def setUp(self):
        FoodFacility.objects.create(name = "Testco", address="1770 Pacific", description="Imaginary food stuffs", longitude="37.794656", latitude="-122.424326")

    def test_response(self):
        testco = FoodFacility.objects.get(name="Testco")
        self.assertEqual(LocationController.get_distance_between(testco.longitude,testco.latitude,100,90), 10207.85710073846)

    def test_get_distances(self):
        self.assertEqual(LocationController.get_distance_between(100,90,100,90), 0)

    def test_invalid_input(self):
        self.assertEqual(LocationValidator.validate_coordinates(0,0), 1)
        self.assertEqual(LocationValidator.validate_coordinates(180,90), 1)
        self.assertEqual(LocationValidator.validate_coordinates(-180,-90), 1)
        self.assertEqual(LocationValidator.validate_coordinates(180,-90), 1)
        self.assertEqual(LocationValidator.validate_coordinates(-180,90), 1)
        self.assertEqual(LocationValidator.validate_coordinates(1000,0), 0)
        self.assertEqual(LocationValidator.validate_coordinates(0,-1000), 0)
        self.assertEqual(LocationValidator.validate_coordinates(-1000,0), 0)
        self.assertEqual(LocationValidator.validate_coordinates(0,10000), 0)
        self.assertEqual(LocationValidator.validate_coordinates("a",True), 0)
<file_sep>/feedme/requirements.txt
pip==6.0.8
APScheduler==3.0.2
dj-database-url==0.3.0
dj-static==0.0.6
Django==1.7.7
django-filter==0.9.2
django-postgrespool==0.3.0
django-redis==3.8.3
django-rest-swagger==0.2.9
djangorestframework==3.1.1
futures==2.2.0
gunicorn==19.3.0
Markdown==2.6.1
psycopg2==2.6
pystache==0.5.4
pytz==2015.2
PyYAML==3.11
six==1.9.0
SQLAlchemy==0.9.9
static==1.1.1
static3==0.5.1
tzlocal==1.1.2
<file_sep>/feedme/proximitysearch/src/locationController.py
from proximitysearch.models import FoodFacility
from math import radians, cos, sin, asin, sqrt

__author__ = 'oahayder'

class LocationController(object):

    def get_cacheable_longitude(longitude):
        # TODO read this from conf
        longitude -= longitude % (0.0001)
        return longitude

    @staticmethod
    def get_cacheable_latitude(latitude):
        # TODO Read this from conf
        latitude -= latitude % (0.0001)
        return latitude

    @staticmethod
    def get_distance_between(lon1, lat1, lon2, lat2):

        # In miles
        # TODO read the desired metric setting from a User config
        earth_radius = 3963.1676

        # Uses the Haversine Formula (http://en.wikipedia.org/wiki/Haversine_formula)
        lon1, lat1, lon2, lat2 = map(radians, [lon1, lat1, lon2, lat2])
        dlon = lon2 - lon1
        dlat = lat2 - lat1
        a = sin(dlat/2)**2 + cos(lat1) * cos(lat2) * sin(dlon/2)**2
        c = 2 * asin(sqrt(a))

        distance = earth_radius * c

        return distance

    @staticmethod
    def get_nearby_food_facilities(longitude, latitude):

        # TODO Use custon redis cache to store results and grab them here
        # TODO Can we get APPROVED from a decode table via public API? Are approved the only open ones?
        approved_facilities = LocationController.get_approved_food_facilities()

        facilitysearch_list = []
        for facility in approved_facilities:
            distance = LocationController.get_distance_between(facility.longitude, facility.latitude, longitude, latitude)

            # TODO Should we not be rounding here and leave it up to the FE?
            facility.set_distance(round(distance,2))
            facilitysearch_list.append(facility)

        sorted_facilitysearch_list = sorted(facilitysearch_list, key=lambda item: item.distance)

        return sorted_facilitysearch_list

    @staticmethod
    def get_approved_food_facilities():
        approved_facilities = FoodFacility.objects.filter(status='APPROVED')
        return approved_facilities
<file_sep>/feedme/scripts/clock.py
__author__ = 'oahayder'

import os
from apscheduler.schedulers.blocking import BlockingScheduler

sched = BlockingScheduler()

@sched.scheduled_job('cron', day_of_week='mon', hour=2)
def refresh_database():
    os.system("sync_data.py")

sched.start()
<file_sep>/README.md
# FEEDME
Find a food truck, fast!

[API Docs](https://arcane-beach-1328.herokuapp.com/proximitysearch/api-docs)

[Closest 10 spots in JSON form? Try it here!](https://arcane-beach-1328.herokuapp.com/proximitysearch/nearby/37.794656/-122.424326?count=10&format=json)

# Backend logic
The first step to solving this was understanding the data. With only one week of exposure to the Data SF API I didn't have time to study it's behaviours which meant I had to make some assumptions:

1. The listings and status of food trucks could change at any given time at an unpredictable rate (Assumed to change on average once per day)
2. The API could be unreachable at any time for a prolonged period of time
3. The API could periodically have incorrect data

I tried to solve all these problems by building a daemon process that scrapes the API every monday and repopulates a SQL DB that's maintained in this system.

# Tech
Python 2.7
Django (https://www.djangoproject.com/)
Django REST framework (http://www.django-rest-framework.org/)

PostgreSQL

This is my first web app hence my first time using Django and Heroku. From what I've found Django was the most widely used web framework for scalable Python web apps. It has a lot of cool plugins and add ons that make life easy. It also ceoms with an ORM out of the box which cut down on development time which was essential for this one week project.

The Django REST framework was also very useful to out simply output the data in consumable JSON.

Author: <NAME> (https://www.linkedin.com/in/oahayder)
<file_sep>/feedme/proximitysearch/views.py
from proximitysearch.src.locationController import LocationController
from proximitysearch.src.locationValidator import LocationValidator

from proximitysearch.serializers import FoodFacilitySerializer
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status

class NearbyFoodFacilityList(APIView):
    """
    https://github.com/oahayder/feedme

    """
    def get(self, request, longitude, latitude):

        validate = LocationValidator.validate_coordinates(longitude,latitude)
        if (not validate):
            return Response("Invalid longitude and/or latitude params", status=status.HTTP_400_BAD_REQUEST)

        try:
            count = int(request.GET.get('count'))
        except (TypeError, ValueError) as e:
            # TODO Log error
            count = 1

        sorted_proximitysearch_list = LocationController.get_nearby_food_facilities(float(longitude), float(latitude))
        serializer = FoodFacilitySerializer(sorted_proximitysearch_list[0:count], many=True)

        return Response(serializer.data)

<file_sep>/feedme/scripts/sync_data.py
__author__ = 'oahayder'

import urllib2
import json
import os, sys
import django

sys.path.append(os.path.join(os.path.dirname(__file__), '../'))
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "feedme.settings")
django.setup()

from proximitysearch.models import FoodFacility

# We will run this script nightly to update our DB

# Grab JSON via gov API
# TODO get this from conf
response = urllib2.urlopen('https://data.sfgov.org/resource/rqzj-sfat.json')

data = json.load(response)

# TODO Validate data
# TODO If invalid, log and send email to admin

for food_facility in data:

    # Required params
    try:
        # TODO is this correct or is it the coords under location?
        latitude = food_facility['latitude']
        longitude = food_facility['longitude']
        permitId = food_facility['permit']
        name = food_facility['applicant']
        address = food_facility['address']
        status = food_facility['status']
        schedule = food_facility['schedule']
    except KeyError:
        continue

    # Nice to haves
    try:
        fooditems = food_facility['fooditems']
    except KeyError:
        fooditems = ''

    # Update items
    new_facility = FoodFacility(
        permitId = id,
        name = name,
        address = address,
        description = fooditems,
        longitude = longitude,
        latitude = latitude,
        status = status,
        scheduleLink = schedule)

    new_facility.save()

# Remove any entry in the table that wasn't just updated.

<file_sep>/feedme/proximitysearch/src/__init__.py
__author__ = 'oahayder'
<file_sep>/feedme/proximitysearch/src/locationValidator.py
__author__ = 'oahayder'

class LocationValidator(object):
    @staticmethod
    def validate_coordinates(longitude, latitude):
        try:
            longitude = float(longitude)
            latitude = float(latitude)
        except (TypeError, ValueError):
            # TODO Log error
            # TODO try and use the users previously requested location
            # TODO Use custom exception
            return 0

        if (longitude>180 or longitude<-180 or latitude>90 or latitude<-90):
            return 0

        return 1
<file_sep>/feedme/Procfile
web: gunicorn feedme.wsgi
clock: python scripts/clock.py
<file_sep>/feedme/proximitysearch/serializers.py
from proximitysearch.models import FoodFacility

from rest_framework import serializers

class FoodFacilitySerializer(serializers.ModelSerializer):
    class Meta:
        model = FoodFacility
        fields = ('name', 'address', 'description', 'scheduleLink', 'distance')
<file_sep>/feedme/proximitysearch/urls.py
__author__ = 'oahayder'

from django.conf.urls import patterns, url, include
from proximitysearch import views

urlpatterns = patterns('',
    # ex: /proximitysearch/nearby/35.5555/120.99999
    url(r'^nearby/(?P<latitude>\-?\d+\.?\d*)/(?P<longitude>\-?\d+\.?\d*)/$', views.NearbyFoodFacilityList.as_view(), name='nearby'),
    url(r'^api-docs/', include('rest_framework_swagger.urls')),
)
<file_sep>/feedme/proximitysearch/models.py
from django.db import models

class FoodFacility(models.Model):
    permitId = models.TextField()
    name = models.TextField()
    address = models.TextField()
    description = models.TextField()
    longitude = models.FloatField()
    latitude = models.FloatField()
    scheduleLink = models.TextField()
    status = models.TextField(default='')
    lastUpdatedTimestamp = models.DateField(auto_now=True)
    distance=0

    def __unicode__(self):
        return self.name

    def set_distance(self, distance):
        self.distance = distance

languages: Markdown Procfile Text Python

repo_name: oahayder/feedme


text:
<file_sep>from flask import Flask, request
import cgi
import os
import jinja2

template_dir = os.path.join(os.path.dirname(__file__), 'templates')
jinja_env = jinja2.Environment(loader=jinja2.FileSystemLoader(template_dir))

app = Flask(__name__)
app.config['DEBUG'] = True

@app.route("/")
def index():
    template = jinja_env.get_template('index.html')
    return template.render()

app.run()

repo_name: tweeden/web-caesar


text:
<file_sep>h1{
  text-align:center;
  color:#ffffff;
  text-transform:uppercase;
}
header{
  background: url('http://intro-webdesign.com/CSS/assignment-2/images/flywheel.jpg' )
}
nav a{
  display:inline-block;
  width:15%;
  padding:2%;
  border-radius:10%;
  margin-left:4%;
  font-size:150%;
  text-decoration:none;
  color:#ffa500;
  text-align:center;
  background-color: rgba(1,1,1,0.5)

}
.active{
  background-color:#ffffff;
  color:#0000ff;
}
header{
  padding:2%;
}
img{

  width:60%;
  margin:17%;
  display:block;
  border: solid 2px;

}
.left{
  display:block;
  background-color:#3cb371;
  float:left;
  width:20%;
}
.right{
  display:inline-block;
  width:75%;
  margin:1%;
}
th{
  background-image:-webkit-linear-gradient(#006600,#00cc00);
  background-image:-moz-linear-gradient(top,#006600,#00cc00);
  background-image:-o-linear-gradient(top,#006600,#00cc00);
  background-image:linear-gradient(#006600,#00cc00);
  line-height:30px;
  padding:2%;
}
table{
  width:75%;
  margin:2% 10%;
  color:#ffffff;
  font-family:courier,arial,helvetica;
  border:3px solid #000000;
  border-radius:2% 2% 0% 0%;
  border-width: thin medium thick;
  text-shadow: 2px 2px #ff0000;
}
table th:first-child{
  text-align:left;

}
tr{
  background-color:rgb(0,102,0,.6);
  line-height:30px;
}
td{
  padding:2%;
  text-align:center;
  width:0%;
  color:#000000;
}
tr td:first-child{
  text-align:left;
}
tr:hover{
  background-color:rgb(0,204,0,1);
}

branch_name: refs/heads/main

repo_language: CSS


text:
<file_sep># AngularJS
Samples for AngularJS practice.

repo_name: BabulalS-Optimus/AngularJS


text:
<file_sep># todo-chrome-extension
A simple todo chrome extension with html, css, javascript

![alt text](http://res.cloudinary.com/dripiece/image/upload/c_scale,w_374/v1629740739/todoextension_atouku.png)
![alt text](http://res.cloudinary.com/dripiece/image/upload/c_scale,w_390/v1629747656/todoextension1_ne12bc.png)

repo_name: onmarx/todo-chrome-extension


text:
<repo_name>moisesvni/dklabfarm<file_sep>/README.md
dklabfarm
=========
git ini

repo_name: moisesvni/dklabfarm


text:
<repo_name>edwardsdl/netduino-ntp-client<file_sep>/src/AngrySquirrel.Netduino.NtpClient/NtpPacket.cs
using System;
using AngrySquirrel.Netduino.Utilities;

namespace AngrySquirrel.Netduino.NtpClient
{
    /// <summary>
    /// Represents a packet for communications to and from a network time server
    /// </summary>
    public class NtpPacket
    {
        #region Fields

        private readonly DateTime primeEpoch = new DateTime(1900, 1, 1);

        #endregion

        #region Constructors and Destructors

        /// <summary>
        /// Initializes a new instance of the <see cref="NtpPacket" /> class
        /// </summary>
        public NtpPacket()
            : this(new byte[48])
        {
            LeapIndicator = LeapIndicator.NoWarning;
            Mode = Mode.Client;
            VersionNumber = 4;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="NtpPacket"/> class
        /// </summary>
        /// <param name="bytes">
        /// A byte array representing an NTP packet
        /// </param>
        public NtpPacket(byte[] bytes)
        {
            if (bytes.Length < 48)
            {
                throw new ArgumentOutOfRangeException("bytes", "The byte array must be at least length 48.");
            }

            Bytes = bytes;
        }

        #endregion

        #region Public Properties

        /// <summary>
        /// Gets the byte array representing this packet
        /// </summary>
        public byte[] Bytes { get; private set; }

        /// <summary>
        /// Gets or sets the value indicating which, if any, warning should be sent due to an impending leap second
        /// </summary>
        public LeapIndicator LeapIndicator
        {
            get
            {
                const int bitMask = 0xC0;
                return (LeapIndicator)((Bytes[0] & bitMask) >> 6);
            }

            set
            {
                const int bitMask = 0xC0;
                Bytes[0] = (byte)((Bytes[0] & ~bitMask) | (int)value << 6);
            }
        }

        /// <summary>
        /// Gets or sets the association mode
        /// </summary>
        public Mode Mode
        {
            get
            {
                const int bitMask = 0x07;
                return (Mode)(Bytes[0] & bitMask);
            }

            set
            {
                const int bitMask = 0x07;
                Bytes[0] = (byte)((Bytes[0] & ~bitMask) | (int)value);
            }
        }

        /// <summary>
        /// Gets the date and time this packet left the server
        /// </summary>
        public DateTime OriginTimestamp
        {
            get
            {
                var seconds = ByteHelper.ToUInt32(Bytes, 24, ByteOrder.BigEndian);
                return primeEpoch.AddSeconds(seconds);
            }
        }

        /// <summary>
        /// Gets the polling interval (in log₂ seconds)
        /// </summary>
        public byte Poll
        {
            get
            {
                return Bytes[2];
            }
        }

        /// <summary>
        /// Gets the precision of the system clock (in log₂ seconds)
        /// </summary>
        public byte Precision
        {
            get
            {
                return Bytes[3];
            }
        }

        /// <summary>
        /// Gets the date and time this packet was received by the server
        /// </summary>
        public DateTime ReceiveTimestamp
        {
            get
            {
                var seconds = ByteHelper.ToUInt32(Bytes, 32, ByteOrder.BigEndian);
                return primeEpoch.AddSeconds(seconds);
            }
        }

        /// <summary>
        /// Gets the ID of the server or reference clock
        /// </summary>
        public int ReferenceId
        {
            get
            {
                return ByteHelper.ToInt32(new[] { Bytes[12], Bytes[13], Bytes[14], Bytes[15] }, byteOrder: ByteOrder.BigEndian);
            }
        }

        /// <summary>
        /// Gets the date and time the server was last set or corrected
        /// </summary>
        public DateTime ReferenceTimestamp
        {
            get
            {
                var seconds = ByteHelper.ToUInt32(Bytes, 16, ByteOrder.BigEndian);
                return primeEpoch.AddSeconds(seconds);
            }
        }

        /// <summary>
        /// Gets the total round trip delay from the server to the reference clock
        /// </summary>
        public int RootDelay
        {
            get
            {
                return ByteHelper.ToInt32(new[] { Bytes[4], Bytes[5], Bytes[6], Bytes[7] }, byteOrder: ByteOrder.BigEndian);
            }
        }

        /// <summary>
        /// Gets the amount of jitter the server observes in the reference clock
        /// </summary>
        public int RootDispersion
        {
            get
            {
                return ByteHelper.ToInt32(new[] { Bytes[8], Bytes[9], Bytes[10], Bytes[11] }, byteOrder: ByteOrder.BigEndian);
            }
        }

        /// <summary>
        /// Gets the server's distance from the reference clock
        /// </summary>
        public byte Stratum
        {
            get
            {
                return Bytes[1];
            }
        }

        /// <summary>
        /// Gets the date and time that the packet was transmitted from the server
        /// </summary>
        public DateTime TransmitTimestamp
        {
            get
            {
                var seconds = ByteHelper.ToUInt32(Bytes, 40, ByteOrder.BigEndian);
                return new DateTime(1900, 1, 1).AddSeconds(seconds);
            }
        }

        /// <summary>
        /// Gets or sets the version number
        /// </summary>
        public int VersionNumber
        {
            get
            {
                const int bitMask = 0x38;
                return (Bytes[0] & bitMask) >> 3;
            }

            set
            {
                const int bitMask = 0x38;
                Bytes[0] = (byte)((Bytes[0] & ~bitMask) | value << 3);
            }
        }

        #endregion
    }
}<file_sep>/src/AngrySquirrel.Netduino.NtpClient/NtpClient.cs
using System;
using System.Net;
using System.Net.Sockets;

namespace AngrySquirrel.Netduino.NtpClient
{
    /// <summary>
    /// Represents a client used to connect to a network time server
    /// </summary>
    public static class NtpClient
    {
        #region Public Methods and Operators

        /// <summary>
        /// Gets the current date and time
        /// </summary>
        /// <returns>
        /// The current date and time
        /// </returns>
        public static DateTime GetDateTime()
        {
            var ntpPacket = new NtpPacket
                {
                    LeapIndicator = LeapIndicator.NoWarning,
                    Mode = Mode.Client,
                    VersionNumber = 4
                };

            return Send(ntpPacket).TransmitTimestamp;
        }

        /// <summary>
        /// Gets the current date and time using the given <see cref="NtpPacket"/>
        /// </summary>
        /// <param name="ntpPacket">
        /// The <see cref="NtpPacket"/> object to use when querying the network time server
        /// </param>
        /// <param name="host">
        /// The hostname of the network time server to connect to
        /// </param>
        /// <param name="port">
        /// The port of the network time server to connect to
        /// </param>
        /// <returns>
        /// The response from the NTP server
        /// </returns>
        public static NtpPacket Send(NtpPacket ntpPacket, string host = "time.nist.gov", int port = 123)
        {
            var hostEntry = Dns.GetHostEntry(host);
            foreach (var address in hostEntry.AddressList)
            {
                if (address != null)
                {
                    var ipEndPoint = new IPEndPoint(address, port);

                    var socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
                    try
                    {
                        socket.Connect(ipEndPoint);
                        socket.Send(ntpPacket.Bytes);

                        var buffer = new byte[48];
                        socket.Receive(buffer);

                        ntpPacket = new NtpPacket(buffer);
                    }
                    finally
                    {
                        socket.Close();
                    }

                    break;
                }
            }

            return ntpPacket;
        }

        #endregion
    }
}<file_sep>/src/AngrySquirrel.Netduino.NtpClient/LeapIndicator.cs
namespace AngrySquirrel.Netduino.NtpClient
{
    /// <summary>
    /// A set of values indicating which, if any, warning should be sent due to an impending leap second
    /// </summary>
    public enum LeapIndicator
    {
        /// <summary>
        /// The lack of a leap second warning indicator
        /// </summary>
        None = -1,

        /// <summary>
        /// No warning should be sent
        /// </summary>
        NoWarning,

        /// <summary>
        /// The last minute of the month has 61 seconds
        /// </summary>
        LastMinuteHas61Seconds,

        /// <summary>
        /// The last minute of the month has 59 seconds
        /// </summary>
        LastMinuteHas59Seconds,

        /// <summary>
        /// The clock is unsynchronized so it is unknown if there exists an impending leap second
        /// </summary>
        Unknown
    }
}<file_sep>/src/Example/Program.cs
using AngrySquirrel.Netduino.NtpClient;
using Microsoft.SPOT.Hardware;

namespace Example
{
    /// <summary>
    /// Represents an example project showing how to use the <see cref="NtpClient" /> library
    /// </summary>
    public class Program
    {
        #region Public Methods and Operators

        /// <summary>
        /// Program entry point
        /// </summary>
        public static void Main()
        {
            var dateTime = NtpClient.GetDateTime();
            Utility.SetLocalTime(dateTime);
        }

        #endregion
    }
}<file_sep>/README.md
#Netduino NTP Client
A library for interacting with a network time server

##Download
You can download the latest version of this library on NuGet. To install `netduino-ntp-client`, run the following command from the package manager console:

    PM> Install-Package AngrySquirrel.Netduino.NtpClient

More information about NuGet package is avaliable at https://nuget.org/packages/AngrySquirrel.Netduino.NtpClient/.

##Using the Library
Using the client is easy! If you simply want to set the time on your Netduino, this is all you need:

    var coordinatedUniversalTime = NtpClient.GetDateTime();
    var localTime = coordinatedUniversalTime.AddHours(-4); // Convert from UTC to your local time
    Utility.SetLocalTime(localTime);

If you want more control, you can build your own NTP request and examine the response using the `Send(NtpPacket, string, int)` method.
<file_sep>/src/AngrySquirrel.Netduino.NtpClient/Mode.cs
namespace AngrySquirrel.Netduino.NtpClient
{
    /// <summary>
    /// A set of values indicating how an NTP server can be associated with another
    /// </summary>
    public enum Mode
    {
        /// <summary>
        /// The NTP host is configured as a client
        /// </summary>
        Client = 3,

        /// <summary>
        /// The NTP host is configured as a server
        /// </summary>
        Server = 4,
    }
}

languages: C# Markdown

repo_language: C#

repo_name: edwardsdl/netduino-ntp-client


text:
<file_sep>
Success

Return to profile page
<file_sep>

Greeting User

		 #parse($userGraph)

repo_language: Velocity Template Language


text:
<file_sep># maintain order of these first few so that version dependencies don't break

# pep8 with support for empty files through flake8
-e git://github.com/ziadsawalha/pep8.git@19b64e1d6b52cb814e482188369f4db24e0e82c2#egg=pep8

# Newer hacking
# Includes two fixes for handling blank lines in files and for handling egg-linked libraries
-e git://github.com/ziadsawalha/hacking.git@76ff3d0c8b116df147b7e4ca00afda67a9537f2a#egg=hacking

pylint==1.0.0

# Alphabetical
flake8_docstrings>=0.2.0      # patched for py33
freezegun==0.1.12
pep257>=0.3.2                 # patched for py33
mock==1.0.1
nose==1.3.0

# From OpenStack cookiecutter
# https://github.com/openstack-dev/cookiecutter/
testrepository>=0.0.17

# Galley
galley>=0.2.1<file_sep># Copyright (c) 2014 <NAME>
# All Rights Reserved.
#    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. See the
#    License for the specific language governing permissions and limitations
#    under the License.

"""Things that should happen first (on app entry) go here."""

import argparse
import logging
import os
import sys

import keyring

from orgalytics import github

LOG = logging.getLogger(__name__)

def start():
    """Entry point for orgalytics command."""
    parser = argparse.ArgumentParser(
        description='Github organization statistics')
    parser.add_argument('--user', '-u',
                        default=os.environ.get('GITHUB_USERNAME'),
                        help='Github username')
    parser.add_argument('--password', '-p',
                        default=os.environ.get('GITHUB_PASSWORD'),
                        help='Github password')
    parser.add_argument('--oauth-token', '-t',
                        default=os.environ.get(
                            'GITHUB_OATH_TOKEN',
                            keyring.get_password('github', 'oauth_token')),
                        help="Github OAuth Token")
    parser.add_argument('--ignore-inactive-users',
                        dest='ignore_inactive_users',
                        default=False,
                        action='store_true',
                        help='Ignore users without contributions')
    parser.add_argument('--start-date',
                        help='Ignore contributions before this date, in '
                             'CCYY-MM-DD format')
    parser.add_argument('orgs', nargs='+', help='organization name(s)')
    args = parser.parse_args()

    if not args.oauth_token or all([args.user, args.password]):
        print("Github OAuth token or username and password required.")
        sys.exit(1)

    github.weekly_organization_stats(
        args.orgs,
        user=args.user,
        password=<PASSWORD>,
        oauth_token=args.oauth_token,
        ignore_inactive_users=args.ignore_inactive_users,
        start_date=args.start_date
    )
<file_sep>import ez_setup
ez_setup.use_setuptools()

from setuptools import setup, find_packages

DEPENDENCYLINKS = []
REQUIRES = []

setup(
    name='orgalytics',
    description='Github Contribution for Organizations',
    keywords='github',
    version="0.0.1",
    author='<NAME>',
    author_email='<EMAIL>',
    dependency_links=DEPENDENCYLINKS,
    install_requires=REQUIRES,
    entry_points={
        'console_scripts': [
            'orgalytics=orgalytics.entry_points:start'
        ]
    },
    tests_require=['tox'],
    packages=find_packages(exclude=['bin', 'ez_setup']),
    include_package_data=True,
    namespace_packages=['orgalytics'],
    license='Apache License (2.0)',
    classifiers=["Programming Language :: Python"],
    url='http://github.com/calebgroom/orgalytics'
)
<file_sep># Use pip to install these requirements before installing waldo:
# pip install -r requirements.txt
#
# Note - uncomment the following line to have this also install waldo
# (Note the relative directory, must run pip from the correct relative directory.)
#-e ./
#
arrow>=0.4.2
bottle>=0.12.5
GitPython>=0.3.1
keyring==3.8
<file_sep># Copyright (c) 2014 <NAME>
# All Rights Reserved.
#    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. See the
#    License for the specific language governing permissions and limitations
#    under the License.

import arrow
import github3

def weekly_organization_stats(organization_names, user=None, password=<PASSWORD>,
                              oauth_token=None, ignore_inactive_users=False,
                              start_date=None):
    """Print weekly summary data for all repos in organizations."""
    if oauth_token:
        github_client = github3.login(token=oauth_token)
    else:
        github_client = github3.login(user, password=<PASSWORD>)
    weeks = {}

    ignore_before = None
    if start_date and len(start_date) == 10:
        ignore_before = arrow.get(start_date)

    for organization_name in organization_names:
        organization = github_client.organization(organization_name)

        for repo in organization.iter_repos():
            print("Looking at %s/%s" % (organization_name, repo.name))
            for contrib in repo.iter_contributor_statistics():
                user = contrib.author.login
                for week_data in contrib.weeks:
                    week = week_data['w']
                    if not week in weeks:
                        weeks[week] = {}
                    if user not in weeks[week]:
                        weeks[week][user] = {'a': week_data['a'],
                                             'c': week_data['c'],
                                             'd': week_data['d']}
                    else:
                        weeks[week][user]['a'] += week_data['a']
                        weeks[week][user]['c'] += week_data['c']
                        weeks[week][user]['d'] += week_data['d']

    for week in sorted(weeks.keys()):

        week_timestamp = arrow.get(week)
        if ignore_before and week_timestamp < ignore_before:
            continue

        print("\nWeek beginning %s" % week_timestamp.format('YYYY-MM-DD'))
        for user in sorted(weeks[week].keys()):
            user_data = weeks[week][user]
            contributions = [user_data['c'], user_data['a'], user_data['d']]

            if ignore_inactive_users and not any(contributions):
                continue

            row_format = "    {:<20}      {} commits (+{}, -{})"
            print row_format.format(
                user, user_data['c'], user_data['a'], user_data['d'])
<file_sep># orgalytics - Github Organization Analytics

## Usage

```
 $ orgalytics --user your_github_user --password <PASSWORD> org1 org2
```

## Install

```
 $ git clone https://github.com/calebgroom/orgalytics.git
 $ cd orgalytics
 $ sudo pip install requirements.txt
 $ sudo python setup.py install
```

languages: Markdown Text Python

repo_name: calebgroom/orgalytics