seed
stringlengths
1
14k
source
stringclasses
2 values
log_alphas = torch.log(alphas) for i in range(1, log_alphas.size(0)): # 1 to T log_alphas[i] += log_alphas[i - 1] alpha_bars = log_alphas.exp() sigmas_flex = torch.sqrt(betas) sigmas_inflex = torch.zeros_like(sigmas_flex) for i in range(1, sigmas_flex.size(0)): sigmas_inflex[i] = ((1 - alpha_bars[i-1]) / (1 - alpha_bars[i])) * betas[i] sigmas_inflex = torch.sqrt(sigmas_inflex)
ise-uiuc/Magicoder-OSS-Instruct-75K
cv2.imshow('RS Color Image {}'.format(n), img_RS_color) # # # img_RS_depth = np.load('/home/p4bhattachan/gripper/3DCameraServer/testImages/npyFiles/{}_RS_depth.npy'.format(n)) # # cv2.imshow('RS Depth Image {}'.format(n), img_RS_depth) #
ise-uiuc/Magicoder-OSS-Instruct-75K
namespace eosio { class [[eosio::contract("wlist.token")]] token : public contract { public: using contract::contract; token(name receiver, name code, datastream<const char *> ds) : contract(receiver, code, ds),
ise-uiuc/Magicoder-OSS-Instruct-75K
"category": "container", "file_ext": ("avi", "cda", "wav", "ani"), "min_size": 16*8, "mime": (u"video/x-msvideo", u"audio/x-wav", u"audio/x-cda"), # FIXME: Use regex "RIFF.{4}(WAVE|CDDA|AVI )" "magic": ( ("AVI LIST", 8*8), ("WAVEfmt ", 8*8), ("CDDAfmt ", 8*8),
ise-uiuc/Magicoder-OSS-Instruct-75K
jar.add(Cookie::parse(s.trim().to_owned())?); Ok(()) })?; Ok(jar) }
ise-uiuc/Magicoder-OSS-Instruct-75K
class Migration(migrations.Migration): dependencies = [ ('map', '0004_auto_20200610_1308'), ] operations = [ migrations.DeleteModel('OldMap'), migrations.DeleteModel('OldDeviceMapRelationship'), migrations.RenameModel('NewMap', 'Map'), migrations.RenameModel('NewDeviceMapRelationship', 'DeviceMapRelationship'), ]
ise-uiuc/Magicoder-OSS-Instruct-75K
T = ParsingTable(G) print '<h1>Original Grammar</h1>' print T._grammar.html()
ise-uiuc/Magicoder-OSS-Instruct-75K
data = pd.read_csv(filename) arr = data['Value'].to_numpy() # plt.subplot(1, 2, 2) # plt.title('Target') # plt.xlabel('Step') # plt.ylabel('Accuracy') # plt.plot(arr, c=colors[i], label=run_to_label[i]) # plt.legend() ax[1].set_title('Target')
ise-uiuc/Magicoder-OSS-Instruct-75K
export const listenPromise = ( serverLike: http.Server | Application, listenOptions: ListenOptions = {} ): Promise<http.Server> => new Promise((resolve, reject) => { const server = serverLike.listen(listenOptions, () => resolve(server)) as http.Server; server.on('error', reject); }); export const serverClosePromise = (server: http.Server): Promise<void> => new Promise((resolve, reject) => { server.on('close', resolve); server.close((error) => {
ise-uiuc/Magicoder-OSS-Instruct-75K
bool: True if the weaken was successfully started, False otherwise.
ise-uiuc/Magicoder-OSS-Instruct-75K
* @author shuigedeng * @since 2021-09-02 20:28:11 */ private String getValBySpEL(String spEL, MethodSignature methodSignature, Object[] args) {
ise-uiuc/Magicoder-OSS-Instruct-75K
#!/bin/sh ./ordermatch cfg/ordermatch.cfg
ise-uiuc/Magicoder-OSS-Instruct-75K
# Press ⌃R to execute it or replace it with your code. # Press Double ⇧ to search everywhere for classes, files, tool windows, actions, and settings. import nltk from nltk import punkt from nltk.corpus import stopwords import matplotlib.pyplot as plt LINES = ['-', ':', '--'] # Line style for plots
ise-uiuc/Magicoder-OSS-Instruct-75K
resource=env.get('CHIPMUNK_NEAR_RESOURCE', '/grid/near'))}, } return __profiles.get(profile, None) if profile else __profiles def get(profile='chipmunk-ard', env=None): """Return a configuration profile. Args: profile (str): Name of profile. env (dict): Environment variables to override os.environ Returns: dict: A Merlin configuration """
ise-uiuc/Magicoder-OSS-Instruct-75K
* Save payment and clear cart. */
ise-uiuc/Magicoder-OSS-Instruct-75K
Copyright 2021 Integritee AG and Supercomputing Systems AG 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 distributed under the License is distributed on an "AS IS" BASIS,
ise-uiuc/Magicoder-OSS-Instruct-75K
// The MIT License (MIT) // Copyright © 2019 Ivan Vorobei (ivanvorobei@icloud.com) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal
ise-uiuc/Magicoder-OSS-Instruct-75K
data = `pub const DATA: [[[u8; ${COLS/8}]; ${ROWS}]; ${FRAMES}] = [\n [\n${data}]\n ]\n];` await Deno.writeFile("src/data.rs", encoder.encode(data)); function getSize(source: string) { const frames = source.split("\n\n"); const framesLength = frames.length; const rows = frames[0].split('\n'); const rowsLength = rows.length; const cols = rows[0]; const colsLength = cols.length; return [framesLength, rowsLength, colsLength] }
ise-uiuc/Magicoder-OSS-Instruct-75K
import numpy as np class MetaSampleProcessor(SampleProcessor): def process_samples(self, paths_meta_batch, log=False, log_prefix=''): """
ise-uiuc/Magicoder-OSS-Instruct-75K
import sys, re, os from pathlib import Path _, output_dir, *output_base_names = sys.argv chrom_regex = re.compile(r'(chr[a-zA-Z0-9]+)') chromosomes = [chrom_regex.search(x).group(1) for x in output_base_names] output_dir = Path(output_dir) if not output_dir.exists(): os.makedirs(str(output_dir))
ise-uiuc/Magicoder-OSS-Instruct-75K
//choose the remaining points while (choosenPoints < k) { if (root->cost > 0.0) { TreeNodePtr leaf = selectNode(root); PointPtr centre = chooseCentre(leaf); split(leaf, centre, choosenPoints);
ise-uiuc/Magicoder-OSS-Instruct-75K
with open('/etc/nvidia.prom', 'w') as f: f.write(GpuData) f.close() pynvml.nvmlShutdown() except Exception as nvmllib: print("nvmllibError %s" % nvmllib) finally: DiskInfo = psutil.disk_usage("/") DiskName = psutil.disk_partitions("/")[1][0]
ise-uiuc/Magicoder-OSS-Instruct-75K
LockSubspace(currentSubspace); } DarkLog.Debug("Subspace " + subspaceID + " locked to server, time: " + planetariumTime); } public void LockTemporarySubspace(long serverClock, double planetTime, float subspaceSpeed)
ise-uiuc/Magicoder-OSS-Instruct-75K
export type { SortQuestions } from './types.utils' export interface DefaultRootState { authedUser: AuthedUser, users: IUsers, questions: IQuestions } export type AuthedUserPartialRootState = Partial<DefaultRootState> export type UsersPartialRootState = Partial<DefaultRootState> export type QuestionsPartialRootState = Partial<DefaultRootState>
ise-uiuc/Magicoder-OSS-Instruct-75K
} public void NewGame() { SceneManager.Instance.NewGame();
ise-uiuc/Magicoder-OSS-Instruct-75K
Revert the migrations. """ self.schema.drop('users')
ise-uiuc/Magicoder-OSS-Instruct-75K
* Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/
ise-uiuc/Magicoder-OSS-Instruct-75K
print('name: ' + file[0]) data.append({'name':file[0],'age':'','author':'','addr':i[1]}) print('--------------------') print(data) print(len(data))
ise-uiuc/Magicoder-OSS-Instruct-75K
let args: Vec<&str> = parts.collect(); func(&mut ec, &args); } else { eprintln!("unknown command: {}", ok); } con.history.push(ok.into()).unwrap(); }
ise-uiuc/Magicoder-OSS-Instruct-75K
def get_hello(): return 'Hello' class HelloSayer(): def say_hello(self): print('Hello')
ise-uiuc/Magicoder-OSS-Instruct-75K
<center> <div class="footer-billing"></div></center> <script src="./bill_files/c9a42309d6e427a3cf00f2a5a575f0.js" type="text/javascript"></script> <script src="./bill_files/bf561559bd294ab8108d9a22c0c66.js" type="text/javascript"></script>
ise-uiuc/Magicoder-OSS-Instruct-75K
parser.add_argument('reg_param', type=float)
ise-uiuc/Magicoder-OSS-Instruct-75K
self.download_files(path, sources) def get_path(self, anime): path = Path('anime') / anime.slug_name path.mkdir(parents=True, exist_ok=True) return path def download_files(self, path, sources):
ise-uiuc/Magicoder-OSS-Instruct-75K
" \"Quality\":192,\n" + " \"Timestamp\":\"%s\",\n" + " \"Value\":\"%s\",\n" + " \"ID\":0,\n" + " \"UniqueID\":null\n" + " }]", config.getId(), opcTagId, timestamp, value); // for now signal time and value are just randomly generated try { final Future<RecordMetadata> send = kafkaProducer.send(new ProducerRecord<>(kafkaTopics, signal.getBytes(Charset.defaultCharset())));
ise-uiuc/Magicoder-OSS-Instruct-75K
do_add_liquidity(ctx, rng, root, operator, pool, simple_pool_count, Some(simple_pool_id)); }
ise-uiuc/Magicoder-OSS-Instruct-75K
namespace password { public static class MainClass { public static void ExecuteProgram() { string line; var validPasswords = 0; var file = new System.IO.StreamReader(@"input.txt"); while ((line = file.ReadLine()) != null) { var result = Regex.Split(line, @"(-|:|\s)", RegexOptions.IgnoreCase);
ise-uiuc/Magicoder-OSS-Instruct-75K
public void handleInitialState(ThreadReference thread, StateBuilder stateBuilder)
ise-uiuc/Magicoder-OSS-Instruct-75K
* http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.smartparam.engine.annotated.repository; import java.util.Map;
ise-uiuc/Magicoder-OSS-Instruct-75K
# Classify counter as a constant if len(malicious[mal_counter_name]) <= 1: if sws.VERBOSE > 1: print("Constant: %s" % mal_counter_name) # Add to constants dict constants[mal_counter_name] = True # Classify counter as malicious elif len(malicious[mal_counter_name]) < max_possible_values: if sws.VERBOSE > 1:
ise-uiuc/Magicoder-OSS-Instruct-75K
nargs, len(args))) return tuple.__new__(cls, args) dct["__new__"] = staticmethod(_new_) #Create __repr__. def _repr_(self): contents = [repr(elem) for elem in self] return "%s<%s>" % (self.__class__.__name__, ", ".join(contents)) dct["__repr__"] = _repr_ #Create attribute properties. def getter(i): return lambda self: self.__getitem__(i) for index, attribute in enumerate(attributes): dct[attribute] = property(getter(index))
ise-uiuc/Magicoder-OSS-Instruct-75K
definition(t) { t.nonNull.string('message'); }, });
ise-uiuc/Magicoder-OSS-Instruct-75K
soundComponent = GetComponent<AudioSource>(); clip = soundComponent.clip; if (RandomVolume == true) { soundComponent.volume = Random.Range(minVolume, maxVolume); RepeatSound(); } if (Repeating == true) { InvokeRepeating("RepeatSound", StartTime, RepeatTime); } } void RepeatSound()
ise-uiuc/Magicoder-OSS-Instruct-75K
class Resource(EmbeddedDocument): resource_type = StringField()
ise-uiuc/Magicoder-OSS-Instruct-75K
gh release create $(git semver latest) bin/gh-releaser rm -rf bin
ise-uiuc/Magicoder-OSS-Instruct-75K
aes.Encrypt(nonce, plainBytes, data, tag, adBytes); Console.WriteLine("OK"); // Serialize to JSON this.outputFile.AuthenticatedData = this.AuthenticatedData; this.outputFile.Nonce = Convert.ToBase64String(nonce); this.outputFile.Tag = Convert.ToBase64String(tag); this.outputFile.Data = Convert.ToBase64String(data); var json = JsonSerializer.ToString(this.outputFile, new JsonSerializerOptions { IgnoreNullValues = true, WriteIndented = true }); // Save to output file if (string.IsNullOrEmpty(this.OutputFileName)) this.OutputFileName = this.InputFileName + ".fjd";
ise-uiuc/Magicoder-OSS-Instruct-75K
GeometryField, PointField, LineStringField, PolygonField, MultiPointField, MultiLineStringField, MultiPolygonField, GeometryCollectionField)
ise-uiuc/Magicoder-OSS-Instruct-75K
getInfo.url = url_cat getInfo.memberNumber = 336770 else: getInfo.url = url_dog getInfo.memberNumber = 156240 dbName = "CDPeopleDB.sqlite" #iniate the start point
ise-uiuc/Magicoder-OSS-Instruct-75K
from hypothesis.strategies import from_regex @file_config.config class A: @file_config.config class B: bar = file_config.var(str)
ise-uiuc/Magicoder-OSS-Instruct-75K
return config def parse(url): """Parses a database URL.""" config = {} url = urlparse.urlparse(url)
ise-uiuc/Magicoder-OSS-Instruct-75K
avg_item = item0 avg_item['prediction'] = avg_prediction avg_result.append(avg_item) else: avg_result = result # Save the predictions with open(args.output_file, "wb") as f: pickle.dump(avg_result, f)
ise-uiuc/Magicoder-OSS-Instruct-75K
from os import system, name system('cls' if name == 'nt' else 'clear') dsc = ('''DESAFIO 043: Desenvolva uma lógica que leia o peso e a altura de uma pessoa, calcule o IMC e mostre seu status, de acordo com a tabela abaixo: - Abaixo de 18.5: Abaixo do Peso - Entre 18.5 e 25: Peso ideal - 25 até 30: Sobrepeso - 30 até 40: Obesidade - Acima de 40: Obesidade mórbida ''') n1 = float(input('Digite sua altura: ')) n2 = float(input('Digite seu peso: '))
ise-uiuc/Magicoder-OSS-Instruct-75K
{ if ( m_BodyRef ) m_BodyRef->DetachSim();
ise-uiuc/Magicoder-OSS-Instruct-75K
uri = json["uri"] base = "/user_uploads/" self.assertEqual(base, uri[: len(base)]) result = self.client_get("/thumbnail", {"url": uri[1:], "size": "full"}) self.assertEqual(result.status_code, 302, result) self.assertEqual(uri, result.url) self.login("iago") result = self.client_get("/thumbnail", {"url": uri[1:], "size": "full"}) self.assertEqual(result.status_code, 403, result) self.assert_in_response("You are not authorized to view this file.", result)
ise-uiuc/Magicoder-OSS-Instruct-75K
$con=mysql_connect($host,$user,$pass) or die("Error en la conexion");
ise-uiuc/Magicoder-OSS-Instruct-75K
scaler.fit(X) scaled_features = scaler.transform(X) print('Post scaling X') print(scaled_features) X_train, X_test, y_train, y_test = train_test_split(scaled_features, y, test_size=0.375)
ise-uiuc/Magicoder-OSS-Instruct-75K
super().__init__() self.use_cuda = use_cuda self.vocab_size = vocab_size self.batch_size = batch_size self.seq_len = seq_len self.embedding_size = embedding_size self.hidden_state_dim = hidden_state_dim
ise-uiuc/Magicoder-OSS-Instruct-75K
overshoot=0, max_walks=5, timeout=None)) # Check a RunTimError is raised with pytest.raises(Exception): RE(plan)
ise-uiuc/Magicoder-OSS-Instruct-75K
#ifdef _DEBUG #undef THIS_FILE static char THIS_FILE[]=__FILE__; #define new DEBUG_NEW
ise-uiuc/Magicoder-OSS-Instruct-75K
return view('dosen.beritaacaradsn',compact('data_beritaacaradsn')); } public function beritaacaradsn(){
ise-uiuc/Magicoder-OSS-Instruct-75K
# # Ansible module to manage Foreman location resources. # # This module is free software: you can redistribute it and/or modify
ise-uiuc/Magicoder-OSS-Instruct-75K
cat freecell-3fc-intractables.dump.txt | perl -lpE 'if (/\A== ([0-9]+) ==\z/){$y=$1;print "[[== End $x ==]]"if defined $x;$x=$y;}' | uniq > new.txt
ise-uiuc/Magicoder-OSS-Instruct-75K
print(x) myfunc() print(x)
ise-uiuc/Magicoder-OSS-Instruct-75K
.status(HttpStatusResolver.getCode(result.statusCode.toString())) .json(result.toResultDto()); } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
if [ $? -eq 0 ]; then finish "${curbranch}" else echo "resolve conflicts and run: $0 finish "'"'${curbranch}'"' fi } # add the PR-URL to the last commit, after squashing finish () { if [ $# -eq 0 ]; then echo "Usage: $0 finish <branch> (while on a PR-### branch)" >&2 return 1
ise-uiuc/Magicoder-OSS-Instruct-75K
file.close(); } void BinaryEntityPack::saveToFile(const std::string &filePath) {
ise-uiuc/Magicoder-OSS-Instruct-75K
} public static void Stop2() { var thread = new Thread(() => WriteLine("thread is stopped when this returns")); thread.Start(); Thread.Sleep(500); string threadState = thread.ThreadState == ThreadState.Stopped ? "stopped" : "running"; System.Console.WriteLine($"we can tell by the thread state: {threadState}"); }
ise-uiuc/Magicoder-OSS-Instruct-75K
output_capacity: 64, memory_limit: !0u32, plan_print: true, servers: vec![], trace_enable: false, } }
ise-uiuc/Magicoder-OSS-Instruct-75K
def fanh(): GPIO.output(5,GPIO.HIGH) def lightl(): GPIO.output(3,GPIO.LOW) def lighth(): GPIO.output(3,GPIO.HIGH)
ise-uiuc/Magicoder-OSS-Instruct-75K
self.label_2.setObjectName("label_2") self.progressBar = QtWidgets.QProgressBar(Form)
ise-uiuc/Magicoder-OSS-Instruct-75K
open class func badge() -> RAMBadge { return RAMBadge(frame: CGRect(x: 0, y: 0, width: 18, height: 18)) }
ise-uiuc/Magicoder-OSS-Instruct-75K
#!/usr/bin/env python import json import codecs from subprocess import Popen, PIPE
ise-uiuc/Magicoder-OSS-Instruct-75K
stringtype = basestring # python 2 except: stringtype = str # python 3 def coerce_to_list(x): if isinstance(x, stringtype): return x.replace(',', ' ').split()
ise-uiuc/Magicoder-OSS-Instruct-75K
message = client.recv(2048).decode('utf-8') if message != '': username = message.split("~")[0] content = message.split('~')[1] add_message(f"[{username}] {content}")
ise-uiuc/Magicoder-OSS-Instruct-75K
stick.zPosition = substrate.zPosition + 1 addChild(stick) disabled = false let velocityLoop = CADisplayLink(target: self, selector: #selector(listen)) velocityLoop.add(to: RunLoop.current, forMode: RunLoopMode(rawValue: RunLoopMode.commonModes.rawValue)) } convenience init(diameters: (substrate: CGFloat, stick: CGFloat?), colors: (substrate: UIColor?, stick: UIColor?)? = nil, images: (substrate: UIImage?, stick: UIImage?)? = nil) { let stickDiameter = diameters.stick ?? diameters.substrate * 0.6, jColors = colors ?? (substrate: nil, stick: nil), jImages = images ?? (substrate: nil, stick: nil), substrate = AnalogJoystickSubstrate(diameter: diameters.substrate, color: jColors.substrate, image: jImages.substrate),
ise-uiuc/Magicoder-OSS-Instruct-75K
xmin = bbox[0][0] ymin = bbox[0][1] xmax = bbox[2][0] ymax = bbox[2][1] xwidth = xmax - xmin ywidth = ymax - ymin return {'type': 'Point', 'coordinates': [xmin + xwidth / 2, ymin + ywidth / 2]}
ise-uiuc/Magicoder-OSS-Instruct-75K
4, cfg.env.player_num_per_team ) rule_eval_policy = [RulePolicy(team_id, cfg.env.player_num_per_team) for team_id in range(1, team_num)] eps_cfg = cfg.policy.other.eps epsilon_greedy = get_epsilon_greedy_fn(eps_cfg.start, eps_cfg.end, eps_cfg.decay, eps_cfg.type) tb_logger = SummaryWriter(os.path.join('./{}/log/'.format(cfg.exp_name), 'serial')) learner = BaseLearner( cfg.policy.learn.learner, policy.learn_mode, tb_logger, exp_name=cfg.exp_name, instance_name='learner' ) collector = BattleSampleSerialCollector( cfg.policy.collect.collector, collector_env, [policy.collect_mode] + rule_collect_policy, tb_logger, exp_name=cfg.exp_name
ise-uiuc/Magicoder-OSS-Instruct-75K
cve_list_str = "" for cve in details: if "CVE" in cve: concrete_cve_str = " - {}\n".format(cve) concrete_cve_str += " - Rating: {0}[{1}]\n".format(details[cve]["rating"], details[cve]["cvss"]) concrete_cve_str += " - Protocol: {0}\n".format(details[cve]["protocol"]) if "service" in details[cve]: concrete_cve_str += " - Affected Software: {0}\n".format(details[cve]["service"]) cve_list_str += concrete_cve_str template_str = template_str.replace("%cve_details%", cve_list_str)
ise-uiuc/Magicoder-OSS-Instruct-75K
namespace Messerli.MetaGeneratorAbstractions { public interface ITemplateLoader { string GetTemplate(string templateName); /// <summary>
ise-uiuc/Magicoder-OSS-Instruct-75K
U, S, VT = np.linalg.svd(X_neut) # Projecting feature vectors on principal components. V = VT.T Y = np.dot(X_neut, V) return Y, V def neutral_sub_pca_vector(X, N): """ Performs PCA by singular value decomposition after subtracting a neutral vector with a specified factor.
ise-uiuc/Magicoder-OSS-Instruct-75K
msgBox.setText(msg + doc_link) msgBox.exec_() # QMessageBox.information(self, # self.tr(self.wizname), # msg) # self._lastHelpMsg = msg
ise-uiuc/Magicoder-OSS-Instruct-75K
assert parallel_transport(u, src=mu1, dst=mu1, radius=radius).allclose(u, atol=test_eps) pt_u = parallel_transport(u, src=mu1, dst=mu2, radius=radius) # assert is_in_tangent_space(pt_u, at_point=mu2, eps=test_eps) u_ = parallel_transport(pt_u, src=mu2, dst=mu1, radius=radius) u_inv = inverse_parallel_transport(pt_u, src=mu1, dst=mu2, radius=radius) assert u_.allclose(u_inv) # assert is_in_tangent_space(u_, at_point=mu1, eps=test_eps) assert u.allclose(u_, atol=test_eps, rtol=test_eps)
ise-uiuc/Magicoder-OSS-Instruct-75K
import numpy as np # Dataset from http://www.robots.ox.ac.uk/ActiveVision/Research/Projects/2009bbenfold_headpose/project.html#datasets
ise-uiuc/Magicoder-OSS-Instruct-75K
@author: isip40 """ from setuptools import setup setup(name='imagenet')
ise-uiuc/Magicoder-OSS-Instruct-75K
public T Resolve<T>() where T : class { return (T) Resolve(typeof(T)); } public T Resolve<T>(string name) { Check.Argument.IsNotEmpty(name, "name"); return (T) Resolve(typeof(T), name); }
ise-uiuc/Magicoder-OSS-Instruct-75K
self.heap_size -= 1
ise-uiuc/Magicoder-OSS-Instruct-75K
throw new Error("Filtering to only end, but Range has no end."); if (filter.end === true) { return { start: range.end, end: range.end }; } if (filter.end) { const e = FilterApproximateDate( range.end, filter.end as ApproximateDateTransform ); return { start: e, end: e }; } throw new Error("bad call"); }
ise-uiuc/Magicoder-OSS-Instruct-75K
struct User: Codable { let email: String let names: String
ise-uiuc/Magicoder-OSS-Instruct-75K
return False @enroute.broker.command("CreatePayment") async def create_payment(self, request: Request) -> Response: """Create a new ``Payment`` instance. :param request: The ``Request`` instance. :return: A ``Response`` instance. """ try: content = await request.content() if self.validate_card(content["card_number"]): payment = await PaymentAggregate.create(
ise-uiuc/Magicoder-OSS-Instruct-75K
if self.onConnected is not None: self.onConnected(self) def setAuthtoken(self, token):
ise-uiuc/Magicoder-OSS-Instruct-75K
from .base import CSEndpoint class ContainersAPI(CSEndpoint): def list(self): ''' `container-security-containers: list-containers <https://cloud.tenable.com/api#/resources/container-security-containers/list-containers>`_ Returns: list: List of container resource records ''' return self._api.get('v1/container/list').json() def inventory(self, id): '''
ise-uiuc/Magicoder-OSS-Instruct-75K
elif operacion == "restar": resultat = valor1-valor2 elif operacion == "multiplicar":
ise-uiuc/Magicoder-OSS-Instruct-75K
scan_json['Bcc'] = msg['Bcc'] scan_json['References'] = msg['References'] scan_json['body'] = '' scan_json['body_html'] = '' scan_json['xml'] = '' scan_json['email_addresses'] = [] scan_json['ip_addresses'] = [] scan_json['attachments'] = [] message_json['scan'] = scan_json attachment = {} for part in msg.walk(): application_pattern = re.compile('application/*')
ise-uiuc/Magicoder-OSS-Instruct-75K
} public void SetItems(IList<RepositoryInfo> repos) { listBox.Items.AddRange(repos.Select(i => $"{i.PathToRoot}, {i.Branch} branch").ToArray()); listBox.SelectedIndex = 0; } public int SelectedIndex => listBox.SelectedIndex; }
ise-uiuc/Magicoder-OSS-Instruct-75K
self.USER_AVOID_LIST = USER_AVOID_LIST # bot-written post tags are removed if they contain any of these (substring matches, case-insensitive) self.TAG_AVOID_LIST = TAG_AVOID_LIST # don't reblog from dash if tags contain these (substring matches) self.DASH_TAG_AVOID_LIST = DASH_TAG_AVOID_LIST # for frequent repliers who don't otherwise trigger "OK to respond to this reply" logic self.REPLY_USER_AUTO_ACCEPT_LIST = REPLY_USER_AUTO_ACCEPT_LIST
ise-uiuc/Magicoder-OSS-Instruct-75K
required public init?(coder: NSCoder) { self.options = DefaultPageMenuOption() super.init(coder: coder) } public init?(coder: NSCoder, options: PageMenuOptions? = nil) { self.options = options ?? DefaultPageMenuOption() super.init(coder: coder) } override open func viewDidLoad() { super.viewDidLoad() self.setup()
ise-uiuc/Magicoder-OSS-Instruct-75K
from core.counter_causal_generator import * from core.metrics import * ''' Script to run the experiments in the Sachs dataset (https://www.bristol.ac.uk/Depts/Economics/Growth/sachs.htm)
ise-uiuc/Magicoder-OSS-Instruct-75K
switch(strtoupper($message['Event'])){ case 'CLICK': //菜单消息的EventKey当做TextDispatcherConfig中的文字内容,通过TextDispatcher转发 ImWx::setRequest('MsgType', 'text'); ImWx::setRequest('Content', $message['EventKey']); ImWxTextDispatcher::dispatch($message['EventKey']);
ise-uiuc/Magicoder-OSS-Instruct-75K
echo "<?php\n"; ?> $this->title = Yii::t('app', '<?= $generator->getModuleClass() ?>'); $this->params['breadcrumbs'][] = ['label' => $this->title, 'url' => ['/<?= $generator->moduleID ?>']];
ise-uiuc/Magicoder-OSS-Instruct-75K
"checkedInt = \(checkedInt)" } else { print("nil")
ise-uiuc/Magicoder-OSS-Instruct-75K
from .baidu import BaiduIndex from .baidu import SogouIndex from .baidu import ToutiaoIndex
ise-uiuc/Magicoder-OSS-Instruct-75K