This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def __init__(self): | |
| logger.info('Setting up chrome web driver.') | |
| chrome_options = webdriver.ChromeOptions() | |
| chrome_options.add_argument("--headless") | |
| chrome_options.add_argument("--no-sandbox") | |
| chrome_options.add_argument("window-size=1400,2100") | |
| chrome_options.add_argument('--disable-gpu') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM python:3.7 | |
| RUN apt-get update | |
| RUN apt-get install -y gconf-service libasound2 libatk1.0-0 libcairo2 libcups2 libfontconfig1 libgdk-pixbuf2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libxss1 fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils | |
| #download and install chrome | |
| RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | |
| RUN dpkg -i google-chrome-stable_current_amd64.deb; apt-get -fy install | |
| #install python dependencies |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Dockerfile | |
| # Stage 1 | |
| FROM microsoft/dotnet:2.2-sdk AS builder | |
| WORKDIR /source | |
| # caches restore result by copying csproj file separately | |
| COPY *.csproj . | |
| # COPY NuGet.Config . | |
| RUN dotnet restore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ Scheduler URLs """ | |
| from django.conf.urls import url | |
| from rest_framework.urlpatterns import format_suffix_patterns | |
| from . views import SchedulerView | |
| from . scheduler import Scheduler | |
| urlpatterns = { | |
| url(r'^', SchedulerView.as_view(), name='scheduler') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ Scheduler Singleton """ | |
| import sched | |
| import time | |
| import datetime | |
| import threading | |
| import logging | |
| from multiprocessing import Process, log_to_stderr | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mvn archetype:generate -DgroupId=com.test.app -DartifactId=test-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Project name (artifact name in Maven) | |
| name := "(project name)" | |
| // orgnization name (e.g., the package name of the project) | |
| organization := "com." | |
| version := "1.0-SNAPSHOT" | |
| // project description | |
| description := "(project description)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Unit] | |
| Description=vault server | |
| Requires=network-online.target | |
| After=network-online.target consul.service | |
| [Service] | |
| EnvironmentFile=-/etc/sysconfig/vault | |
| Restart=on-failure | |
| ExecStart=/usr/local/sbin/vault server $OPTIONS -config=/etc/vault.d | |
| ExecStartPost=/bin/bash -c "for key in $KEYS; do /usr/local/sbin/vault unseal $CERT $key; done" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| scala> class Foo { self: Singleton => } | |
| defined class Foo | |
| scala> class Bar extends Foo | |
| <console>:12: error: illegal inheritance; | |
| self-type Bar does not conform to Foo's selftype Foo with Singleton | |
| class Bar extends Foo | |
| ^ | |
| scala> object Bar extends Foo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import akka.actor.ActorSystem | |
| import akka.event.{Logging, LoggingAdapter} | |
| import akka.http.scaladsl.Http | |
| import akka.http.scaladsl.client.RequestBuilding | |
| import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._ | |
| import akka.http.scaladsl.marshalling._ | |
| import akka.http.scaladsl.model._ | |
| import akka.http.scaladsl.model.StatusCodes._ | |
| import akka.http.scaladsl.server.Directives | |
| import akka.http.scaladsl.server.Directives._ |
NewerOlder