Skip to content

Instantly share code, notes, and snippets.

View kyrcha's full-sized avatar

Kyriakos Chatzidimitriou kyrcha

View GitHub Profile
@kyrcha
kyrcha / README.md
Last active January 11, 2017 15:21
Deploying a node app with flightplan

Complete guide on how to deploy a node app in an Ubuntu server using flightplan can be found here:

@kyrcha
kyrcha / README.md
Created December 17, 2017 18:50
Deep Learning with Python and Anaconda

Instructions of how to set-up environments etc.

@kyrcha
kyrcha / README.md
Last active August 21, 2018 16:40
Spin mongodb with mongo express using docker compose

Accessible from the web: http://hostname:8081 through mongo-express and you can connect with a mongodb client like robo 3T in hostname:27017.

To run:

docker-compose -f mongo.yml up

@kyrcha
kyrcha / anaconda.md
Last active January 3, 2019 12:56
Anaconda commands

Checkout all the packages in the default conda environment:

conda list

Upgrading conda and packages:

conda upgrade conda
conda upgrade --all

Installing packages examples:

@kyrcha
kyrcha / .cyclopt.json
Last active March 19, 2019 12:08
Configure your .cyclopt.json to ignore files and folders. This is what we use as our basis. Supports minimatch patterns https://github.com/isaacs/minimatch#usage
{
"ignore": [
"**/deps/**",
"**/node_modules/**",
"**/thirdparty/**",
"**/third_party/**",
"**/bower_components/**",
"**/vendor/**",
"**/vendors/**",
"**/**-min-**",
@kyrcha
kyrcha / .editorconfig
Created April 12, 2019 07:13
My editor config file for Visual Studio Code. Put it in the root of your project. Go to the preferences of VSC > Keyboard Shortcuts. Search for document format shorcut. Open a file. Use that shorcut and your document should be formatted.
# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
@kyrcha
kyrcha / zipballs-downloader.js
Last active June 11, 2019 10:29
Downloading tarballs (or zipballs) using JavaScript async/await, the `Get archive link` of the GitHub Contents API, the octokit/rest.js client and the request library
const Octokit = require('@octokit/rest')
const rp = require('request-promise')
const fs = require('fs')
function sleep (ms) {
return new Promise(resolve => setTimeout(resolve, ms))
}
const baseUrl = 'https://api.github.com'
const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN })
@kyrcha
kyrcha / graphqlclient.go
Last active October 14, 2019 22:39
Performing GraphQL queries (to GiHub) using the barebones http.Client in Go
package main
import (
"context"
"encoding/json"
"fmt"
"net/http/httputil"
"os"
"strings"
@kyrcha
kyrcha / sigmoid.R
Last active November 26, 2019 08:13
Fitting a sigmoind curve in R
# function needed for visualization purposes
sigmoid = function(params, x) {
params[1] / (1 + exp(-params[2] * (x - params[3])))
}
x = 1:53
y = c(0,0,0,0,0,0,0,0,0,0,0,0,0,0.1,0.18,0.18,0.18,0.33,0.33,0.33,0.33,0.41,
0.41,0.41,0.41,0.41,0.41,0.5,0.5,0.5,0.5,0.68,0.58,0.58,0.68,0.83,0.83,0.83,
0.74,0.74,0.74,0.83,0.83,0.9,0.9,0.9,1,1,1,1,1,1,1)
@kyrcha
kyrcha / CodRep-2019.md
Last active November 27, 2019 13:15
AuthEceSoftEng approach to CodRep-2019 competition

AuthEceSoftEng <> CodRep-2019

The Problem

The goal of the CodRep 2019 competition was to predict formatting errors in source code.

We were given 8000 Java files with one formatting error in each one and another file (out.txt) that contained the character position the formatting error existed. For example, in the snippet below, the error (unnecessary space) is found in position 30: