Skip to content

Instantly share code, notes, and snippets.

View shubham90's full-sized avatar
👋

Shubham Bhawsinka shubham90

👋
View GitHub Profile
@shubham90
shubham90 / Dockerfile
Last active January 11, 2024 16:22
Dotnet restore in docker build with private Azure artifacts feed(dotnet sdk >2.1.500 )
# downloading the dotnet sdk image. Could be any docker sdk image with sdk > 2.1.500
FROM microsoft/dotnet:2.1-sdk AS dotnet-builder
ARG FEED_URL
ARG PAT
# download and install latest credential provider. Not required after https://github.com/dotnet/dotnet-docker/issues/878
RUN wget -qO- https://raw.githubusercontent.com/Microsoft/artifacts-credprovider/master/helpers/installcredprovider.sh | bash
#Optional
WORKDIR /workdir
{% extends "base.html" %}
{% block title %}
New Contest
{% endblock %}
{% block extracss %}
<style type="text/css">
.checkbox {
margin-bottom: 20px;
@shubham90
shubham90 / scheduler.py
Created June 16, 2015 19:06
Tick alternate implementation
def tick(self):
"""
Superclass runs a tick, that is one iteration of the scheduler. Executes
all due tasks.
This method adds a call to trim the failure watcher and updates the
last heartbeat time of the scheduler. We do not actually send a
heartbeat message since it would just get read again by this class.
:return: number of seconds before the next tick should run
from numpy import loadtxt, where, zeros, e, array, log, ones, append, linspace
from pylab import scatter, show, legend, xlabel, ylabel, contour, title
from scipy.optimize import fmin_bfgs
def sigmoid(X):
'''Compute the sigmoid function '''
#d = zeros(shape=(X.shape))
den = 1.0 + e ** (-1.0 * X)
def sigmoid(X):
'''Compute the sigmoid function '''
#d = zeros(shape=(X.shape))
den = 1.0 + e ** (-1.0 * X)
d = 1.0 / den
return d