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 static class CsProjRowExtensions | |
{ | |
private const string _referenceIncludeText = "<Reference Include=\""; | |
public static bool IsReferenceIncludePattern(this string row) | |
=> row != null ? new Regex($"{_referenceIncludeText}.*").IsMatch(row.RowWithoutAdditionSignal()) : false; | |
public static string RowFormatReferenceInclude(this string row) | |
{ | |
var rowSplit = row.RowWithoutAdditionSignal(); |
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
@@ -93,14 +93,14 @@ | |
<Prefer32Bit>true</Prefer32Bit> | |
</PropertyGroup> | |
<ItemGroup> | |
- <Reference Include="System.Data, Version=1.1.3.0, Culture=neutral, processorArchitecture=MSIL"> | |
- <HintPath>..\..\packages\System.Generics.1.1.3\lib\net452\System.Data.dll</HintPath> | |
+ <Reference Include="System.Data, Version=1.0.24.0, Culture=neutral, processorArchitecture=MSIL"> | |
+ <HintPath>..\..\packages\System.Generics.1.0.24-antonio-1.0.25\lib\net452\System.Data.dll</HintPath> | |
</Reference> | |
<Reference Include="System.Other, Version=1.1.3.0, Culture=neutral, processorArchitecture=MSIL"> |
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 class CsprojFileServices : ICsprojFileServices | |
{ | |
public IEnumerable<string> GetChangedReferences(string path) | |
{ | |
var pathJoin = path.Split(new[] {"\n"}, StringSplitOptions.None); | |
return pathJoin.Where(x => x.IsRowAddition() && | |
x.IsReferenceIncludePattern()) | |
.Select(x => x.RowFormatReferenceInclude()); | |
} |
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
services: | |
db-mongo: | |
image: mongo | |
container_name: db-stocks | |
environment: | |
MONGO_INITDB_ROOT_USERNAME: root | |
MONGO_INITDB_ROOT_PASSWORD: root | |
ports: | |
- "27017:27017" | |
networks: |
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
FROM python:3.8 | |
WORKDIR /app | |
COPY /src /app | |
COPY requirements.txt /app | |
RUN pip install -r requirements.txt | |
CMD [ "python", "-u", "__init__.py" ] |
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 schedule | |
import time | |
import datetime | |
import os | |
from models.stock import Stock | |
from scraping import Scraping | |
from models.quote import Quote | |
from repo.mongo import Mongo | |
MINUTES_SCHEDULE = 10 |
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 schedule | |
import time | |
import datetime | |
import os | |
from models.stock import Stock | |
from scraping import Scraping | |
from models.quote import Quote | |
from repo.mongo import Mongo | |
MINUTES_SCHEDULE = 10 |
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
from urllib.request import Request, urlopen | |
from bs4 import BeautifulSoup | |
URL_STOCKS_LIST = 'https://www.infomoney.com.br/cotacoes/empresas-b3/' | |
HEADER_BASE = {'user-agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36'} | |
class Scraping: | |
... | |
def get_stock_value(self, stock): |
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
from urllib.request import Request, urlopen | |
from bs4 import BeautifulSoup | |
URL_STOCKS_LIST = 'https://www.infomoney.com.br/cotacoes/empresas-b3/' | |
HEADER_BASE = {'user-agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36'} | |
class Scraping: | |
... | |
def set_urls(self, list): |
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 class ClienteServices : IClienteServices | |
{ | |
private readonly IMediator _mediator; | |
private readonly IMapper _mapper; | |
private readonly IClienteForQueryRepository _clienteForQueryRepository; | |
public ClienteServices(IMediator mediator, | |
IMapper mapper, | |
IClienteForQueryRepository clienteForQueryRepository) | |
{ |