input stringlengths 2.65k 237k | output stringclasses 1
value |
|---|---|
<reponame>mindaffect/smart-keyboard<filename>smart_keyboard/windows/keyboard_window.py<gh_stars>1-10
"""
This module contains a single class representing a keyboard.
It contains the following visual and functional elements:
* three keypad windows (upper, lower, symbols)
* suggestion keys
* textfield
"""
# Copyrigh... | |
NullArgument - ``proxy`` is ``null``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_sequence_rule_query()`` is
``false``
*compliance: optional -- This method must be implemented if
``supports_sequence_rule_query()`` is ``true``.*
"""
if proxy is None:
raise NullArgument()... | |
<gh_stars>0
"""
A qiki Word is defined by a three-word subject-verb-object
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import datetime
import re
import threading
import time
import mysql.connector
import six
... | |
<reponame>agave233/PaddleHelix<filename>pahelix/utils/compound_tools.py
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# htt... | |
from __future__ import absolute_import
import ctypes as _ctypes
from ._library import libHAPI as _hapi
from .version import *
from .common import *
from .helpers import *
CreateInProcessSession = _hapi.HAPI_CreateInProcessSession
CreateInProcessSession.restype = Result
CreateInProcessSession.argtypes = [ _ctypes.POI... | |
iogrp='iogrp0', thin=True)
self.svc.client.svctask.mkfcmap.assert_called_once_with(source="source_volume", target="test_snapshot",
copyrate=0)
def test_create_snapshot_as_stretched_success(self):
self._prepare_mocks_for_create_snapshot_mkvolume()
self.svc.create_snapshot("source_volume_id", "test_snapshot", spac... | |
'''
<NAME> - 308020734
<NAME> - 201242120
Compiler - Compilation Engine
'''
from SymbolTable import SymbolTable
from JackTokenizer import *
statments = ['let','if','while','do','return']
entityOp = ['<', '>', '"', '&']
opperators = ['+','-','*','/','&','|','<','>','='] + entityOp
class CompliationEng... | |
<filename>qiling/qiling/os/windows/dlls/user32.py
#!/usr/bin/env python3
#
# Cross Platform and Multi Architecture Advanced Binary Emulation Framework
#
from qiling.os.windows.fncc import *
from qiling.os.const import *
from qiling.os.windows.utils import *
from qiling.os.windows.const import *
from qiling.const impo... | |
<reponame>erdavila/typedecl
#!/usr/bin/env python3
"""
This script generates a C++ source file containing several definitions for types
construction variations. Its intention is to help develop and test the function
typedecl<>().
The types are constructed in steps. E.g.:
using A1 = int;
using A2 = A1[];
using A3 =... | |
import logging
import sys
from glob import glob
from json import dump
from subprocess import run
from attmap import PathExAttMap as PXAM
from refgenconf import RefGenConf
from refgenconf.exceptions import (
ConfigNotCompliantError,
GenomeConfigFormatError,
MissingConfigDataError,
RefgenconfError,
)
from refgenconf... | |
Func GetMinimumFPSModeInfo(CATBSTR ioAdminLevel,
| CATBSTR ioLocked) As boolean
|
| Retrieves information about the MinimumFPSMode setting
| parameter.
| Refer to SettingController for a detailed description.
:param str io_admin_level:
:param str io_locked:
:return: bool
:rtype: bool
"""
return self.visual... | |
<reponame>marinajacks/Sum-of-Functions-Optimizer
"""
Model classes for each of the demo cases. Each class contains
an objective function f_df, initial parameters theta_init, a
reference for each subfunction subfunction_references, and a
set of full_objective_references that are evaluated every update step
to make the p... | |
sampled, just use :func:`numpy.correlate`!
:INPUTS:
t -- (1D sequence) - time sampling of input data.
x, y -- (1D sequences) - input data.
Note that t, x, y should all have the same lengths!
:OPTIONAL INPUT:
zerolag -- (bool) - whether to compute DCF for zero-lag datapoints.
nbin -- (int) - number of compu... | |
<gh_stars>0
# coding: utf8
# Select or Add Option widget and Multiselect widget (al final)
from gluon import *
import os
from gluon.utils import web2py_uuid
from gluon.sqlhtml import OptionsWidget
from gluon.sqlhtml import StringWidget
import uuid
from plugin_jschosen import jschosen_widget
T=current.T
selectaddplusco... | |
# Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved.
import copy
from dace import properties, symbolic
import dace.library
import dace.sdfg.nodes
from dace.sdfg import SDFG, SDFGState
from dace import memlet as mm, data as dt
from dace.transformation.transformation import ExpandTransformation
fro... | |
the interpolation.
"""
tr = read()[0]
tr.stats.sampling_rate = 1.0
tr.data = tr.data[:500]
tr.interpolate(method="lanczos", sampling_rate=10.0, a=20)
tr.stats.sampling_rate = 1.0
tr.data = tr.data[:500]
tr.stats.starttime = UTCDateTime(0)
org_tr = tr.copy()
# Now this does not do much for now but actually j... | |
#! /usr/bin/python
#
# Copyright (c) 2013 VMware, Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | |
account at the time the
operation was called. Possible values include: "Accepted", "Creating", "Deleting", "Moving",
"Failed", "Succeeded", "ResolvingDNS".
:vartype provisioning_state: str or ~azure.mgmt.cognitiveservices.models.ProvisioningState
:ivar endpoint: Endpoint of the created account.
:vartype endpoint: ... | |
TODO if range is list of list --> assume per channel data and do norm that way --> TODO --> think about the best way to do that
logger.debug('max after normalization=' + str(img.max()) + ' min after normalization=' + str(img.min()))
return img
elif 'ormalization' in method and not 'tandardization' in method:
logger... | |
<reponame>Flame442/Trusty-cogs
import aiohttp
import json
import logging
import discord
from dataclasses import dataclass
from typing import Optional, Literal, Union
from tabulate import tabulate
from datetime import datetime
from redbot.core.i18n import Translator
from redbot.core.utils.chat_formatting import box
f... | |
<gh_stars>0
# 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... | |
1003100: "Crystal Demon's Spear",
1003101: "Crystal Demon's Spear+1",
1003102: "Crystal Demon's Spear+2",
1003103: "Crystal Demon's Spear+3",
1003104: "Crystal Demon's Spear+4",
1003105: "Crystal Demon's Spear+5",
1003200: "Lightning Demon's Spear",
1003201: "Lightning Demon's Spear+1",
1003202: "Lightn... | |
Leakage': 0.00611897,
'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00348781,
'Renaming Unit/Peak Dynamic': 4.56169,
'Renaming Unit/Runtime Dynamic': 0.0997091,
'Renaming Unit/Subthreshold Leakage': 0.070483,
'Renaming Unit/Subthreshold Leakage with power gating': 0.0362779,
'Runtime... | |
reshard.
transposed_expert_output = jnp.einsum('egcm->gecm', expert_output)
transposed_expert_output = Split(transposed_expert_output, ap.gecm)
combined_output = jnp.einsum('gecm,gsec->gsm', transposed_expert_output,
combine_tensor)
combined_output = Split(combined_output, ap.gsm)
combined_output = combined_outp... | |
employees in the same report."))
if any(not expense.product_id for expense in self):
raise UserError(_("You can not create report without product."))
todo = self.filtered(lambda x: x.payment_mode=='own_account') or self.filtered(lambda x: x.payment_mode=='company_account')
sheet = self.env['hr.expense.sheet'].crea... | |
<filename>warrior/WarriorCore/Classes/warmock_class.py
'''
Copyright 2017, Fujitsu Network Communications, 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-... | |
last test we tried to perform:
URL: {local_we_query_url}
Method: GET
Status code: {response.status_code}
We cannot proceed if the windows exporter server is not responding
properly. Make sure to check the logs and fix any issue found there. You
can see the logs in the Event Viewer for Application with source
windows_... | |
import time
from pathlib import Path
from typing import Tuple, Sequence
from collections import Counter
import numpy as np
import pandas as pd
from torch.utils import data
from tqdm import tqdm
from sandstone.datasets.factory import RegisterDataset
from sandstone.utils.generic import log, md5
import warnings
warnings... | |
# Copyright 2021 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 required by applicable ... | |
wr_config and format_version >= 2:
print(f'{Color.RED}ERROR:{Color.RESET} Extrapolation of operations to "Result" is not supported. layer_id: {layer_id}')
sys.exit(-1)
else:
print('The {} layer is not yet implemented.'.format(layer.attrib['type']))
sys.exit(-1)
# layerids_of_the_terminating_output
if layerids... | |
'Activity No toca BOTOn: Amazon Web Services desde python Confirmed. Thank you!',
'Activity Oily Python: a Reservoir Engineering Perspective Confirmed. Thank you!': 'Activity Oily Python: a Reservoir Engineering Perspective Confirmed. Thank you!',
'Activity OpenERP Confirmed. Thank you!': 'Activity OpenERP Confirmed. T... | |
domain=NamedThing, range=Optional[Union[Union[str, DeviceId], List[Union[str, DeviceId]]]])
slots.has_procedure = Slot(uri=BIOLINK.has_procedure, name="has procedure", curie=BIOLINK.curie('has_procedure'),
model_uri=BIOLINK.has_procedure, domain=NamedThing, range=Optional[Union[Union[str, ProcedureId], List[Union[str... | |
from tensorhive.models.Task import Task, TaskStatus, try_parse_input_datetime
from tensorhive.models.User import User
from tensorhive.core import task_nursery, ssh
from tensorhive.core.task_nursery import SpawnError, ExitCodeError
from pssh.exceptions import ConnectionErrorException, AuthenticationException, UnknownHos... | |
shifts[0]
recipients = [publicity_email]
salutation = 'Hello Publicity Officer,'
if pres.exists():
recipients.append(pres[0].email)
salutation = 'Hello President and Publicity Officer,'
ccs = [leader.get_email() for leader in leaders]
if not needed_coe_event or not edited:
body = COE_EVENT_EMAIL_BODY % {
'salu... | |
"""Parent class DataN."""
import os
import os.path
from warnings import warn
from typing import Union, NoReturn
from pycifstar import Data, to_data
from cryspy.A_functions_base.function_1_markdown import md_to_html
from cryspy.A_functions_base.function_1_objects import \
get_functions_of_objet, get_table_html_for_var... | |
= res.lineage()['column']
assert len(lineage) == 4
assert sorted(lineage.keys()) == ['id', 'new1', 'new2', 'val']
assert lineage['id'] == {('PROGRAM', 'id')}
assert lineage['val'] == {('PROGRAM', 'val')}
assert lineage['new1'] == {('PROGRAM', '_XARRAY')}
assert lineage['new2'] == {('PROGRAM', '_XARRAY')}
# add_... | |
"admin_name": "Borno",
"capital": "minor",
"population": "",
"population_proper": ""
},
{
"city": "Tede",
"lat": "8.5534",
"lng": "3.4465",
"country": "Nigeria",
"iso2": "NG",
"admin_name": "Oyo",
"capital": "minor",
"population": "",
"population_proper": ""
},
{
"city": "Buni Yadi",
"la... | |
>= p:
a -= 1
B += D[a]
A -= D[a]
break
p = t
ans = min(ans, p)
return N
def func_7034d50ae53245e68625a23b9291daaa(infile):
N, p, q, r, s = map(int, infile.readline().split())
D = [((i * p + q) % r + s) for i in range(N)]
S = sum(D)
ans = S
A, B, C = 0, 0, S
a = 0
b = -1
while b < N - 1:
b += 1
C -= D... | |
<reponame>gappleto97/arguman.org
# -*- coding:utf-8 -*-
import json
from datetime import timedelta
from django.conf import settings
from django.core.serializers.json import DjangoJSONEncoder
from markdown2 import markdown
from django.contrib import messages
from django.core.urlresolvers import reverse
from django.uti... | |
arg1) # type: ignore
_wasm_module_get_host_info = dll.wasm_module_get_host_info
_wasm_module_get_host_info.restype = c_void_p
_wasm_module_get_host_info.argtypes = [POINTER(wasm_module_t)]
def wasm_module_get_host_info(arg0: Any) -> pointer:
return _wasm_module_get_host_info(arg0) # type: ignore
_wasm_module_set_hos... | |
"Sky", "SCALAR", 30, 33, 50, "all"),
("Fcst", "Wx", "WEATHER", 30, 33, "SChc:R:--:0SM:^Chc:R:-:<NoVis>:", "all"),
("Fcst", "PoP", "SCALAR", 30, 33, 60, "all"),
("Fcst", "QPF", "SCALAR", 30, 33, 2.5, "all"),
("Fcst", "SnowAmt", "SCALAR", 30, 33, 0, "all"),
("Fcst", "T", "SCALAR", 33, 36, 41, "all"),
("Fcst", "Td",... | |
return result
def from_map(self, m: dict = None):
m = m or dict()
if m.get('req_msg_id') is not None:
self.req_msg_id = m.get('req_msg_id')
if m.get('result_code') is not None:
self.result_code = m.get('result_code')
if m.get('result_msg') is not None:
self.result_msg = m.get('result_msg')
return self
class... | |
<gh_stars>0
# ---------------------------------------------------------------------------
# Amazon ElasticTranscoder to AWS Elemental MediaConvert preset converter.
# Version: 2.1
#
# 2.1
# - Added Thumbnail preset creationg
# - Added -f option to save preset and thumbnail preset to files
# - Corrected interlace... | |
<reponame>proguy914629bot/LyricMasterOutdated<filename>cogs/reaction.py
import discord
import typing
import emojis
import os
import asyncio
from discord.ext import commands
import json
from discord.utils import get
os.chdir("/home/gilb/LyricMaster/")
class ReactionRolesNotSetup(Exception):
"""Reaction Roles are not ... | |
Optional. The type of restore. If unspecified, defaults to
METADATA_ONLY.
"""
class RestoreTypeValueValuesEnum(_messages.Enum):
r"""Optional. The type of restore. If unspecified, defaults to
METADATA_ONLY.
Values:
RESTORE_TYPE_UNSPECIFIED: The restore type is unknown.
FULL: The service's metadata and configur... | |
celcius, 250 rpm.",
"ordered_locus_name": "BCE_0159",
"gene_start": 160105,
"gene_end": 162642,
"strand": "F",
"cog": "R",
"species": "Bacillus cereus ATCC 10987",
"ncbi_taxonomy_id": 222523
},
{
"halflife": 4041.87006,
"std": 523.16592,
"std_over_avg": 0.1294366004,
"unit": "s",
"reference": [
{
"doi":... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated Fri Mar 6 15:54:35 2020 by generateDS.py version 2.35.15.
# Python 3.8.1 (v3.8.1:1b293b6006, Dec 18 2019, 14:08:53) [Clang 6.0 (clang-600.0.57)]
#
# Command line options:
# ('--no-namespace-defs', '')
# ('-o', './python/dgds_service_v5.py')
#
# Command line a... | |
os.path.dirname(output_dir))
]
found = [os.path.exists(file) for file in lookup_table]
if not any(found):
return None
return lookup_table[found.index(True)]
def _parse_parameter_file(self):
"""
Parses the parameter file and establishes the various
dictionaries.
"""
self._parse_header_file()
# Let's read ... | |
<filename>PyU4V/common.py
# The MIT License (MIT)
# Copyright (c) 2016 Dell Inc. or its subsidiaries.
# 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... | |
U; Intel Mac OS X 10_6_2; en-ca)',
'Mozilla/4.0 (compatible; WebCapture 3.0; Macintosh)',
'Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (FM Scene 4.6.1)',
'Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729) (Prevx 3.0... | |
#!/usr/bin/env python
# Copyright (c) <NAME>. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
import sys
import time
import serial
import serial.tools.list_ports
import logging
from logging.handlers import RotatingFileHandler
import argparse
impo... | |
<gh_stars>1-10
#import gv,pygraph, edge
#from pygraph.classes.graph import graph
#from pygraph.classes.digraph import digraph
#from pygraph.algorithms.searching import breadth_first_search
#from pygraph.readwrite.dot import write
#import pygraphviz as pgv
import math
import copy
from operator import itemgetter
from nlt... | |
<gh_stars>0
# encoding=utf-8
# Date: 2018-09-13
# Author: MJUZY
from ExtractMaxFace import extractProcess
from FaceRecognzedProcess import faceRecognzedProcess
import datetime
import dlib
from flask import Flask, url_for
from flask import request
import json
import shutil
from werkzeug.utils import secur... | |
"NETWORK PRODUCTS",
"008021": "Alcatel Canada Inc.",
"008022": "SCAN-OPTICS",
"008023": "INTEGRATED BUSINESS NETWORKS",
"008024": "KALPANA, INC.",
"008025": "STOLLMANN GMBH",
"008026": "NETWORK PRODUCTS CORPORATION",
"008027": "ADAPTIVE SYSTEMS, INC.",
"008028": "TRADPOST (HK) LTD",
"008029": "EAGLE T... | |
self.exit)
BindShortcuts(self.txtarea, "Undo", self.undo)
BindShortcuts(self.txtarea,"Redo",self.redo)
BindShortcuts(self.txtarea,"Comment Line",self.CommentBlock)
BindShortcuts(self.txtarea,"Compile",self.Compile)
BindShortcuts(self.txtarea,"LineCol",self.UpdateLineandColumn)
BindShortcuts(self.txtarea,"ShiftLin... | |
possible3d
if observed2d.shape in not_seen2d:
not_seen2d.remove(observed2d.shape)
if observed3d.shape in not_seen3d:
not_seen3d.remove(observed3d.shape)
if not not_seen2d and not not_seen3d:
break
assert not not_seen2d
assert not not_seen3d
def test_decrease_size_by_tuples_of_floats__one_per_side(self):
imag... | |
import json
import logging
import os
import random
import secrets
import socket
import string
import threading
import time
import urllib.parse
import uuid
from collections import Counter
from collections import defaultdict
from pprint import pprint
import pandas as pd
import requests
from flask import abort
from flask... | |
<reponame>paulherman/meson
# Copyright 2013-2021 The Meson development team
# 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 ... | |
<filename>pypadre/pod/importing/dataset/ds_import.py<gh_stars>1-10
# """
# Modul containing import methods from different packages / repositories.
# """
#
# import copy
# import json
# import os.path
# import tempfile
# from multiprocessing import Process
#
# import arff
# import networkx as nx
# import numpy as np
# i... | |
import greenaddress as gdk
import json
# To install GDK, download the GDK python wheel from:
# https://github.com/Blockstream/gdk/releases
# The 'cp' number refers to the python version you have.
# To install GDK, pip install the .whl file:
# pip install greenaddress-0.0.36-cp37-cp37m-linux_x86_64.whl
# GDK README and... | |
er:
print("\nSqrt failed! Error {}".format(er))
print("Test failed")
## ========================================
print("\n8.2. Square root all negative")
tests_cnt+=1
try:
a = sd_var(-16,-4)
c = a.get_sqrt()
print("\tsqrt({}) = [nan, nan]".format(a))
if c.defined():
print("Test failed, must be undeifined,... | |
foo1 -> std::str;
CREATE PROPERTY bar1 -> std::str {
SET default := __source__.foo1;
};
};
""")
async def test_edgeql_ddl_15(self):
await self.con.execute(r"""
CREATE TYPE TestSelfLink2 {
CREATE PROPERTY foo2 -> std::str;
CREATE MULTI PROPERTY bar2 -> std::str {
# NOTE: this is a set of all TestSelfLink2.fo... | |
#!/usr/bin/env python
"""Connect to Darshan logs.
This connector provides an interface into Darshan logs created by Darshan 3.0 or
higher and represents the counters and data contained therein as a Python
dictionary. This dictionary has the following structure, where ``block``
denote literal key names.
* ``header`` w... | |
<reponame>sbenthall/DemARK
# ---
# jupyter:
# jupytext:
# formats: ipynb,py:percent
# text_representation:
# extension: .py
# format_name: percent
# format_version: '1.2'
# jupytext_version: 1.2.4
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
# %% [markdown]
# # A Gentle Introduction ... | |
0x44, 0x48, 0x28,
0x00, 0x00, 0x60, 0x44, 0x48, 0x00, 0xe0, 0x82,
0x34, 0x48, 0x49, 0x01, 0x22, 0x44, 0x00, 0x40,
0x18, 0x04, 0x18, 0x48, 0x00, 0x40, 0x08, 0x41,
0x28, 0x40, 0x24, 0x12, 0x88, 0x14, 0x48, 0xf2,
0xcf, 0x21, 0x00, 0x40, 0x01, 0x2c, 0x81, 0x14,
0x81, 0x04, 0x40, 0x02, 0x80, 0x04, 0xc0, 0x42,
0x62, 0... | |
<filename>camkes/runner/NameMangling.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2017, Data61
# Commonwealth Scientific and Industrial Research Organisation (CSIRO)
# ABN 41 687 119 230.
#
# This software may be distributed and modified according to the terms of
# the BSD 2-Clause license. Note that... | |
<gh_stars>0
import asyncio
import re
from collections import Counter
from distutils.version import LooseVersion
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Sequence, Union, cast
import msgpack
import nats
import validators
from asgiref.sync import sync_to_async
from django.conf import settings
from dj... | |
<reponame>ivmfnal/metacat<filename>src/old/mql5.py
from dbobjects import DBDataset, DBFile, DBNamedQuery, DBFileSet
import json, time
from lark import Lark
from lark import Transformer, Tree, Token
from lark.visitors import Interpreter
import pprint
CMP_OPS = [">" , "<" , ">=" , "<=" , "==" , "=" , "!="]
MQL_Grammar... | |
thread.get()
:param async_req bool
:param int device_group_id: (required)
:param DeviceClusterAlertConfig body: (required)
:return: DeviceClusterAlertConfig
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.... | |
<gh_stars>0
import logging
import xml.etree.ElementTree as ET
import dateutil.parser as DU
from typing import List, Union
from .address import Address
from .affiliation import Affiliation
from .biblio_version import BibliographicItemVersion
from .bibliographic_date import BibliographicDate, BibliographicDateType
from ... | |
mounted correctly: PASSED', tid)
else:
log_red(
'Verify that the file structure has "/proprietary" mounted correctly: FAILED', tid)
if "/dev/mapper/proprietary" in file_structure:
log_green('Verify that "/proprietary" is encrypted: PASSED', tid)
else:
log_red('Verify that "/proprietary" is encrypted: FAILED', t... | |
data types present in file
topo_freq_df = pd.DataFrame(
{
"TopologyID": topo_names,
"Frequency": topo_freqs,
}
)
return topo_freq_df, pd.DataFrame()
def current_view_topo_freq_chart(basic_stats_topo_freqs, template, color_mapping):
"""Return pie chart figure object for local topology frequencies
:param basi... | |
thresholdWidget = qt.QWidget()
thresholdWidget.setLayout(form)
layout.addWidget(thresholdWidget)
layout.addStretch(1)
self.thresholdGroup = qt.QGroupBox('Threshold')
self.thresholdGroup.setLayout(layout)
return self.thresholdGroup
# Handle mask refresh on the plot
def _updatePlotMask(self):
"""Update mask ... | |
break
except NotFittedError as e:
continue
if random.random() < dieProb:
person.dead = True
deaths[person.classRank] += 1
person.house.occupants.remove(person)
if len(person.house.occupants) == 0:
self.map.occupiedHouses.remove(person.house)
if (self.p['interactiveGraphics']):
self.canvas.itemcon... | |
m.x688 + m.x695 + m.x1233 == 0)
m.c1676 = Constraint(expr= - m.x360 + m.x388 + m.x395 + m.x402 - m.x458 + m.x486 + m.x493 + m.x500 - m.x556 + m.x584
+ m.x591 + m.x598 - m.x654 + m.x682 + m.x689 + m.x696 + m.x1234 == 0)
m.c1677 = Constraint(expr= - m.x361 + m.x389 + m.x396 + m.x403 - m.x459 + m.x487 + m.x494 + m.x501... | |
"""
Quantilization functions and related stuff
"""
from pandas.core.dtypes.missing import isna
from pandas.core.dtypes.common import (
is_integer,
is_scalar,
is_categorical_dtype,
is_datetime64_dtype,
is_timedelta64_dtype,
_ensure_int64)
import pandas.core.algorithms as algos
import pandas.core.nanops as nanops... | |
"top-secret",
"roma",
"surplus",
"judo",
"say-",
"doctrine",
"accessible",
"crazed",
"audi",
"purposely",
"sleet",
"yugoslavia",
"ostrich",
"no-no",
"gunning",
"estelle",
"oversee",
"atrocities",
"landmark",
"holdings",
"generators",
"cheerio",
"unimaginable",
"stimulate",
"what`s",
"incriminat... | |
card.controller = card.owner
else:
remoteCall(card.controller, 'passControl', [card, card.owner])
else: #skip detachment since the card is not involved in attachments
return ""
setGlobalVariable('cattach', str(cattach))
return text
def autopersist(card):
if card.group.name == "Graveyard":
stackData = autoCast(... | |
2D equal area projection."""
Y = y/(1+x)
Z = z/(1+x)
return Y,Z
def plot_Lune(MTs, MTp, six_MT_max_prob=[], frac_to_sample=0.1, figure_filename=[], plot_max_prob_on_Lune=False):
"""Function to plot Lune plot for certain inversions (if Lune plot is relevent, i.e. not DC constrained or single-force constrained).
Wi... | |
uncategorized error condition
"""
from ixnetwork_restpy.testplatform.sessions.ixnetwork.topology.pimv6interface_74a3aa08a315ca50732e853e3e8cdc43 import PimV6Interface
if self._properties.get('PimV6Interface', None) is not None:
return self._properties.get('PimV6Interface')
else:
return PimV6Interface(self)
@pro... | |
import sys
import os
import json
import pickle
import argparse
import glob
import math
import numpy as np
import time
import traceback
from tqdm import tqdm
from collections import defaultdict
from graphviz import Digraph
import bisect
from denoising_event_lm.utils.utils import read_data
def get_all_doc_spans(doc_l... | |
<reponame>mattdangerw/gnn
"""GraphTensor adjacency types.
"""
from typing import Dict, Mapping, Optional, Tuple, Union
import tensorflow as tf
from tensorflow_gnn.graph import graph_constants as const
from tensorflow_gnn.graph import graph_piece as gp
from tensorflow_gnn.graph import tensor_utils as utils
# pylint: ... | |
<reponame>abhaikollara/tensorflow<filename>tensorflow/python/grappler/hierarchical_controller.py
# 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... | |
<reponame>SSK-14/Covid19-Search-Engine
import pickle
a = """1H – 1st Half
24/7 - 24 hours a day, seven days a week
80/20 – for many events, roughly 80% of the effects come from 20% of the causes
ADR - American Depositary Receipt
AI - Artificial Intelligence
AM – Account manager
AOP – Adjusted Operating Profit
AOP – An... | |
import pymbar
from fe import endpoint_correction
from collections import namedtuple
import pickle
import dataclasses
import time
import functools
import copy
import jax
import numpy as np
from md import minimizer
from typing import Tuple, List, Any
import os
from fe import standard_state
from fe.utils import sanitiz... | |
The example below shows a box, and the same box
scaled by 2 in the x direction, scaled by 2 in the y direction,
and scaled by 2 in the z direction.
.. figure:: ../examples/images/example_scale1_128.png
:target: ../examples/images/example_scale1_512.png
.. literalinclude:: ../examples/example_scale1.py
:lines:... | |
iI1I , OooOoOo , III1I1Iii1iiI )
if 78 - 78: iII111i + I11i . ooOoO0o - iII111i . Ii1I
if 30 - 30: I1IiiI + OoO0O00 % Ii1I * iII111i / Oo0Ooo - I11i
if 64 - 64: iIii1I11I1II1
if 21 - 21: Oo0Ooo . II111iiii
ooo000o000 = "none" if len ( iiIiIIi . registered_rlocs ) == 0 else ""
if ( ooo000o000 != "" ) : ooo000o000 ... | |
<gh_stars>1-10
import os
from os.path import join as pjoin, exists as pexists
import bz2
import numpy as np
import pandas as pd
import gzip
import shutil
import torch
import random
import warnings
from sklearn.model_selection import train_test_split
from .utils import download, Timer
from sklearn.datasets import load... | |
JA': None,
'BUGINESE LETTER KA': None,
'BUGINESE LETTER LA': None,
'BUGINESE LETTER MA': None,
'BUGINESE LETTER MPA': None,
'BUGINESE LETTER NA': None,
'BUGINESE LETTER NGA': None,
'BUGINESE LETTER NGKA': None,
'BUGINESE LETTER NRA': None,
'BUGINESE LETTER NYA': None,
'BUGINESE LETTER NYCA': None,
'BUGINESE LETTER PA':... | |
Rational Field
sage: Algebras(QQ).Commutative().WithBasis()._without_axioms(named=True)
Category of algebras over Rational Field
"""
return self
_flatten_categories = _flatten_categories
@staticmethod
def _sort(categories):
"""
Return the categories after sorting them decreasingly according
to their compari... | |
import tkinter as tk
import tkinter.ttk as ttk
from tkinter import messagebox, filedialog
from collections import OrderedDict
import logging
import os
import xlsxwriter
from tkintertable.TableModels import TableModel
from sqlalchemy.sql import literal
from sqlalchemy.sql.expression import and_, union_all
from cep_price... | |
<reponame>stillmatic/mizani<filename>mizani/breaks.py
"""
All scales have a means by which the values that are mapped
onto the scale are interpreted. Numeric digital scales put
out numbers for direct interpretation, but most scales
cannot do this. What they offer is named markers/ticks that
aid in assessing the values ... | |
<filename>digic_aligner/doc.py<gh_stars>0
import sklearn.feature_extraction
import sklearn.metrics
import numpy
import sys
import os
import yaml
import ufal.udpipe as udpipe
from laserembeddings import Laser
import datetime
import torch
import transformers
import requests
from digic_aligner.variables import METHOD, THR... | |
<filename>hivwholeseq/sequencing/build_consensus.py<gh_stars>1-10
#!/usr/bin/env python
# vim: fdm=marker
'''
author: <NAME>
date: 27/03/14
content: Build consensus after premap, trim and divide. Thanks to the premap
we have an easy time here: we collect reads a bit from all over the
fragment and make local consensi ... | |
import unittest
from time import time
from mock import patch
from appscale.common.service_stats import stats_manager, samples
def request_simulator(service_stats, time_mock=None):
""" Builds quick request reported for simulating
start and finalization of request with optionally specified latency.
Args:
service_... | |
<filename>tensorflow/python/util/deprecation.py
# Copyright 2016 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/license... | |
True
else:
self.depart_docinfo_item()
def visit_authors(self, node):
self.visit_docinfo_item(node, 'authors')
self.author_in_authors = False # initialize
def depart_authors(self, node):
self.depart_docinfo_item()
def visit_block_quote(self, node):
self.body.append(self.starttag(node, 'blockquote'))
def de... | |
<filename>scripts/cat_rules.py
from difflib import SequenceMatcher
from string import punctuation
import spacy.parts_of_speech as spos
# Contractions
#conts = {"'d", "'ll", "'m", "n't", "'re", "'s", "'ve"}
# Rare POS tags that make uninformative error categories
rare_tags = {"INTJ", "NUM", "SYM", "X"}
# Specia... | |
<reponame>byron123t/faceoff
## lp_attack.py -- attack a network optimizing for l_2 distance
##
## Copyright (C) 2016, <NAME> <<EMAIL>>.
##
## This program is licenced under the BSD 2-Clause licence,
## contained in the LICENCE file in this directory.
import math
import tensorflow as tf
import numpy as np
from backend ... | |
(cross and self.cross_info.has_host() and self.cross_info.config['host_machine']['system'] == 'windows'):
self.exe_suffix = 'exe'
self.object_suffix = 'obj'
self.win_libdir_layout = True
elif (not cross and mesonlib.is_cygwin()) \
or (cross and self.cross_info.has_host() and self.cross_info.config['host_machine'][... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.