text stringlengths 6.04k 39.5k |
|---|
# -*- coding: utf-8 -*-
###################################################################################
# Copyright (C) 2019 SuXueFeng
# 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
#
# ... |
"""Forest of monotone trees-based ensemble methods
This module contains methods for fitting monotone tree ensembles for
classification. Monotonicity in the requested features is achieved using the
technique from Bartley C., Liu W., and Reynolds M. 2017, ``Fast & Perfect
Monotone Random Forest Classification``, availab... |
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
from torch.distributions.normal import Normal
import argparse
import numpy as np
import gym
import pybullet_envs
import time
import random
import os
import wandb
import tqdm
import matplotlib.pyplot as plt
device = torch.d... |
# Python Chip8 Interpreter CPU
# <NAME> 09/15
from array import *
from threading import Timer
from screen import *
from keyboard import *
import logging
import random
class CPU:
# Constants
__font = array('B', [
0xF0, 0x90, 0x90, 0x90, 0xF0,
0x20, 0x60, 0x20, 0x20, 0x70,
0xF0, 0x10, 0... |
#!/usr/bin/env python
"""#
# to run the script
#
# fab -H root@1.1.1.1.1 setup
#
# fab -H root@1.1.1.1.1 my_task:param1
#
# for test
# env SAAS_USER=accounts fab -H <EMAIL>enerp.<EMAIL> update:saas-1
#
"""
import ConfigParser
import io
import json
import os
import re
from fabric.api import task, env, run, cd, su... |
"""
Copyright (c) <NAME> (https://github.com/mikemag)
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
AP CS Levenshtein distance project.
Implementation of the project, which is to find a path between two words making a
single edit at each step... |
import itertools
import os
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
import torch.cuda.amp as amp
from common.collector import Collector
from common.network import VAEBase
from common.networkbase import Container
from common.stable_optim import hAdam
from common.gscale import S... |
# -*- coding: utf-8 -*-
from collections import OrderedDict
import copy
import datetime
import glob
import logging
import os, os.path
import shutil
import tempfile
from netCDF4 import Dataset, MFDataset, date2num, num2date
import numpy as np
try:
from nco import Nco
_NCO = True
except ImportError:
_NCO =... |
import textwrap
from PIL import ImageDraw
from pybud import json_helper
from pybud.printout_builders import *
from pybud.utils import prYellow
from pybud.video.encoders import *
from pybud.video.video_config_handler import *
class VideoLogger:
def __init__(self, log_path, config_path=str(Path(__file__).parent /... |
import numpy as np
from datetime import datetime
import os
import subprocess
import time
import tensorflow as tf
import traceback
import argparse
from tacotron.feeder import Feeder
from hparams import hparams_debug_string
from tacotron.models import create_model
from tacotron.utils.text import sequence_to_text
from ... |
import tkinter as tk
from tkinter.constants import END
import tkinter.messagebox as mb
import tkinter.filedialog as fd
from tkinter import StringVar, ttk
from UI.Capture import Capturing
from Blockchain import Block, Blockchain
import os
import copy
import random
import datetime
import hashlib
import socket
import pick... |
"""
Central module for calculating the tidal amplitudes, phases, etc.
"""
import numpy as np
from ._time_conversion import _normalize_time
from .confidence import _confidence
from .constituent_selection import ut_cnstitsel
from .diagnostics import _PE, _SNR, ut_diagn
from .ellipse_params import ut_cs2cep
from .harmoni... |
#-----------------------------------------------------------------------------
# Copyright (c) 2005-2020, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License (version 2
# or later) with exception for distributing the bootloader.
#
# The full license is in the file COPYING.txt... |
"""Deal with Motifs or Signatures allowing ambiguity in the sequences.
This class contains Schema which deal with Motifs and Signatures at
a higher level, by introducing `don't care` (ambiguity) symbols into
the sequences. For instance, you could combine the following Motifs:
'GATC', 'GATG', 'GATG', 'GATT'
as all fa... |
# Code adopted from:
# <NAME>. “spectrum_utils: A Python package for mass spectrometry data processing and visualization.”
# Analytical Chemistry 92 (1) 659-661 (2020) doi:10.1021/acs.analchem.9b04884.
# Apache License
# Version 2.0, January 2004
# ... |
# Copyright 2010-2015 MongoDB, 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 agreed to in writin... |
# Copyright (C) 2020-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
import json
import os.path as osp
from typing import Any, Dict, List, Optional, Sequence
import numpy as np
from ote_sdk.entities.annotation import Annotation, AnnotationSceneEntity, AnnotationSceneKind
from ote_sdk.entities.dataset_it... |
import torch
import torch.nn as nn
import torch.nn.functional as F
import torchvision.models as models
from functools import partial
import math
from .helpers import load_pretrained
from .layers import DropPath, to_2tuple, trunc_normal_
from ..builder import BACKBONES
from mmcv.cnn import build_norm_layer
from .r... |
"""
This module offers a modified interface for MCMC inference with the following objectives:
- making MCMC independent of Pyro specific trace data structure, to facilitate
integration with other PyTorch based libraries.
- bringing the interface closer to that of NumPyro to make it easier to write
code that... |
# Copyright 2017 <NAME>
#
# 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, software
... |
# -*- coding: utf-8 -*-
# File: data.py
import copy
import itertools
import numpy as np
import cv2
from tabulate import tabulate
from termcolor import colored
import shutil
import os
import pdb
from tensorpack.dataflow import (
DataFromList,
MapData,
MapDataComponent,
MultiProcessMapData,
MultiThr... |
from collections import OrderedDict, defaultdict
import pandas as pd
import cv2
import torch
import os
import yaml
import numpy as np
import json
from tqdm import tqdm
from shutil import copy
from ast import literal_eval
import SimpleITK as sitk
import pydicom
import nibabel as nib
import matplotlib.pyplot as plt
fr... |
# Copyright 2018 <NAME>
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
# http://opensource.org/licenses/MIT>, at your option. This file may not be
# copied, modified, or distributed except according to those terms.
"""Co... |
import queue
import random
import threading
import itertools
from functools import reduce, partial
from pathlib import Path
from time import perf_counter
import sys
import os
#from numba import jit
#from numba.experimental import jitclass
#import panel as pn
import bokeh.layouts
import datashader
import numpy as np
f... |
from warnings import warn
import autograd.numpy as np
import autograd.numpy.random as npr
from autograd.scipy.special import logsumexp
from autograd.scipy.linalg import block_diag
from autograd import grad
from scipy.optimize import linear_sum_assignment, minimize
from scipy.special import gammaln, digamma, polygamma... |
# Copyright (c) 2020 PaddlePaddle 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 2018-present MongoDB, 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 agreed to in wri... |
#!/usr/bin/env python
"""Main Terminal Module"""
__docformat__ = "numpy"
import sys
import os
import difflib
import logging
import argparse
import platform
from typing import List
import pytz
from prompt_toolkit.completion import NestedCompleter
from gamestonk_terminal.rich_config import console
from gamestonk_termi... |
# coding=utf-8
import pymongo
import locale
import yaml
import pkg_resources
import werkzeug.exceptions
from starflyer import Application, URL, AttributeMapper, Handler
from sfext.uploader import upload_module, Assets, ImageSizeProcessor
from sfext.uploader.stores import FilesystemStore
from sfext.babel import babel_... |
# ----------------------------------
# Assignment 2
# written by <NAME> 40042599
# For COMP 472 section ABKX - Summer 2020
# ----------------------------------
import re
import pandas as pd
from collections import Counter
import numpy as np
import copy
from sklearn.metrics import classification_report
import matplotli... |
# Built-in packages
import base64
import io
import statistics
from datetime import date
import os
import json
from random import choice
import string
import time
import subprocess
# Local packages
from views import appD
# Installed packages
import humanize
from dash.dependencies import Input, Output,... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import json
from typing import Union
import os
from warnings import warn
# from toolbox.file_util.path import is_valid_dir
from toolbox.appdirs import user_config_dir
from toolbox import path
# try:
from toolbox.pathlib import Path
# except Exception as e:
# ... |
"""
===========================================================================
Modelize the static and dynamic behaviour ok an orienteering compass in the
Earth magnetic field
Every parameters are in international system units, angles in radians
=========================================================================... |
"""
Copyright (c) 2019-2020 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 w... |
from src import app
from flask import request, render_template, json, Response, abort, redirect
from models import User, Tweet, Link, UserLink
import urllib
import base64
from google.appengine.api import urlfetch, taskqueue, mail
import datetime
import math
from flask.ext.jsontools import jsonapi
import urlparse
import... |
#! /usr/bin/env python
# encoding: utf-8
import sys
if sys.hexversion < 0x020400f0: from sets import Set as set
import os,sys,re,optparse
import ccroot
import TaskGen,Utils,Task,Configure,Logs,Build
from Logs import debug,error
from TaskGen import taskgen,feature,after,before,extension
from Configure import conftest
EX... |
"""A collection of monitors for the SimpleMonitor application.
The Monitor class contains the monitor-independent logic for handling results etc.
Subclasses should provide an __init__(), and override at least run_test() to actually
perform the test. A successful test should call self.record_success() and a failed one... |
#
# Copyright (c) 2019, NVIDIA 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 ... |
import argparse
import os
import queue
import multiprocessing as mp
# import SharedArray as sa
import numpy as np
from copy import deepcopy
from time import time
from pprint import pprint
from utils.data_manipulators import *
from evolution.operators import *
from to.probabilistic_model import ProbabilisticModel
fr... |
#!/usr/bin/env python3
# NOTE: Use `semver` from the following git repo or a newer version.
# git+https://github.com/python-semver/python-semver.git@3.0.0-dev.3
# Internal Imports
#...
# External Imports
# try:
# from elftools.elf.elffile import ELFFile
# except:
# import sys
# print(
# "Error: `pyelftools v0.... |
# Copyright 2018 Google LLC
#
# 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, ... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import os
from collections import namedtuple
import random
import numpy as np
import pandas as pd
import tensorflow as tf
import dltk.core.modules as modules
from dualstream_fcn_v2 import Dual... |
from tkinter import *
from tkinter import ttk
from tkinter import messagebox
import sqlite3
from tkinter import colorchooser
root = Tk()
root.title('Codemy.com - TreeBase')
root.iconbitmap('')
root.geometry("1000x550")
def query_database():
# Clear the Treeview
for record in my_tree.get_children():
my_tree.delet... |
import io
import os
import pathlib
import warnings
from collections import OrderedDict
from copy import deepcopy
import gym
import numpy as np
import pytest
import torch as th
from stable_baselines3 import A2C, DDPG, DQN, PPO, SAC, TD3
from stable_baselines3.common.base_class import BaseAlgorithm
from stable_baseline... |
# -*-coding: utf8-*-
"""symboldict module
"""
from __future__ import (absolute_import, division,
print_function, unicode_literals)
import functools
from importlib import import_module
import sys
from .version import __version__
import warnings
def deprecated(func):
'''This is a decorator w... |
import sys
import os
# import
import pydot
import ply.yacc as yacc
import node_def as nd
from new_lexer import *
import ast_decl
precedence = (
('right','AGN', 'NOT'),
('left', 'LOR'),
('left', 'LAND'),
('left', 'OR'),
('left', 'XOR'),
('left', 'AND'),
('left', 'EQL', 'NEQ'),
('left',... |
# 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, software
# d... |
import os
import tarfile
import zipfile
import re
import requests
import platform
import subprocess
import json
import shutil
import io
import tempfile
from default_platform import default_platform
import deps_cross_checker
import aws
# Master table of dependency types.
# A dependency definition can specify 'type' to... |
# Copyright 2013 <NAME>
#
# 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, soft... |
import csv
import configparser
import os
import argparse
import datetime
import shutil
def mssql_connect(config):
host = config['mssql']['host']
port = config['mssql']['port']
database = config['mssql']['database']
user = config['mssql']['user']
pwd = config['mssql']['pwd']
if 'dri... |
from __future__ import print_function, division, unicode_literals, absolute_import
import os
import numpy as np
import re
from GCR import GCRQuery
from scipy import interpolate
from scipy.stats import binned_statistic
try:
from itertools import zip_longest
except ImportError:
from itertools import izip_longest ... |
# Copyright (c) 2005-2009 <NAME>
#
# Distributed under the MIT license (See accompanying file
# LICENSE.txt or copy at http://jagpdf.org/LICENSE.txt)
#
import os
import jag.imagemanip as imagemanip
import jag.testlib as testlib
import jagpdf
import tempfile
import sys
import md5
#mask interpolation - it seems the it ... |
"""
Quadruple generators for the 2 style dimensions and the 2 style characteristics
"""
import logging
import random
from abc import ABC
import nltk
import pandas as pd
# import leetspeak
# Generator for the Turker simplification dataset
from base_generators import WikiAbstractStream
from const_generators import ... |
import os
from torchvision.transforms.transforms import ToTensor
from haco.DIDrive_core.demo.cict_demo.post import Sensor, params
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import grad
import torchvision.transforms as transforms
import cv2
from haco.DIDrive_core.demo.cict_de... |
"""
I/O for Ansys's msh format, cf.
<http://www.afs.enea.it/fluent/Public/Fluent-Doc/PDF/chp03.pdf>.
"""
import logging
import re
import numpy
from ..__about__ import __version__
from .._exceptions import ReadError, WriteError
from .._files import open_file
from .._helpers import register
from .._mesh import Mesh
d... |
"""Polygons and Linear Rings
"""
import numpy as np
import pytest
from shapely.coords import CoordinateSequence
from shapely.errors import TopologicalError
from shapely.geometry import LinearRing, LineString, Point, Polygon
from shapely.wkb import loads as load_wkb
def test_empty_linearring_coords():
assert Line... |
"""Tests for the WeldxFile class."""
import itertools
import os
import pathlib
import shutil
import tempfile
from io import BytesIO
import asdf
import numpy as np
import pytest
import xarray as xr
from jsonschema import ValidationError
from weldx import WeldxFile
from weldx.asdf.cli.welding_schema import single_pass_... |
# 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, software
# distributed under the... |
#!/usr/bin/env python3
from neml import history, interpolate
from neml.math import tensors, rotations, matrix
from neml.cp import crystallography, slipharden, sliprules
from common import differentiate
from nicediff import *
import unittest
import numpy as np
import numpy.linalg as la
class CommonSlipRule(object):
... |
#!/usr/bin/env python3
import logging
import random
import time
import pygame
from gamelib import logging as gamelog
from gamelib import util as gameutil
from gamelib import Display, GameBoard, colors, fonts, sounds
from gamelib.constants import KEY_DOWN, KEY_LEFT, KEY_RIGHT, KEY_UP
from pieces import BLANK, SHAPES, ... |
# Built-in
from operator import pos
import os
import argparse
# Libs
import albumentations as A
from albumentations.pytorch import ToTensorV2
from natsort import natsorted
import numpy as np
from skimage import io, measure
from tqdm import tqdm
# Own modules
from mrs_utils import misc_utils, eval_utils
from network i... |
import logging
import os
import re
import tempfile
from typing import List, Any, Tuple, cast, Dict
from urllib.parse import urlparse
import psycopg2.errorcodes
import psycopg2.extras
import sqlparse
from psycopg2 import connect
from psycopg2._psycopg import OperationalError
from psycopg2.extensions import ISOLATION_LE... |
from functools import wraps
import numpy as np
from aesara import Constant
from aesara import scalar as scal
from aesara import tensor
from aesara.gof import local_optimizer
from aesara.gof.op import Op
from aesara.gof.opt import copy_stack_trace, inherit_stack_trace
from aesara.gpuarray.basic_ops import (
GpuAll... |
#
# Copyright (c) SAS Institute 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 agreed to in w... |
from __future__ import absolute_import, unicode_literals
import sys
from collections import OrderedDict
from inspect import getmro
import param
from panel.pane import PaneBase
from panel.layout import Row, Tabs
from panel.util import param_name
from .core import DynamicMap, HoloMap, ViewableElement, Element, Layou... |
# Copyright (C) 2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
from abc import ABC, abstractmethod
from collections import OrderedDict
from pprint import pformat
from typing import Any, Callable, Dict, Optional
import pytest
from .e2e_test_system import DataCollector
from .logging import get_logger
f... |
# -*- coding: utf-8 -*-
#
# This file is part of PyBuilder
#
# Copyright 2011-2020 PyBuilder 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/l... |
import collections
import csv
import hashlib
import math
import pickle
import re
from collections import deque
from copy import deepcopy
from datetime import datetime
from pathlib import Path
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from bs4 import BeautifulSoup
from colour import Color
f... |
# --------------------------------------------------------------------------
# Source file provided under Apache License, Version 2.0, January 2004,
# http://www.apache.org/licenses/
# (c) Copyright IBM Corp. 2015, 2016
# --------------------------------------------------------------------------
# coding=utf-8
# -----... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import division, print_function
"""
A pure python ping implementation using raw sockets.
Compatibility:
OS: Linux, Windows, MacOSX
Python: 2.6 - 3.5
Note that due to the usage of RAW sockets root/Administrator
privileges a... |
import pytest
import os
import glob
import shutil
from pathlib import Path, PurePosixPath
import pandas as pd
import fuckit
import warnings
import luigi
import d6tcollect
d6tcollect.submit=False
import d6tflow
pathdata = d6tflow.set_dir('tests-data/')
d6tflow.settings.log_level = 'WARNING'
# test data
df = pd.DataFr... |
# !/usr/bin/python
import subprocess
try:
from OpenSSL import crypto
except ImportError:
subprocess.run(["pip3", "install", "pyopenssl"], capture_output=True)
from OpenSSL import crypto
import os
import getopt
import sys
import random
from shutil import copyfile
import uuid
from jinja2 import Template
import so... |
import argparse
import glob
import os
from random import seed, shuffle, randint
import numpy as np
from datetime import datetime
import matplotlib.pyplot as plt
import pandas as pd
import librosa
import imageio
import matplotlib.pyplot as plt
from sklearn.model_selection import GroupKFold
import sys
## global
SEED = 2... |
# -*- coding: utf-8 -*-
"""
Created on Thu Aug 29 11:36:42 2019
@author: dell
"""
# this file is added to produce corpora as well as LDA model
import pandas as pd
import numpy as np
import os
# load in/out data
import pickle
import json
import random as rd
# gensim packages
import gensim
from gensim.corpora.dictionary... |
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# (C) British Crown Copyright 2017-2021 Met Office.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions a... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
__author__ = '<NAME>'
from lxml import objectify
from lxml.builder import E
import xml.etree.ElementTree as ET
import pandas as pd
import qualysapi
import qualysapi.config as qcconf
import requests
import sys
import os
import csv
import logging
import dateutil.parser as dp
c... |
import git
import html
import json
import os
from os.path import basename, exists, join, relpath, split
from shutil import copy, move, rmtree
import stat
import subprocess
import sys
import time
from archive import archive
import buildtools
from config import config
import db
import gitutils
from jam import jam
import... |
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or th... |
from . import matcher
import matplotlib.pyplot as plt
import matplotlib.colors as clrs
from scipy import stats
import numpy as np
import umap
import seaborn as sns
import matplotlib.patches as mpatches
def pearsonMatrix(dataset_filtered, patterns_filtered, cellTypeColumnName, num_cell_types, projectionName, plotName,... |
from copy import deepcopy
import logging
import numpy as np
import pandas as pd
from scipy.stats import norm
from sklearn.model_selection import cross_val_predict, KFold
from tqdm import tqdm
from xgboost import XGBRegressor
from causalml.inference.meta.base import BaseLearner
from causalml.inference.meta.explainer im... |
from datetime import datetime
from typing import Any, Dict, Optional, Tuple, Type, TypeVar
import regex
from regex import Regex
T = TypeVar('T', bound='Artifact')
class Artifact:
def __init__(self) -> None:
self.mstart = 0
self.mend = 0
self._attrs = ['mstart', 'mend']
def update_sp... |
import copy
import pytest
from datetime import datetime, timedelta
from django.core.management import call_command
from django.db import connections
from django.db.models import Q
from django.test import TestCase
from model_mommy import mommy
from usaspending_api.awards.models import FinancialAccountsByAwards
from usa... |
from biopharma import units
from biopharma.core import SpecificationViolatedError
from biopharma.specs import *
from enum import Enum
import os
from math import inf
import pandas as pd
import pytest
from pytest import fixture, raises
def test_quantity_specs():
spec = Q('m', 'desc')
assert spec.description... |
#!/usr/bin/env python3
"""
Twitter Media Scraper v1.2
Created by <NAME>
<EMAIL>
GitHub: cjharris18
"""
from argparse import ArgumentParser
from os import system, environ, getenv, path
from tweepy import Client
from requests import head, Response
from json import loads, dump
from regex import compile
from pylatex impo... |
from collections import OrderedDict, Counter, defaultdict
import random
import math
import uuid
import datetime
from flask import Flask, render_template, current_app, Markup, abort, url_for
from flask import make_response, request
from flask.json import jsonify
from jinja2 import StrictUndefined
import markdown
import... |
import datetime
from pylons import config
from sqlalchemy import Table, select, join, func, and_
import ckan.plugins as p
import ckan.model as model
cache_enabled = p.toolkit.asbool(config.get('ckanext.stats.cache_enabled', 'True'))
if cache_enabled:
from pylons import cache
our_cache = cache.get_cache('sta... |
from __future__ import division
from nose_parameterized import parameterized
from six.moves import range
import numpy as np
import pandas as pd
import talib
from zipline.lib.adjusted_array import AdjustedArray
from zipline.pipeline import TermGraph
from zipline.pipeline.data import USEquityPricing
from zipline.pipeli... |
"""
recipy test case runner.
Run tests to check that recipy logs information on input and output
functions invoked by scripts which use packages that recipy has been
configured to log.
Tests are specified using a [YAML](http://yaml.org/) (YAML Ain't
Markup Language) configuration file. YAML syntax is:
* `---` indica... |
"""Submodule for handling everything related to address matching/bitmasking and
paging."""
from collections import namedtuple, OrderedDict
from .mixins import Shaped, Named, Unique
_MaskedAddress = namedtuple('_MaskedAddress', ['address', 'mask'])
class MaskedAddress(_MaskedAddress):
"""Represents an address wit... |
# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division,
print_function, unicode_literals)
from builtins import *
from datetime import datetime, timedelta
from operator import attrgetter, itemgetter
import json
import os
from lxml import etree
import rdflib
from rdflib import... |
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 13 10:57:13 2021
@author: vlro
"""
import pathlib
import xml.etree.ElementTree as ET
import numpy as np
from affine import Affine
from shapely.geometry import box, Point, shape, mapping
import fiona
from fiona.crs import from_epsg
import datetime
import os
import subproce... |
# -*- coding: utf-8 -*-
"""
Created on Tues at some point in time
@author: bokorn with some code pulled from https://github.com/yuxng/PoseCNN/blob/master/lib/datasets/lov.py
"""
import os
import cv2
import torch
import numpy as np
import scipy.io as sio
import time
import sys
from se3_distributions.datasets.image_dat... |
#!/usr/bin/env python3
# Copyright (c) 2022 The Bitcoin and Qogecoin Core Authors
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
""" Tests the utxocache:* tracepoint API interface.
See https://github.com/qogecoin/qogecoin/blo... |
import numpy
import theano
from theano import scalar, gof
from theano.tests.unittest_tools import SkipTest, assert_allclose
from theano.tensor.tests import test_elemwise
from .config import mode_with_gpu, test_ctx_name
from .test_basic_ops import rand_gpuarray
from ..elemwise import (GpuElemwise, GpuDimShuffle,
... |
from PyQt5.QtCore import Qt, pyqtSignal, QObject, QUrl, QRect
from PyQt5.QtWidgets import QWidget, QDialog, QMessageBox, QStyle, QAction, QLineEdit, QSizePolicy, QVBoxLayout
from PyQt5.QtGui import QIcon, QContextMenuEvent
from PyQt5.QtWebEngineCore import QWebEngineRegisterProtocolHandlerRequest
from PyQt5.QtWebEngine... |
# import demistomock as demisto
from CommonServerPython import *
from datetime import datetime
import urllib3
import dateparser
import traceback
from typing import Any, Dict, List, Optional, Tuple, cast, Iterable
urllib3.disable_warnings()
''' CONSTANTS '''
DATE_FORMAT = '%Y-%m-%dT%H:%M:%SZ'
MAX_EVENTS_TO_FETCH = 5... |
# -*- coding: utf-8 -*-
"""
PiDashboard Widgets
"""
import time
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtCore import Qt, QTimeLine, pyqtSignal
from PyQt5.QtGui import *
from lib import pi_charts, pi_mixins, utils
from lib.decorators import threaded_method
WIDGETS = {
'stack': lambda *args: PiStacked... |
"""
Execution module for Cisco NX OS Switches.
.. versionadded:: 2016.11.0
This module supports execution using a Proxy Minion or Native Minion:
1) Proxy Minion: Connect over SSH or NX-API HTTP(S).
See :mod:`salt.proxy.nxos <salt.proxy.nxos>` for proxy minion setup details.
2) Native Minion: Connect over NX-... |
# coding=utf-8
#
# This file is part of Hypothesis, which may be found at
# https://github.com/HypothesisWorks/hypothesis-python
#
# Most of this work is copyright (C) 2013-2018 <NAME>
# (<EMAIL>), but it contains contributions by others. See
# CONTRIBUTING.rst for a full list of people who may hold copyright, and
# co... |
import os
import json
import subprocess
from datetime import datetime
from libqtile import bar, layout, widget
from libqtile.config import Click, Drag, Group, Key, Match, Screen
from libqtile.lazy import lazy
from libqtile import qtile
from libqtile import hook
with open("{}/.config/qtile/config/settings.json".format... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.