Skip to content

Instantly share code, notes, and snippets.

View pimiento's full-sized avatar

Pavel pimiento

View GitHub Profile
@pimiento
pimiento / fastcgi.conf
Created April 25, 2014 12:46
fastcgi.conf
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
(define (deriv exp var)
(define (variable? x)
(symbol? x))
(define (same-variable? v1 v2)
(and (variable? v1) (variable? v2) (eq? v1 v2)))
(define (=number? exp num)
(and (number? exp) (= exp num)))
(define (make-sum a1 a2)
(cond ((=number? a1 0) a2)
((=number? a2 0) a1)
#!/bin/bash
grep "debug triad" | cut -d " " -f 3,31 | swapcol | sort | joinlines

Домашнее задание №1

# Defines all Languages known to GitHub.
#
# type - Either data, programming, markup, prose, or nil
# aliases - An Array of additional aliases (implicitly
# includes name.downcase)
# ace_mode - A String name of the Ace Mode used for highlighting whenever
# a file is edited. This must match one of the filenames in http://git.io/3XO_Cg.
# Use "text" if a mode does not exist.
# wrap - Boolean wrap to enable line wrapping (default: false)
# extensions - An Array of associated extensions (the first one is
sr = 44100
kr = 4410
ksmps = 10
nchnls = 1
instr 120
idur = p3
iamp = ampdb(p4)
ifrq = cpspch(p5)
ifun = p6
;Function 1 uses the GEN10 subroutine to compute a sine wave
;Function 2 uses the GEN10 subroutine to compute the first sixteen partials of a sawtooth wave
;Function 8 uses the GEN05 subroutine to compute an exponential ADSR envelope function
;Function 9 uses the GEN05 subroutine to compute an exponential Attack for use with envlpx
;Function 10 uses the GEN05 subroutine to compute an exponential Attack for use with envlpx
;Function 11 uses the GEN01 subroutine to read in an AIF audio file "piano.aif"
;Function 12 uses the GEN01 subroutine to read in an AIF audio file "marimba.aif"
;Function 13 uses the GEN01 subroutine to read in an AIF audio file "brass.aif.aif"
;Function 14 uses the GEN01 subroutine to read in an AIF audio file "violin.aif"
;Function 15 uses the GEN05 subroutine to compute an exponential ADSR envelope function
class OnlyOnce(object):
class __OnlyOnce(object):
def __init__(self):
with open('/tmp/test.txt', 'a') as t:
t.write("new line\n")
def lines(self):
with open('/tmp/test.txt', 'r') as t:
return t.readlines()
instance = None
#!/usr/bin/python
# -*- coding: utf-8 -*-
from single import OnlyOnce
from tester import test
def check():
print(len(test.lines()))
data = OnlyOnce()
print(len(data.lines()))
from single import OnlyOnce
test = OnlyOnce()