seed
stringlengths
1
14k
source
stringclasses
2 values
{ $response = $this->auth->postLogin( $_POST ); if ( $response ) { // Retrieve User Info and Make SESSION for user $user_info = $this->users->get_user_auth( $_POST ); // Get User Organization $organization_info = $this->users->get_user_org( $user_info['course_id'] ); // Session User Info $this->session->set_userdata($user_info);
ise-uiuc/Magicoder-OSS-Instruct-75K
for _ in range(int(input())): a,b = list(map(int,input().split())) print(a*b)
ise-uiuc/Magicoder-OSS-Instruct-75K
static mut DATA: MU<[MU<$ty>; $len]> = MU::uninit(); static IDX: AtomicUsize = AtomicUsize::new(0);
ise-uiuc/Magicoder-OSS-Instruct-75K
else: if CS.pause_long_on_gas_press: at_full_stop = False near_stop = False car_stopping = False
ise-uiuc/Magicoder-OSS-Instruct-75K
" } \n" + " } \n" + " \n" + " return i \n"); int[][] i = (int[][])value; for (int x = 0; x < 5; ++x) { for (int y = 0; y < 5; ++y) { assertEquals(x*y, i[x][y]); } } } public void testDeclarationStatement() {
ise-uiuc/Magicoder-OSS-Instruct-75K
* distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file
ise-uiuc/Magicoder-OSS-Instruct-75K
let (max_queue_len, priority) = match message { Message::RequestVoteCall(_) | Message::RequestVoteReply(_) => (None, 32), Message::AppendEntriesCall(ref x) => { if x.suffix.entries.len() < 2 { (Some(4096), 64) } else { (Some(512), 128) } } Message::AppendEntriesReply(_) => (Some(512), 128), Message::InstallSnapshotCast(_) => (Some(2048), 200), }; let mut options = Options::default(); options.force_wakeup = force_wakeup;
ise-uiuc/Magicoder-OSS-Instruct-75K
import net.minecraftforge.client.event.GuiScreenEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; public class MainMenuEvent {
ise-uiuc/Magicoder-OSS-Instruct-75K
func makeUIView(context: UIViewRepresentableContext<SearchBar>) -> UISearchBar { let searchBar = UISearchBar(frame: .zero) searchBar.delegate = context.coordinator return searchBar } func updateUIView(_ uiView: UISearchBar, context: UIViewRepresentableContext<SearchBar>) { uiView.text = text } }
ise-uiuc/Magicoder-OSS-Instruct-75K
* * @param text * @param family font family * @param points font size */ public Text(String text, String family, double size) {
ise-uiuc/Magicoder-OSS-Instruct-75K
if event == sg.WINDOW_CLOSED: break text.metadata = (text.metadata + 1) % 51
ise-uiuc/Magicoder-OSS-Instruct-75K
/// State of the instance /// </summary> public enum DDM_INSTANCE_STATE : int { /// <summary> /// Unknown /// </summary> UNKNOWN, /// <summary> /// Primary /// </summary>
ise-uiuc/Magicoder-OSS-Instruct-75K
import org.apereo.cas.authentication.AuthenticationHandler; import org.apereo.cas.authentication.AuthenticationHandlerResolver; import org.apereo.cas.authentication.AuthenticationServiceSelectionPlan; import org.apereo.cas.authentication.AuthenticationTransaction; import org.apereo.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler;
ise-uiuc/Magicoder-OSS-Instruct-75K
cat_df = df[cat_vars] return num_df, cat_df
ise-uiuc/Magicoder-OSS-Instruct-75K
print(find_shortest_manhattan_distance(find_intersections(route1, route2))) if __name__ == "__main__": main()
ise-uiuc/Magicoder-OSS-Instruct-75K
import org.springframework.transaction.annotation.Transactional; import pms.common.response.ResponseBean; import pms.dao.SearchDao; import pms.service.SearchService; import java.util.List; import java.util.Map; @Transactional(rollbackFor = Exception.class)
ise-uiuc/Magicoder-OSS-Instruct-75K
pub fn main() -> std::io::Result<()> {
ise-uiuc/Magicoder-OSS-Instruct-75K
protected:
ise-uiuc/Magicoder-OSS-Instruct-75K
string.push_str(" "); } string.push_str(&format!("{:02x}", byte));
ise-uiuc/Magicoder-OSS-Instruct-75K
QString itkFiltersGaussianProcess::description() const {
ise-uiuc/Magicoder-OSS-Instruct-75K
traj_ids = [traj_id]
ise-uiuc/Magicoder-OSS-Instruct-75K
cli(app, base_url='http://pyvec.org')
ise-uiuc/Magicoder-OSS-Instruct-75K
private String customerAccessEntitlementServicingSessionReference = null; private String customerAccessProfileAgreementInstanceReference = null; private CRCustomerAccessProfileAgreementRequestInputModelCustomerAccessProfileAgreementInstanceRecord customerAccessProfileAgreementInstanceRecord = null; private Object customerAccessProfileAgreementRequestActionTaskRecord = null; private CRCustomerAccessProfileAgreementRequestInputModelRequestRecordType requestRecordType = null; /** * `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::ISO20022andUNCEFACT::Identifier general-info: Reference to the active servicing session
ise-uiuc/Magicoder-OSS-Instruct-75K
Please click on the following activation link:
ise-uiuc/Magicoder-OSS-Instruct-75K
@Mock private OrganisationSearchRestService searchRestService; @Override protected EuOrganisationViewModelPopulator supplyServiceUnderTest() { return new EuOrganisationViewModelPopulator(); }
ise-uiuc/Magicoder-OSS-Instruct-75K
if abs(num) == abs(base)**i: #global exp exp = i elif (abs(num) - abs(base)**tmp) == (abs(base)**i - abs(num)): # in case of tie :) exp = tmp elif (abs(num) - abs(base)**tmp) < (abs(base)**i - abs(num)): #global exp exp = tmp else: #global exp exp = i
ise-uiuc/Magicoder-OSS-Instruct-75K
# if line in characters: # characters[line] = characters[line] + 1 # else: # characters[line] = 1 # # print(characters)
ise-uiuc/Magicoder-OSS-Instruct-75K
if (i < 0 || j < 0) return 0; if (LCS[i][j] > 0) return LCS[i][j]; if (P[i] != '*') { if (P[i] == FN[j]) return LCS[i][j] = max(LCS[i][j], lcs(i-1, j-1) + 1); return LCS[i][j]; } return LCS[i][j] = max(LCS[i][j], max(lcs(i-1, j), lcs(i, j-1))); }
ise-uiuc/Magicoder-OSS-Instruct-75K
def __delete__(self, obj): raise AttributeError("can't delete attribute")
ise-uiuc/Magicoder-OSS-Instruct-75K
ssh $1 $2
ise-uiuc/Magicoder-OSS-Instruct-75K
.or_insert_with(|| ChangeSet::new()) .add_change(parsed_line)? } } ColumnValue::Integer(int) => { if let ChangeSetWithColumnType::IntColumnType(ref mut changeset) = self.changeset { changeset .entry(*int)
ise-uiuc/Magicoder-OSS-Instruct-75K
[Required] public string LastName { get; set; } public int? OrganizationId { get; set; } public string OrganizationName { get; set; } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
// let promise = jsfunc!.call(withArguments: [unsafeBitCast(testFunc, to: AnyObject.self)])!
ise-uiuc/Magicoder-OSS-Instruct-75K
### pip3 install requests from urllib.request import urlopen from bs4 import BeautifulSoup ### pip3 install BeautifulSoup4 def shelterlist(): URL = 'https://www.shelterlist.com/city/ca-sacramento'
ise-uiuc/Magicoder-OSS-Instruct-75K
#include <sys/sysinfo.h>
ise-uiuc/Magicoder-OSS-Instruct-75K
var crc: UInt16 = seed != nil ? seed! : 0x0000
ise-uiuc/Magicoder-OSS-Instruct-75K
help="List of colorspace features") # Forest parser.add_argument('--forest_method', dest='forest_method', type=str, default='ET-regr', choices=['ET-clf', 'ET-regr', 'RF-clf', 'RF-regr'], help="Type of forest method") parser.add_argument('--forest_n_estimators', dest='forest_n_estimators', default=10, type=int, help="Number of trees in forest") parser.add_argument('--forest_min_samples_split', dest='forest_min_samples_split', default=10, type=int, help="Minimum number of samples for further splitting") parser.add_argument('--forest_max_features', dest='forest_max_features', default='sqrt', help="Max features") # Dataset augmentation
ise-uiuc/Magicoder-OSS-Instruct-75K
import org.ops4j.pax.exam.Option; @RunWith(TwoContainerPaxExam.class) public class TestFastbinRoundTrip extends RsaTestBase { private static String FASTBIN_PORT_SERVER = "2544";
ise-uiuc/Magicoder-OSS-Instruct-75K
#[derive(Debug)] pub struct ReaderStream<S> { stream: S, } impl<S> From<S> for ReaderStream<S> { fn from(stream: S) -> Self { ReaderStream { stream } } } fn main() {}
ise-uiuc/Magicoder-OSS-Instruct-75K
set { zRotation = newValue.zRotation } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
nb_tasks, nb_subctx = daccess.get_basic_context_tally(ctx) ans = input('This context contains {} direct undone task(s) and ' '{} subcontext(s). Continue? y/* '.format(nb_tasks, nb_subctx)) go_ahead = ans == 'y' else: go_ahead = True
ise-uiuc/Magicoder-OSS-Instruct-75K
def setUp(self): self.graph = Graph() self.graph.debug = False self.graph.max_links_input = 100000 self.graph.input_debug_links = 200000 self.graph.output_debug_nodes = 10000 def testLoadCompressed1(self): use_big_alphabet = False self.graph.load_compressed_graph(cloudlight.tests.data_enc1, use_big_alphabet) self.assertEqual( self.graph.number_of_nodes(), 43948 ) self.assertEqual( self.graph.number_of_edges(), 50000 )
ise-uiuc/Magicoder-OSS-Instruct-75K
self.array = np.ndarray(shape, dtype, self._shm.buf, order='C') @classmethod def copy(cls, arr): """Creates a new SharedNDArray that is a copy of the given ndarray. Args: arr: The ndarray to copy.
ise-uiuc/Magicoder-OSS-Instruct-75K
if (value.HasMember("EngineNo") && !value["EngineNo"].IsNull()) { if (!value["EngineNo"].IsString())
ise-uiuc/Magicoder-OSS-Instruct-75K
FROM client_policy LEFT JOIN royal_london_financial ON royal_london_financial_plan_number = client_policy.policy_number
ise-uiuc/Magicoder-OSS-Instruct-75K
{ DataTable table = new DataTable(); table.Columns.AddRange(Enumerable.Range(0, _r.Next(3, 10)) .Select(c => new DataColumn($"Column {c + 1}", typeof(int))) .ToArray()); for (int i = 0; i < 10; i++) { table.Rows.Add(Enumerable.Range(0, table.Columns.Count) .Select(c => (object)_r.Next(0, 100)).ToArray());
ise-uiuc/Magicoder-OSS-Instruct-75K
body = json.dumps(test_obj) mock_response = MagicMock(headers={'Location': '/api/resource-manager/vim-drivers/123'})
ise-uiuc/Magicoder-OSS-Instruct-75K
<filename>src/m101j/week02/project/m101j_blog/validate_sourcecode.py import pymongo import urllib2 import urllib import cookielib import random import re
ise-uiuc/Magicoder-OSS-Instruct-75K
with open(output_file, "wb") as encrypted_file: encrypted_file.write(encrypted) def decrypt(key, input_file, output_file): with open(input_file, "rb") as encrypted_file: encrypted = encrypted_file.read() fernet = Fernet(key) decrypted = fernet.decrypt(encrypted) with open(output_file, "wb") as decrypted_file: decrypted_file.write(decrypted)
ise-uiuc/Magicoder-OSS-Instruct-75K
}); } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
export class UpdateDriverDto extends PartialType(CreateDriverDto) { truck: any; }
ise-uiuc/Magicoder-OSS-Instruct-75K
{ Debug.Log("Ingrese un valor adecuado"); } else if (horas <= 40 && horas > 0) { Debug.Log("El salario correspondiente es " + (horas * Pago)); } else if (horas > 40)
ise-uiuc/Magicoder-OSS-Instruct-75K
print(word, end =" ") for l,n in node.children.items(): # Traverse for all the children in the node self.show(n, word + l) # L -> Current letter, N -> Next node if __name__ == "__main__": trie = Trie() words = ["wait", "waiter", "shop", "shopper"] for word in words: trie.add(word) print(trie.search("wait")) print(trie.search("waiter")) print(trie.search("")) print(trie.search("wai"))
ise-uiuc/Magicoder-OSS-Instruct-75K
let background = Color::new(242, 242, 242)?; let margin = 0.1; let show_labels = false; let line_width = 0.1; // create an empty model let mut model = Model::new(width, height, scale); // add a hexagon model.add(Shape::new(6, fill_hexagon, stroke)?); // attach a square to each side of the hexagon let squares = model.add_multi(0..1, 0..6, Shape::new(4, fill_square, stroke)?)?;
ise-uiuc/Magicoder-OSS-Instruct-75K
class testSource(unittest.TestCase): """ SourcesTest class to test the behavior of the Sources class """ def setUp(self): """ Method that runs before each other test runs """
ise-uiuc/Magicoder-OSS-Instruct-75K
public partial struct _Anonymous2_e__Union { [FieldOffset(0)] public JOBOBJECT_RATE_CONTROL_TOLERANCE RateControlTolerance; [FieldOffset(0)] public JOBOBJECT_RATE_CONTROL_TOLERANCE CpuRateControlTolerance; } [StructLayout(LayoutKind.Explicit)] public partial struct _Anonymous3_e__Union { [FieldOffset(0)] public JOBOBJECT_RATE_CONTROL_TOLERANCE RateControlToleranceLimit;
ise-uiuc/Magicoder-OSS-Instruct-75K
time.sleep(1) app.undo() app.save()
ise-uiuc/Magicoder-OSS-Instruct-75K
C removed at position (1, 2) and D added at position (4, 2, 1)
ise-uiuc/Magicoder-OSS-Instruct-75K
icon: 'warning', title: 'Oops...', html: "Recaptcha wajib dicentang!", })
ise-uiuc/Magicoder-OSS-Instruct-75K
</x-slot> <h1>Liste des {{ $resource }}</h1> <table> <thead> <tr> <th>Code postal</th> <th>Localité</th> </tr>
ise-uiuc/Magicoder-OSS-Instruct-75K
# 获取settings.py配置文件里的RANDOM_UA_TYPE配置的浏览器类型, # 如果没有,默认random,随机获取各种浏览器类型 self.ua_type = crawler.settings.get('RANDOM_UA_TYPE', 'random') @classmethod # 函数上面用上装饰符@classmethod,函数里有一个必写形式参数cls用来接收当前类名称 def from_crawler(cls, crawler): # 重载from_crawler方法
ise-uiuc/Magicoder-OSS-Instruct-75K
fn foo() { let test = TestEnum::Arm1; match test {
ise-uiuc/Magicoder-OSS-Instruct-75K
*/ protected static function newFactory(): Factory {
ise-uiuc/Magicoder-OSS-Instruct-75K
public interface IModelService { object Get(object id); } }
ise-uiuc/Magicoder-OSS-Instruct-75K
def check_equation_element(element): if type(element) is Indic: try: Indicator.objects.get(name=element.name) except ObjectDoesNotExist: raise Exception(f"L'indicateur {element.name} n'existe pas.")
ise-uiuc/Magicoder-OSS-Instruct-75K
# Write the function !fn --shellpen-private writeDSL writeln "for $*" !fn --shellpen-private writeDSL writeln "do" # Push the DSL command to run to CLOSE this block !fn --shellpen-private writeDSL --push "done"
ise-uiuc/Magicoder-OSS-Instruct-75K
timer.resume() } /// GCD定时器循环操作 /// - timeInterval: 循环间隔时间 /// - handler: 循环事件 public func DispatchTimer(timeInterval: Double, queue: DispatchQueue = DispatchQueue.global(), handler: @escaping (DispatchSourceTimer?) -> Void) -> DispatchSourceTimer { let timer = DispatchSource.makeTimerSource(flags: [], queue: queue) timer.schedule(deadline: .now(), repeating: timeInterval) timer.setEventHandler {
ise-uiuc/Magicoder-OSS-Instruct-75K
train_data_B_idx = np.arange(len(dataset_B)) np.random.shuffle(train_data_A_idx) np.random.shuffle(train_data_B_idx) train_data_A_idx_subset = train_data_A_idx[:num_samples] train_data_B_idx_subset = train_data_B_idx[:num_samples]
ise-uiuc/Magicoder-OSS-Instruct-75K
from flask_wtf import FlaskForm from wtforms import StringField from wtforms.validators import DataRequired class Campos(FlaskForm): es = StringField('es')
ise-uiuc/Magicoder-OSS-Instruct-75K
using Kujikatsu086.Extensions; using Kujikatsu086.Numerics; using Kujikatsu086.Questions; namespace Kujikatsu086.Questions { /// <summary> /// https://atcoder.jp/contests/nomura2020/tasks/nomura2020_a /// </summary> public class QuestionA : AtCoderQuestionBase
ise-uiuc/Magicoder-OSS-Instruct-75K
using System; using System.Collections.Generic;
ise-uiuc/Magicoder-OSS-Instruct-75K
def verify_user(request, unique_id): message = AUTH_OBJECT.verify_uniqueid(CONNECTION,unique_id) return redirect("https://feasta-client-side.vercel.app/login")
ise-uiuc/Magicoder-OSS-Instruct-75K
T: Copy + for<'c> AddAssign<&'c T>, {
ise-uiuc/Magicoder-OSS-Instruct-75K
neighborCategoryList=["entity", "entity_poly_seq", "chem_comp", "chem_comp_atom", "struct_asym", "atom_type"],
ise-uiuc/Magicoder-OSS-Instruct-75K
def fitness_distance(genomes, engine): scores = engine.get_scores() max_score = engine.track.distance_matrix.max()
ise-uiuc/Magicoder-OSS-Instruct-75K
import datetime import tempfile from functools import partial from pathlib import Path import json from telegram.client import Telegram
ise-uiuc/Magicoder-OSS-Instruct-75K
mod cancel; mod create; mod delete; mod jobs;
ise-uiuc/Magicoder-OSS-Instruct-75K
for compact_fn, group in groupby(chunks, key=lambda x: x[1]): data = chain.from_iterable(chunk.data for chunk in group)
ise-uiuc/Magicoder-OSS-Instruct-75K
# #!/usr/bin/env python3 # # -*- coding: utf-8 -*- # import pandas as pd # import datetime
ise-uiuc/Magicoder-OSS-Instruct-75K
mysqlExecutor = ExecutorFactory.get_executor(db_config=db_config) mysqlDialect = MySQLDialect() class MysqlBaseModel(BaseModel):
ise-uiuc/Magicoder-OSS-Instruct-75K
"edit_mode": False, "soundpad_connected": False, "version": BRIDGE_VERSION, } self._index_sockets = set() self._control_sockets = set() def start(self): port = self._config.get(["server", "ws_port"])
ise-uiuc/Magicoder-OSS-Instruct-75K
P, N, _ = w.shape R = np.zeros((P, N, 1)) #STEP1 for p in range(1, P): R[p] = np.square(w[p]) > tau_p[p] * shita candidate = np.where(R[p])[0] for n in candidate: communication_cost += 1 send_to1(n, w[p, n])
ise-uiuc/Magicoder-OSS-Instruct-75K
with unittest.mock.patch( 'windlass.charts.Chart.export_stream', new=pf): with unittest.mock.patch( 'windlass.generic.Generic.upload', new=pf): windlass_obj.upload( remote=r, charts_url='None', docker_image_registry='None', generic_url='None', )
ise-uiuc/Magicoder-OSS-Instruct-75K
/** * Makes an empty `TMap`. * * @tsplus static ets/TMap/Ops empty */ export function empty<K, V>(): USTM<TMap<K, V>> { return TMap.fromIterable(List.nil()) }
ise-uiuc/Magicoder-OSS-Instruct-75K
from django.db.models.functions import Lower # imported our models from App.models.playlist import Playlist from App.models.user import User def show_playlists(user, owner_only=False): # assume there are no playlists playlists = None
ise-uiuc/Magicoder-OSS-Instruct-75K
protected async Task<bool> ModelValidAndSuccess(Func<Task> action) { if (!ModelState.IsValid) return false; try { await action(); return true; } catch (ClientException e) { var paramName = e.ParamName;
ise-uiuc/Magicoder-OSS-Instruct-75K
private readonly StreamFieldParser _fieldParser; private readonly List<string> _values; private int _lineNumber; private int _linePosition; #endregion
ise-uiuc/Magicoder-OSS-Instruct-75K
#!/bin/bash cd src zip -r ../chrome-ext-venezuela-no-more.zip * cd ..
ise-uiuc/Magicoder-OSS-Instruct-75K
image_name = '星座.jpg' with open(image_name, 'rb') as f: # 将二进制数据处理成base64再解码成字符串 data = b64encode(f.read()).decode('utf-8') while True: client, addr = server.accept() # 启动一个线程来处理客户端的请求 FileTransferHandler(client, image_name).start()
ise-uiuc/Magicoder-OSS-Instruct-75K
from fastapi import Depends, Response, status from fastapi_jwt_auth import AuthJWT from pydantic import BaseModel, validator class RequestBody(BaseModel): email: str password: str
ise-uiuc/Magicoder-OSS-Instruct-75K
/* Config */ clock_t tb, te; boost::numeric::odeint::runge_kutta_cash_karp54<rocs::Rn> rk45; /** * Case I */
ise-uiuc/Magicoder-OSS-Instruct-75K
print(s, end="") print() print(s * 4) # looping strings text = "This is an example." count = 0
ise-uiuc/Magicoder-OSS-Instruct-75K
text='나는 관대하다. 관 씨 집안 3대 독자다. 내 이름은 대하다. 그래서 나는 관대하다' print(kss.split_sentences(text))
ise-uiuc/Magicoder-OSS-Instruct-75K
$this->addToAssertionCount(1); } /** @test */ public function it_can_log_error_on_debug() { $console = m::mock(Console::class);
ise-uiuc/Magicoder-OSS-Instruct-75K
impls = _get_impls((1, 8, 7, 7), (32, 8, 3, 3)) assert len(impls) == 2 impls = _get_impls((1, 16, 7, 7), (32, 16, 3, 3)) assert len(impls) == 3 def test_select_implementation(): target = tvm.target.Target("llvm") def _select_impl(dshape, wshape, use_autotvm=False): data = relay.var("data", shape=dshape) weight = relay.var("wshape", shape=wshape) out = relay.nn.conv2d(data, weight, padding=(1, 1)) out = run_infer_type(out) return relay.backend.te_compiler.select_implementation(
ise-uiuc/Magicoder-OSS-Instruct-75K
// Created by sadeghgoo on 06/02/2020. // Copyright (c) 2020 sadeghgoo. All rights reserved.
ise-uiuc/Magicoder-OSS-Instruct-75K
private static LocalDateTime generateEquinoxDate(Element e) { int y = Integer.parseInt(e.child(0).text());
ise-uiuc/Magicoder-OSS-Instruct-75K
assembly_gb = pd.read_csv(assembly_gb_path, sep = "\t", skiprows = [0], low_memory = False) assembly_rs = pd.read_csv(assembly_rs_path, sep = "\t", skiprows = [0], low_memory = False) assembly_gb_filtered = assembly_gb[["# assembly_accession", "taxid"]] assembly_rs_filtered = assembly_rs[["# assembly_accession", "taxid"]]
ise-uiuc/Magicoder-OSS-Instruct-75K
# Can also check out: https://github.com/CannyLab/spinningup/pull/32 # These will NOT contain the teacher rewards directly on there. # See `bash/paper_plot_qvalues.sh` for plotting Q-values. # ----------------------------------------------------------------------------------------------------- # # ----------------------------------------------------------------------------------------------------- #
ise-uiuc/Magicoder-OSS-Instruct-75K
.ToArray (); } } }
ise-uiuc/Magicoder-OSS-Instruct-75K