edited_code
stringlengths
17
978k
original_code
stringlengths
17
978k
import logging import jsonpickle import isodate import time from datetime import datetime from homeassistant.util.dt import now from custom_components.hasl3.slapi import ( slapi_fp, slapi_tl2, slapi_ri4, slapi_si2, slapi_rp3, ) logger = logging.getLogger("custom_components.hasl3.worker") class ...
import logging import jsonpickle import isodate import time from datetime import datetime from homeassistant.util.dt import now from custom_components.hasl3.slapi import ( slapi_fp, slapi_tl2, slapi_ri4, slapi_si2, slapi_rp3, ) logger = logging.getLogger("custom_components.hasl3.worker") class ...
from discord.ext import commands from discord_slash import SlashContext, cog_ext import sqlite3 import random from discord_slash.model import SlashCommandOptionType from discord_slash.utils.manage_commands import create_choice, create_option class Fun(commands.Cog): def __init__(self, bot): self.bot = bot self._...
from discord.ext import commands from discord_slash import SlashContext, cog_ext import sqlite3 import random from discord_slash.model import SlashCommandOptionType from discord_slash.utils.manage_commands import create_choice, create_option class Fun(commands.Cog): def __init__(self, bot): self.bot = bot self._...
BIL = 1000*1000*1000 class C: COL_GIA3 = 3 COL_VOL3 = 4 COL_GIA2 = 5 COL_VOL2 = 6 COL_GIA1 = 7 COL_VOL1 = 8 COL_GIA = 9 COL_VOL = 10 COL_GIA1b = 12 COL_VOL1b = 13 COL_GIA2b = 14 COL_VOL2b = 15 COL_GIA3b = 16 COL_VOL3b = 17 COL_TOTAL_VOL = 18 COL_AVG_PRI...
BIL = 1000*1000*1000 class C: COL_GIA3 = 3 COL_VOL3 = 4 COL_GIA2 = 5 COL_VOL2 = 6 COL_GIA1 = 7 COL_VOL1 = 8 COL_GIA = 9 COL_VOL = 10 COL_GIA1b = 12 COL_VOL1b = 13 COL_GIA2b = 14 COL_VOL2b = 15 COL_GIA3b = 16 COL_VOL3b = 17 COL_TOTAL_VOL = 18 COL_AVG_PRI...
#import modules region import requests, urllib3, json import pandas as pd from pandas.io.json import json_normalize from datetime import datetime from datetime import timedelta import plotly.express as px import re #variables region workspaceid = '<>' # Tenant ID for your Azure subscription TENANT_ID = '<>' # Your s...
#import modules region import requests, urllib3, json import pandas as pd from pandas.io.json import json_normalize from datetime import datetime from datetime import timedelta import plotly.express as px import re #variables region workspaceid = '<>' # Tenant ID for your Azure subscription TENANT_ID = '<>' # Your s...
import csv from datetime import datetime SCHEDULE = 'schedule.csv' HEADERS = ("Date", "Week", "Class", "Day", "Learning Outcome", "Chapter", "Pages", "Quiz", "Assignmt", "Lab", "Outcomes") OPTIONS_DATE = {1: "Specify a specific date", 2: "Use today's date"} def getDate(): # Determine current date and t...
import csv from datetime import datetime SCHEDULE = 'schedule.csv' HEADERS = ("Date", "Week", "Class", "Day", "Learning Outcome", "Chapter", "Pages", "Quiz", "Assignmt", "Lab", "Outcomes") OPTIONS_DATE = {1: "Specify a specific date", 2: "Use today's date"} def getDate(): # Determine current date and t...
# coding=utf-8 # Copyright 2018 Google AI, Google Brain and 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 # # U...
# coding=utf-8 # Copyright 2018 Google AI, Google Brain and 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 # # U...
"""Cryptocurrency Discovery Controller""" __docformat__ = "numpy" # pylint: disable=R0904, C0302, W0622, C0201 import argparse import difflib from typing import List, Union from prompt_toolkit.completion import NestedCompleter from gamestonk_terminal import feature_flags as gtff from gamestonk_terminal.helper_funcs im...
"""Cryptocurrency Discovery Controller""" __docformat__ = "numpy" # pylint: disable=R0904, C0302, W0622, C0201 import argparse import difflib from typing import List, Union from prompt_toolkit.completion import NestedCompleter from gamestonk_terminal import feature_flags as gtff from gamestonk_terminal.helper_funcs im...
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Eric Larson <larson.eric.d@gmail.com> # Oleh Kozynets <ok7mailbox@gmail.com> # Guillaume Favelier <guillaume.favelier@gmail.com> # jona-sassenhagen <jona.sassenhagen@gmail.com> # Joan Massich <mailsik@gmail.com> #...
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Eric Larson <larson.eric.d@gmail.com> # Oleh Kozynets <ok7mailbox@gmail.com> # Guillaume Favelier <guillaume.favelier@gmail.com> # jona-sassenhagen <jona.sassenhagen@gmail.com> # Joan Massich <mailsik@gmail.com> #...
###################################### ## 数据文件夹下LRW文件夹的名字. ## ###################################### LRW1000_DATA_PATH_NAME = '/data/zhangyk/data/CAS-VSR-W1k/audio/LRW1000_Public/audio' LRW1000_AUDIO_DATA_PATH_NAME = '/data/zhangyk/data/lrw1000_audio_pkl' ###################################### import torch from torch....
###################################### ## 数据文件夹下LRW文件夹的名字. ## ###################################### LRW1000_DATA_PATH_NAME = '/data/zhangyk/data/CAS-VSR-W1k/audio/LRW1000_Public/audio' LRW1000_AUDIO_DATA_PATH_NAME = '/data/zhangyk/data/lrw1000_audio_pkl' ###################################### import torch from torch....
# -*- coding: utf-8 -*- """ """ import os, io, sys import re import json import time # import pprint from copy import deepcopy from datetime import datetime from typing import Union, Optional, Any, List, Dict, Tuple, Set, Sequence, NoReturn from numbers import Real, Number import numpy as np np.set_printoptions(precis...
# -*- coding: utf-8 -*- """ """ import os, io, sys import re import json import time # import pprint from copy import deepcopy from datetime import datetime from typing import Union, Optional, Any, List, Dict, Tuple, Set, Sequence, NoReturn from numbers import Real, Number import numpy as np np.set_printoptions(precis...
import re from typing import Any, Dict, List, Optional, Set, Tuple, cast from django.utils import timezone from rest_framework import exceptions from ee.clickhouse.client import sync_execute from ee.clickhouse.materialized_columns.columns import TableWithProperties, get_materialized_columns from ee.clickhouse.models....
import re from typing import Any, Dict, List, Optional, Set, Tuple, cast from django.utils import timezone from rest_framework import exceptions from ee.clickhouse.client import sync_execute from ee.clickhouse.materialized_columns.columns import TableWithProperties, get_materialized_columns from ee.clickhouse.models....
import datetime import json from django.db import models from django.db.models.fields import BooleanField, related from django.db.models.query_utils import select_related_descend from database.utils.constants import * from .utils.common import json_loader, get_json_if_not_none, get_summary_info from django.forms.models...
import datetime import json from django.db import models from django.db.models.fields import BooleanField, related from django.db.models.query_utils import select_related_descend from database.utils.constants import * from .utils.common import json_loader, get_json_if_not_none, get_summary_info from django.forms.models...
import base64 import boto3 import json import os import random import re import moto.cognitoidp.models import requests import hmac import hashlib import uuid # noinspection PyUnresolvedReferences import sure # noqa # pylint: disable=unused-import from botocore.exceptions import ClientError, ParamValidationError fro...
import base64 import boto3 import json import os import random import re import moto.cognitoidp.models import requests import hmac import hashlib import uuid # noinspection PyUnresolvedReferences import sure # noqa # pylint: disable=unused-import from botocore.exceptions import ClientError, ParamValidationError fro...
#!/usr/bin/env python # # Example of two process Ray program, worker sends values to parameter # server on a different machine # # Run locally: # ./ray_two_machines.py # # Run on AWS: # ./ray_two_machines.py --aws # Example timings # c5.18xlarge over network: over network: 63.0 ms: 1586.76 MB/second # c5.9xlarge over...
#!/usr/bin/env python # # Example of two process Ray program, worker sends values to parameter # server on a different machine # # Run locally: # ./ray_two_machines.py # # Run on AWS: # ./ray_two_machines.py --aws # Example timings # c5.18xlarge over network: over network: 63.0 ms: 1586.76 MB/second # c5.9xlarge over...
import sys import time import psycopg2 as psycopg2 import os def start_database(): try: while True: try: conn = psycopg2.connect(dbname=os.environ['DB_NAME'], user=os.environ['DB_USERNAME'], password=os.environ['DB_PASSWORD'], host=os.environ['DB_HOSTNAME'], ...
import sys import time import psycopg2 as psycopg2 import os def start_database(): try: while True: try: conn = psycopg2.connect(dbname=os.environ['DB_NAME'], user=os.environ['DB_USERNAME'], password=os.environ['DB_PASSWORD'], host=os.environ['DB_HOSTNAME'], ...
import logging import re import threading from datetime import datetime from typing import Optional, Tuple import uuid import m3u8 import requests from locast2dvr.utils import Configuration, LoggingHandler from requests.exceptions import HTTPError from timezonefinder import TimezoneFinder from .fcc import Facilities ...
import logging import re import threading from datetime import datetime from typing import Optional, Tuple import uuid import m3u8 import requests from locast2dvr.utils import Configuration, LoggingHandler from requests.exceptions import HTTPError from timezonefinder import TimezoneFinder from .fcc import Facilities ...
# Copyright 2018 Iguazio # # 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, softwa...
# Copyright 2018 Iguazio # # 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, softwa...
import requests from requests.exceptions import HTTPError, RequestException, Timeout from utils.termcolors import Termcolor as Tc class URLScan: def __init__(self, ip): self.headers = {"Accept": "application/json"} self.params = ( ("q", f"domain:{"".join(ip)}"), ("size", 1...
import requests from requests.exceptions import HTTPError, RequestException, Timeout from utils.termcolors import Termcolor as Tc class URLScan: def __init__(self, ip): self.headers = {"Accept": "application/json"} self.params = ( ("q", f"domain:{''.join(ip)}"), ("size", 1...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: MIT. See LICENSE """build query for doclistview and return results""" from typing import List import frappe.defaults from frappe.query_builder.utils import Column import frappe.share from frappe import _ import frappe.permissions from date...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: MIT. See LICENSE """build query for doclistview and return results""" from typing import List import frappe.defaults from frappe.query_builder.utils import Column import frappe.share from frappe import _ import frappe.permissions from date...
import asyncio import json import logging import time from pathlib import Path from typing import Any, Callable, Dict, List, Optional, Tuple import traceback import aiohttp from blspy import AugSchemeMPL, G1Element, G2Element, PrivateKey import chia.server.ws_connection as ws # lgtm [py/import-and-import-from] from ...
import asyncio import json import logging import time from pathlib import Path from typing import Any, Callable, Dict, List, Optional, Tuple import traceback import aiohttp from blspy import AugSchemeMPL, G1Element, G2Element, PrivateKey import chia.server.ws_connection as ws # lgtm [py/import-and-import-from] from ...
"""Git specific support and addon.""" import argparse import os import re import shlex import subprocess from collections import defaultdict, deque from dataclasses import dataclass from datetime import datetime from functools import partial from itertools import takewhile from pathspec import PathSpec from pkgcore.e...
"""Git specific support and addon.""" import argparse import os import re import shlex import subprocess from collections import defaultdict, deque from dataclasses import dataclass from datetime import datetime from functools import partial from itertools import takewhile from pathspec import PathSpec from pkgcore.e...
""" This is the main file that holds the Tokenizer, Parser, and Interpreter that actually compile the PDF. """ import os.path as path import re import copy as _copy from decimal import Decimal from placer.placer import Placer from constants import CMND_CHARS, END_LINE_CHARS, ALIGNMENT, TT, TT_M, WHITE_SPACE_CHARS,...
""" This is the main file that holds the Tokenizer, Parser, and Interpreter that actually compile the PDF. """ import os.path as path import re import copy as _copy from decimal import Decimal from placer.placer import Placer from constants import CMND_CHARS, END_LINE_CHARS, ALIGNMENT, TT, TT_M, WHITE_SPACE_CHARS,...
champions = [{'id': u'62', 'key': u'MonkeyKing'}, {'id': u'24', 'key': u'Jax'}, {'id': u'35', 'key': u'Shaco'}, {'id': u'19', 'key': u'Warwick'}, {'id': u'76', 'key': u'Nidalee'}, {'id': u'143', 'key': u'Zyra'}, {'id': u'63', 'key': u'Brand'}, {'id': u'33', 'key': u'Rammus'}, {'id': u'420', 'key': u'Illaoi'}, {'id': u'...
champions = [{'id': u'62', 'key': u'MonkeyKing'}, {'id': u'24', 'key': u'Jax'}, {'id': u'35', 'key': u'Shaco'}, {'id': u'19', 'key': u'Warwick'}, {'id': u'76', 'key': u'Nidalee'}, {'id': u'143', 'key': u'Zyra'}, {'id': u'63', 'key': u'Brand'}, {'id': u'33', 'key': u'Rammus'}, {'id': u'420', 'key': u'Illaoi'}, {'id': u'...
import config_tb from config_db import config import requests from datetime import datetime from bs4 import BeautifulSoup import telebot from db import UseDataBase from emoji import * # заглавная страница сервиса Яндекс.Погода с прогнозом # по текущему месту положения URL = 'https://yandex.ru/pogoda/' ...
import config_tb from config_db import config import requests from datetime import datetime from bs4 import BeautifulSoup import telebot from db import UseDataBase from emoji import * # заглавная страница сервиса Яндекс.Погода с прогнозом # по текущему месту положения URL = 'https://yandex.ru/pogoda/' ...
"""Module for contestants adapter.""" import copy import logging import os from typing import List from aiohttp import ClientSession from aiohttp import hdrs, web from multidict import MultiDict from .raceclasses_adapter import RaceclassesAdapter EVENTS_HOST_SERVER = os.getenv("EVENTS_HOST_SERVER", "localhost") EVEN...
"""Module for contestants adapter.""" import copy import logging import os from typing import List from aiohttp import ClientSession from aiohttp import hdrs, web from multidict import MultiDict from .raceclasses_adapter import RaceclassesAdapter EVENTS_HOST_SERVER = os.getenv("EVENTS_HOST_SERVER", "localhost") EVEN...
from typing import Any, Callable, Dict, Iterator, List, Optional, Type, cast import blacksmith from blacksmith import ( CollectionParser, HTTPTimeout, PrometheusMetrics, SyncAbstractServiceDiscovery, SyncAbstractTransport, SyncClient, SyncClientFactory, SyncConsulDiscovery, SyncHTTP...
from typing import Any, Callable, Dict, Iterator, List, Optional, Type, cast import blacksmith from blacksmith import ( CollectionParser, HTTPTimeout, PrometheusMetrics, SyncAbstractServiceDiscovery, SyncAbstractTransport, SyncClient, SyncClientFactory, SyncConsulDiscovery, SyncHTTP...
import scrapy import re import json from locations.items import GeojsonPointItem from locations.hours import OpeningHours DAY_MAPPING = { 1: 'Mo', 2: 'Tu', 3: 'We', 4: 'Th', 5: 'Fr', 6: 'Sa', 7: 'Su', 'Mo': 1, 'Tu': 2, 'We': 3, 'Th': 4, 'Fr': 5, 'Sa': 6, 'Su': 7 } class AlnaturaSpider(scrapy.Spider): n...
import scrapy import re import json from locations.items import GeojsonPointItem from locations.hours import OpeningHours DAY_MAPPING = { 1: 'Mo', 2: 'Tu', 3: 'We', 4: 'Th', 5: 'Fr', 6: 'Sa', 7: 'Su', 'Mo': 1, 'Tu': 2, 'We': 3, 'Th': 4, 'Fr': 5, 'Sa': 6, 'Su': 7 } class AlnaturaSpider(scrapy.Spider): n...
# import argparse import collections from functools import partial import pathlib import sys import time import numpy as np from scipy.interpolate import interpn import xarray as xr from Utilities import Utilities # optional, see printProgressBar below π = np.pi db_path = './Data/Zhang_rho_db.mat' #Groups in db.mat...
# import argparse import collections from functools import partial import pathlib import sys import time import numpy as np from scipy.interpolate import interpn import xarray as xr from Utilities import Utilities # optional, see printProgressBar below π = np.pi db_path = './Data/Zhang_rho_db.mat' #Groups in db.mat...
import asyncio import json import os import shutil import threading import zipfile import aiohttp import requests from Util import Configuration, GearbotLogging, Emoji LANGS = dict() BOT = None def on_ready(bot_in): global BOT BOT = bot_in load_translations() def load_translations(): directory = os...
import asyncio import json import os import shutil import threading import zipfile import aiohttp import requests from Util import Configuration, GearbotLogging, Emoji LANGS = dict() BOT = None def on_ready(bot_in): global BOT BOT = bot_in load_translations() def load_translations(): directory = os...
import requests import os import logging from dss import Config from dss import dynamodb as db from dss.error import DSSForbiddenException, DSSException from .authorize import Authorize, always_allow_admins logger = logging.getLogger(__name__) class FlacMixin(Authorize): """ Mixin class for Auth0 Authorize ...
import requests import os import logging from dss import Config from dss import dynamodb as db from dss.error import DSSForbiddenException, DSSException from .authorize import Authorize, always_allow_admins logger = logging.getLogger(__name__) class FlacMixin(Authorize): """ Mixin class for Auth0 Authorize ...
import json from copy import deepcopy from typing import Dict, List, Set, Type import stripe.api_resources import stripe.stripe_object import tests from django.core.management import BaseCommand from stripe.error import InvalidRequestError import djstripe.models import djstripe.settings """ Key used to store fake id...
import json from copy import deepcopy from typing import Dict, List, Set, Type import stripe.api_resources import stripe.stripe_object import tests from django.core.management import BaseCommand from stripe.error import InvalidRequestError import djstripe.models import djstripe.settings """ Key used to store fake id...
# We will be using the subprocess module to run commands on Kali Linux. import subprocess # We require regular expressions. import re # We want to open the CSV files generated by airmon-ng, # and we'll use the built-in csv module. import csv # We want to import os because we want to check for sudo import os # We want ...
# We will be using the subprocess module to run commands on Kali Linux. import subprocess # We require regular expressions. import re # We want to open the CSV files generated by airmon-ng, # and we'll use the built-in csv module. import csv # We want to import os because we want to check for sudo import os # We want ...
# Copyright 1999-2020 Alibaba Group Holding Ltd. # # 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 a...
# Copyright 1999-2020 Alibaba Group Holding Ltd. # # 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 a...
import json import logging import time import os import random import base64 from django.conf import settings from drf_yasg.utils import swagger_auto_schema from rest_framework import permissions, status from rest_framework.decorators import api_view, permission_classes from rest_framework.response import Response fr...
import json import logging import time import os import random import base64 from django.conf import settings from drf_yasg.utils import swagger_auto_schema from rest_framework import permissions, status from rest_framework.decorators import api_view, permission_classes from rest_framework.response import Response fr...
# -*- coding: utf-8 -*- # Resource object code # # Created: st 14. 10 21:40:05 2015 # by: The Resource Compiler for PySide (Qt v4.8.7) # # WARNING! All changes made in this file will be lost! from PySide import QtCore qt_resource_data = b"\x00\x00\x03T\x89PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\x00\x00 \x00...
# -*- coding: utf-8 -*- # Resource object code # # Created: st 14. 10 21:40:05 2015 # by: The Resource Compiler for PySide (Qt v4.8.7) # # WARNING! All changes made in this file will be lost! from PySide import QtCore qt_resource_data = b"\x00\x00\x03T\x89PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\x00\x00 \x00...
import numpy as np import warnings import math from tqdm import tqdm from skimage.measure import regionprops from skimage.draw import polygon from csbdeep.utils import _raise, axes_check_and_normalize, axes_dict from itertools import product from .geometry import polygons_to_label_coord, polyhedron_to_label OBJECT_...
import numpy as np import warnings import math from tqdm import tqdm from skimage.measure import regionprops from skimage.draw import polygon from csbdeep.utils import _raise, axes_check_and_normalize, axes_dict from itertools import product from .geometry import polygons_to_label_coord, polyhedron_to_label OBJECT_...
#!/usr/bin/env python # -*- coding: utf-8 -*- import json import os import pickle import random import re import time from datetime import datetime, timedelta from urllib import parse import requests from bs4 import BeautifulSoup import CustomBrowser import address_util from config import global_config from exception...
#!/usr/bin/env python # -*- coding: utf-8 -*- import json import os import pickle import random import re import time from datetime import datetime, timedelta from urllib import parse import requests from bs4 import BeautifulSoup import CustomBrowser import address_util from config import global_config from exception...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Hugo helpers.""" import yaml from datetime import datetime import hashlib r""" # Set type to 'posts' if you want to render page as blogpost type = "posts" # Set page weight to re-arrange items in file-tree menu. weight = 10 # Set how many table of contents levels to ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Hugo helpers.""" import yaml from datetime import datetime import hashlib r""" # Set type to 'posts' if you want to render page as blogpost type = "posts" # Set page weight to re-arrange items in file-tree menu. weight = 10 # Set how many table of contents levels to ...
''' 主程序 @author: PurePeace @time: 2020年2月10日 02:03:09 ''' import time, datetime, re, requests, random, json from bs4 import BeautifulSoup requests.adapters.DEFAULT_RETRIES = 999 # 增加重连次数 # get now timeString or timeStamp def getTime(needFormat=0, formatMS=True): if needFormat != 0: return datetime.date...
''' 主程序 @author: PurePeace @time: 2020年2月10日 02:03:09 ''' import time, datetime, re, requests, random, json from bs4 import BeautifulSoup requests.adapters.DEFAULT_RETRIES = 999 # 增加重连次数 # get now timeString or timeStamp def getTime(needFormat=0, formatMS=True): if needFormat != 0: return datetime.date...
# The MIT License # Copyright (c) 2021- Nordic Institute for Interoperability Solutions (NIIS) # Copyright (c) 2017-2020 Estonian Information System Authority (RIA) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"...
# The MIT License # Copyright (c) 2021- Nordic Institute for Interoperability Solutions (NIIS) # Copyright (c) 2017-2020 Estonian Information System Authority (RIA) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"...
# Ex073 tabela = ('Flamengo', 'Internacional', 'Atlético', 'São Paulo', 'Fluminense', 'Grêmio', 'Palmeiras', 'Santos', 'Atlético Paranaense', 'Red Bull Bragantino', 'Ceará', 'Conrinthians', 'Atlético GO', 'Bahia', 'Sport', 'Fortaleza', 'Vasco da Gama', 'Goias', 'Coritiba', 'Botafogo') cont = 0 while...
# Ex073 tabela = ('Flamengo', 'Internacional', 'Atlético', 'São Paulo', 'Fluminense', 'Grêmio', 'Palmeiras', 'Santos', 'Atlético Paranaense', 'Red Bull Bragantino', 'Ceará', 'Conrinthians', 'Atlético GO', 'Bahia', 'Sport', 'Fortaleza', 'Vasco da Gama', 'Goias', 'Coritiba', 'Botafogo') cont = 0 while...
import argparse import os.path as osp from collections import defaultdict import mmcv from tqdm import tqdm def parse_args(): parser = argparse.ArgumentParser( description='LaSOT test dataset to COCO Video format') parser.add_argument( '-i', '--input', help='root directory of ...
import argparse import os.path as osp from collections import defaultdict import mmcv from tqdm import tqdm def parse_args(): parser = argparse.ArgumentParser( description='LaSOT test dataset to COCO Video format') parser.add_argument( '-i', '--input', help='root directory of ...
import os import requests import json import traceback import dateparser from datetime import datetime, timedelta from bs4 import BeautifulSoup from CommonServerPython import * from typing import List import demistomock as demisto DATE_FORMAT = '%Y-%m-%dT%H:%M:%S' HOST = demisto.params().get('host') BROKER = argToBool...
import os import requests import json import traceback import dateparser from datetime import datetime, timedelta from bs4 import BeautifulSoup from CommonServerPython import * from typing import List import demistomock as demisto DATE_FORMAT = '%Y-%m-%dT%H:%M:%S' HOST = demisto.params().get('host') BROKER = argToBool...
from flask import Flask, redirect, url_for, render_template, send_from_directory from pycoingecko import CoinGeckoAPI from modules import news, email from flask_cors import CORS from flask import request import datetime import requests import random import string import redis import json import os # video: json_file =...
from flask import Flask, redirect, url_for, render_template, send_from_directory from pycoingecko import CoinGeckoAPI from modules import news, email from flask_cors import CORS from flask import request import datetime import requests import random import string import redis import json import os # video: json_file =...
# Copyright (C) 2021 Intel Corporation # # 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 wri...
# Copyright (C) 2021 Intel Corporation # # 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 wri...
# Copyright Amazon.com Inc. or its affiliates. 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. A copy of the # License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying...
# Copyright Amazon.com Inc. or its affiliates. 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. A copy of the # License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying...
r""" .. role:: html(raw) :format: html Quantum advantage with Gaussian Boson Sampling ============================================== .. meta:: :property="og:description": Using light to perform tasks beyond the reach of classical computers. :property="og:image": https://pennylane.ai/qml/_images/...
r""" .. role:: html(raw) :format: html Quantum advantage with Gaussian Boson Sampling ============================================== .. meta:: :property="og:description": Using light to perform tasks beyond the reach of classical computers. :property="og:image": https://pennylane.ai/qml/_images/...
# Utility functions for Psychopy Experiments # Author: Stefan Uddenberg from psychopy import core, data, event, gui import json import os def tabify(s): """ Takes an array of strings and outputs a single string separated by tab characters :type s: list :param s: list of strings :raises: N/A :rtype: string "...
# Utility functions for Psychopy Experiments # Author: Stefan Uddenberg from psychopy import core, data, event, gui import json import os def tabify(s): """ Takes an array of strings and outputs a single string separated by tab characters :type s: list :param s: list of strings :raises: N/A :rtype: string "...
from __future__ import annotations import json import os.path import numpy as np from gcdf1.utils.dialogue import ( get_dialogue_outline, get_intent_by_turn, get_utterances, ) np.random.seed(0) def print_dialogue( dialogue: dict, print_index: bool = False, show_intent: bool = False ): """ ...
from __future__ import annotations import json import os.path import numpy as np from gcdf1.utils.dialogue import ( get_dialogue_outline, get_intent_by_turn, get_utterances, ) np.random.seed(0) def print_dialogue( dialogue: dict, print_index: bool = False, show_intent: bool = False ): """ ...
import sys from pathlib import Path if 'set env': sys.path.insert(0, str(Path(__file__).parent.parent)) from youtube_dl_cli import __version__, __exe_name__, __description__ from youtube_dl_cli.download_youtube_video import YLFormat, YoutubeKeeper from youtube_dl_cli.common.consoleHelper import text_co...
import sys from pathlib import Path if 'set env': sys.path.insert(0, str(Path(__file__).parent.parent)) from youtube_dl_cli import __version__, __exe_name__, __description__ from youtube_dl_cli.download_youtube_video import YLFormat, YoutubeKeeper from youtube_dl_cli.common.consoleHelper import text_co...
from pyautonifty.constants import DRAWING_SIZE, BLACK from pyautonifty.pos import Pos from pyautonifty.drawing import Drawing from pyautonifty.renderer import Renderer # Draw straight lines that combine to create impression of curved lines def curved_lines(drawing, n=20): # init drawing step = DRAWING_SIZE / ...
from pyautonifty.constants import DRAWING_SIZE, BLACK from pyautonifty.pos import Pos from pyautonifty.drawing import Drawing from pyautonifty.renderer import Renderer # Draw straight lines that combine to create impression of curved lines def curved_lines(drawing, n=20): # init drawing step = DRAWING_SIZE / ...
from requests import get import time from datetime import datetime def cmd(self, user, channel, args): def url(arg): return f"https://api.twitch.tv/kraken/{arg}" headers = {"Client-ID": self.CLIENT_ID, "Authorization": f"OAuth {self.SETUP.startup()["token"]}", "Accept": "application/v...
from requests import get import time from datetime import datetime def cmd(self, user, channel, args): def url(arg): return f"https://api.twitch.tv/kraken/{arg}" headers = {"Client-ID": self.CLIENT_ID, "Authorization": f"OAuth {self.SETUP.startup()['token']}", "Accept": "application/v...
import json import logging import random from rest_framework.exceptions import ValidationError import metagov.core.plugin_decorators as Registry import requests from metagov.core.errors import PluginErrorInternal from metagov.core.models import GovernanceProcess, Plugin, ProcessStatus, AuthType logger = logging.getLo...
import json import logging import random from rest_framework.exceptions import ValidationError import metagov.core.plugin_decorators as Registry import requests from metagov.core.errors import PluginErrorInternal from metagov.core.models import GovernanceProcess, Plugin, ProcessStatus, AuthType logger = logging.getLo...
# -*- coding: utf-8 -*- # Copyright (c) 2012-2022 Andrey Vlasovskikh # # 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 limitation the rights # to use, ...
# -*- coding: utf-8 -*- # Copyright (c) 2012-2022 Andrey Vlasovskikh # # 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 limitation the rights # to use, ...
"""Make / Download Telegram Sticker Packs without installing Third Party applications Available Commands: .kang [Optional Emoji] .packinfo .getsticker""" from telethon import events from io import BytesIO from PIL import Image import asyncio import datetime from collections import defaultdict import math im...
"""Make / Download Telegram Sticker Packs without installing Third Party applications Available Commands: .kang [Optional Emoji] .packinfo .getsticker""" from telethon import events from io import BytesIO from PIL import Image import asyncio import datetime from collections import defaultdict import math im...
import sys import typing as t import logging from typing import TYPE_CHECKING from bentoml import Runner from bentoml import SimpleRunner from bentoml.io import IODescriptor from bentoml.exceptions import BentoMLException from ..types import Tag from ..bento.bento import get_default_bento_readme from .inference_api i...
import sys import typing as t import logging from typing import TYPE_CHECKING from bentoml import Runner from bentoml import SimpleRunner from bentoml.io import IODescriptor from bentoml.exceptions import BentoMLException from ..types import Tag from ..bento.bento import get_default_bento_readme from .inference_api i...
import collections import logging import re import urllib.parse from mopidy import backend, models from mopidy.models import SearchResult, Track logger = logging.getLogger(__name__) def generate_uri(path): return f"soundcloud:directory:{urllib.parse.quote("/".join(path))}" def new_folder(name, path): retu...
import collections import logging import re import urllib.parse from mopidy import backend, models from mopidy.models import SearchResult, Track logger = logging.getLogger(__name__) def generate_uri(path): return f"soundcloud:directory:{urllib.parse.quote('/'.join(path))}" def new_folder(name, path): retu...
#!/usr/bin/env python3 import json import os import subprocess import time import numpy as np import unittest from collections import Counter from pathlib import Path from cereal import car import cereal.messaging as messaging from cereal.services import service_list from common.basedir import BASEDIR from common.time...
#!/usr/bin/env python3 import json import os import subprocess import time import numpy as np import unittest from collections import Counter from pathlib import Path from cereal import car import cereal.messaging as messaging from cereal.services import service_list from common.basedir import BASEDIR from common.time...
import importlib import os import yaml from inquirer import errors from lithopscloud.modules.api_key import verify_iam_api_key from lithopscloud.modules.utils import color_msg, Color, ARG_STATUS, MSG_STATUS, free_dialog, inquire_user # TODO: change ibm_cos path to cos after cos-package name changes to cos CONFIGURABLE...
import importlib import os import yaml from inquirer import errors from lithopscloud.modules.api_key import verify_iam_api_key from lithopscloud.modules.utils import color_msg, Color, ARG_STATUS, MSG_STATUS, free_dialog, inquire_user # TODO: change ibm_cos path to cos after cos-package name changes to cos CONFIGURABLE...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Mar 17 12:33:39 2021 @author: Clement """ import pandas import PyPDF2 import os import sys import docx from docxtpl import DocxTemplate from docx2pdf import convert sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))) from gen...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Mar 17 12:33:39 2021 @author: Clement """ import pandas import PyPDF2 import os import sys import docx from docxtpl import DocxTemplate from docx2pdf import convert sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))) from gen...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved """ Implementation of the "fetcher" module of HMA. Fetching involves connecting to the ThreatExchange API and downloading signals to synchronize a local copy of the database, which will then be fed into various indices. """ import logging import ...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved """ Implementation of the "fetcher" module of HMA. Fetching involves connecting to the ThreatExchange API and downloading signals to synchronize a local copy of the database, which will then be fed into various indices. """ import logging import ...
# Copyright 2020 Quentin Gliech # Copyright 2020-2021 The Matrix.org Foundation C.I.C. # # 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 # # U...
# Copyright 2020 Quentin Gliech # Copyright 2020-2021 The Matrix.org Foundation C.I.C. # # 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 # # U...
# area of circle = pi(3.14159265359) * radius**2(π نق * نق) from math import pi print(f"area of circle is {pi * float(input("Enter radius: "))**2}") # in the above way we solved the problem with just one line after import library # you can solve it in many way. # good luck
# area of circle = pi(3.14159265359) * radius**2(π نق * نق) from math import pi print(f"area of circle is {pi * float(input('Enter radius: '))**2}") # in the above way we solved the problem with just one line after import library # you can solve it in many way. # good luck
from argparse import ArgumentParser from string import ascii_letters, digits from random import randint, choice from requests import get, post from requests_html import AsyncHTMLSession as a from threading import Thread # get 600 http(s) proxies, lists fplproxies.py async def 一(): return await a().get('https://free-p...
from argparse import ArgumentParser from string import ascii_letters, digits from random import randint, choice from requests import get, post from requests_html import AsyncHTMLSession as a from threading import Thread # get 600 http(s) proxies, lists fplproxies.py async def 一(): return await a().get('https://free-p...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ File for miscellaneous utility functions and constants. """ from collections import deque import math import random ...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ File for miscellaneous utility functions and constants. """ from collections import deque import math import random ...
#!/usr/bin/python # Import necessary libraries/modules import os import sys sys.path.append(os.path.join("..", "..")) import argparse import numpy as np from sklearn import metrics from sklearn import datasets from sklearn.model_selection import train_test_split from sklearn.linear_model import LogisticRegression from...
#!/usr/bin/python # Import necessary libraries/modules import os import sys sys.path.append(os.path.join("..", "..")) import argparse import numpy as np from sklearn import metrics from sklearn import datasets from sklearn.model_selection import train_test_split from sklearn.linear_model import LogisticRegression from...
from math import radians, sin, cos, asin, degrees, pi, sqrt, pow, fabs, atan2 def parse_dxf(dxf_f, material_gallery): output = {} layer_color = {} flag = False x = 0 value = 'dummy' while value !='ENTITIES': key = dxf_f.readline().strip() value = dxf_f.readline().strip() ...
from math import radians, sin, cos, asin, degrees, pi, sqrt, pow, fabs, atan2 def parse_dxf(dxf_f, material_gallery): output = {} layer_color = {} flag = False x = 0 value = 'dummy' while value !='ENTITIES': key = dxf_f.readline().strip() value = dxf_f.readline().strip() ...
# This file is generated by objective.metadata # # Last update: Sun Sep 29 13:08:51 2019 import objc, sys if sys.maxsize > 2 ** 32: def sel32or64(a, b): return b else: def sel32or64(a, b): return a misc = { } misc.update({'sfntInstance': objc.createStructType('sfntInstance', sel32or64(b'{sfntInstance=ss[1l]}...
# This file is generated by objective.metadata # # Last update: Sun Sep 29 13:08:51 2019 import objc, sys if sys.maxsize > 2 ** 32: def sel32or64(a, b): return b else: def sel32or64(a, b): return a misc = { } misc.update({'sfntInstance': objc.createStructType('sfntInstance', sel32or64(b'{sfntInstance=ss[1l]}...
# Copyright 2019 Doyoung Gwak (tucan.dev@gmail.com) # 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 ...
# Copyright 2019 Doyoung Gwak (tucan.dev@gmail.com) # 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 ...
import os import sys import shutil import re from datetime import datetime import numpy as np import pandas as pd #import matplotlib.pyplot as plt import yaml from astropy.io import fits from astropy.wcs import WCS from shutil import which set_type ='evaluation' #set_type ='development_small' #set_type= 'debug' run_f...
import os import sys import shutil import re from datetime import datetime import numpy as np import pandas as pd #import matplotlib.pyplot as plt import yaml from astropy.io import fits from astropy.wcs import WCS from shutil import which set_type ='evaluation' #set_type ='development_small' #set_type= 'debug' run_f...
# coding=utf-8 # Copyright 2020 The HuggingFace Authors. # # 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 l...
# coding=utf-8 # Copyright 2020 The HuggingFace Authors. # # 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 l...
import os from functools import lru_cache from typing import Any, Dict, Optional from dotenv import load_dotenv from requests import Session load_dotenv() hyperion_base_url = f"{os.getenv("HYPERION_ENDPOINT")}/api/v1" hyperion_session = Session() hyperion_session.headers.update( { "Authorization": f"Bea...
import os from functools import lru_cache from typing import Any, Dict, Optional from dotenv import load_dotenv from requests import Session load_dotenv() hyperion_base_url = f"{os.getenv('HYPERION_ENDPOINT')}/api/v1" hyperion_session = Session() hyperion_session.headers.update( { "Authorization": f"Bea...
#!/usr/bin/env python3 from logger import logger import asyncio import websockets import json from pathlib import Path import datetime import os RootDir = '/home/pi/chain2gate' DeviceId = 'c2g-XXXXXXXXX' ServerIP = 'XXX.XXX.XXX.XXX' ApiKey = 'API_KEY' def configure(): global DeviceId, RootDir, ServerIP, ApiKey ...
#!/usr/bin/env python3 from logger import logger import asyncio import websockets import json from pathlib import Path import datetime import os RootDir = '/home/pi/chain2gate' DeviceId = 'c2g-XXXXXXXXX' ServerIP = 'XXX.XXX.XXX.XXX' ApiKey = 'API_KEY' def configure(): global DeviceId, RootDir, ServerIP, ApiKey ...
import redis def testa_chave(chave): try: conn = conectar() dados = conn.keys(pattern='produtos:*') # chamar as chaves e depois os produtos dados = str(dados) if chave in dados: return True else: return False except redis.exceptions.Connection...
import redis def testa_chave(chave): try: conn = conectar() dados = conn.keys(pattern='produtos:*') # chamar as chaves e depois os produtos dados = str(dados) if chave in dados: return True else: return False except redis.exceptions.Connection...
""" DEMO 6 ------ Calculate flow coefficient and resistance coefficient of draw-off point from known flow rate and pressure drop. """ import quantities as qty from pypeflow.core.flow_coefficient import FlowCoefficient from pypeflow.core.resistance_coefficient import ResistanceCoefficient from pypeflow.core.pipe_schedul...
""" DEMO 6 ------ Calculate flow coefficient and resistance coefficient of draw-off point from known flow rate and pressure drop. """ import quantities as qty from pypeflow.core.flow_coefficient import FlowCoefficient from pypeflow.core.resistance_coefficient import ResistanceCoefficient from pypeflow.core.pipe_schedul...
# Copyright 2020 The Feast Authors # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
# Copyright 2020 The Feast Authors # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
#!/usr/bin/env python3 import json import logging import os import sys import redis import shared.util as util from shared.exceptions import AlreadyProcessed, CurrentlyProcessing def main(): for message in reddit.inbox.stream(): search(message) def search(message): bot_mention = util.contains_user...
#!/usr/bin/env python3 import json import logging import os import sys import redis import shared.util as util from shared.exceptions import AlreadyProcessed, CurrentlyProcessing def main(): for message in reddit.inbox.stream(): search(message) def search(message): bot_mention = util.contains_user...
"""Allow to set up simple automation rules via the config file.""" from __future__ import annotations import logging from typing import Any, Awaitable, Callable, Dict, cast import voluptuous as vol from voluptuous.humanize import humanize_error from homeassistant.components import blueprint from homeassistant.const ...
"""Allow to set up simple automation rules via the config file.""" from __future__ import annotations import logging from typing import Any, Awaitable, Callable, Dict, cast import voluptuous as vol from voluptuous.humanize import humanize_error from homeassistant.components import blueprint from homeassistant.const ...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
from knowledgehub.api import KnowledgeHubAPI api = KnowledgeHubAPI(server='DEV', client_secret='3db5a6d7-4694-48a4-8a2e-e9c30d78f9ab') api.login('tester', 'tester') compoundSmile = api.ChemicalService().getSMILESByName('omeprazole') print(f'Found SMILES {compoundSmile[0]} for {'omeprazole'}') similar_compounds = api.S...
from knowledgehub.api import KnowledgeHubAPI api = KnowledgeHubAPI(server='DEV', client_secret='3db5a6d7-4694-48a4-8a2e-e9c30d78f9ab') api.login('tester', 'tester') compoundSmile = api.ChemicalService().getSMILESByName('omeprazole') print(f'Found SMILES {compoundSmile[0]} for {"omeprazole"}') similar_compounds = api.S...
""" Google Search Console API """ import logging import pickle from socket import timeout from googleapiclient.discovery import build from googleapiclient.errors import HttpError from oauth2client.client import OAuth2WebServerFlow from turbo_stream import ReaderInterface, write_file, write_file_to_s3 from turbo_strea...
""" Google Search Console API """ import logging import pickle from socket import timeout from googleapiclient.discovery import build from googleapiclient.errors import HttpError from oauth2client.client import OAuth2WebServerFlow from turbo_stream import ReaderInterface, write_file, write_file_to_s3 from turbo_strea...
import base64 import subprocess import json from pathlib import Path import random import requests import redis from redis import Redis import time import threading import collections from threading import Lock from threading import Event from queue import Queue # Mine import exceptions import abstractions import log...
import base64 import subprocess import json from pathlib import Path import random import requests import redis from redis import Redis import time import threading import collections from threading import Lock from threading import Event from queue import Queue # Mine import exceptions import abstractions import log...
import re import sys import click from sqlalchemy.orm.exc import NoResultFound import fire.cli from fire.cli.utils import klargør_ident_til_søgning from . import søg @søg.command() @fire.cli.default_options() @click.argument("ident") @click.option( "-n", "--antal", default=20, type=int, help="Be...
import re import sys import click from sqlalchemy.orm.exc import NoResultFound import fire.cli from fire.cli.utils import klargør_ident_til_søgning from . import søg @søg.command() @fire.cli.default_options() @click.argument("ident") @click.option( "-n", "--antal", default=20, type=int, help="Be...
import glob import os import emoji import pytest from click.testing import CliRunner from py_sync_dotenv.cli import formatting_engine, main test_env = """ PRODUCTION=1 DEBUG=0 SECRET_KEY=iu0^cv$mghjfa_vp8vk)e(c_5^cfo7staccjs4+!f#=1a_22-h2 DJANGO_ALLOWED_HOSTS=localhost 127.0.0.1 [::1] """ @pytest.mark.parametrize(...
import glob import os import emoji import pytest from click.testing import CliRunner from py_sync_dotenv.cli import formatting_engine, main test_env = """ PRODUCTION=1 DEBUG=0 SECRET_KEY=iu0^cv$mghjfa_vp8vk)e(c_5^cfo7staccjs4+!f#=1a_22-h2 DJANGO_ALLOWED_HOSTS=localhost 127.0.0.1 [::1] """ @pytest.mark.parametrize(...
import cklib.logging import socket from pprint import pformat from retrying import retry from typing import Callable, List, Dict, Type, Union from cklib.baseresources import BaseResource from cklib.graph import Graph from cklib.args import ArgumentParser from cklib.utils import except_log_and_pass from prometheus_clien...
import cklib.logging import socket from pprint import pformat from retrying import retry from typing import Callable, List, Dict, Type, Union from cklib.baseresources import BaseResource from cklib.graph import Graph from cklib.args import ArgumentParser from cklib.utils import except_log_and_pass from prometheus_clien...
import importlib import inspect import os from pathlib import Path from PySide6.QtCore import QDir, QSize from PySide6.QtWidgets import QFileDialog, QListWidget, QTabWidget from cilissa.images import Image from cilissa.operations import Metric, Transformation from cilissa_gui.decorators import PathInsert from cilissa...
import importlib import inspect import os from pathlib import Path from PySide6.QtCore import QDir, QSize from PySide6.QtWidgets import QFileDialog, QListWidget, QTabWidget from cilissa.images import Image from cilissa.operations import Metric, Transformation from cilissa_gui.decorators import PathInsert from cilissa...
import os.path import shutil from abc import ABC, abstractmethod from typing import List, Set from autonmt.bundle.metrics import * from autonmt.bundle.utils import * from autonmt.preprocessing.dataset import Dataset from autonmt.preprocessing.processors import normalize_file, pretokenize_file, encode_file, decode_file...
import os.path import shutil from abc import ABC, abstractmethod from typing import List, Set from autonmt.bundle.metrics import * from autonmt.bundle.utils import * from autonmt.preprocessing.dataset import Dataset from autonmt.preprocessing.processors import normalize_file, pretokenize_file, encode_file, decode_file...
import csv, re from os import path from pathlib import Path from itertools import groupby from .dbobjects import Column, Table, Schema, create_typed_table, MetaDataError, MetaDataWarning TRANSFORM_PARAM_RE = re.compile(r"\$(\d+)") class TableMappings(list): def __init__(self, table_mappings): super().__init__(t...
import csv, re from os import path from pathlib import Path from itertools import groupby from .dbobjects import Column, Table, Schema, create_typed_table, MetaDataError, MetaDataWarning TRANSFORM_PARAM_RE = re.compile(r"\$(\d+)") class TableMappings(list): def __init__(self, table_mappings): super().__init__(t...
import asyncio import heapq import time from .errors import ( BadResponseError, BadStatusError, BadStatusLine, ErrorOnStream, NoProxyError, ProxyConnError, ProxyEmptyRecvError, ProxyRecvError, ProxySendError, ProxyTimeoutError, ResolveError, ) from .resolver import Resolver ...
import asyncio import heapq import time from .errors import ( BadResponseError, BadStatusError, BadStatusLine, ErrorOnStream, NoProxyError, ProxyConnError, ProxyEmptyRecvError, ProxyRecvError, ProxySendError, ProxyTimeoutError, ResolveError, ) from .resolver import Resolver ...
import emoji import demistomock as demisto from CommonServerPython import * import traceback REPUTATION_COMMANDS = ['ip', 'domain', 'file', 'url', 'threatstream-email-reputation'] # Disable insecure warnings requests.packages.urllib3.disable_warnings() ''' GLOBALS/PARAMS ''' THREAT_STREAM = 'ThreatStream' NO_INDI...
import emoji import demistomock as demisto from CommonServerPython import * import traceback REPUTATION_COMMANDS = ['ip', 'domain', 'file', 'url', 'threatstream-email-reputation'] # Disable insecure warnings requests.packages.urllib3.disable_warnings() ''' GLOBALS/PARAMS ''' THREAT_STREAM = 'ThreatStream' NO_INDI...
#!/usr/bin/env python3 # pylint: disable=invalid-name, too-many-branches, too-many-statements, broad-except, too-many-arguments, too-many-instance-attributes, line-too-long ''' this script replaces build.sh, coz bash/sed/awk is driving me insane ''' import argparse import atexit import glob import json import os imp...
#!/usr/bin/env python3 # pylint: disable=invalid-name, too-many-branches, too-many-statements, broad-except, too-many-arguments, too-many-instance-attributes, line-too-long ''' this script replaces build.sh, coz bash/sed/awk is driving me insane ''' import argparse import atexit import glob import json import os imp...
import requests # importing request library to make https request to google news # importing beautiful soup to extract data from the website from bs4 import BeautifulSoup import csv requirement = int(input( "Please Enter the number of articles that is required in the excel file.\n")) stub = "https://www.news.g...
import requests # importing request library to make https request to google news # importing beautiful soup to extract data from the website from bs4 import BeautifulSoup import csv requirement = int(input( "Please Enter the number of articles that is required in the excel file.\n")) stub = "https://www.news.g...
# coding=utf8 import asyncio import time import threading import pprint import sys import traceback import random import amanobot import amanobot.aio from amanobot.namedtuple import ( InlineQuery, ChosenInlineResult, InputTextMessageContent, InlineQueryResultArticle, InlineQueryResultPhoto, InlineQueryResultGa...
# coding=utf8 import asyncio import time import threading import pprint import sys import traceback import random import amanobot import amanobot.aio from amanobot.namedtuple import ( InlineQuery, ChosenInlineResult, InputTextMessageContent, InlineQueryResultArticle, InlineQueryResultPhoto, InlineQueryResultGa...
import disnake from typing import Union from disnake.ext import commands import database as db import constants as var from functions import get_prefix from ext.permissions import has_command_permission class ReactionRoles(commands.Cog): def __init__(self, bot): self.bot = bot async def cog_check(sel...
import disnake from typing import Union from disnake.ext import commands import database as db import constants as var from functions import get_prefix from ext.permissions import has_command_permission class ReactionRoles(commands.Cog): def __init__(self, bot): self.bot = bot async def cog_check(sel...
import sys, os from pyprojroot import here import logging import pathlib logging.basicConfig(stream=sys.stdout, level=logging.INFO) logger = logging.getLogger() PATH = pathlib.Path(str(here())) # root = here(project_files=[".here"]) sys.path.append(str(here())) import argparse import numpy as np # drought tools fr...
import sys, os from pyprojroot import here import logging import pathlib logging.basicConfig(stream=sys.stdout, level=logging.INFO) logger = logging.getLogger() PATH = pathlib.Path(str(here())) # root = here(project_files=[".here"]) sys.path.append(str(here())) import argparse import numpy as np # drought tools fr...
# Ultroid - UserBot # Copyright (C) 2020 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in # <https://www.github.com/TeamUltroid/Ultroid/blob/main/LICENSE/>. """ ✘ Commands Available - • `{i}ftyping <time/in secs>` `Show Fake ...
# Ultroid - UserBot # Copyright (C) 2020 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in # <https://www.github.com/TeamUltroid/Ultroid/blob/main/LICENSE/>. """ ✘ Commands Available - • `{i}ftyping <time/in secs>` `Show Fake ...
import argparse import subprocess import time import os from datetime import datetime from benchmark_result import BenchmarkResult from benchmark_main import create_block_size_list from java.lang import System ############################## ############################## DEFAULT_NUM_BLOCKS = 32 # GTX 960, 8 SM DEFAU...
import argparse import subprocess import time import os from datetime import datetime from benchmark_result import BenchmarkResult from benchmark_main import create_block_size_list from java.lang import System ############################## ############################## DEFAULT_NUM_BLOCKS = 32 # GTX 960, 8 SM DEFAU...
import base64 import collections import errno import io import json import logging import multiprocessing import os from pathlib import Path import mmap import random import shutil import signal import socket import subprocess import sys import time from typing import Optional # Ray modules import ray import ray.ray_c...
import base64 import collections import errno import io import json import logging import multiprocessing import os from pathlib import Path import mmap import random import shutil import signal import socket import subprocess import sys import time from typing import Optional # Ray modules import ray import ray.ray_c...
import pandas as pd import time from bs4 import BeautifulSoup import requests import sys import random def get_headers(): """ Genera un diccionario con los datos del header. Incluye una lista de diferentes user agent de la cual elige uno de manera aleatoria. """ uastrings = [ "Mozilla/5.0 ...
import pandas as pd import time from bs4 import BeautifulSoup import requests import sys import random def get_headers(): """ Genera un diccionario con los datos del header. Incluye una lista de diferentes user agent de la cual elige uno de manera aleatoria. """ uastrings = [ "Mozilla/5.0 ...
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import dataclasses import difflib import json import textwrap from typing import Dict, cast from typing_extensions import Literal from pants.base.build_environment import pants_version f...
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import dataclasses import difflib import json import textwrap from typing import Dict, cast from typing_extensions import Literal from pants.base.build_environment import pants_version f...