seed stringlengths 1 14k | source stringclasses 2
values |
|---|---|
from datadog.util.compat import is_p3k
from tests.unit.api.helper import (
DatadogAPIWithInitialization,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#[balthazar::main]
async fn main() -> Result<()> {
let _ = Config::<AppConfig>::init("basic_example").await?;
Ok(())
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# -*- coding:utf-8 -*-
from __future__ import division, print_function
from future_builtins import *
import os
import sys
import argparse
import ConfigParser
import pyotp
sys.path.append(os.path.join(os.path.abspath(
os.path.dirname(__file__)), 'vendor'))
INI_FILE_PATH = "~/.pymfa/config"
INI_FILE = (os.path.expanduser(INI_FILE_PATH))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
names_or_ids = [names_or_ids]
if names_or_ids == [None] or not names_or_ids:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from .views import token_bp
| ise-uiuc/Magicoder-OSS-Instruct-75K |
estado = models.CharField(max_length=50)
pais = models.CharField(max_length=70)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import mock
m = mock.MagicMock()
m.get('companies').not_local.return_value = []
companies = m.get('companies')
self.assertEqual(companies.not_local(), [])
def test_sub_mocks(self):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
result_file.close()
print(result_data)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
super().__init__()
self.__event_loop = asyncio.get_event_loop()
self.__log = log.with_name("Framework", "Kernel")
self.__database_manager = database_manager
self.__environment = environment
self.__integrations = integrations
self.__lifecycle_manager = lifecycle_manager
def run(self):
self.__log.info(f"Starting application... {{ Version = {self.__environment.version} }}")
self.__event_loop.run_until_complete(self.__database_manager.upgrade_all())
self.__event_loop.run_until_complete(self.__lifecycle_manager.start_all())
self.__log.debug(f"Starting integrations... {{ Count = {len(self.__integrations)} }}")
| ise-uiuc/Magicoder-OSS-Instruct-75K |
),
migrations.AlterField(
model_name='genericmetaprop',
name='namespace',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='rdf_io.Namespace', verbose_name='namespace'),
),
migrations.AlterField(
model_name='genericmetaprop',
name='propname',
field=models.CharField(blank=True, max_length=250, verbose_name='name'),
),
migrations.AlterField(
model_name='namespace',
name='prefix',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mVideoCursorAdapter.setMapper(new VideoCursorMapper());
setAdapter(mVideoCursorAdapter);
setTitle(getString(R.string.vertical_grid_title));
if (savedInstanceState == null) {
prepareEntranceTransition();
}
setupFragment();
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
borfiles.sort()
for key in borfiles: print key
def get_file(pak, borfile):
'''Prevents a need to directly use PackFileReader when you only want to get
one file, like in borplay and bor2wav. Returns a file-like object.'''
| ise-uiuc/Magicoder-OSS-Instruct-75K |
url="localhost", port=27017):
super(SimplexScalarOffsetSolver, self).__init__(dbname,
cname, url, port)
def multi_start(self, couplings, nTrials, logPath, initSigma=6e-10,
restartSigma=1e-11, mp=True, cython=True, log_xtol=-6.,
log_ftol=-5.):
"""Start processing using the Multi-Start Reconverging algorithm.
Parameters
----------
nTrials : int
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/* Connect to the MySQL test database */
m_connection->setSchema(db);
return 0;
}
/// <summary>
/// Returns the connection.
/// </summary>
/// <returns></returns>
std::shared_ptr<sql::Connection> MysqlConnection::getConnection()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
let segwitAddress = try doWithError { error in
LibwalletCreateAddressV4(derivedKey.key, derivedMuunKey.key, error)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
for idx in range(0, 10):
example_dict[idx] = idx
for key, value in example_dict.items():
formmating = f'key is {key}, value is {value}'
print(formmating) | ise-uiuc/Magicoder-OSS-Instruct-75K |
using Analytics;
using Azure;
using DataLake;
using Management;
using Azure;
using Management;
using DataLake;
using Analytics;
using Newtonsoft.Json;
using System.Collections;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def test_main():
assert django_pony_apple # use your library here
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self._wrapped_model = sklearn.neighbors.KNeighborsClassifier(
**self._hyperparams)
def predict(self, X):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
starttime=float(currenttime)
starttime=round(starttime, 2)
f = open( filename, 'a' )
f.write("{} {}".format(0,sig_str)+'\n')
else:
elapsedtime=float(currenttime)-float(starttime)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if type(y) != np.ndarray:
raise Exception("y should be numpy array")
predictions = []
for i, labels in enumerate(y):
index = np.where(labels == 1)[0]
if len(index) == 1:
# was labeled before
predictions.append(index[0])
else:
# use label with highest score
| ise-uiuc/Magicoder-OSS-Instruct-75K |
): STM<R, E, Either<B, A>> {
return self.foldSTM(
(either) => either.fold((b) => STM.succeedNow(Either.left(b)), STM.failNow),
(a) => STM.succeedNow(Either.right(a))
)
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
center_name = project.center_name
else:
center_name = api_study.get("center_name")
defaults = {
"centre_name": center_name,
"is_public": is_public,
"study_abstract": utils.sanitise_string(api_study.get("description")),
"study_name": utils.sanitise_string(api_study.get("study_title")),
"study_status": "FINISHED",
"data_origination": data_origination,
# README: We want to draw attention to updated studies,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
n_pc = (1 - self.c_c) * self._pc + h_t * self.l_m / self._sigma_t * base_deta
#update cov
n_cov = (1 - self.c_cov) * self._cov + self.c_cov / self.l_e * self._pc * self._pc \
+ self.c_cov * (1 - 1/self.l_e) / self._sigma_t / self._sigma_t * deta_base_sq
self._base_weights = new_base
self._evolution_pool.clear()
self._cov = numpy.clip(n_cov, self.min_cov, 1.0)
self._sigma_t = numpy.clip(n_sigma_t, self.min_step_size, self.max_step_size)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# TODO: Integrate Tom's script for dependency graphing OO
# TODO: Common Sql Functions added to the SQL paramter
# TODO: Common html Functions added to the html paramter
# TODO: Manifest
# TODO: contants
# TODO: locale
# TODO: slots / performance optimizaiton
# TODO: Interactive CLI
# TODO: Update LKML to support new filters syntax
# TODO: additional documentation
# Finish Documenting every funtion for the autodocs
| ise-uiuc/Magicoder-OSS-Instruct-75K |
const getUrlDockerTutorial: TFunc = async () =>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
print('END')
print('*' * 40, '\n:Enquanto não for digitado ZERO(0), conte quantos números são pares e ímpares, e informe no final.')
n = 1
par = impar = 0
while n != 0:
n = int(input('Digite um valor: '))
if n != 0:
if n % 2 == 0:
par += 1
else:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
byte[] array = new byte[enBytes.Length];
| ise-uiuc/Magicoder-OSS-Instruct-75K |
param = {
'port' : '/dev/ttyUSB0',
'baudrate' : 115200,
'step_per_rev' : 4000,
}
dev = RockaflyGrbl(param)
print('pos: {}'.format(dev.position))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
index2label_map[i] = label
print("index2label_map:", index2label_map)
real_label_dict = get_real_label(real_file)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
SERVER_IP=$(cat vm.config.yaml | grep " server" | cut -d " " -f 4)
rm -rf kube.config
vagrant ssh k3os-server -c "cat /etc/rancher/k3s/k3s.yaml | sed -e 's/127.0.0.1/${SERVER_IP}/g'" | tail -n 19 > kube.config
| ise-uiuc/Magicoder-OSS-Instruct-75K |
'order_rate_over_time'
]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def rotate(num):
s = str(num)
l = len(s)
rot = set()
for i in range (l):
s = s[1:] + s[0]
if num > 9 and int(s[-1]) in [2, 4, 5, 6, 8, 0]:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
local_template_path = filename
| ise-uiuc/Magicoder-OSS-Instruct-75K |
pub const MIME_TYPE_JP2: &str = "image/jp2";
pub const MIME_TYPE_URI: &str = "text/x-uri";
pub const MIME_TYPE_UNIQUE_ID: &str = "application/x-cairo.uuid";
pub const MIME_TYPE_JBIG2: &str = "application/x-cairo.jbig2";
pub const MIME_TYPE_JBIG2_GLOBAL: &str = "application/x-cairo.jbig2-global";
pub const MIME_TYPE_JBIG2_GLOBAL_ID: &str = "application/x-cairo.jbig2-global-id";
pub const MIME_TYPE_CCITT_FAX: &str = "image/g3fax";
pub const MIME_TYPE_CCITT_FAX_PARAMS: &str = "application/x-cairo.ccitt.params";
pub const MIME_TYPE_EPS: &str = "application/postscript";
pub const MIME_TYPE_EPS_PARAMS: &str = "application/x-cairo.eps.params";
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import setuptools
__name__ == "__main__" and setuptools.setup(
use_scm_version=True, setup_requires=["setuptools-scm"]
)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# ==================
# ThingSpeak example
# ==================
import network
def datacb(msg):
print("[{}] Data arrived from topic: {}, Message:\n".format(msg[0], msg[1]), msg[2])
thing = network.mqtt("thingspeak", "mqtt://mqtt.thingspeak.com", user="anyName", password="<PASSWORD>", cleansession=True, data_cb=datacb)
# or secure connection
#thing = network.mqtt("thingspeak", "mqtts://mqtt.thingspeak.com", user="anyName", password="<PASSWORD>", cleansession=True, data_cb=datacb)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if socks.get(backend) == zmq.POLLIN:
message = backend.recv_multipart()
frontend.send_multipart(message) | ise-uiuc/Magicoder-OSS-Instruct-75K |
else {
if (post_)
os << *expr_ << *op_;
else
os << *op_ << *expr_;
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def import_account(filename, ynab):
# Skipping first lines with unneeded information
with open(filename, newline="", encoding="ISO-8859-15") as f:
bank_file = f.readlines()[12:]
for record in csv.DictReader(bank_file, dialect=Dialect):
# Skipping last lines "Anfangssaldo" and "Endsaldo"
if (
| ise-uiuc/Magicoder-OSS-Instruct-75K |
protected override void OnStopPattern()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
func targetsBrowser(_ targetsBrowser: RecipeCastingTargetsBrowser, updated suggestedTarget: RecipeCastingTarget?) {
DispatchQueue.main.async {
self.updateSuggestedDeviceButton()
}
}
func targetsBrowser(_ targetsBrowser: RecipeCastingTargetsBrowser, found targets: [RecipeCastingTarget]) {
//nothing to do
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return True
return False
# Convert to 3D track
def to3D(self, current_time:float):
first = min(self.history.keys())
dt = current_time - self.times[first]
assert dt > 0
xf, yf, wf, hf = self.history[first][0:4]
xn, yn, wn, hn = self.filter.x[0:4]
aabb_first = to_aabb(xf, yf, wf, hf)
aabb_now = to_aabb(xn, yn, wn, hn)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Circularly shift the OTF so that PSF center is at (0,0)
#shift = -(psfSize / 2)
#psf = circshift(psf, shift)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#!/bin/bash
function usage(){
echo "usage: ${0##*/} [+-u uid] [+-g gid] [+-d home] [+-c cmd] [+-h} [--] <username> <groupname>"
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from pyutilx.utils import *
| ise-uiuc/Magicoder-OSS-Instruct-75K |
export { default as FilledQueryBuilder } from './Icon';
| ise-uiuc/Magicoder-OSS-Instruct-75K |
this.serviceSalvar.mudarAviso(true);
this.cadastro.atendido = this.nome.toUpperCase();
this.cadastro.numero = this.cadastro.numero.split('/').join('').split('.').join('').split('-').join('');
this.salvarservice.salvarCadastro(this.cadastro).subscribe(data => {
this.serviceSalvar.mudarAviso(true);
this.serviceSalvar.currentMessage.subscribe(msg => {
console.log(msg);
});
this.openSnackBarSalvar();
this.cadastroservice.getCadastro(this.cadastro);
this.reset();
| ise-uiuc/Magicoder-OSS-Instruct-75K |
cri:
name: containerd
maximum: 1
minimum: 1
maxSurge: 1
maxUnavailable: 0
EOF
) \
-shoot-template-path=<(cat <<EOF
| ise-uiuc/Magicoder-OSS-Instruct-75K |
f.write('\n'.join(lines) + '\n')
return checksum_file
if __name__ == '__main__':
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
float sin, cos;
Math::GetSinCos(sin, cos, Rotation);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
StreetNumber = WordMother.Random(),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
//
// Created by hferrone on 10/24/2017.
// Copyright (c) 2017 hferrone. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
readonly float weight;
int vertexCount;
public SuperSampler(Game game, int sx, int sy)
{
// Compute the alpha weight of the textures
weight = 1f / (sx * sy);
// Load the effect
supersamplingEffect = game.Content.Load<Effect>("Supersampling");
| ise-uiuc/Magicoder-OSS-Instruct-75K |
alias ${i}="${lazy_func} ${i}"
done
eval "
function ${lazy_func}() {
unset -f ${lazy_func}
lazy_load_clean $@
eval ${load_func}
unset -f ${load_func}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
elif absoluteDistX > absoluteDistY and distX != 0:
return Point(distX // absoluteDistX, 0)
else:
print("[MapHelper.getMoveTowards] You are already at the given position.")
return Point(0, 0)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
name="VCF Handler API",
)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
y_positions,y_daily,likelihoods,nu,eta)
elif move_type == "shift":
accept, tau[i,c], ell[i,c], y_positions, likelihoods = cps_circle.propose_shift_changepoint(tau[i-1,c],\
y_positions,y_daily,likelihoods,nu,eta)
## Allocation to the bins
Nz = len(y_daily)
if Nz == 0:
Nj = np.repeat(0,ell[i,c])
else:
y_positions = np.searchsorted(y_daily,tau[i,c])
Nj = np.insert(np.diff(y_positions),0,y_positions[0]+Nz-y_positions[ell[i,c]-1])
bin_pos = np.searchsorted(tau[i,c],y)
bin_pos[bin_pos==len(tau[i,c])] = 0
## Evaluate the segment means
if i > burnin:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import javax.servlet.http.HttpServletRequest;
public interface CsrfDetectionFilter extends Filter {
boolean hasCsrf(HttpServletRequest request);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
TEditMetadata *EditMetadata;
//---------------------------------------------------------------------------
__fastcall TEditMetadata::TEditMetadata(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
| ise-uiuc/Magicoder-OSS-Instruct-75K |
///
pub trait Pass {
///
fn needed_features() -> wgpu::Features {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.right = None
| ise-uiuc/Magicoder-OSS-Instruct-75K |
declare namespace JSX {
interface IntrinsicAttributes {
[event: string]: any
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
ex = ex.InnerException;
}
return ex;
}
}
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
from django.urls import include, path
# Django REST Framework
from rest_framework.routers import DefaultRouter
# Views
from .views import tasks as task_views
router = DefaultRouter()
router.register(r'tasks', task_views.TaskViewSet, basename='task')
urlpatterns = [
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#SBATCH -o 2018-06-29-nyc-metaphlan.out
#SBATCH -e 2018-06-29-nyc-metaphlan.err
#SBATCH --mail-type=END
#SBATCH --mail-user=<EMAIL>
#SBATCH --constraint="scratch2"
#SBATCH --array=0-1381
module load gcc/6.2.0
module load bowtie2/2.2.9
| ise-uiuc/Magicoder-OSS-Instruct-75K |
])
def test_coverage_thresholds(local_models, should_succeed, expected_message, **kwargs):
mock_get_models_requiring_annotations = kwargs['get_models_requiring_annotations']
mock_get_models_requiring_annotations.return_value = (
set(local_models),
set(),
len(local_models),
[DjangoSearch.get_model_id(m) for m in local_models]
)
result = call_script_isolated(
['django_find_annotations', '--config_file', 'test_config.yml', '--coverage', '-vvv'],
)
assert result.exit_code == EXIT_CODE_SUCCESS if should_succeed else EXIT_CODE_FAILURE
| ise-uiuc/Magicoder-OSS-Instruct-75K |
message.AppendParameter(4, true);
message.AppendParameter(AllowUppercut ? ((int)PriceUppercut) : -1, true);
message.AppendParameter(AllowUppercut, false);
message.AppendParameter(5, true);
message.AppendParameter(AllowCoconut ? ((int)PriceCoconut) : -1, true);
message.AppendParameter(AllowCoconut, false);
return message;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Self::UnexpectedToken(unexpected, None, msg) if msg.is_empty() => write!(
f,
"Error: Unexpected token \"{}\" at {}",
unexpected.lexeme, unexpected.pos
),
Self::UnexpectedToken(token, _, msg) => {
write!(f, "Error \"{}\": {} at {}", token.lexeme, msg, token.pos)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import pdb
SIGNING_SECRET_SECRET=b'abc123'
#SIGNING_SECRET_SECRET = b'<KEY> #dont get excited, its from the docs
BODY = '{"start": "2021-07-25T10:00:00", "end": "2021-07-25T11:00:00"}'.encode()
TIMESTAMP = '2021-07-25T10:00:00Z'.encode()
SIGNATURE = 'tRDSF7URY8BLCDlaBcQ7FHu051Zk+aAB0NKMP53teMw='.encode()
def getdigest(secret=SIGNING_SECRET_SECRET, body=BODY, timestamp=TIMESTAMP):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
set -q message[1]
and set message -m $message
git add .;git commit $message;git push;
end
funcsave lazygit
| ise-uiuc/Magicoder-OSS-Instruct-75K |
})?;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
attribute.Example.Should().Be(example);
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
.get("/engagements/categories/suggest")
.then()
.statusCode(200)
.body("size()", equalTo(3))
.body("[0]", equalTo("autosuggest"));
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
return JavascriptSIMDUint8x16::New(&value, requestContext);
}
const char16* JavascriptSIMDUint8x16::GetFullBuiltinName(char16** aBuffer, const char16* name)
{
Assert(aBuffer && *aBuffer);
swprintf_s(*aBuffer, SIMD_STRING_BUFFER_MAX, _u("SIMD.Uint8x16.%s"), name);
return *aBuffer;
}
Var JavascriptSIMDUint8x16::Copy(ScriptContext* requestContext)
{
return JavascriptSIMDUint8x16::New(&this->value, requestContext);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def initialize(self):
# check communication.
output = utils.__execute__(command=["ssh-add", "-l"])
#print("DEBUG; initialize output ssh-add -l:",output)
if "Failed to communicate" in output or "Error connecting to agent" in output:
if not self.delete()["success"]:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<filename>src/components/features/Extensible.tsx
import React, { FC } from "react";
import Feature, { FeatureProps } from "./Feature";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import TextColumn from "./TextColumn";
import ImageColumn from "./ImageColumn";
| ise-uiuc/Magicoder-OSS-Instruct-75K |
./send_command.py characters "c" 0
./send_command.py movecursor 20 0
./send_command.py characters "d" 0
./send_command.py return 50
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Y=Y_nondominated,
menu_size=effective_menu_size,
)
elif algo == "EI-UU":
| ise-uiuc/Magicoder-OSS-Instruct-75K |
echo "output dir: $1";
for i in $1/*.nii*; do nii2mnc -short $i `echo $i | cut -d "." -f1`.mnc; done
#for i in $1/*.nii*; do echo `echo $i | cut -d "." -f1`.mnc; done
| ise-uiuc/Magicoder-OSS-Instruct-75K |
assert(rhs_dim == 1 || rhs_dim == lhs_dim);
result_shape.dim(i) = lhs_dim;
}
}
return result_shape;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def my_smooth(x, N):
arrays = []
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#
# Run each of the binaries with default NPROMA and validate exit codes
#
for target in $(ls bin)
do
# Skip some targets
if [[ " ${skipped_targets[*]} " =~ " $target " ]]
then
continue
fi
if [[ "$mpi_flag" == "--with-mpi" && ! " ${non_mpi_targets[*]} " =~ " $target " ]]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
fn build_data(self) -> Self::Builder {
self
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
true,
false,
0.187182,
"dakjdh98389\000",
null,
(object)array(1,2,3),
);
error_reporting(0);
foreach ($datas as $data) {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
n = TreeCanvasNode("test",c)
n.setColor(Qt.red)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
checkVlan(vlanId1);
checkVlan(vlanId2);
EXPECT_NE(vlanId1, vlanId2);
VlanApiParameters::MemberAttributes::VlanId vlanIdAttribute{vlanId2};
VlanApiParameters::MemberAttributes::BridgePortId bridgePortIdAttribute{0};
auto vlanMemberId =
vlanApi->createMember({vlanIdAttribute, bridgePortIdAttribute}, 0);
checkVlanMember(vlanId2, vlanMemberId);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
package com.wildbeeslabs.sensiblemetrics.diffy.validator.digits.impl;
import com.wildbeeslabs.sensiblemetrics.diffy.processor.digits.impl.ISBN10DigitProcessor;
import com.wildbeeslabs.sensiblemetrics.diffy.validator.digits.iface.DigitValidator;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
/**
* Modulus 11 <b>ISBN-10</b> Check Digit calculation/validation.
* <p>
* ISBN-10 Numbers are a numeric code except for the last (check) digit
| ise-uiuc/Magicoder-OSS-Instruct-75K |
outputDto = ((IndexConfigMessage.IndexConfigDto.Output) outputDto).toBuilder();
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
assert len(props) == 2
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from ..utils import SiteManager
class StatusCommand(Command):
"""
Retrieve the work order status
"""
def setup(self, subparsers):
parser = super(StatusCommand, self).setup(subparsers)
parser.add_argument('-u', "--api_url", required=True, type=str, help="url of your Customer api")
parser.add_argument('-i', '--work_order_id', required=True, type=str, help="Work order id")
return parser
def run(self, api_url, work_order_id, **kwargs):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
underlyingTemp = Contract.from_abi("underlyingTemp", l[1], TestToken.abi)
if (l[1] == "0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2"):
globals()["MKR"] = underlyingTemp # MRK has some fun symbol()
else:
globals()[underlyingTemp.symbol()] = underlyingTemp
CHI = Contract.from_abi("CHI", "0x0000000000004946c0e9F43F4Dee607b0eF1fA1c", TestToken.abi)
STAKING = Contract.from_abi("STAKING", "0xe95Ebce2B02Ee07dEF5Ed6B53289801F7Fc137A4", StakingV1_1.abi)
vBZRX = Contract.from_abi("vBZRX", "0xB72B31907C1C95F3650b64b2469e08EdACeE5e8F", BZRXVestingToken.abi)
POOL3 = Contract.from_abi("CURVE3CRV", "0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490", TestToken.abi)
BPT = Contract.from_abi("BPT", "0xe26A220a341EAca116bDa64cF9D5638A935ae629", TestToken.abi)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import time
from . import adb
def clear_notifications():
"""Clear all pending notifications."""
adb.run_shell_command(['service', 'call', 'notification', '1'])
def unlock_screen():
"""Unlocks the screen if it is locked."""
window_dump_output = adb.run_shell_command(['dumpsys', 'window'])
if 'mShowingLockscreen=true' not in window_dump_output:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
mask = (query_vector > 1e-8).to(torch.bool)
word_occ = (self._dataset.word_count > 0).to(torch.bool)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
excitedPopulation = lambda t: 0.5*np.exp(-(0.00001*(decayRateSM+1)*2+1j)*50*t)
populations = {'excitedAnalytical':[], 'excitedNumerical':[]}
# this is used as the calculate attribute of the qubit, and the singleQubit fixture evolve method calls this at every
# step of the evolution. It stores both numerical and analytical excited state populations into the dictionary above.
def singleQubitDecayCalculate(qub, state, i):
populations['excitedAnalytical'].append(excitedPopulation(i*qub.stepSize))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
host = '192.168.4.254'
port = 12345
addr = (host, port)
c = socket.socket(type=socket.SOCK_DGRAM)
c.sendto(b'hello world!\r\n', addr)
data = c.recvfrom(1024)[0]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
let fclone = f.clone();
let sclone = sender.clone();
| ise-uiuc/Magicoder-OSS-Instruct-75K |
res = sorted(subclass_map.items(), key=operator.itemgetter(1))
return res[-1]
@staticmethod
def get_subclass(module, base_class):
good_results = []
for name in dir(module):
obj = getattr(module, name)
if name == base_class.__name__:
continue
try:
if issubclass(obj, base_class):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
namespace Magnum { namespace Trade { namespace Test { namespace {
struct StanfordImporterTest: TestSuite::Tester {
explicit StanfordImporterTest();
void invalidSignature();
void formatInvalid();
void formatUnsupported();
void formatMissing();
void formatTooLate();
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"""Compute the equilbrium speed of sound for a gas
:param <cantera.composite.Solution> gas: Solution object
:return <float> Gas speed of sound w/ an equilibrium composition (m/s)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.