text stringlengths 1 927k |
|---|
#!/usr/bin/env python3
import setuptools
name = "vivy_common"
version = "0.0.0"
release = "0.0.0"
setuptools.setup(
name=name,
version=release,
author="louis",
author_email="louis@poweris.moe",
description="yametetomete vivy common module",
packages=["vivy_common"],
classifiers=[
... |
import numpy as np
import torch
import torch.nn as nn
def calc_iou(a, b):
area = (b[:, 2] - b[:, 0]) * (b[:, 3] - b[:, 1])
iw = torch.min(torch.unsqueeze(a[:, 2], dim=1), b[:, 2]) - torch.max(torch.unsqueeze(a[:, 0], 1), b[:, 0])
ih = torch.min(torch.unsqueeze(a[:, 3], dim=1), b[:, 3]) - torch.max(torch.... |
import unittest
from .testHelpers import get_cpp_function_list
class TestCommentOptions(unittest.TestCase):
def test_function_with_comment_option_should_be_forgiven(self):
function_list = get_cpp_function_list("void foo(){/* #lizard forgives*/}")
self.assertEqual(0, len(function_list))
def ... |
"""Train utils
General tools for instantiating and training models.
"""
import flax
from flax import nn
from flax import optim
from flax.training import checkpoints
from flax.training import common_utils
import jax
from jax import random
import jax.nn
import jax.numpy as jnp
from jax.config import config
config.enab... |
from .variable import variable
from .make import make
from .rule import rule
__all__ = ["variable", "make", "rule"]
print(dir()) |
import pytest
import os
import sys
import runAM
import json
# insert project directory to $PATH for imports to work
test_file = os.path.realpath(__file__)
test_dir = os.path.dirname(test_file)
project_dir = os.path.dirname(test_dir)
sys.path.append(project_dir)
bookstore_json = {"store": {
"book": [
{
... |
from time import time, sleep
from typing import List, Tuple, Dict, Any, Optional, Union
from base64 import b64decode
import base64
import random
import hashlib
import uuid
import sys
import json
import uvarint
import pprint
from local_blob import LocalBlob
from algosdk.v2client.algod import AlgodClient
from algosdk.k... |
from date_sniff.sniffer import DateSniffer
def test_years_separation():
sniffer = DateSniffer(year=2019)
assert sniffer.sniff('2019') == {'2019': []}
assert sniffer.sniff('prefix 2019 and long text') == {'prefix 2019 and long text': []}
res = {'prefix 2019 and long text another 2019': []}
assert s... |
#!/usr/bin/env python3
"""
Copyright 2020 The Magma Authors.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BAS... |
"""
Runner script for environments located in flow/benchmarks.
The environment file can be modified in the imports to change the environment
this runner script is executed on. Furthermore, the rllib specific algorithm/
parameters can be specified here once and used on multiple environments.
"""
import json
import ray... |
import pytest
import unittest
from modules.sfp_comodo import sfp_comodo
from sflib import SpiderFoot
from spiderfoot import SpiderFootEvent, SpiderFootTarget
@pytest.mark.usefixtures
class TestModuleIntegrationcomodo(unittest.TestCase):
def test_handleEvent_event_data_safe_internet_name_not_blocked_should_not_r... |
"""
Unit tests for the router class. Please don't add any test that will involve
controller or the actual replica wrapper, use mock if necessary.
"""
import asyncio
import pytest
import ray
from ray.serve.common import RunningReplicaInfo
from ray.serve.router import Query, ReplicaSet, RequestMetadata
from ray._privat... |
from flask import Flask, jsonify, json, Response, request
from flask_cors import CORS
import mysfitsTableClient
# A very basic API created using Flask that has two possible routes for requests.
app = Flask(__name__)
app.config['JSONIFY_PRETTYPRINT_REGULAR'] = False
CORS(app)
# The service basepath has a short respon... |
#!/usr/bin/python
import sys, argparse, os
from subprocess import call
from multiprocessing.dummy import Pool as ThreadPool
###################################################################
#This is a phython script to download fastq files from ENA
#You can use this directly with the enaFileParser output
##########... |
# Copyright 2013 OpenStack Foundation
# 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 requ... |
# coding=utf-8
""" This module is designed to use ONLY in the Jupyter Notebook. It is
inspired on Tyler Erickson's contribution on
https://github.com/gee-community/ee-jupyter-contrib/blob/master/examples/getting-started/display-interactive-map.ipynb
"""
import ipyleaflet
from ipywidgets import HTML, Tab, Accordion, HB... |
"""
SPDX-License-Identifier: MIT
Copyright (c) 2021, SCANOSS
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, c... |
# -*- coding: utf-8 -*-
"""VGG16 model for Keras.
# Reference
- [Very Deep Convolutional Networks for Large-Scale Image Recognition](https://arxiv.org/abs/1409.1556)
"""
from __future__ import print_function
from __future__ import absolute_import
import os
import warnings
from ..models import Model
from ..layers i... |
# true if n is prime
def isPrime(n):
if n <= 1 or int(n) != n:
return False
for x in range(2, int(n*.5)+1):
if n%x == 0:
return False
return True |
try:
t=int(input(''))
while t>0:
n=int(input(''))
if n<10:
print('What an obedient servant you are!')
else:
print('-1')
t=t-1
except Exception as e:
pass |
# -*- coding: utf-8 -*-
import logging
XSAMPA_TO_ARPABET_MAPPING = {
# stop
'p': 'P',
'b': 'B',
't': 'T',
'd': 'D',
'k': 'K',
'g': 'G',
'?': 'Q',
# 2 consonants
'pf': 'PF',
'ts': 'TS',
'tS': 'CH',
'dZ': 'JH',
# fricative
'f': 'F',
'v': 'V',
'T': 'TH... |
# -*- coding: utf-8 -*-
"""
Adapters for the field names/types returned by the MAST API.
"""
from __future__ import (division, print_function, absolute_import,
unicode_literals)
__all__ = ["koi_adapter", "planet_adapter", "star_adapter", "dataset_adapter",
"epic_adapter"]
import l... |
"""
mav_dynamics
- this file implements the dynamic equations of motion for MAV
- use unit quaternion for the attitude state
part of mavsimPy
- Beard & McLain, PUP, 2012
- Update history:
12/17/2018 - RWB
1/14/2019 - RWB
"""
import sys
sys.path.append('..')
import numpy as np
# load me... |
# -*- coding: utf-8 -*-
#
# Flask documentation build configuration file, created by
# sphinx-quickstart on Tue Apr 6 15:24:58 2010.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All c... |
""" Leetcode 210 - Course Schedule II
https://leetcode.com/problems/course-schedule-ii/
1. Topological-Sorting & BFS: Time: O(E+V) Space: O(E+V)
"""
from typing import List
class Solution1:
""" 1. Topological Sorting & BFS """
def find_order(self, numCourses: int,
prerequisites: List[L... |
from django.db import models
from django.contrib.auth.models import User
from hood.models import NeighbourHood,Business,Location
from PIL import Image
# Create your models here.
class Profile(models.Model):
user=models.OneToOneField(User,on_delete=models.CASCADE)
image=models.ImageField(default='naomi.jpg',up... |
import json
import urllib
import sqlite3 as lite
from unidecode import unidecode
# Alter the database
con = lite.connect('../db')
with con:
cur = con.cursor()
print "alter table food_des add column price real;"
print "alter table food_des add column unit varchar(60);"
with open('ndb_mean_std_unit.txt','rb') a... |
from .data_centric.routes import *
from .general import *
from .model_centric.routes import *
from .user_related import *
from .role_related import *
from .group_related import * |
import sys
import linecache
from analyze import Analyzer
from classify import Classifier
from utils import Utilities
from sklearn.ensemble import RandomForestRegressor
def main(argv):
# Constants for the analyzer and the classifier
dataset = 'commit_comments-dump.2015-01-29.json'
group = 'id'
model_fil... |
def build_preprocess_parser(parser):
preprocess_opts(parser)
return parser
def build_train_parser(parser):
model_opts(parser)
general_opts(parser)
train_opts(parser)
translate_opts(parser)
return parser
def build_test_parser(parser):
general_opts(parser)
translate_opts(parser)
... |
# readfile "rf()" function
def rf(filename):
return open(filename, "r").read()
# import external files
exec(rf("translate.py"))
exec(rf("parse.py"))
exec(rf("fileServer.py"))
# main body
# arg1 defines live server port
# main calling point of program
startServer(8080) |
import asyncio
from disnake.ext.commands import Bot, Cog
from tyrant import constants
class FruitVsVegetables(Cog):
"""Assign fruit and vegetable roles."""
def __init__(self, bot: Bot):
"""Initialize this cog with the Bot instance."""
self.bot = bot
self.locks = {}
@Cog.listene... |
from __future__ import print_function
from orphics import maps,io,cosmology,symcoupling as sc,stats,lensing
from enlib import enmap,bench
import numpy as np
import os,sys
cache = True
hdv = False
deg = 5
px = 1.5
shape,wcs = maps.rect_geometry(width_deg = deg,px_res_arcmin=px)
mc = sc.LensingModeCoupling(shape,wcs)
... |
#!/usr/bin/python3
import tweepy
import time, datetime
consumer_key = 'REDACTED'
consumer_secret = 'REDACTED'
key = 'REDACTED'
secret = 'REDACTED'
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(key, secret)
api = tweepy.API(auth)
def twitter_bot(hashtag, delay):
while True... |
"""Tests for pystac.extensions.version."""
import datetime
import unittest
from typing import List, Optional
import pystac
from pystac import ExtensionTypeError
from pystac.extensions import version
from pystac.extensions.version import VersionExtension, VersionRelType
from tests.utils import TestCases
URL_TEMPLATE:... |
import math
import multiprocessing as mp
import sys
import time
from functools import partial
from pathlib import Path
import pyrallis
import dlib
from dataclasses import dataclass
sys.path.append(".")
sys.path.append("..")
from configs.paths_config import model_paths
from utils.alignment_utils import align_face, c... |
advanced_settings_data = """
### *Advanced Settings
>This will be empty or non-existent if the user did not change any advanced settings from their default. Any settings changed from default will show up here
| Parameter | Value |
|:-----------------------:|:----------------------... |
"""Auto-generated file, do not edit by hand. GR metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_GR = PhoneMetadata(id='GR', country_code=30, international_prefix='00',
general_desc=PhoneNumberDesc(national_number_pattern='[26-9]\\d{9}', possible_number_pattern='\... |
# BSD 3-Clause License; see https://github.com/scikit-hep/uproot4/blob/master/LICENSE
from __future__ import absolute_import
import sys
import json
import numpy
import pytest
import skhep_testdata
import uproot4
import uproot4.interpretation.library
import uproot4.interpretation.jagged
import uproot4.interpretation... |
def mensagem():
print("olá mundo!!!") |
from flask_wtf import FlaskForm
from wtforms import RadioField, SelectMultipleField, widgets
class MultiCheckBoxField(SelectMultipleField):
widget = widgets.ListWidget(prefix_label=False)
option_widget = widgets.CheckboxInput()
class GoogleGroupsSubscribe(FlaskForm):
group = MultiCheckBoxField(
'... |
import numpy as np
from collections import deque
import copy
from spirl.utils.general_utils import AttrDict, split_along_axis
from spirl.data.block_stacking.src.utils.utils import quat2euler
from spirl.data.block_stacking.src.block_stacking_env import BlockStackEnv
class BlockStackDemoPolicy:
"""Follows plan on ... |
# -*- coding: utf-8 -*-
#
# michael a.g. aïvázis <michael.aivazis@para-sim.com>
# (c) 1998-2022 all rights reserved
# externals
import merlin
# declaration
class About(merlin.shells.command, family='merlin.cli.about'):
"""
Display information about this application
"""
@merlin.export(tip="print th... |
# Copyright (c) 2018 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... |
from __future__ import absolute_import
from __future__ import unicode_literals
from flask_wtf import FlaskForm
from wtforms import TextField, BooleanField
class SearchForm(FlaskForm):
s = TextField('s')
is_curated = BooleanField('Curated Only?', default=True)
is_fiction = BooleanField('Fiction Only?', de... |
from django.test import TestCase
from acp_calendar.initial_data import get_holidays_list
class TestInitialData(TestCase):
def test_get_holidays_list(self):
holidays = get_holidays_list()
self.assertEqual(144, len(holidays))
self.assertEqual('2006-01-01', holidays[0]['date'])
self... |
# Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# 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 ... |
import json
import numpy as np
from actions import Actions
class CustomEncoder(json.JSONEncoder):
def default(self, obj):
if isinstance(obj, np.integer):
return int(obj)
elif isinstance(obj, np.floating):
return float(obj)
elif isinstance(obj, np.ndarray):
... |
from typing import List, Optional, Tuple
def build_node(type: str, name: str, content: str) -> str:
"""
Wrap up content in to a html node.
:param type: content type (e.g., doc, section, text, figure)
:type path: str
:param name: content name (e.g., the name of the section)
:type path: str
... |
from django.urls import path
from . import views
urlpatterns = [
path('', views.list),
path('random/', views.random_crime_scene),
path('<int:id>/', views.crime_scene),
path('data/<int:id>', views.crime_scene_data, name="crime_scene_data"),
] |
from pyrogram import filters
from pyrogram.handlers import MessageHandler
from helpers import is_youtube
from ytdl import download
import player
from config import LOG_GROUP
async def message(client, message):
if message.text.startswith("/"):
return
if not is_youtube(message.text):
await mess... |
##############################################################################
# Copyright (c) 2015 Orange
# guyrodrigue.koffi@orange.com / koffirodrigue@gmail.com
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompani... |
def get_alert_rules(session: object, logger):
'''
Accepts a tenant session object.
Gets all alert rules from a tenant
'''
logger.debug('API - Getting Alert Rules')
res = session.request("GET", "/v2/alert/rule")
data = res.json()
return data |
import argparse
import time
import cv2
from config import system_configs
from utils.drawer import Drawer # Import Drawer to add bboxes
import os
import torch
import pprint
import json
import importlib
import numpy as np
import matplotlib
from test.coco_video import kp_detection
from nnet.py_fa... |
from farmfs.fs import sep, ROOT, Path, LINK, DIR
from itertools import permutations, combinations, chain, product
from collections import defaultdict
def permute_deep(options):
options = [permutations(options, pick) for pick in range(1,1+len(options))]
return list(chain.from_iterable(options))
def combine_dee... |
# Copyright 2019 The Cirq Developers
#
# 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 ... |
'''
Created on 30 Aug, 2020
@author: ABD
'''
#total = 0
#for abc in range(5):
# total = total + abc
#print(total) |
__author__ = 'Megha'
# Script to transfer csv containing data about various models to json
# Input csv file constituting of the model data
# Output json file representing the csv data as json object
# Assumes model name to be first line
# Field names of the model on the second line
# Data seperated by __DELIM__
# Examp... |
SS = {}
SS['00'] = 'adj.all'
SS['01'] = 'adj.pert'
SS['02'] = 'adv.all'
SS['03'] = 'noun.Tops'
SS['04'] = 'noun.act'
SS['05'] = 'noun.animal'
SS['06'] = 'noun.artifact'
SS['07'] = 'noun.attribute'
SS['08'] = 'noun.body'
SS['09'] = 'noun.cognition'
SS['10'] = 'noun.communication'
SS['11'] = 'noun.event'
SS['12'] = 'noun... |
# -*- coding: utf-8 -*-
#!/usr/bin/python
false = False
true = True
null = None
# import math
TEST = false
try:
import sys
for arg in sys.argv:
if(arg == 'test'):
print('test mode')
TEST = True
pass
except:
pass
def AddImports(libraryNames):
for libname in libraryN... |
# -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.base.exchange import Exchange
import math
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import AuthenticationE... |
import itertools
from aocd import get_data, submit
DAY = 8
YEAR = 2021
def part1(data: str) -> str:
lines = data.splitlines()
ans = 0
for line in lines:
left, right = line.split('|')
segments = left.split(' ')
code = right.split(' ')
for item in code:
if len(it... |
# pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRe... |
import toml
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score, f1_score, roc_auc_score
from logzero import logger
import torch
from torch import nn, optim
from torch.utils.data import DataLoader
from torchvision import transforms
from model import Model
from data import l... |
from csimpy import __main__
import csimpy
import os
import shutil
import tempfile
import unittest
class CliTestCase(unittest.TestCase):
EXAMPLE_SEDML_FILENAME = 'tests/fixtures/sine_imports.xml'
def setUp(self):
self.dirname = tempfile.mkdtemp()
def tearDown(self):
shutil.rmtree(self.dir... |
#!/usr/bin/env python3
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Perform basic ELF security checks on a series of executables.
Exit status will be 0 if successful, and... |
# Copyright (c) 2016, The University of Texas at Austin & University of
# California, Merced.
#
# All Rights reserved.
# See file COPYRIGHT for details.
#
# This file is part of the hIPPYlib library. For more information and source code
# availability see https://hippylib.github.io.
#
# hIPPYlib is free software; you c... |
import pytest
import pytest_xvfb
import os
import cinemasci
@pytest.fixture(autouse=True, scope='session')
def ensure_xvfb():
if not pytest_xvfb.xvfb_available():
raise Exception("Tests need Xvfb to run.")
def test_render():
# create a test database
os.system("./bin/create-database --database scratch/cine... |
"""
Unit test for custom wrapper around local storage
"""
import unittest
import sys
import json
from pathlib import Path
BASE_DIR = Path(__file__).parent.parent
sys.path.append(str(BASE_DIR.resolve()))
#pylint: disable=wrong-import-position
from core.local_storage_wrapper import LocalStorage
import testutil
class ... |
from __future__ import print_function
import functools
import json
import os
import sys
import warnings
from fnmatch import fnmatch
from os.path import expanduser
from typing import Any
import six
from pathlib2 import Path
from ..utilities.pyhocon import ConfigTree, ConfigFactory
from pyparsing import (
ParseFata... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayMsaasMediarecogAftscvpayTransactionInitializeResponse(AlipayResponse):
def __init__(self):
super(AlipayMsaasMediarecogAftscvpayTransactionInitializeResponse, self).__in... |
"""Crop letterbox from videos fixed by dvd540fix.
This assumes the input video is of dimension 720x540.
Example usage:
python dvd540crop.py 自製高擴充性機器學習系統 --height=480 --top=40
"""
import argparse
import os
import pathlib
import subprocess
i_dir = pathlib.Path(os.environ["VIDEO_ROOT"], "in")
o_dir = pathlib.Pat... |
from tkinter import *
from tkinter import ttk
class MyTreeview(Frame):
def __init__(self, master):
super().__init__(master)
self.treeview = ttk.Treeview(self)
# attach a vertical scrollbar to the frame
verbar = ttk.Scrollbar(self, orient='vertical')
verbar.pack(side = 'righ... |
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'dashboard.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise Impo... |
from utils import constant
from sklearn import svm
from sklearn.svm import SVC
from sklearn.linear_model import LogisticRegression
from xgboost import XGBClassifier
def get_classifier(ty="LR", c=1.0, max_depth=5, n_estimators=300, gamma=0):
if(ty=="LR"):
classifier = LogisticRegression(solver='lbfgs',mult... |
import math
num1 = int(input("Enter a:"))
num2 = int(input("Enter b:"))
num3 = int(input("Enter c:"))
result1 = (-num2 + math.sqrt(num2**2 - 4 * (num1) * (num3)))
result2 = (result1 / (2 * num1))
print("Positive: ")
print(result2)
print("-------------------------------------------------------------")
print("Negative: "... |
from JumpScale import j
class system_usermanager(j.code.classGetBase()):
"""
get a user
"""
def __init__(self):
pass
self._te={}
self.actorname="usermanager"
self.appname="system"
#system_usermanager_osis.__init__(self)
def authenticate(self, name,... |
# Copyright 2017 Google Inc. 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 applicable law or a... |
#!/usr/bin/env python
import sys
import os
import os.path
import copy
import subprocess
from operator import mul
from random import shuffle
from operator import mul
from functools import reduce
dirs=['stanford_sentiment_binary', 'amazon_reviews', 'ROC_stories', 'stanford_sentiment_binary_100',
'stanford_sentimen... |
import yaml
import random
import torch.backends.cudnn
import numpy as np
from autogl.datasets import build_dataset_from_name
from autogl.solver import AutoNodeClassifier
from autogl.module import Acc
from autogl.backend import DependentBackend
if __name__ == "__main__":
from argparse import ArgumentParser, Argume... |
"""mysite URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based ... |
from __future__ import annotations
from typing import Any, Dict, Optional, Text, Type
import dataclasses
import uuid
from rasa.engine.caching import Cacheable, TrainingCache
from rasa.engine.graph import ExecutionContext, GraphComponent, SchemaNode
from rasa.engine.storage.resource import Resource
from rasa.engine.sto... |
import sys
n = int(sys.stdin.readline())
countries = {}
for _ in range(n):
country = sys.stdin.readline().split()[0]
#Add to the current value (or 0 if not present)
countries[country] = countries.get(country, 0) + 1
#Order keys alphabetically
keys = sorted(countries.keys())
for k in keys:
print('{... |
from __future__ import absolute_import, unicode_literals
from django.conf import settings
from .models import Schedule
from celery.task.schedules import crontab
from celery import shared_task
from celery import task
import logging
import time, datetime
import requests
logger = logging.getLogger('portia_dashboard')
... |
#!/usr/bin/env python3
import os
from setuptools import setup, Extension
def get_version():
internal_file_location = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'pynmrstar', '_internal.py')
with open(internal_file_location, 'r') as internal_file:
for line in internal_file:
i... |
""" Parser tests """ |
#
# -*- coding: utf-8 -*-
#
# Copyright (c) 2019 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... |
"""
Fatture in Cloud API v2 - API Reference
Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 400.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. # noq... |
"""arboretum URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-b... |
import distutils.command.bdist_rpm as orig
class bdist_rpm(orig.bdist_rpm):
"""
Override the default bdist_rpm behavior to do the following:
1. Run egg_info to ensure the name and version are properly calculated.
2. Always run 'install' using --single-version-externally-managed to
disable eggs... |
"""
This library provides an easy way to script administration tasks for the
Pure Storage FlashArray.
When passing arguments to methods that take \*\*kwargs, the exact
parameters that can be passed can be found in the REST API guide for the
given release of Purity running on the FlashArray.
"""
import json
import req... |
import allure
from selene.core.exceptions import TimeoutException
from selene.support.shared import browser
def attach_snapshots_on_failure(error: TimeoutException) -> Exception:
"""
An example of selene hook_wait_failure that attaches snapshots to failed test step.
It is actually might not needed,
be... |
import numpy as np
import matplotlib.pyplot as plt
if __name__ == '__main__':
x=np.arange(50)
y=np.array([-59.00138158129509,
-43.966695525591895,
-52.5277642686108,
-32.1793153104166,
-37.81484603001339,
-24.97787027415733,... |
import datetime as dt
from requests import HTTPError
import eospy.cleos
import eospy.keys
import pytz
from settings import user_param
def push_transaction(params_json):
# this url is to a testnet that may or may not be working.
# We suggest using a different testnet such as kylin or jungle
#
ce = eosp... |
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
from __future__ import absolute_import, print_function
import io
import os
import re
from glob import glob
from os.path import basename
from os.path import dirname
from os.path import join
from os.path import relpath
from os.path import splitext
from setuptools import f... |
"""
Information about available RAM/swap
There is no portable way to figure these out, nor should you generally
have to. But GAP currently needs to allocate a cache of fixed size
upon startup, and we would like a certain fraction of the swap address
space.
EXAMPLES::
sage: from sage.misc.memory_info import Memor... |
# 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 accompan... |
import os
import uuid
import json
import shutil
import logging
from nose.tools import raises
from numpy import array_equal
from adeft.modeling.classify import load_model
from adeft.locations import TEST_RESOURCES_PATH
from adeft.disambiguate import AdeftDisambiguator, load_disambiguator
logger = logging.getLogger(__... |
# Copyright 2013 Nebula 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... |
# coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 6
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import isi_sdk_8_1_1
from i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.