text
stringlengths
957
885k
<reponame>sheffler/login_logic_jinja2 # # Login Page logic using Twisted sessions # # Defines two functions used like before filters # current_user(reqeust) - return the username or "" # require_login(request) - go to login page if not logged in # # LoginResource() # LogoutResource() # IndexResource({ dict }) # # p...
from datetime import date from decimal import Decimal from itertools import groupby from model import Cash, Currency, Stock, Bond, Option, OptionType, Position, Trade, TradeFlags from pathlib import Path import helpers import schwab import unittest class TestSchwabPositions(unittest.TestCase): def setUp(self) ->...
<reponame>ysh329/darknet2caffe<gh_stars>10-100 """ net_compiler.py Copyright 2017 <NAME> <<EMAIL>> Portions Copyright 2017 <NAME> <http://xianyi.github.io> and <NAME> <<EMAIL>> This script made to build caffe net protobuf file to inferxlite[website] .c file """ __author__ = "<NAME> <https://mrli...
<gh_stars>0 import base64 import os import platform import shutil import time from queue import Queue from typing import Any, Dict, Generator, List, Optional, Tuple, Union, cast import click import requests from hypothesis import settings from ... import service from ..._compat import metadata from ...constants impor...
# -*- coding: utf-8 -*- import os import sys from django.conf import settings from django.contrib.auth.models import Group, Permission from django.contrib.sites.models import Site from django.core.management.base import BaseCommand, CommandError from django.utils.translation import ugettext_lazy as _ from django.core.m...
<gh_stars>1-10 # # 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");...
import requests import json import sys import numpy as np # python3 reset_users_and_groups.py qa 0000000000000000000000000000000000000000000000000000000000000000 # used to reset the second environment if you would like to start fresh def get_groups(env, admin_api_key): api_url = "https://" + env + ".cloudcheckr....
import sys import gym import numpy as np from gym import spaces from .edit_photo import PhotoEditor, edit_demo import cv2 import random import logging import os DATASET_DIR = "./fivek_dataset/" TARGET_DIR = "expertC/" ORIGINAL_DIR = "original/" class PhotoEnhancementEnv(gym.Env): action_space = None observat...
# # -*- coding: utf-8 -*- # # Copyright (c) 2018 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 app...
from afqueue.common.encoding_utilities import cast_list_of_strings, cast_bytes from afqueue.messages.base_message import BaseMessage #@UnresolvedImport from afqueue.common.exception_formatter import ExceptionFormatter #@UnresolvedImport from afqueue.messages import message_types #@UnresolvedImport from afqueue.data_obj...
<filename>pype/modules/ftrack/event_handlers_user/action_create_project_structure.py import os import re from pype.modules.ftrack.lib import BaseAction, statics_icon from pype.api import Anatomy, get_project_settings class CreateProjectFolders(BaseAction): """Action create folder structure and may create hierarc...
<reponame>davidanastasiu/antibiofilm # AntiBiofilm Peptide Research # Department of Computer Science and Engineering, Santa Clara University # Author: <NAME> # If SVM model decides peptide <=64uM then the SVR model is used to predict MBIC # Hyperparameters for both models have already been tuned on the training set us...
<filename>pandas_ta/momentum/cci.py # -*- coding: utf-8 -*- from ..overlap.hlc3 import hlc3 from ..overlap.sma import sma from ..statistics.mad import mad from ..utils import get_offset, verify_series def cci(high, low, close, length=None, c=None, offset=None, **kwargs): """Indicator: Commodity Channel Index (CCI)...
""" day14a - https://adventofcode.com/2020/day/14 --- Day 14: Docking Data --- * Part 1 The initialization program (your puzzle input) can either update the bitmask or write a value to memory. Values and memory addresses are both 36-bit unsigned integers. For example, ignoring bitmasks for a moment, a line like mem[...
<filename>stacks/XIAOMATECH/1.0/services/YARN/package/scripts/yarn.py """ 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 ...
"""Case_Attribute TQL Filter""" # standard library from enum import Enum # first-party from tcex.api.tc.v3.api_endpoints import ApiEndpoints from tcex.api.tc.v3.filter_abc import FilterABC from tcex.api.tc.v3.tql.tql import Tql from tcex.api.tc.v3.tql.tql_operator import TqlOperator from tcex.api.tc.v3.tql.tql_type im...
<reponame>bm16ton/yoga-c630-linux-kernel # SPDX-License-Identifier: GPL-2.0 # # Runs UML kernel, collects output, and handles errors. # # Copyright (C) 2019, Google LLC. # Author: <NAME> <<EMAIL>> # Author: <NAME> <<EMAIL>> import logging import subprocess import os import shutil import signal from typing import Itera...
<reponame>behavioral-data/multiverse import click import os import numpy as np from transformers import (BartForConditionalGeneration, DataCollator, RobertaTokenizerFast, Trainer, TrainingArguments, BartTokenizerFast, BartConfig, BartForSequenceClassification, ...
<gh_stars>1-10 #!/usr/bin/env python3 # -+-coding: utf-8 -+- """ """ #-------------------------------------------- # Authors: <NAME> <<EMAIL>> # #-------------------------------------------- # Date: 12.12.19 #-------------------------------------------- # License: BSD (3-clause) #----------------------------------...
<reponame>manera/legacypipe from __future__ import print_function import numpy as np import fitsio from astrometry.util.fits import fits_table from legacypipe.survey import * from legacypipe.coadds import _resample_one from legacypipe.cpimage import CP_DQ_BITS from legacypipe.runbrick import rgbkwargs import sys def m...
<filename>training_tf2/lossfuncs.py """ Custom Loss functions and metrics for training/analysis """ from tf_funcs import * import tensorflow as tf # The following loss functions all expect the lpcnet model to output the lpc prediction # Computing the excitation by subtracting the lpc prediction from the target, foll...
# this program is written for Python2 # imports import Tkinter import time import random import sys from copy import copy # create game window window = Tkinter.Tk() # create window size and set no-resize option window_dimensions = [800, 625] window.geometry(str(window_dimensions[0]) + "x" + str(window_dimensions[1])...
<gh_stars>10-100 from typing import Optional, Callable import json from instagram_api import response from instagram_api.constants import Constants from instagram_api.response.model import Token from instagram_api.signatures import Signatures from instagram_api.exceptions import SettingsException from .base import Co...
<gh_stars>0 # -*- coding: utf-8 -*- """ Created on Tue Jul 7 23:49:30 2020 @author: danaukes """ import file_sorter.support as fus import file_sorter.images as fui import yaml import os import shutil # should be done in a separate script if on a remote machine # path1 = r'/home/danaukes/nas/photos/2021' # path2 = r...
# -*- coding:utf-8 -*- # # Tencent is pleased to support the open source community by making QTA available. # Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved. # Licensed under the BSD 3-Clause License (the "License"); you may not use this # file except in compliance with the License. You may ...
""" #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# Ontology Engineering Group http://www.oeg-upm.net/ #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# Copyright (C) 2016 Ontology Engineering Group. #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-...
<gh_stars>1-10 #!/usr/bin/env python # -*- coding: utf-8 -*- ### # Copyright (2016-2020) Hewlett Packard Enterprise Development LP # # 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://w...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Feedbackbot - slack bot for providing teammates with anonymous feedback. """ import argparse import os import re import sys from slacker import Slacker DESCRIPTION = 'Procedure to provide teammates with anonymous feedback on slack' USER_NOT_FOUND = 'USER_NOT_FOUND'...
# # General-purpose Photovoltaic Device Model - a drift diffusion base/Shockley-Read-Hall # model for 1st, 2nd and 3rd generation solar cells. # Copyright (C) 2008-2022 <NAME> r.c.i.mackenzie at googlemail.com # # https://www.gpvdm.com # # This program is free software; you can redistribute it and/or m...
<filename>django/project/my_web/my_web/personas/views.py from django.shortcuts import get_object_or_404 from django.http import JsonResponse from django.http import Http404 from django.http import HttpResponse from django.template import loader from django.urls import reverse import json from .models import ( Per...
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """This module helper query builder for my dashboard page.""" from sqlalchemy import and_ from sqlalchemy import literal from sqlalchemy import or_ from sqlalchemy import true, false from sqlalchemy import u...
from unittest import TestCase from glimslib import fenics_local as fenics from glimslib.simulation_helpers.helper_classes import Parameters, SubDomains, FunctionSpace, DiscontinuousScalar class Boundary(fenics.SubDomain): def inside(self, x, on_boundary): return on_boundary class TestSimulationParameter...
#!/usr/bin/env python # -*- coding:utf-8 -*- # Author: from easyai.base_name.model_name import ModelName from easyai.base_name.backbone_name import BackboneName from easyai.base_name.block_name import NormalizationType, ActivationType from easyai.base_name.block_name import LayerType, BlockType from easyai.base_name.l...
# import inspect import json # import ntpath import os # import re import sqlite3 # import time import dateutil.parser import openpyxl from pprint import pprint dartssqlitedb = os.path.join( os.path.dirname(__file__), "../data/svadarts.sqlite3db" ) # uri = 'file:' + dartssqlitedb + '?mode=ro' # db = sqlite...
import os import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.model_zoo as model_zoo class VGG(nn.Module): def __init__(self, features, num_classes=1000, init_weights=True): super(VGG, self).__init__() self.features = features self.avgpool = nn.AdaptiveAvg...
<filename>tests/test_thinkcell.py import pandas as pd import pytest from thinkcell import Thinkcell, DataFrameError from datetime import datetime import os class TestThinkcell(object): def test_init(self): tc = Thinkcell() assert tc.charts == [] def test_str_all(self): tc = Thinkcell(...
from __future__ import print_function import httplib2 import io import os import sys import time import dateutil.parser from apiclient import discovery from oauth2client import client from oauth2client import tools from oauth2client.file import Storage from apiclient.http import MediaIoBaseDownload import pprint #Ch...
import time import random TIME_SPEED = .2 DEFAULT_PROMPT = "Please enter a direction to move in.\n" list_of_valid_cardinal_directions = ["n", "s", "e", "w"] NORTH = "n" SOUTH = "s" EAST = "e" WEST = "w" YES_RESPONSE = ["yes", "y", "yep"] NO_RESPONSE = ["no", "n", "nope"] HAT = "hat" KEY = "key" BUNNY = "bunny" RI...
<filename>thanksmeter.py #!/usr/bin/env python3 from datetime import datetime as dt from dateutil.relativedelta import relativedelta as rd from pywikibot import Page, Site from pywikibot.exceptions import APIError class ThanksMeter: def __init__(self): self._site = Site('bg', fam='wikipedia') s...
<reponame>alekseyl1992/pyrobuf import unittest from pyrobuf_list import BytesList, StringList NON_STRING_VALUE = 1 class TestBytesList(unittest.TestCase): def test_append(self): bytes_list = BytesList() bytes_list.append(b"some string") self.assertEqual(bytes_list, [b"some string"]) ...
<gh_stars>1-10 # Copyright lowRISC contributors. # Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 import logging as log import os import re from pathlib import Path from utils import VERBOSE, clean_odirs, rm_path class LauncherError(Exception): def...
<filename>data.py """ auther: leechh """ import os import tensorflow as tf from tqdm import trange from math import ceil from fiat.component.chunk import chunk from fiat.component.path import mkdir class TFR(object): def __init__(self, path, count, feature_dict, shards=10, compression=None, c_level=None, seed=184...
########################################################################## # # Copyright (c) 2017, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistrib...
"""Traefik implementation Custom proxy implementations can subclass :class:`Proxy` and register in JupyterHub config: .. sourcecode:: python from mymodule import MyProxy c.JupyterHub.proxy_class = MyProxy Route Specification: - A routespec is a URL prefix ([host]/path/), e.g. 'host.tld/path/' for host-ba...
# !/usr/bin/env python # -*- coding = utf-8 -*- # @Author:wanghui """ 获取当前手机状态 1:传入手机名称 2:遍历判断手机是否使用 判断adb是否连接 否:3 是 3:判断当前手机是否被标识为使用中 是:2 否:1 4:返回一个数组 """ import os import sys from time import sleep sys.path.append("D:\\appium-android1") from subprocess import Popen, PIPE from t...
<gh_stars>0 """ destroy_artifacts.py Goes through current jobs in Jenkins and finds artifacts that have been deleted in Jenkins, but not in the artifact share. Sort of flexible, but it ties into Signiant's current build patterns fairly tightly in some areas. """ import sys,os,shutil reload(sys) sys.setdefaultencodin...
from unittest import TestCase from unittest.mock import patch import pytest from hubblestack.audit import curl from hubblestack.exceptions import HubbleCheckValidationError class TestCurl(TestCase): """ Unit tests for curl module """ def test_invalid_params1(self): """ No mandatory p...
from . import InvalidTypeArgumentError, BaseNode, File, Node, \ InvalidUssageError, GraphFailed, _NodeRunningStatus, _GraphRunningStatus, \ _GraphPostAction from . import _get_obj, _save_graph from collections import deque import json import requests import copy import collections import time import logging d...
from __future__ import division import os.path import numpy as np from unet import INPUT_SIZE, OUTPUT_SIZE, output_size_for_input import normalize import gzip import cPickle as pickle import loss_weighting import skimage.morphology from augment import augment import time import re from params import params as P _EPSI...
""" This module handles the orders. Orders are described in the xml files, and are the actions to be executed for example when keyboard keys are hitted, or in reaction to other orders. Every order is thus initialized after the parsing fo the xml files and the created in this file. Each order is applied to a target cal...
<filename>ROMS/pmacc/tools/post_tools/rompy/tags/rompy-0.1/rompy/plot_utils.py<gh_stars>0 import datetime as dt import time from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from matplotlib.figure import Figure from matplotlib.axes import Axes from matplotlib.colors import Normalize, ListedCo...
<filename>neighapp/models.py from django.db import models from datetime import datetime as dt from django.contrib.auth.models import User from cloudinary.models import CloudinaryField class Location(models.Model): name = models.CharField(max_length=30) created_at = models.DateTimeField(auto_now_add=True) u...
# -*- coding: utf-8 -*- # # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 import os import shutil import torch from dgl.data.utils import download, _get_dgl_url, extract_archive from dgllife.utils.complex_to_graph import * from dgllife.utils.io import load_mo...
<gh_stars>0 """ This module provides a Django models that can be used for querying and manipulating CEDA user accounts. """ __author__ = "<NAME>" __date__ = "2019-08-28" __copyright__ = "Copyright 2019 United Kingdom Research and Innovation" __license__ = "BSD - see LICENSE file in top-level directory" from datetime...
# Copyright (C) 2019 Apple Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
<gh_stars>0 # This file is part of Buildbot. Buildbot is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public # License as published by the Free Software Foundation, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY;...
#! /usr/bin/python # RANDLABEL.py # # Generates random ORDPATH label in the format compatible with # ordpath-test. # # -l, --lenght=<integer> length of generated label # --setup=<filename> read ORDPATH codec setup from the file # specified; each generated component has # ...
# Lint as: python3 """SHARK Importer""" import iree.compiler.tflite as iree_tflite_compile import iree.runtime as iree_rt import numpy as np import os import sys import csv import tensorflow as tf import urllib.request from shark.shark_inference import SharkInference import iree.compiler.tflite as ireec_tflite from sh...
<filename>solidata_api/api/api_dataset_outputs/endpoint_dso.py # -*- encoding: utf-8 -*- """ endpoint_dso.py """ from solidata_api.api import * log.debug(">>> api_dataset_outputs ... creating api endpoints for DSO") from . import api, document_type ### create namespace ns = Namespace('infos', description='Datase...
<gh_stars>0 #!/usr/bin/env python # -*- coding:utf-8 -*- import platform from DocumentSearch import settings import docx from pdfminer.pdfpage import PDFPage from pdfminer.layout import LAParams from pdfminer.pdfinterp import PDFResourceManager,PDFPageInterpreter from pdfminer.converter import TextConverter fr...
from django.core.urlresolvers import reverse from edivorce.apps.core.models import Question from edivorce.apps.core.utils.question_step_mapping import question_step_mapping, pre_qual_step_question_mapping def evaluate_numeric_condition(target, reveal_response): """ Tests whether the reveal_response contains ...
# -*- coding: utf-8 -*- from datetime import datetime from flask import render_template, Flask, g, session, abort, redirect, jsonify, request, url_for from werkzeug.middleware.proxy_fix import ProxyFix from urllib.parse import urlparse, urlunparse from flask_dance.consumer.storage.sqla import SQLAlchemyStorage from t...
from collections import namedtuple import logging import os import signal import socket logger = logging.getLogger(__name__) def bimap_dict(key_f, val_f, d): return { key_f(k): val_f(v) for k, v in d.items() } def str2sig(s): try: return int(s) except ValueError: pa...
# coding=utf-8 # Copyright 2021 The Deeplab2 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 law ...
<reponame>rocky-roll-call/rrc-backend<gh_stars>0 # stdlib from datetime import datetime from shutil import rmtree # django from django.conf import settings from django.contrib.auth.models import User from django.test import TestCase from django.urls import reverse # library from rest_framework import status from rest...
<gh_stars>1-10 import os from typing import List, Dict, Optional, Tuple import numpy as np import ray from pyarrow.csv import ConvertOptions __SUPPORT_FILE_FORMAT__ = { "csv": "csv", "parquet": "parquet", # "json": "json", # "npy": "npy", } from modin.pandas import DataFrame class FSRayDataSets: ...
<gh_stars>1-10 import datetime import dash_html_components as html import dash_core_components as dcc from dash_labs import Input, State, Output from ..fixtures import test_template def test_dropdown_builder(test_template): options = [{"label": s.upper(), "value": s} for s in ["a", "b", "c"]] component_dep ...
from pathlib import Path from typing import Union, List, Optional import numpy as np import torch from torch.utils.data import DataLoader from torchvision import transforms from src.datamodules.RotNet.utils.image_analytics import get_analytics_data from src.datamodules.RotNet.datasets.cropped_dataset import CroppedRo...
import os import re import hashlib import argparse CODE_HEADER = "// Auto-generated\n\n" class Instruction: argument = False occurrence = None closing_instr = False opening_instr = False keep_content = True strip_whitespaces = False def __init__(self, start, end, arg): self.star...
<filename>biblepaycentral/proposal/models.py import uuid from django.db import models from django.urls import reverse EXPENSE_TYPES = ( ('unknown', 'UNKNOWN'), ('charity', 'Charity'), ('pr', 'PR'), ('p2p', 'P2P'), ('it', 'IT'), ) class Proposal(models.Model): id = models.UUIDField...
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.words.service}. """ import time from twisted.cred import checkers, credentials, portal from twisted.internet import address, defer, reactor from twisted.internet.defer import Deferred, DeferredList, maybeDeferred, succeed...
<gh_stars>1-10 import threading, sys import random, string import socket #p=21 q=109 n=2289 e=7 d=1543 def encrypt(data): e,n=7,2289 print("encrypting : "+data) intdata = [x for x in map(ord, data)] crypteddata = [((x ** e) % n) for x in intdata] return ",".join(map(str, crypteddata)) ...
import numpy as np import pandas as pd from scipy.stats import beta from src.base.sampler import Sampler class BinaryPAL_ACS_Sampler(Sampler): def __init__(self, *args, **kwargs): self.n_p = kwargs.pop("n_p") if "n_p" in kwargs else 25 self.M = kwargs.pop("M") if "M" in kwargs else 1 self...
<reponame>augusto-herrmann/frictionless-py import os import pkgutil from collections import OrderedDict from importlib import import_module from .exception import FrictionlessException from .helpers import cached_property from .control import Control from .dialect import Dialect from .file import File from . import err...
# -*- coding: utf-8 -*- import sys import webbrowser try: import urllib.parse as urlparse except ImportError: import urlparse as urlparse import tkinter as tk def open_browsers(event): global window product = productNameEntry.get() searchedArray = [] if surugayaCheck.get() == True: s...
import datetime import time from collections import deque from loguru import logger from cat import Cat from classifier import Classifier from feeder import Feeder, FOOD_PACKAGE_SIZE from notifications import ( send_boot_up_notifications, send_visitation_info, PHOTO_COOLDOWN, ) from stream import start_st...
# coding: UTF-8 import time import torch import numpy as np from torch import nn from torch.nn.parallel import DistributedDataParallel from torch.testing._internal.data.network1 import Net from torch.utils.data import DataLoader, DistributedSampler from models.FastText import Model from train_eval import train, init_n...
<filename>pytprot/pytprot.py #!/usr/bin/python3 import parser as args # argparser script import inputfunctions, chainfunctions, modelfunctions # Import the argparser object with the necessary arguments options = args.output_argparser() ################ # INPUT PDBs # Processing the input PDB files ################...
from typing import Optional from tatsu.ast import AST from wewcompiler.objects.base import (CompileContext, ExpressionObject, Scope, StatementObject, with_ctx) from wewcompiler.objects.ir_object import (Jump, JumpTarget, Register, ...
import netCDF4 import matplotlib.gridspec as gridspec import matplotlib.pyplot as plt import numpy as np from matplotlib.colors import LinearSegmentedColormap import matplotlib.dates as mdates import pandas as pd import xarray as xr from pandas.plotting import register_matplotlib_converters register_matplotlib_convert...
<gh_stars>0 #!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2019-08-22 17:09 # @Author : Yangxiaofei # @File : rds.py # @Role : 获取阿里云RDS信息入库 import json from aliyunsdkcore.client import AcsClient from aliyunsdkrds.request.v20140815.DescribeDBInstancesRequest import DescribeDBInstancesRequest from al...
<gh_stars>0 # vim: set et sw=4 sts=4 fileencoding=utf-8: # # An alternate Python Minecraft library for the Rasperry-Pi # Copyright (c) 2013-2016 <NAME> <<EMAIL>> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # *...
<filename>Watcher/Watcher.py # This is the live version import time import json import threading import sqlite3 from sopel import module from sopel import tools from sseclient import SSEClient as EventSource class watcher(): reports = [] logReports = [] class wiki(): db = sqlite3.conne...
<reponame>beliveau-lab/OligoMiner #!/usr/bin/env python # -------------------------------------------------------------------------- # OligoMiner # bedToFastq.py # # (c) 2016 Molecular Systems Lab # Wyss Institute for Biologically-Inspired Engineering # Harvard University # # Permission is hereby granted, free of char...
import unittest from mock import mock from parameterized import parameterized from conans.test.utils.conanfile import MockConanfile, MockSettings from conans.client.tools import OSInfo from conans.errors import ConanInvalidConfiguration, ConanException from conans.tools import check_min_cppstd, valid_min_cppstd cla...
#by tom, for tom, nothing to see here, walk away. #version 2.1: modified logic, separated die() and log_parsing_error(), tests ok #version 2.0: host status check added, now testing #version 1.1: iface status removed, cpu and mem adjusted, now testing #version 1.0: ok, it does work, but logfile format changed, partia...
<reponame>maxipi/python-monthly-calendar-plot import matplotlib.pyplot as plt import pandas as pd import calendar import copy import seaborn as sns from math import ceil def monthly_calendar_figure(series, cols=3, cmap='RdYlGn_r', min_value=0.001, color_unter='lightgray', h=12, w=17): """ create a calendar wi...
#!/usr/bin/python3 # -*- coding: utf-8 -*- # auto_py2to3 is licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. # You may obtain a copy of Mulan PSL v2 at: # http://license.coscl.org.cn/MulanPSL2 # THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WIT...
# -*- coding: utf-8 -*- # # Copyright (C) 2020 <NAME> <<EMAIL>> # # This code is distributed under the terms and conditions # from the MIT License (MIT). # """Helper functions for documentation, etc.""" import inspect import logging import urllib.parse logger = logging.getLogger(__name__) def inspect_kwargs(kallab...
<filename>ocean_provider/routes/compute.py # # Copyright 2021 Ocean Protocol Foundation # SPDX-License-Identifier: Apache-2.0 # import json import logging from flask import Response, jsonify, request from flask_sieve import validate from requests.models import PreparedRequest from ocean_lib.common.http_requests.reques...
<gh_stars>10-100 import pandas as pd import numpy as np import os from scipy.stats import rankdata import math import argparse def parse_args(): parser = argparse.ArgumentParser() parser.add_argument("--enspath", type=str, default="./data", help="Path to folder with all csvs") parser.add_argument("--e...
<gh_stars>0 # -*- coding: utf-8 -*- from PyQt4 import QtGui, QtCore, Qt class QRoundProgressBar(QtGui.QWidget): StyleDonut = 1 StylePie = 2 StyleLine = 3 PositionLeft = 180 PositionTop = 90 PositionRight = 0 PositionBottom = -90 UF_VALUE = 1 UF_PERCENT = 2 UF_MAX = 4 def...
#!/usr/bin/env -S python3 -tt # -*- coding: utf-8 -*- # # SPDX-License-Identifier: Apache-2.0 # Copyright 2020 - 2022 Pionix GmbH and Contributors to EVerest # """ author: <EMAIL> FIXME (aw): Module documentation. """ from . import __version__ from . import helpers from datetime import datetime from pathlib import Pa...
<gh_stars>1-10 import base64 from couchdbkit import Database, ResourceNotFound, resource from couchdbkit.ext.django.schema import Document from django.db import models, transaction import json import uuid from couchdbkit.exceptions import ResourceConflict class SQLDocDB(Database): def delete_doc(self, doc, **para...
<reponame>KatthakS/project_freshwater #import get to call a get request on the site from random import random from bs4 import BeautifulSoup from requests import get from pprint import pprint from warnings import warn import requests class Scraper(object): def __init__(self): self.results_list_of_dicts = []...
<gh_stars>0 from benchmark.utils import resource, benchmark import hail as hl @benchmark def matrix_table_decode_and_count(): mt = hl.read_matrix_table(resource('profile.mt')) mt._force_count_rows() @benchmark def matrix_table_array_arithmetic(): mt = hl.read_matrix_table(resource('profile.mt')) mt ...
<reponame>MAKENTNU/web from http import HTTPStatus from typing import Set from urllib.parse import urlparse from django.test import Client from django_hosts import reverse from users.models import User from util.test_utils import Get, PermissionsTestCase, assert_requesting_paths_succeeds from .forms import MemberStat...
<reponame>SenorPez/project-cars-replay-enhancer """ Provides classes for default static cards. """ from PIL import Image, ImageDraw, ImageFont from replayenhancer.StaticBase import StaticBase class RaceResults(StaticBase): """ Defines a class for a default Race Results title card. This card,...
<filename>digitrec_neuralnet.py<gh_stars>1-10 import math import numpy as np import pandas as pd import matplotlib.pyplot as plt from scipy.io import loadmat import scipy.optimize as opt data = loadmat('data/ex3data1.mat') theta = loadmat('data/ex4weights.mat') theta1 = theta['Theta1'] theta2 = theta['Theta2'] x ...
""" Copyright 2019 Samsung SDS 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 ...