MixCPT
Collection
Rethinking Multilingual Continual Pretraining: Data Mixing for Adapting LLMs Across Languages and Resources • 41 items • Updated • 1
text stringlengths 27 775k |
|---|
<?php
namespace App\Model\Settings;
use Illuminate\Database\Eloquent\Model;
use App\Model\Tables\TableConsumer;
class SystemInvoice extends Model
{
// protected $connection = 'settings';
protected $table = 'system_invoice';
protected $primaryKey = 'invoice_id';
public $timestamps = false;
pu... |
#![allow(non_camel_case_types)]
use crate::{
arch,
arch::{Architecture, NativeArch},
bindings::{kernel, kernel::sock_filter, signal},
kernel_abi::{common, Ptr},
};
use std::mem::{self, size_of};
#[repr(C)]
pub struct robust_list<Arch: Architecture> {
pub next: Ptr<Arch::unsigned_word, robust_list<... |
{-# LANGUAGE DataKinds, DefaultSignatures, DeriveGeneric, FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses, PolyKinds, TypeFamilies, TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
module Main where
import Data.Type.Natural ((:*), (:+), Nat (..), One)
import Da... |
package kr.feliz.tutorial_collection.lemonfox.widget.net
import kr.feliz.tutorial_collection.BuildConfig
import okhttp3.OkHttpClient
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory
import retrofit2.converter.scalars.ScalarsConverterFactory
object RetrofitClient {
val chart: Retrofit
... |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module Main where
import Control.Monad
import Control.Monad.Primitive
import Data.ByteString (ByteString)
import qualified Data.ByteString.Char8 as BSC
import Data.Maybe
import ... |
use embedded_ccs811::{prelude::*, FirmwareMode as FwMode};
use embedded_hal_mock::{
i2c::Transaction as I2cTrans,
pin::{Mock as PinMock, State as PinState, Transaction as PinTrans},
};
mod common;
use crate::common::{destroy, new, BitFlags as BF, Register, DEV_ADDR};
#[test]
fn can_create_and_destroy() {
l... |
package baishuai.github.io.smsforward.forward
import baishuai.github.io.smsforward.forward.feige.FeigeApi
import baishuai.github.io.smsforward.forward.slack.SlackApi
import dagger.Subcomponent
import javax.inject.Singleton
/**
* Created by bai on 17-5-1.
*/
@Singleton
@Subcomponent(modules = arrayOf(ForwardModule:... |
import User from '../../src/models/Users'
import UserService from '../../src/services/user'
import * as dbHelper from '../db-helper'
const nonExistingUserId = '8ef5ad63b53b57dd876d6908'
async function createUser() {
const user = new User({
username: 'TravisKudix',
firstname: 'Travis',
lastname: 'Kudix',... |
package com.seanshubin.kotlin.tryme.domain.parser
interface Tree<T> {
val name: String
fun values(): List<T>
fun toLines(depth: Int = 0): List<String>
fun indent(s: String, depth: Int) = " ".repeat(depth) + s
}
|
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { AnnouncementService } from '@sunbird/core';
import { ResourceService, ToasterService, RouterNavigationService, ServerResponse } from '@sunbird/shared';
import * as _ from 'lodash';
import { IAnnouncementDetails... |
/*
Navicat MySQL Data Transfer
Source Server : qqbaby
Source Server Version : 50553
Source Host : localhost:3306
Source Database : qqbaby_db
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2017-09-08 20:54:42
*/
SET FOREIGN_KEY_CHECKS=0;
-- --... |
import * as React from 'react';
import * as renderer from 'react-test-renderer';
import HomeScreen from './HomeScreen';
it('renders without crashing', () => {
const rendered = renderer.create(<HomeScreen />).toJSON();
expect(rendered).toBeTruthy();
});
|
<!--- 请清晰详细地描述你遇到的问题,描述问题时请给出芯片/BSP/工具链,RT-Thread版本,复现步骤及现象或者有条理地描述你的问题。在问题得到解决后,请及时关闭issue。欢迎到论坛提问:https://club.rt-thread.org/ -->
<!--- Please describe your problem clearly and in detail. When describing the problem, please use numbers or bullet points to describe your problem coherently. After the problem is resolv... |
require "rubygems"
require "sinatra"
require "twitter"
require "hashie"
require "haml"
require "coffee-script"
require "yaml"
class ProTweets < Sinatra::Application
configure do
@config = Hashie::Mash.new(YAML.load_file(File.join(File.dirname(__FILE__), 'config', 'config.yml')))
Twitter.configure do |conf|... |
import { Mutation } from './mutation'
import { CommandClass, OptionClass } from '../interfaces'
import { metadata, handlers } from '../constants/metadata'
export interface CommandFunctionMap {
[key: string]: CommandClass
}
export interface OptionFunctionMap {
[key: string]: OptionClass
}
export type ContainerPar... |
# Copyright 2018 Battelle Energy Alliance, LLC
#===============================================================================
#
# FILE: Parse_LM_data.pm
#===============================================================================
use strict;
use warnings;
package Parse_LM_Data;
use Data::Du... |
(function () {
Fight.update = function (fight) {
var time = fight.time,
ship = fight.ship,
zone = fight.zone,
bullets = fight.bullets;
var i, l;
Ship.update(ship, {
zone: zone,
time: time,
bullets: bullets,
... |
#!/bin/sh
VERSION=0.0.1
IMAGE=ynishi/htmlserver
docker build -t ${IMAGE}:${VERSION} . --no-cache
docker tag ${IMAGE}:${VERSION} ${IMAGE}:latest
|
import torch
img3D = torch.rand(size=[1, 1, 128, 128, 128], dtype=torch.float32).cuda()
img2D = torch.rand(size=[1, 1, 128, 128], dtype=torch.float32).cuda()
############# unet #######################
from segmentation_models import Unet
model = Unet(dimension=3, channel_in=1, backbone_name='vgg19', basefilter=64, cla... |
## call()和apply()
### 介绍
这两个方法都是函数对象的方法,需要通过函数对象来调用。
当函数调用call()和apply()时,函数都会立即**执行**。
- 都可以用来改变函数的this对象的指向。
- 第一个参数都是this要指向的对象(函数执行时,this将指向这个对象),后续参数用来传实参。
### 显式绑定this
JS提供的绝大多数函数以及我们自己创建的所有函数,都可以使用call 和apply方法。
它们的第一个参数是一个对象。因为你可以直接指定 this 绑定的对象,因此我们称之为显式绑定。
例1:
```javascript
function foo() {
... |
INSERT INTO filter (id, enabled, evaluation_strategy, name) VALUES (0, FALSE, 'ALL_MATCH', 'default');
INSERT INTO predicate (id) VALUES (0);
INSERT INTO numerical_predicate (condition, fixed_operand, id) VALUES ('EQUAL', 0, 0);
INSERT INTO filter_predicates (filter_id, predicates_id) VALUES (0, 0);
|
@extends('admin.master.master')
@section('title')
{{ $type->pt_name }} - Admin
@endsection
@section('my-posts')
{{-- breadcrumb --}}
{{-- @include('../comps.blog_breadcrumb') --}}
<!-- Image Showcases -->
@if ($posts->count()>0)
@include('admin.comps.posts_list')
@else
<di... |
CREATE TABLE list (id VARCHAR(2) NOT NULL, value VARCHAR(64) NOT NULL, PRIMARY KEY(id));
INSERT INTO "list" ("id", "value") VALUES ('af', 'afrikaans');
INSERT INTO "list" ("id", "value") VALUES ('af_NA', 'afrikaans (Namíbia)');
INSERT INTO "list" ("id", "value") VALUES ('af_ZA', 'afrikaans (República de Sud-àfrica)');... |
package com.jaoafa.MyMaid3.Task;
import com.jaoafa.MyMaid3.Lib.MyMaidLibrary;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.potion.PotionEffectType;
import org.bukkit.scheduler.BukkitRunnable;
public class Task_DisableInvisible extends BukkitRunnable {
@Override
public void run(... |
package cn.hi321.browser.ui.activities;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import cn.hi321.browser2.R;
import com.umeng.analytics.MobclickAgent;
import com.umeng.analytics.ReportPolicy;
/**
* 启动页面
*
* @author yanggf
*
*/
public clas... |
#!/usr/bin/env bash
psearch -o "$1" | gsed -r 's/^([^ ]+) .*/\1/' | fgrep -v "`~/Scripts/listInstalledPorts.sh`"
|
const {MessageEmbed} = require('discord.js');
const {Shop, Category} = require('../../misc/dbObjects');
const {Minor} = require('../../misc/tools');
const {Op} = require('sequelize');
/*
This command doesnt remove the item from the actual shop but instead hides it from visibility.
This is done so that if items ... |
# expand-string
[![npm Version][npm-image]][npm-url]
[![npm Downloads][downloads-image]][downloads-url]
[![Test Status][travis-image]][travis-url]
[![Test Coverage][coveralls-image]][coveralls-url]
[![MIT Licensed][license-image]][license-url]
Range based string expansion.
```js
const expandString = require('expand-... |
package api
import (
"github.com/gorilla/mux"
uuid "github.com/satori/go.uuid"
"github.com/stackpath/backend-developer-tests/rest-service/pkg/models"
"net/http"
"strings"
)
// getPersonById router handler function to get Person by ID
func (app *Application) getPersonById(w http.ResponseWriter, r *http.Request) {... |
module Stompede
class Session
attr_accessor :connected, :disconnected, :server_heart_beats, :client_heart_beats
def initialize(connector, options = {})
@connector = connector
@subscriptions = {}
@mutex = Mutex.new
@server_heart_beats = options[:server_heart_beats] || [0, 0]
@cli... |
import {InitialState, NavigationContainerRef, NavigationContainer} from '@react-navigation/native';
import AsyncStorage from '@react-native-community/async-storage';
import * as React from 'react';
import {InteractionManager} from 'react-native';
interface DevPersistedNavigationContainerProps extends React.ComponentPr... |
require 'test_helper'
class Blog::Api::V1::CategoriesControllerTest < ActionController::TestCase
def setup
@controller = Blog::Api::V1::CategoriesController.new
@routes = Blog::Engine.routes
end
# GET #index
test 'GET #index returns all the categories' do
result = json_parsed('index', 10, 'catego... |
require 'spec_helper'
describe Hedwig::Api::Attractions do
let(:attractions) { described_class }
describe ".by_location", vcr: { cassette_name: 'location-attractions' } do
let(:id) { 150807 }
let(:options) { { lang: 'en_US' } }
let(:resource) { "location/#{id}/attractions" }
subject { attraction... |
%%%
%%% Copyright (c) 2015-2021 Klarna Bank AB (publ)
%%%
%%% 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... |
<?php
namespace App\Http\Controllers\admin;
use App\Http\Controllers\Controller;
use App\Models\User;
use App\Models\Wilayah;
use Illuminate\Http\Request;
use Yajra\DataTables\Facades\DataTables;
class PelangganAdminController extends Controller
{
function main()
{
$data['title'] = 'Data Pelanggan &m... |
import { computed, reactive } from 'vue';
import { useQuery } from 'vue-query';
import { QueryObserverOptions } from 'react-query/core';
import useTokens from '@/composables/useTokens';
import { useStore } from 'vuex';
import { pick } from 'lodash';
import QUERY_KEYS from '@/constants/queryKeys';
import BalancerCont... |
use std::fs::{remove_file, File, OpenOptions};
use std::io::prelude::*;
use std::ops::Deref;
use std::os::unix::fs::OpenOptionsExt;
use std::path::{Component, Path};
use std::process::Command;
use std::sync::Arc;
use chrono::{DateTime, Local};
use chrono_tz::Tz;
use eui48::MacAddress;
use serde::{Deserialize, Serializ... |
require 'spec_helper'
require 'pathname'
require 'active_support/core_ext/object/blank'
describe UniqueHtmlExtractonator do
it 'has a version number' do
expect(UniqueHtmlExtractonator::VERSION).not_to be nil
end
let(:root_path) { Pathname.new File.realpath('.', File.dirname(__FILE__)) }
def fixture_read(... |
import React from "react";
import { Button } from "reactstrap";
import "./post-status-filter.css";
const PostStatusFilter = () => {
return (
<div className="btn-group">
<Button color="info">Все</Button>
{/* <button type="button" className="btn btn-info">
Все
</button> */}
<butto... |
/* Style Changer */
jQuery(document).ready(function(){
/* Style Changer Autohide */
jQuery('.chBut').parent().delay(1000).animate({left:'-180px'}, 500, function(){
jQuery(this).find('.chBut').next('.chBody').css({display:'none'});
jQuery(this).find('.chBut').addClass('closed');
});
/* Style Changer To... |
package com.onegravity.bloc.posts_compose
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.material.Divider
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import com.onegravity.bloc.sample.posts.domain.repositories.... |
package common
import (
"github.com/mitchellh/packer/template/interpolate"
)
type PrlctlConfig struct {
Prlctl [][]string `mapstructure:"prlctl"`
}
func (c *PrlctlConfig) Prepare(ctx *interpolate.Context) []error {
if c.Prlctl == nil {
c.Prlctl = make([][]string, 0)
}
return nil
}
|
#!/usr/bin/env bash
export ENV_STATE=test
# pytest -vv
pytest --cov --cov-fail-under=80 -vv --cov-report html
|
import React from 'react';
import {Route, Redirect} from '../lib/react-router-dom';
function Protected(props: any) {
const {component: RouteComponent, path} = props
return (
// todo:逻辑,当用户登录了,就渲染Component,如果没有登录,就不渲染这个Component
<div>
<Route path={path} render={
(routeProps: any) => {
... |
using BanBrick.TypeScript.CodeGenerator.Convertors;
using BanBrick.TypeScript.CodeGenerator.Enums;
using BanBrick.TypeScript.CodeGenerator.Extensions;
using BanBrick.TypeScript.CodeGenerator.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BanBrick.TypeScript.Cod... |
import {LanguageId, NewLanguageInput, EditLanguageInput} from '../../graphql';
import FieldSet from '../field-set';
import {DescriptionMut} from '../description';
import {SearchIndexMut} from '../search-index';
import {DefinitionMut} from '../definition';
import {LemmaMut} from '../lemma';
import {PartOfSpeechMut} fro... |
from flask import Flask, jsonify
app = Flask(__name__)
@app.route('/', methods=['GET'])
def hello_rest():
return jsonify({
"greeting": "Hello REST World"
})
@app.route('/add/<a>/<b>', methods=['GET'])
def add(a, b):
return jsonify({
"a": a,
"b": b,
"addition": int(a) + ... |
No dataset card yet