Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TensorFlow;
namespace MachineLearning
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Text;
public class MappingExample
{
private const string UniprotServer = "https://www.uniprot.org/";
@pgsin
pgsin / MappingProgram.cs
Created July 17, 2018 23:43
Mapping database identifiers
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Text;
public class MappingExample
{
private const string UniprotServer = "https://www.uniprot.org/";
using System;
namespace CombinatoricsLib
{
public class Combinations
{
private static ulong Factorial(int x, int until = 0)
{
ulong res = 1;
while (x != until)
BenchmarkDotNet=v0.10.14, OS=Windows 10.0.16299.371 (1709/FallCreatorsUpdate/Redstone3)
Intel Core i7-7820HQ CPU 2.90GHz (Kaby Lake), 1 CPU, 8 logical and 4 physical cores
Frequency=2835937 Hz, Resolution=352.6171 ns, Timer=TSC
  [Host]     : .NET Framework 4.7.1 (CLR 4.0.30319.42000), 32bit LegacyJIT-v4.7.2633.0
  Job-JWVBYN : .NET Framework 4.7.1 (CLR 4.0.30319.42000), 32bit LegacyJIT-v4.7.2633.0

Runtime=Clr  IsBaseline=True  
>polyA_1
AAAAAAAAAAAAAAAAAAA
@pgsin
pgsin / commands.sh
Last active February 14, 2018 17:12
ffmpeg -i input_video.mp4 -ss 00:00:30 -to 00:00:40 -c:v copy cropped.mp4
convert -depth 8 -resize 50% -background none plate.svg plate.png
ffmpeg -i cropped.mp4 -i plate.png -filter_complex "overlay=0:446:enable=between(t\,1\,9)" plated.mp4
ffmpeg -i plated.mp4 -vf drawtext="fontfile=Arial.ttf: text='Everything is empty, all lies, except this infinite sky': fontcolor=black: fontsize=12: x=200: y=476" result.mp4
@pgsin
pgsin / math.exp.test.md
Last active October 16, 2017 15:06
Implementations of Math.Exp() and Math.Log() differ between OSes

I used Mono C# compiler version 5.2.0.0

mcs Program.cs

of this code

using System;

namespace Test {
    public class Program {
using System;
namespace FloatFloatTest {
class Program {
static void Main() {
float first = BitConverter.ToSingle(BitConverter.GetBytes(0x4540FDA8), 0);
float second = BitConverter.ToSingle(BitConverter.GetBytes(0x3E19A9C4), 0);
Console.WriteLine(BitConverter.ToString(BitConverter.GetBytes(first)) + " | " + first);
Console.WriteLine(BitConverter.ToString(BitConverter.GetBytes(second)) + " | " + second);
import requests
import json
import pandas as pd
import os
from IPython.display import display, HTML
pd.set_option("display.max_rows",10)
base_dir = "C:/Users/Pavel/Documents/Projects/hipsci/data/"
base_url = "http://www.hipsci.org/lines/api/cellLine/"