Skip to content

Instantly share code, notes, and snippets.

View szolotykh's full-sized avatar
😀

Sergey Zolotykh szolotykh

😀
View GitHub Profile
@szolotykh
szolotykh / twitter-post.py
Created January 29, 2015 16:52
Script post on twitter message and image with tweepy
import tweepy
import os
# Consumer keys and access tokens, used for OAuth
consumer_key = ''
consumer_secret = ''
access_token = ''
access_token_secret = ''
# OAuth process, using the keys and tokens
@szolotykh
szolotykh / twitter-stream.py
Created January 29, 2015 16:55
Script streams posts from twitter with tweepy
import tweepy
import os
import json
# Consumer keys and access tokens, used for OAuth
consumer_key = ''
consumer_secret = ''
access_token = ''
access_token_secret = ''
@szolotykh
szolotykh / AStar.py
Last active February 25, 2020 19:07
Implementation A* in python
def AStar(problem):
closedset = list()
openset = list()
came_from = dict()
g_score = dict()
f_score = dict()
goal = problem.getGoal()
start = problem.getStart()
g_score[start] = 0
@szolotykh
szolotykh / Check.cpp
Created September 19, 2015 02:56
Check.cpp
#include <iostream>
#include <functional>
class P
{
public:
std::function<void(int)> check = [this](int a)
{
std::cout << "Check 1: " << a << "\n";
check = [this](int a)
@szolotykh
szolotykh / FT232H_GPIO.cpp
Created March 12, 2019 02:26
FT232H GPOI example (Windows)
#include <windows.h>
#include <iostream>
#include <chrono>
#include <thread>
#include "libMPSSE_i2c.h"
using namespace std;
@szolotykh
szolotykh / CString.cpp
Created June 28, 2019 23:57
CString Split C++
#include <string>
#include <sstream>
#include <iostream>
#include <vector>
#include "cstring.h"
using namespace std;
void CString::split(std::vector<CString>& strings)