Skip to content

Instantly share code, notes, and snippets.

View KevinDanikowski's full-sized avatar
💭
Codin ;)

Kevin Danikowski KevinDanikowski

💭
Codin ;)
  • Chicago
View GitHub Profile
Une grande variété de personnes utilisent des outils de synthèse pour différentes raisons. Les étudiants utilisent des outils de ce genre car il est généralement demandé à un étudiant de lire une grande quantité de texte. En termes simples, il n'y a pas assez de temps pour couvrir tous les textes requis dans des cours d'études rigoureux. Par conséquent, un outil de résumé de texte peut aider les étudiants à terminer leurs devoirs à temps tout en s'assurant qu'ils comprennent le contenu. Les étudiants utilisent également ces outils pour s'assurer que leur propre contenu écrit couvre le sujet nécessaire. Les enseignants ont également beaucoup de contenu à lire, que ce soit pour noter des copies et réviser les devoirs des élèves, ou pour créer des plans de cours. Un résumé peut rapidement créer une vue d'ensemble de n'importe quel texte, ce qui permet aux enseignants d'éviter de revoir du contenu sans rapport avec le sujet ou de se concentrer sur des devoirs qui nécessitent plus d'attention que d'autres. Les jou
A wide variety of people use summary tools for different reasons. Students use tools of this kind because it’s generally required that a student must read a large quantity of text. Simply put, there’s not enough time to cover all texts required in rigorous study courses. Therefore, a text summary tool can help students to complete assignments on time while ensuring they understand the content. Students also use these tools to ensure their own written content covers the necessary topic. Teachers also have a lot of content to read, whether it’s for grading papers and reviewing student assignments, or creating lesson plans. A summarizer can quickly create an overview of any text, allowing teachers to avoid reviewing content that’s unrelated to the topic or focuses on assignments that need more attention than others. Journalists and editors use tools of this kind to condense information into bite-sized pieces. This improves the legibility of headlines and introductory paragraphs. Journalists also need to quote ma
@KevinDanikowski
KevinDanikowski / helsinki_language_code_options.json
Last active August 13, 2021 03:51
To and From directions for helsinki language model codes as of Aug 12, 2021 (to and from are sorted by level of estimated success)
{
"aav": {
"to": [{ "symbol": "en", "model": "Helsinki-NLP/opus-mt-aav-en" }],
"from": [{ "symbol": "en", "model": "Helsinki-NLP/opus-mt-en-aav" }]
},
"aed": {
"to": [{ "symbol": "es", "model": "Helsinki-NLP/opus-mt-aed-es" }],
"from": [{ "symbol": "es", "model": "Helsinki-NLP/opus-mt-es-aed" }]
},
"af": {
@KevinDanikowski
KevinDanikowski / multi-lingual-url-formatter.js
Last active June 23, 2021 14:41
formats text into correct url format for any language
const noHyphenLangs = ['ko', 'ja', 'zh-cn', 'zh-tw', 'ar', 'th']
const formatTranslationIntoPath = (text, symbol) => { // utf-8 encoding
let t = text
const replaceChar = noHyphenLangs.includes(symbol) ? '' : '-'
t = t.replace(/-/g, ' ')
t = t.replace(/\s/g, replaceChar)
t = t.replace(/['`’]/g, '') // remove quotes
t = t.replace(/[,,()]/g, '') // remove junk
t = t.normalize('NFD').replace(/\p{Diacritic}/gu, '') // simplify letters for url https://stackoverflow.com/questions/990904/remove-accents-diacritics-in-a-string-in-javascript
@KevinDanikowski
KevinDanikowski / useTesseract.js
Created June 17, 2021 21:22
useTesseract Hook
import { useState, useEffect } from 'react'
import { createWorker } from 'tesseract.js'
export default function useTesseract({ tesseractLanguage = 'eng', log = false }) {
const [tesseractWorker, setTesseractWorker] = useState(null)
const [loadingModel, setLoadingModel] = useState(true)
const [modelError, setModelError] = useState(false)
const [imgResults, setImgResults] = useState({})
const [processing, setProcessing] = useState(false)
const [progress, setProgress] = useState(0)
@KevinDanikowski
KevinDanikowski / chargebee-functions-v2.6.5.json
Created March 13, 2021 22:30
chargebee functions object JSON - v2.6.5
{
"subscription":{
"create":{
"methodName":"create",
"httpMethod":"POST",
"urlPrefix":"/subscriptions",
"urlSuffix":null,
"hasIdInUrl":false,
"isListReq":false
},

How we incorporate next and cloudfront (2018-04-21)

Feel free to contact me at robert.balicki@gmail.com or tweet at me @statisticsftw

This is a rough outline of how we utilize next.js and S3/Cloudfront. Hope it helps!

It assumes some knowledge of AWS.

Goals

@KevinDanikowski
KevinDanikowski / server.js
Created July 27, 2020 19:17
cognito-express with graphql endpoint checking JWT
// imports...
import { graphqlHTTP } from 'express-graphql'
import cors from 'cors'
import CognitoExpress from 'cognito-express'
// will fetch the pems.json
const cognitoExpress = new CognitoExpress({
region: ENV_FILE.awsRegion,
cognitoUserPoolId: ENV_FILE.cognitoUserPoolId,
tokenUse: 'access', //Possible Values: access | id
// I'VE COPIED WHOLE FILE FOR REFERENCE, ONLY THE HEADERS PART HAS CHANGED
// THIS FILE: https://github.com/amclin/react-project-boilerplate/blob/master/templates/default/src/utils/apollo.jsx
/* eslint-disable react/jsx-props-no-spreading, no-console */
/* FOR SERVER SIDE RENDERING APOLLO FETCHES: Use unmodifed link below.
* https://github.com/zeit/next.js/blob/canary/examples/with-apollo/lib/apollo.js
* this file is modified from link above. Had some issues getting it to work with hooks.
*/
import React from 'react'
import { ApolloProvider } from '@apollo/react-hooks'
import { ApolloClient, createHttpLink, InMemoryCache } from '@apollo/client'
// PROTECTED PAGE
import React from 'react'
import { Loading } from '../components/QueryHandling'
import { useAuth } from '../lib/UserContext'
export default function ProtectedPage() {
const { user } = useAuth(true)
if (!user) {
return <Loading />