text:
<repo_name>tlundgren/kpaste<file_sep>/src/main/kotlin/ff/paste/kpaste/domain/KeyType.kt
package ff.paste.kpaste.domain

/**
 * Possible types of access keys include UserApplication, Application... Find more information
 * about key types at paste.ee.
 */
data class KeyType(
    val type: String
)<file_sep>/settings.gradle
rootProject.name = 'KPaste'

<file_sep>/src/main/kotlin/ff/paste/kpaste/domain/Syntax.kt
package ff.paste.kpaste.domain

/**
 * Tells paste.ee the structure a text conforms to.
 */

data class Syntax(
    val id: Int,
    val shortName: String,
    val name: String
)<file_sep>/src/main/kotlin/ff/paste/kpaste/domain/PasteDraft.kt
package ff.paste.kpaste.domain

/**
 * [PasteDraft]s are meant to be sent to paste.ee for pasting.
 */
data class PasteDraft(
    val isEncrypted: Boolean,
    val description: String,
    val sections: List

)<file_sep>/src/main/kotlin/ff/paste/kpaste/json/adapter/PasteAdapter.kt
package ff.paste.kpaste.json.adapter

import ff.paste.kpaste.json.Paste
import ff.paste.kpaste.domain.Paste as PasteDomain
import ff.paste.kpaste.domain.Section as SectionDomain

/**
 * Produces a domain [PasteDomain] from a json [Paste].
 */
internal fun Paste.asDomainObject(): PasteDomain {
    return PasteDomain(
        id,
        encrypted,
        description,
        views,
        created_at,
        expires_at,
        sections.map { section ->
            SectionDomain(section.id, section.syntax, section.name, section.contents)
        }
    )
}<file_sep>/src/main/kotlin/ff/paste/kpaste/json/DeletePaste.kt
package ff.paste.kpaste.json

/**
 * Document returned by delete request "pastes/id".
 */
internal data class DeletePaste(
    val success: Boolean
)<file_sep>/src/main/kotlin/ff/paste/kpaste/json/GetApplicationKey.kt
package ff.paste.kpaste.json

/**
 * Document returned by get request "users/authenticate".
 */
internal data class GetApplicationKey(
    val success: Boolean,
    val key: String
)<file_sep>/src/main/kotlin/ff/paste/kpaste/json/Credentials.kt
package ff.paste.kpaste.json

/**
 * Document body for a post request "users/authenticate".
 */
internal data class Credentials(
    val username: String,
    val password: String
)<file_sep>/src/main/kotlin/ff/paste/kpaste/json/adapter/GetSyntaxAdapter.kt
package ff.paste.kpaste.json.adapter

import ff.paste.kpaste.json.GetSyntax
import ff.paste.kpaste.domain.Syntax as SyntaxDomain
import com.squareup.moshi.FromJson

/**
 * Produces a domain [SyntaxDomain] from a json [GetSyntax].
 */
internal class GetSyntaxAdapter {
    @FromJson
    fun getSyntax(getSyntax: GetSyntax): SyntaxDomain {
        return getSyntax.syntax.asDomainObject()
    }
}<file_sep>/src/main/kotlin/ff/paste/kpaste/json/GetSyntax.kt
package ff.paste.kpaste.json

/**
 * Document returned by get request "syntaxes/id".
 */
internal data class GetSyntax(
    val syntax: Syntax,
    val success: Boolean
)<file_sep>/src/main/kotlin/ff/paste/kpaste/domain/Section.kt
package ff.paste.kpaste.domain

/**
 * [Section]s hold the actual contents of a [Paste].
 */
data class Section(
    val id: Int,
    val syntaxShortName: String,
    val name: String,
    val contents: String
)<file_sep>/src/main/kotlin/ff/paste/kpaste/json/GetSyntaxes.kt
package ff.paste.kpaste.json

/**
 * Document returned by get request "syntaxes".
 */
internal class GetSyntaxes(
    val syntaxes: List<Syntax>,
    val success: Boolean
)<file_sep>/src/main/kotlin/ff/paste/kpaste/json/adapter/GetPasteAdapter.kt
package ff.paste.kpaste.json.adapter

import ff.paste.kpaste.json.GetPaste
import ff.paste.kpaste.domain.Paste as PasteDomain
import com.squareup.moshi.FromJson

/**
 * Produces a domain [PasteDomain] from a json [GetPaste].
 */
internal class GetPasteAdapter {
    @FromJson
    fun getPaste(getPaste: GetPaste): PasteDomain {
        return getPaste.paste.asDomainObject()
    }
}<file_sep>/src/main/kotlin/ff/paste/kpaste/domain/ApplicationKey.kt
package ff.paste.kpaste.domain

/**
 * An application key can be used as authentication token to make requests to paste.ee
 * so that pastes submitted can later be recovered using the same token. Find out more
 * at paste.ee.
 */
data class ApplicationKey(
    val key: String
)<file_sep>/src/main/kotlin/ff/paste/kpaste/json/Section.kt
package ff.paste.kpaste.json

/**
 * Part of a paste.
 */
internal data class Section(
    val id: Int,
    val syntax: String,
    val name: String,
    val contents: String
)<file_sep>/src/main/kotlin/ff/paste/kpaste/service/PasteService.kt
package ff.paste.kpaste.service

import ff.paste.kpaste.domain.*
import retrofit2.http.*

/**
 * Interface to access paste.ee api.
 * Read about what the requests do in the documentation of paste.ee.
 */
interface PasteService {
    @GET("syntaxes")
    suspend fun getSyntaxes(@Header("X-Auth-Token") token: String): List<Syntax>

    @GET("syntaxes/{id}")
    suspend fun getSyntax(@Header("X-Auth-Token") token: String, @Path("id") id: Int): Syntax

    @Headers("Content-Type: application/json")
    @POST("pastes")
    suspend fun postPasteDraft(
        @Header("X-Auth-Token") token: String,
        @Body pasteDraft: PasteDraft
    ): PasteLink

    @GET("pastes/{id}")
    suspend fun getPaste(@Header("X-Auth-Token") token: String, @Path("id") id: String): Paste

    @DELETE("pastes/{id}")
    suspend fun deletePaste(@Header("X-Auth-Token") token: String, @Path("id") id: String): Void

    @GET("users/info")
    suspend fun getKeyInfo(@Header("X-Auth-Token") token: String): KeyType

    @POST("users/authenticate")
    suspend fun getApplicationKey(
        @Header("X-Auth-Token") token: String,
        @Body credentials: Credentials
    ): ApplicationKey
}<file_sep>/src/main/kotlin/ff/paste/kpaste/json/PasteDraft.kt
package ff.paste.kpaste.json

/**
 * Document body for a post request "pastes".
 */
internal data class PasteDraft(
    val encrypted: Boolean,
    val description: String,
    val sections: List

)<file_sep>/src/main/kotlin/ff/paste/kpaste/json/adapter/CredentialsAdapter.kt
package ff.paste.kpaste.json.adapter

import com.squareup.moshi.ToJson
import ff.paste.kpaste.json.Credentials
import ff.paste.kpaste.domain.Credentials as CredentialsDomain

/**
 * Produces a json [Credentials] from a domain [CredentialsDomain].
 */
internal class CredentialsAdapter {
    @ToJson
    fun getCredentials(credentials: CredentialsDomain): Credentials {
        return Credentials(credentials.username, credentials.password)
    }
}<file_sep>/src/main/kotlin/ff/paste/kpaste/json/adapter/GetApplicationKeyAdapter.kt
package ff.paste.kpaste.json.adapter

import ff.paste.kpaste.domain.ApplicationKey
import ff.paste.kpaste.json.GetApplicationKey
import com.squareup.moshi.FromJson

/**
 * Produces a domain [ApplicationKey] from a json [GetApplicationKey].
 */
internal class GetApplicationKeyAdapter {
    @FromJson
    fun getApplicationKey(getApplicationKey: GetApplicationKey): ApplicationKey {
        return ApplicationKey(getApplicationKey.key)
    }
}<file_sep>/src/main/kotlin/ff/paste/kpaste/json/adapter/SyntaxAdapter.kt
package ff.paste.kpaste.json.adapter

import ff.paste.kpaste.json.Syntax
import ff.paste.kpaste.domain.Syntax as SyntaxDomain
/**
 * Produces a domain [SyntaxDomain] from a json [Syntax], and vice versa.
 */
internal fun Syntax.asDomainObject(): SyntaxDomain {
    return SyntaxDomain(id, short, name)
}<file_sep>/src/main/kotlin/ff/paste/kpaste/json/Paste.kt
package ff.paste.kpaste.json

/**
 * Part of the document returned by request "pastes/id".
 */
internal data class Paste(
    val id: String,
    val encrypted: Boolean,
    val description: String,
    val views: Int,
    val created_at: String,
    val expires_at: String,
    val sections: List

)<file_sep>/src/test/kotlin/ff/paste/kpaste/ReadmeCode.kt
package ff.paste.kpaste

import ff.paste.kpaste.domain.PasteDraft
import ff.paste.kpaste.domain.Section
import ff.paste.kpaste.service.PasteServiceProvider
import kotlinx.coroutines.runBlocking
import kotlin.test.Test
import kotlin.test.assertTrue

/**
 * This class is meant to serve as the place where to write code for the landing page.
 * As a test, it allows verifying the code would work.
 */
class ReadmeCode {
    @Test
    fun functionReadmeCode() = runBlocking {
        val developerKey = "xxx"
        val someKey = "yyy"

        // Retrieve the service
        val service = PasteServiceProvider.pasteService

        // Submit a paste using your developer key
        // first, create a paste draft
        val pasteDraft = PasteDraft(
            false,
            "Greetings paste.",
            listOf(Section(1, "autodetect", "Greetings", "Hello, world."))
        )
        // then, submit the draft
        try {
            val pasteLink = service.postPasteDraft(developerKey, pasteDraft)
            // print link and id of created paste
            println("$pasteLink")
        } catch (e: Exception) {
            // handle exception
        }

        // Posting a paste using an application key follows the same procedure - if you
        // do not know about the different keys available, read paste.ees documentation.

        // Finding out about a key
        try {
            val info = service.getKeyInfo(someKey)
            println("$info")
        } catch (e: Exception) {
            // handle exception
        }

        // You can also get and delete a paste, get a list of the syntax available, get
        // the details of a specific syntax, and more.
    }
}<file_sep>/src/main/kotlin/ff/paste/kpaste/json/adapter/GetKeyInfoAdapter.kt
package ff.paste.kpaste.json.adapter

import ff.paste.kpaste.domain.KeyType
import ff.paste.kpaste.json.GetKeyInfo
import com.squareup.moshi.FromJson

/**
 * Produces a domain [KeyType] from a json [GetKeyInfo].
 */
internal class GetKeyInfoAdapter {
    @FromJson
    fun getKeyType(getKeyInfo: GetKeyInfo): KeyType {
        return KeyType(getKeyInfo.type)
    }
}<file_sep>/src/main/kotlin/ff/paste/kpaste/json/GetKeyInfo.kt
package ff.paste.kpaste.json

/**
 * Document returned by get request "users/info".
 */
internal data class GetKeyInfo(
    val type: String
)<file_sep>/src/main/kotlin/ff/paste/kpaste/service/PasteServiceProvider.kt
package ff.paste.kpaste.service

import com.squareup.moshi.Moshi
import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory
import ff.paste.kpaste.json.adapter.*
import retrofit2.Retrofit
import retrofit2.converter.moshi.MoshiConverterFactory

object PasteServiceProvider {
    private const val baseUrl = "https://api.paste.ee/v1/"

    private val moshi = Moshi.Builder()
        .add(GetSyntaxAdapter())
        .add(GetSyntaxesAdapter())
        .add(PasteDraftAdapter())
        .add(GetPasteAdapter())
        .add(PostPasteAdapter())
        .add(GetKeyInfoAdapter())
        .add(GetApplicationKeyAdapter())
        .add(CredentialsAdapter())
        .addLast(KotlinJsonAdapterFactory())
        .build()

    private val retrofit = Retrofit.Builder()
        .addConverterFactory(MoshiConverterFactory.create(moshi))
        .baseUrl(baseUrl)
        .build()

    val pasteService : PasteService by lazy { retrofit.create(PasteService::class.java) }
}<file_sep>/src/main/kotlin/ff/paste/kpaste/json/Syntax.kt
package ff.paste.kpaste.json

/**
 * Part of the document returned by requests "syntaxes/id", "syntaxes".
 */
internal data class Syntax(
    val id: Int,
    val short: String,
    val name: String
)<file_sep>/src/main/kotlin/ff/paste/kpaste/json/GetPaste.kt
package ff.paste.kpaste.json

/**
 * Document returned by get request "pastes/id".
 */
internal data class GetPaste(
    val success: Boolean,
    val paste: Paste
)<file_sep>/src/main/kotlin/ff/paste/kpaste/domain/Credentials.kt
package ff.paste.kpaste.domain

/**
 * [Credentials] of a paste.ee account. If you use this class, make sure you do it in a secure way.
 */
data class Credentials(
    val username: String,
    val password: String
)<file_sep>/src/main/kotlin/ff/paste/kpaste/json/adapter/PostPasteAdapter.kt
package ff.paste.kpaste.json.adapter

import ff.paste.kpaste.domain.PasteLink
import ff.paste.kpaste.json.PostPaste
import com.squareup.moshi.FromJson

/**
 * Produces a domain [PasteLink] from a json [PostPaste].
 */
internal class PostPasteAdapter {
    @FromJson
    fun getPasteLink(postPaste: PostPaste): PasteLink {
        return PasteLink(postPaste.id, postPaste.link)
    }
}<file_sep>/src/test/kotlin/ff/paste/kpaste/ServiceTest.kt
package ff.paste.kpaste

import ff.paste.kpaste.domain.PasteDraft
import ff.paste.kpaste.domain.Section
import ff.paste.kpaste.service.PasteServiceProvider
import kotlinx.coroutines.runBlocking
import kotlin.test.Test
import kotlin.test.assertTrue

/**
 * Calls to several service methods.
 * Can be used as a base for code to find out how Paste.ee API, Retrofit, etc, work; to test your keys;
 * to test code changes, etc.
 */
class ServiceTest {
    private val key = "xxx"
    private val syntaxAutodetectId = 170
    private val pasteDraft = PasteDraft(
        false,
        "Test paste.",
        listOf(Section(1, "autodetect", "The Paste", "Contents of the paste."))
    )
    private val pasteId = "xxx"
    private val pasteToDeleteId = "yyy"

    @Test
    fun pasteService() = runBlocking {
        val service = PasteServiceProvider.pasteService

        try {
            val keyInfo = service.getKeyInfo(key)
            println("getKeyInfo, keyInfo $keyInfo")

            val syntaxes = service.getSyntaxes(key)
            println("getSyntaxes, syntaxes $syntaxes")
            val syntaxFirst = syntaxes.first()
            println("syntax first $syntaxFirst")
            val syntaxLast = syntaxes.last()
            println("syntax last $syntaxLast")
            val syntax = service.getSyntax(key, syntaxAutodetectId)
            println("getSyntax, syntax $syntax}")

            val pasteLink = service.postPasteDraft(key, pasteDraft)
            println("postPasteDraft, pasteLink $pasteLink")
            val paste = service.getPaste(key, pasteId)
            println("getPaste, paste $paste")
            service.deletePaste(key, pasteToDeleteId)
        } catch (e: Exception) {
            println("$e")
        }

        assertTrue(true)
    }
}<file_sep>/src/main/kotlin/ff/paste/kpaste/domain/PasteLink.kt
package ff.paste.kpaste.domain

/**
 * A [PasteLink] is the id and url of a paste at paste.ee.
 */
data class PasteLink(
    val id: String,
    val link: String
)<file_sep>/src/main/kotlin/ff/paste/kpaste/json/adapter/GetSyntaxesAdapter.kt
package ff.paste.kpaste.json.adapter

import ff.paste.kpaste.json.GetSyntaxes
import ff.paste.kpaste.domain.Syntax as SyntaxDomain
import com.squareup.moshi.FromJson

/**
 * Produces a list of domain [SyntaxDomain] from a json [GetSyntaxes].
 */
internal class GetSyntaxesAdapter {
    @FromJson
    fun getSyntaxes(getSyntaxes: GetSyntaxes): List<SyntaxDomain> {
        return getSyntaxes.syntaxes.map { syntax ->
            syntax.asDomainObject()
        }
    }
}<file_sep>/src/main/kotlin/ff/paste/kpaste/json/PostPaste.kt
package ff.paste.kpaste.json

/**
 * Document returned by post request "pastes".
 */
internal data class PostPaste(
    val id: String,
    val link: String
)<file_sep>/src/main/kotlin/ff/paste/kpaste/json/adapter/PasteDraftAdapter.kt
package ff.paste.kpaste.json.adapter

import ff.paste.kpaste.json.PasteDraft
import ff.paste.kpaste.json.Section
import ff.paste.kpaste.domain.PasteDraft as PasteDraftDomain
import com.squareup.moshi.ToJson

/**
 * Produces a json [PasteDraft] from a domain [PasteDraftDomain].
 */
internal class PasteDraftAdapter {
    @ToJson
    fun getPasteDraft(pasteDraft: PasteDraftDomain): PasteDraft {
        return PasteDraft(
            pasteDraft.isEncrypted,
            pasteDraft.description,
            pasteDraft.sections.map { section ->
                Section(section.id, section.syntaxShortName, section.name, section.contents)
            }
        )
    }
}<file_sep>/README.md
**KPaste allows you to access Paste.ee services, "pasting" for example, from your program's code with little hassle.** In other words, it is an interface to Paste.ee services.

Said services are accessed through an implementation of the PasteService class generated by Retrofit, while both response and request bodies are converted to/from domain objects with Moshi.

**As a client, you work with the PasteService implementation and the domain classes.**

While the domain classes are very similar in structure to the responses from Paste.ee, they decouple your code from the schema used by Paste.ee. Further, you can write your own domain classes to suit your needs. Just be sure to modify the adapters. The adapters convert instances of classes with a structure matching a server response to a domain object.

**A basic understanding of both Retrofit and Moshi is advised,** although not strictly necessary, to use
KPaste as-is. You do need to read Paste.ee API documentation, however, in order to understand the
services Paste.ee offers.

**To use in your project,** download the jar file (available in Releases), add it to your lib folder, and manually add the dependencies of the library (see build.gradle) to your own. KPaste depends on kotlinx-coroutines-core, kotlin-reflect, converter-moshi, moshi-kotlin. We may consider publishing to a central repository in future releases.

**Usage.**

        // Retrieve the service
        val service = PasteServiceProvider.pasteService

        // Submit a paste using your developer key
        // first, create a paste draft
        val pasteDraft = PasteDraft(
            false,
            "Greetings paste.",
            listOf(Section(1, "autodetect", "Greetings", "Hello, world."))
        )
        // then, submit the draft
        try {
            val pasteLink = service.postPasteDraft(developerKey, pasteDraft)
            // print link and id of created paste
            println("$pasteLink")
        } catch (e: Exception) {
            // handle exception
        }

        // Posting a paste using an application key follows the same procedure - if you
        // do not know about the different keys available, read paste.ees documentation.

        // Finding out about a key
        try {
            val info = service.getKeyInfo(someKey)
            println("$info")
        } catch (e: Exception) {
            // handle exception
        }

        // You can also get and delete a paste, get a list of the syntax available,
        // get the details of a specific syntax, and more.

This project is provided **AS-IS.**

This project is **MIT licensed.**<file_sep>/build.gradle
plugins {
    id 'org.jetbrains.kotlin.jvm' version '1.5.10'
    id 'java-library'
    id 'java-library-distribution'
}

group 'ff.paste'
version '1.0'

tasks.named('jar') {
    manifest {
        attributes(
                'Implementation-Title': project.name,
                'Implementation-Version': project.version
        )
    }
}

distributions {
    main {
        distributionBaseName = project.name
    }
}

repositories {
    mavenCentral()
}

dependencies {
    implementation group: 'org.jetbrains.kotlin', name: 'kotlin-reflect', version: '1.5.20-M1'
    implementation group: 'com.squareup.retrofit2', name: 'converter-moshi', version: '2.9.0'
    implementation group: 'com.squareup.moshi', name: 'moshi-kotlin', version: '1.12.0'
    implementation group: 'org.jetbrains.kotlinx', name: 'kotlinx-coroutines-core', version: '1.5.0'

    testImplementation 'org.jetbrains.kotlin:kotlin-test'
    testImplementation 'org.jetbrains.kotlin:kotlin-test-junit'
}
<file_sep>/src/main/kotlin/ff/paste/kpaste/domain/Paste.kt
package ff.paste.kpaste.domain

import java.time.LocalDateTime
import java.time.format.DateTimeFormatter
import java.time.format.DateTimeParseException

/**
 * A [Paste] is a message stored at paste.ee. It has some metadata, and its actual contents are
 * stored in "sections".
 */
data class Paste(
    val id: String,
    val isEncrypted: Boolean,
    val description: String,
    val viewCount: Int,
    val creationDateString: String,
    val expirationDateString: String,
    val sections: List

) {
    /**
     * If [isCreationDateValid], [creationDateString] as [LocalDateTime], else [LocalDateTime.MIN].
     */
    val creationDate: LocalDateTime
    val isCreationDateValid: Boolean
    /**
     * If [isExpirationDateValid], [expirationDateString] as [LocalDateTime], else [LocalDateTime.MIN].
     */
    val expirationDate: LocalDateTime
    val isExpirationDateValid: Boolean

    init {
        val pasteeDateFormatter = DateTimeFormatter.ofPattern("yyyy-M-d H:mm:ss")

        var result = try {
            Pair(LocalDateTime.parse(creationDateString, pasteeDateFormatter), true)
        } catch (e: DateTimeParseException) {
            Pair(LocalDateTime.MIN, false)
        }
        creationDate = result.first
        isCreationDateValid = result.second

        result = try {
            Pair(LocalDateTime.parse(expirationDateString, pasteeDateFormatter), true)
        } catch (e: DateTimeParseException) {
            Pair(LocalDateTime.MIN, false)
        }
        expirationDate = result.first
        isExpirationDateValid = result.second
    }
}

branch_name: refs/heads/main

languages: Kotlin Gradle Markdown

repo_language: Kotlin

repo_name: tlundgren/kpaste


text:
<file_sep>import router from './router'
import store from './store'
import NProgress from 'nprogress' // progress bar
import 'nprogress/nprogress.css' // progress bar style

router.beforeEach(async(to, from, next) => {
    NProgress.start()
})<file_sep>import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export const constantRoutes = [
  {
    path: '/',
    component: ()=>import('@/views/home/index'),
    redirect:"/dashboard",
    children:[{
      path:"/dashboard",
      name:"name"
    }]
  }
]

const createRouter = () => new Router({
  scrollBehavior: () => ({ y: 0 }),
  routes: constantRoutes
})

const router = createRouter()

export default router

<file_sep><template>

</template>

<file_sep><template>

        <el-scrollbar wrap-class="scrollbar-wrapper">
            <el-menu
                :default-active="activeMenu"
                :collapse="isCollapse"
                :background-color="variables.menuBg"
                :text-color="variables.menuText"
                :unique-opened="false"
                :active-text-color="variables.menuActiveText"
                :collapse-transition="false"
                mode="vertical"
            >
                <sidebar-item v-for="route in permission_routes" :key="route.path" :item="route" :base-path="route.path" />
            </el-menu>
        </el-scrollbar>

</template>

<file_sep>import {get,post} from "@/plugins/http.js";
/**
 * 用户登录
 * @param {*} data
 * @returns
 */
export function user_login(data){
   return get("user/login",data);
}

<file_sep><template>

        <sidebar class="sidebar-container"></sidebar>

            {{obj.a}}

                <navbar></navbar>
                <tags-view></tags-view>

            <app-main></app-main>

</template>

branch_name: refs/heads/master

languages: Vue JavaScript

repo_language: Vue


text:
<repo_name>martygaupp/PracticalMachineLearning<file_sep>/README.md
# PracticalMachineLearning
Welcome to my repository for Practical Machine Learning.  Here you'll find my submission for the class project for this Coursera course.  Enjoy!

A link to the compiled HTML file is here:

http://htmlpreview.github.io/?https://github.com/martygaupp/PracticalMachineLearning/blob/master/Course_Project_Write-Up.html

Click on it (if the links is available) or copy it into your browser.  There's also a pdf of the document for you to view.  Sorry, couldn't get the gh-pages thing to work.
<file_sep>/Course_Project.R
# Analysis Assignment

# load the appropriate packages

library(caret)
library(randomForest)
library(gbm)

# to get help on caret go to:
# http://topepo.github.io/caret/index.html

# load the data

FitData <- read.csv("pml-training.csv")
str(FitData)

# classe variable values:
#   A = exactly according to the specification
#   B = throwing the elbows to the front
#   C = lifting the dumbbell only halfway
#   D = lowering the dumbbell only halfway
#   E = throwing the hips to the front

# load just the data with columns
#  I did my adjusting in Excel and then saved this as a .csv file

JustDataCols <- read.csv("JustData.csv")

# partition the data

inTrain <- createDataPartition(y = JustDataCols$classe, p = 0.1, list = FALSE)
training <- JustDataCols[inTrain,]
testing <- JustDataCols[-inTrain,]

# random forest method from caret (rf)

fitControl <- trainControl(method = "cv",
                           number = 3)

ptm <- proc.time()
RFFit <- train(training$classe ~ .,
               data = training,
               method = "rf",
               trControl = fitControl,
               verbose = FALSE)
elapsed <- proc.time() - ptm
RFTime <- round(elapsed[3], 2)
RFPred <- predict(RFFit, testing)
RFAcc <- 100*round(confusionMatrix(testing$classe, RFPred)$overall['Accuracy'], 4)

# boosted tree model from caret (gbm)

ptm <- proc.time()
GBMFit <- train(training$classe ~ .,
                data = training,
                method = "gbm",
                verbose = FALSE)
elapsed <- proc.time() - ptm
GBMTime <- round(elapsed[3], 2)
GBMPred <- predict(GBMFit, testing)
GBMAcc <- 100*round(confusionMatrix(testing$classe, GBMPred)$overall['Accuracy'], 4)

# random forest directly from randomforest package

ptm <- proc.time()
RandForFit <- randomForest(training$classe ~ ., data = training)
elapsed <- proc.time() - ptm
RandForTime <- round(elapsed[3], 2)
RandForPred <- predict(RandForFit, testing)
RandForAcc <- 100*round(confusionMatrix(testing$classe, RandForPred)$overall['Accuracy'], 4)

# Make predictions on the Test Set

TestSetData <- read.csv("TestSet.csv")
TestSetPred <- predict(RFFit, TestSetData)
TestSetPred

# Function for writing the files

pml_write_files = function(x){
  n = length(x)
  for(i in 1:n){
    filename = paste0("problem_id_",i,".txt")
    write.table(x[i],file=filename,quote=FALSE,row.names=FALSE,col.names=FALSE)
  }
}

pml_write_files(TestSetPred)

languages: Markdown R

repo_language: Markdown

repo_name: martygaupp/PracticalMachineLearning


text:
<repo_name>zghhr1122/NetworkTest<file_sep>/NetworkTest/app/src/main/java/com/example/hs/networktest/MainActivity.java
package com.example.hs.networktest;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;

import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;

public class MainActivity extends AppCompatActivity implements View.OnClickListener{
TextView responseText;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Button sendRequest=(Button)findViewById(R.id.send_request);
        responseText=(TextView)findViewById(R.id.response_text);
        sendRequest.setOnClickListener(this);
    }
    @Override
    public void onClick(View v){
        if (v.getId()==R.id.send_request){
           // sendRequestWithHttpURLConnect();
        sendRequestWithOkHttp();
        }
    }
    public  void sendRequestWithOkHttp(){
        //开启线程来发送网络请求
        new Thread(new Runnable() {
            @Override
            public void run() {
                try{
                    OkHttpClient client=new OkHttpClient();
                    Request request=new Request.Builder().url("http://www.jingdong.com").build();
                    Response response=client.newCall(request).execute();
                    String responseData=response.body().string();
                    showResponse(responseData);
                }catch (Exception e){
                    e.printStackTrace();
                }}
        }).start();
    /*public  void sendRequestWithHttpURLConnect(){
        //开启线程来发送网络请求
        new Thread(new Runnable() {
            @Override
            public void run() {
                HttpURLConnection connection=null;
                BufferedReader reader=null;
                try{
                    URL url=new URL("http://www.jingdong.com");
                    connection=(HttpURLConnection) url.openConnection();
                    connection.setRequestMethod("GET");
                    connection.setConnectTimeout(8000);
                    connection.setConnectTimeout(0000);
                    InputStream in=connection.getInputStream();
                    // 下面对获取到的输入流进行读取
                    reader=new BufferedReader(new InputStreamReader(in));
                    StringBuilder response=new StringBuilder();
                    String Line;
                    while((Line=reader.readLine())!=null){
                        response.append(Line);
                    }
                    showResponse(response.toString());
                }catch (Exception e){
                    e.printStackTrace();
                }finally {
                    if (reader!=null){
                        try{
                            reader.close();
                        }catch (IOException e){
                            e.printStackTrace();
                        }
                    }
                    if(connection!=null){
                        connection.disconnect();
                    }
                }
            }
        }).start();*/
    }
    private  void showResponse(final String response){
        runOnUiThread(new Runnable() {
            @Override
            public void run() {
                //在这里进行UI操作，将结果显示到界面上
                responseText.setText(response);
            }
        });
    }
}

repo_language: Java


text:
<file_sep># CrushIt Compiler

CrushIt Compiler crawls through a web page and crushes all scripts into a single file.<file_sep>
define(function() {
    "use strict";

    var Console = Backbone.View.extend({

        el: $('#console'),

        events: {
            'focus': 'selectConsole'
        },

        update: function (data) {
            this.$el.val(data);

            return this;
        },

        selectConsole: function () {
            this.$el.select();
        }
    });

    return Console;
})<file_sep>/*
    CrushIt - application namespace.
*/
define(['views/left-panel'], function (Panel) {
    "use strict";

    var CrushIt = {
        init: function () {
            var panel = new Panel();
        }
    };

    return CrushIt;
})<file_sep>
define(['../libs/md5', './console'], function (md5, Console) {
    "use strict";

    var LeftPanel = Backbone.View.extend({

        el: $('#left-panel'),

        active: false,

        cache: {},

        events: {
            'submit #crushit': 'crushIt',
            'focus #url':  'resetCrushIt'
        },

        initialize: function () {
            this.console = new Console();

            this.listenTo(this, 'loading', this.loading);
            this.listenTo(this, 'loaded', this.loaded);
        },

        resetCrushIt: function () {
            this.$('#url').val('');
            this.console.update('');
        },

        crushIt: function () {
            // Is CrushIt at work?
            if (this.active) {
                return;
            }

            var url = this.$("#url").val();

            this.trigger('loading');
            this.sendRequest('/crush', this.$('#crushit').serialize(), 'text', url);

            return false;
        },

        sendRequest: function (url, data, format, cacheUrl) {
            var cacheKey = 'ct' + md5(cacheUrl), self = this;

            if (self.cache.hasOwnProperty(cacheKey)) {
                self.trigger('loaded');
                self.console.update(self.cache[cacheKey].code);

                return false;
            }

            $.post(url, data, function (code) {
                self.trigger('loaded');
                self.console.update(code);
                self.cache[cacheKey] = {
                    url: cacheUrl,
                    code: code
                };
            }, format);
        },

        loading: function () {
            this.console.update('Crushing scripts....');
            this.$('#submit').addClass('disabled').attr('disabled', 'disabled');
            $('#loading').removeClass('loading-inactive').addClass('loading-active');
            this.active = true;
        },

        loaded: function () {
            this.$('#submit').removeClass('disabled').attr('disabled', false);
            $('#loading').removeClass('loading-active').addClass('loading-inactive');
            this.active = false;
        }
    });

    return LeftPanel;
})

languages: Markdown JavaScript

repo_name: RagingFlame/crushit-compiler


text:
<repo_name>abouchama/amq62-basic-s2i<file_sep>/README.md
# Example of JBoss A-MQ (ActiveMQ) on OpenShift using S2I

Configuration of the JBoss A-MQ image can also be modified using the S2I (Source-to-image) feature.

Custom A-MQ broker configuration can be specified by creating an openshift-activemq.xml file inside
the git directory of your application’s Git project root. On each commit,
the file will be copied to the conf directory in the A-MQ root and its contents used to configure the broker.

##S2I Build OpenShift:

### Create first a new project (namespace) called Broker:

```
oc new-project broker
```

Now let's s2i our conf to the jboss-amq image

```
oc new-build registry.access.redhat.com/jboss-amq-6/amq62-openshift:1.3~https://github.com/abouchama/amq62-basic-s2i.git
--> Found Docker image 884d69b (6 weeks old) from registry.access.redhat.com for "registry.access.redhat.com/jboss-amq-6/amq62-openshift:1.3"

    JBoss A-MQ 6.2
    --------------
    A reliable messaging platform that supports standard messaging paradigms for a real-time enterprise.

    Tags: messaging, amq, java, jboss, xpaas

    * An image stream will be created as "amq62-openshift:1.3" that will track the source image
    * A source build using source code from https://github.com/abouchama/amq62-basic-s2i.git will be created
      * The resulting image will be pushed to image stream "amq62-basic-s2i:latest"
      * Every time "amq62-openshift:1.3" changes a new build will be triggered

--> Creating resources with label build=amq62-basic-s2i ...
    imagestream "amq62-openshift" created
    imagestream "amq62-basic-s2i" created
    buildconfig "amq62-basic-s2i" created
--> Success
    Build configuration "amq62-basic-s2i" created and build triggered.
    Run 'oc logs -f bc/amq62-basic-s2i' to stream the build progress.
```
To stream the build progress, run 'oc logs -f bc/amq62-basic-s2i',
You can see here that our conf openshift-activemq.xml has been copied to the image stream:

```
$ oc logs -f bc/amq62-basic-s2i
Cloning "https://github.com/abouchama/amq62-basic-s2i.git" ...
	Commit:	<PASSWORD> (add configuration)
	Author:	Gogs <<EMAIL>>
	Date:	Fri Mar 10 11:22:30 2017 +0100

Copying config files from project...
'/tmp/src/configuration/openshift-activemq.xml' -> '/opt/amq/conf/openshift-activemq.xml'

Pushing image 172.30.34.183:5000/amq/amq62-basic-s2i:latest ...
Pushed 0/7 layers, 3% complete
Pushed 1/7 layers, 18% complete
Pushed 2/7 layers, 35% complete
Pushed 3/7 layers, 47% complete
Pushed 4/7 layers, 82% complete
Pushed 5/7 layers, 87% complete
Pushed 6/7 layers, 94% complete
Pushed 7/7 layers, 100% complete
Push successful
```
Let's get now, our image stream URL:

```
$ oc get is
NAME              DOCKER REPO                                 TAGS      UPDATED
amq62-basic-s2i   172.30.34.183:5000/broker/amq62-basic-s2i   latest    15 minutes ago
amq62-openshift   172.30.34.183:5000/broker/amq62-openshift   1.3       15 minutes ago
```

Now, you have to change the image steam on the template "template-amq62-basic-s2i.json", like following:

```
"image": "172.30.34.183:5000/broker/amq62-basic-s2i"
```

###create the template in the namespace
```
$ oc create -n broker -f template-amq62-basic-s2i.json
template "amq62-basic-s2i" created
```
###create the service account "amq-service-account"
```
oc create -f https://raw.githubusercontent.com/abouchama/amq62-basic-s2i/master/amq-service-account.json
serviceaccount "amq-service-account" created
```

###ensure the service account is added to the namespace for view permissions... (for pod scaling)
```
oc policy add-role-to-user view system:serviceaccount:broker:amq-service-account
```

###use the template in the namespace then to create your Broker:
```
$ oc new-app --template="broker/amq62-basic-s2i"
--> Deploying template amq62-basic-s2i for "broker/amq62-basic-s2i"

     amq62-basic-s2i
     ---------
     Application template for JBoss A-MQ brokers. These can be deployed as standalone or in a mesh. This template supports SSL and requires usage of OpenShift secrets.

     * With parameters:
        * APPLICATION_NAME=broker
        * MQ_PROTOCOL=openwire
        * MQ_QUEUES=
        * MQ_TOPICS=
        * MQ_USERNAME=admin # generated
        * MQ_PASSWORD=<PASSWORD> # generated
        * AMQ_MESH_DISCOVERY_TYPE=kube
        * AMQ_STORAGE_USAGE_LIMIT=1 gb
        * IMAGE_STREAM_NAMESPACE=openshift

--> Creating resources with label app=amq62-basic-s2i ...
    service "broker-amq-tcp" created
    deploymentconfig "broker-amq-a" created
--> Success
    Run 'oc status' to view your app.
```
###Update of openshift-activemq.xml

You should setup the GitHub webhook URL in order to trigger a new build after each update.

You can also do it manually, like following:
```
$ git commit -am "changing my activemq conf"

$ git push -u origin master

$ oc start-build amq62-basic-s2i -n broker
build "amq62-basic-s2i-2" started

$ oc deploy broker-amq-a --latest -n broker
Started deployment #2
Use 'oc logs -f dc/broker-amq-a' to track its progress.
```<file_sep>/.sti/bin/assemble
#!/bin/sh

SRCCONF=/tmp/src/configuration
SRCLIB=/tmp/src/lib
SRCBIN=/tmp/src
SRCPATCH=/tmp/src/patch

if [ -d ${SRCCONF} ]; then
  echo "Copying config files from project..."
  cp -v ${SRCCONF}/* $AMQ_HOME/conf/
fi

# if [ -d ${SRCLIB} ]; then
#  echo "Copying jars from project..."
#  cp -v ${SRCLIB}/* $AMQ_HOME/lib/
#fi

# if [ -d ${SRCBIN} ]; then
#  echo "Copying json files from project..."
#  chmod +x ${SRCBIN}/*
#  cp -v ${SRCBIN}/* $AMQ_HOME/
#fi

#if [ -d ${SRCPATCH} ]; then
#   echo "############ Patch AMQ to 621164 - HF 37 ############"
#  chmod +x ${SRCPATCH}/*
#  chmod +x ${SRCPATCH}/lib/*

#  cp -v ${SRCPATCH}/lib/* $AMQ_HOME/lib/
#  cp -v ${SRCPATCH}/*.jar $AMQ_HOME/

  #curl -o $AMQ_HOME/lib/activemq-kahadb-store-5.11.0.redhat-621164.jar https://repository.jboss.org/nexus/content/groups/ea/org/apache/activemq/activemq-kahadb-store/activemq-kahadb-store-5.11.0.redhat-621164.jar
  #curl -o $AMQ_HOME/activemq-all-5.11.0.redhat-621164.jar https://repository.jboss.org/nexus/content/groups/ea/org/apache/activemq/activemq-all/activemq-all-5.11.0.redhat-621164.jar

#  echo "Delete activemq-kahadb-store-5.11.0.redhat-621159.jar from image..."
#  rm $AMQ_HOME/lib/activemq-kahadb-store-5.11.0.redhat-621159.jar

#  echo "Delete activemq-all-5.11.0.redhat-621159.jar from image..."
#  rm $AMQ_HOME/activemq-all-5.11.0.redhat-621159.jar

#  echo "############ End - Patch AMQ to 621164 - HF 37 ############"
#fi

exit 0

languages: Markdown Shell


text:
<file_sep># Define here the models for your scraped items
#
# See documentation in:
# https://docs.scrapy.org/en/latest/topics/items.html

import scrapy
from itemloaders.processors import MapCompose, TakeFirst

def process_price(value):
    try:
        value = value.replace(' ', '')
        value = int(value)
        return value
    except Exception as e:
        print(e)
    finally:
        return value

class ProductparserItem(scrapy.Item):
    # define the fields for your item here like:
    name = scrapy.Field(output_processor=TakeFirst())
    image = scrapy.Field()
    url = scrapy.Field(output_processor=TakeFirst())
    price = scrapy.Field(input_processor=MapCompose(process_price), output_processor=TakeFirst())
    _id = scrapy.Field()
<file_sep>import scrapy
from scrapy.http import HtmlResponse
from productparser.items import ProductparserItem
from scrapy.loader import ItemLoader

class LeroySpider(scrapy.Spider):
    name = 'leroy'
    allowed_domains = ['leroymerlin.ru']
    start_urls = ['https://leroymerlin.ru/search/?q=ковер&family=kovry-201709&suggest=true']

    def parse(self, response):
        next_page = response.xpath("////a[@data-qa-pagination-item='right']/@href").get()
        if next_page:
            yield response.follow(next_page, callback=self.parse)
        links = response.xpath("//a[@data-qa='product-name']/@href").getall()
        for link in links:
            yield response.follow(link, callback=self.good_parse)

    def good_parse(self, response: HtmlResponse):
        loader = ItemLoader(item=ProductparserItem(), response=response)
        loader.add_xpath('name', "//h1[@itemprop='name']/text()")
        loader.add_xpath('image', "//source[contains(@media, 'only screen and (min-width: 1024px)')]/@srcset")
        loader.add_xpath('price', "//span[@slot='price']/text()")
        loader.add_value('url', response.url)
        yield loader.load_item()

        # name = response.xpath("//h1[@itemprop='name']/text()").get()
        # image = response.xpath("//source[contains(@media, 'only screen and (min-width: 1024px)')]/@srcset").getall()
        # url = response.url
        # price = response.xpath("//meta[@itemprop='price']/@content").get()
        # yield ProductparserItem(name=name, image=image, url=url, price=price)

repo_language: Python


text:
<repo_name>mmp2/gerrym<file_sep>/README.md
# gerrym
Electoral Geometry and Gerrymandering Group
<file_sep>/docs/index.md

**The EGG group needs a webmaster/blogmaster** *write to mmp at stat to apply*

**Add yourself to the mailing list** ` <https://mailman1.u.washington.edu/mailman/listinfo/electoral-geometry>`_

`<NAME>< http://www.stat.washington.edu/mmp>`

Redistricting is the process of redrawing state legislative and congressional district boundaries. This process occurs every 10 years following the decennial U.S. Census, and is based on numerous criteria, including population and geographical boundaries. When lawmakers draw district lines to entrench one party’s political power, some votes count more than others. *Gerrymandering* describes the intentional manipulation of district boundaries for political advantage, or to discriminate against a group of voters on the basis of their political views or race.

This group, started in Summer 2020, will learn about redistricting in the US, about quantitative ways to define and measure gerrymandering, and will develop new statistical tools and methods in support of fair representation.

More information to come soon. If you are interested in participating, please sign up on the group mailing list. For the time being, the meetings will be in the time slot (Mondays 4-6:30pm) of the `GDA Reading Group <https://www.stat.washington.edu/mmp/geometry/reading-group17/html/gda-home.html>`_ and will be announced on both this list and the *geometry* mailing list.

For student participants: You will not be required to make a presentation/lead a discussion, but if you plan to do so, you can sign up for 1 stat 600 credit with one of the organizers.

**List of suggested topics for Fall 2020**
  * Electoral geography, the US census, principles for redistricting
  * The mathematics and statistics of gerrymandering, an overview
  * Earthmover distances, minimum matching, and optimal transport (OT)
  * Optimal transport on graphs. What should be an OT distance between maps?
  * Statistical tests for detecting gerrymandering
  * Sampling the space of maps
  * The Efficiency Gap (EG). Definition and properties.

---------------------------------------------------------------------------

**Schedule for Fall 2020**

[10/12] <NAME> -- Introduction to Electoral Geography, Gerrymandering, and detecting gerrymandering, in the Geometry group

[/] TBA Mondays 4-5:30 pm approximately every 2 weeks


text:
<repo_name>Sanketwable/BashScripts<file_sep>/Terminal.sh

echo 'export PS1="\[\033[1;37m\]Wable\[\033[0;36m\]♕\[\033[0;35m\] hAcK💚 \[\033[1;37m\]:\[\033[0;33m\]\W\[\033[0;37m\] ₹ "' >>~/.bash_profile
echo 'export CLICOLOR=1' >>~/.bash_profile
echo 'export LSCOLORS=gxfxcxdxbxegedabagaced' >>~/.bash_profile
echo 'alias ls="ls -GFh" ' >>~/.bash_profile

echo "Done Thanks for using"

# replace Wable by "YourName"
# replace Hack by "Your hack"
<file_sep>/README.md
# BashScripts
****************************************************************************
### 1. Commit

  ***commit is script to git add + git commit + git push***

#### Installation steps: *(for mac)*
   ```bash
 $ cd

 $ git clone https://github.com/Sanketwable/BashScripts.git

 $ cd BashScript

 $ chmod +x commit.sh

 $ echo 'alias commit=source ~/BashScript/commit.sh' >>~/.bash_profile

 $ source ~/.bash_profile
   ```
#### Installation steps: *(for linux)*
   ```bash
 $ cd

 $ git clone https://github.com/Sanketwable/BashScripts.git

 $ cd BashScript

 $ cp commit.sh ~/

 $ cd ..

 $ chmod +x commit.sh

 $ mv commit.sh .commit.sh

 $ echo 'alias commit=~/.commit.sh' >>~/.bash_profile

 $ source ~/.bash_profile

 $ source ~/.bashrc
   ```
#### for help
  ```bash
  $ commit -h
  or
  $ commit --h
  or
  $ commit -help
  ```
#### use
  ```bash
  Go to repo directory:
  $ commit
  Enter a commit message
  >> "Write commit message here"
  Enter password >> ******
  commit sucessfull :-)
  ```
  ![alt text](https://github.com/Sanketwable/BashScripts/blob/master/img/terminalimage1.png)
###### Default password = '<PASSWORD>'

<file_sep>/commit.sh
#!/bin/bash
if [ "$1" == "--h" ] | [ "$1" == "-h" ] | [ "$1" == "-help" ] ; then
    echo "Commands for "
    echo -e "1. To change password \n    \$commit -cp"
    echo -e "2. To update\n    \$commit -update "
else
    echo -e -n "Enter a commit message: \n>> "
    read -r message
    #echo $message
    unset password
    unset shapassword
    var="$(pwd)"
    cd "$var"
    echo -n -e "Enter password:\n>> "

    stty -echo

    charcount=0
    while IFS= read -p "$prompt" -r -s -n 1 ch
    do
        if [[ $ch == $'\0' ]] ; then
            break
        fi
        if [[ $ch == $'\177' ]] ; then
            if [ $charcount -gt 0 ] ; then
                charcount=$((charcount-1))
                prompt=$'\b \b'
                password="${password%?}"
            else
                PROMPT=''
            fi
        else
            charcount=$((charcount+1))
            prompt='*'
            password+="$ch"
        fi
    done

    stty echo
    echo
    #echo -n "hello" | openssl sha1
    hash=$( echo -n $password | openssl sha1 )
    #echo $hash

    shaofpass="(stdin)= b1b3773a05c0ed0176787a4f1574ff0075f7521e"

    if [[ "$shaofpass" == "$hash" ]] ; then
        git add .
        git commit -m "$message"
        git push origin master
        echo "commit sucessfull :-)"
    else
        echo "Password is incorrect"
    fi
    #shapassword = password
    #echo "$password"
    #echo "$shaofpass"
    #echo "$variblehash"
fi

repo_name: Sanketwable/BashScripts


text:
<file_sep>inimage
=======

repo_name: netseer/inimage


text:
<repo_name>firnas099/onlineShoppingStore<file_sep>/README.md
# onlineShoppingStore-1
 OnlineShoopingStore Spring,JSTL
<file_sep>/src/main/webapp/index.jsp

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1" isELIgnored="false"%>
<!DOCTYPE html>

<%@include file="home_header.jsp" %>

Welcome To Online Store Speed Technology

Speed Technology is a Large online store in the world .We ra alaways waiting for providing best service and make you world class customer!

          See What We Are Have !

We've got what you need!

Speed Technology is a Large online store in the world .We ra alaways waiting for providing best service and make you world class customer!

          Lets See Our Product!

All Our Products

Checkout all our awesome producrs available hear!

                   PHOTO thumb
                   PRODUCT NAME
                   CATAGORY
                   CONDITION
                   PRICE

           <c:forEach items="${products}" var="products">

           ${products.productName}
           ${products.productCatagory}
           ${products.productPrice}
           ${products.productDescription}
           ${products.productPrice}

           <a href = "<c:url value = "/show/${products.productId}"/>">  more

            </c:forEach>

                Category

                LapTops

                Category

                CAMARA

                Category

                Mobiles

                Category

                Telivision

                Category

                Project Name

                Category

                Project Name

Free Member Registration!

      Register Now!

  <%@include file="footer.jsp" %>

    <file_sep>/src/main/java/com/firnas/app/model/products.java
package com.firnas.app.model;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

@Entity
public class products {

	@Id
	private String productId;
	private String productName;
	private String productCatagory;
	private String productDescription;
	private double productPrice;
	private String productCondition;
	private String productStatus;
	private String unitIntStock;
	private String productManufacture;

	public String getProductId() {
		return productId;
	}
	public void setProductId(String productId) {
		this.productId = productId;
	}
	public String getProductName() {
		return productName;
	}
	public void setProductName(String productName) {
		this.productName = productName;
	}
	public String getProductCatagory() {
		return productCatagory;
	}
	public void setProductCatagory(String productCatagory) {
		this.productCatagory = productCatagory;
	}
	public String getProductDescription() {
		return productDescription;
	}
	public void setProductDescription(String productDescription) {
		this.productDescription = productDescription;
	}
	public double getProductPrice() {
		return productPrice;
	}
	public void setProductPrice(double productPrice) {
		this.productPrice = productPrice;
	}
	public String getProductCondition() {
		return productCondition;
	}
	public void setProductCondition(String productCondition) {
		this.productCondition = productCondition;
	}
	public String getProductStatus() {
		return productStatus;
	}
	public void setProductStatus(String productStatus) {
		this.productStatus = productStatus;
	}
	public String getUnitIntStock() {
		return unitIntStock;
	}
	public void setUnitIntStock(String unitIntStock) {
		this.unitIntStock = unitIntStock;
	}
	public String getProductManufacture() {
		return productManufacture;
	}
	public void setProductManufacture(String productManufacture) {
		this.productManufacture = productManufacture;
	}
	@Override
	public String toString() {
		return "products [productId=" + productId + ", productName=" + productName + ", productCatagory="
				+ productCatagory + ", productDescription=" + productDescription + ", productPrice=" + productPrice
				+ ", productCondition=" + productCondition + ", productStatus=" + productStatus + ", unitIntStock="
				+ unitIntStock + ", productManufacture=" + productManufacture + "]";
	}

}
<file_sep>/src/main/java/com/firnas/app/controller/indexController.java
package com.firnas.app.controller;

import java.io.IOException;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

import com.fasterxml.jackson.annotation.JsonCreator.Mode;
import com.firnas.app.Dao.productsDao;
import com.firnas.app.model.products;

@Controller
public class indexController {

	@Autowired
	productsDao dao;

	@RequestMapping("/")
	public String appconfig( Model model) {

		List<products> productlist=dao.findAll();
		model.addAttribute("products", productlist);
		return"index.jsp";
	}

	@RequestMapping("/viewproduct/{productId}")
	public ModelAndView viewProduvt(@PathVariable String productId) {

		ModelAndView mv=new ModelAndView("viewproduct.jsp");
		products products=dao.findOne(productId);
	//	mv.addObject("products", products);
		mv.addObject("products", products);

		System.out.println(products);

		return mv;
	}

	@RequestMapping("/show/{productId}")
	public String vpro(@PathVariable("productId") String productId, Model model) {

		products product=dao.findOne(productId);
	//	model.addAttribute("product", product);
		model.addAttribute(product);
		System.out.println(product);

		return "test.jsp";
	}

	@RequestMapping("/admin")
	public String adminPage() {

		return "admin.jsp";
	}

	@RequestMapping("inventory")
	public String proinventory(Model model) {

		List<products>products=dao.findAll();
		model.addAttribute("products", products);
		return "productinventory.jsp";

	}

	@RequestMapping("/addproduct")
	public  String addProduct(){

		return "addproduct.jsp";
	}

}

languages:
Java
Markdown
Java Server Pages


text:
<repo_name>accessibility/a11y-courses<file_sep>/Reading-Material.md
# Accessibility Focused Reading Materials
Blogs, books, and additional resources primarily focused on accessibility.

## Books
- [A Web for Everyone](http://rosenfeldmedia.com/books/a-web-for-everyone/)
- [Just Ask: Integrating Accessibility Throughout Design](http://uiaccess.com/accessucd/)
- [Inclusive Front-End Design Patterns](https://www.smashingmagazine.com/inclusive-design-patterns/) by <NAME>
- [Apps For All: Coding Accessible Web Applications](https://shop.smashingmagazine.com/products/apps-for-all) by <NAME>
- [Inclusive Components: The Book](http://book.inclusive-components.design/) by <NAME>
- [Disability, Human Rights, and Information Technology](http://www.upenn.edu/pennpress/book/15640.html)
- [Strategic IT Accessibility: Enabling the Organization](http://www.strategicaccessibility.com/)
- [Structured Negotiation: A Winning Alternative to Lawsuits](https://shop.americanbar.org/eBus/Store/ProductDetails.aspx?productId=254116970&term=lainey%20feingold)
- [Accessibility for Everyone](https://abookapart.com/products/accessibility-for-everyone) by <NAME>
- [Color Accessibility Workflows](https://abookapart.com/products/color-accessibility-workflows) by <NAME>
- [Design for Real Life](https://abookapart.com/products/design-for-real-life) by <NAME> & <NAME>
- [Just Ask: Integrating Accessibility Throughout Design](http://www.uiaccess.com/accessucd/)
- [iOS Accessibility Handbook](https://leanpub.com/iosaccessibility) by <NAME>
- [Ensuring Digital Accessibility through Process and Policy](https://www.elsevier.com/books/ensuring-digital-accessibility-through-process-and-policy/lazar/978-0-12-800646-7) by <NAME> <NAME> <NAME>
- [Digital Outcasts: Moving Technology Forward without Leaving People Behind](http://digital-outcasts.com/) by <NAME>
- Ryerson University's [Web Accessibility for Developers](https://pressbooks.library.ryerson.ca/wafd/) - Available Under a Creative Commons License
- Ryerson University's [Understanding Document Accessibility](https://pressbooks.library.ryerson.ca/docs/) - Available Under a Creative Commons License
- Ryerson University's [Professional Web Accessibility Auditing Made Easy](https://pressbooks.library.ryerson.ca/pwaa/) - Available Under a Creative Commons License
- Ryerson University's [Digital Accessibility as a Business Practice](https://pressbooks.library.ryerson.ca/dabp/) - Available Under a Creative Commons License
- Ryerson University's [Introduction to Web Accessibility](https://pressbooks.library.ryerson.ca/iwacc/) - Available Under a Creative Commons License

## Blogs
- [a11y wins](https://a11ywins.tumblr.com/)
- [<NAME>](http://adrianroselli.com/tag/accessibility)
- [Deque Systems](https://www.deque.com/blog)
- [<NAME>](http://www.karlgroves.com/blog/)
- [<NAME>](https://tink.uk/)
- [Level Access](https://www.levelaccess.com/blog/)
- [Simply Accessible](http://simplyaccessible.com/articles/)
- [The Paciello Group](https://www.paciellogroup.com/blog/)
- [WebAIM](http://webaim.org/blog/)
- [Web Axe](http://webaxe.org/)

## Tutorials & Guides
- [A11Y Style Guide](https://github.com/cehfisher/a11y-style-guide)
- [Inclusive Components Club, by <NAME>](http://inclusive-components.club/)
- [Inclusive Design Principles](http://inclusivedesignprinciples.org/)
- [Teach Access Tutorial](https://teachaccess.github.io/tutorial/)
- [The A11Y Project](http://a11yproject.com/)
- [W3C Tutorials](http://www.w3.org/WAI/tutorials/)

## Guidelines & Checklists
- [IBM Accessibility Checklist](https://www-03.ibm.com/able/guidelines/ci162/accessibility_checklist.html)
- [VOX Media Accessibility Guidelines](http://accessibility.voxmedia.com/)

## Newsletters / Mailing Lists / Slack
- [a11y weekly](http://a11yweekly.com/)
- [gov.uk Accessibility Community](https://www.gov.uk/service-manual/communities/accessibility-community)
- [The Web Design Update](https://groups.google.com/a/d.umn.edu/forum/?hl=en#!forum/webdev)
- [W3C a11ySlackers](https://gitter.im/w3c/a11ySlackers)
  A bridge from Slack because Slack is inaccessible
- [web-a11y Slack Channel](https://web-a11y.slack.com/messages/C042TSFGN/)
- [WebAIM Web Accessibility E-mail Discussion List](http://webaim.org/discussion/)
<file_sep>/Videos.md
# Videos about accessibility

## Short general introduction videos
1. [Deque - What is Digital Accessibility?](https://www.youtube.com/watch?v=grrx2Lva7T0)
1. [W3C WAI - Introduction to Web Accessibility and W3C Standards](https://www.youtube.com/watch?v=20SHvU2PKsM)
1. [Barclays - Let's Talk Accessibility](https://www.youtube.com/watch?v=IQ8inkANj9Q&list=PL5NlUJaOA8R-aAiQdAqbqm7J_T42y6b7S&index=12)
1. [Australian Network on Disability - Access and Inclusion is Good for Business](https://www.youtube.com/watch?v=vH5NjhGwmaY)
1. [Women Techmakers: What is Web Accessibility in 60 seconds!](https://www.youtube.com/watch?v=hufMi9LZX2I)

## Videos on WCAG
1. [Barclays - What are the POUR Principles? | Accessibility Explainer](https://www.youtube.com/watch?v=kwhbZHI1URw)

## Youtube Channels
1. [W3C WAI](https://www.youtube.com/channel/UCU6ljj3m1fglIPjSjs2DpRA)
1. [Barclays](https://www.youtube.com/playlist?list=PL5NlUJaOA8R-aAiQdAqbqm7J_T42y6b7S)
1. [Deque](https://www.youtube.com/user/DequeSystemsInc)
1. [The Paciello Group](https://www.youtube.com/user/ThePacielloGroup)
1. [MSFTEnable](https://www.youtube.com/channel/UCSKM9uIhS6B77RX56JwUJSw)
1. [Australian Network on Disability](https://www.youtube.com/channel/UCAwQbz6HEc1gmPjE_elzf7A)
1. [Inclusive Design 24](https://www.youtube.com/inclusivedesign24)
<file_sep>/Annual-Days.md
- **January is [Glaucoma Awareness Month](https://www.nei.nih.gov/learn-about-eye-health/resources-for-health-educators/glaucoma-resources/glaucoma-awareness-month)**
- Jan 4 - [World Braille Day](https://www.un.org/en/observances/braille-day)
- Early February 10 - [International Epilepsy Day](https://internationalepilepsyday.org/)
- March 1 - [International Wheelchair Day](https://internationalwheelchairday.wordpress.com/)
- **April is [Crtical Visual Impairment (CVI) Literacy Awareness Month](https://www.pathstoliteracy.org/resources/cvi-literacy-awareness-month)**
- April 2 - [World Autism Day](https://en.wikipedia.org/wiki/World_Autism_Awareness_Day)
- April 11 - World Parkinson’s Day
- **May is Healthy Vision Month**
- **May is Blind Awareness Month**
- May 20 2021 (3rd Thursday each May) - [Global Accessibility Awareness Day (GAAD)[(https://en.wikipedia.org/wiki/Global_Accessibility_Awareness_Day)
- **June is Deaf-Blind Awareness Month**
- June 20 - Nystagmus Awareness Day
- **July is Eye Injury Prevention Month**
- **August is August is Cataract Awareness**
- **September is National Guide Dog Month**
- September 6 - International Color Blind Awareness Day
- September 23  - International Day of Sign Languages (IDSL)
- **October is World Blindness Awareness Month**
- October 6, 2020 - World Cerebral Palsy Day
- October 16 - White Cane Day
- October 8, 2020 (2nd Thursday of October) - World Sight Day (WSD)
- Dec 3 - International Day of Persons with Disabilities

Also see - https://disabilityin.org/resource/2020-calendar-of-disability-related-dates/
<file_sep>/README.md
# Accessibility Courses
Courses, webinars, educational videos, and more, offered in web accessibility. Also see the [W3C's List](https://www.w3.org/WAI/courses/list/) and [DigitalA11y](https://www.digitala11y.com/digital-accessibility-courses-roundup/) course lists.

## University (Paid)
- [Central Washington University (CWU)](http://www.cwu.edu/accessibility-studies/)
  Program dedicated to increasing awareness for accessibility issues
- [Georgia Institute of Technology: Information and Communication Technology (ICT) Accessibility **Verified Certificate**](https://www.edx.org/course/information-communication-technology-ict-gtx-ict100x)
- [Media Access Australia (W3C Member): **Professional Certificate** in Web Accessibility](https://www.mediaaccess.org.au/digitalaccessibilityservices/services/education-and-training/pcwa/)
- [Mohawk College: **Ontario College Graduate Certificate** in Accessible Media Production](https://www.mohawkcollege.ca/programs/graduate-studies/accessible-media-production-390)
- [University of Illinois DRES IT Accessibility Badging Program](http://disability.illinois.edu/academic-support/accessible-it-group/badging)
- [University of Illinois Information Accessibility Design and Policy (IADP): **Certificate Program**](http://iadp.ahs.illinois.edu)
- [University of South Australia: **Professional Certificate** in Web Accessibility](https://unisa.edu.au/education-arts-and-social-sciences/school-of-creative-industries/degrees/short-programs/professional-certificate-in-web-accessibility/)
- [Ryerson University: The Chang School: Web Accessibility Auditing and Reporting](https://continuing.ryerson.ca/search/publicCourseSearchDetails.do?method=load&courseId=258041&selectedProgramAreaId=18614&selectedProgramStreamId=18642)
- [University of Wisconsin-Milwaukee: Certificate in Assistive Technology & Accessible Design](https://uwm.edu/healthsciences/academics/certificate-in-assistive-technology-accessible-design/)
- [DePaul University: Accessibility and Design for Diverse Users](https://www.cdm.depaul.edu/academics/Pages/current/Requirements-MS-in-Human-Computer-Interaction.aspx)
- [OCAD University: Master of Design in Inclusive Design](https://www.ocadu.ca/academics/graduate-studies/inclusive-design)

## Private (Paid)
- [4syllables's Accessibility for web writers](http://4syllables.com.au/training/web-writing-accessibility/)
- [Deque University](https://www.deque.com/services/deque-university/) - Note: [PwD are eligible for scholarships](https://dequeuniversity.com/scholarships)
- [Level Access (previously SSB Bart Group) - Access University](https://www.levelaccess.com/products/access-university/)
- [Online Learning Consortium (OLC) Institute for Professional Development Accessibility Track](https://onlinelearningconsortium.org/learn/olc-new-institute-schedule/#track-Accessibility)
- [Pacellio Group - TPG Tutor](https://www.paciellogroup.com/products/tpg-tutor/)
- [Pluralsight - Making a Web Form Accessible](https://www.pluralsight.com/courses/web-form-accessible)
- [Pluralsight - Meeting Web Accessibility Guidelines (Section 508/ WCAG 2.0)](https://www.pluralsight.com/courses/web-accessibility-meeting-guidelines)
- [Styles in MS Word: A Primer for Accessible Document Design, the Course!](http://www.karlencommunications.com/StylesInWordCourse.html)
- [Team Treehouse - Web Accessibility Compliance](https://teamtreehouse.com/library/web-accessibility-compliance)
- [UX Foundations: Accessibility](https://www.lynda.com/Accessibility-tutorials/Foundations-UX-Accessibility/435008-2.html)
- [WebAIM's Web Accessibility Training](http://webaim.org/training/)
- [LinkedIN Learning: Accessibility for Web Design with <NAME>](https://www.linkedin.com/learning/accessibility-for-web-design/welcome) - Free with a LinkedIn Learning membership.
- [A11y Collective](https://a11y-collective.com/) - a new e-learning platform for people who want to dive deep into digital accessibility.

## Conferences & Events
- [A11Y Project Events](https://a11yproject.com/events/#upcoming)
    - [A11yTO](https://a11yto.com)
    - [A11yCamp Australia](https://a11ycamp.org.au/)
- [Accessing Higher Ground](http://accessinghigherground.org)
- [Accessible by Design](https://accessiblebydesign.org)
- [ASSETS: ACM SIGACCESS Conference on Computers and Accessibility](https://assets19.sigaccess.org/)
- [CSUN Assistive Technology Conference](http://www.csun.edu/cod/conference)
- [Environments for Humans' Accessibility Summit](http://environmentsforhumans.com/2017/accessu-summit/)
- [Inclusive Design 24 (#ID24)](http://www.inclusivedesign24.org/):
   - [October 2019 Playlist (YouTube)](https://www.youtube.com/playlist?list=PLn7dsvRdQEfFd5n_h8gltIoTfzUE_zywu)
   - [October 2018 Playlist (YouTube)](https://www.youtube.com/playlist?list=PLn7dsvRdQEfEnBxpVztmJ8KCKNJ_P-hR6)
   - [November 2017 Playlist (YouTube)](https://www.youtube.com/playlist?list=PLn7dsvRdQEfGvHBILiQDsrkVf3oo0-shO)
   - [June 2017 Playlist (YouTube)](https://www.youtube.com/playlist?list=PL95LOQw9SLWwqX2xoYidVO2YA7gknhmcx)
   - [2016 Playlist (YouTube)](https://www.youtube.com/playlist?list=PL95LOQw9SLWxmcZtzBiFuT9HAJKFJnl2n)
   - [2014 Playlist (YouTube)](https://www.youtube.com/playlist?list=PL95LOQw9SLWzKYfjwmx6edsP1Exs83CKc)
- [Knowbility's AccessU](https://www.knowbility.org/education/accessu/)
- [Web4All](http://w4a.info)
- [ZeroCon](https://conference.zeroproject.org/)

## Free
- [Digital Accessibility as a Business Practice](https://de.ryerson.ca/wa/business/)
- [Future Learn - Digital Accessibility: Enabling Participation in the Information Society](https://www.futurelearn.com/courses/digital-accessibility) - Not Running Now
- [Future Learn - Create Accessible Interfaces](https://www.futurelearn.com/courses/create-accessible-interfaces)
- [Google's Udacity Accessibility course (text version)](https://developers.google.com/web/fundamentals/accessibility/)
- [Google's Udacity Web Accessibility - Developing with Empathy](https://www.udacity.com/course/web-accessibility--ud891)
- [Microsoft's Training teachers to author accessible content ](https://education.microsoft.com/courses-and-resources/courses/training-teachers-to-author-accessible-content)
- [Microsoft's Accessibility fundamentals]()https://docs.microsoft.com/en-us/learn/paths/accessibility-fundamentals/
- [Professional Web #A11y Auditing Made Easy](https://de.ryerson.ca/wa/)
- [Start Building Accessible Web Applications Today, by <NAME>](https://egghead.io/courses/start-building-accessible-web-applications-today)
- [Ryerson University: Introduction to Web Accessibility](https://de.ryerson.ca/wa/introduction/) - Start date TBD
- [Teach Access](http://teachaccess.org/) Study Away Silicon Valley - In partnership with [PEAT](https://www.peatworks.org/)
- [Teach Access Tutorial](https://teachaccess.github.io/tutorial/)
- [OpenU UK Accessibility of eLearning](https://www.open.edu/openlearn/education-development/education-careers/accessibility-elearning/content-section-0?active-tab=content-tab)
- [Study Away Silicon Valley](http://teachaccess.org/studyaway/)
- [UC Berkeley Intro to Course #Accessibility](http://bit.ly/coursea11y) - 6 modules on designing accessible content
- [Open.edu: Assistive technologies and online learning](http://www.open.edu/openlearn/education-development/assistive-technologies-and-online-learning/content-section-0)
- [Ryerson University & Canvas.net: Web Accessibility for Developers](https://www.canvas.net/browse/ryersonu/courses/adv-web-accessibility)
- [University of Colorado Boulder & Coursera: Basics of Inclusive Design for Online Education](https://www.coursera.org/learn/inclusive-design)
- [University of Pittsburgh & Coursera: Disability Awareness and Support](https://www.coursera.org/learn/disability-awareness)
- [Minnesota IT Services: Accessible Word Document Training](https://mn.gov/mnit/about-mnit/accessibility/training/)
- [edX & W3C - Introduction to Web Accessibility](https://www.w3.org/WAI/fundamentals/foundations-course/)
- [edX & Georgia Tech - Information and Communication Technology (ICT) Accessibility](https://www.edx.org/course/information-and-communication-technology-ict-acces)
- [Web.dev's Learn Accessibility](https://web.dev/learn/accessibility/)
- [Accessibility MOOC](http://accessibility.mrooms.net/#a11y) - Inclusive Online Course Design LAST UPDATED 2018

## Webinars
- [3playmedia](http://www.3playmedia.com/resources/webinars/)
- [Accessibility Association](http://www.accessibilityassociation.org/content.asp?contentid=161)
- [Accessibility Talks (A11Y Talks)](https://www.youtube.com/channel/UC__nH6oZrFXcUevljYJKbsw/about) - Virtual meetup and video series

## Educational Videos
- [3playmedia's Videos](http://www.3playmedia.com/resources/videos/)
- [A11ycasts with <NAME>](https://www.youtube.com/playlist?list=PLNYkxOF6rcICWx0C9LVWWVqvHlYJyqw7g)
- [Debugging Accessibility with <NAME>](https://www.youtube.com/watch?v=B9qzdVcIj5U&feature=youtu.be)
- [<NAME>'s Accessibility Presentations](https://marcysutton.com/talks/)
- [State of Texas Creating Accessible Microsoft Office Documents](https://gov.texas.gov/organization/disabilities/accessibledocs)
- [A11ycasts](https://www.youtube.com/results?search_query=A11ycasts) - Created by Google Chrome Developers

## Meetups
Also refer to the [AccessMeetups Twitter list](https://twitter.com/webaxe/lists/accessmeetups) by Web Axe and this [other meetup list](http://www.lireo.com/accessibility-inclusive-design-in-person-groups/) by <NAME>.

- [Accessibility DC](https://www.meetup.com/Accessibility-DC/)
- [Boston Accessibility](https://www.meetup.com/a11yBos/)
- [Buffalo Accessibility Meet-up (Buffa11y)](http://buffa11y.org)
- [Chicago Digital Accessibility and Inclusive Design](https://www.meetup.com/a11ychi/)
- [London Accessibility Meetup](https://www.meetup.com/London-Accessibility-Meetup/)
- [Montreal's web accessibility & inclusive design meet-up](https://www.meetup.com/a11ymtl/)
- [Mid-MO Web Accessibility Meetup](https://www.facebook.com/groups/1981893992043062/)
- [New York City A11yNYC](http://a11ynyc.com/)
- [Ottawa a11yYOW](https://www.meetup.com/a11yOttawa)
- [Portland Accessibility and User Experience Meetup](https://www.meetup.com/Portland-Accessibility-and-User-Experience-Meetup/)
- [Quebec City a11yQC](http://a11yqc.org/)
- [Raleigh-Durham a11yRTP](https://www.meetup.com/a11yRTP/)
- [role=drinks](https://www.roledrinks.com/)
- [role=drinks Hamburg](http://www.roledrinks.de/)
- [San Francisco](https://www.meetup.com/a11ybay/)
- [Seattle Area Accessibility & Inclusive Design](https://www.meetup.com/a11ysea/)
- [Toronto a11yTO](https://www.meetup.com/a11yTo/) - both a meetup and a conference
- [Web Accessibility & Inclusive Design - Sydney ](https://www.meetup.com/Sydney-Web-Accessibility-Inclusive-Design/)
- [Web Accessibility & Inclusive Design - Melbourne](https://www.meetup.com/Melbourne-Web-Accessibility-Inclusive-Design/)
- [Digital Accessibility and Inclusive Design Meetup - Auckland](https://www.meetup.com/Auckland-Digital-Accessibility-and-Inclusive-Design-Meetup/)

## Certificates
- [International Association of Accessibility Professionals (IAAP) Certification](http://www.accessibilityassociation.org/certification)
- [Media Access Australia (W3C Member): Professional Certificate in Web Accessibility](https://www.mediaaccess.org.au/digitalaccessibilityservices/services/education-and-training/pcwa/)
- [Mohawk College: Ontario College Graduate Certificate in Accessible Media Production](https://www.mohawkcollege.ca/programs/graduate-studies/accessible-media-production-390)

## Vendor Materials
- [Chrome & Chrome OS Accessibility (on YouTube)](https://www.youtube.com/playlist?list=PL5aqr5w5fRe7QWzXhqxrilIVduWEmLHM2)

## For More Information
- [Books, tutorials & blogs here](https://github.com/mgifford/a11y-courses/blob/master/Reading-Material.md)
- [Follow these people on Twitter](https://github.com/joe-watkins/top-people-to-follow-in-web-accessibility)
- [A11ySlack Slack Channel](https://developer.paciellogroup.com/blog/2015/07/anybody-can-be-an-a11y-slacker/)

## Other Lists
- [Digital A11y: Digital Accessibility Courses Roundup](https://www.digitala11y.com/digital-accessibility-courses-roundup/)
- [Learn about digital accessibility](https://github.com/katekalcevich/accessible-accessibility/blob/master/Learn%20about%20digital%20accessibility.md) - this is much more than a list, but also has lists.

### Thanks
Appreciate the base set of links from [Jennifer Sutton](https://twitter.com/jsutt) and all the help she's given to me (and others in the community) over the years. Also thanks to [<NAME>](https://twitter.com/dugboticus) for his [list of resources](https://github.com/alphagov/accessibility-guidance/wiki/resources). Thanks also to [<NAME>](https://twitter.com/Zanetti_R) for contributing more.


text:
<file_sep># Traffic4Cast
 DTU 02456 Deep Learning - Final Course Project

 This git is used to a repository of the python code used in the project.

<file_sep># -----------------------------------------------------------------
# h5 file support
# -----------------------------------------------------------------

def load_h5_file(file_path):
    """
    Given a file path to an h5 file assumed to house a tensor,
    load that tensor into memory and return a pointer.
    """
    # load
    fr = h5py.File(file_path, 'r')
    a_group_key = list(fr.keys())[0]
    data = list(fr[a_group_key])
    # transform to appropriate numpy array
    data=data[0:]
    data = np.stack(data, axis=0)
    return data

def print_shape(data):
    """
    print data shape
    """
    print(data.shape)

def write_data_to_h5(data, filename):
    """
    write data in gzipped h5 format
    """
    f = h5py.File(filename, 'w', libver='latest')
    dset = f.create_dataset('array', shape=(data.shape), data=data, compression='gzip', compression_opts=9)
    f.close()

languages: Markdown Python


text:
<file_sep>amadeuz
=======

repo_name: alexandruserban/amadeuz


text:
<repo_name>AlexandrDulovec/wp2-02<file_sep>/index.php
<?php
$amount = filter_input(INPUT_POST, 'amount');
$finalamount = 0 ;
define('EUR_CZK', 25);
define('USD_CZK', 21);
define('RUB_CZK', 0.3);
define('GBP_CZK', 29);
define('USD_EUR', 25);
define('RUB_EUR', 0.3);
define('GBP_EUR', 29);
define('RUB_GBP', 25);
define('USD_GBP', 21);
define('USD_RUB', 0.3);
$sub = filter_input(INPUT_POST, 'odeslat');
$switch =  filter_input(INPUT_POST, 'switch');
$convertfrom;
$convertto;
$text = "Převod úspěšně proběhnul: " ;
?>
<!DOCTYPE html>

<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Převod</title>

<?php
if (isset($sub)) {
    switch ($switch) {
        case 'czk_eur':
            $finalamount = $amount / EUR_CZK ;
            $convertfrom = " CZK " ;
            $convertto = " EUR " ;
                break;
       case 'czk_usd':
                $finalamount = $amount / USD_CZK ;
                $convertfrom = " CZK " ;
                $convertto = " USD " ;
                break;
       case 'czk_gbp':
                    $finalamount = $amount / GBP_CZK ;
                    $convertfrom = " CZK " ;
                    $convertto = " GBP " ;
                            break;
        case 'czk_rub':
                    $finalamount = $amount / RUB_CZK;
                    $convertfrom = " RUB " ;
                    $convertto = " CZK " ;
                    break;
    case 'eur_czk':
            $finalamount = $amount * EUR_CZK ;
            $convertfrom = " EUR " ;
            $convertto = " CZK " ;
            break;
    case 'eur_usd':
            $finalamount = $amount * USD_EUR ;
            $convertfrom = " EUR " ;
            $convertto = " USD " ;
            break;
    case 'eur_rub':
            $finalamount = $amount * RUB_EUR ;
            $convertfrom = " EUR " ;
            $convertto = " RUB " ;
            break;
    case 'eur_gbp':
            $finalamount = $amount * GBP_EUR ;
            $convertfrom = " EUR " ;
            $convertto = " GBP " ;
            break;
    case 'usd_czk':
            $finalamount = $amount * USD_CZK ;
            $convertfrom = " USD " ;
            $convertto = " CZK " ;
            break;
    case 'usd_eur':
            $finalamount = $amount * USD_EUR ;
            $convertfrom = " USD " ;
            $convertto = " EUR " ;
            break;
    case 'usd_rub':
            $finalamount = $amount * USD_RUB ;
            $convertfrom = " USD " ;
            $convertto = " RUB " ;
            break;

    case 'usd_gbp':
            $finalamount = $amount * USD_GBP;
            $convertfrom = " USD " ;
            $convertto = " GBP " ;
            break;
    case 'rub_czk':
            $finalamount = $amount * RUB_CZK ;
            $convertfrom = " USD " ;
            $convertto = " CZK " ;
            break;
    case 'rub_eur':
            $finalamount = $amount * RUB_EUR ;
            $convertfrom = " US " ;
            $convertto = " EUR " ;
            break;
    case 'rub_usd':
            $finalamount = $amount * USD_RUB ;
            $convertfrom = " USD " ;
            $convertto = " RUB " ;
            break;
    case 'rub_gbp':
            $finalamount = $amount * GBP_EUR;
            $convertfrom = " USD " ;
            $convertto = " GBP " ;
            break;
    case 'gbp_czk':
            $finalamount = $amount * GBP_CZK ;
            $convertfrom = " USD " ;
            $convertto = " CZK " ;
            break;
    case 'gbp_eur':
            $finalamount = $amount * GBP_EUR ;
            $convertfrom = " US " ;
            $convertto = " EUR " ;
            break;
    case 'gbp_usd':
            $finalamount = $amount * USD_GBP ;
            $convertfrom = " USD " ;
            $convertto = " RUB " ;
            break;
    case 'gbp_rub':
            $finalamount = $amount * RUB_GBP;
            $convertfrom = " USD " ;
            $convertto = " GBP " ;
            break;
                         }

$all =$text . $amount . $convertfrom . " = " . $final . $convertto ?>
<?= $all ?>
<?php
} else { ?>
<form action="index.php" method="post">

Převod

Vyber:
<select name="castka" id="castka">
  <option value="czk_eur"> Koruny na Eura</option>
  <option value="eur_czk">Eura na Koruny</option>
  <option value="czk_usd">Koruny na Dolary</option>
  <option value="usd_czk">Dolary na Koruny</option>
  <option value="czk_rub">Koruny na Rubůy</option>
  <option value="rub_czk">Rubly na Koruny</option>
  <option value="czk_gbp">Koruny na Libry</option>
  <option value="gbp_czk">Libry na Koruny</option>
  <option value="gbp_eur">Libry na Eura</option>
  <option value="eur_gbp">Eura na Libry</option>
  <option value="gbp_rub">Libry na Rubly</option>
  <option value="rub_gbp">Rubly na Libry</option>
  <option value="usd_eur">Dolary na Eura</option>
  <option value="eur_usd">Eura na Dolary:</option>
  <option value="gbp_usd">Libry na Dolary</option>
  <option value="usd_gbp">Dolary na Libry</option>
  <option value="usd_rub">Dolary na Rubly</option>
  <option value="rub_usd">Dolary na Libry</option>
  <option value="eur_rub">Rubly na Eura</option>
  <option value="rub_eur">Eura na Rubly</option>
  <option value="eur_czk">Koruny na Eura</option>
  <option value="czk_eur">Eura na Koruny</option>
  <option value="czk_usd">Koruny na Dolary</option>
  <option value="usd_czk">Dolary na Koruny</option>
  <option value="czk_rub">Koruny na Rubly</option>
  <option value="rub_czk">Rubly na Koruny</option>
  <option value="czk_gnp">Koruny na Libry</option>
  <option value="gbp_czk">Libry na Koruny</option>
  <option value="gbp_eur">Libry na Eura</option>
  <option value="eur_gbp">Eura na Libry</option>
  <option value="gbp_rub">Libry na Rubly</option>
  <option value="rub_gbp">Rubly na Libry</option>
  <option value="usd_eur">Dolary na Eura</option>
  <option value="eur_usd">Eura na Dolary</option>
  <option value="gbp_usd">Libry na Dolary</option>
  <option value="usd_gbp">Dolary na Libry</option>
  <option value="usd_rub">Dolary na Rubly</option>
  <option value="rub_usd">Rubly na Dolary</option>
  <option value="eur_rub">Rubly na Eura</option>
  <option value="rub_eur">Eura na Rubly</option>
</select>

<input type= "submit" value="Odeslat" name="submit">
</form>
<?php
} ?>

repo_language: PHP


text:
<repo_name>Lrs121/Gibbed.DeadCells<file_sep>/projects/Gibbed.DeadCells.Unpack/Program.cs
/* Copyright (c) 2018 Rick (rick 'at' gibbed 'dot' us)
 *
 * This software is provided 'as-is', without any express or implied
 * warranty. In no event will the authors be held liable for any damages
 * arising from the use of this software.
 *
 * Permission is granted to anyone to use this software for any purpose,
 * including commercial applications, and to alter it and redistribute it
 * freely, subject to the following restrictions:
 *
 * 1. The origin of this software must not be misrepresented; you must not
 *    claim that you wrote the original software. If you use this software
 *    in a product, an acknowledgment in the product documentation would
 *    be appreciated but is not required.
 *
 * 2. Altered source versions must be plainly marked as such, and must not
 *    be misrepresented as being the original software.
 *
 * 3. This notice may not be removed or altered from any source
 *    distribution.
 */

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using Gibbed.IO;
using NDesk.Options;

namespace Gibbed.DeadCells.Unpack
{
    internal class Program
    {
        private static string GetExecutableName()
        {
            return Path.GetFileName(System.Reflection.Assembly.GetExecutingAssembly().Location);
        }

        private struct PakStackDirectory
        {
            public readonly PakDirectory Directory;
            public readonly uint Index;
            public readonly uint Count;

            public PakStackDirectory(PakDirectory directory, uint index, uint count)
            {
                this.Directory = directory;
                this.Index = index;
                this.Count = count;
            }
        }

        private class PakDirectory
        {
            public PakDirectory Parent;
            public string Name;
            public readonly List<PakDirectory> Subdirectories;
            public readonly List<PakFile> Files;

            public PakDirectory()
            {
                this.Subdirectories = new List<PakDirectory>();
                this.Files = new List<PakFile>();
            }
        }

        private class PakFile
        {
            public PakDirectory Parent;
            public string Name;
            public uint Offset;
            public uint Size;
            public uint Hash;
        }

        public static void Main(string[] args)
        {
            bool showHelp = false;
            bool overwriteFiles = false;
            bool verbose = false;

            var options = new OptionSet()
            {
                { "o|overwrite", "overwrite existing files", v => overwriteFiles = v != null },
                { "v|verbose", "be verbose", v => verbose = v != null },
                { "h|help", "show this message and exit", v => showHelp = v != null },
            };

            List<string> extras;

            try
            {
                extras = options.Parse(args);
            }
            catch (OptionException e)
            {
                Console.Write("{0}: ", GetExecutableName());
                Console.WriteLine(e.Message);
                Console.WriteLine("Try `{0} --help' for more information.", GetExecutableName());
                return;
            }

            if (extras.Count < 1 || extras.Count > 2 || showHelp == true)
            {
                Console.WriteLine("Usage: {0} [OPTIONS]+ input_arc [output_dir]", GetExecutableName());
                Console.WriteLine();
                Console.WriteLine("Options:");
                options.WriteOptionDescriptions(Console.Out);
                return;
            }

            var inputPath = Path.GetFullPath(extras[0]);
            var outputPath = extras.Count > 1 ? extras[1] : Path.ChangeExtension(inputPath, null) + "_unpack";

            using (var input = File.OpenRead(inputPath))
            {
                const uint signature = 0x50414B00; // 'PAK\0'
                var magic = input.ReadValueU32(Endian.Big);
                if (magic != signature)
                {
                    throw new FormatException();
                }
                const Endian endian = Endian.Little;

                var headerSize = input.ReadValueU32(endian);
                var dataSize = input.ReadValueU32(endian);

                if (headerSize + dataSize != input.Length)
                {
                    Console.WriteLine("[warning] Pak file size inconsistent!");
                }

                var rootNameLength = input.ReadValueU8();
                if (rootNameLength != 0)
                {
                    throw new FormatException();
                }

                var rootIsDirectory = input.ReadValueB8();
                if (rootIsDirectory == false)
                {
                    throw new FormatException();
                }
                var rootFileCount = input.ReadValueU32(endian);

                var root = new PakDirectory();
                var files = new List<PakFile>();

                var stack = new Stack<PakStackDirectory>();
                stack.Push(new PakStackDirectory(root, 0, rootFileCount));

                while (stack.Count > 0)
                {
                    var item = stack.Pop();
                    var dir = item.Directory;
                    var i = item.Index;
                    var count = item.Count;

                    for (; i < count; i++)
                    {
                        var nameLength = input.ReadValueU8();
                        var name = input.ReadString(nameLength, true, Encoding.UTF8);
                        var isDirectory = input.ReadValueB8();
                        if (isDirectory == false)
                        {
                            var fileOffset = input.ReadValueU32(endian);
                            var fileSize = input.ReadValueU32(endian);
                            var fileHash = input.ReadValueU32(endian);
                            var file = new PakFile()
                            {
                                Parent = dir,
                                Name = name,
                                Offset = fileOffset,
                                Size = fileSize,
                                Hash = fileHash,
                            };
                            dir.Files.Add(file);
                            files.Add(file);
                        }
                        else
                        {
                            var subdir = new PakDirectory()
                            {
                                Parent = dir,
                                Name = name,
                            };
                            dir.Subdirectories.Add(subdir);
                            var subdirFileCount = input.ReadValueU32(endian);
                            stack.Push(new PakStackDirectory(dir, i + 1, count));
                            stack.Push(new PakStackDirectory(subdir, 0, subdirFileCount));
                            break;
                        }
                    }
                }

                var dataMagic = input.ReadValueU32(Endian.Big);
                if (dataMagic != 0x44415441) // 'DATA'
                {
                    Console.WriteLine("[warning] Pak header did not end with 'DATA'! Files will likely be corrupt.");
                }

                if (headerSize != input.Position)
                {
                    Console.WriteLine("[warning] Header size inconsistent! Files will likely be corrupt.");
                }

                long current = 0;
                long total = files.Count;
                var padding = total.ToString(CultureInfo.InvariantCulture).Length;

                foreach (var file in files)
                {
                    current++;

                    var name = file.Name;
                    var dir = file.Parent;
                    while (dir != null && dir.Name != null)
                    {
                        name = Path.Combine(dir.Name, name);
                        dir = dir.Parent;
                    }

                    var entryPath = Path.Combine(outputPath, name);
                    if (overwriteFiles == false && File.Exists(entryPath) == true)
                    {
                        continue;
                    }

                    if (verbose == true)
                    {
                        Console.WriteLine(
                            "[{0}/{1}] {2}",
                            current.ToString(CultureInfo.InvariantCulture).PadLeft(padding),
                            total,
                            name);
                    }

                    var entryDirectory = Path.GetDirectoryName(entryPath);
                    if (entryDirectory != null)
                    {
                        Directory.CreateDirectory(entryDirectory);
                    }

                    input.Position = headerSize + file.Offset;
                    using (var output = File.Create(entryPath))
                    {
                        output.WriteFromStream(input, file.Size);
                    }
                }
            }
        }
    }
}

repo_language: C#


text:
<repo_name>FarhanKhan-tech/Max-Product-Of-4-Adjacent<file_sep>/README.md
# Max-Product-Of-4-Adjacent
Find Max Product Of 4 Adjacent Element In The Matrix Of 20*20

# Clone Repo
# Compile File
javac ProductOfFourAdjacent.java
# Execute Code
java ProductOfFourAdjacent