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
public async Task SaveEmployees(ICollection<EmployeeImportDto> employees) | |
{ | |
// set maximum 8 concurrent tasks | |
var throttler = new SemaphoreSlim(initialCount: 8); | |
var tasks = employees.Select(async item => | |
{ | |
await throttler.WaitAsync(); | |
try | |
{ | |
await SaveEmployee(item).ConfigureAwait(false); |
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
const NumberToAlphabetFilter = function(input) { | |
let temp = ""; | |
let trilliongan = Math.floor(input / 1000000000000000); | |
let sadbilliongan = Math.floor( | |
(input - trilliongan * 1000000000000000) / 100000000000000 | |
); | |
let dahbilliongan = Math.floor( | |
(input - | |
(trilliongan * 1000000000000000 + sadbilliongan * 100000000000000)) / | |
10000000000000 |
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 Vue from 'vue' | |
Vue.filter('replaceArabicLetters', value => { | |
const letters = { | |
'ك': 'ک', | |
'دِ': 'د', | |
'بِ': 'ب', | |
'زِ': 'ز', | |
'ذِ': 'ذ', | |
'شِ': 'ش', |
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
# -*- coding: utf-8 -*- | |
import scrapy | |
import json | |
from ..items import MovieItem | |
class TopmoviesSpider(scrapy.Spider): | |
name = 'topMovies' | |
allowed_domains = ['imdb.com'] | |
start_urls = ['https://www.imdb.com/chart/top/'] |
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
class MovieItem(scrapy.Item): | |
url = scrapy.Field() | |
name = scrapy.Field() | |
image = scrapy.Field() | |
genre = scrapy.Field() | |
contentRating = scrapy.Field() | |
actor = scrapy.Field() | |
creator = scrapy.Field() | |
description = scrapy.Field() | |
datePublished = scrapy.Field() |
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
# -*- coding: utf-8 -*- | |
import scrapy | |
class TopmoviesSpider(scrapy.Spider): | |
name = 'topMovies' | |
allowed_domains = ['imdb.com'] | |
start_urls = ['https://www.imdb.com/chart/top/'] | |
def parse(self, response): |
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
# -*- coding: utf-8 -*- | |
import scrapy | |
class TopmoviesSpider(scrapy.Spider): | |
name = 'topMovies' | |
allowed_domains = ['imdb.com'] | |
start_urls = ['https://www.imdb.com/chart/top/'] | |
def parse(self, response): |