seed
stringlengths
1
14k
source
stringclasses
2 values
print(total)
ise-uiuc/Magicoder-OSS-Instruct-75K
private Map<String,Object> parameter; public enum Type{ pub,sub,unsub,ping
ise-uiuc/Magicoder-OSS-Instruct-75K
prediction = 0 if st.button("Predict"): model = joblib.load(MODEL_JOBLIB_FILE) features = [balance, purchases, cash_advance, credit_limit, payments] final_features = [np.array(features)] prediction = model.predict(final_features) st.balloons() st.success(f"The cl...
ise-uiuc/Magicoder-OSS-Instruct-75K
use App\Models\Matakuliah; class MatakuliahController extends Controller { /** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index(Request $request) { $cari = $request->get('cari'); $mk = Matakuliah::paginate(5);
ise-uiuc/Magicoder-OSS-Instruct-75K
__title__ = 'pyBoost' name="hello"
ise-uiuc/Magicoder-OSS-Instruct-75K
self[i].index = index; } fn furthest_dist2(&self) -> NotNan<T> { self[self.len() - 1].dist2 } fn into_vec(self) -> Vec<InternalNeighbour<T>> { keep_finite_elements(self) } fn into_sorted_vec(self) -> Vec<InternalNeighbour<T>> { keep_finite_elements(self) } }
ise-uiuc/Magicoder-OSS-Instruct-75K
if score(motifs) < score(bestmotifs): bestmotifs=motifs return bestmotifs def profile(motifs): transposed=[list(row) for row in zip(*motifs)] n=len(motifs) profile={nucleotide:[i.count(nucleotide)/n for i in transposed] for nucleotide in 'ACGT'} return profile
ise-uiuc/Magicoder-OSS-Instruct-75K
#!/usr/bin/python3 # Copyright 2019 Adobe. All rights reserved. # This file is licensed to you 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 requir...
ise-uiuc/Magicoder-OSS-Instruct-75K
for i in range(65, 91): c = 0 for j in range(0, len(string)): if(string[j] == chr(i)): c += 1 if c > 0: print("", chr(i), " is ", c, " times.") c = 0 for i in range(97, 123):
ise-uiuc/Magicoder-OSS-Instruct-75K
#include "JavaScriptFunctionExecutor.h" JavaScriptFunctionExecutor::JavaScriptFunctionExecutor(
ise-uiuc/Magicoder-OSS-Instruct-75K
@register.filter def to_percent(obj, significant_digits):
ise-uiuc/Magicoder-OSS-Instruct-75K
const data = Lists.encode(subject).finish() const buf = data.buffer.slice(data.byteOffset, data.byteOffset+data.byteLength) const decoded = decode(buf) const encoded = encode(decoded) test('decode()', () => { assert.equal(size(decoded), data.length); assert.equal(decoded.Enums[1], Enum.Two) assert.eq...
ise-uiuc/Magicoder-OSS-Instruct-75K
# import sys import gi gi.require_version("Tcam", "0.1") gi.require_version("Gst", "1.0") from gi.repository import Tcam, Gst
ise-uiuc/Magicoder-OSS-Instruct-75K
echo "Dist package updated. Pushing changes back to github." # Configure the github credentials
ise-uiuc/Magicoder-OSS-Instruct-75K
self.mock_ssh.copy.reset_mock() # should not be called the second time either
ise-uiuc/Magicoder-OSS-Instruct-75K
print "##-- dev results on epoch iter", epoch, iteration, training_id, Tab, best_f1, "(best f1)", Tab, loss_dev, time.asctime(), Tab, outputPRF(prf_dev) print "## Iden result:",
ise-uiuc/Magicoder-OSS-Instruct-75K
@IBOutlet weak var title: UILabel! @IBOutlet weak var date: UILabel!
ise-uiuc/Magicoder-OSS-Instruct-75K
customElements.define('outline-sort-span', SortSpan);
ise-uiuc/Magicoder-OSS-Instruct-75K
tracker.Run(); #ifdef PROFILE PROFILE_DUMP("/boot/home/Desktop/trackerProfile"); #endif
ise-uiuc/Magicoder-OSS-Instruct-75K
public OpCodeAttribute(string Mnemonic) { this.mnemonic = Mnemonic; } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
echo "!!!!!!!!!!!!!!!!!!!!!" command=dropdb fi
ise-uiuc/Magicoder-OSS-Instruct-75K
std::cerr << "set example file:" << eg_file << "\n"; } else { std::cerr << "[synthesizer] Argument Error: unknown flag " << flag << endl; assert(false); return -1; } } //init perf counter and debug printer PerfCounter::initialize(); ...
ise-uiuc/Magicoder-OSS-Instruct-75K
def build_from_dict(self, spec): libdoc = LibraryDoc(name=spec['name'], doc=spec['doc'], version=spec['version'], type=spec['type'], scope=spec['scope'],
ise-uiuc/Magicoder-OSS-Instruct-75K
#Entrada y Salida Estándar #Salida
ise-uiuc/Magicoder-OSS-Instruct-75K
import qcelemental as qcel def test_list_programs(): assert "molpro" in qcev.list_programs() assert "entos" in qcev.list_programs() assert "terachem" in qcev.list_programs() # Build out a list of all tests and validate validation_tests = []
ise-uiuc/Magicoder-OSS-Instruct-75K
a.sort(key= lambda x: x%c) print(*a)
ise-uiuc/Magicoder-OSS-Instruct-75K
# resolve any rejected hunks def Resolve(self): olddir = os.path.abspath(os.curdir) os.chdir(self.patchset.dir) try: self.patchset.Push(False) except oe.process.CmdError: # Patch application failed patchcmd = self.patchset.Push(True, False, Fa...
ise-uiuc/Magicoder-OSS-Instruct-75K
b=[] for j in range(cols): b.append(int(input())) matrixB.append(b) matrixResultant=[[ 0 for i in range(rows) ] for j in range(cols)] for i in range(rows): for j in range(cols): matrixResultant[i][j]=matrixA[i][j]+matrixB[i][j] for r in matrixResultant: print (r)
ise-uiuc/Magicoder-OSS-Instruct-75K
i = len(num) - 2 while i >= 0: if num[i] < num[i + 1]: break i -= 1 if i == -1: return -1
ise-uiuc/Magicoder-OSS-Instruct-75K
substitutions.append(c) continue substitutions.append(rot_chars[((index-13))]) return ''.join(substitutions) if __name__ == '__main__': print rotCode('Jul, EBG-13?')
ise-uiuc/Magicoder-OSS-Instruct-75K
n, bins, patches = plt.hist(data.transpose(), alpha = 0.5, color=colorbins, \ stacked = True, weights=wts,bins = bins, edgecolor='w',\ label=file_name[:-5],linewidth=1.2) 'EXECUTION'
ise-uiuc/Magicoder-OSS-Instruct-75K
('math', '#28a745'), ('inf', '#007bff'), ('othr', '#6c757d') ) name = models.CharField(max_length=32) subject = models.CharField(max_length=4, choices=SUBJECTS) description = models.TextField() creator = models.CharField(max_length=162) max_people = models.IntegerField(...
ise-uiuc/Magicoder-OSS-Instruct-75K
let condition1 = expectation(description: "") let webView = WKWebView(frame: .zero) let heightCalculationFuture = webView.calculateHeight() heightCalculationFuture.onSuccess { height in XCTFail("promise shouldn't have succeeded") }
ise-uiuc/Magicoder-OSS-Instruct-75K
print('Rotate by', alpha, ',', beta, ', ', gamma)
ise-uiuc/Magicoder-OSS-Instruct-75K
identity.provides.add(UserNeed(current_user.id)) if hasattr(current_user, 'role'): identity.provides.add(RoleNeed(current_user.role)) admin_permission = Permission(RoleNeed('admin')) employee_permission = Permission(RoleNeed('employee')) employeer_permission = Permission(Ro...
ise-uiuc/Magicoder-OSS-Instruct-75K
return #dodging effects. self.closestEnemies = self.game.getUnitEnemies(self) if self.closestEnemies.amount > 0:
ise-uiuc/Magicoder-OSS-Instruct-75K
$request['trp_updb_action'] = $_REQUEST['trp_updb_action'];
ise-uiuc/Magicoder-OSS-Instruct-75K
OnEnable(); } if (GameManager.Instance.insideBall == "") select.position = Vector3.SmoothDamp(select.position, transform.TransformPoint(Vector3.forward * 2), ref velocity, GameManager.Instance.pickupTransitionTime); else { D...
ise-uiuc/Magicoder-OSS-Instruct-75K
); }; export default NtpValidationStatus;
ise-uiuc/Magicoder-OSS-Instruct-75K
""" models for the rest interface of the takenotes project. """ from django.db import models # Create your models here. class Note(models.Model): """
ise-uiuc/Magicoder-OSS-Instruct-75K
# Max pooling name = "l{}_pool".format(self.layer_idx) network = max_pool_1d(name=name, input_var=network, pool_size=4, stride=4) self.activations.append((name, network)) self.layer_idx += 1 # Flatten name = "l{}_flat".format(self.layer_idx)
ise-uiuc/Magicoder-OSS-Instruct-75K
/** photo caption */ @FXML public Label displayPhotoText; /** Exit application * @param event mouse event */ @FXML void Exit(MouseEvent event) { Photo.SaveData(app); System.exit(0); } /** Go to photo system * @param event mouse event
ise-uiuc/Magicoder-OSS-Instruct-75K
def create_symmetic_matrix(size: int) -> np.array: """Create a numpy symmetric matrix.""" xs = create_random_matrix(size) return xs + xs.T def check_eigenpairs( matrix: np.ndarray, eigenvalues: np.ndarray, eigenvectors: np.ndarray) -> bool: """Check that the eigenvalue equation holds."...
ise-uiuc/Magicoder-OSS-Instruct-75K
def _clear_previous(self):
ise-uiuc/Magicoder-OSS-Instruct-75K
cmdLineArgs = _getCMDLineArgs() graph_file_path = cmdLineArgs['graphFilePath'] new_file_path = cmdLineArgs['newFilePath'] html_exporter(graph_file_path, new_file_path) return "SUCCESS" except Exception as e: raise Exception(e) if __name__ == "__main__": print(main()) sys.stdo...
ise-uiuc/Magicoder-OSS-Instruct-75K
mask[p_y, p_x] = 1 msks.append(cont2area(mask)) return msks, results
ise-uiuc/Magicoder-OSS-Instruct-75K
PHP_CONTAINER="${PWD##*/}_php_1" docker exec -t -i "$PHP_CONTAINER" /bin/bash
ise-uiuc/Magicoder-OSS-Instruct-75K
impl EmptyBuilder { /// Build empty properties pub fn build(self) {} }
ise-uiuc/Magicoder-OSS-Instruct-75K
// Created by Makarov Yury on 06/08/16. // Copyright © 2016 Makarov Yury. All rights reserved. // import UIKit /// Default truncation symbol. Tries to match `•` symbol appearance used in UITableView. @objc (MYTruncationItem)
ise-uiuc/Magicoder-OSS-Instruct-75K
pub fn withdrawal(&self) -> Option<&Withdrawal> { match self {
ise-uiuc/Magicoder-OSS-Instruct-75K
#cd $MOUNT_POINT/cloud_castle/instance_controller #npm i #nohup iojs $MOUNT_POINT/cloud_castle/instance_controller/main.js > $MOUNT_POINT/controller.log & else # old system
ise-uiuc/Magicoder-OSS-Instruct-75K
})) } export default updateExecutor
ise-uiuc/Magicoder-OSS-Instruct-75K
for notation in notation_list[1:]: compiling += dot_split[0] compiling += notation compiling += dot_split[1] return compiling
ise-uiuc/Magicoder-OSS-Instruct-75K
CONTINUOUS_HIGH_RES_MODE_1 = 0x10 CONTINUOUS_HIGH_RES_MODE_2 = 0x11 ONE_TIME_HIGH_RES_MODE_1 = 0x20 ONE_TIME_HIGH_RES_MODE_2 = 0x21 ONE_TIME_LOW_RES_MODE = 0x23 bus = smbus.SMBus(1) # MQTT Broker config broker = '127.0.0.1' port = 1883 topic = 'smartHomeHubs/light' def read_light():
ise-uiuc/Magicoder-OSS-Instruct-75K
} @Override public boolean validateObject(PooledObject<VoucherClient> client) { try { log.info(String.format("Validate client with key %d", client.getObject().getAccountKeyIndex()));
ise-uiuc/Magicoder-OSS-Instruct-75K
from .helper import *
ise-uiuc/Magicoder-OSS-Instruct-75K
from pathlib import Path import json import codecs
ise-uiuc/Magicoder-OSS-Instruct-75K
- Ensure that all query points not inside fold, optional, or recursion scope contain a "class:" clause. That increases the number of available query start points, so OrientDB can choose the start point of lowest cardinality. """ from ..blocks import CoerceType, QueryRoot, Recurse, Traverse ...
ise-uiuc/Magicoder-OSS-Instruct-75K
// /users/passwordRecovery public passwordRecovery () { return new APIResource(this).push('password-recovery'); } // /users/resetApiKey
ise-uiuc/Magicoder-OSS-Instruct-75K
style({ opacity: 0, height: '0px', transform: 'translateX(-100%)' }), style({ opacity: 1, height: 'unset', transform: 'translateX(0)' }),
ise-uiuc/Magicoder-OSS-Instruct-75K
[ $1="--clean" ] && rm -rf build echo "starting build..." mkdir -p dist build cd build cmake -DCMAKE_INSTALL_PREFIX="../dist" .. make
ise-uiuc/Magicoder-OSS-Instruct-75K
} ] } @pytest.mark.models(
ise-uiuc/Magicoder-OSS-Instruct-75K
for comp in components:
ise-uiuc/Magicoder-OSS-Instruct-75K
task_chain_id=getattr(checker_task, "task_chain_id", None), )
ise-uiuc/Magicoder-OSS-Instruct-75K
* @param t the executionToken containing results for this test run * @param features the features which were run during this test run */ public void endTests(ExecutionToken t, List<FeatureToken> features) { t.calculateTimeTaken(); listenerSupport.notifyTestsCompleted(t, features, inte...
ise-uiuc/Magicoder-OSS-Instruct-75K
# predict_test = model.predict(x_test) # predict = np.argmax(predict_test,axis=1) # # scores = model.evaluate(x_test, y_test, verbose=1) # # print(i) # # print('Test accuracy:', predict) # print(i+': '+(y_test == predict).sum()/len(predict)) # # # open(os.path.join(dirs,i)) # ...
ise-uiuc/Magicoder-OSS-Instruct-75K
cd `dirname $0` npm run build rm -rf dist cp -r build dist
ise-uiuc/Magicoder-OSS-Instruct-75K
export * as Parser from "./parser"; export * as QueryRunner from "./queryRunner"; export * as Structs from "./structs";
ise-uiuc/Magicoder-OSS-Instruct-75K
from django.contrib import admin from .models import Target, Exercise, Workout # Register your models here. admin.site.register(Target) admin.site.register(Exercise) admin.site.register(Workout)
ise-uiuc/Magicoder-OSS-Instruct-75K
RuleFor(vm => vm.NameLast).MinimumLength(3); RuleFor(vm => vm.Password).Password().WithMessage("Password must be 6 numbers only"); } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
cv.waitKey(0) cv.destroyWindow() else: plt.imshow(image,cmap = 'gray', interpolation = 'bicubic')
ise-uiuc/Magicoder-OSS-Instruct-75K
# Issue model tests def test_issue_str_method(self): self.assertEquals( str(self.issue), "Issue1" ) def test_issue_save_method(self): self.assertEquals(
ise-uiuc/Magicoder-OSS-Instruct-75K
// throw exception if class doesn't have package pointer if ( !strstr($className, '_') ) { throw new InvalidArgumentException("Can't find package pointer in class `" . $className . "` !"); } return substr($className, 0, strrpos($className, '_')); } /** ...
ise-uiuc/Magicoder-OSS-Instruct-75K
* `patterns` in the provided `files`. * * @param files The files to be mangled. * @param expressions The {@link MangleExpression}s to base the mangling on. * @param patterns The patterns of strings to mangle. * @returns A map of the count of each string matching a `pattern`. * @since v0.1.25 */ function countIn...
ise-uiuc/Magicoder-OSS-Instruct-75K
#include <stdlib.h> #include <string.h> #define LOG_TAG "lamecomposer" #include <android/gralloc_handle.h>
ise-uiuc/Magicoder-OSS-Instruct-75K
except Exception as e: Logger.log(response) Logger.log(e) if "retry_after" in response:
ise-uiuc/Magicoder-OSS-Instruct-75K
if name.starts_with('-') { return Err("tab name may not begin with a dash".into()); } if name.contains(' ') || name.contains('\t') || name.contains('\r') || name.contains('\n') { return Err("tab name may not contain whitespace".into()); } if name.contains('\\') { return Err...
ise-uiuc/Magicoder-OSS-Instruct-75K
predicted = tf.cast(tf.argmax(predictions, axis=-1), tf.int32) tf.print(self.mapping.lookup(predicted)) return {"predictions": predicted} def main() -> int:
ise-uiuc/Magicoder-OSS-Instruct-75K
NAME = "KILL" MIN_ARITY = 2 def __init__(self, nickname, reason, *args): self.nickname = nickname self.reason = reason @message.Command.requires_registration def handle_for(self, app, user, prefix):
ise-uiuc/Magicoder-OSS-Instruct-75K
# Add module.exports add the end of each compiled file to accomplish auto completion for FILE in lib/*_pb.js do
ise-uiuc/Magicoder-OSS-Instruct-75K
self.screen_height = 512 # screen height self.bg_color = (255, 255, 255) # overall background color self.init_speed = 30 # speed factor of dino
ise-uiuc/Magicoder-OSS-Instruct-75K
"""Test user config.""" result = await hass.config_entries.flow.async_init( DOMAIN, context={"source": SOURCE_USER}, data=None ) assert result["type"] == data_entry_flow.RESULT_TYPE_FORM assert result["step_id"] == "user" # test with all provided
ise-uiuc/Magicoder-OSS-Instruct-75K
#[derive(Clone, Hash, Eq, PartialEq)] pub struct ClientName(pub Cow<'static, str>); pub type BoxClient = Box<dyn Client + Send + Sync + 'static>;
ise-uiuc/Magicoder-OSS-Instruct-75K
context_object_name = 'topics' model = Topic
ise-uiuc/Magicoder-OSS-Instruct-75K
return sorted(edges) def size_of_state(x, k, window_size): sos_temp = [] for i in range(1 + len(x) - window_size): A = x[i : i + window_size] sos_temp.append(np.std(A, ddof=1)) return 0 if not sos_temp else min(sos_temp) * k
ise-uiuc/Magicoder-OSS-Instruct-75K
* modify it under the terms of the GNU Lesser General Public
ise-uiuc/Magicoder-OSS-Instruct-75K
example_module_list_variable_dict = { "submodule_list[0].var_trainable": example_tf_module_variable_dict["A.var_trainable"],
ise-uiuc/Magicoder-OSS-Instruct-75K
from terrascript.resource.vultr.vultr import vultr_ssh_key from terrascript.resource.vultr.vultr import vultr_startup_script
ise-uiuc/Magicoder-OSS-Instruct-75K
state = module.params['state'] api_user = module.params['api_user'] api_host = module.params['api_host'] api_password = module.params['api_password'] validate_certs = module.params['validate_certs'] node = module.params['node'] storage = module.params['storage'] timeout = module.params['...
ise-uiuc/Magicoder-OSS-Instruct-75K
return pi, actionIdx
ise-uiuc/Magicoder-OSS-Instruct-75K
Args: mod_yaml (str): An input modulelmd YAML name (str): The name of the module stream (str): Module update stream name version (int): Module version, integer, cannot be negative context (str): Module context flag arch (str): Module artifact architecture summ...
ise-uiuc/Magicoder-OSS-Instruct-75K
import diaceutics.selenium.enums.pageFields.FormFieldInterface; import diaceutics.selenium.pageobject.BaseMarketplaceForm; import org.openqa.selenium.By;
ise-uiuc/Magicoder-OSS-Instruct-75K
with_method!( /// Whether or not the [`name`] of span is collected. Enabled by default.
ise-uiuc/Magicoder-OSS-Instruct-75K
'list' => [ 'label' => 'Phone', 'searchable' => true ], 'detail' => [ 'label' => 'Phone' ] ], 'profile_slug' => [ 'sql' => [ 'type' => 'varchar', 'length' => 255, ...
ise-uiuc/Magicoder-OSS-Instruct-75K
def get_user_contact(username): user = get_object_or_404(User, username=username) return get_object_or_404(Contact, user=user) def get_current_chat(chat_id):
ise-uiuc/Magicoder-OSS-Instruct-75K
caption: String, //original: ImageBuffer // generateThumbnail: (photo: ImageBitmap) => ImageBitmap // move to utility-functions } pub fn new() -> IPhoto { return IPhoto { caption: "photo-caption".to_string(), //original: ImageBuffer::new(0, 0), }; }
ise-uiuc/Magicoder-OSS-Instruct-75K
def preprocess(data, lang): data["arg_negate"] = parse_template_boolean_value(data, parameter="arg_negate", default_value=False) data["arg_is_regex"] = parse_template_boolean_value(data, parameter="arg_is_regex", default_value=False) return data
ise-uiuc/Magicoder-OSS-Instruct-75K
var path: String { get } var httpMethod: HTTPMethod { get } var task: HTTPTask { get }
ise-uiuc/Magicoder-OSS-Instruct-75K
html.Div([ html.P('Please select year: (default by all)'), _get_drop_down('genre-year-option', 'year'), dcc.Graph(id='genre-year-pie') ], style={'display': 'flex', 'flex-direction': 'column', 'width': '49%'})...
ise-uiuc/Magicoder-OSS-Instruct-75K
domain_name = domain.get('name') domain_id = domain.get('id') records.append((domain_name, domain_id)) return dict(records)
ise-uiuc/Magicoder-OSS-Instruct-75K