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
""" | |
dots w159h119 | |
""" | |
import sys | |
import sqlite3 | |
from itertools import cycle | |
dpi = 203 | |
w_dots = int(160*dpi/72) |
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
#!/usr/bin/env python | |
# coding: utf-8 | |
""" | |
Messenger history analyzer and plotter | |
Short script to analyze past messages and create stackplot from them over time | |
USAGE | |
1. Download facebook data in json format | |
2. `cd` to facebook-your-name/messages |
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
from decimal import Decimal | |
def postal_code_gen(min_code, max_code): | |
""" | |
>>> list(postal_code_gen("79-995", "80-003")) | |
["79-996", "79-997", "79-998", "79-999", "80-000", "80-001", "80-002"] | |
""" | |
# Napisanie generatora prosiło się o napisanie generatora który używa yield a nie zwraca listy | |
min_num = int(min_code.replace("-", "")) | |
max_num = int(max_code.replace("-", "")) |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#include <math.h> | |
int random(int min, int max) | |
{ | |
int tmp; | |
if (max>=min) | |
max-= min; |
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
#include <stdio.h> | |
#include <stdlib.h> | |
struct person { | |
char given_name[20]; | |
char surname[20]; | |
unsigned int age; | |
long unsigned pesel; | |
}; |
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
/* example10-3.c */ | |
#include <stdlib.h> | |
#include <stdio.h> | |
/* https://www.eskimo.com/~scs/cclass/int/sx9b.html */ | |
void print_matrix(float **M, int n, int m) { | |
int i,j; | |
for (i=0; i<n; 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
/* example8-2.c */ | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <time.h> | |
#include <assert.h> | |
#include <math.h> | |
void printVector(int* a, int n) | |
{ | |
int 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <ctype.h> | |
#include <assert.h> | |
//USING C98 standard | |
const float PI = 3.14; |
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
#include <stdio.h> | |
#include <string.h> | |
#include <ctype.h> | |
int main() | |
{ | |
char word[80]; | |
int i,n; | |
printf("This program converts words to lower case.\n"); | |
printf("Please write a word: "); |
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
#include <stdio.h> | |
int main() | |
{ | |
float cel, fah; | |
float low_b = 0., up_b = 300., step = 20.; | |
printf("Provide lower bound:"); | |
scanf("%f", &low_b); |
NewerOlder