Skip to content

Instantly share code, notes, and snippets.

import numpy as np
import pylab as pl
x = np.random.uniform(1, 100, 1000)
y = np.log(x) + np.random.normal(0, .3, 1000)
pl.scatter(x, y, s=1, label="log(x) with noise")
pl.plot(np.arange(1, 100), np.log(np.arange(1, 100)), c="b", label="log(x) true function")
pl.xlabel("x")
pl.ylabel("f(x) = log(x)")
@sandeepk17
sandeepk17 / DockerFile_app
Created March 8, 2018 20:00 — forked from satendra02/app.DockerFile
docker+rails+puma+nginx+postgres (Production ready)
FROM ruby:2.3.1
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
# Configuring main directory
RUN mkdir -p /app_name
WORKDIR /app_name
# Setting env up
ENV RAILS_ENV='production'
ENV RAKE_ENV='production'
@sandeepk17
sandeepk17 / Jenkinsfile
Created May 6, 2018 18:03 — forked from chinshr/Jenkinsfile
Best of Jenkinsfile, a collection of useful workflow scripts ready to be copied into your Jenkinsfile on a per use basis.
#!groovy
# Best of Jenkinsfile
# `Jenkinsfile` is a groovy script DSL for defining CI/CD workflows for Jenkins
node {
}
@sandeepk17
sandeepk17 / Jenkinsfile
Created July 19, 2018 15:20 — forked from jonico/Jenkinsfile
Example for a full blown Jenkins pipeline script with multiple stages, input steps, injected credentials, heroku deploy, sonarqube and artifactory integration, multiple Git commit statuses, PR merge vs branch build detection, REST API calls to GitHub deployment API, stage timeouts, stage concurrency constraints, ...
#!groovy
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
/*
Please make sure to add the following environment variables:
HEROKU_PREVIEW=<your heroku preview app>
HEROKU_PREPRODUCTION=<your heroku pre-production app>
HEROKU_PRODUCTION=<your heroku production app>
@sandeepk17
sandeepk17 / gitlab-to-bitbucket.py
Created February 25, 2019 08:21 — forked from danhper/gitlab-to-bitbucket.py
Script to migrate repositories from GitLab to Bitbucket
import os
import re
import subprocess
import requests
GITLAB_ENDPOINT = os.environ["GITLAB_ENDPOINT"]
GITLAB_TOKEN = os.environ["GITLAB_TOKEN"]
@sandeepk17
sandeepk17 / Vagrantfile
Created October 10, 2020 16:08 — forked from mschirbel/Vagrantfile
vagrant file for ansible
Vagrant.configure("2") do |config|
servers=[
{
:hostname => "database",
:box => "centos/7",
:ip => "192.168.56.101",
:ssh_port => '2210'
},
{
:hostname => "webserver-1",
@sandeepk17
sandeepk17 / LearnGoIn5mins.md
Created January 24, 2021 19:02 — forked from prologic/LearnGoIn5mins.md
Learn Go in ~5mins