Skip to content

Instantly share code, notes, and snippets.

🕰
Focusing

Christo S. Christov ch-hristov

🕰
Focusing
Block or report user

Report or block ch-hristov

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:971481b545a39eede6868769220a9eba
-------Random forests------
[14, 6, 18, 17, 12, 3, 19, 1, 9, 15, 8, 2, 7, 4, 5, 0, 20, 11, 13, 10, 16]
Most important features are
000 of
00 no
03 and
00am think
00 worked
00 for
0800 despite
View gist:bcf417aa890cf11dc827178ed1745e3e
var plot = new PlotModel();
plot.Axes.Add(new OxyPlot.Axes.CategoryAxis());
plot.Axes.Add(new OxyPlot.Axes.CategoryAxis());
OxyPlot.Series.ScatterSeries s;
plot.Series.Add(s = new OxyPlot.Series.ScatterSeries());
s.Points.Add(new ScatterPoint() { X = 1, Y = 2 });
s.Points.Add(new ScatterPoint() { X = 3, Y = 3 });
View F.cpp
#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <vector>
#include <map>
#include <math.h>
using namespace std;
int arr[1000001];
View gist:e4c1bf4d62d2dcdae7def2d81dc45c17
try
{
using (var server = new NamedPipeServerStream(_identifier.ToString()))
using (var reader = new StreamReader(server))
{
server.WaitForConnection();
var arguments = new List<String>();
while (server.IsConnected)
arguments.Add(reader.ReadLine());
View gist:6389fb6eac4c040eee818dadf2dc1baa
//https://www.hackerrank.com/contests/25-years-nbu/challenges/gcd-6
#include "stdafx.h"
#include <vector>
#include <algorithm>
#include <math.h>
#include <iostream>
View gist:770558a47b26aebff7a9
var engine = Python.CreateEngine();
var scope = engine.CreateScope();
scope.SetVariable("mol", new SmilesParser());
string script = "import clr\nk = mol.ParseMolecule(\"CCCCCC\")\nr = k.Count";
ScriptSource ss = engine.CreateScriptSourceFromString(script);
ss.Execute(scope);
var variable = scope.GetVariable("r");
MessageBox.Show(variable.ToString());
@ch-hristov
ch-hristov / gist:a4a6ca3b384a06a18add
Created Nov 5, 2015
Split string by delimiter C++
View gist:a4a6ca3b384a06a18add
std::vector<std::string> split(const std::string &text, char sep) {
std::vector<std::string> tokens;
int start = 0, end = 0;
while ((end = text.find(sep, start)) != std::string::npos) {
tokens.push_back(text.substr(start, end - start));
start = end + 1;
}
tokens.push_back(text.substr(start));
return tokens;
}
@ch-hristov
ch-hristov / gist:c73299cef34ee29b01f5
Last active Oct 5, 2015
exponentiation by squaring
View gist:c73299cef34ee29b01f5
#include <iostream>
#include <cmath>
using namespace std;
int compute(int n,int exp){
if(exp==1)return n;
int r = exp % 2;
if(r) return compute(n*n,exp >> 1) * n;
View B
#include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#include <stdio.h>
#include <tuple>
#include <stack>
#include <queue>
using namespace std;
View cfD.cpp
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <string.h>
#include <ctime>
#include <iostream>
You can’t perform that action at this time.