edited_code
stringlengths
17
978k
original_code
stringlengths
17
978k
import requests, json #Buscar estudiantes por ID url = 'http://school.labs.com.es/api/students/' #Ingresar el ID con input id_ = input("Digame el ID: ") data = None headers = { 'Content-Type' : 'application/json' } response = requests.get(url + str(id_)) if (response.status_code == 200): data = response.json() ...
import requests, json #Buscar estudiantes por ID url = 'http://school.labs.com.es/api/students/' #Ingresar el ID con input id_ = input("Digame el ID: ") data = None headers = { 'Content-Type' : 'application/json' } response = requests.get(url + str(id_)) if (response.status_code == 200): data = response.json() ...
import os from collections import Counter from pathlib import Path from typing import List, Optional, Tuple import numpy as np from tqdm import tqdm from .filter import get_agents_slice_from_frames, get_frames_slice_from_scenes, get_tl_faces_slice_from_frames from .zarr_dataset import ChunkedDataset GIGABYTE = 1 * 1...
import os from collections import Counter from pathlib import Path from typing import List, Optional, Tuple import numpy as np from tqdm import tqdm from .filter import get_agents_slice_from_frames, get_frames_slice_from_scenes, get_tl_faces_slice_from_frames from .zarr_dataset import ChunkedDataset GIGABYTE = 1 * 1...
""" Functions and data to use for formatting Pathoscope and NuVs analysis document. Formatted documents are destined for API responses or CSV/Excel formatted file downloads. """ import asyncio import csv import io import json import statistics from collections import defaultdict import aiofiles import openpyxl.styles...
""" Functions and data to use for formatting Pathoscope and NuVs analysis document. Formatted documents are destined for API responses or CSV/Excel formatted file downloads. """ import asyncio import csv import io import json import statistics from collections import defaultdict import aiofiles import openpyxl.styles...
""" Retreives configuration from the config file """ from json import loads from requests import get from configparser import ConfigParser, ParsingError from modules.exceptions import ConfigError ## DiscordIds discord_ids = { "lobby" : 0, "register" : 0, "matches" : list(), "results" : 0, "rules"...
""" Retreives configuration from the config file """ from json import loads from requests import get from configparser import ConfigParser, ParsingError from modules.exceptions import ConfigError ## DiscordIds discord_ids = { "lobby" : 0, "register" : 0, "matches" : list(), "results" : 0, "rules"...
from consts import * class Time: def __init__(self, date, time_in_day): self.date = date self.time_in_day = time_in_day def __str__(self): return f"{self.date} {self.time_in_day}" class Traveler: def __init__(self, name, is_child): self.name = name self.is_child =...
from consts import * class Time: def __init__(self, date, time_in_day): self.date = date self.time_in_day = time_in_day def __str__(self): return f"{self.date} {self.time_in_day}" class Traveler: def __init__(self, name, is_child): self.name = name self.is_child =...
import glob import random import itertools import numpy as np from collections import Counter import xml.etree.ElementTree as ET from matplotlib import pyplot as plt def get_path(dataset:str='Restaurant', language: str='English', mode: str='Train'): file_type = {'Test': 'B', 'Train':'xml'} ...
import glob import random import itertools import numpy as np from collections import Counter import xml.etree.ElementTree as ET from matplotlib import pyplot as plt def get_path(dataset:str='Restaurant', language: str='English', mode: str='Train'): file_type = {'Test': 'B', 'Train':'xml'} ...
class Switch(object): def __init__(self, session): super(Switch, self).__init__() self._session = session def getDeviceSwitchPorts(self, serial: str): """ **List the switch ports for a switch** https://developer.cisco.com/meraki/api-v1/#!get-device-switch-ports...
class Switch(object): def __init__(self, session): super(Switch, self).__init__() self._session = session def getDeviceSwitchPorts(self, serial: str): """ **List the switch ports for a switch** https://developer.cisco.com/meraki/api-v1/#!get-device-switch-ports...
from unittest import TestCase from tests import abspath from pytezos.repl.interpreter import Interpreter from pytezos.michelson.converter import michelson_to_micheline from pytezos.repl.parser import parse_expression class OpcodeTestmap_map_112(TestCase): def setUp(self): self.maxDiff = None se...
from unittest import TestCase from tests import abspath from pytezos.repl.interpreter import Interpreter from pytezos.michelson.converter import michelson_to_micheline from pytezos.repl.parser import parse_expression class OpcodeTestmap_map_112(TestCase): def setUp(self): self.maxDiff = None se...
"""Common stuff for AVM Fritz!Box tests.""" from homeassistant.components import ssdp from homeassistant.components.fritz.const import DOMAIN from homeassistant.components.ssdp import ATTR_UPNP_FRIENDLY_NAME, ATTR_UPNP_UDN from homeassistant.const import ( CONF_DEVICES, CONF_HOST, CONF_PASSWORD, CONF_PO...
"""Common stuff for AVM Fritz!Box tests.""" from homeassistant.components import ssdp from homeassistant.components.fritz.const import DOMAIN from homeassistant.components.ssdp import ATTR_UPNP_FRIENDLY_NAME, ATTR_UPNP_UDN from homeassistant.const import ( CONF_DEVICES, CONF_HOST, CONF_PASSWORD, CONF_PO...
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2012 thomasv@gitorious # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including witho...
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2012 thomasv@gitorious # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including witho...
import os from collections import defaultdict from datetime import datetime as dt import numpy as np from .utils.ek_raw_io import RawSimradFile, SimradEOF FILENAME_DATETIME_EK60 = ( "(?P<survey>.+)?-?D(?P<date>\\w{1,8})-T(?P<time>\\w{1,6})-?(?P<postfix>\\w+)?.raw" ) class ParseBase: """Parent class for all...
import os from collections import defaultdict from datetime import datetime as dt import numpy as np from .utils.ek_raw_io import RawSimradFile, SimradEOF FILENAME_DATETIME_EK60 = ( "(?P<survey>.+)?-?D(?P<date>\\w{1,8})-T(?P<time>\\w{1,6})-?(?P<postfix>\\w+)?.raw" ) class ParseBase: """Parent class for all...
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.d (the "License"); # you may not use this file except in compliance with the License. # from datetime import datetime from covid import Covid from userbot import CMD_HELP from userbot.events import registe...
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.d (the "License"); # you may not use this file except in compliance with the License. # from datetime import datetime from covid import Covid from userbot import CMD_HELP from userbot.events import registe...
from typing import Any from datetime import datetime def to_utc(dt: datetime) -> datetime: return datetime.fromtimestamp(dt.timestamp()) def backoff_handler(details: Any) -> None: from src.log import logger logger.warning( f"backing off after {details.get("tries", "???")} tries, waiting {detail...
from typing import Any from datetime import datetime def to_utc(dt: datetime) -> datetime: return datetime.fromtimestamp(dt.timestamp()) def backoff_handler(details: Any) -> None: from src.log import logger logger.warning( f"backing off after {details.get('tries', '???')} tries, waiting {detail...
""" Vaccines blueprint views """ import time from flask import render_template from flask_babel import gettext from app.data_tools import ( get_latest_vax_update, get_perc_pop_vax, enrich_frontend_data, get_admins_perc, get_vax_trends, get_area_population ) from app.ui import vaccines from settings import PAG...
""" Vaccines blueprint views """ import time from flask import render_template from flask_babel import gettext from app.data_tools import ( get_latest_vax_update, get_perc_pop_vax, enrich_frontend_data, get_admins_perc, get_vax_trends, get_area_population ) from app.ui import vaccines from settings import PAG...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
from brandfolder.resource import Resource from brandfolder.resource_container import ResourceContainer from brandfolder.asset import Asset from brandfolder.attachment import Attachment class Collection(Resource): RESOURCE_NAME = 'Collection' RESOURCE_TYPE = 'collections' def __init__(self, client, **kwar...
from brandfolder.resource import Resource from brandfolder.resource_container import ResourceContainer from brandfolder.asset import Asset from brandfolder.attachment import Attachment class Collection(Resource): RESOURCE_NAME = 'Collection' RESOURCE_TYPE = 'collections' def __init__(self, client, **kwar...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Andre Augusto Giannotti Scota (https://sites.google.com/view/a2gs/) import sys, os, locale import requests WTValidAssets = ['BRL-XBT', 'XBT-BRL'] def printUsage(exec: str): print('Walltime command line') print('-mi\t\tMarket info') print('-ob\t\tOrder book') prin...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Andre Augusto Giannotti Scota (https://sites.google.com/view/a2gs/) import sys, os, locale import requests WTValidAssets = ['BRL-XBT', 'XBT-BRL'] def printUsage(exec: str): print('Walltime command line') print('-mi\t\tMarket info') print('-ob\t\tOrder book') prin...
"""Runway module utilities.""" from __future__ import annotations import logging import os import platform import subprocess import sys from pathlib import Path from typing import TYPE_CHECKING, Dict, List, Optional, Union, cast from ..utils import which if TYPE_CHECKING: from .._logging import RunwayLogger LOG...
"""Runway module utilities.""" from __future__ import annotations import logging import os import platform import subprocess import sys from pathlib import Path from typing import TYPE_CHECKING, Dict, List, Optional, Union, cast from ..utils import which if TYPE_CHECKING: from .._logging import RunwayLogger LOG...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @Author : richardchien @Date : 2020-04-14 22:10:53 @LastEditors: yanyongyu @LastEditTime: 2020-04-14 22:21:30 @Description : None @GitHub : https://github.com/richardchien """ __author__ = "richardchien" import re import math from datetime...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @Author : richardchien @Date : 2020-04-14 22:10:53 @LastEditors: yanyongyu @LastEditTime: 2020-04-14 22:21:30 @Description : None @GitHub : https://github.com/richardchien """ __author__ = "richardchien" import re import math from datetime...
import argparse import gc import os from pathlib import Path import numpy as np import pandas as pd import features import metrics import preprocess import utils from dataset import DSB2019Dataset from optimizedrounder import HistBaseRounder from weightoptimzer import WeightOptimzer from runner import Runner parser ...
import argparse import gc import os from pathlib import Path import numpy as np import pandas as pd import features import metrics import preprocess import utils from dataset import DSB2019Dataset from optimizedrounder import HistBaseRounder from weightoptimzer import WeightOptimzer from runner import Runner parser ...
"""This module contains helper functions when working with sklearn (scikit-learn) objects; in particular, for evaluating models""" # pylint: disable=too-many-lines import math import warnings from re import match from typing import Tuple, Union, Optional, List, Dict import numpy as np import pandas as pd import scipy....
"""This module contains helper functions when working with sklearn (scikit-learn) objects; in particular, for evaluating models""" # pylint: disable=too-many-lines import math import warnings from re import match from typing import Tuple, Union, Optional, List, Dict import numpy as np import pandas as pd import scipy....
#!/usr/bin/env python import copy import logging import optparse import os import random import sqlite3 import string import sys import threading from typing import Optional, Union, Tuple, List, Dict import pump import pump_bfd import pump_csv import pump_cb import pump_gen import pump_mc import pump_dcp from pump ...
#!/usr/bin/env python import copy import logging import optparse import os import random import sqlite3 import string import sys import threading from typing import Optional, Union, Tuple, List, Dict import pump import pump_bfd import pump_csv import pump_cb import pump_gen import pump_mc import pump_dcp from pump ...
# Copyright 2020 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
# Copyright 2020 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
import copy import logging import re from prettytable import PrettyTable from collections import defaultdict from subprocess import TimeoutExpired from ocs_ci.ocs.machine import get_machine_objs from ocs_ci.framework import config from ocs_ci.ocs.exceptions import TimeoutExpiredError from ocs_ci.ocs.ocp import OCP f...
import copy import logging import re from prettytable import PrettyTable from collections import defaultdict from subprocess import TimeoutExpired from ocs_ci.ocs.machine import get_machine_objs from ocs_ci.framework import config from ocs_ci.ocs.exceptions import TimeoutExpiredError from ocs_ci.ocs.ocp import OCP f...
#!/usr/bin/env python3 import sys import yaml import ipaddress import urllib.parse import subprocess import socket import requests import re import logging import random import string import hashlib import os def checksum(filename, hashfunc): with open(filename,"rb") as f: for byte_block in iter(lambda: f...
#!/usr/bin/env python3 import sys import yaml import ipaddress import urllib.parse import subprocess import socket import requests import re import logging import random import string import hashlib import os def checksum(filename, hashfunc): with open(filename,"rb") as f: for byte_block in iter(lambda: f...
import json import logging from logging import Logger from typing import Optional from botocore.client import BaseClient from slack_sdk.oauth.installation_store.async_installation_store import ( AsyncInstallationStore, ) from slack_sdk.oauth.installation_store.installation_store import InstallationStore from slac...
import json import logging from logging import Logger from typing import Optional from botocore.client import BaseClient from slack_sdk.oauth.installation_store.async_installation_store import ( AsyncInstallationStore, ) from slack_sdk.oauth.installation_store.installation_store import InstallationStore from slac...
# The functions detailed below are all translation from Javascript. # The original code was done by alvaro-cuesta here https://github.com/alvaro-cuesta/townsclipper # Thank you very much for it ! # IMPORTANT NOTES: # # Input looks like base64url but IT IS NOT! Notice the alphabet's out-of-order "w" # and the swapped "...
# The functions detailed below are all translation from Javascript. # The original code was done by alvaro-cuesta here https://github.com/alvaro-cuesta/townsclipper # Thank you very much for it ! # IMPORTANT NOTES: # # Input looks like base64url but IT IS NOT! Notice the alphabet's out-of-order "w" # and the swapped "...
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ 2020-07-06-extrapolation.py: based on small subsampled DoEs, extrapolate a best suggested next DoE size and compare this with results from enumerated DoEs. """ import matplotlib.pyplot as plt import numpy as np import xarray as xr from pyprojroot import here from parse i...
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ 2020-07-06-extrapolation.py: based on small subsampled DoEs, extrapolate a best suggested next DoE size and compare this with results from enumerated DoEs. """ import matplotlib.pyplot as plt import numpy as np import xarray as xr from pyprojroot import here from parse i...
"""A simple HTML visualizer. It is based on the Cycle-GAN codebase: https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix """ import os import numpy as np from pathlib import Path from . import util, html class Visualizer: """This class includes several functions that can display/save images. It uses a Py...
"""A simple HTML visualizer. It is based on the Cycle-GAN codebase: https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix """ import os import numpy as np from pathlib import Path from . import util, html class Visualizer: """This class includes several functions that can display/save images. It uses a Py...
""" Copyright (c) 2020 OneUpPotato Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softwar...
""" Copyright (c) 2020 OneUpPotato Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softwar...
""" Methods need to work with Oracle DB(misc) oracle = OracleDB() connection, cursor = oracle.connect() #This is space for you query's. #For example: all = Select().Dictionary().all(oracle, cursor)) oracle.close(connection, cursor) """ from datetime import datetime import cx_Oracle as Oracle from config import Misc ...
""" Methods need to work with Oracle DB(misc) oracle = OracleDB() connection, cursor = oracle.connect() #This is space for you query's. #For example: all = Select().Dictionary().all(oracle, cursor)) oracle.close(connection, cursor) """ from datetime import datetime import cx_Oracle as Oracle from config import Misc ...
import decimal import uuid import base64 import requests import json from datetime import datetime from flask import request, current_app, Response from flask_restplus import Resource, reqparse from werkzeug.datastructures import FileStorage from werkzeug import exceptions from sqlalchemy.exc import DBAPIError from ....
import decimal import uuid import base64 import requests import json from datetime import datetime from flask import request, current_app, Response from flask_restplus import Resource, reqparse from werkzeug.datastructures import FileStorage from werkzeug import exceptions from sqlalchemy.exc import DBAPIError from ....
import tkinter as tk from tkinter import messagebox from threading import Thread from time import sleep import constants.all as c from components.semaphore import Semaphore, SemaphoreKind from components.record import Record, RecordKind from components.openLogButton import OpenLogButton from modules.finder import read ...
import tkinter as tk from tkinter import messagebox from threading import Thread from time import sleep import constants.all as c from components.semaphore import Semaphore, SemaphoreKind from components.record import Record, RecordKind from components.openLogButton import OpenLogButton from modules.finder import read ...
#!/usr/bin/env python3 import concurrent.futures import json import os import subprocess import sys import tempfile import yaml import model.kubernetes import kube.ctx from ci.util import ( Failure, info, which, ) own_dir = os.path.abspath(os.path.dirname(__file__)) repo_dir = os.path.abspath(os.path.j...
#!/usr/bin/env python3 import concurrent.futures import json import os import subprocess import sys import tempfile import yaml import model.kubernetes import kube.ctx from ci.util import ( Failure, info, which, ) own_dir = os.path.abspath(os.path.dirname(__file__)) repo_dir = os.path.abspath(os.path.j...
import os import torch import pandas as pd from PIL import Image import numpy as np from wilds.datasets.wilds_dataset import WILDSDataset from wilds.common.grouper import CombinatorialGrouper from wilds.common.metrics.all_metrics import Accuracy class WaterbirdsDataset(WILDSDataset): """ The Waterbi...
import os import torch import pandas as pd from PIL import Image import numpy as np from wilds.datasets.wilds_dataset import WILDSDataset from wilds.common.grouper import CombinatorialGrouper from wilds.common.metrics.all_metrics import Accuracy class WaterbirdsDataset(WILDSDataset): """ The Waterbi...
from typing import Dict, Optional, List, Set, Tuple, Union import pytest import torch from allennlp.common import Params from allennlp.common.from_params import FromParams, takes_arg, remove_optional, create_kwargs from allennlp.common.testing import AllenNlpTestCase from allennlp.data import DatasetReader, Tokenizer...
from typing import Dict, Optional, List, Set, Tuple, Union import pytest import torch from allennlp.common import Params from allennlp.common.from_params import FromParams, takes_arg, remove_optional, create_kwargs from allennlp.common.testing import AllenNlpTestCase from allennlp.data import DatasetReader, Tokenizer...
import json import logging from pathlib import Path from typing import List import aiofiles from bot.bot import Friendo from bot.settings import MEME_PASSWORD, MEME_USERNAME MEME_DIR = Path.cwd() / 'bot' / 'meme_api' / 'json' / 'meme_list.json' log = logging.getLogger(__name__) class Meme: """Pulls meme templa...
import json import logging from pathlib import Path from typing import List import aiofiles from bot.bot import Friendo from bot.settings import MEME_PASSWORD, MEME_USERNAME MEME_DIR = Path.cwd() / 'bot' / 'meme_api' / 'json' / 'meme_list.json' log = logging.getLogger(__name__) class Meme: """Pulls meme templa...
""" Provides linkedin api-related code """ import random import logging from time import sleep from urllib.parse import urlencode import json from linkedin_api.utils.helpers import get_id_from_urn from linkedin_api.client import Client logger = logging.getLogger(__name__) def default_evade(): """ A catch-a...
""" Provides linkedin api-related code """ import random import logging from time import sleep from urllib.parse import urlencode import json from linkedin_api.utils.helpers import get_id_from_urn from linkedin_api.client import Client logger = logging.getLogger(__name__) def default_evade(): """ A catch-a...
import uuid import time import ipaddress from .. import context from lyrebird import utils from lyrebird import application from lyrebird.log import get_logger from lyrebird.mock.blueprints.apis.bandwidth import config from urllib.parse import urlparse, unquote from .http_data_helper import DataHelper from .http_heade...
import uuid import time import ipaddress from .. import context from lyrebird import utils from lyrebird import application from lyrebird.log import get_logger from lyrebird.mock.blueprints.apis.bandwidth import config from urllib.parse import urlparse, unquote from .http_data_helper import DataHelper from .http_heade...
#!/usr/bin/env python3 from glob import glob from os import getcwd from shutil import move from sys import argv print(argv) if len(argv) < 4: print(f"Usage: <name> <season> <extension>") quit() name = argv[1] season = argv[2] ext = argv[3] files = sorted(glob(f"{getcwd()}/*.{ext}")) to_move = [] for index, ...
#!/usr/bin/env python3 from glob import glob from os import getcwd from shutil import move from sys import argv print(argv) if len(argv) < 4: print(f"Usage: <name> <season> <extension>") quit() name = argv[1] season = argv[2] ext = argv[3] files = sorted(glob(f"{getcwd()}/*.{ext}")) to_move = [] for index, ...
import asyncio from typing import Callable, List from playwright.async_api import Page, TimeoutError from tqdm import tqdm from tiktokpy.client import Client from tiktokpy.utils import unique_dicts_by_key from tiktokpy.utils.client import catch_response_and_store, catch_response_info from tiktokpy.utils.logger import...
import asyncio from typing import Callable, List from playwright.async_api import Page, TimeoutError from tqdm import tqdm from tiktokpy.client import Client from tiktokpy.utils import unique_dicts_by_key from tiktokpy.utils.client import catch_response_and_store, catch_response_info from tiktokpy.utils.logger import...
# Copyright (c) 2011-2021, Camptocamp SA # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright notice, this # list of conditions an...
# Copyright (c) 2011-2021, Camptocamp SA # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright notice, this # list of conditions an...
import json as _json import multiprocessing as _mp import os as _os from collections import Callable from functools import partial as _partial from os import sep as _sep import numpy as _np import torch as _torch import torch.utils.data as _data from torch.utils.data import DataLoader as _DataLoader, Dataset as _Datas...
import json as _json import multiprocessing as _mp import os as _os from collections import Callable from functools import partial as _partial from os import sep as _sep import numpy as _np import torch as _torch import torch.utils.data as _data from torch.utils.data import DataLoader as _DataLoader, Dataset as _Datas...
from os import path from tkinter.filedialog import askdirectory, askopenfile from tkinter.ttk import Progressbar from tkinter import Menu, messagebox from tor_handler import TorHandler from toplevel_window_manager import ToplevelManager from video_quality_selector_manager import VideoQualitySelector import threading im...
from os import path from tkinter.filedialog import askdirectory, askopenfile from tkinter.ttk import Progressbar from tkinter import Menu, messagebox from tor_handler import TorHandler from toplevel_window_manager import ToplevelManager from video_quality_selector_manager import VideoQualitySelector import threading im...
import base64 import binascii import codecs import secrets import discord from discord.ext import commands class Encryption(commands.Cog): def __init__(self, bot): self.bot = bot @commands.group() async def encode(self, ctx): """ All encode methods """ if ctx.invoked_subcommand is...
import base64 import binascii import codecs import secrets import discord from discord.ext import commands class Encryption(commands.Cog): def __init__(self, bot): self.bot = bot @commands.group() async def encode(self, ctx): """ All encode methods """ if ctx.invoked_subcommand is...
"""A container for specifying and manipulating a graph with distinct inputs and outputs.""" import time import warnings from collections import OrderedDict from typing import Any, Dict, List, NoReturn, Optional, Tuple, Union import aesara from aesara.configdefaults import config from aesara.graph.basic import Apply, C...
"""A container for specifying and manipulating a graph with distinct inputs and outputs.""" import time import warnings from collections import OrderedDict from typing import Any, Dict, List, NoReturn, Optional, Tuple, Union import aesara from aesara.configdefaults import config from aesara.graph.basic import Apply, C...
from __future__ import annotations import json from typing import Union from anyio import TASK_STATUS_IGNORED import voluptuous as vol from homeassistant.components import websocket_api from homeassistant.components.trace import async_get_trace, async_list_traces from homeassistant.components.websocket_api import asy...
from __future__ import annotations import json from typing import Union from anyio import TASK_STATUS_IGNORED import voluptuous as vol from homeassistant.components import websocket_api from homeassistant.components.trace import async_get_trace, async_list_traces from homeassistant.components.websocket_api import asy...
#!/usr/bin/env python # encoding: utf-8 # The MIT License (MIT) # Copyright (c) 2016-2019 CNRS # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limita...
#!/usr/bin/env python # encoding: utf-8 # The MIT License (MIT) # Copyright (c) 2016-2019 CNRS # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limita...
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
import argparse import binascii import collections import re import sys import webbrowser import wcwidth from .main import available_fonts_for_codepoint from .preview_server import FontPreviewServer __RE_GET_NAME__ = re.compile(r'"\.?([^"]+)"') __RE_UNICODE_HEX__ = re.compile(r'^U\+[0-9a-fA-F]{4,6}$') def parser_a...
import argparse import binascii import collections import re import sys import webbrowser import wcwidth from .main import available_fonts_for_codepoint from .preview_server import FontPreviewServer __RE_GET_NAME__ = re.compile(r'"\.?([^"]+)"') __RE_UNICODE_HEX__ = re.compile(r'^U\+[0-9a-fA-F]{4,6}$') def parser_a...
import logging import uuid from datetime import datetime import architect from django.contrib.auth.models import AnonymousUser, User from django.db import models from django.utils.functional import cached_property from dimagi.utils.web import get_ip from corehq.apps.domain.utils import get_domain_from_url from core...
import logging import uuid from datetime import datetime import architect from django.contrib.auth.models import AnonymousUser, User from django.db import models from django.utils.functional import cached_property from dimagi.utils.web import get_ip from corehq.apps.domain.utils import get_domain_from_url from core...
#!/usr/bin/env python # -*- coding: utf-8 -*- """The setup script.""" import re from setuptools import setup, find_packages from distutils.core import Command class DepsCommand(Command): """A custom distutils command to print selective dependency groups. # show available dependency groups: python setup...
#!/usr/bin/env python # -*- coding: utf-8 -*- """The setup script.""" import re from setuptools import setup, find_packages from distutils.core import Command class DepsCommand(Command): """A custom distutils command to print selective dependency groups. # show available dependency groups: python setup...
import re import yaml from . import gcloud from .cluster_config import ClusterConfig DEFAULT_PROPERTIES = { "spark:spark.task.maxFailures": "20", "spark:spark.driver.extraJavaOptions": "-Xss4M", "spark:spark.executor.extraJavaOptions": "-Xss4M", 'spark:spark.speculation': 'true', "hdfs:dfs.replic...
import re import yaml from . import gcloud from .cluster_config import ClusterConfig DEFAULT_PROPERTIES = { "spark:spark.task.maxFailures": "20", "spark:spark.driver.extraJavaOptions": "-Xss4M", "spark:spark.executor.extraJavaOptions": "-Xss4M", 'spark:spark.speculation': 'true', "hdfs:dfs.replic...
import datetime import re from django.http import HttpResponse from django.utils.dateparse import parse_datetime from openpyxl import Workbook from security.models import credit_sources, disbursement_methods from security.templatetags.security import ( currency, format_card_number, format_sort_code, format_re...
import datetime import re from django.http import HttpResponse from django.utils.dateparse import parse_datetime from openpyxl import Workbook from security.models import credit_sources, disbursement_methods from security.templatetags.security import ( currency, format_card_number, format_sort_code, format_re...
""" Evacuation planning based on network flow algorithms. """ from __future__ import annotations from collections import deque from itertools import groupby from sys import stderr from typing import Dict, List, Tuple, NamedTuple import networkx as nx from .level import Level from .graph.reservation_graph import Reser...
""" Evacuation planning based on network flow algorithms. """ from __future__ import annotations from collections import deque from itertools import groupby from sys import stderr from typing import Dict, List, Tuple, NamedTuple import networkx as nx from .level import Level from .graph.reservation_graph import Reser...
import discord from discord.ext import commands, menus from mysqldb import the_database, the_django_database from .player import Player, Skill from .enums import QuestEnum from extra.menu import ConfirmSkill, SwitchTribePages from extra import utils import os import asyncio from datetime import datetime from typing i...
import discord from discord.ext import commands, menus from mysqldb import the_database, the_django_database from .player import Player, Skill from .enums import QuestEnum from extra.menu import ConfirmSkill, SwitchTribePages from extra import utils import os import asyncio from datetime import datetime from typing i...
from pdf2image import convert_from_path, convert_from_bytes import requests import cv2 import numpy as np import re import pytesseract # config DPI = 200 #-> default img shape 2339x1654, do not change this BIN_INV_THRESHOLD = 192 # VERTICAL_FILTER = cv2.getStructuringElement(cv2.MORPH_RECT, (1, 20)) ROW_FILTER = cv2...
from pdf2image import convert_from_path, convert_from_bytes import requests import cv2 import numpy as np import re import pytesseract # config DPI = 200 #-> default img shape 2339x1654, do not change this BIN_INV_THRESHOLD = 192 # VERTICAL_FILTER = cv2.getStructuringElement(cv2.MORPH_RECT, (1, 20)) ROW_FILTER = cv2...
# coding=utf-8 # Copyright 2019 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
# coding=utf-8 # Copyright 2019 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
# coding=utf-8 # Copyright 2020-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
# coding=utf-8 # Copyright 2020-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
import logging import sys import json import reconcile.queries as queries from reconcile.utils.aws_api import AWSApi from reconcile.utils.defer import defer from reconcile.utils.ocm import OCMMap from reconcile.utils.terraform_client import TerraformClient as Terraform from reconcile.utils.terrascript_client import ...
import logging import sys import json import reconcile.queries as queries from reconcile.utils.aws_api import AWSApi from reconcile.utils.defer import defer from reconcile.utils.ocm import OCMMap from reconcile.utils.terraform_client import TerraformClient as Terraform from reconcile.utils.terrascript_client import ...
import json import shlex from os import _exit, chdir, getcwd from re import compile as re_compile from re import findall, match from sys import exc_info, path from traceback import print_exception from libs.config import custom_get, gget, gset, order_alias, set_namespace, color from libs.readline import LovelyReadline...
import json import shlex from os import _exit, chdir, getcwd from re import compile as re_compile from re import findall, match from sys import exc_info, path from traceback import print_exception from libs.config import custom_get, gget, gset, order_alias, set_namespace, color from libs.readline import LovelyReadline...
"""A small utility for filling in the README paths to experiment artifacts. The template contains tags of the form {{filetype.experiment_name}}, which are then replaced with the urls for each resource. Note: print a summary of the most recent results for a given dataset via: python find_latest_checkpoints.py --datase...
"""A small utility for filling in the README paths to experiment artifacts. The template contains tags of the form {{filetype.experiment_name}}, which are then replaced with the urls for each resource. Note: print a summary of the most recent results for a given dataset via: python find_latest_checkpoints.py --datase...
# -*- coding: utf-8 -*- # There are tests here with unicode string literals and # identifiers. There's a code in ast.c that was added because of a # failure with a non-ascii-only expression. So, I have tests for # that. There are workarounds that would let me run tests for that # code without unicode identifiers and ...
# -*- coding: utf-8 -*- # There are tests here with unicode string literals and # identifiers. There's a code in ast.c that was added because of a # failure with a non-ascii-only expression. So, I have tests for # that. There are workarounds that would let me run tests for that # code without unicode identifiers and ...
import re import time import unicodedata from typing import Any, Dict, cast import pkg_resources import requests import requests_html from wikipron.config import Config from wikipron.typing import Iterator, Pron, WordPronPair # Queries for the MediaWiki backend. # Documentation here: https://www.mediawiki.org/wiki/...
import re import time import unicodedata from typing import Any, Dict, cast import pkg_resources import requests import requests_html from wikipron.config import Config from wikipron.typing import Iterator, Pron, WordPronPair # Queries for the MediaWiki backend. # Documentation here: https://www.mediawiki.org/wiki/...
import unittest import random from unittest.case import SkipTest from src.pysguard import DateRule, DateRangeRule, TimeRangeRule, RecurringTimeRule, TimeConstraint from datetime import datetime, timedelta class DateRuleTest(unittest.TestCase): @classmethod def setUpClass(cls) -> None: random.seed(date...
import unittest import random from unittest.case import SkipTest from src.pysguard import DateRule, DateRangeRule, TimeRangeRule, RecurringTimeRule, TimeConstraint from datetime import datetime, timedelta class DateRuleTest(unittest.TestCase): @classmethod def setUpClass(cls) -> None: random.seed(date...
import os import json import time import click import pickle import signal import requests import subprocess import numpy as np import logging import socket import errno from tqdm import tqdm elog = logging.getLogger('eval') formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') fh = l...
import os import json import time import click import pickle import signal import requests import subprocess import numpy as np import logging import socket import errno from tqdm import tqdm elog = logging.getLogger('eval') formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') fh = l...
import asyncio import json import logging import random import time import traceback from asyncio import CancelledError from pathlib import Path from typing import Any, Callable, Dict, Iterator, List, Optional, Set, Tuple from blspy import AugSchemeMPL, PrivateKey from packaging.version import Version from chia.conse...
import asyncio import json import logging import random import time import traceback from asyncio import CancelledError from pathlib import Path from typing import Any, Callable, Dict, Iterator, List, Optional, Set, Tuple from blspy import AugSchemeMPL, PrivateKey from packaging.version import Version from chia.conse...
# -*- coding: future_fstrings -*- # # Copyright 2019 Gianluca Frison, Dimitris Kouzoupis, Robin Verschueren, # Andrea Zanelli, Niels van Duijkeren, Jonathan Frey, Tommaso Sartor, # Branimir Novoselnik, Rien Quirynen, Rezart Qelibari, Dang Doan, # Jonas Koenemann, Yutao Chen, Tobias Schöls, Jonas Schlagenhauf, Moritz Di...
# -*- coding: future_fstrings -*- # # Copyright 2019 Gianluca Frison, Dimitris Kouzoupis, Robin Verschueren, # Andrea Zanelli, Niels van Duijkeren, Jonathan Frey, Tommaso Sartor, # Branimir Novoselnik, Rien Quirynen, Rezart Qelibari, Dang Doan, # Jonas Koenemann, Yutao Chen, Tobias Schöls, Jonas Schlagenhauf, Moritz Di...
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 import json import logging import uuid from enum import Enum, unique from typing import Any, ClassVar, Dict, List, Optional, Set, Tuple, Type, Union, cast import boto3 from botocore.exceptions import ClientError...
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 import json import logging import uuid from enum import Enum, unique from typing import Any, ClassVar, Dict, List, Optional, Set, Tuple, Type, Union, cast import boto3 from botocore.exceptions import ClientError...
""" DESAFIO 088: Palpites Para a Mega Sena Faça um programa que ajude um jogador da MEGA SENA a criar palpites. O programa vai perguntar quantos jogos serão gerados e vai sortear 6 números entre 1 e 60 para cada jogo, cadastrando tudo em uma lista composta. """ from random import randint from time import sleep sortei...
""" DESAFIO 088: Palpites Para a Mega Sena Faça um programa que ajude um jogador da MEGA SENA a criar palpites. O programa vai perguntar quantos jogos serão gerados e vai sortear 6 números entre 1 e 60 para cada jogo, cadastrando tudo em uma lista composta. """ from random import randint from time import sleep sortei...
import socket import select import ast HEADER_LENGTH = 10 # IP = "10.52.3.25" IP = "127.0.0.1" # IP = '25.135.227.60' PORT = 5000 server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) ## just opening the socket for the server. #Af: address family, inet is just internet. server_socket.setsockopt(socket.S...
import socket import select import ast HEADER_LENGTH = 10 # IP = "10.52.3.25" IP = "127.0.0.1" # IP = '25.135.227.60' PORT = 5000 server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) ## just opening the socket for the server. #Af: address family, inet is just internet. server_socket.setsockopt(socket.S...
#! /usr/bin/python3 from subprocess import PIPE, Popen import fcntl import os import select import time import re class MainTest(object): def __init__(self, args): self.process = Popen(args, stdin=PIPE, stdout=PIPE, stderr=PIPE) flags = fcntl.fcntl(self.process.stdout, fcntl.F_GETFL) fcntl...
#! /usr/bin/python3 from subprocess import PIPE, Popen import fcntl import os import select import time import re class MainTest(object): def __init__(self, args): self.process = Popen(args, stdin=PIPE, stdout=PIPE, stderr=PIPE) flags = fcntl.fcntl(self.process.stdout, fcntl.F_GETFL) fcntl...
#!/usr/bin/env python # coding: utf-8 # Copyright 2021 ARC Centre of Excellence for Climate Extremes # author: Paola Petrelli <paola.petrelli@utas.edu.au> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the...
#!/usr/bin/env python # coding: utf-8 # Copyright 2021 ARC Centre of Excellence for Climate Extremes # author: Paola Petrelli <paola.petrelli@utas.edu.au> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the...
""" pygame-menu https://github.com/ppizarror/pygame-menu MENU Menu class. """ # File constants no. 0 __all__ = ['Menu'] import math import os import sys import time import pygame import pygame.gfxdraw as gfxdraw import pygame_menu.events as _events from pygame_menu._base import Base from pygame_menu._decorator imp...
""" pygame-menu https://github.com/ppizarror/pygame-menu MENU Menu class. """ # File constants no. 0 __all__ = ['Menu'] import math import os import sys import time import pygame import pygame.gfxdraw as gfxdraw import pygame_menu.events as _events from pygame_menu._base import Base from pygame_menu._decorator imp...
dados_pessoa: dict = dict() lista_pessoas: list = list() media: list = list() mulheres: list = list() while True: dados_pessoa['nome'] = str(input('Nome: ').strip().upper()) dados_pessoa['idade'] = int(input('Idade: ')) media.append(dados_pessoa['idade']) sexo = ' ' while sexo not in 'MmFf': ...
dados_pessoa: dict = dict() lista_pessoas: list = list() media: list = list() mulheres: list = list() while True: dados_pessoa['nome'] = str(input('Nome: ').strip().upper()) dados_pessoa['idade'] = int(input('Idade: ')) media.append(dados_pessoa['idade']) sexo = ' ' while sexo not in 'MmFf': ...
# Third-party from astropy.io import fits import numpy as np from tqdm.auto import tqdm # Joaquin from .logger import logger from .features import get_phot_features, get_lsf_features, get_spec_features def get_aspcapstar_path(config, star): filename = f"aspcapStar-{config.apogee_reduction}-{star["APOGEE_ID"]}.fi...
# Third-party from astropy.io import fits import numpy as np from tqdm.auto import tqdm # Joaquin from .logger import logger from .features import get_phot_features, get_lsf_features, get_spec_features def get_aspcapstar_path(config, star): filename = f"aspcapStar-{config.apogee_reduction}-{star['APOGEE_ID']}.fi...
"""Custom expansions of :mod:`sklearn` functionalities. Note ---- This module provides custom expansions of some :mod:`sklearn` classes and functions which are necessary to fit the purposes for the desired functionalities of the :ref:`MLR module <api.esmvaltool.diag_scripts.mlr>`. As long-term goal we would like to in...
"""Custom expansions of :mod:`sklearn` functionalities. Note ---- This module provides custom expansions of some :mod:`sklearn` classes and functions which are necessary to fit the purposes for the desired functionalities of the :ref:`MLR module <api.esmvaltool.diag_scripts.mlr>`. As long-term goal we would like to in...
import argparse, os import pandas as pd def main(): parser = argparse.ArgumentParser( description="Get evaluation result for sentiment analysis task", ) parser.add_argument( "--data", type=str, required=True, default="manifest/slue-voxceleb", help="Root dire...
import argparse, os import pandas as pd def main(): parser = argparse.ArgumentParser( description="Get evaluation result for sentiment analysis task", ) parser.add_argument( "--data", type=str, required=True, default="manifest/slue-voxceleb", help="Root dire...
#!/usr/bin/env python # run.py # # Copyright(c) Exequiel Ceasar Navarrete <esnavarrete1@up.edu.ph> # Licensed under MIT # Version 1.0.0 import os import sys import cv2 import click import traceback from app import create_silhouette, SUBTRACTION_METHODS # show version def print_version(ctx, param, value): # pylint: d...
#!/usr/bin/env python # run.py # # Copyright(c) Exequiel Ceasar Navarrete <esnavarrete1@up.edu.ph> # Licensed under MIT # Version 1.0.0 import os import sys import cv2 import click import traceback from app import create_silhouette, SUBTRACTION_METHODS # show version def print_version(ctx, param, value): # pylint: d...
import json import os import uuid from fastapi import Depends, FastAPI, Request, Response from ..db.session_table import delete_session, get_session, save_session from .encryption import get_fernet from .login import current_user, router as login_router, User from .metadata import router as metadata_router from .Sess...
import json import os import uuid from fastapi import Depends, FastAPI, Request, Response from ..db.session_table import delete_session, get_session, save_session from .encryption import get_fernet from .login import current_user, router as login_router, User from .metadata import router as metadata_router from .Sess...
import argparse import collections import itertools import json import os import re import subprocess as sp import sys DEFAULT_TIME_LIMIT = 2 TEST_RESULT_TYPE = { 'pass': 'OK ', 'file_not_found': " ? ", 'compile_error': 'CE ', 'wrong_answer': 'WA ', 'runtime_error':...
import argparse import collections import itertools import json import os import re import subprocess as sp import sys DEFAULT_TIME_LIMIT = 2 TEST_RESULT_TYPE = { 'pass': 'OK ', 'file_not_found': " ? ", 'compile_error': 'CE ', 'wrong_answer': 'WA ', 'runtime_error':...
"""Load an action in Blender.""" import logging from pathlib import Path from pprint import pformat from typing import Dict, List, Optional from avalon import api, blender import bpy import pype.hosts.blender.api.plugin logger = logging.getLogger("pype").getChild("blender").getChild("load_action") class BlendActio...
"""Load an action in Blender.""" import logging from pathlib import Path from pprint import pformat from typing import Dict, List, Optional from avalon import api, blender import bpy import pype.hosts.blender.api.plugin logger = logging.getLogger("pype").getChild("blender").getChild("load_action") class BlendActio...
# PyTorch utils import logging import math import os import subprocess import time from contextlib import contextmanager from copy import deepcopy from pathlib import Path import torch import torch.backends.cudnn as cudnn import torch.nn as nn import torch.nn.functional as F import torchvision try: import thop ...
# PyTorch utils import logging import math import os import subprocess import time from contextlib import contextmanager from copy import deepcopy from pathlib import Path import torch import torch.backends.cudnn as cudnn import torch.nn as nn import torch.nn.functional as F import torchvision try: import thop ...
dados = dict() dados1 = list() somaidade = 0 while True: dados['nome'] = str(input('Nome: ')) while True: dados['sexo'] = str(input('Sexo: [F/M] ')).upper()[0] if dados['sexo'] in 'MF': break print('Error!! Digite novamente.') dados['idade'] = int(input('Idade: ')) d...
dados = dict() dados1 = list() somaidade = 0 while True: dados['nome'] = str(input('Nome: ')) while True: dados['sexo'] = str(input('Sexo: [F/M] ')).upper()[0] if dados['sexo'] in 'MF': break print('Error!! Digite novamente.') dados['idade'] = int(input('Idade: ')) d...
# ================================================================= # # Authors: Tom Kralidis <tomkralidis@gmail.com> # # Copyright (c) 2022 Tom Kralidis # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation # files (the "Software"), to deal in ...
# ================================================================= # # Authors: Tom Kralidis <tomkralidis@gmail.com> # # Copyright (c) 2022 Tom Kralidis # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation # files (the "Software"), to deal in ...
import requests import sys from urllib.parse import urljoin import arrow import config import db_utils import slack_utils BASE_URL = "https://cdn-api.co-vin.in" def make_covin_request(request_url, params=None) -> requests.Response: num_retries = 3 response = requests.get( request_url, para...
import requests import sys from urllib.parse import urljoin import arrow import config import db_utils import slack_utils BASE_URL = "https://cdn-api.co-vin.in" def make_covin_request(request_url, params=None) -> requests.Response: num_retries = 3 response = requests.get( request_url, para...
from collections import defaultdict posts = defaultdict(dict) while True: inp = input() if inp == 'drop the media': break inp = inp.split(' ') command = inp[0] rest_input = inp[1:] if command == 'post': posts[rest_input[0]] = {'likes': 0, 'dislikes': 0, 'comments': []} el...
from collections import defaultdict posts = defaultdict(dict) while True: inp = input() if inp == 'drop the media': break inp = inp.split(' ') command = inp[0] rest_input = inp[1:] if command == 'post': posts[rest_input[0]] = {'likes': 0, 'dislikes': 0, 'comments': []} el...
from datetime import datetime def salvar(nomeArquivoEntrada): arquivoEntrada =open(nomeArquivoEntrada,'r') nomeAluno =str(input('Qual é o seu nome? ')).strip() nomeAtividade = str(input('Qual é a atividade? ')).strip() if '.py' in nomeAtividade: nomeAtividade = nomeAtividade.replace('.py','') ...
from datetime import datetime def salvar(nomeArquivoEntrada): arquivoEntrada =open(nomeArquivoEntrada,'r') nomeAluno =str(input('Qual é o seu nome? ')).strip() nomeAtividade = str(input('Qual é a atividade? ')).strip() if '.py' in nomeAtividade: nomeAtividade = nomeAtividade.replace('.py','') ...
import base64 from ocs_ci.framework import config from ocs_ci.ocs.ocp import OCP from ocs_ci.ocs import constants from ocs_ci.helpers.helpers import storagecluster_independent_check class RGW(object): """ Wrapper class for interaction with a cluster's RGW service """ def __init__(self, namespace=Non...
import base64 from ocs_ci.framework import config from ocs_ci.ocs.ocp import OCP from ocs_ci.ocs import constants from ocs_ci.helpers.helpers import storagecluster_independent_check class RGW(object): """ Wrapper class for interaction with a cluster's RGW service """ def __init__(self, namespace=Non...
import random import time import string import requests import logging from threading import Thread import time import datetime import random # Import Detection From Stealth from .stealth import stealth from .get_acrawler import get_acrawler from playwright import sync_playwright playwright = None def get_playwrig...
import random import time import string import requests import logging from threading import Thread import time import datetime import random # Import Detection From Stealth from .stealth import stealth from .get_acrawler import get_acrawler from playwright import sync_playwright playwright = None def get_playwrig...
# *************************************************************** # Copyright (c) 2022 Jittor. All Rights Reserved. # Maintainers: Dun Liang <randonlang@gmail.com>. # This file is subject to the terms and conditions defined in # file 'LICENSE.txt', which is part of this source code package. # ************************...
# *************************************************************** # Copyright (c) 2022 Jittor. All Rights Reserved. # Maintainers: Dun Liang <randonlang@gmail.com>. # This file is subject to the terms and conditions defined in # file 'LICENSE.txt', which is part of this source code package. # ************************...
import os.path as osp import warnings from collections import OrderedDict import mmcv import numpy as np from mmcv.utils import print_log from torch.utils.data import Dataset from mmdet.core import eval_map, eval_recalls from .builder import DATASETS from .pipelines import Compose from .coco import CocoDataset from p...
import os.path as osp import warnings from collections import OrderedDict import mmcv import numpy as np from mmcv.utils import print_log from torch.utils.data import Dataset from mmdet.core import eval_map, eval_recalls from .builder import DATASETS from .pipelines import Compose from .coco import CocoDataset from p...
#!/usr/bin/env python3 version = '1.0.0' R = '\033[31m' # red G = '\033[32m' # green C = '\033[36m' # cyan W = '\033[0m' # white Y = '\033[33m' # yellow import argparse parser = argparse.ArgumentParser(description=f'nexfil - Find social media profiles on the web | v{version}') parser.add_argument('-u', help='S...
#!/usr/bin/env python3 version = '1.0.0' R = '\033[31m' # red G = '\033[32m' # green C = '\033[36m' # cyan W = '\033[0m' # white Y = '\033[33m' # yellow import argparse parser = argparse.ArgumentParser(description=f'nexfil - Find social media profiles on the web | v{version}') parser.add_argument('-u', help='S...
from scripts.python.data_loader import CORE50 import torch from tqdm import tqdm from faiss_knn import knn import cv2 as cv import numpy as np from torchvision import transforms from sklearn.metrics import confusion_matrix import os import pathlib import wandb from umap import UMAP import matplotlib.pyplot as plt imp...
from scripts.python.data_loader import CORE50 import torch from tqdm import tqdm from faiss_knn import knn import cv2 as cv import numpy as np from torchvision import transforms from sklearn.metrics import confusion_matrix import os import pathlib import wandb from umap import UMAP import matplotlib.pyplot as plt imp...
# -*- coding:utf-8 -*- import sys from owlmixin import OwlMixin, TOption from owlmixin.owlcollections import TList from jumeaux.addons.final import FinalExecutor from jumeaux.utils import jinja2_format, get_jinja2_format_error, when_optional_filter from jumeaux.logger import Logger from jumeaux.models import FinalAd...
# -*- coding:utf-8 -*- import sys from owlmixin import OwlMixin, TOption from owlmixin.owlcollections import TList from jumeaux.addons.final import FinalExecutor from jumeaux.utils import jinja2_format, get_jinja2_format_error, when_optional_filter from jumeaux.logger import Logger from jumeaux.models import FinalAd...
# Ch 7 - Knights Problem # The project for this chapter is to figure out the minimal number of chess knights necessary to attack every square on a # chess board. This means our chessboard must be at least 3x4 for some number of knights to be able to attack all squares # on the board because a knight can only attack cer...
# Ch 7 - Knights Problem # The project for this chapter is to figure out the minimal number of chess knights necessary to attack every square on a # chess board. This means our chessboard must be at least 3x4 for some number of knights to be able to attack all squares # on the board because a knight can only attack cer...
# v2.0 from toolbox import * import sklearn.model_selection import sklearn.metrics import wandb import pickle as pkl import re import seaborn as sns ######################### ### ### ### LOAD DATA ### ### ### ######################### def load_goldStandard(args, out, wh...
# v2.0 from toolbox import * import sklearn.model_selection import sklearn.metrics import wandb import pickle as pkl import re import seaborn as sns ######################### ### ### ### LOAD DATA ### ### ### ######################### def load_goldStandard(args, out, wh...
import inspect import pprint import re from typing import TYPE_CHECKING import lale.helpers if TYPE_CHECKING: from lale.operators import IndividualOp def _indent(prefix, string, first_prefix=None): lines = string.splitlines() if lines: if first_prefix is None: first_prefix = prefix ...
import inspect import pprint import re from typing import TYPE_CHECKING import lale.helpers if TYPE_CHECKING: from lale.operators import IndividualOp def _indent(prefix, string, first_prefix=None): lines = string.splitlines() if lines: if first_prefix is None: first_prefix = prefix ...
from telegram import ParseMode, ReplyKeyboardMarkup, ReplyKeyboardRemove from telegram.ext import ConversationHandler from pdf_bot.analytics import TaskType from pdf_bot.consts import ( BACK, BY_PERCENT, TO_DIMENSIONS, WAIT_SCALE_DIMENSION, WAIT_SCALE_PERCENT, WAIT_SCALE_TYPE, ) from pdf_bot.fi...
from telegram import ParseMode, ReplyKeyboardMarkup, ReplyKeyboardRemove from telegram.ext import ConversationHandler from pdf_bot.analytics import TaskType from pdf_bot.consts import ( BACK, BY_PERCENT, TO_DIMENSIONS, WAIT_SCALE_DIMENSION, WAIT_SCALE_PERCENT, WAIT_SCALE_TYPE, ) from pdf_bot.fi...
import logging from functools import wraps import airflow from airflow.api.common.experimental import delete_dag from airflow.exceptions import DagFileExists, DagNotFound from airflow.utils.log.logging_mixin import LoggingMixin from flask import current_app, flash, g, redirect, request, url_for from flask_appbuilder i...
import logging from functools import wraps import airflow from airflow.api.common.experimental import delete_dag from airflow.exceptions import DagFileExists, DagNotFound from airflow.utils.log.logging_mixin import LoggingMixin from flask import current_app, flash, g, redirect, request, url_for from flask_appbuilder i...