- Labels Detection
- Faces Detection
- Faces Comparison
- Faces Indexing
- Faces Search
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
# Thanks to Sumarigo-MSFT | |
# https://learn.microsoft.com/en-us/answers/questions/1105984/delete-folder-in-storage-account-through-sdk | |
from azure.identity import DefaultAzureCredential | |
from azure.storage.blob import BlobServiceClient, BlobClient, ContainerClient | |
account_url = "https://{container}.blob.core.windows.net" | |
default_credential = DefaultAzureCredential() | |
# Create the BlobServiceClient object | |
blob_service_client = BlobServiceClient(account_url, credential=default_credential) |
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 csv | |
import sys | |
import os | |
# example usage: python split.py example.csv 200 | |
# above command would split the `example.csv` into smaller CSV files of 200 rows each (with header included) | |
# if example.csv has 401 rows for instance, this creates 3 files in same directory: | |
# - `example_1.csv` (row 1 - 200) | |
# - `example_2.csv` (row 201 - 400) | |
# - `example_3.csv` (row 401) |
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
/* | |
Notes: | |
Despite Scala's appearances, it is, in fact, a Statically Typed language. | |
It has just eliminated a great deal of the "type vomit" people are used | |
to seeing in Statically Typed languages (e.g. C, C++, Java). It often | |
can infer the type on its own. It also combines functional and | |
object-oriented programming paradigms in a fashion that feels similar | |
to Python. | |
*/ |
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
def search_text(text, keyword): | |
with open(text,'r') as t: | |
for period in t: | |
for sentence in period.split('.'): | |
if keyword in sentence: | |
print sentence |
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 os | |
def list_dir(parent): | |
dir = os.listdir(parent) | |
for lists in dir: | |
directory = os.path.join(parent, lists) | |
print directory | |
if os.path.isdir(directory): | |
list_dir(directory) |
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 pandas as pd | |
from leilao.models import Lance | |
lista = ['PTN07-17A-SUCATAS', 'PTN07-17B-SUCATAS', 'PTN07-17C-SUCATAS','PTN07-17D-SUCATAS'] | |
queryset = ( | |
Lance.objects | |
.filter(lote__leilao__nome__in=lista) | |
.values('lote__leilao__nome', 'user__userprofile__nome', 'user__email', 'user__userprofile__telefone1', 'user__userprofile__telefone2') | |
.distinct() |