seed
stringlengths
1
14k
source
stringclasses
2 values
for i, j in self.flip_pairs:
ise-uiuc/Magicoder-OSS-Instruct-75K
filters="cssmin", output="public/css/common.css" ) js = Bundle( "libs/jQuery/dist/jquery.js",
ise-uiuc/Magicoder-OSS-Instruct-75K
argparser.add_argument('--hue', type=float, help='default=100') argparser.add_argument('--blur', action='store_true', help='') argparser.add_argument('--blur_radius', type=float, default=10, help='') argparser.add_argument('--blur_sigma', type=float, default=1, help='') argparser.add_argument('--gaussianBlur', action='store_true', help='') argparser.add_argument('--gaussianBlur_width', type=float, default=5, help='')
ise-uiuc/Magicoder-OSS-Instruct-75K
public String post_id; @Column(name="vote_item_index") public int vote_item_index = -1; public static void create(String paramString1, String paramString2, int paramInt) { VoteRecord localVoteRecord = new VoteRecord(); localVoteRecord.account_id = paramString1;
ise-uiuc/Magicoder-OSS-Instruct-75K
function CompanyListItem({ data }: CompanyListItemProps) { const [showDeleteDialog, setShowDeleteDialog] = useState(false); return ( <ListItem> <ListItemText>{data.name}</ListItemText> <ListItemSecondaryAction> <IconButton size="small" edge="end" onClick={() => setShowDeleteDialog(true)}> <DeleteIcon fontSize="small" /> </IconButton> <CompanyDeleteDialog companyId={data.id} open={showDeleteDialog}
ise-uiuc/Magicoder-OSS-Instruct-75K
flux_median_window = np.median(flux[:,window], axis=1) flux_norm = np.zeros(flux.shape) cont_norm = np.zeros(cont.shape) for i in range(len(flux)): flux_norm[i,:] = flux[i,:]/flux_median_window[i]
ise-uiuc/Magicoder-OSS-Instruct-75K
date +"%H:%M:%S: START $script_type script ==="" export | grep ipv6 date +"%H:%M:%S: END $script_type script ===""
ise-uiuc/Magicoder-OSS-Instruct-75K
largest = num2 print("number is ",largest)
ise-uiuc/Magicoder-OSS-Instruct-75K
string response = await client.GetStringAsync( "https://fctodo.azurewebsites.net/todo" );
ise-uiuc/Magicoder-OSS-Instruct-75K
import sys import os
ise-uiuc/Magicoder-OSS-Instruct-75K
""" logger.debug("started") CmdStep(name=__name__, context=context).run_step(is_shell=False) logger.debug("done")
ise-uiuc/Magicoder-OSS-Instruct-75K
//----------------------------------------------------------------------------- // Copyright (c) 2018 <NAME> // // https://github.com/bebuch/disposer_module // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt) //----------------------------------------------------------------------------- #include <disposer/module.hpp>
ise-uiuc/Magicoder-OSS-Instruct-75K
/** * @property mixed $oldValue */ private $oldValue = null; /** * Gets as createdBy * * @return \GoetasWebservices\Client\SalesforceEnterprise\Sobject\SObjectType */ public function getCreatedBy() { return $this->createdBy;
ise-uiuc/Magicoder-OSS-Instruct-75K
0, 1, 0, 6, 100, 117, 114, 105, 97, 110]) self.assertEqual(wire_format, truth, 'incorrect wire format') def test_components(self): uri='ccnx:/apple/banana/cherry/durian' name = ccnpy.Name.from_uri(uri) self.assertEqual(name.count(), 4) self.assertEqual(name[0], 'apple') self.assertEqual(name[1], 'banana')
ise-uiuc/Magicoder-OSS-Instruct-75K
data directory with all files
ise-uiuc/Magicoder-OSS-Instruct-75K
#include "adc.h" // First define the Adc.
ise-uiuc/Magicoder-OSS-Instruct-75K
@Inject(method = "randomTick", at = @At("TAIL"), cancellable = true) public void cancelRandomTick(BlockState state, ServerWorld world, BlockPos pos, Random random, CallbackInfo ci) { repeat = true; } }
ise-uiuc/Magicoder-OSS-Instruct-75K
from dacbench.envs.modea import ModeaEnv from dacbench.envs.sgd import SGDEnv from dacbench.envs.onell_env import OneLLEnv from dacbench.envs.modcma import ModCMAEnv from dacbench.envs.toysgd import ToySGDEnv
ise-uiuc/Magicoder-OSS-Instruct-75K
font = Font(name='Tahoma', size=22, bold=True,
ise-uiuc/Magicoder-OSS-Instruct-75K
/** 一级属性 */ public static FirstGroup:number=3; /** 二级属性 */ public static SecondGroup:number=4; /** 属性因子(5项值) */ public static GroupElement:number=5; /** 长度 */
ise-uiuc/Magicoder-OSS-Instruct-75K
birthDay: string; avatar: string;
ise-uiuc/Magicoder-OSS-Instruct-75K
} } private void DrawStat(TileTextureStat stat, int total) { EditorGUILayout.Space(); EditorGUILayout.LabelField("Stat: "); EditorGUILayout.LabelField(string.Format(" Max Tiles Used In One Frame: {0}({1}%)", stat.MaxActive, (100.0f * stat.MaxActive / total).ToString("N2"))); } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
Data = message; }
ise-uiuc/Magicoder-OSS-Instruct-75K
DEFAULT_ENV_NAME = "CartPole-v1" DEFAULT_ALGORITHM = "random" DEFAULT_MAX_EPISODES = 1000 DEFAULT_LEARNING_RATE = 0.001 DEFAULT_GAMMA = 0.95 DEFAULT_UPDATE_FREQUENCY = 20
ise-uiuc/Magicoder-OSS-Instruct-75K
global notifyMV notifyMV = mv_serial global notifyNETID notifyNETID = network_id global myFileName global myNoMaskImage myFileName = "From-" + mv_serial + "-at-" + myTime + ".jpeg" myNoMaskImage = publishPath + myFileName
ise-uiuc/Magicoder-OSS-Instruct-75K
#!/bin/bash echo '# Begin /etc/fstab # file system mount-point type options dump fsck # order /dev/<sdb1> / <ext4> defaults 1 1 /dev/<sdb2> swap swap pri=1 0 0 proc /proc proc nosuid,noexec,nodev 0 0 sysfs /sys sysfs nosuid,noexec,nodev 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 tmpfs /run tmpfs defaults 0 0 devtmpfs /dev devtmpfs mode=0755,nosuid 0 0 # End /etc/fstab' > /etc/fstab
ise-uiuc/Magicoder-OSS-Instruct-75K
cd "$INSTALLDIR/$2" CMD=`grep "Command: " .mucfile | sed -e "s/.*:\s//g"` if [ `id -u` = "0" ] then chroot . $CMD else printf "Prompting sudo...\n" sudo chroot . $CMD fi fi fi elif [ "$1" = "rund" ] then
ise-uiuc/Magicoder-OSS-Instruct-75K
export declare type ConstructedHostsMap = WeakMultiMap<FoveaHost, IDestroyable>;
ise-uiuc/Magicoder-OSS-Instruct-75K
<filename>boilerplate/app/screens/createScreen/nativeBase.ts import { connectState } from "@app/state" import { connectStyle } from "native-base" export default (name: string, Component: any) => { return connectStyle(name + "Screen", {})(connectState(Component)) }
ise-uiuc/Magicoder-OSS-Instruct-75K
self.contentView.addSubview(keyLabel) keyLabel.numberOfLines = 1 keyLabel.translatesAutoresizingMaskIntoConstraints = false keyLabel.topAnchor.constraint(equalTo: self.contentView.topAnchor, constant: 10.0).isActive = true keyLabel.bottomAnchor.constraint(equalTo: self.contentView.bottomAnchor, constant: -10.0).isActive = true keyLabel.leadingAnchor.constraint(equalTo: self.contentView.leadingAnchor, constant: 20).isActive = true keyLabel.widthAnchor.constraint(equalTo: self.contentView.widthAnchor, multiplier: 0.35).isActive = true }
ise-uiuc/Magicoder-OSS-Instruct-75K
"""Overrides the default equality implementation based on object identifiers.""" if isinstance(other, Table): return self.schema == other.schema and self.table_name == other.table_name return False def __hash__(self) -> int: """Overrides the default hash implementation based on object identifiers.""" return hash(self.schema + "-" + self.table_name)
ise-uiuc/Magicoder-OSS-Instruct-75K
} else { Set<String> authorized = new HashSet<String>(); double avg = getAverage(executionCounts); for (String res : executionCounts.elementSet()) { if (executionCounts.count(res) >= threshold * avg) {
ise-uiuc/Magicoder-OSS-Instruct-75K
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_map() .entry(&"type", &"manual") .entry(&"hash", &hex::encode(&self.body.hash())) .entry(&"body", &self.body) .entry(&"sign", &self.signature) .entry(&"inputs_cache", &self.inputs_cache) .finish() } } impl TxManual { pub fn new(body: TxBody) -> Self { TxManual {
ise-uiuc/Magicoder-OSS-Instruct-75K
Error {msg: error} }
ise-uiuc/Magicoder-OSS-Instruct-75K
domain = heroku_domain class heroku_drain(_resource): pass drain = heroku_drain class heroku_pipeline(_resource): pass pipeline = heroku_pipeline class heroku_pipeline_coupling(_resource): pass pipeline_coupling = heroku_pipeline_coupling
ise-uiuc/Magicoder-OSS-Instruct-75K
fn dummy_with_rng<R: Rng + ?Sized>(codes: &&[u16], rng: &mut R) -> Self { let code = codes.choose(rng).expect("no codes provided"); http::StatusCode::from_u16(*code).expect("invalid status code") } } impl Dummy<Faker> for http::Version { fn dummy_with_rng<R: Rng + ?Sized>(_: &Faker, rng: &mut R) -> Self { let i: u8 = (0..4).fake_with_rng(rng); match i { 0 => http::Version::HTTP_2,
ise-uiuc/Magicoder-OSS-Instruct-75K
'Programming Language :: Python :: 3.4',
ise-uiuc/Magicoder-OSS-Instruct-75K
@Test public void getAllFilesTest() { String webSiteSrcDir = this.workingDir.resolve("website/timeless/").toString(); Map<String, Path> allFiles = IOUtils.getAllFiles(webSiteSrcDir); allFiles.forEach((rel, abs) -> LOG.info("{} , {}", rel, abs.toString()));
ise-uiuc/Magicoder-OSS-Instruct-75K
def train(category_tensor, line_tensor, rnn, criterion, of_sgd): hidden = rnn.initHidden() for i in range(line_tensor.size()[0]): output, hidden = rnn(line_tensor[i], hidden)
ise-uiuc/Magicoder-OSS-Instruct-75K
def main(): main_inner() if __name__ == "__main__":
ise-uiuc/Magicoder-OSS-Instruct-75K
// // SceneDelegate.swift // AITabbarDemo
ise-uiuc/Magicoder-OSS-Instruct-75K
private async void GraphService_StateChanged(object sender, EventArgs e) { if (GraphService.IsAuthenticated) { CurrentUserId = (await GraphService.User.GetProfileAsync(new MicrosoftGraphUserFields[1] { MicrosoftGraphUserFields.Id })).Id; } else { CurrentUserId = string.Empty; } } /// <summary> /// This method is used to prompt to login screen.
ise-uiuc/Magicoder-OSS-Instruct-75K
<link href="{{asset('/css/app.css')}}" rel="stylesheet">
ise-uiuc/Magicoder-OSS-Instruct-75K
) # Set up Studio studio = emr.CfnStudio(self, "MyEmrStudio", auth_mode = "SSO", default_s3_location = f"s3://{bucket.bucket_name}/studio/", engine_security_group_id = eng_sg.security_group_id, name = "MyEmrEksStudio", service_role = role.role_arn,
ise-uiuc/Magicoder-OSS-Instruct-75K
# type(args[0]) = tuple # type(args[0][0]) = list if isinstance(args[0][0], dict): items = [concat_chunked_dicts(arg) for arg in args] elif isinstance(args[0][0], np.ndarray): items = [np.concatenate(arg) for arg in args] elif isinstance(args[0][0], list) and isinstance(args[0][0][0], np.ndarray): items = [[np.concatenate(item) for item in arg] for arg in args]
ise-uiuc/Magicoder-OSS-Instruct-75K
public function adicionarContrato($dados = NULL) { if (is_array($dados)) {
ise-uiuc/Magicoder-OSS-Instruct-75K
list_display = ['name', 'roles_list', 'initials', 'username'] list_filter = ['roles'] search_fields = ('name_first', 'name_last', 'roles__name', 'initials', 'user_account__username') ordering = ('name_last', 'name_first') inlines = [AlternateNameInline] def name(self, obj): if obj.name_suffix: return "%s %s %s" % (obj.name_first, obj.name_last, obj.name_suffix)
ise-uiuc/Magicoder-OSS-Instruct-75K
let data = py.allow_threads(|| cctx.compress(source)).or_else(|msg| { Err(ZstdError::from_message( py, format!("cannot compress: {}", msg).as_ref(), )) })?; Ok(PyBytes::new(py, &data)) }
ise-uiuc/Magicoder-OSS-Instruct-75K
*/ using System; using System.Collections.Generic; using System.Reflection; using System.Text.RegularExpressions; namespace NebSharp.Types { /// <summary> /// Allows specifying the JSONPath expression for a class property for /// serialization and deserialization of a class. /// </summary> [AttributeUsage(AttributeTargets.Property)]
ise-uiuc/Magicoder-OSS-Instruct-75K
assert _base_transaction(jobA_job) == { "event_id": uuid_list[0], "contexts": { "trace": {
ise-uiuc/Magicoder-OSS-Instruct-75K
operations = [ migrations.AlterField( model_name='user_internship_post', name='content', field=ckeditor.fields.RichTextField(max_length=2000, null=True, verbose_name='İçerik'), ), ]
ise-uiuc/Magicoder-OSS-Instruct-75K
ELM_PID=$! trap 'trap - SIGINT SIGTERM ERR; kill $ELM_PID;' SIGINT SIGTERM ERR wait $ELM_PID echo "killing" kill $UWSGI_PID wait $UWSGI_PID
ise-uiuc/Magicoder-OSS-Instruct-75K
yield i, best[1] if best is not None else i break t = sparse_cosine_similarity(vector, t_vector)
ise-uiuc/Magicoder-OSS-Instruct-75K
public let halfNote = 0.5 public let quarterNote = 0.25 public let eighthNote = 0.125 public let sixteenthNote = 0.0625 public let thirtySecondNote = 0.03125 public let sixtyFourthNote = 0.015625
ise-uiuc/Magicoder-OSS-Instruct-75K
nums1 = [1, 7, 11] nums2 = [2, 4, 6] k = 3 ob = Solution() print(ob.kSmallestPairs(nums1, nums2, k))
ise-uiuc/Magicoder-OSS-Instruct-75K
@DATASETS.register_module() class StandfordBackgroundDataset(CustomDataset): CLASSES = ("background", "stone", "border") PALETTE = [0, 1, 2] def __init__(self, split, **kwargs): super().__init__(img_suffix='.png', seg_map_suffix='.png',
ise-uiuc/Magicoder-OSS-Instruct-75K
} export type UserOption = { label: string, value: string, }
ise-uiuc/Magicoder-OSS-Instruct-75K
def load_skybox_black_side(self): return loader.loadModel(self.blackside_pack_name + "cubemap.bam")
ise-uiuc/Magicoder-OSS-Instruct-75K
#[derive(Debug, Clone)] pub struct Test; impl NetworkParams for Test {
ise-uiuc/Magicoder-OSS-Instruct-75K
#[derive(Debug, Snafu)] #[snafu(visibility(pub(crate)))] pub enum Error { UnexpectedResponse { status_code: StatusCode, body: bytes::Bytes }, BuildRequestError { source: reqwest::Error }, ExecuteRequestError { source: reqwest::Error }, ResponseBytesError { source: reqwest::Error }, DeserializeError { source: serde_json::Error, body: bytes::Bytes }, GetTokenError { source: azure_core::errors::AzureError }, } } pub async fn delete_event( operation_config: &crate::OperationConfig,
ise-uiuc/Magicoder-OSS-Instruct-75K
#!/bin/sh make -C /Users/lbajo/ros2_mod_ws/build/trajectory_msgs -f /Users/lbajo/ros2_mod_ws/build/trajectory_msgs/CMakeScripts/trajectory_msgs_cmakeRulesBuildPhase.make$CONFIGURATION all
ise-uiuc/Magicoder-OSS-Instruct-75K
Returns ------- f : EdfReader object object containing the handle to the file Examples
ise-uiuc/Magicoder-OSS-Instruct-75K
def __init__(self, trial, comparator): self.trial = trial self.comparator = comparator def judge(self, inputs, default): results = {input: self.trial(input) for input in inputs} eligible = {input: result for input, result in results.items() if result is not None} champion = default
ise-uiuc/Magicoder-OSS-Instruct-75K
Copyright 2016 <NAME> 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
ise-uiuc/Magicoder-OSS-Instruct-75K
<filename>examples/classification/stop_perpetual_demo.sh<gh_stars>0 ps -u | grep "python mp_classify" | awk '{ print $2 }' | xargs kill
ise-uiuc/Magicoder-OSS-Instruct-75K
print(socket.gethostname())
ise-uiuc/Magicoder-OSS-Instruct-75K
self.assertFalse(np.any(np.isnan(eq_lib3['temperature']))) self.assertFalse(np.any(np.isnan(eq_lib3T1['temperature']))) self.assertFalse(np.any(np.isnan(eq_lib3T2['temperature']))) self.assertFalse(np.any(np.isnan(eq_lib3_t['temperature']))) self.assertFalse(np.any(np.isnan(eq_lib3_tt['temperature']))) self.assertFalse(np.any(np.isnan(eq_lib3T1_t['temperature']))) self.assertFalse(np.any(np.isnan(eq_lib3T2_t['temperature']))) self.assertIsNone(assert_allclose(eq_lib2T['temperature'].T, eq_lib2['temperature'])) self.assertIsNone(assert_allclose(np.swapaxes(eq_lib3T1['temperature'], 0, 1), eq_lib3['temperature']))
ise-uiuc/Magicoder-OSS-Instruct-75K
* (affects mobile only) */ hasActions?: boolean; /** * Indicates if the row will have an expanded row
ise-uiuc/Magicoder-OSS-Instruct-75K
print(b,e) if b > e : return 0 if b == e : return 1 if s[b] == s[e] : return helper(b+1,e-1) + 2 return max(helper(b+1,e), helper(b,e-1)) return helper(0,len(s)-1)
ise-uiuc/Magicoder-OSS-Instruct-75K
from setuptools import setup, find_packages from os.path import join, dirname import torrentgamers attrs = { 'name': torrentgamers.__name__, 'version': torrentgamers.__version__, 'author': torrentgamers.__author__,
ise-uiuc/Magicoder-OSS-Instruct-75K
fill=GANTRY_COLOR) else: self._gantry1 = self.create_oval((-gx,-gh-gy, gx,-gh+gy), width=2, outline=GANTRY_COLOR) self._gantry2 = self.create_line((-gx, -gh, 0, 0, gx, -gh), width=2, fill=GANTRY_COLOR) self._lastInsert = None self._lastActive = None self._select = None self._vector = None self._items.clear() self.cnc.initPath()
ise-uiuc/Magicoder-OSS-Instruct-75K
'<hr style="border: 0; height: 1px; background: #BFC1C3; Margin: 30px 0 30px 0;">' '<p style="Margin: 0 0 20px 0; font-size: 11pt; line-height: 25px; color: #0B0C0C;">b</p>' ) ], [ notify_plain_text_email_markdown, ( '\n' '\na' '\n'
ise-uiuc/Magicoder-OSS-Instruct-75K
# MTS Log protocol -- http://www.innovatemotorsports.com/support/downloads/Seriallog-2.pdf # Serial: 8-N-1-19.2 kbit/sec # Packet periodicity: 81.92 milliseconds (12.2 hertz) (8 MHz / 655360) # Sample resolution: 10 bits (0..5V at 0.1% resolution) import Header from word import *
ise-uiuc/Magicoder-OSS-Instruct-75K
self.assert_risk_values(risk)
ise-uiuc/Magicoder-OSS-Instruct-75K
.unwrap() }
ise-uiuc/Magicoder-OSS-Instruct-75K
for i in range(9): # define subplot
ise-uiuc/Magicoder-OSS-Instruct-75K
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
ise-uiuc/Magicoder-OSS-Instruct-75K
# Copyright (c) 2020 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 # # 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. import sys
ise-uiuc/Magicoder-OSS-Instruct-75K
connection = create_connection( "postgres", "postgres", "admin", "127.0.0.1", "5432" )
ise-uiuc/Magicoder-OSS-Instruct-75K
pub mod wlr_layer; /// Represents the possible errors returned from /// a surface ping #[derive(Debug, Error)] pub enum PingError { /// The operation failed because the underlying surface has been destroyed
ise-uiuc/Magicoder-OSS-Instruct-75K
*/ public convenience init?(leftControls: Array<UIControl>? = nil, rightControls: Array<UIControl>? = nil) { self.init(frame: CGRectZero) prepareProperties(leftControls, rightControls: rightControls) }
ise-uiuc/Magicoder-OSS-Instruct-75K
"/api/create_group", data=json.dumps(self.test_group), content_type='application/json' ) self.assertEqual(json.loads(res.data.decode("utf-8"))["results"], 2) self.assertEqual(res.status_code, 200) res = self.app.post( "/api/create_group", data=json.dumps(self.test_group2), content_type='application/json' ) self.assertEqual(json.loads(res.data.decode("utf-8"))["results"], 3) # def test_join_chatroom(self):
ise-uiuc/Magicoder-OSS-Instruct-75K
<p class="float-right"><?php echo $pesan['no_telepon']?></p> </div> <div class="col-lg-2"> <p class="float-right"><?php echo $pesan['email']?></p> </div> </div>
ise-uiuc/Magicoder-OSS-Instruct-75K
// Created by Michael Stockman on 9/4/16. // Copyright © 2016 Michael Stockman. // import XCTest @testable import MemeMe_1_0 class MemeMe_1_0Tests: XCTestCase { override func setUp() { super.setUp() // Put setup code here. This method is called before the invocation of each test method in the class. } override func tearDown() {
ise-uiuc/Magicoder-OSS-Instruct-75K
judge_command( "XPENDING mystream group55 - + 10 myconsumer", { "command": "XPENDING", "key": "mystream", "group": "group55", "stream_id": ["-", "+"], "count": "10", "consumer": "myconsumer", }, ) judge_command("XPENDING mystream group55 - + ", None)
ise-uiuc/Magicoder-OSS-Instruct-75K
strategy_class: type period_config: Dict[str, Any] opt_target_filter: Optional[Callable[[List[Tuple[Any, ...]]], List[Tuple[Any, ...]]]] = None cg_target_filter: Optional[Callable[[Dict[str, Any]], bool]] = None cg_period_config: Dict[str, Any] def __init__(self, strategy_class: type, param_config: Dict[str, Any], period_config: Dict[str, Any]): self.opt_engine = BacktestingEngine() self.strategy_class = strategy_class
ise-uiuc/Magicoder-OSS-Instruct-75K
#format: float32
ise-uiuc/Magicoder-OSS-Instruct-75K
print('[+] Initializing scan...') print('[i] Target host: {}'.format(self.target)) print('[i] Ports: {}'.format(self.portlist)) try:
ise-uiuc/Magicoder-OSS-Instruct-75K
req = request.get_json(silent=True, force=True) print("Request:") print(json.dumps(req, indent=4)) res = makeWebhookResult(req) res = json.dumps(res, indent=4)
ise-uiuc/Magicoder-OSS-Instruct-75K
A function to calculate the accuracy of a CNN when given a list of predicted classes and a list of the real classes Param: - pred, a numpy array of predicted classes - real, a numpy array of the real classes Return: - Accuracy as a decimal """ return sum(pred==real) / len(pred)
ise-uiuc/Magicoder-OSS-Instruct-75K
{-0.0697622150950153008986, 0.046432560482317929183}, {-0.0232708715407507060344, 0.0465333413404968638234}, {0.02327087154075070603437, 0.0465333413404968638234}, {0.0697622150950153008986, 0.0464325604823179291833}, {0.1161024692216898182267, 0.046231217034791425205}, {0.1621912712463770264451, 0.0459297470628552269276}, {0.2079288030837679729796, 0.045528803483127572753}, {0.2532160074213070237007, 0.0450292546498245100301}, {0.2979548022551796483432, 0.0444321824740826399099}, {0.3420482933139803129623, 0.043738880080758951608}, {0.3854009839099910183841, 0.0429508490077806243141}, {0.4279189817635698486723, 0.042069795954107501617}, {0.4695102023527009595653, 0.0410976290833462117396},
ise-uiuc/Magicoder-OSS-Instruct-75K
for seq in parse_fasta(genome): sequence.extend(list(seq[1].upper())) yield (genome.name.rsplit('.', 1)[0], len(sequence), sequence) else: for genome in fastas: for seq in parse_fasta(genome): ID = seq[0].split('>', 1)[1].split()[0] yield (ID, len(seq[1]), list(seq[1].upper())) def open_files(files):
ise-uiuc/Magicoder-OSS-Instruct-75K
$statement = $database->prepare('UPDATE tasks SET completed_at = :completed_at WHERE id = :id AND user_id = :user_id'); $statement->bindParam(':id', $task_id, PDO::PARAM_INT); $statement->bindParam(':completed_at', $completed_at, PDO::PARAM_STR); $statement->bindParam(':user_id', $user_id, PDO::PARAM_INT); $statement->execute(); } else {
ise-uiuc/Magicoder-OSS-Instruct-75K
} } } void Ask::populateNPF(JSON_OBJECT entry) { // TODO Comments POPULATE_ARRAY(entry, "blocks", populateBlocks(entry["blocks"].GetArray());)
ise-uiuc/Magicoder-OSS-Instruct-75K
detatch() { if (this.vue) { const parent = this.vue.$el.parentElement; this.vue.$props.inserted = false; if (parent) { parent.removeChild(this.vue.$el); }
ise-uiuc/Magicoder-OSS-Instruct-75K
#include <command/command.hpp> #include <component/component.hpp> #include <core/core.hpp> #include <io.hpp> #include <exception> #include <stdexcept>
ise-uiuc/Magicoder-OSS-Instruct-75K
test_suite.addTests(unittest.makeSuite(test_cli.TestCli))
ise-uiuc/Magicoder-OSS-Instruct-75K
namespace = "http://www.opengis.net/gml"
ise-uiuc/Magicoder-OSS-Instruct-75K
if __name__ == '__main__': # s = '(()())(())' # s = '(()())(())(()(()))' s = '()()' ret = Solution().removeOuterParentheses(s) print(ret)
ise-uiuc/Magicoder-OSS-Instruct-75K
C: Future<Item = GMs, Error = GMs> + 'static, { let effect = Effect::GCmd(Box::new(g_cmd)); self.effects.push_back(effect); self
ise-uiuc/Magicoder-OSS-Instruct-75K