This file contains hidden or 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
Выкачиваем pngquant, jpeg-archive и ставим ladon | |
git clone git://github.com/pornel/pngquant.git | |
git clone git://github.com/danielgtaylor/jpeg-archive | |
npm install -g ladon | |
Ставим зависимости для сборки (возможно есть ещё) | |
apt-get install nasm mozjpeg | |
Собираем и ставим в систему(выполнять в папках jpeg-archive и pngquant) |
This file contains hidden or 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 <algorithm> | |
#include <iostream> | |
#include <fstream> | |
#include <vector> | |
#include <cmath> | |
#include <bitset> | |
using namespace std; | |
std::vector<char> readFile(char* filename) { |
This file contains hidden or 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 <iostream> | |
#include <stdint.h> | |
#include <bitset> | |
#include <cmath> | |
#include <vector> | |
#include <fstream> | |
#include <sstream> | |
#include <string> | |
#define F(x, y, z) (((x) & (y)) | ((~x) & (z))) |
This file contains hidden or 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 <functional> // 1.1.7.28 | |
#include <algorithm> | |
#include <iostream> | |
#include <utility> | |
#include <string> | |
#include <vector> | |
#include <cmath> | |
typedef struct { | |
int ground, has_motor, four_wheel, electric; |
This file contains hidden or 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 <functional> // 1.1.7.28 | |
#include <algorithm> | |
#include <iostream> | |
#include <utility> | |
#include <string> | |
#include <vector> | |
#include <cmath> | |
typedef struct { | |
int wheels, passengers, size, power; |
This file contains hidden or 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 <functional> | |
#include <algorithm> | |
#include <iostream> | |
#include <utility> | |
#include <float.h> | |
#include <string> | |
#include <vector> | |
#include <cmath> | |
typedef struct { |
This file contains hidden or 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 expression | |
{ | |
private: | |
static double OREXPR(std::vector<std::string> exp) { | |
std::vector<std::string>::iterator op; | |
if ((op = std::find(exp.begin(), exp.end(), "or")) != exp.end()) { | |
double first = ANDEXPR(std::vector <std::string>(exp.begin(), op)); | |
double second = OREXPR(std::vector <std::string>(op + 1, exp.end())); | |
return first || second; | |
} |
This file contains hidden or 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
token tryFloat(std::string str) | |
{ | |
token result("INVALID", ""); | |
int state = 0; | |
for(auto x : str) | |
{ | |
switch(state) | |
{ | |
case 0: |
This file contains hidden or 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
token tryInt(std::string str) | |
{ | |
token result("INVALID", ""); | |
int state = 0; | |
for(auto x : str) | |
{ | |
switch(state) | |
{ | |
case 0: |
This file contains hidden or 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/python | |
from gi.repository import GObject | |
import dbus | |
from dbus.mainloop.glib import DBusGMainLoop | |
import datetime | |
import time | |
import pylast | |
class TinyScrobbler(): |