blob_id stringlengths 40 40 | language stringclasses 1
value | text stringlengths 7 63.2k | index_in_file int64 0 3 |
|---|---|---|---|
d786e89b9d478dcff3c541c89731247075d078c3 | Python | '''
@author: Ken Venner
@contact: ken@venerllc.com
@version: 1.13
Read in a file of wine names and create consistent wine descriptions
from these names.
'''
import kvutil
import kvcsv
import re
import sys
import shutil
# may comment out in the future
import pprint
pp = pprint.PrettyPrinte... | 0 |
d786e89b9d478dcff3c541c89731247075d078c3 | Python | land' : r'\bBenchlands\b',
'Pritchard' : r'\bPitchard\b',
}
# regex search - set the ships as
reShipsAs = re.compile(r'\(ships?\s', re.IGNORECASE)
# the order in which we pull multiple single match attributes
defaultorderlist=[['Tok'], ['Oak'], ['Res'], ['RR'], ['Landslide'], ['Yount'], ['RRR'], ['Son'],... | 1 |
920cd41b18f5cfb45f46c44ed707cebe682d4dd9 | Python | # Software License Agreement (BSD License)
#
# Copyright (c) 2009-2011, Eucalyptus Systems, Inc.
# All rights reserved.
#
# Redistribution and use of this software in source and binary forms, with or
# without modification, are permitted provided that the following conditions
# are met:
#
# Redistributions of source ... | 0 |
920cd41b18f5cfb45f46c44ed707cebe682d4dd9 | Python | str(drive_id))
return ""
def get_parsed_wmic_command_output(self, wmic_command, verbose=False):
'''
Attempts to parse a wmic command using "/format:textvaluelist.xsl" for key value format into a list of
dicts.
:param wmic_command: string representing the remote wmic command ... | 1 |
33867677611ceb757f6973eb70368c9f75f3ce92 | Python | # system
import os
import numpy as np
import random
import copy
import time
# ROS
import rospy
import std_msgs.msg
import sensor_msgs.msg
import geometry_msgs.msg
import visualization_msgs.msg
import tf2_ros
import rosbag
import actionlib
from actionlib_msgs.msg import GoalStatus
import ros_numpy
# spartan ROS
import... | 0 |
33867677611ceb757f6973eb70368c9f75f3ce92 | Python | cm wide
self.state.grasp_data = grasp_data
self.visualize_grasp(grasp_data)
debug_speed = 10
def vis_function():
vis.updateFrame(T_W_fingertip_vtk, "gripper fingertip frame", scale=0.15, parent=self._vis_container)
vis.updateFrame(grasp_data.grasp_frame, "gras... | 1 |
33867677611ceb757f6973eb70368c9f75f3ce92 | Python | GraspsResult(result)
if not graspFound:
rospy.loginfo("no grasp found, returning")
return False
graspSuccessful = self.attemptGrasp(self.graspFrame)
if not graspSuccessful:
rospy.loginfo("grasp not successful returning")
return False
sel... | 2 |
bd179fda18551d4f3d8a4d695a9da38ee607ef1d | Python | import datetime
import json
from dateutil import parser
import mock
from python_http_client.exceptions import ForbiddenError
from rdr_service import clock, config
from rdr_service.api_util import open_cloud_file
from rdr_service.clock import FakeClock
from rdr_service.dao.database_utils import format_datetime
from rd... | 0 |
bd179fda18551d4f3d8a4d695a9da38ee607ef1d | Python | HDR_RPT_POSITIVE", hdr_record_pos.genomic_report_state_str)
self.assertEqual(int(hdr_record_pos.sample_id), hdr_record_pos.participant_id + 10)
self.assertEqual("result_ready", hdr_record_pos.event_type)
self.assertEqual(datetime.datetime(2022, 10, 6, 00), hdr_record_pos.event_authored_time)
... | 1 |
addf92a3d4060fa9464a802a4a4378cf9eeadde4 | Python | # -*- coding: utf-8 -*-
# This file is auto-generated, don't edit it. Thanks.
from Tea.model import TeaModel
class CreateCertificateRequest(TeaModel):
def __init__(self, domain=None, certificate=None, private_key=None, certificate_name=None, instance_id=None):
self.domain = domain # type: str
sel... | 0 |
addf92a3d4060fa9464a802a4a4378cf9eeadde4 | Python | _map()
if _map is not None:
return _map
result = dict()
if self.request_id is not None:
result['RequestId'] = self.request_id
result['DomainConfigs'] = []
if self.domain_configs is not None:
for k in self.domain_configs:
result... | 1 |
addf92a3d4060fa9464a802a4a4378cf9eeadde4 | Python | if self.rules is not None:
for k in self.rules:
result['Rules'].append(k.to_map() if k else None)
return result
def from_map(self, m=None):
m = m or dict()
if m.get('TotalCount') is not None:
self.total_count = m.get('TotalCount')
if m.... | 2 |
87baaf4a1b48fa248c65d26cc44e819a2ede1140 | Python | # Python library import
import asyncio, asyncssh, logging
# Module logging logger
log = logging.getLogger(__package__)
# Debug level
# logging.basicConfig(level=logging.WARNING)
# logging.basicConfig(level=logging.INFO)
logging.basicConfig(level=logging.DEBUG)
asyncssh.set_debug_level(2)
# Declaration of constant v... | 0 |
87baaf4a1b48fa248c65d26cc44e819a2ede1140 | Python | # Leave the loop
break
except asyncio.TimeoutError:
# Time out during when reading prompt
# Display error message
log.error("send_config_setTelnet: connection: timeout")
# Exception propagation
raise
... | 1 |
32e904a39d03d3166369420b49db0b9b118110a3 | Python | import hashlib
import json
import logging
import os
import urllib.parse
import uuid
from datetime import datetime
import pytz
from celery import states as celery_states
from django.conf import settings
from django.contrib.auth.base_user import AbstractBaseUser
from django.contrib.auth.base_user import BaseUserManager
... | 0 |
32e904a39d03d3166369420b49db0b9b118110a3 | Python | .kind_id,
"node_id": self.node_id,
"studio_id": self.id,
}
children = self.children.all()
if levels > 0:
node_data["children"] = [c.get_tree_data(levels=levels - 1) for c in children]
return node_data
if self.kind_id... | 1 |
1721bba2cae1e330bffeb9df05341df9522ff885 | Python | import ROOT
from PhysicsTools.NanoAODTools.postprocessing.framework.datamodel import Collection
from PhysicsTools.NanoAODTools.postprocessing.framework.eventloop import Module
from TreeProducer import *
from TreeProducerCommon import *
from CorrectionTools.PileupWeightTool import *
from CorrectionTools.BTaggingTool i... | 0 |
1721bba2cae1e330bffeb9df05341df9522ff885 | Python | EventWeight *= self.QCDNLO_Corr * self.QCDNNLO_Corr * self.EWKNLO_Corr
self.EventWeight *= self.TriggerWeight
self.EventWeight *= self.LeptonWeight
if mu1_tlv.DeltaR(mu2_tlv) < 0.3:
try:
... | 1 |
202670314ad28685aaa296dce4b5094daab3f47a | Python | #
# PySNMP MIB module Nortel-MsCarrier-MscPassport-AtmEbrMIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Nortel-MsCarrier-MscPassport-AtmEbrMIB
# Produced by pysmi-0.3.4 at Mon Apr 29 20:19:41 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4... | 0 |
202670314ad28685aaa296dce4b5094daab3f47a | Python | =ValueRangeConstraint(0, 4294967295))).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscAtmIfVptIispEbrEligibleRecoveredConnections.setStatus('mandatory')
mscAtmIfVptIispEbrIneligibleRecoveredConnections = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 114, 9, 6, 7, 30, 1, 3), Gauge32().subtype(subtypeSpec=ValueR... | 1 |
202670314ad28685aaa296dce4b5094daab3f47a | Python | mscAtmIfVptUniEbrOperEntry, mscAtmIfVccEbrInfoRecoverySubscribed=mscAtmIfVccEbrInfoRecoverySubscribed, mscAtmIfVpcEbrInfo=mscAtmIfVpcEbrInfo, mscAtmIfPnniEbrIneligibleRecoveredConnections=mscAtmIfPnniEbrIneligibleRecoveredConnections, mscAtmIfVpcSrcEbrOvRowStatusTable=mscAtmIfVpcSrcEbrOvRowStatusTable, mscAtmIfVptPnniE... | 2 |
b8e18877af990c533c642d4937354198a4676419 | Python | """autogenerated by genpy from arm_navigation_msgs/GetPlanningSceneRequest.msg. Do not edit."""
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct
import arm_navigation_msgs.msg
import geometry_msgs.msg
import std_msgs.msg
import genpy
import sensor_msgs.msg
class GetPlanni... | 0 |
b8e18877af990c533c642d4937354198a4676419 | Python | struct_I.pack(length))
pattern = '<%sd'%length
buff.write(self.planning_scene_diff.robot_state.joint_state.velocity.tostring())
length = len(self.planning_scene_diff.robot_state.joint_state.effort)
buff.write(_struct_I.pack(length))
pattern = '<%sd'%length
buff.write(self.planning_sc... | 1 |
b8e18877af990c533c642d4937354198a4676419 | Python | type(val1) == unicode:
val1 = val1.encode('utf-8')
length = len(val1)
buff.write(struct.pack('<I%ss'%length, length, val1))
length = len(self.planning_scene.robot_state.multi_dof_joint_state.poses)
buff.write(_struct_I.pack(length))
for val1 in self.planning_scene.robot_sta... | 2 |
b8e18877af990c533c642d4937354198a4676419 | Python | 4, count=length)
start = end
end += 4
(length,) = _struct_I.unpack(str[start:end])
pattern = '<%sd'%length
start = end
end += struct.calcsize(pattern)
self.planning_scene.robot_state.joint_state.velocity = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
... | 3 |
b90678c8f7ad9b97e13e5603bdf1dc8cb3511ca5 | Python | # PySNMP SMI module. Autogenerated from smidump -f python DOCS-IETF-QOS-MIB
# by libsmi2pysnmp-0.1.3 at Thu May 22 11:57:36 2014,
# Python version sys.version_info(major=2, minor=7, micro=2, releaselevel='final', serial=0)
# Imports
( Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integ... | 0 |
b90678c8f7ad9b97e13e5603bdf1dc8cb3511ca5 | Python | Packet\nData PDUs actually received on the Service Flow\nidentified by the SID for which the packet was\nscheduled. CMs not classifying downstream packets\nmay report this object's value as 0 for downstream\nService Flows. This object does not count\nMAC-specific management messages.\n\nParticularly for UGS flows, pa... | 1 |
b90678c8f7ad9b97e13e5603bdf1dc8cb3511ca5 | Python | etfQosParamSetRequestPolicyOct"), ("DOCS-IETF-QOS-MIB", "docsIetfQosParamSetServiceClassName"), ("DOCS-IETF-QOS-MIB", "docsIetfQosParamSetTosOrMask"), ("DOCS-IETF-QOS-MIB", "docsIetfQosParamSetMinReservedRate"), ("DOCS-IETF-QOS-MIB", "docsIetfQosParamSetMaxTrafficBurst"), ("DOCS-IETF-QOS-MIB", "docsIetfQosParamSetBitMa... | 2 |
4abcca52095a169b71d2527ce52b8367534c42a4 | Python | # -*- python -*-
# ex: set syntax=python:
# vim: set syntax=python:
import os
import re
from collections import defaultdict, namedtuple
from enum import Enum
from pathlib import Path
import buildbot.www.authz.endpointmatchers as ems
from buildbot.changes.filter import ChangeFilter
from buildbot.changes.gitpoller impo... | 0 |
4abcca52095a169b71d2527ce52b8367534c42a4 | Python | targets
def is_time_critical_test(test):
# Return true if the test label (or single-test name) is 'time critical' and must
# be run with an exclusive lock on the buildbot (typically, performance tests)
return test in ['performance', 'autoschedulers_cpu', 'autoschedulers_gpu', 'autoschedulers_cuda']
def ... | 1 |
4dde161d25ed41154e13b94cc9640c6aac055f87 | Python | # coding: utf-8
# 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... | 0 |
4dde161d25ed41154e13b94cc9640c6aac055f87 | Python | ': ('wiki.sk.npz',
'7a9820b5a343b242660bf2595d1ecbf6e00a76d6'),
'wiki.sl': ('wiki.sl.npz',
'85f3186f26d6725317a64e290363a7251b928b81'),
'wiki.sm': ('wiki.sm.npz',
'9e13452cc4bff677f4f15db04f9d2f95f6ec054c'),
'wiki.sn': ('wiki.sn.npz',
'e... | 1 |
4dde161d25ed41154e13b94cc9640c6aac055f87 | Python | a2efb30273172d388342a82bb0ce3c'),
'test': ('da-ud-test.conllu',
'85a95a8527f8773f1575ceaf0ab51f204b211047'),
'train': ('da-ud-train.conllu',
'b653c029a7ae5c106f865dcef949fb3fe2aa0420')},
'nl_lassysmall': {'dev': ('nl_lassysmall-ud-dev.conllu',
... | 2 |
9dd59fee46bd4bec87cc8c40099110b483ad0496 | Python | import ambulance_game as abg
import numpy as np
import sympy as sym
from sympy.abc import a, b, c, d, e, f, g, h, i, j
def get_symbolic_pi(num_of_servers, threshold, system_capacity, buffer_capacity):
Q_sym = abg.markov.get_symbolic_transition_matrix(
num_of_servers=num_of_servers,
threshold=thres... | 0 |
9dd59fee46bd4bec87cc8c40099110b483ad0496 | Python | (0,2) -> (1,2)
sym_state_recursive_ratios_1141[0, 3] = sym.factor(
sym_state_probs_1141[p03] / sym_state_probs_1141[p02]
) # (0,2) -> (0,3)
sym_state_recursive_ratios_1141[1, 3] = sym.factor(
sym_state_probs_1141[p13] / sym_state_probs_1141[p03]
) # (0,3) -> (1,3)
sym_state_recursi... | 1 |
9dd59fee46bd4bec87cc8c40099110b483ad0496 | Python | [p00]
) # (0,0) -> (1,6)
sym_state_recursive_ratios_P0_1171[0, 7] = sym.factor(
sym_state_probs_1171[p07] / sym_state_probs_1171[p00]
) # (0,0) -> (0,7)
sym_state_recursive_ratios_P0_1171[1, 7] = sym.factor(
sym_state_probs_1171[p17] / sym_state_probs_1171[p00]
) # (0,0) -> (1,7)
... | 2 |
27976e9f7fbe030910b3595ea1a13e0e505183e5 | Python | #!/software/python-2.7-2014q3-el6-x86_64/bin/python
import SNANA_Reader as simread
import REAL_Reader as dataread
#import astropy.cosmology as cosmo
import traceback
import scipy
import scipy.stats as stats
import numpy as np
import matplotlib.pyplot as plt
plt.switch_backend('Agg')
#import Cosmology
import scipy.stats... | 0 |
27976e9f7fbe030910b3595ea1a13e0e505183e5 | Python | stor)
#plt.xlabel('nData')
#plt.ylabel('chi2 in bin')
#plt.savefig(self.realName + 'Chi2VsnData.png')
#plt.clf()
if self.nprint > simInd:
print "Shapes of things"
print len(c2stor)
print nData.shape
print dataBins.shape
... | 1 |
27976e9f7fbe030910b3595ea1a13e0e505183e5 | Python | axis = 0)
#print CCScaleStorage
#print CCScaleErrStorage
print np.average(np.array(CCScaleStorage),weights = 1.0/ma.masked_invalid(CCScaleErrStorage)**2, axis = 0)
print np.nanmean(np.array(CCScaleStorage), axis = 0)
print "AAA CC Scale stds"
print... | 2 |
c5e7fdcbd4a9281597a35a180f2853caac68f811 | Python | # Copyright Contributors to the Pyro project.
# SPDX-License-Identifier: Apache-2.0
from collections import namedtuple
from functools import partial
import inspect
from itertools import product
import math
import os
import numpy as np
from numpy.testing import assert_allclose, assert_array_equal
import pytest
import ... | 0 |
c5e7fdcbd4a9281597a35a180f2853caac68f811 | Python | except NotImplementedError:
pytest.skip(f"{type(jax_dist).__name__}.infer_shapes() is not implemented")
assert jax_dist.batch_shape == expected_batch_shape
assert jax_dist.event_shape == expected_event_shape
@pytest.mark.parametrize(
"jax_dist, sp_dist, params", CONTINUOUS + DISCRETE + DIRECTIONAL... | 1 |
c5e7fdcbd4a9281597a35a180f2853caac68f811 | Python | 1e-6, rtol=1e-4)
assert transform.inv.inv is transform
assert transform.inv is transform.inv
assert transform.domain is transform.inv.codomain
assert transform.codomain is transform.inv.domain
# test domain
assert_array_equal(transform.domain(z), jnp.ones(batch_shape))
# test log_abs_det_j... | 2 |
4453b8176cda60a3a8f4800860b87bddfdb6cafa | Python |
# -*- coding: utf-8 -*-
"""
ORIGINAL PROGRAM SOURCE CODE:
1: from __future__ import division, print_function, absolute_import
2:
3: import os
4: from os.path import join
5:
6: from scipy._build_utils import numpy_nodepr_api
7:
8:
9: def configuration(parent_package='',top_path=None):
10: from numpy.distutils.... | 0 |
4453b8176cda60a3a8f4800860b87bddfdb6cafa | Python | src')
# Processing the call keyword arguments (line 42)
kwargs_32213 = {}
# Getting the type of 'join' (line 42)
join_32203 = module_type_store.get_type_of(stypy.reporting.localization.Localization(__file__, 42, 20), 'join', False)
# Calling join(args, kwargs) (line 42)
join_call_result_32214 = ... | 1 |
5f8303ce91c5de779bbddbaafb3fb828596babe5 | Python | # orm/relationships.py
# Copyright (C) 2005-2023 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
"""Heuristics related to join conditions as used in
:func:`_orm.relationship`.... | 0 |
5f8303ce91c5de779bbddbaafb3fb828596babe5 | Python |
else:
return
argument = extracted_mapped_annotation
assert originating_module is not None
is_write_only = mapped_container is not None and issubclass(
mapped_container, WriteOnlyMapped
)
if is_write_only:
self.lazy = "write_o... | 1 |
5f8303ce91c5de779bbddbaafb3fb828596babe5 | Python |
return (
primaryjoin,
secondaryjoin,
secondary,
target_adapter,
dest_selectable,
)
def create_lazy_clause(
self, reverse_direction: bool = False
) -> Tuple[
ColumnElement[bool],
Dict[str, ColumnElement[Any]],
... | 2 |
63093190ee20e10698bd99dcea94ccf5d076a006 | Python | species(
label = 'C=C([CH]C)C(=C)[CH]C(24182)',
structure = SMILES('[CH2]C(=CC)C([CH2])=CC'),
E0 = (249.687,'kJ/mol'),
modes = [
HarmonicOscillator(frequencies=([325,375,415,465,420,450,1700,1750,2750,2770,2790,2810,2830,2850,1350,1400,1450,1500,700,800,1000,1100,1350,1400,900,1100,3000,3033.33,... | 0 |
63093190ee20e10698bd99dcea94ccf5d076a006 | Python | HinderedRotor(inertia=(0.779478,'amu*angstrom^2'), symmetry=1, barrier=(17.9217,'kJ/mol'), semiclassical=False),
HinderedRotor(inertia=(0.781104,'amu*angstrom^2'), symmetry=1, barrier=(17.9591,'kJ/mol'), semiclassical=False),
],
spinMultiplicity = 3,
opticalIsomers = 1,
molecularWeight = (108.18... | 1 |
63093190ee20e10698bd99dcea94ccf5d076a006 | Python |
kinetics = Arrhenius(A=(6.66e+06,'s^-1'), n=1.64, Ea=(100.416,'kJ/mol'), T0=(1,'K'), comment="""From training reaction 96 used for R5H_SS(D)MS;C_rad_out_2H;Cs_H_out_2H
Exact match found for rate rule [R5H_SS(D)MS;C_rad_out_2H;Cs_H_out_2H]
Euclidian distance = 0
Multiplied by reaction path degeneracy 6.0
family: in... | 2 |
3c01ca27a5eef877b606b93b04ffe6f73168cd6b | Python | #Embedded file name: c:/depot/games/branches/release/EVE-TRANQUILITY/eve/client/script/paperDoll/SkinRaytracing.py
import trinity
import blue
import telemetry
import ctypes
import math
import time
import geo2
import struct
import itertools
import weakref
import uthread
import paperDoll as PD
import log
import random
my... | 0 |
3c01ca27a5eef877b606b93b04ffe6f73168cd6b | Python | (miss)
if False:
exception = trinity.Tr2OptixProgram(path + 'eve_miss.ptx', 'exception')
optix.SetExceptionProgram(0, exception)
everything.append(exception)
optix.SetStackSize(4096)
self.everything = everything
SkinRaytracingTools.SetOptixMatrixFromTr... | 1 |
937fd6aa7bd21258bd6e0f592d94a966519ef885 | Python | '''
# AWS::Chatbot Construct Library
AWS Chatbot is an AWS service that enables DevOps and software development teams to use Slack chat rooms to monitor and respond to operational events in their AWS Cloud. AWS Chatbot processes AWS service notifications from Amazon Simple Notification Service (Amazon SNS), and forwar... | 0 |
937fd6aa7bd21258bd6e0f592d94a966519ef885 | Python | ins.property # type: ignore[misc]
@jsii.member(jsii_name="slackChannelConfigurationName")
def slack_channel_configuration_name(self) -> builtins.str:
'''The name of Slack channel configuration.'''
return typing.cast(builtins.str, jsii.get(self, "slackChannelConfigurationName"))
@builtins.pr... | 1 |
2ab303a2f36cdd64e2119856312dd5e38ee728d6 | Python | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | 0 |
2ab303a2f36cdd64e2119856312dd5e38ee728d6 | Python | .update, update_template)()
self.assertEqual((rsrc.UPDATE, rsrc.COMPLETE), rsrc.state)
self.m.VerifyAll()
def test_update_lb_protocol(self):
rsrc, fake_lb = self._mock_loadbalancer(self.lb_template,
self.lb_name,
... | 1 |
12845f9dceb836a8c5f395a89d266b458a782958 | Python | # 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 0 |
12845f9dceb836a8c5f395a89d266b458a782958 | Python | status': expected_status})
def test_pypi_py2py3_py2_incompatible_fresh_nodeps(self):
package_name = 'google-api-core'
pair_incompatible_data = list(RECENT_SUCCESS_DATA)
pair_incompatible_data.remove(
APACHE_BEAM_GOOGLE_API_CORE_RECENT_SUCCESS_2)
pair_incompatible_data.ap... | 1 |
b2ec682fba5d5eec999d160d44c829f93d8caa36 | Python | # -*- coding: utf-8 -*-
# @Time : 2018/4/9 14:53:17
# @Author : SilverMaple
# @Site : https://github.com/SilverMaple
# @File : routes.py
import hashlib
import os
import logging
import sys
import shutil
import json
import subprocess
import time
from datetime import datetime
from app.decorators import async
f... | 0 |
b2ec682fba5d5eec999d160d44c829f93d8caa36 | Python | description = _('Selected File: ') + current_data.filter_content
form.filter_config_path.data = current_data.filter_configure_path
form.filter_import_flag.data = current_data.filter_import_flag
# form.filter_import_content.data = current_data.filter_import_content
form.filter_import_con... | 1 |
8b011e89ce886f13558ab292073393f5329edff0 | Python | from RFEM.initModel import *
from RFEM.enums import *
class MemberSetLoad():
def __init__(self,
no: int = 1,
load_case_no: int = 1,
member_sets: str = '1',
load_direction = LoadDirectionType.LOAD_DIRECTION_LOCAL_Z,
magnitude: flo... | 0 |
8b011e89ce886f13558ab292073393f5329edff0 | Python | .distance_b_relative = load_parameter[5]
else:
clientObject.distance_b_is_defined_as_relative = False
clientObject.distance_b_absolute = load_parameter[5]
else:
clientObject.load_is_over_total_length = True
elif load_distributi... | 1 |
0084b5137df5a7e6e6f04e0ca2ae84d6185cadfb | Python | from abc import abstractmethod
from .base import OperatorConverter
class ATenPackSequenceSchema(OperatorConverter):
@abstractmethod
def parse(self, node, attrs, args, graph_converter):
'''aten::_pack_sequence(Tensor output, Tensor batch_sizes, Tensor? sorted_indices, Tensor? unsorted_indices) -> (Ten... | 0 |
0084b5137df5a7e6e6f04e0ca2ae84d6185cadfb | Python | )'''
pass
class ATenUpsampleNearest1dSchema(OperatorConverter):
@abstractmethod
def parse(self, node, attrs, args, graph_converter):
'''aten::upsample_nearest1d(Tensor self, int[1] output_size, float? scales=None) -> (Tensor)
aten::upsample_nearest1d.vec(Tensor input, int[]? output_... | 1 |
0084b5137df5a7e6e6f04e0ca2ae84d6185cadfb | Python | , *, int? dtype=None) -> (Tensor)
aten::mean.names_dim(Tensor self, str[1] dim, bool keepdim=False, *, int? dtype=None) -> (Tensor)'''
pass
class ATenPowSchema(OperatorConverter):
@abstractmethod
def parse(self, node, attrs, args, graph_converter):
'''aten::pow.Tensor_Tensor(Tensor ... | 2 |
0084b5137df5a7e6e6f04e0ca2ae84d6185cadfb | Python | type(Tensor(a) self, int? dtype=None, bool non_blocking=False, bool copy=False) -> (Tensor(a|b))
aten::to.prim_other(Tensor(a) self, bool non_blocking=False, bool copy=False) -> (Tensor(a|b))'''
pass
class ATenTopkSchema(OperatorConverter):
@abstractmethod
def parse(self, node, attrs, args,... | 3 |
1c9c1a6f0b22d6fef4587a04d7eea1c516dc439b | Python | from __future__ import division
import sys
import numpy as np
import matplotlib.pyplot as plt
from sklearn import preprocessing
from sklearn import svm
import re
dataVectors = []
#the file train.csv is expected
file = open('train.csv','r')
for line in file:
dataVectors.append(line.strip().split(','))
file.close
... | 0 |
1c9c1a6f0b22d6fef4587a04d7eea1c516dc439b | Python | MixedColorDogsDied/numMixedColorDogs*100
#percentageMixedColorDogsTransfered = MixedColorDogsTransfered/numMixedColorDogs*100
#percentageMixedColorDogsReturnToOwners = MixedColorDogsReturnedToOwners/numMixedColorDogs*100
#percentageMixedColorDogsEuthanized = MixedColorDogsEuthanized/numMixedColorDogs*100
#percentageMix... | 1 |
fdd6a9fb7e1f297f3560ccd4ca2e29eec3e4956d | Python | from cep_price_console.utils.utils import is_path_exists_or_creatable, creation_date
from cep_price_console.db_management.server_utils import mysql_login_required
from cep_price_console.utils.log_utils import debug, CustomAdapter
from cep_price_console.utils.excel_utils import Workbook
import cep_price_console.db_manag... | 0 |
fdd6a9fb7e1f297f3560ccd4ca2e29eec3e4956d | Python | csv_string=csv_string,
data_type=self.data_type))
elif self.data_type == "Boolean":
if csv_string.strip().upper() == "FALSE":
formatted_value = False
elif csv_string.strip().upper() == "TRUE":
form... | 1 |
4d81f9fd95cb285139f7a2febae1ab8f6cf26d42 | Python | import rejig.pybytecode
from rejig.syntaxtree import *
def check(what_is, what_should_be):
global failed, total
env = {}
if "\n" in what_is or " = " in what_is or "def " in what_is or "print(" in what_is:
exec("def f():\n " + "\n ".join(what_is.split("\n")), env)
else:
exec("def f... | 0 |
4d81f9fd95cb285139f7a2febae1ab8f6cf26d42 | Python | Call('return', Call('not', Name('x'))),)))
check("not x and not y", Suite((Call('return', Call('and', Call('not', Name('x')), Call('not', Name('y')))),)))
check("not x and not y and not z", Suite((Call('return', Call('and', Call('not', Name('x')), Call('and', Call('not', Name('y')), Call('not', Name('z'))))),)))
check(... | 1 |
a212442d91b2807e6353f21b0a68c4ee74ec8db9 | Python | #
# PySNMP MIB module TPT-POLICY-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/TPT-POLICY-MIB
# Produced by pysmi-0.3.4 at Wed May 1 15:26:23 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2... | 0 |
a212442d91b2807e6353f21b0a68c4ee74ec8db9 | Python | 3, 3, 1, 28), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: tptPolicyNotifyAlertTimeNano.setStatus('current')
if mibBuilder.loadTexts: tptPolicyNotifyAlertTimeNano.setDescription('The nanoseconds portion of tptPolicyNotifyAlertTimeSec.')
tptPolicyNotifyPacketTrace = MibScalar((1, 3, 6, 1, 4, 1, 10734,... | 1 |
07488abfd841f0c5c54a32e5229e929f7569cca6 | Python | """
Module for the DomainMatrix class.
A DomainMatrix represents a matrix with elements that are in a particular
Domain. Each DomainMatrix internally wraps a DDM which is used for the
lower-level operations. The idea is that the DomainMatrix class provides the
convenience routines for converting between Expr and the ... | 0 |
07488abfd841f0c5c54a32e5229e929f7569cca6 | Python |
>>> from sympy import ZZ
>>> M = DM([[2, 3], [4, 12]], ZZ)
>>> denom = ZZ(6)
>>> numers, denoms = M.cancel_denom_elementwise(denom)
>>> numers.to_Matrix()
Matrix([
[1, 1],
[2, 2]])
>>> denoms.to_Matrix()
Matrix([
[3, 2],
[3... | 1 |
07488abfd841f0c5c54a32e5229e929f7569cca6 | Python |
def __eq__(A, B):
r"""
Checks for two DomainMatrix matrices to be equal or not
Parameters
==========
A, B: DomainMatrix
to check equality
Returns
=======
Boolean
True for equal, else False
Raises
======
... | 2 |
118a4483ca1cf645d66de85cad611d4b936981a8 | Python | # SOFTVEROVY NASTROJ PLGP
# Furtkevicova Ludmila, cast diplomovej prace
# script: okno s piatimi zalozkami, funkcie, tlacidla, modely
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
import os
import tkMessageBox
import Tkinter
import ttk
from Tkinter import *
from ttk import *
impor... | 0 |
118a4483ca1cf645d66de85cad611d4b936981a8 | Python | def valrecl(self):
self.txf8.delete(1.0, END)
redir = Presmerovanie(self.txf8)
sys.stdout = redir
print "(I. COV):\n-------------"
self.VAL_recl(1)
print "(II. COV):\n-------------"
self.VAL_recl(2)
print "(III. COV):\n-------------"
... | 1 |
66d96c42c8b814fcf38f8fd18215e6e29efbc810 | Python | """
Class: Stat232C
Project 3: Goal Inference
Name:Mingjia Yao
Date: May, 2020
"""
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.patches import Rectangle
import copy
import math
class ValueIteration(object):
def __init__(self, transitionTable, rewardTable, valueTable, convergenceTolerance, g... | 0 |
66d96c42c8b814fcf38f8fd18215e6e29efbc810 | Python | 1): -1.4142135623730951},(1, 1): {(1, 3): -1.4142135623730951},(-1, -1): {(0, 2): -1}},(0, 3): {(1, 0): {(1, 3): -1.0},(0, 1): {(0, 4): -1.0},(-1, 0): {(0, 3): -1},(0, -1): {(0, 2): -1.0},(-1, 1): {(0, 3): -1},(1, -1): {(1, 2): -1.4142135623730951},(1, 1): {(1, 4): -1.4142135623730951},(-1, -1): {(0, 3): -1}},(0, 4): {... | 1 |
66d96c42c8b814fcf38f8fd18215e6e29efbc810 | Python | 1.4142135623730951},(1, -1): {(2, 0): -1.4142135623730951},(1, 1): {(2, 2): -1.4142135623730951},(-1, -1): {(0, 0): -1.4142135623730951}},(1, 2): {(1, 0): {(2, 2): -1.0},(0, 1): {(1, 3): -1.0},(-1, 0): {(0, 2): -1.0},(0, -1): {(1, 1): -1.0},(-1, 1): {(0, 3): -1.4142135623730951},(1, -1): {(2, 1): -1.4142135623730951},(... | 2 |
66d96c42c8b814fcf38f8fd18215e6e29efbc810 | Python | 35623730951}},(1, 5): {(1, 0): {(2, 5): 10},(0, 1): {(1, 5): -1},(-1, 0): {(0, 5): 10},(0, -1): {(1, 4): 10},(-1, 1): {(1, 5): -1},(1, -1): {(2, 4): 10},(1, 1): {(1, 5): -1},(-1, -1): {(0, 4): 10}},(2, 0): {(1, 0): {(3, 0): -1.0},(0, 1): {(2, 1): -1.0},(-1, 0): {(1, 0): -1.0},(0, -1): {(2, 0): -1},(-1, 1): {(1, 1): -1.... | 3 |
c4c2912c76dea40a7fe36e070c679142bc0f0425 | Python | # coding: utf-8
import gc
import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
import pandas as pd
import time
from datetime import datetime, timedelta
from collections import deque, defaultdict
from itertools import islice
from tqdm import tqdm as tqdm
from contextlib import contextmanager
@cont... | 0 |
c4c2912c76dea40a7fe36e070c679142bc0f0425 | Python |
df.loc[df.query('id_30.isnull() and DeviceInfo.str.contains("NDQS26.69-23-2-3")', engine='python').index, 'id_30'] = 'Android 7.1'
df.loc[df.query('id_30.isnull() and DeviceInfo.str.contains("NPIS26.48-36-2")', engine='python').index, 'id_30'] = 'Android 7.1'
df.loc[df.query('id_30.isnull() and Devi... | 1 |
c4c2912c76dea40a7fe36e070c679142bc0f0425 | Python | "google search application 61.0"').index, 'id_31'] = 'chrome 61.0'
df.loc[df.query('id_31 == "chrome 62.0 for android" or id_31 == "chrome 62.0 for ios" or id_31 == "chrome 62.0" or id_31 == "google search application 62.0"').index, 'id_31'] = 'chrome 62.0'
df.loc[df.query('id_31 == "chrome 63.0 for android" ... | 2 |
c4c2912c76dea40a7fe36e070c679142bc0f0425 | Python | DONE')
| 3 |
0d21598b4f513100ee33aa9f2b86daf80a4ec2a3 | Python | # -*- coding: utf8 -*-
# python
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program 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; either version 2
# of the License, or (at your option) any later versi... | 0 |
0d21598b4f513100ee33aa9f2b86daf80a4ec2a3 | Python | displayed in image-editor'''
bl_idname = "paint.save_image"
bl_label = "Save image"
def invoke(self, context, event):
images = get_images_in_editors(context)
for img in images:
img.save()
return{'FINISHED'}
class SaveImages(Operator):
'''Save all images'''
bl_... | 1 |
5109eb2ffd5d01484a8cb1b7fd588d7214116878 | Python | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2014, 2015 Patrick Moran for Verizon
#
# Distributes WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy... | 0 |
5109eb2ffd5d01484a8cb1b7fd588d7214116878 | Python | _local_logger.debug("NOTHING IN LOCAL QUEUE, returning")
self.groomer_state = "1.0:GROOM_RETURN_EARLY"
return
self.my_local_logger.debug("------------------ processing all %d items in the local_q" % groom_queue_len)
for _ in range(groom_queue_len):
# STEP 1) Pull item... | 1 |
7ed966af4b81c43fa6980a449a421d947ebad60b | Python |
# Copyright Qwilt, 2012
#
# The code contained in this file may not be used by any other entities without explicit written permission from Qwilt.
#
# Author: naamas
from a.infra.misc.enum_with_value import EnumWithValue
from a.infra.basic.return_codes import ReturnCodes
from a.infra.misc.init_guard import InitGua... | 0 |
7ed966af4b81c43fa6980a449a421d947ebad60b | Python | type=%s), got: (%s, %s, type=%s)',
"management", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-interfaces", Value.kXmlEnd,
tag, ns, valEnd.getType())
self._cle... | 1 |
9e83190ba101ff865ded4f3fba7ad806dcc6226b | Python | 6691161,兵庫県,神戸市北区,道場町生野
6600000,兵庫県,尼崎市,
6610981,兵庫県,尼崎市,猪名寺
6600064,兵庫県,尼崎市,稲葉荘
6600055,兵庫県,尼崎市,稲葉元町
6600812,兵庫県,尼崎市,今福
6600096,兵庫県,尼崎市,扇町
6600076,兵庫県,尼崎市,大島
6600072,兵庫県,尼崎市,大庄川田町
6600075,兵庫県,尼崎市,大庄中通
6600077,兵庫県,尼崎市,大庄西町
6600063,兵庫県,尼崎市,大庄北
6600842,兵庫県,尼崎市,大高洲町
6610023,兵庫県,尼崎市,大西町
6600095,兵庫県,尼崎市,大浜町
6... | 0 |
9e83190ba101ff865ded4f3fba7ad806dcc6226b | Python | 0044,兵庫県,豊岡市,山王町
6680054,兵庫県,豊岡市,塩津町
6680012,兵庫県,豊岡市,下陰
6680803,兵庫県,豊岡市,下鶴井
6680813,兵庫県,豊岡市,下宮
6680865,兵庫県,豊岡市,下鉢山
6680082,兵庫県,豊岡市,庄
6680814,兵庫県,豊岡市,祥雲寺
6680873,兵庫県,豊岡市,庄境
6680045,兵庫県,豊岡市,城南町
6680063,兵庫県,豊岡市,正法寺
6680853,兵庫県,豊岡市,清冷寺
6680055,兵庫県,豊岡市,昭和町
6680004,兵庫県,豊岡市,新堂
6696122,兵庫県,豊岡市,瀬戸
6696125,兵庫県,豊岡市... | 1 |
9e83190ba101ff865ded4f3fba7ad806dcc6226b | Python | �山市,筋山
6692125,兵庫県,篠山市,住山
6692231,兵庫県,篠山市,住吉台
6692303,兵庫県,篠山市,瀬利
6692444,兵庫県,篠山市,曽地奥
6692442,兵庫県,篠山市,曽地口
6692443,兵庫県,篠山市,曽地中
6692805,兵庫県,篠山市,園田分
6692812,兵庫県,篠山市,高倉
6692717,兵庫県,篠山市,高坂
6692727,兵庫県,篠山市,高屋
6692612,兵庫県,篠山市,立金
6692323,兵庫県,篠山市,立町
6692453,兵庫県,篠山市,谷山
6692531,兵庫県,篠山市,垂水
6692362,兵庫県,篠山市,知足
6692814... | 2 |
9e83190ba101ff865ded4f3fba7ad806dcc6226b | Python | 田
6671354,兵庫県,美方郡香美町,村岡区柤岡
6671326,兵庫県,美方郡香美町,村岡区光陽
6671303,兵庫県,美方郡香美町,村岡区小城
6671301,兵庫県,美方郡香美町,村岡区境
6671316,兵庫県,美方郡香美町,村岡区鹿田
6671325,兵庫県,美方郡香美町,村岡区高井
6671345,兵庫県,美方郡香美町,村岡区高坂
6671365,兵庫県,美方郡香美町,村岡区高津
6671331,兵庫県,美方郡香美町,村岡区作山
6671322,兵庫県,美方郡香美町,村岡区寺河内
6671352,兵庫県,美方郡香美町,村岡区長板
6671343,兵庫県,美方郡香美町,村岡区中大谷
6671... | 3 |
e1f8424e0d08b91a96e8e8fa4e7271d7a13cf0a3 | Python | import FWCore.ParameterSet.Config as cms
maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
readFiles = cms.untracked.vstring()
secFiles = cms.untracked.vstring()
source = cms.Source ("PoolSource",fileNames = readFiles, secondaryFileNames = secFiles)
readFiles.extend( [
'/store/mc/RunIISummer16Mi... | 0 |
e1f8424e0d08b91a96e8e8fa4e7271d7a13cf0a3 | Python | uneCUETP8M1_13TeV-madgraphMLM-pythia8/MINIAODSIM/PUMoriond17_80X_mcRun2_asymptotic_2016_TrancheIV_v6-v1/50000/560F7D9C-7FBE-E611-BFD8-D067E5F910F5.root',
'/store/mc/RunIISummer16MiniAODv2/WJetsToLNu_TuneCUETP8M1_13TeV-madgraphMLM-pythia8/MINIAODSIM/PUMoriond17_80X_mcRun2_asymptotic_2016_TrancheIV_v6-v1/50000/5C8... | 1 |
e1f8424e0d08b91a96e8e8fa4e7271d7a13cf0a3 | Python | FA163E4625E4.root',
'/store/mc/RunIISummer16MiniAODv2/WJetsToLNu_TuneCUETP8M1_13TeV-madgraphMLM-pythia8/MINIAODSIM/PUMoriond17_80X_mcRun2_asymptotic_2016_TrancheIV_v6-v1/60000/BA4BF56A-86BC-E611-B038-0CC47A4D7628.root',
'/store/mc/RunIISummer16MiniAODv2/WJetsToLNu_TuneCUETP8M1_13TeV-madgraphMLM-pythia8/MI... | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.