text stringlengths 1 927k |
|---|
# -*- coding: utf-8 -*-
import os
import re
from datetime import datetime
from uuid import uuid4
from cornice import Service
from email_validator import validate_email, EmailNotValidError
from db import Session, User
from utilities import error_dict, hash_password
# Sphinx doc stuff
from db.converters import dict_fr... |
import os
import platform as p
import sys
import json
from os.path import join
def read_json(path):
try:
with open(path) as f:
output = json.loads(f.read())
return output
except:
try:
with open(join("..","..", path)) as f:
output = json.loads(f.re... |
# Generated by Django 2.0.6 on 2018-06-05 14:38
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('extractor', '0003_extracteddata'),
]
operations = [
migrations.RenameField(
model_name='extracteddata',
old_name='filename',... |
"""
Created on Feb 27, 2018
@author: nhan.nguyen
This module contains class "TesterSimulateLoad" that performs load testing.
"""
import threading
import time
import utils
import asyncio
import argparse
import random
import requests_builder
import requests_sender
from perf_tester import Tester
class Option:
de... |
import unittest
import asynctest
from opsdroid.database import Database
class TestDatabaseBaseClass(unittest.TestCase):
"""Test the opsdroid database base class."""
def test_init(self):
config = {"example_item": "test"}
database = Database(config)
self.assertEqual("", database.name)
... |
import itertools
from .card import Card
from .deck import Deck
from .lookup import LookupTable
class Evaluator(object):
"""
Evaluates hand strengths using a variant of Cactus Kev's algorithm:
http://www.suffecool.net/poker/evaluator.html
I make considerable optimizations in terms of speed and memory u... |
import calendar
#monthdayscalendarの戻り値
#1週間毎の日をlistで返す。前後月の場合、日は0となる。また、週は前月、次月を含む(必ず7日分)。
"""
[0, 0, 0, 0, 1, 2, 3]
[4, 5, 6, 7, 8, 9, 10]
[11, 12, 13, 14, 15, 16, 17]
[18, 19, 20, 21, 22, 23, 24]
[25, 26, 27, 28, 29, 30, 0]
"""
def monthdayscalendar(calendar): return calendar.monthdayscalendar(2017, 9)
for calendar ... |
#!/usr/bin/env python
import os
import pyfwk
from pyfi.entity.entity.db import EntityDB
# -----------------------------EXCHANGE-MODEL-----------------------------#
class ExchangeModel(pyfwk.Model):
model = None
dbase = None
table = None
columns = None
@staticmethod
def instance():
i... |
#!/usr/bin/env python
from multicorn import ForeignDataWrapper
import numpy as np
import scipy.stats
class RNGWrapper(ForeignDataWrapper):
def __init__(self, options, columns):
super(RNGWrapper, self).__init__(options, columns)
self.columns = columns
# default to the normal distributio... |
from typing import Any
from selenium.webdriver.remote.webelement import WebElement
from ..MicrosoftFormComponent import MicrosoftFormComponent
class Radio(MicrosoftFormComponent):
"""Create a Microsoft form Radio (select with no dropdown) component
Paramaters
----------
web_element: `'WebElement'`, ... |
# -*- coding: utf-8 -*-
"""
Created on Thu Jul 4 13:52:25 2019
SHAP importance calculation for Random Forests with standard parameters
using training/test split
Obs: Run the code in the same folder as your data files
@author: Grazziela Figueredo
"""
import pandas as pd #for manipulating data
import numpy as np #for... |
import sys, os
import cv2
import pytest
import base64
import matchvec
import io
def assert_clio(resp_data) :
assert resp_data[0][0]["brand_model_classif"]["prob"][0] > 0.8, 'Classif confidence too low %s'%resp_data
assert resp_data[0][0]["brand_model_classif"]["pred"][0] == "RENAULT CLIO", 'Not a clio'
a... |
import cmath
from numba import types, utils
from numba.typing.templates import (AbstractTemplate, ConcreteTemplate,
signature, Registry, bound_function)
registry = Registry()
# TODO: support non-complex arguments (floats and ints)
@registry.resolves_global(cmath.acos)
@registry.r... |
import sys
sys.path.append("..")
from dilemma.stakes import generate_stakes
from dilemma.config import lowest_stakes, highest_stakes
def main(iterations):
try:
iterations = int(iterations)
except ValueError:
print("First argument must be an int")
exit()
for _ in range(iterations):
... |
"""Management of header blocks in .mff binary files
.mff binary files have a blocked structure. Consecutive blocks can be
separated by a header, which brings us to the topic of this module.
The header consists of either a single flag (`flag=0`) or a block describing
the following bytes of signal data (`flag=1`). Re... |
# coding: utf-8
"""
Onshape REST API
The Onshape REST API consumed by all clients. # noqa: E501
The version of the OpenAPI document: 1.113
Contact: api-support@onshape.zendesk.com
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import re # noqa: F401
im... |
from setuptools import setup
setup(
name='wikipedia_for_humans',
version='0.3.0',
packages=['wikipedia_for_humans'],
url='https://github.com/OpenJarbas/wikipedia_for_humans',
license='MIT',
author='jarbasAI',
install_requires=["requests", "wikipedia-api",
"inflection",... |
import numpy as np
import cv2 as cv
image = cv.imread("boy.jpg",cv.IMREAD_COLOR)
cv.imshow("Original Image",image)
# Dimensions of the image and calculate the centre if the image
# width = across x-axis
#height = across y-axis
height,width,channels = image.shape
center_x, center_y = (width/2,height/2)
# Transformat... |
#Implementing JWT Authentication for the API's
import jwt
from rest_framework import authentication, exceptions
from django.conf import settings
from .models import User
class JWTAuthentication(authentication.BaseAuthentication):
def authenticate(self, request):
auth_data = authentication.get_authorizati... |
'''
Copyright (c) 2018, Masaki Murase
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following... |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import os
import sys
import os.path
import tinify
tinify.key = "gfx-gzBLyuVpvleuuf_ragZBcqKmrkWi" # API KEY
# 压缩的核心
def compress_core(inputFile, outputFile):
source = tinify.from_file(inputFile)
source.to_file(outputFile)
# 压缩一个文件夹下的图片
def compress_path(path,suf):
i... |
# Copyright 2016 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 accompa... |
# BSD 2-Clause License
#
# Copyright (c) 2021, Hewlett Packard Enterprise
# 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 noti... |
from flask import Flask
app = Flask(__name__)
@app.route("/")
def pagina_inicial():
return "Olá Luccas"
if __name__ == '__main__':
app.run() |
# -*- coding: utf-8 -*-
r""" ------------> ------------> ------------> ------------>
______ __ _ ____
/ ____/__ / /__ ____ (_)_ ______ ___ / _ \____ ________
\__ \/ _ \/ / _ \/ __ \/ / / / / __ `__ \/ /_) / __ \/ ___/ _ \
___/ / __/ / __/ / / / / /_/ / / / / / / /_) / ... |
from .__about__ import __version__
from .main import det, matrix, solve, solve_transpose
__all__ = [
"__version__",
"matrix",
"det",
"solve",
"solve_transpose",
] |
from . import __version__ as app_version
app_name = "custom_app"
app_title = "Custom App"
app_publisher = "ebukaakeru@gmail.com"
app_description = "Custom App"
app_icon = "octicon octicon-file-directory"
app_color = "grey"
app_email = "ebukaakeru@gmail.com"
app_license = "MIT"
# Includes in <head>
# -----------------... |
import numpy as np
import pandas as pd
from sklearn.decomposition import PCA
from sklearn.manifold import TSNE
import matplotlib.pyplot as plt
import matplotlib.cm as cm
from mpl_toolkits.mplot3d import Axes3D
import seaborn as sns
datos = pd.read_csv("pelyzer/recursos/dataset.csv")
#visualizacion valores nulos
sns.... |
import requests, json, populartimes
import numpy as np
import pandas as pd
from itsdangerous import URLSafeTimedSerializer, SignatureExpired
from form import DetailForm, UserForm, UserLogin, NGOForm
from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from datetime import datetim... |
import json
import os
from logger import logger
class Settings(object):
DEFAULT = {
"cbmonitor_host_port": "127.0.0.1:8000",
"seriesly_host": "127.0.0.1",
"interval": 10,
"cluster": "default",
"master_node": "127.0.0.1",
"dest_master_node": "127.0.0.1",
... |
#! /usr/bin/env python
#David Shean
#dshean@gmail.com
#This script uses ASP correlator to produce disparity maps from two inputs
#Input data should be orthorectified/mapped in the same projected coordinate system
#Run disp2v.py to convert to surface velocities
import sys
import os
import argparse
import subprocess
f... |
#!/usr/bin/env python3
import redis
import time
import json
import psutil
import socket
import platform
import os
import datetime
import sys
class ServiceDiscovery:
'''
uses Redis for easy service discovery and lookup
by service name
'''
def __init__(self, redis_host='localhost', redis_port=6379,... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2005-2013 Edgewall Software
# Copyright (C) 2005-2007 Christopher Lenz <cmlenz@gmx.de>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://... |
# -*- coding: utf-8 -*-
# Standard library imports
from __future__ import print_function, absolute_import
from string import Template
# Third party imports
from Qt import QtCore, QtGui, QtWidgets
# Local imports
from . import api, util
class Swatch(QtWidgets.QWidget):
clicked = QtCore.Signal(object)
style... |
from ..factory import Type
class messageVenue(Type):
venue = None # type: "venue" |
#
# Copyright 2012 New Dream Network, LLC (DreamHost)
#
# 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... |
"""
Copyright 2019 Yann Dumont
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 wr... |
from aws_cdk import (
aws_lambda as _lambda,
aws_apigatewayv2 as api_gw,
aws_apigatewayv2_integrations as integrations,
core
)
import os
class ThePredictiveLambdaStack(core.Stack):
def __init__(self, scope: core.Construct, construct_id: str, **kwargs) -> None:
super().__init__(scope, cons... |
ACTION_TOUCH_DOWN = 1
ACTION_TOUCH_UP = 2
ACTION_TOUCH_SWIPE = 3
ACTION_GET_RULES = "ACTION_GET_RULES"
ACTION_HEART_BEAT = "ACTION_HEART_BEAT" |
# coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.8.2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
im... |
# This file is part of the faebryk project
# SPDX-License-Identifier: MIT
import logging
logger = logging.getLogger("netlist")
def make_t1_netlist_from_graph(comps):
t1_netlist = [comp.get_comp() for comp in comps]
return t1_netlist
# This method is a temporary solution to convert high-level faebryk rela... |
import matplotlib.pyplot as plt
from matplotlib.pyplot import savefig
import matplotlib.patches as mpatches
import pandas as pd
import numpy as np
from numpy import dtype
from matplotlib.pyplot import ylabel
import math
import re
import sys
sys.path.append(f'./common')
import util
from util import *
setup(util.settin... |
# Copyright 2020 Google Research. 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... |
from pathlib import Path
from itertools import chain
import os
import re
import pkgutil
from typing import List
# TODO reuse in readme/blog post
# borrowed from https://github.com/sanitizers/octomachinery/blob/24288774d6dcf977c5033ae11311dbff89394c89/tests/circular_imports_test.py#L22-L55
def _find_all_importables(pkg... |
"""
Implementation of "fedcloud openstack" or "fedcloud openstack-int" for performing
OpenStack commands on sites
"""
import concurrent.futures
import json
import os
import subprocess # nosec Subprocess is required for invoking openstack client
import sys
from distutils.spawn import find_executable
import click
fro... |
# coding=utf-8
# Copyright 2019 The TensorFlow Datasets 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 appl... |
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^<int:user_id>/dashboard/$', views.fueldashboard, name='fueldashboard'),
] |
# coding: utf-8
"""
Seldon Deploy API
API to interact and manage the lifecycle of your machine learning models deployed through Seldon Deploy. # noqa: E501
OpenAPI spec version: v1alpha1
Contact: hello@seldon.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future... |
class UnsupportedAlgorithm(Exception):
... |
import sys
from sklearn.naive_bayes import BernoulliNB as BNB
import matplotlib.pyplot as plt
import numpy as np
def read_variants(flname):
fl = open(flname)
markers = []
individuals = []
population_ids = []
population = -1
for ln in fl:
if "Marker" in ln:
if len(individuals) == 0:
continue
marker ... |
'''
Created on Jul 23, 2014
@author: user
'''
from google.appengine.ext import ndb
class GCMClientRegID(ndb.Model):
reg_id = ndb.StringProperty()
user_name = ndb.StringProperty()
created_date_time = ndb.DateTimeProperty(auto_now_add = True) |
'''
Copyright 2015-2020 HENNGE K.K. (formerly known as HDE, Inc.)
Licensed under MIT.
'''
import json
def read_event(path):
with open(path) as event:
data = json.load(event)
return data |
import json
from flask import request
import requests
def generateDokerFile(user_config, service_name, sensor_topic,output_topic):
configfile = open(user_config, 'r')
config = json.load(configfile)
configfile.close()
df = open('dockerfile', 'w')
services = config['Application']['services']
environment = []
fg... |
# -------------------------------------------------------------------------
# In this file, the state class is defined that we will use to represent
# a state. You need to implement some of the missing functionality based
# on the failing tests.
#
# ------------------------------------------------------------------... |
# -*- coding: utf-8 -*-
"""
Created on Tue Jun 16 17:45:25 2015
@author: Paco
"""
import matplotlib.pyplot as plt
import bisect
import numpy as np
from sklearn import metrics
class Evaluate(object):
_fpr = None
_tpr = None
def __init__(self): pass
def evaluation(self,pairs_label,dist):
... |
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
from model import Network
'''
python 3.6
tensorflow 1.4
'''
class Train:
def __init__(self):
self.net = Network()
# 初始化 session
# Network() 只是构造了一张计算图,计算需要放到会话(session)中
self.sess = tf.Session()
... |
#!/usr/bin/env python
from execute.command_function import get_command_execute
from gatheros import __name__ as module_name
from execute.execution_unit import ExecutionUnit
import argparse
import sys, os
import json
base_dir = os.sep.join(__file__.split( os.sep )[:-1])
parser = argparse.ArgumentParser( description =... |
from __future__ import unicode_literals
import base64
import logging
from decimal import Decimal
from six import string_types
from .ewsdatetime import EWSDateTime
from .properties import EWSElement
from .services import TNS
from .util import create_element, add_xml_child, get_xml_attrs, get_xml_attr, set_xml_value, ... |
"""Provides an easy way of generating several geometric objects.
CONTAINS
--------
vtkArrowSource
vtkCylinderSource
vtkSphereSource
vtkPlaneSource
vtkLineSource
vtkCubeSource
vtkConeSource
vtkDiskSource
vtkRegularPolygonSource
vtkPyramid
"""
import numpy as np
import vtk
import pyvista
from pyvista.utilities import ... |
#!/usr/bin/env python
"""
This script generates a plot showing slip or fault tractions.
"""
# The code requires the numpy, h5py, and matplotlib packages.
import numpy
import h5py
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as pyplot
# -------------------------------------------------------------... |
import json
import pytest
from google.appengine.ext import ndb
from backend.common.consts.alliance_color import AllianceColor
from backend.common.helpers.match_helper import MatchHelper
from backend.common.helpers.prediction_helper import PredictionHelper
from backend.common.models.event import Event
from backend.com... |
# -*- coding: utf-8 -*
import os
import random
import re
import six
import argparse
import io
import math
prog = re.compile("[^a-z ]", flags=0)
def parse_args():
parser = argparse.ArgumentParser(
description="Paddle Fluid word2 vector preprocess")
parser.add_argument(
'--build_dict_corpus_dir'... |
import os
def doTheJob(job,state):
for i in range(100000):
print (job, i)
state = True
return state
jobs = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J"]
imTheFather = True
children = []
for job in jobs:
child = os.fork()
if child:
children.append(child)
print (children)
else:
imTheFather = F... |
import glob
import os
import numpy as np
import torch
from utils import configs, backbones
model_dict = dict(
Conv4=backbones.Conv4,
Conv4S=backbones.Conv4S,
Conv6=backbones.Conv6,
ResNet10=backbones.ResNet10,
ResNet18=backbones.ResNet18,
ResNet34=backbones.ResNet34,
ResNet50=backbones.Re... |
"""This file is copied from pandas.doc.sphinxext.contributors
Sphinx extension for listing code contributors to a release.
Usage::
.. contributors:: v0.23.0..v0.23.1
This will be replaced with a message indicating the number of
code contributors and commits, and then list each contributor
individually.
"""
from ... |
"""Create new database for the project
Revision ID: 9b6260e9ca85
Revises:
Create Date: 2021-06-21 11:13:54.880591
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '9b6260e9ca85'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ... |
"""Threading utilities."""
from inspect import isclass
import threading
# python2 workaround
_EventClass = threading.Event if isclass(threading.Event) else threading._Event #pylint:disable=protected-access,invalid-name
class EventGroup(object):
"""EventGroup that can be waited with an OR condition."""
cla... |
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/ads/googleads_v4/proto/errors/reach_plan_error.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf impor... |
import asn1
def main():
byte_string = '\x17\x00' \
'\x00\x00\x01\x00\x00\x00\x00\x00' \
'\x3B\x06\x70\xad\x00\x00\x0a\x00' \
'\x05\x00\x00\x00\x30\x03\x0a\x01' \
'\x01'
decoder = asn1.Decoder()
decoder.start(byte_string)
while not ... |
import a301_lib
import numpy as np
from matplotlib import pyplot as plt
from pyhdf.SD import SD
from pyhdf.SD import SDC
from pathlib import Path
import h5py
from contextlib import contextmanager
import os
from sat_lib.modismeta_read import get_core
@contextmanager
def cd(newdir):
prevdir = os.getcwd()
os.chdi... |
#!/usr/bin/env python3
#
# Copyright (c) 2017 Thom Janssen <https://github.com/thomgb>
# www.pagebot.io
# Licensed under MIT conditions
#
# Supporting DrawBot, www.drawbot.com
# Supporting Flat, xxyxyz.org/flat
# -----------------------------------------------------------------------------
#
# E... |
################################################################################################################################
# *** Copyright Notice ***
#
# "Price Based Local Power Distribution Management System (Local Power Distribution Manager) v1.0"
# Copyright (c) 2016, The Regents of the University of Califor... |
from typing import List, Tuple
import albumentations as A
import numpy as np
import pandas as pd
import tensorflow as tf
from src.pipelines.base_pipeline import BasePipeline
# class Tensorize(object):
# """
# Class used to create tensor datasets for TensorFlow.
# Inheritance:
# object: The base ... |
# dataset settings
_base_ = '../gn+ws/faster_rcnn_x101_32x4d_fpn_gn_ws-all_1x_coco.py'
dataset_type = 'MyDataset'
data_root = './datasets/'
img_norm_cfg = dict(
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
albu_train_transforms = [
dict(
type='ShiftScaleRotate',
shi... |
from configparser import ConfigParser
from setuptools import setup, find_packages
setup_cfg = ConfigParser()
setup_cfg.read('setup.cfg')
metadata = setup_cfg['metadata']
if __name__ == "__main__":
with open('README.md', encoding='utf-8') as readme_file:
long_description=readme_file.read()
setup(
... |
"""
Django settings for hiren project.
Generated by 'django-admin startproject' using Django 2.0.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
"""
import os
import... |
#!/usr/bin/env python
import sys
import os
import re
import logging
from numpy import where
from pbrdna.io.FastqIO import FastqReader, FastqRecord, FastqWriter
__version__ = "0.1"
MIN_QV = None
MIN_LENGTH = 100
class QualityTrimmer(object):
"""
Tool for trimming low-quality bases from the ends of FASTQ fi... |
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: task_spec.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf i... |
import os
import unittest
from jsonasobj import as_json
from biolinkml.generators.pythongen import PythonGenerator
from tests.test_issues.environment import env
from tests.utils.python_comparator import compare_python, compile_python
from tests.utils.test_environment import TestEnvironmentTestCase
class Issue113Tes... |
from django.contrib.auth.models import User
from django.db import models
from django.db.models import CASCADE
class Camp(models.Model):
'''
Camp is the thing everyone goes to in the summer to have fun
'''
name = models.CharField(max_length=256)
start_at = models.DateTimeField()
end_at = models... |
'''
Aim: To place N queens in a N*N Chessboard such that no two queens
attack each other. A queen is said to be attacked by another queen
if they share same diagonal(right/left), Row or Column.
Intution: Since there could be only one queen in each row, we can assume the
N*N chessboard to be a 1d arr... |
#!/usr/bin/python -tOO
#
# Generate the trusted group by using only
# local heuristics based on sent and receive
# connectivity in the email graph
import string
import re
from traceparser import traceparser
import sys
import random
class bootstrapping:
''' For each message in the trace, collect all to ad... |
# sql/types_api.py
# Copyright (C) 2005-2022 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: https://www.opensource.org/licenses/mit-license.php
"""Base types API.
"""
from __future__ import annotations
import typing
from ty... |
from LnkParse3.target.lnk_target_base import LnkTargetBase
# https://github.com/libyal/libfwsi/blob/master/documentation/Windows%20Shell%20Item%20format.asciidoc#37-uri-shell-item
# TODO: rename to uri
class Internet(LnkTargetBase):
# TODO Not implemented
def __init__(self, *args, **kwargs):
self.name... |
"""
Facebook OAuth2 and Canvas Application backends, docs at:
http://psa.matiasaguirre.net/docs/backends/facebook.html
"""
import hmac
import time
import json
import base64
import hashlib
from social.utils import parse_qs, constant_time_compare, handle_http_errors
from social.backends.oauth import BaseOAuth2
from ... |
#!/Users/antoinecabon/Desktop/uploadfile-flask-docker/env/bin/python3.7
# -*- coding: utf8 -*-
# :Copyright: © 2015 Günter Milde.
# :License: Released under the terms of the `2-Clause BSD license`_, in short:
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium wi... |
# -*- coding: utf-8 -*-
# Copyright 2020 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 o... |
# coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 5
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from isi_sdk_8_1_0.models.compati... |
from setuptools import setup, find_packages, Extension
from glob import glob
try:
from Cython.Build import cythonize
from Cython.Compiler.Options import get_directive_defaults
use_cython = True
except ImportError:
use_cython = False
import numpy as np
import os
import sys
import versioneer
define_mac... |
# Copyright (c) 2008, Humanized, 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 conditi... |
from __future__ import (absolute_import, division, print_function, unicode_literals)
from builtins import (ascii, bytes, chr, dict, filter, hex, input, int, map, next, oct, open, pow, range, round, str,
super, zip)
from .Service import Service
_SERVICE_TYPE = "GPServer"
class GpServer(Service):... |
# This file is part of the DMComm project by BladeSabre. License: MIT.
"""
`dmcomm.protocol.core16`
========================
Handling of 16-bit low-level protocols.
Note: This API is still under development and may change at any time.
"""
from dmcomm import CommandError
from dmcomm.protocol import Result
class Dig... |
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... |
# Need to import path to test/fixtures and test/scripts/
# Ex : export PYTHONPATH='$PATH:/root/test/fixtures/:/root/test/scripts/'
#
# To run tests, you can do 'python sanity_tests.py'. To run specific tests,
# You can do 'python -m testtools.run -l tests'
# Set the env variable PARAMS_FILE to point to your ini file. E... |
import json
import sqlite3
import tabula
import pandas as pd
from datetime import datetime, timedelta
conn = sqlite3.connect(r"database/database.db", check_same_thread=False)
db = conn.cursor()
current_date = datetime.utcnow()
def get_next_retail_sales_date():
"""
Get next retail sales release date
"""
... |
# -*- coding: utf-8 -*-
# Copyright 2020 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... |
def type(a,b):
if isinstance(a,int) and isinstance(b,int):
return a+b
return 'Not integer type'
print(type(2,3))
print(type('a','boy')) |
from __future__ import print_function
import argparse
import sys
from costar_task_plan.simulation import GetSimulationParser
def GetLaunchOptions():
'''
These are the files that actually set up the environment
'''
return ["ur5","husky","fetch"]
def GetExperimentOptions():
'''
Each of these n... |
import asyncio
import pytest
from bytecash.rpc.wallet_rpc_api import WalletRpcApi
from bytecash.simulator.simulator_protocol import FarmNewBlockProtocol
from bytecash.types.blockchain_format.coin import Coin
from bytecash.types.blockchain_format.sized_bytes import bytes32
from bytecash.types.mempool_inclusion_status ... |
from operator import itemgetter
from .. import support_utils as sup
def print_stats(log, conformant, traces):
print('complete traces:', str(len(traces)),
', events:', str(len(log.data)), sep=' ')
print('conformance percentage:',
str(sup.ffloat((len(conformant) / len(traces)) * 100, 2)) + ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.