seed
stringlengths
1
14k
source
stringclasses
2 values
suite!( checked -> Option<i8> { // `const_checked_int_methods` C1: 5i8.checked_add(2), Some(7); C2: 127i8.checked_add(2), None; C3: 5i8.checked_sub(2), Some(3); C4: (-127i8).checked_sub(2), None; C5: 1i8.checked_mul(3), Some(3); C6: 5i8.checked_mul(122), None; C7: (-127i8).checked_mul(-99), None;
ise-uiuc/Magicoder-OSS-Instruct-75K
ilkSayi, ikinciSayi, ucuncuSayi = tuple2 a = [1, 2, 3, 4, 5]
ise-uiuc/Magicoder-OSS-Instruct-75K
public static func layoutNodes(_ nodes: [SKNode], alignment: Alignment, in rect: CGRect) { let points = positions(forItems: nodes, alignment: alignment, in: rect) for (node, point) in zip(nodes, points) { node.position = point } } // public func layoutChildren(_ nodes: [SKNode], alignment: Alignment, insets: UIEdgeInsets = UIEdgeInsets.zero) {
ise-uiuc/Magicoder-OSS-Instruct-75K
class Bot(commands.Bot): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) async def on_connect(self): print('[LOGS] Connecting to discord!')
ise-uiuc/Magicoder-OSS-Instruct-75K
"<=" : "LTEQ", "<-" : "ASSIGN", "=>" : "ARROW", }
ise-uiuc/Magicoder-OSS-Instruct-75K
variavel = 'valor' def funcao(): return 1
ise-uiuc/Magicoder-OSS-Instruct-75K
use Illuminate\Support\Collection; use Illuminate\Support\ServiceProvider as LaravelServiceProvider; class ServiceProvider extends LaravelServiceProvider
ise-uiuc/Magicoder-OSS-Instruct-75K
alarm_manager.alarms[2].set_hour(17); alarm_manager.alarms[2].set_min(30);
ise-uiuc/Magicoder-OSS-Instruct-75K
frappe.db.sql( """UPDATE `tabFees` SET estado_anulacion='Rechazado' WHERE name='{0}' and company='{1}'""".format( fee.name, fee.company)) frappe.db.commit()
ise-uiuc/Magicoder-OSS-Instruct-75K
let msg = schemes .iter() .enumerate() .map(|s| format!(" {}: {}\n", s.0, s.1.get_name())) .fold(
ise-uiuc/Magicoder-OSS-Instruct-75K
def __init__(self, path: str): super().__init__() self.path: str = path class DppArgparseInvalidEnvironment(DppArgparseError): def __init__(self, value: str): super().__init__( f"invalid environment variable format '{value}' (should be KEY=VALUE)" )
ise-uiuc/Magicoder-OSS-Instruct-75K
stats[row['AI']]['end'] += 1 if row['win'] == '1':
ise-uiuc/Magicoder-OSS-Instruct-75K
* * @return void */ public function down() { Schema::dropIfExists('vacinados'); } }
ise-uiuc/Magicoder-OSS-Instruct-75K
// print("PING terminationStatus: \(terminationStatus) ") switch terminationStatus { case 0: updateServerState(to: .up) break case 1: updateServerState(to: .down) break case 2: updateServerState(to: .notConnected) break default: break
ise-uiuc/Magicoder-OSS-Instruct-75K
expected_output = torch.full_like(data, fill_value=0.25, dtype=torch.float32) output = softmax(data, dim=-1) torch.testing.assert_allclose(output, expected_output)
ise-uiuc/Magicoder-OSS-Instruct-75K
class DashboardController extends Controller {
ise-uiuc/Magicoder-OSS-Instruct-75K
time.sleep(1) i = input("Done")
ise-uiuc/Magicoder-OSS-Instruct-75K
diff -y books.orig books.json
ise-uiuc/Magicoder-OSS-Instruct-75K
__all__ = ["Numbering"]
ise-uiuc/Magicoder-OSS-Instruct-75K
This is done by dissassembling the code objecte and returning line numbers.
ise-uiuc/Magicoder-OSS-Instruct-75K
except Exception as e: _LOGGER.error(self._config_name +': Connection Error: '+ str(e))
ise-uiuc/Magicoder-OSS-Instruct-75K
.wrap(middleware::NormalizePath::trim()) .app_data(Data::new(validation_options.clone())) .app_data(Data::new(jwks_r.clone())) .app_data(Data::new(context.clone())) .wrap(TracingLogger::<logging::RequestSpan>::new()) .service(healthz) .configure(controllers::configure) }); let server = server.bind(config.listen_addr)?; server.run().map_err(eyre::Report::from).await } #[get("/healthz")] async fn healthz() -> &'static str {
ise-uiuc/Magicoder-OSS-Instruct-75K
"""Given two binary strings, return their sum (also a binary string). For example, a = \"11\"
ise-uiuc/Magicoder-OSS-Instruct-75K
with open(f'../outputs/peacocktv2-{d}.txt', "w") as outfile:
ise-uiuc/Magicoder-OSS-Instruct-75K
from django.urls import path from . import views urlpatterns = [ path('text/analyze', views.TextAnalysisView().as_view(), name='text-analysis'), path('text/translate', views.TranslationView.as_view(), name='text-translation'), path('audio/analyze', views.AudioAnalysisView.as_view(), name='audio-analysis'), path('audio/transcribe', views.TranscriptionView.as_view(), name='audio-transcription'), ]
ise-uiuc/Magicoder-OSS-Instruct-75K
public protocol Coordinator: class { func start() }
ise-uiuc/Magicoder-OSS-Instruct-75K
$app->tpl->assign('ecommerce_pending_files', \PSU\Ecommerce::pending_files() ); $app->tpl->assign('ecommerce_pending', \PSU\Ecommerce::pending() ); $app->tpl->assign('ecommerce_files', \PSU\Ecommerce::file_info() ); $app->tpl->assign('ecommerce_report', \PSU\Ecommerce::report() ); $app->tpl->display('ecommerce.tpl'); }); respond('/process', function( $request, $response, $app ) { $user = PSU::isDev() ? 'nrporter' : 'webguru';
ise-uiuc/Magicoder-OSS-Instruct-75K
volume: float = 0 interval: str = '' def __init__(self, **kwargs): for key, value in kwargs.items(): setattr(self, key, value)
ise-uiuc/Magicoder-OSS-Instruct-75K
{{-- </div>--}} {{-- </div>--}} {{-- </div>--}} {{-- </div>--}} {{-- </div>--}} {{-- <div class="admin_notifications_block_item_my_profile">--}} {{-- <div class="admin_notifications_block_item_inner">--}}
ise-uiuc/Magicoder-OSS-Instruct-75K
def value(self): """Compute the Gamow factor.""" screening = self.kwargs.get('screening') or 0 A = self.larger.mass_number Z = self.larger.atomic_number - screening A4 = self.smaller.mass_number
ise-uiuc/Magicoder-OSS-Instruct-75K
async def reload(self, ctx, target_cog: str): """cmd 重新加載 插件<target_cog>。 """ find, msg = find_cog(self.bot, target_cog, 'reload') if find: return await ctx.send(msg) return await ctx.send( f':exclamation: There are no extension called {target_cog}!' ) @commands.command(aliases=['logout', 'shutdown']) @commands.has_any_role('總召', 'Administrator')
ise-uiuc/Magicoder-OSS-Instruct-75K
scope.push(ScopeType.Let, "LET", node.getFirstToken().getStart(), filename); for (const f of node.findDirectExpressions(Expressions.InlineFieldDefinition)) { new InlineFieldDefinition().runSyntax(f, scope, filename); } return true; }
ise-uiuc/Magicoder-OSS-Instruct-75K
codigo_compra = 5444 if codigo_compra == 5222: print("compra a vista.") elif codigo_compra == 5333:
ise-uiuc/Magicoder-OSS-Instruct-75K
// }); Auth::routes(); Route::get('/', 'HomeController@index')->name('home'); Route::get('/add-data', 'HomeController@addData'); Route::get('/room', 'HomeController@rooms')->name('room'); Route::get('/renting', 'HomeController@rentings')->name('renting');
ise-uiuc/Magicoder-OSS-Instruct-75K
def __init__(self, val): self.val = val # Does not work: https://stackoverflow.com/questions/26472066/gdb-pretty-printing-returning-string-from-a-childrens-iterator-but-displaye/29752860 def children(self): rows = self.val.type.template_argument(1) cols = self.val.type.template_argument(2) data = self.val["m_data"] for y in range(rows): line = '' for x in range(cols): idx = x+y*cols
ise-uiuc/Magicoder-OSS-Instruct-75K
refresh_token = socAuth.extra_data.get( 'refresh_token', socAuth.extra_data['access_token']) makerequest.post( 'https://accounts.google.com/o/oauth2/revoke?token=' + refresh_token) request.user.delete()
ise-uiuc/Magicoder-OSS-Instruct-75K
def tearDown(self): os.close(self.db_fd) os.unlink(app.app.config['DATABASE']) if __name__ == '__main__': unittest.main()
ise-uiuc/Magicoder-OSS-Instruct-75K
Console.Write("Total Age : {0}", totalAge); } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
start: 0, end: 100 }, { start: 0, end: 100 }], series: [{ name: 'Temperature', type: 'line', smooth: true,
ise-uiuc/Magicoder-OSS-Instruct-75K
plt.xlabel("No.")
ise-uiuc/Magicoder-OSS-Instruct-75K
} attributes = Attributes( manifest['attributes'], database, args.cleanup, args.key_string, **globaloptions ) if not os.path.exists(args.repositories_root):
ise-uiuc/Magicoder-OSS-Instruct-75K
def test_detail_builder_init(): tweet = Tweet() detail_builder = DetailBuilder(tweet) assert tweet == detail_builder.tweet assert 'blog' == detail_builder.default_detail_type def test_build_details(): expected_title = 'full_text'
ise-uiuc/Magicoder-OSS-Instruct-75K
# Copyright 2021 <NAME> (@luisblazquezm) # See LICENSE for details. from flask_restx import Api
ise-uiuc/Magicoder-OSS-Instruct-75K
for i in range(len(m2),len(m1)): out.append(m1[i]) return self.pylist_to_listnode(out[::-1], len(out))
ise-uiuc/Magicoder-OSS-Instruct-75K
self.abort = True self.thread.join() def set_interval(self, intvl=None, wait_period=None): """ wait interval must greater than interval """ interval = intvl if intvl else self.interval wait_period = wait_period if wait_period else self.wait if interval <= 0 or wait_period < interval:
ise-uiuc/Magicoder-OSS-Instruct-75K
self.liveGameDiffPatchV1, self.liveTimestampv11,
ise-uiuc/Magicoder-OSS-Instruct-75K
return v if v is not None else values["created_at"] has_password: bool = Field( True, description="Indicates if the user log in with password or SSO", )
ise-uiuc/Magicoder-OSS-Instruct-75K
# Normalised waveforms plt.axes([.725, .05, .2, .175]) plt.plot(-np.sin(lin_phase), color=cols[0]) plt.plot(-np.sin(nonlin_phase), color=cols[1]) plt.xticks(np.arange(5)*12, []) plt.grid(True) plt.legend(['Linear', 'Nonlinear']) decorate_ax(plt.gca()) plt.ylim(-1, 1) plt.xlim(0, 4*12) plt.yticks(np.linspace(-1, 1, 3)) plt.title('Normalised Waveforms') outname = os.path.join(config['figdir'], 'emd_fig5_shape_compare.png') plt.savefig(outname, dpi=300, transparent=True)
ise-uiuc/Magicoder-OSS-Instruct-75K
rm -rf g3log-install g3log build mkdir g3log-install && cd g3log-install # TEMPORARY normally this should be master git clone https://github.com/KjellKod/g3log.git cd g3log mkdir -p build_travis cd build_travis cmake -DADD_G3LOG_UNIT_TEST=OFF -DG3_SHARED_LIB=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/usr/local -DCMAKE_INSTALL_PREFIX=/usr/local ..
ise-uiuc/Magicoder-OSS-Instruct-75K
if len(items) > 1: mid = len(items) // 2 # Determine the midpoint and split left = items[0:mid] right = items[mid:] merge_sort(left) # Sort left list in-place merge_sort(right) # Sort right list in-place l, r = 0, 0 for i in range(len(items)): # Merging the left and right list lval = left[l] if l < len(left) else None
ise-uiuc/Magicoder-OSS-Instruct-75K
namespace Ion.Testing { [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false)] [TraitDiscoverer(SystemTestDiscoverer.TypeName, AssemblyInfo.Name)]
ise-uiuc/Magicoder-OSS-Instruct-75K
void notifyAddingSubscription(Subscription subscription); }
ise-uiuc/Magicoder-OSS-Instruct-75K
public bool NegTest(int id, byte[] inArray, Type exception) { bool retVal = true; TestLibrary.TestFramework.BeginScenario("NegTest"+id+": ToBase64String(byte[]) (ex:"+exception+")"); try
ise-uiuc/Magicoder-OSS-Instruct-75K
url(r'^comment/(?P<pk>\d+)/approve/$', views.comment_approve, name='comment_approve'), url(r'^comment/(?P<pk>\d+)/remove/$', views.comment_remove, name='comment_remove'), url(r'^acercademi/$', views.acerca_de_mi, name='acerca_de_mi'), ]
ise-uiuc/Magicoder-OSS-Instruct-75K
svg: ({ classes }) => ( <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2048 2048" className={classes.svg}> <path d="M1728 512q66 0 124 25t101 69 69 102 26 124v292q-20-50-53-93t-75-76V832q0-40-15-75t-41-61-61-41-75-15H320q-40 0-75 15t-61 41-41 61-15 75v320h1152v128H0V832q0-66 25-124t68-101 102-69 125-26h1408zm64 256v128h-128V768h128zm-256 128h-128V768h128v128zm128 128q53 0 99 20t82 55 55 81 20 100v128h128v640h-768v-640h130v-128q1-53 20-99t54-82 80-55 100-20zm-128 384h256v-128q0-27-10-50t-27-40-41-28-50-10q-27 0-50 10t-40 27-28 41-10 50v128zm384 128h-512v384h512v-384z" /> </svg> ), displayName: 'HardDriveLockIcon', }); export default HardDriveLockIcon;
ise-uiuc/Magicoder-OSS-Instruct-75K
return f"{self.date.strftime('%d/%m')} {self.start_time.strftime('%H:%M')}-{self.end_time.strftime('%H:%M')}" else: return f"{self.date.strftime('%d/%m')} Not available!"
ise-uiuc/Magicoder-OSS-Instruct-75K
# status = me.initial_state(me, event) # assert status == Hsm.RET_TRAN # But the above code is commented out so an Ahsm's _initial() # isn't executed twice. me.state = Hsm._perform_init_chain(me, Hsm.top)
ise-uiuc/Magicoder-OSS-Instruct-75K
Vectorization matches when all the input and output memlets of a tasklet inside a map access the inner-most loop variable in their last dimension. The transformation changes the step of the inner-most loop
ise-uiuc/Magicoder-OSS-Instruct-75K
DEFINE_EXECUTE_CMD(ObXaStartStmt, ObXaStartExecutor); break; } case stmt::T_XA_END: { DEFINE_EXECUTE_CMD(ObXaEndStmt, ObXaEndExecutor);
ise-uiuc/Magicoder-OSS-Instruct-75K
<gh_stars>10-100 #!/bin/sh # This script invokes cuew_gen.py and updates the # header and source files in the repository. SCRIPT=`realpath -s $0` DIR=`dirname $SCRIPT`
ise-uiuc/Magicoder-OSS-Instruct-75K
if [ ! -L "${SCRIPT_DIR}" ]; then GPDB_DIR=$(basename "${SCRIPT_DIR}")
ise-uiuc/Magicoder-OSS-Instruct-75K
return self.deref(left).convert_unary_op(op) def convert_attribute(self, context, instance, attr): return self.deref(instance).convert_attribute(attr) def convert_getitem(self, context, instance, key): return self.deref(instance).convert_getitem(key) def convert_setitem(self, context, instance, key, val): return self.deref(instance).convert_setitem(key, val) def convert_method_call(self, context, instance, methodname, args, kwargs): return self.deref(instance).convert_method_call(methodname, args, kwargs)
ise-uiuc/Magicoder-OSS-Instruct-75K
HeaderView.Visibility = Visibility.Visible; UserManagementView.Visibility = Visibility.Visible; HeaderView.UiTitel = "User Management"; break; case UiState.PluginManagement: Width = 1100; Height = 600; HeaderView.Visibility = Visibility.Visible; PluginManagementView.Visibility = Visibility.Visible; HeaderView.UiTitel = "Plugin Management"; break; case UiState.SourceManagement: Width = 1100; Height = 600; HeaderView.Visibility = Visibility.Visible;
ise-uiuc/Magicoder-OSS-Instruct-75K
parser = argparse.ArgumentParser(description='Computes coverage in bigWig and/or bedGraph format from input BAM.') parser.add_argument('bam_file', help='Input BAM file') parser.add_argument('chr_sizes', help='Chromosome sizes for the reference genome used') parser.add_argument('prefix', help='Prefix for output file names') parser.add_argument('--intersect', default=None, type=str, help='BED file containing intervals to calculate coverage on') parser.add_argument('-f', '--format', default=['bigwig'], type=str.lower, nargs='+', choices=['bigwig', 'bedgraph']) parser.add_argument('--sam_flags', default='-F 768', help='Flags for samtools. Default: filter out secondary and QC-failed reads') parser.add_argument('-o', '--output', default='.', help='Output directory') args = parser.parse_args() print('['+datetime.now().strftime("%b %d %H:%M:%S")+'] Starting coverage computation', flush=True) print(' * generating bedGraph from BAM', flush=True) # bedGraph file must be sorted for compatibility with bedGraphToBigWig
ise-uiuc/Magicoder-OSS-Instruct-75K
sleep(1) # pause for one second # write the csv filename = "cn-metadata.csv" with open(filename, "w") as csvfile: writer = csv.DictWriter(csvfile, fieldnames = fields) writer.writeheader() writer.writerows(rows)
ise-uiuc/Magicoder-OSS-Instruct-75K
for game_level in game_levels[:20]: src_path = os.path.join(target_level_path,level,capability,template,game_level) dst_path = os.path.join(origin_level_path, game_level) copyfile(src_path, dst_path) total_template_level_path.append(os.path.join(game_level_path, game_level)) parser = etree.XMLParser(encoding='UTF-8') game_config = etree.parse(game_config_path, parser=parser)
ise-uiuc/Magicoder-OSS-Instruct-75K
with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
ise-uiuc/Magicoder-OSS-Instruct-75K
) def test_aggregation_operator_with_reruns(self): self.conf.with_reruns() self.build_dags().execute('aggregate_test_aggregation') self.engine.aggregate.assert_called_with(
ise-uiuc/Magicoder-OSS-Instruct-75K
compile_and_fit(linear, single_step_window)
ise-uiuc/Magicoder-OSS-Instruct-75K
set -xeou pipefail
ise-uiuc/Magicoder-OSS-Instruct-75K
if test_case.home_pg.is_logged_in:
ise-uiuc/Magicoder-OSS-Instruct-75K
'db_table': 'device', 'ordering': ['-id'], }, ), ]
ise-uiuc/Magicoder-OSS-Instruct-75K
namespace OpenLoyalty\Component\Customer\Infrastructure\Provider; use OpenLoyalty\Component\Customer\Domain\CustomerId; use OpenLoyalty\Component\Customer\Domain\ReadModel\CustomerDetails; use OpenLoyalty\Component\Customer\Domain\ReadModel\CustomerDetailsRepository; /** * Class CustomerDetailsProvider. */ class CustomerDetailsProvider implements CustomerDetailsProviderInterface { /** * @var CustomerDetailsRepository
ise-uiuc/Magicoder-OSS-Instruct-75K
get
ise-uiuc/Magicoder-OSS-Instruct-75K
def linear_ising_schedule(model, beta, gamma, num_sweeps): """Generate linear ising schedule. Args: model (:class:`openjij.model.model.BinaryQuadraticModel`): BinaryQuadraticModel beta (float): inverse temperature gamma (float): transverse field num_sweeps (int): number of steps Returns: generated schedule """ schedule = cxxjij.utility.make_transverse_field_schedule_list( beta=beta, one_mc_step=1, num_call_updater=num_sweeps
ise-uiuc/Magicoder-OSS-Instruct-75K
def create_page(self): hash_message = self.generate_hash() self.site = 'http://dontpad.com/'+hash_message+"/control" return self.site if __name__ == '__main__': p = Page() print p.create_page()
ise-uiuc/Magicoder-OSS-Instruct-75K
public interface IDeleteFrom { /// <summary> /// Specifies the table to delete from. /// </summary> /// <param name="table">The name of the table.</param> /// <returns>The next step in the fluent sql builder.</returns> IWhere From(string table); /// <summary> /// Specifies the type to delete.
ise-uiuc/Magicoder-OSS-Instruct-75K
""" weight penalty for conflicts of horizontal line segments.""" CONFLICT_PENALTY = 16 """ :ivar routingStrategy: routing direction strategy. :ivar edgeSpacing: spacing between edges. :ivar conflictThreshold: threshold at which conflicts of horizontal line segments are detected. :ivar createdJunctionPoints: set of already created junction points, to adef multiple points at the same position.
ise-uiuc/Magicoder-OSS-Instruct-75K
test(Person, OldYears), NewYears.is_(OldYears + Years) ) hello(Person, Years).terminates(test(Person, OldYears)) execute(debug=False) show_kb_log()
ise-uiuc/Magicoder-OSS-Instruct-75K
Some(release) => releases.push(String::from(release)), None => continue }; }
ise-uiuc/Magicoder-OSS-Instruct-75K
self.frame_top_right.setFrameShape(QtWidgets.QFrame.NoFrame) self.frame_top_right.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_top_right.setObjectName("frame_top_right") self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.frame_top_right) self.verticalLayout_2.setContentsMargins(0, 0, 0, 0) self.verticalLayout_2.setSpacing(0) self.verticalLayout_2.setObjectName("verticalLayout_2") self.frame_top_btns = QtWidgets.QFrame(self.frame_top_right) self.frame_top_btns.setMaximumSize(QtCore.QSize(16777215, 42)) self.frame_top_btns.setStyleSheet("background-color: rgba(27, 29, 35, 200)") self.frame_top_btns.setFrameShape(QtWidgets.QFrame.NoFrame) self.frame_top_btns.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_top_btns.setObjectName("frame_top_btns") self.horizontalLayout_4 = QtWidgets.QHBoxLayout(self.frame_top_btns) self.horizontalLayout_4.setContentsMargins(0, 0, 0, 0)
ise-uiuc/Magicoder-OSS-Instruct-75K
Verbosity = cms.untracked.int32(0), firstRun = cms.untracked.uint32(1) ) process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1) ) process.p1 = cms.Path(process.generator*process.VtxSmeared*process.generatorSmeared*process.g4SimHits) process.g4SimHits.UseMagneticField = False
ise-uiuc/Magicoder-OSS-Instruct-75K
# Maybe you should have a config file that controls it. It takes a .include # file and then whitelist/blacklist, and then generates a new one. # could put it in build/pydefs-config.txt # # And then reprint the PyMethoDef without docstrings? It shouldn't be that # hard to parse. You can almost do it with a regex, since commas don't appear # in the string. extract-defs() { # NOTE: PyMemberDef is also interesting, but we don't need it for the build. gawk ' /static PyMethodDef/ {
ise-uiuc/Magicoder-OSS-Instruct-75K
# run server su prisoner -s /app/asgi-webdav.py python
ise-uiuc/Magicoder-OSS-Instruct-75K
captcha_solve_fnc = captcha.tkinter_user_prompt d = downloader.Downloader(captcha_solve_fnc) # Register sigint handler def sigint_handler(sig, frame): d.terminate() print('Program terminated.') sys.exit(1) signal.signal(signal.SIGINT, sigint_handler)
ise-uiuc/Magicoder-OSS-Instruct-75K
public Integer getMaxAge() { return maxAge;
ise-uiuc/Magicoder-OSS-Instruct-75K
for thread in threads: thread.join() print('Udah pada balik!') if __name__ == "__main__": main()
ise-uiuc/Magicoder-OSS-Instruct-75K
return DataInfo(dataloader, sampler) def count_samples(dataloader): os.environ["WDS_EPOCH"] = "0" n_elements, n_batches = 0, 0 for images, texts in dataloader: n_batches += 1 n_elements += len(images) assert len(images) == len(texts) return n_elements, n_batches
ise-uiuc/Magicoder-OSS-Instruct-75K
local err=$1 shift if [[ $err -ne 0 ]]; then exit_error "$@" fi }
ise-uiuc/Magicoder-OSS-Instruct-75K
template <class TFunctor> void ForEachMapping(TFunctor toDo) { for_each(m_mapping.begin(), m_mapping.end(), toDo); }
ise-uiuc/Magicoder-OSS-Instruct-75K
* The console command description. * * @var string */ protected $description = 'Sends Test Emails to check templates'; /** * Create a new command instance.
ise-uiuc/Magicoder-OSS-Instruct-75K
public class StringToLocalDateTimeConverter implements Converter<String, LocalDateTime> { @Override public LocalDateTime convert(String s) { return LocalDateTime.parse(s); }
ise-uiuc/Magicoder-OSS-Instruct-75K
$table->string('series'); $table->integer('quantity'); $table->decimal('price', 9,2); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */
ise-uiuc/Magicoder-OSS-Instruct-75K
#include <cmath> #include <boost/safe_float.hpp> #include <boost/safe_float/convenience.hpp> #include <boost/safe_float/policy/check_addition_overflow.hpp> #include <boost/safe_float/policy/check_addition_underflow.hpp> #include <boost/safe_float/policy/check_addition_inexact.hpp> #include <boost/safe_float/policy/check_addition_invalid_result.hpp> //types to be tested using test_types=boost::mpl::list< float, double, long double
ise-uiuc/Magicoder-OSS-Instruct-75K
default: next(action) break } }
ise-uiuc/Magicoder-OSS-Instruct-75K
if settings.DEBUG: urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
ise-uiuc/Magicoder-OSS-Instruct-75K
estimate_hit = []
ise-uiuc/Magicoder-OSS-Instruct-75K
* Converts the input into the output type * @param src The original object * @return The output object */ T convert(F src); }
ise-uiuc/Magicoder-OSS-Instruct-75K
hor_axis: int = 0 depth: int = 0 for instruction in instructions: match instruction[0]: case "forward": hor_axis += instruction[1] case "up": depth -= instruction[1] case "down": depth += instruction[1] return hor_axis * depth
ise-uiuc/Magicoder-OSS-Instruct-75K
public override string HeaderColor { get; set; } = "hsla(0,0%,0%,0.87)"; public override string BodyColor { get; set; } = "hsla(0,0%,0%,0.78)"; public override string BodyWeight { get; set; } = "300"; public override List<string> HeaderFontFamily { get; set; } = new List<string> { "Helvetica Neue",
ise-uiuc/Magicoder-OSS-Instruct-75K