This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# fib(0) = 0 | |
# fib(1) = 1 | |
# fib(n) = fib(n-1) + fib(n-2) | |
fib_numbers = [0, 1] # dwie pierwsze liczby fib, czyli fib(0) i fib(1) | |
def fast_fib(n): | |
# jesli n jest mniejsze od liczby numerow w liscie | |
# to znaczy, ze znamy juz fib(n) bo mamy je w liscie |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def wypisz_sume(a, b, c): | |
suma = a + b + c | |
print("suma liczb", a, "+", b, "+", c, "wynosi", suma) | |
wypisz_sume(5, 6, 7) | |
wypisz_sume(1, 7, 9) | |
def policz_sume(liczby): | |
print("dodajemy liczby:", liczby) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#http://unix.stackexchange.com/questions/33450/checking-if-hyperthreading-is-enabled-or-not/33509#33509 | |
CPUFILE=/proc/cpuinfo | |
test -f $CPUFILE || exit 1 | |
NUMPHY=`grep "physical id" $CPUFILE | sort -u | wc -l` | |
NUMLOG=`grep "processor" $CPUFILE | wc -l` | |
if [ $NUMPHY -eq 1 ] | |
then | |
echo This system has one physical CPU, | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Base(object): | |
@classmethod | |
def start(cls): | |
cls.init_suite() | |
@classmethod | |
def init_suite(cls): | |
print "Base::init_suite()" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SEQUENTIAL | |
CQL(1000)|SELECT * FROM demo.geo WHERE solr_query='*:*' LIMIT 10; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<!-- | |
======= | |
Copyright DataStax, Inc. | |
Please see the included license file for details. | |
--> | |
<!-- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
======= | |
Copyright DataStax, Inc. | |
Please see the included license file for details. | |
--> | |
<!-- | |
For more details about configurations options that may appear in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<!-- | |
======= | |
Copyright DataStax, Inc. | |
Please see the included license file for details. | |
--> | |
<!-- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SEQUENTIAL | |
HTTPREAD|wt=json&rows=0&useFieldCache=true&q=*:*&facet=true&facet.field=country&facet.limit=100&fq=country:A* | |
HTTPREAD|wt=json&rows=0&useFieldCache=true&q=*:*&facet=true&facet.field=country&facet.limit=100&fq=country:B* | |
HTTPREAD|wt=json&rows=0&useFieldCache=true&q=*:*&facet=true&facet.field=country&facet.limit=100&fq=country:C* | |
HTTPREAD|wt=json&rows=0&useFieldCache=true&q=*:*&facet=true&facet.field=country&facet.limit=100&fq=country:D* | |
HTTPREAD|wt=json&rows=0&useFieldCache=true&q=*:*&facet=true&facet.field=country&facet.limit=100&fq=country:E* | |
HTTPREAD|wt=json&rows=0&useFieldCache=true&q=*:*&facet=true&facet.field=country&facet.limit=100&fq=country:F* | |
HTTPREAD|wt=json&rows=0&useFieldCache=true&q=*:*&facet=true&facet.field=country&facet.limit=100&fq=country:G* | |
HTTPREAD|wt=json&rows=0&useFieldCache=true&q=*:*&facet=true&facet.field=country&facet.limit=100&fq=country:H* | |
HTTPREAD|wt=json&rows=0&useFieldCache=true&q=*:*&facet=true&facet.field=country&facet.limit=100&fq=country:I* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<!-- | |
======= | |
Copyright DataStax, Inc. | |
Please see the included license file for details. | |
--> | |
<!-- |
NewerOlder