text stringlengths 1 927k |
|---|
import re
import math
import json
import logging
import itertools
from pysb import Model, Monomer, Parameter, Expression, Observable, Rule, \
Annotation, ComponentDuplicateNameError, ComplexPattern, \
ReactionPattern, ANY, WILD, InvalidInitialConditionError
from pysb.core import SelfExporter
from pysb.pattern ... |
# coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 10
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class ClusterNodeStatusCapacity... |
"""my_blog URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/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-ba... |
from pypy.interpreter.baseobjspace import W_Root
from pypy.interpreter.error import OperationError, oefmt
from pypy.interpreter.typedef import TypeDef, interp_attrproperty
from pypy.interpreter.typedef import GetSetProperty
from pypy.interpreter.gateway import interp2app
QUOTE_MINIMAL, QUOTE_ALL, QUOTE_NONNUMERIC, QU... |
import datetime
from typing import Dict
from ..helpers import CollectionAppointment
DESCRIPTION = "Example scraper"
URL = ""
TEST_CASES: Dict[str, Dict[str, str]] = {}
class Source:
def __init__(self, days=20, per_day=2, types=5):
self._days = days
self._per_day = per_day
self._types = t... |
from __future__ import absolute_import
import os.path
import math
from PIL import Image, ImageStat
import numpy as np
from shapely.geometry import Polygon, asPolygon
from shapely.ops import unary_union
from tesserocr import (
RIL, PSM, PT, OEM,
Orientation,
WritingDirection,
TextlineOrder,
tesserac... |
a = int(input("Digite um número: "))
if(a < 10):
print("O valor de a é menor que 10")
elif(a == 10):
print("O valor de a é igual a 10")
else:
print("O valor de a é maior que 10") |
from .mcoc-v3 import Tbd
def setup(bot):
bot.add_cog(Tbd(bot)) |
import tensorflow as tf
print(tf.__version__)
with tf.device('/device:GPU:0'):
a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], name='a')
b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], name='b')
sess = tf.Session(config=tf.ConfigProto(log_device_placement=True)) |
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.mlab as mlab
import scipy.stats as stats
bbar=0.2
abar=0.1
K1=2. # This is like Hook's constant or the curvature of the potential that keeps the noise localized
#K0=5.
K0=(4.*K1)**0.5 # This is the damping
K2=0. # This is like a mass correction. ... |
"""Integration with the Rachio Iro sprinkler system controller."""
from abc import abstractmethod
import logging
from homeassistant.components.binary_sensor import BinarySensorDevice
from homeassistant.helpers.dispatcher import dispatcher_connect
from . import (
DOMAIN as DOMAIN_RACHIO,
KEY_DEVICE_ID,
KEY... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from wsgiref.simple_server import make_server
from hello import application
http_server = make_server('', 8080, application)
print('Server on port 8080...')
http_server.serve_forever() |
# 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) AutoRest Code Generator.
# Changes ... |
"""Generate an animation of the cellular automaton Rule 30."""
import json
import os
import pathlib
import shutil
import subprocess
import tempfile
import colour
import cv2
import imageio
import numpy as np
import scipy.signal as sg
import tqdm
# Global parameters
CONFIG_PATH = 'config/full.json'
FFMPEG_PATH = '/usr... |
#-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2020, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... |
# Copyright 2019 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
# This file is a part of Arjuna
# Copyright 2015-2020 Rahul Verma
# Website: www.RahulVerma.net
# 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... |
"""to_do_backend URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.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... |
"""
Module wich contains the EditMenu class and some functions linked to this menu
"""
import wx
import sys
import os
from api.api_pyflakes import main as CheckPySyntax
from Utils.voice_synthese import my_speak
class EditMenu(wx.Menu):
"""Inits a instance of a wx.Menu to create a Theme menu and
his butt... |
#!/usr/bin/env python3
#
# Wrapper functions for the permutation feature importance.
#
##################################################### SOURCE START #####################################################
import numpy as np
import matplotlib.pyplot as mpl
import sklearn.inspection
### Calculate permutation impor... |
import os
import shlex
import subprocess
import sys
from textwrap import dedent
from typing import Any
from typing import Optional
from typing import Tuple
def joint_kwargs(**kwargs) -> str:
return " ".join([k + " " + v for k, v in kwargs.items()])
def sub(
cmd: str, cwd: Optional[str] = None, stdout: bool ... |
"""This metric computes the embedding similarity using SBERT model."""
from nltk import word_tokenize
from nltk.translate import bleu_score
from fibber import log
from fibber.metrics.metric_base import MetricBase
logger = log.setup_custom_logger(__name__)
class SelfBleuMetric(MetricBase):
"""This metric compu... |
import typing
from typing import Any, Optional, Text, Dict, List, Type
from rasa.nlu.components import Component
from rasa.nlu.config import RasaNLUModelConfig
from rasa.shared.nlu.training_data.training_data import TrainingData
from rasa.shared.nlu.training_data.message import Message
if typing.TYPE_CHECKING:
fr... |
"""
PolygonPShapeOOP.
Wrapping a PShape inside a custom class
and demonstrating how we can have a multiple objects each
using the same PShape.
"""
from polygon import Polygon
# A list of objects
polygons = []
def setup():
size(640, 360, P2D)
smooth()
# Make a PShape.
star = createShape()
star.b... |
#!/usr/bin/env python
'''
The logos module provides a kind of decision making process center.
It has hints of imagination and logic.
Copyright (c) 2011 Joseph Lewis <joehms22@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public Licens... |
#!/usr/bin/env python
"""
.. module:: note
:synopsis: The Note class.
"""
import datetime
import glob
import os
import uuid
import shutil
from PyQt4 import QtCore, QtGui
from xml.etree import ElementTree
import converters
import logger
import misc
class NoteContent(object):
"""
The content, keywords, a... |
from braces.views import UserFormKwargsMixin
from .models import Proposal
from .forms import ProposalForm
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
class ProposalMixin(UserFormKwargsMixin):
model = Proposal
form_class = ProposalForm
success_message = _('Studi... |
from setuptools import setup, find_packages
tests_require = [
"parameterized",
"nose2"
]
setup(
name="OpenNMT-tf",
version="1.22.2",
license="MIT",
description="Neural machine translation and sequence learning using TensorFlow",
author="OpenNMT",
author_email="guillaume.klein@systrangr... |
# Lint as: python3
# Copyright 2018 The TensorFlow 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 ... |
#!/usr/bin/env python3
import json
import glob
# format the json files
def tidy(filename):
with open(filename) as fh:
data = json.load(fh)
with open(filename, 'w') as fh:
json.dump(data, fh, sort_keys=True, indent=4, separators=(',', ': '), ensure_ascii=False)
for filename in glob.glob("data/... |
import unittest
from acme import Product
from acme_report import generate_products, adj, name
class AcmeProductTests(unittest.TestCase):
"""Making sure Acme products are the tops!"""
def test_default_product_price(self):
"""Test default product price being 10."""
prod = Product('Test Product')... |
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import inspect
import time
class TimeoutException(Exception):
pass
def WaitFor(condition,
timeout, poll_interval=0.1,
pass_tim... |
#!/usr/bin/env python
from nipy.testing import assert_equal, assert_almost_equal, assert_raises
import numpy as np
from nipy.neurospin.register.iconic_matcher import IconicMatcher
class Image(object):
"""
Empty object to easily create image objects independently from any I/O package.
"""
def __init... |
#------------------------------------------------------------------------------
# Copyright (c) 2013, Nucleic Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-------------------------------------------------... |
from flask import current_app
import cea.config
import cea.inputlocator
def deconstruct_parameters(p: cea.config.Parameter):
params = {'name': p.name, 'type': p.typename, 'help': p.help}
try:
params["value"] = p.get()
except cea.ConfigError as e:
print(e)
params["value"] = ""
... |
# Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this f... |
import os
import zstandard
import orjson as json
import time
import tarfile
import codecs
from functools import reduce
import jsonlines
import io
from zipfile import ZipFile
import gzip
from math import ceil
import mmap
import multiprocessing as mp
from pathlib import Path
VALID_EXTENSIONS = [
"openwebtext.tar.xz"... |
####### Special object
class Person(object):
def __init__(self, name, age):
self.name=name
self.age=age
def getName(self):
return 'My name is '+self.name
def getAge(self):
return self.age |
"""
The reporter is the service responsible for handling NGSI notifications,
validating them, and feeding the corresponding updates to the translator.
The reporter needs to know the form of the entity (i.e, name and types of its
attributes). There are two approaches:
1 - Clients tell reporter which entities they c... |
from elasticsearch import Elasticsearch
from pprint import pprint as pp
es = Elasticsearch()
INDEX = "meme-index"
TYPE = "meme"
def submit(id, doc):
res = es.index(index=INDEX, doc_type=TYPE, id=id, body=doc)
if res['created']:
return True
def search(query):
es.indices.refresh(index=INDEX)
... |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... |
import numpy as np
import tensorflow as tf
slim = tf.contrib.slim
_BATCH_NORM_DECAY = 0.9
_BATCH_NORM_EPSILON = 1e-05
_LEAKY_RELU = 0.1
_ANCHORS = [(12, 16), (19, 36), (40, 28),
(36, 75), (76, 55), (72, 146),
(142, 110), (192, 243), (459, 401)]
@tf.contrib.framework.add_arg_scope
def _fixed_p... |
from __future__ import annotations
from typing import Any
from coredis._utils import EncodingInsensitiveDict
from coredis.response._callbacks import ResponseCallback
from coredis.response._utils import flat_pairs_to_dict, flat_pairs_to_ordered_dict
from coredis.response.types import (
StreamEntry,
StreamInfo,... |
import pandas as pd
import numpy as np
from sklearn.metrics.pairwise import cosine_similarity
def question_cleaner(df_query):
kb=([int(xx) for xx in (df_query[3].iloc[0]).split(' ')])
gt = [int(xx) for xx in (df_query[2].iloc[0]).split(' ')]
ct=0
negg=0
withans=[]
for ii in range(len(df_query))... |
#!/opt/homebrew/bin/python3.9
import sys
from systemrdl import RDLCompiler, RDLCompileError
from peakrdl.uvm import UVMExporter
def export_uvm(obj):
exporter = UVMExporter()
exporter.export(root, "./output_all/reg_pkg.sv")
if __name__ == "__main__":
import sys
# Compile and elaborate files provided f... |
# Copyright 2014 The Oppia 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 applicable ... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
from math import sin, cos, pi, copysign, floor
from asciimatics.effects import Effect
from asciimatics.event import KeyboardEvent
from asciimatics.exceptions import ResizeScreenError, StopApplication
from asciimatics.screen import Screen
from asciimatics.scene ... |
from selenium import webdriver
import chromedriver_binary
def generate_driver(config=None):
driver = webdriver.Chrome()
driver.implicitly_wait(15)
return driver |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import re
from setuptools import setup, find_packages
def get_version(package):
"""
Return package version as listed in `__version__` in `init.py`.
"""
init_py = open(os.path.join(package, '__init__.py')).read()
return re.search("__version__ ... |
import sys
from collections import defaultdict
from collections import OrderedDict
import scipy as sp
import numpy as np
import pylab as pl
from sklearn.svm import SVR
from sklearn.ensemble import RandomForestRegressor
from sklearn.metrics import r2_score
from sklearn.metrics import mean_squared_error
from sklearn... |
import os
import random
import logging
import copy
import queue
from pygame.math import Vector2
from .base_agent import BaseAgent
class BotAgent(BaseAgent):
'''
Overview:
A simple script bot
'''
def __init__(self, name=None):
self.name = name
self.actions_queue = queue.Queue()... |
#!/usr/bin/env python
# ------------------------------------------------------------------------------------------------------%
# Created by "Thieu Nguyen" at 19:26, 20/04/2020 %
# ... |
from easytello import tello
my_drone = tello.Tello()
#my_drone.streamon()
my_drone.takeoff()
for i in range(4):
#my_drone.forward(1)
my_drone.cw(90)
my_drone.land()
# my_drone.streamoff() |
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('requirements.txt') as f:
install_requires = f.read().strip().split('\n')
# get version from __version__ variable in reports/__init__.py
from reports import __version__ as version
setup(
name='reports',
version=version,
description='Cu... |
from pydub import AudioSegment
def convert_ogg_to_wav(ogg_path: str, wav_path: str) -> None:
audio = AudioSegment.from_ogg(file=ogg_path)
audio.export(wav_path, format='wav') |
isAfterSchool=True
isFinishHomework=False
print(isAfterSchool and isFinishHomework) |
#! /usr/bin/env python
"""provide some mediawiki markup example snippets"""
import os
class snippet(object):
def __init__(self, txt, id):
self.txt = txt
self.id = id
def __repr__(self):
return "<%s %r %r...>" % (self.__class__.__name__, self.id, self.txt[:10])
def get_all():
f... |
# CSL Paper: Dimensional speech emotion recognition from acoustic and text
# Changelog:
# 2019-09-01: initial version
# 2019-10-06: optimizer MTL parameters with linear search (in progress)
# 2012-12-25: modified fot ser_iemocap_loso_hfs.py
# feature is either std+mean or std+mean+silence (uncomment line 44... |
"""
.. autosummary::
:toctree:
beamform
delay
fgfilter
flagging
mapmaker
powerspectrum
sensitivity
sidereal
sourcestack
svdfilter
transform
""" |
from flask_wtf import Form
from wtforms import StringField, BooleanField, TextAreaField, validators
from app.models import User
class LoginForm(Form):
remember_me = BooleanField('remember_me', default=False)
class EditForm(Form):
nickname = StringField('nickname', [validators.DataRequired()])
about_me =... |
from django.db import models
from cpffield.validators import validate_cpf
class CPFField(models.CharField):
default_validators = [validate_cpf]
def __init__(self, *args, **kwargs):
super(CPFField, self).__init__(*args, **kwargs) |
"""
This file offers the methods to automatically retrieve the graph Neisseria elongata subsp. glycolytica ATCC 29315.
The graph is automatically retrieved from the STRING repository.
References
---------------------
Please cite the following if you use the data:
```bib
@article{szklarczyk2019string,
title={ST... |
"""
Flask configuration.
The module doesn't depend on the project. The configuration file is initialized
with python-dotenv, and we don't read environment variables in the rest of the
project.
What config.py can import?
--------------------------
The module doesn't import anything from the project.
Who can import... |
# Copyright 2019 Ivan Bondarenko
#
# 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 writi... |
m = 'ola mundo'
print(m) |
from __future__ import absolute_import, print_function, unicode_literals
import elliottlib
from elliottlib import constants, logutil, Runtime, bzutil, openshiftclient, errata
LOGGER = logutil.getLogger(__name__)
from elliottlib.cli import cli_opts
from elliottlib.cli.common import cli, use_default_advisory_option, fin... |
'''
'''
__version__ = '0.1-dev' |
"""This module contains the general information for ProcDoer ManagedObject."""
from ...ucsmo import ManagedObject
from ...ucscoremeta import MoPropertyMeta, MoMeta
from ...ucsmeta import VersionMeta
class ProcDoerConsts:
pass
class ProcDoer(ManagedObject):
"""This is ProcDoer class."""
consts = ProcDo... |
'''
Module responsible for running the --support option for collecting debug information
'''
import logging
import shlex
import re
import os
import requests
import tempfile
import time
import subprocess
from insights import get_nvr
from subprocess import Popen, PIPE, STDOUT
from constants import InsightsConstants as c... |
# -*- coding: utf-8 -*-
import warnings
from pathlib import Path
import seaborn as sns
import pandas as pd
from typing import Union
import numpy as np
import matplotlib.pyplot as plt
from qa4sm_reader.img import QA4SMImg
import qa4sm_reader.globals as globals
from qa4sm_reader import plotting_methods as plm
from warn... |
import torch
import torch.nn as nn
import time
import errno
import os
import gc
import pickle
import shutil
import json
import os
import pandas as pd
from skimage import io, transform
import numpy as np
import calculate_ap_classwise as ap
import matplotlib.pyplot as plt
import random
import helpers_preprocess as helpe... |
# -*- coding: utf-8 -*-
from io import StringIO
from django.core.management import CommandError, call_command
from django.test import TestCase
from django.test.utils import override_settings
from unittest.mock import patch
MYSQL_DATABASE_SETTINGS = {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'dbatabase'... |
# (c) Copyright [2017] 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://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... |
# Copyright (c) 2020 VisualDL Authors. All Rights Reserve.
#
# 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... |
# Copyright 2014 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, s... |
import sys
import weakref
from sentry_sdk._compat import reraise
from sentry_sdk.hub import Hub
from sentry_sdk.integrations import Integration, DidNotEnable
from sentry_sdk.integrations.logging import ignore_logger
from sentry_sdk.integrations._wsgi_common import (
_filter_headers,
request_body_within_bounds,... |
from math import gcd
for x in range(int(input())):
(a,b)=[int(m) for m in input().split()]
k=gcd(a,b)
lcm =(a*b//k)
print(k,lcm) |
########################################################################
# Copyright 2019 Roku, 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... |
"""YOLOv5 PyTorch Hub models https://pytorch.org/hub/ultralytics_yolov5/
Usage:
import torch
model = torch.hub.load('ultralytics/yolov5', 'yolov5s')
"""
import torch
def _create(name, pretrained=True, channels=3, classes=80, autoshape=True, verbose=True, device=None):
"""Creates a specified YOLOv5 model... |
from brownie import SimpleStorage, accounts
def test_deploy():
# Arrange
account = accounts[0]
# Act
simple_storage = SimpleStorage.deploy({"from": account})
starting_value = simple_storage.retrieve()
expected = 0
# Assert
assert starting_value == expected
def testupdating_storage(... |
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
#
# 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 ... |
import uuid
from unittest.mock import patch
from django.test import TestCase
from django.contrib.auth import get_user_model
from core import models
def sample_user(email='test@test.com', password='testpass'):
"""Create the sample user for test"""
return get_user_model().objects.create_user(email,password)
cl... |
"Download utility"
#!/usr/local/bin/python
"""
Fetch an arbitrary file by FTP. Anonymous FTP unless you pass a
user=(name, pswd) tuple. Self-test FTPs a test file and site.
"""
from ftplib import FTP # socket-based FTP tools
from os.path import exists # file existence test
def getfile(f... |
from data.user_input.project.printMessageInput import PrintMessageInput
import os
from os.path import basename
import numpy as np
from PyQt5.QtWidgets import QToolButton, QPushButton, QLineEdit, QFileDialog, QDialog, QTabWidget, QWidget, QTreeWidgetItem, QTreeWidget, QSpinBox
from PyQt5.QtGui import QIcon
from PyQt5.Q... |
from django import forms
from wopr.utils import makeTurbineList, makeSiteList
from wopr.models import TSiteconfig
from wopr.widgets import XDSoftDateTimePickerInput
class TurbineSelectionForm(forms.Form):
# Default values
CHOICES = list(range(1, 100))
start_time = forms.DateTimeField(input_formats=['%d/%m... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
MY_CONSTANT = 12124
def my_new_first_function(arg1, arg2):
"""This is my doc string of things"""
ans = arg1 * arg2
return ans
a = 10
b = 20
if __name__ == '__main__':
print(function1(5, 6))
print(function2(5, 6)) |
# Copyright (c) 2018 Foundries.io
#
# SPDX-License-Identifier: Apache-2.0
import argparse
import os
import pathlib
import shlex
import sys
from west import log
from west.configuration import config
from zcmake import DEFAULT_CMAKE_GENERATOR, run_cmake, run_build, CMakeCache
from build_helpers import is_zephyr_build, ... |
"""
SYNOPSIS
SearchFiles
DESCRIPTION
Searches reversed Android codebases for vulnerabilities from the OWASP Mobile Testing Plan, and
POINT research
USAGE
python SearchFiles
AUTHOR
Bill Sempf <bill@pointweb.net>
VERSION
0.1.0.0
"""
import os
with open("C:/Temp/result.txt", "w") as resul... |
'''
Created on May 3, 2016
@author: johnnyapol
'''
from urllib.request import urlopen
# Try to import simplejson, otherwise fallback to json
try:
import simplejson as json
except ImportError:
import json
class Invasion:
# Global Vars
API = "https://www.toontownrewritten.com/api/invasions"
CH... |
# Copyright 2019 Wilhelm Putz
# 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, s... |
#!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... |
# coding: utf-8
"""
DocuSign REST API
The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign.
OpenAPI spec version: v2.1
Contact: devcenter@docusign.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from p... |
# Copyright 2013 by Rackspace Hosting, 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 t... |
from rest_framework import serializers
from apps.news.models import News, NewsCategory, Comment, Banner
from apps.xfzauth.serializers import UserSeralizers
class NewsCategorySerializers(serializers.ModelSerializer):
class Meta:
model = NewsCategory
fields = ['id', 'name']
class NewsSerializers(s... |
#
# Copyright 2014 NEC Corporation. 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... |
# Import libraries for simulation
import tensorflow as tf
import numpy as np
# Imports for visualization
import PIL.Image
from io import BytesIO
from IPython.display import Image, display
def DisplayFractal(a, fmt='jpeg'):
"""Display an array of iteration counts as a
colorful picture of a fractal."""
... |
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: beam_runner_api.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 import reflection a... |
import os
import sys
import time
import shlex
import shutil
import random
import inspect
import logging
import asyncio
import pathlib
import traceback
import math
import re
import aiohttp
import discord
import colorlog
from io import BytesIO, StringIO
from functools import wraps
from textwrap import dedent
from datet... |
"""Custom Exceptions."""
class HacsBaseException(Exception):
"""Super basic."""
class HacsUserScrewupException(HacsBaseException):
"""Raise this when the user does something they should not do."""
class HacsNotSoBasicException(HacsBaseException):
"""Not that basic."""
class HacsDataFileMissing(HacsB... |
#!/bin/python
import sys
from os import listdir
import os
from shutil import copyfile
if __name__=='__main__':
if len(sys.argv) != 2:
print("Usage: %s <data-folder>" % __file__)
exit(1)
folder = sys.argv[1]
for i in range(16):
os.mkdir(folder+"-"+str(i))
#print folder+"-"+... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.