Skip to content

Instantly share code, notes, and snippets.

"""
dots w159h119
"""
import sys
import sqlite3
from itertools import cycle
dpi = 203
w_dots = int(160*dpi/72)
#!/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
@not7cd
not7cd / ansta.py
Last active February 6, 2019 14:54
Recrutiment task
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("-", ""))
#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;
#include <stdio.h>
#include <stdlib.h>
struct person {
char given_name[20];
char surname[20];
unsigned int age;
long unsigned pesel;
};
/* 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++)
{
/* 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;
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <assert.h>
//USING C98 standard
const float PI = 3.14;
#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: ");
@not7cd
not7cd / lab3-1.c
Last active March 14, 2018 15:23
Laboratorium 3
#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);