Skip to content

Instantly share code, notes, and snippets.

View vladtsf's full-sized avatar

Vlad Tsvang vladtsf

View GitHub Profile
#!/usr/bin/env python # [1]
"""\
The game of snake [2]
Dependencies: pygame [3]
Usage: snake.py
"""
import pygame
import sys
import random
[
{
"id": 0,
"name": "New York Stock Exchange",
"closeUtc": "21:00",
"openUtc": "14:30",
"lunchCloseLocal": null,
"lunchOpenLocal": null,
"timeZoneName": "EST/EDT",
"utcDelta": -5
version: '3'
services:
minecraft:
ports:
- "25565:25565"
- "25575:25575"
volumes:
- "mcbig:/data"
environment:
a = []
a[0] = -1
a[1] = 3
a[2] = -4
a[3] = 5
a[4] = 1
a[5] = -6
a[6] = 2
a[7] = 1
class Node {
constructor(data = null, next = null) {
this.data = data
this.next = next
}
}
function reverse() {
let tmp = null, prev = null
// f - function
// lo - left limit
// hi - right limit
// tol - tolerance
// val - y-coordinate of the searched point
function bisection(f, lo, hi, tol, val) {
function sign(a) {
return a < 0 ? false : true
}
document.createElement("detect").style.pointerEvents === ""
Vladimirs-MacBook-Pro:grunt-newer tsvang$ npm install -g coffee-script
npm http GET https://registry.npmjs.org/coffee-script
npm http 304 https://registry.npmjs.org/coffee-script
npm http GET https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/mkdirp
/Users/tsvang/.nvm/v0.10.26/bin/coffee -> /Users/tsvang/.nvm/v0.10.26/lib/node_modules/coffee-script/bin/coffee
/Users/tsvang/.nvm/v0.10.26/bin/cake -> /Users/tsvang/.nvm/v0.10.26/lib/node_modules/coffee-script/bin/cake
npm WARN unmet dependency /Users/tsvang/.nvm/v0.10.26/lib/node_modules/grunt requires coffee-script@'~1.3.3' but will load
npm WARN unmet dependency /Users/tsvang/.nvm/v0.10.26/lib/node_modules/coffee-script,
npm WARN unmet dependency which is version 1.7.1
CollectionView = require 'views/base/collection-view'
RejectedStatisticsItem = require 'views/rejected-statistics-item-view'
PaginationView = require 'views/pagination-view'
module.exports = class RejectedStatisticsIndexesView extends CollectionView
animationDuration: 0
listSelector: '> table > tbody'
autoRender: true
itemView: RejectedStatisticsItem
template: require './templates/rejected-statistics-index'
ul.nav.nav-pills
//- переменную табс вынести во вьюху и передавать через getTemplateData
//- либо всё вынести в отдельную вьюху и рендерить как регион вьюхи RejectedStatisticsIndex
tabs = [{type: "address", title: "Adresses"},{type: "channel", title: "Channels"},{type: "reason", title: "Reasons"},{type: "player-version", title: "Player versions"}]
each tab in tabs
li(class=tab.type === type ? "active" : "")
a(href="/rejected-statistics/#{tab.type}")= tab.title
table.table