ng-apimock is a tool that provides scenario based API mocking. It can be used to test and develop applications without the need of a backend. Alternatively you can also chose to let certain calls through to the actual backend and apply mocking selectively.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable max-classes-per-file */ | |
/* eslint-disable @angular-eslint/component-selector */ | |
import { | |
ChangeDetectionStrategy, | |
Component, | |
effect, | |
inject, | |
Injectable, | |
OnInit, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"extends": ["../../../../.eslintrc.json"], | |
"ignorePatterns": ["!**/*"], | |
"overrides": [ | |
{ | |
"files": ["*.ts"], | |
"rules": { | |
"@angular-eslint/directive-selector": [ | |
"error", | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"root": true, | |
"ignorePatterns": ["**/*"], | |
"plugins": ["@nx"], | |
"overrides": [ | |
{ | |
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"], | |
"parser": "@typescript-eslint/parser", | |
"parserOptions": { | |
"project": ["./tsconfig.base.json"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Tic Tac Toe Player | |
""" | |
import math | |
import random | |
import copy | |
X = "X" | |
O = "O" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Sources: | |
* https://www.rollingstone.com/movies/movie-lists/best-sports-movies-rocky-rudy-71467/ | |
* https://www.vulture.com/article/best-sports-movies-ranked.html | |
* | |
* Combined and de-duplicated list from both sources, resulted in 62 movies | |
* Both documentary and feature films are included in this list... | |
* | |
* Is 'The Big Lebowski' really a bowling film? | |
* Are coaches movies their own genre? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
ignorePatterns: ['.eslintrc.js'], | |
env: { | |
browser: true, | |
es6: true, | |
}, | |
parser: '@typescript-eslint/parser', | |
parserOptions: { | |
project: 'tsconfig.json', | |
sourceType: 'module', |
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 6.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
firstname,password,content,rating | |
bertrand1982,X5v4ADGuBN,Pellentesque viverra pede ac diam. Cras pellentesque volutpat dui.,4 | |
thacher1983,Wiag8z,"Nunc nisl. Duis bibendum, felis sed interdum venenatis, turpis enim blandit mi, in porttitor pede justo eu massa.",3 | |
jereme1982,BguqtD,Nullam porttitor lacus at turpis. Donec posuere metus vitae ipsum. Aliquam non mauris. Morbi non lectus. Aliquam sit amet diam in magna bibendum imperdiet.,1 | |
delora1980,F1lQIPAR,"Proin at turpis a pede posuere nonummy. Integer non velit. Donec diam neque, vestibulum eget, vulputate ut, ultrices vel, augue. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec pharetra, magna vestibulum aliquet ultrices, erat tortor sollicitudin mi, sit amet lobortis sapien sapien non mi.",3 | |
ursuline1975,MpmI7BGBCmMi,"Integer non velit. Donec diam neque, vestibulum eget, vulputate ut, ultrices vel, augue. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec pharetra, mag |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Resources | |
# https://www.pyimagesearch.com/2015/09/07/blur-detection-with-opencv/ | |
# https://stackoverflow.com/questions/52505906/find-if-image-is-bright-or-dark | |
# https://towardsdatascience.com/automatic-image-quality-assessment-in-python-391a6be52c11 | |
# https://towardsdatascience.com/deep-image-quality-assessment-with-tensorflow-2-0-69ed8c32f195 | |
""" | |
This CLI takes in a path, brightness and sharpness thresholds and then | |
recursively searches images in the provided folder, evaluates the file | |
and either keeps the ones of acceptable quality or moves them to the trashbin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sqlite3 | |
import sys | |
def main(): | |
if len(sys.argv) < 2: | |
print("I") | |
return |
NewerOlder