Skip to content

Instantly share code, notes, and snippets.

View vporoshok's full-sized avatar
🦆
The duck-painter's decided to drink to go the bar

Bastrykov Evgeniy vporoshok

🦆
The duck-painter's decided to drink to go the bar
View GitHub Profile
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int mkdstr(char **, int (*)(void));
int main() {
int no = 0;
int len;
int max_no;
#!/bin/env python
# -*- coding: utf-8 -*-
from timeit import timeit
class Fib:
def __init__(self, end):
self.a = 0
self.b = 1
@vporoshok
vporoshok / tox.ini
Created August 28, 2014 07:08
My tox.ini with tests, coverage, flake8 and pylint (default without refactory, docstring check and review, use `tox -e refactory` to see how you can get better code)
[tox]
envlist = flake8,pylint,py27,coverage
skipsdist = True
[tox:hudson]
downloadcache = {toxworkdir}/_download
[testenv:flake8]
deps = flake8
@vporoshok
vporoshok / iblockUpdate
Last active August 29, 2015 14:13
mass update iblock elements
<?php
CModule::IncludeModule('iblock');
$rsElements = CIBlockElement::GetList([
'NAME' => 'DESC'
], [
'IBLOCK_ID' => 13,
'SECTION_ID' => 80
]);
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from __future__ import print_function
def has_sum(x, S):
i = 0
j = len(S) - 1
while i < j:
<a class="feedback" href="#feedback-modal" data-toggle="modal">Задать вопрос</a>
<div id="feedback-modal" class="modal fade" aria-hidden="true" aria-labelledby="myModalLabel" role="dialog" tabindex="-1">
<div style="max-width: 530px;" class="modal-dialog modal-lg">
<div class="modal-content">
<button aria-label="Close" data-dismiss="modal" class="close" type="button">
<span aria-hidden="true">X</span>
</button>
<div class="row feedback_popup">
<p class="promise">Заполните эту простую форму и наш менеджер ответит на вопрос в течение суток</p>
<p class="result"><?= $FORM->ShowResultStatus("") ?></p>
@vporoshok
vporoshok / udc-promo.md
Last active September 15, 2015 06:42
udsu dev club promo

UdSU dev club

Клуб для тех кому нравится программирование и кто хочет узнать про него больше. В рамках клуба планируются встречи примерно раз в неделю, где мы будем пробовать различные языки программирования, разбирать классические алгоритмы, вместе изучать классические и не очень книги. Это не обязательные занятия и даже не факультатив, это клуб по интересам.

Keywords: SICP, FP, algorithm, rust, lisp, python, js

@vporoshok
vporoshok / ng-site.j2
Created November 13, 2015 07:58
nginx config
server {
listen 80;
server_name {{ hostname }};
access_log /var/log/nginx/{{ project }}.access.log;
error_log /var/log/nginx/{{ project }}.error.log;
client_max_body_size 100m;
keepalive_timeout 180;
@vporoshok
vporoshok / dependency_graph.ipynb
Created December 29, 2015 07:24
Dependency graph
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
package quicksort
func breakpoint(a []int) int {
return a[len(a)/2]
}
func split(a []int, b int) int {
L, R := 0, len(a)-1
for {