Skip to content

Instantly share code, notes, and snippets.

View piotrbla's full-sized avatar
🏠
Working from home

PiotrB piotrbla

🏠
Working from home
View GitHub Profile
#include <iostream>
#include <fstream>
#include <map>
#include <iterator>
#include <string>
#include <vector>
using namespace std;
int main() {
@piotrbla
piotrbla / keybase.md
Created July 16, 2019 17:38
keybase.md

Keybase proof

I hereby claim:

  • I am piotrbla on github.
  • I am piotrbla (https://keybase.io/piotrbla) on keybase.
  • I have a public key ASBpxdkznrNICUh0nWr5lqXNgJZHpigAsRhLifmk0c7ACAo

To claim this, I am signing this object:

%{
#include <stdio.h>
#include "y.tab.h"
%}
%%
\=\= {return EQ;}
\!\= {return NEQ;}
\<\= {return LEQ;}
\>\= {return GEQ;}
\< {return '>';}
with open('streamy.html', 'w') as f:
for s in streams:
if s["category"]:
value = "<a href=""{3}""> {0}: {1} {2}</a><br>\n".format(s["title"].text, s["category"].text, s["time"].text, s["url"])
#print(value)
f.write(value)
else:
value = "<a href=""{2}""> {0} {1}</a><br>\n".format(s["title"].text, s["time"].text, s["url"])
#print(value)
f.write(value)
import logging
logging.basicConfig(
level=logging.DEBUG,
format='%(asctime)s %(levelname)-7s %(message)s',
datefmt='[%d-%m-%Y %H:%M:%S]',
filename='sorting.txt',
filemode='w'
)
logging.info("Coś tam")
from random import choice
part1 = [x for x in range(1, 15)]
part2 = [x for x in range(16, 34)]
part3 = [x for x in range(35, 53)]
print(choice(part1))
print(choice(part2))
print(choice(part3))
#include <iostream>
#include <windows.h>
#include <stdio.h>
void printColors(HANDLE hWnd)
{
for (auto i = 0; i < 16; i++)
{
for (auto j = 0; j < 16; j++)
{
@piotrbla
piotrbla / lambdziwo.cpp
Last active August 29, 2015 14:11
Lamdziwo w cpp lambda c++
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
using namespace std;
template <typename T>
class Bucket {
T value;
public:
Bucket() {}
@piotrbla
piotrbla / 0_reuse_code.js
Created June 4, 2014 09:08
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
#include <amp.h>
#include <iostream> // For std::cout etc
#include <sys\timeb.h>
using namespace concurrency; // Save some typing :)
using std::vector; // Ditto. Comes from <vector> brought in by amp.h
void perform_calculation(vector<int>& vA, vector<int>& vB, vector<int>& vC, int M, int N)
{
extent<2> e(M, N);