seed
stringlengths
1
14k
source
stringclasses
2 values
}); }); describe('unapplyFilterWidget()', () => { describe('Scenario 1: User unapply filter widget settings', () => { const widgetId = '@filter/01'; const action = unapplyFilterWidgetAction(widgetId); const test = sagaHelper(unapplyFilterWidget(action)); test('get filter widget settings', (result...
ise-uiuc/Magicoder-OSS-Instruct-75K
NSLog("Unhandled error removing store in %s at line %d: %@", #function, #line, nserror.localizedDescription) } } } open func persistentStoreClear() { removeStore(coordinator: self.persistentStoreCoordinator)
ise-uiuc/Magicoder-OSS-Instruct-75K
@has_changes.setter def has_changes(self, value): self._has_changes = value # Mostly reserved
ise-uiuc/Magicoder-OSS-Instruct-75K
import discord from apscheduler.schedulers.asyncio import AsyncIOScheduler from discord.ext import commands, fancyhelp from pytz import utc
ise-uiuc/Magicoder-OSS-Instruct-75K
#[serde(flatten)] pub channel_data: ChannelData, } /// Schema for successful response from conversations.open method when opening channels, ims, mpims
ise-uiuc/Magicoder-OSS-Instruct-75K
#!/bin/bash cd polkabtc-spec && ./autobuild.sh & cd btcrelay-spec && ./autobuild.sh
ise-uiuc/Magicoder-OSS-Instruct-75K
savefig_or_show(dpi=dpi, save=save, show=show)
ise-uiuc/Magicoder-OSS-Instruct-75K
bzip2 -d $real2game_root_dir/interpolation_creator/$filename filename="icon_global_icosahedral_time-invariant_"$analysis_year$analysis_month$analysis_day$analysis_hour"_CLON.grib2.bz2" url=$url_base"/"$analysis_hour"/clon/"$filename wget -q --directory-prefix=$real2game_root_dir/interpolation_creator $url bzip2 -d $rea...
ise-uiuc/Magicoder-OSS-Instruct-75K
kl_divergence_l = kl(Normal(ql_m, torch.sqrt(ql_v)), Normal(local_l_mean, torch.sqrt(local_l_var))).sum(dim=1) kl_divergence = kl_divergence_z + kl_divergence_l return reconst_loss, kl_divergence
ise-uiuc/Magicoder-OSS-Instruct-75K
//MARK: - Private Helpers private func frameRequest() -> URLRequest { var finalRequest = URLRequest(url: self.request.url, cachePolicy: .reloadIgnoringLocalCacheData, timeoutInterval: self.request.timeout) // set headers if Any finalRequest.allHTTPHeaderFields = request.headers g...
ise-uiuc/Magicoder-OSS-Instruct-75K
f.write(result)
ise-uiuc/Magicoder-OSS-Instruct-75K
public bool GetFftData(float[] fftResultBuffer, object context) { if (contexts.Contains(context)) return false; contexts.Add(context); GetFftData(fftResultBuffer); return true; } public override void Add(float[] samples, ...
ise-uiuc/Magicoder-OSS-Instruct-75K
int AudioClip::bitsPerSample() const { return mBitsPerSample; } int AudioClip::sampleRate() const { return mSampleRate; } } // namespace cepp
ise-uiuc/Magicoder-OSS-Instruct-75K
return $this->message; } public function getStatus(): string { return $this->status;
ise-uiuc/Magicoder-OSS-Instruct-75K
parser.add_argument('vlan') parser.add_argument('--remove', action='store_true', help=("Remove the service profile with name")) def connect_to_ucsm(args): handle = UcsHandle(args.ucsm_ip, args.username, args.password) handle.login() return handle def assign_vlan_to_sp_vnic(handle, ar...
ise-uiuc/Magicoder-OSS-Instruct-75K
<filename>svgbob_cli/examples/long.sh #!/bin/sh cargo run --bin svgbob < long.bob > long.svg
ise-uiuc/Magicoder-OSS-Instruct-75K
* with the License. A copy of the License is located at * * * * http://www.apache.org/licenses/LICENSE-2.0 ...
ise-uiuc/Magicoder-OSS-Instruct-75K
export_type: 'Quizzes', export_as: 'YAML' } as IReportExport; } export function generateDefaultReportSettignsAggregatorState(): IReportAggregator { return { weighted_score: 'AVG', time_allocated: 'AVG', time_taken: 'AVG', weight: 'AVG',
ise-uiuc/Magicoder-OSS-Instruct-75K
model = ClinicalBertSimilarity() predictions = model.predict([("The patient is sick.", "Grass is green."), ("A prescription of acetaminophen 325 mg was given."," The patient was given Tylenol.")]) print(predictions)
ise-uiuc/Magicoder-OSS-Instruct-75K
{ return app('db') ->table('stock_entries') ->join('books', 'books.isbn', '=', 'stock_entries.isbn') ->select('stock_entries.*', 'books.title') ->get(); } }
ise-uiuc/Magicoder-OSS-Instruct-75K
from WebPages.HomePage import * from configuration.BaseClass import * class ClassInstance(BaseClass): home_page = None payment_page = None flipkart_page = None def get_home_page(self): if self.home_page == None: self.home_page = HomePageFunctions(self.getDriver()) return se...
ise-uiuc/Magicoder-OSS-Instruct-75K
""" Common constants for Pipeline. """
ise-uiuc/Magicoder-OSS-Instruct-75K
return $this; } /** * Get clickInDay
ise-uiuc/Magicoder-OSS-Instruct-75K
<reponame>jimth001/formality_emnlp19<filename>gpt/config.py from gpt.src import encoder text_enc = encoder.get_encoder('./models/117M') config_path='./models/117M'
ise-uiuc/Magicoder-OSS-Instruct-75K
Looks at ACTION_DEPS in this module for an example of what is expected """
ise-uiuc/Magicoder-OSS-Instruct-75K
print('\n-----------------') print(' Begin train') print('-----------------\n') for epoch in range(1, config['train']['epochs']+1): loss = train(train_loader, model, optimizer, loss_fn, device, config['train']['epochs'], epoch) correct, data_num = test(test_loader, model, device)
ise-uiuc/Magicoder-OSS-Instruct-75K
// main.cpp // 1170. Compare Strings by Frequency of the Smallest Character
ise-uiuc/Magicoder-OSS-Instruct-75K
f.write('XNODE,{},{},{}\n'.format(NID,node_pos[1],node_pos[2])) # TEMP LINE FOR MAT PROPERTY f.write('MAT_ISO,1,Lower Upper Aeroshell,8781151.,0.232915,0.0004144,0.0083\n') f.write('MAT_ISO,2,Ring Frame Flange,7627582.,0.201668,0.0004144,0.0083\n') f.write('MAT_ISO,3,Cabin Skin,8473671.,0.259765,0.0004144,0.00...
ise-uiuc/Magicoder-OSS-Instruct-75K
$this->executeService($regis, $regis->account, $vault, $contact); }
ise-uiuc/Magicoder-OSS-Instruct-75K
// "number": "232저222", // "name": "쏘나타 DN8(휘발유)", // "zone": 260, // "image": "https://sofastcar.s3.amazonaws.com/sonata-DN8.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIARUSCLZUQZUMFHN4N%2F20200915%2Fap-northeast-2%2Fs3%2Faws4_request&X-Amz-Date=20200915T043031Z&X-Amz-Expires=3600&X-Amz-Signed...
ise-uiuc/Magicoder-OSS-Instruct-75K
self.assertEqual("bq", dag.tasks[0].task_id) self.assertEqual("hook_transporter", dag.tasks[1].task_id) self.assertEqual("hook_predator", dag.tasks[2].task_id) self.assertEqual("wait_foo-intra-dep-job-bq", dag.tasks[3].task_id) self.assertEqual("wait_foo-inter-dep-job-bq", dag.ta...
ise-uiuc/Magicoder-OSS-Instruct-75K
:return: ddt measurement median, 1-sigma (without lambda correction factor) """ if self.likelihood_type in ['DdtGaussian', 'DdtHist', 'DdtHistKDE', 'DdtHistKin', 'DdtGaussKin']: return self._lens_type.ddt_measurement() return None, None def sigma_v_measurement(self, sig...
ise-uiuc/Magicoder-OSS-Instruct-75K
println!("cargo:rerun-if-changed=build.rs"); }
ise-uiuc/Magicoder-OSS-Instruct-75K
if reply == "none": reply = random.choice(["there must be an error", "ask that gopi to fix me :(", "sorry this is a prototype"])
ise-uiuc/Magicoder-OSS-Instruct-75K
'content': 'resolvecs.wordpress.com/', 'url': 'https://resolvecs.wordpress.com/', 'col': 'col-lg-4' }, { 'src': '{scheme}://{host}/static/public/img/globe.png', 'content': 'nelfurion.com/', 'url': 'http://nelfurion.com/', 'col': 'col-lg-4' }, ] def get_mo...
ise-uiuc/Magicoder-OSS-Instruct-75K
}; #endif
ise-uiuc/Magicoder-OSS-Instruct-75K
try: # Force no Programming Executive usage by setting program_pe flag but not configure a # PE (i.e. not calling set_program_exec) self.pic.start_programming_operation(program_pe=options['no_pe']) except TypeError: ...
ise-uiuc/Magicoder-OSS-Instruct-75K
'theme-list' => 'Theme List', 'theme-upload' => 'Upload Theme', 'theme-upload-file' => 'Upload Theme File', 'activate' => 'Activate', 'deactivate' => 'Deactivate', ];
ise-uiuc/Magicoder-OSS-Instruct-75K
urlpatterns = [ path("", index, name="index"), ]
ise-uiuc/Magicoder-OSS-Instruct-75K
/** * Performs this action. * * @param source ReadOnlyMap containing parameter values * @exception SQLException thrown from the database
ise-uiuc/Magicoder-OSS-Instruct-75K
// for _ in 0.. { // stress test for _ in 0..100 { let mut rng = rand::thread_rng(); // Produce an overdetermined or well-determined problem to solve. let r = rng.gen_range(1, 20); let c = rng.gen_range(1, r + 1);
ise-uiuc/Magicoder-OSS-Instruct-75K
public function testSetShopNameAndAccessToken() { $client = new ShopifyClient("abnini3ruin4ruinc", "040350450399894.myshopify.com"); $client->setHttpClient(new MockRequest()); $client->setShopName('4234322.myshopify.com'); $response = $client->call("PUT", "messages/3094304723/te...
ise-uiuc/Magicoder-OSS-Instruct-75K
echo '#!/bin/bash'>>$root.slurm echo '#SBATCH --job-name='$root>>$root.slurm echo '#SBATCH --output='$root'.out'>>$root.slurm echo '#SBATCH --nodes=1'>>$root.slurm echo '#SBATCH --ntasks-per-node=12 '>>$root.slurm echo '#SBATCH --time=0-24:00:00 '>>$root.slurm echo '#SBATCH --cluster=smp'>>$root.slurm echo 'cd $SBATC...
ise-uiuc/Magicoder-OSS-Instruct-75K
import Text from '../../../components/Text' import { RootNavigationProp } from '../../../navigation/main/tabTypes' import SafeAreaBox from '../../../components/SafeAreaBox' import { HotspotSetupStackParamList } from './hotspotSetupTypes' import { submitTxn } from '../../../utils/appDataClient'
ise-uiuc/Magicoder-OSS-Instruct-75K
'display_statewindowopen_status' => $this->config['display_statewindowopen_status'] == '1', 'display_status_colours_with_image' => $this->config['display_status_colours_with_image'] == '1', ] );
ise-uiuc/Magicoder-OSS-Instruct-75K
then echo "Run a command in a running container" exit 0 fi set -u set -e help() { echo "usage: exec [-h] <container> <command> [<args> ..]" echo "where" echo " -h prints help" } ## Main
ise-uiuc/Magicoder-OSS-Instruct-75K
Progress.Report(progressID, 0.99f, "Deleted " + prefabs.Length + " prefabs."); Progress.Finish(progressID, Progress.Status.Succeeded); } public static IEnumerator ReplaceWithLoaded(PrefabDataHolder[] prefabs, int progressID)
ise-uiuc/Magicoder-OSS-Instruct-75K
const path1 = trackbackNodes("A", "C", prev); expect(path1).toEqual(["A", "C"] ); });
ise-uiuc/Magicoder-OSS-Instruct-75K
help=argparse.SUPPRESS) parser.add_argument('--os-region-name', default=utils.env('OS_REGION_NAME'), help='Defaults to env[OS_REGION_NAME].') parser.add_argument('--os_region_name', help=arg...
ise-uiuc/Magicoder-OSS-Instruct-75K
import edu.wpi.first.wpilibj2.command.CommandBase; import frc.robot.subsystems.Agitator; public class RunAgitator extends CommandBase { // private final Agitator mAgitator; private final double mSpeed;
ise-uiuc/Magicoder-OSS-Instruct-75K
from __future__ import print_function import re,os,sys d=dict( _UNDER400="""
ise-uiuc/Magicoder-OSS-Instruct-75K
* @param output output of program. * @return formatted output. */
ise-uiuc/Magicoder-OSS-Instruct-75K
ret = mesos_maintenance.is_host_past_maintenance_end(hostnames[0]) else: raise NotImplementedError("Action: '%s' is not implemented." % action) paasta_print(ret) return ret if __name__ == '__main__': if paasta_maintenance(): sys.exit(0) sys.exit(1)
ise-uiuc/Magicoder-OSS-Instruct-75K
#include "FWCore/Framework/interface/eventsetuprecord_registration_macro.h"
ise-uiuc/Magicoder-OSS-Instruct-75K
# -*- coding: utf-8 -*- import numpy as np
ise-uiuc/Magicoder-OSS-Instruct-75K
if __name__ == '__main__': output = test_conv() output2 = conv2d(input, weight) print('diff: ', (output-output2).norm())
ise-uiuc/Magicoder-OSS-Instruct-75K
$loop = React\EventLoop\Factory::create(); $context = new React\ZMQ\Context($loop); $sub = $context->getSocket(\ZMQ::SOCKET_SUB);
ise-uiuc/Magicoder-OSS-Instruct-75K
Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://opensource.org/licenses/MIT Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS"...
ise-uiuc/Magicoder-OSS-Instruct-75K
*/ public function attributeLabels() { return [
ise-uiuc/Magicoder-OSS-Instruct-75K
if self.speed >= self.topspeed: self.speed = self.topspeed if self.speed <= 0.1: self.speed = 0.1 self.pivot.rotation = self.rotation if self.drift_speed <= 20: self.drift_speed = 20 if self.drift_speed >= ...
ise-uiuc/Magicoder-OSS-Instruct-75K
case 0: return 'New'; case 1: return 'Confirmed'; case 2: return 'Rejected'; default: return 'None'; }
ise-uiuc/Magicoder-OSS-Instruct-75K
for i in range(len(fcgi_targets)): if ".py" in fcgi_targets[i]: healthcheck_targets[i] = fcgi_targets[i].split('.')[0] healthcheck_targets[i] = healthcheck_targets[i].split('_')[0] + "_py_" + healthcheck_targets[i].split('_', 1)[1] for target in healthcheck_targets:
ise-uiuc/Magicoder-OSS-Instruct-75K
print(tensor.size()) # size不是shape print(tensor.dim())
ise-uiuc/Magicoder-OSS-Instruct-75K
import { PlanFilterService, IPlansToServerFilter } from './plan.filter.service'; import { Observable } from 'rxjs'; import { IFilterDefinition, IFilterService } from '../shared/filtering/filter.service'; import { TraceMethodPosition } from '../shared/logging/logging.service'; @Component({ moduleId: module.id, ...
ise-uiuc/Magicoder-OSS-Instruct-75K
# Start CouchDB service sleep 3 /usr/local/bin/couchdb -b while ! nc -vz localhost 5984; do sleep 1; done # Create User echo "Creating user: \"$USER\"..." curl -X PUT http://127.0.0.1:5984/_config/admins/$USER -d '"'${PASS}'"' # Create Database if [ ! -z "$DB" ]; then echo "Creating database: \"$DB\"..." cur...
ise-uiuc/Magicoder-OSS-Instruct-75K
) @classmethod def get_by_cast_member(cls, cast_member_id: uuid.UUID) -> Union[Set[Video], None]: return ( cls.session.query(Video) .join(CastMember) .filter( orm.cast_members.c.id == cast_member_id, ) )
ise-uiuc/Magicoder-OSS-Instruct-75K
class LiveAuthenticator extends OAuth2Authenticator {
ise-uiuc/Magicoder-OSS-Instruct-75K
# Colors: # http://stackoverflow.com/questions/5412761/using-colors-with-printf/5413029#5413029 # http://stackoverflow.com/questions/4332478/read-the-current-text-color-in-a-xterm/4332530#4332530 NORMAL=$(tput sgr0) RED=$(tput setaf 1)
ise-uiuc/Magicoder-OSS-Instruct-75K
import Foundation import UIKit extension UIViewController { func showAlert(_ title: String, message: String) { let alertController = UIAlertController(title: title, message: message, preferredStyle: .alert) let defaultAction = UIAlertAction(title: "OK", style: .default, handler: nil) ...
ise-uiuc/Magicoder-OSS-Instruct-75K
return "eth_gasPrice" } public func response(from resultObject: Any) throws -> Wei { guard let response = resultObject as? String, let wei = Wei(hex: response.lowercased().stripHexPrefix()) else { throw JSONRPCError.unexpectedTypeObject(resultObject) ...
ise-uiuc/Magicoder-OSS-Instruct-75K
Return: A function, which is the hybridization function for superconductor with wideband approximation. ''' def hybri_wideband(w): E=sqrt(Gap**2-mu**2-(w+1j*eta)**2) if abs(w)<=D: if abs(mu)>0: res=-Gamma*(((w+1j*eta)/E)*identity(2)-(mu/E)*sz-(Gap/E)*sx) ...
ise-uiuc/Magicoder-OSS-Instruct-75K
dxFormat = DXGI_FORMAT_R32_SINT; break; } return dxFormat; }
ise-uiuc/Magicoder-OSS-Instruct-75K
@repository_controller.route('/representation/<path:object_id>/<rep_name>', methods=['GET'], strict_slashes=False) def get_representation(object_id, rep_name): """ Retrieve a representation of a cilantro (sub)object. Returns A JSON array containing all files of the representa...
ise-uiuc/Magicoder-OSS-Instruct-75K
sents = [] with open('CRF/msr_training.utf8', 'r') as f: for line in f.readlines(): sents.append(line.strip()) sents = [re.split(' +', s) for s in sents] # 词之间以空格隔开 sents = [[w for w in s if w] for s in sents] # 去掉空字符串 np.random.shuffle(sents) # 打乱语料,以便后面划分验证集
ise-uiuc/Magicoder-OSS-Instruct-75K
int tabSize,
ise-uiuc/Magicoder-OSS-Instruct-75K
level=${level^^} case $level in INFO|WARN|ERROR) ;;
ise-uiuc/Magicoder-OSS-Instruct-75K
Boolean disabled, Integer rank); public Pagination getAdminsByRoleId(Integer roleId, int pageNo, int pageSize); public CmsUser findById(Integer id); public CmsUser findByUsername(String username); public CmsUser registerMember(String username, String email, String password, String ip, Integer groupId,Int...
ise-uiuc/Magicoder-OSS-Instruct-75K
if e == mpsc::TryRecvError::Disconnected { break; }; } Ok(recieved) => match writeln!(std, "{}", recieved) { Err(e) => { println!("could not write: {}", e); break; } ...
ise-uiuc/Magicoder-OSS-Instruct-75K
docker rm apns-notifier
ise-uiuc/Magicoder-OSS-Instruct-75K
@property @memoized def data_types(self): return list(FixtureDataType.by_domain(self.domain))
ise-uiuc/Magicoder-OSS-Instruct-75K
<script src="{{ asset('js/account.js') }}"></script> @endsection @section('content') <div class="container">
ise-uiuc/Magicoder-OSS-Instruct-75K
get { return (int)Application.Current.Properties[nameof(Example)]; } set { Application.Current.Properties[nameof(Example)] = value; }
ise-uiuc/Magicoder-OSS-Instruct-75K
function Story() {
ise-uiuc/Magicoder-OSS-Instruct-75K
start_at = fuzzy.FuzzyDateTime( timezone.pytz.timezone('UTC').localize(timezone.datetime(2000, 1, 1)), timezone.pytz.timezone('UTC').localize(timezone.datetime(2020, 1, 1))) end_at = factory.LazyAttribute( lambda o: o.start_at + timezone.timedelta(hours=1))
ise-uiuc/Magicoder-OSS-Instruct-75K
cp "Data_Files/converterIdeologies.txt" "Release-Linux/converterIdeologies.txt" cp "Data_Files/converterLeaderTraits.txt" "Release-Linux/converterLeaderTraits.txt" cp "Data_Files/country_mappings.txt" "Release-Linux/country_mappings.txt" cp "Data_Files/cultureGroupToGraphics.txt" "Release-Linux/cultureGroupToGraphics.t...
ise-uiuc/Magicoder-OSS-Instruct-75K
self.execution_queue.append((function, args, kwargs))
ise-uiuc/Magicoder-OSS-Instruct-75K
@Override public String getErrorPath(){ return "/error"; }
ise-uiuc/Magicoder-OSS-Instruct-75K
<filename>run_bodypix_gl_imx.sh python3 bodypix_gl_imx.py --videosrc /dev/video1 --jpg --print-stats
ise-uiuc/Magicoder-OSS-Instruct-75K
self.exception = exception
ise-uiuc/Magicoder-OSS-Instruct-75K
if sig in wires: r += "wire " + _print_signal(ns, sig) + ";\n" else: r += "reg " + _print_signal(ns, sig) + " = " + _print_expression(ns, sig.reset)[0] + ";\n" r += "\n" return r # ------------------------------------------------------------------------------------------...
ise-uiuc/Magicoder-OSS-Instruct-75K
return "ebrains_drive.repo.Repo(id='{}', name='{}')".format(self.id, self.name) @classmethod def from_json(cls, client, repo_json): return cls(client, **repo_json)
ise-uiuc/Magicoder-OSS-Instruct-75K
# self.right = None class Solution:
ise-uiuc/Magicoder-OSS-Instruct-75K
h.append((keypoint_coords[0,i,:][1] - x0) / y_diff) h.append((- keypoint_coords[0,i,:][0] + y0) / y_diff)
ise-uiuc/Magicoder-OSS-Instruct-75K
assert!(Rc::try_unwrap(r2).is_ok()); } fn main() { rc_refcell(); rc_raw(); }
ise-uiuc/Magicoder-OSS-Instruct-75K
return len } } /** * 双指针(快慢指针) * @desc 时间复杂度 O(N) 空间复杂度O(1)
ise-uiuc/Magicoder-OSS-Instruct-75K
if (!unknown_fields().empty()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } } ::google::protobuf::uint8* DiscardRequest::SerializeWithCachedSizesToArray( ::google::protobuf::uint8* target) const { // required string message = 1; if (has_messa...
ise-uiuc/Magicoder-OSS-Instruct-75K
import pandas as pd from geopandas import GeoDataFrame, GeoSeries out = df.copy(deep=True) out[geom_col] = out[geom_col].apply(pShape) return pd.DataFrame(out, **kw) @_requires('geopandas') def to_gdf(df, geom_col='geometry', **kw): """ Convert a pandas dataframe with geometry column to a G...
ise-uiuc/Magicoder-OSS-Instruct-75K
from faker.providers import company, job, person, geo app = Flask(__name__)
ise-uiuc/Magicoder-OSS-Instruct-75K
depth1.Int.ShouldNotBeDefault(); var depth2 = depth1.RecursiveIEnumerable.FirstOrDefault(); depth2.RecursiveIEnumerable.ShouldNotBeDefault(); depth2.Int.ShouldNotBeDefault(); var depth3 = depth2.RecursiveIEnumerable.FirstOrDefault(); depth3.Recur...
ise-uiuc/Magicoder-OSS-Instruct-75K
'schechter_lf', ] from . import luminosity # noqa F401,F403 from . import morphology # noqa F401,F403 from . import redshift # noqa F401,F403 from . import spectrum # noqa F401,F403 from . import stellar_mass # noqa F401,F403
ise-uiuc/Magicoder-OSS-Instruct-75K