seed stringlengths 1 14k | source stringclasses 2
values |
|---|---|
}
function StoreIcon({ store }: { store: DimStore }) {
return (
<>
<img
src={store.icon}
height="32"
width="32"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return fieldName + ' must be at least ' + lowerBound
| ise-uiuc/Magicoder-OSS-Instruct-75K |
TITLE = "Fade out volume (%)"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
/// 获取字符串 width
///
/// - Parameters:
/// - str: 字符串 (可选)
/// - attriStr: 富文本 (可选)
/// - font: 字体大小
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
balance
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import unittest
import flask_testing
| ise-uiuc/Magicoder-OSS-Instruct-75K |
func localRead() { list = JSON.parse([Alarm].self, localStorage.string(forKey: "alarms")!)! }
/// Read an alarm object from local storage
static func fromLocal() -> Alarms { return Alarms().apply { $0.localRead() } }
| ise-uiuc/Magicoder-OSS-Instruct-75K |
is_low = matrix[x][y] < min(matrix[x][y - 1], matrix[x][y + 1])
except IndexError:
if y < n - 1:
is_low = matrix[x][y] < matrix[x][y + 1]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
alea_1=random.randint(0,len(indiv)-1)
alea_2 = random.randint(0, len(indiv)-1)
interc_1=indiv[alea_1]
interc_2=indiv[alea_2]
indiv[alea_1] = interc_2
indiv[alea_2] = interc_1
return indiv
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#
# Project: Atmosphere, iPlant Collaborative
# Author: <NAME>
# Twitter: @seungjin
# GitHub: seungjin
#
from atmosphere.cloudservice.models import *
class User(object) :
"""
User object
"""
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Доступ к тренировочным тестам урока без авторизации
def test_opening_TT_without_authorization (app):
app.Button_menu.Test_Button_Videocourses() # кнопка "Видеокурсы"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
services.AddSingleton<IAppStateManager>(s => s.GetRequiredService<AppStateManager>());
services.AddSingleton<IHandleHomeAssistantAppStateUpdates>(s => s.GetRequiredService<AppStateManager>());
services.AddSingleton<AppStateRepository>();
services.AddSingleton<IAppStateRepository>(s => s.... | ise-uiuc/Magicoder-OSS-Instruct-75K |
def divisorGame(n: int) -> bool:
return n % 2 == 0 | ise-uiuc/Magicoder-OSS-Instruct-75K |
return a%b
elif(c=='**'):
return a**b
elif(c=='//'):
return a//b
| ise-uiuc/Magicoder-OSS-Instruct-75K |
sys.path.insert(0,os.path.join(os.path.dirname(os.path.realpath(__file__)),'..',"nt2_basics"))
import datetime
import shutil
import re
| ise-uiuc/Magicoder-OSS-Instruct-75K |
communication_services_list = communication_services_top_5.values.tolist()
return communication_services_list | ise-uiuc/Magicoder-OSS-Instruct-75K |
latest_count = latest_history.count
latest_date = latest_history.created_at
else:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def __init__(self, root=os.path.expanduser('~/.encoding/data'), transform=None,
target_transform=None, train=True, **kwargs):
split='train' if train == True else 'val'
root = os.path.join(root, self.BASE_DIR, split)
super(ImageNetDataset, self).__init__(
root, tr... | ise-uiuc/Magicoder-OSS-Instruct-75K |
class ScalarReader(IReader):
"""Numeric loader readers abstraction. Reads a single float, int, str or other from loader."""
def __init__(
self,
input_key: str,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// CHECK: MyDerivedClass<T>.foo, T=Int.Type
| ise-uiuc/Magicoder-OSS-Instruct-75K |
int len=a.length();
for(int i=0;i<len;i++)
{
if(len%(i+1)==0&&a[0]==a[i+1])
{
bool bj=0;
for(int j=0;j+i+1<len;j++)if(a[j]!=a[j+1+i]){bj=1;break;}
if(bj==0){bbj=1;cout<<i+1<<endl;break;}
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
namespace App;
use Illuminate\Database\Eloquent\Model;
class Tbl_salutations extends Model {
//Table Name
protected $table = 'tbl_salutations';
//Primary key
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def createFolder(folderName):
if not os.path.exists(folderName):
os.makedirs(folderName)
def welcomeBanner():
tmp = sp.call('cls', shell=True)
tmp = sp.call('clear', shell=True)
print(bcolors.OKGREEN + """
--------------------------------------------------------------------------------
| ... | ise-uiuc/Magicoder-OSS-Instruct-75K |
#!/usr/bin/python
import os
import subprocess
import argparse
import time
from colorama import init
from colorama import Fore, Back, Style
import re
def atoi(text):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
* WSO2 Inc. licenses this file 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
*
| ise-uiuc/Magicoder-OSS-Instruct-75K |
CGRect(x: 160, y: 0, width: 160, height: 100),
CGRect(x: 0, y: 100, width: 320, height: 100)
]
]
let attributes = layout.layoutAttributesForElements(in: collectionViewFrame)
XCTAssertNotNil(attributes)
XCTAssertTrue(verifyAttributesToExpectedR... | ise-uiuc/Magicoder-OSS-Instruct-75K |
class Collect():
""" Data collect process. """
def __init__(self, arguments):
logger.debug("Initializing %s: (args: %s", self.__class__.__name__, arguments)
self.args = arguments
self.output_dir = get_folder(self.args.output_dir)
self.limit = self.args.limit
self.keywor... | ise-uiuc/Magicoder-OSS-Instruct-75K |
req = urllib.request.Request(export_url, headers = headers)
with urllib.request.urlopen(req, context=ctx) as response:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if view_ax > 10:
view_xx = view_ax // 10 - 1 # -1 for 0 index
view_yy = view_ax % 10 - 1
bin_xx = bin_ax[view_xx]
bin_yy = bin_ax[view_yy]
# change grid_xx, grid_yy generate function. Solve the float arithmetic issue.
grid_xx, grid_yy = s... | ise-uiuc/Magicoder-OSS-Instruct-75K |
offset = 10
# for i in range(h):
# for j in range(w):
# if image[i, j] != 0:
# for m in range(-r, r):
# for n in range(-r, r):
# if 0 <= j + n < w and 0 <= i + m < h:
# distant = int((n ** 2 + m ** 2) ** 0.5)
# i... | ise-uiuc/Magicoder-OSS-Instruct-75K |
private @Getter @Setter String parentDirectory;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return "Inserisci il tuo peso corretto."
def modifica_altezza(utente, result):
try:
unit = result.parameters.fields["unit-length"].struct_value.fields["unit"].string_value
amount = result.parameters.fields["unit-length"].struct_value.fields["amount"].number_value
except KeyError:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# fix this directory's permissions
find . -type d -print0 | xargs -0 chmod 0775
find . -type f -print0 | xargs -0 chmod 0664
chgrp -R users .
| ise-uiuc/Magicoder-OSS-Instruct-75K |
println!("Hello, what's your name? ");
io::stdin().read_line(&mut name)
.expect("Failed to read line.");
println!("Hello, {}", name);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
opt.add_option('--primary_key',action='store',default='',dest='primary_key')
opt.add_option('--logmodulo',action='store',type='int',default=0,dest='logmodulo')
opt.add_option('--add_end_node',action='store',dest='add_end_node')
opts, args = opt.parse_args(arglist)
if not (len(args)==2 and opts... | ise-uiuc/Magicoder-OSS-Instruct-75K |
}
const bool ICACHE_RAM_ATTR Timer::hasTicked() {
if (!this->ticked)
this->ticked = (0 >= (int32_t)(this->nextTick - millis()));
return this->ticked;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
skip
run ./rm-video-by-height.sh
| ise-uiuc/Magicoder-OSS-Instruct-75K |
$data = Product::all();
foreach($data as $key => $value){
$value->image = $value->getFirstMediaUrl('images');
$items[] = $value;
}
return view('frontend.pages.products', compact('items'));
}
// ADMIN
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
impl<'a> RSERR_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public string Name { get; }
public int Experience { get; private set; }
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#[derive(Debug, PartialEq, Clone)]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Status::Watch => "watch",
Status::Hold => "hold",
Status::Error => "<error>",
}
)
}
}
impl fmt::Display for SeriesCounter {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
SeriesCounter::Value(value) =>... | ise-uiuc/Magicoder-OSS-Instruct-75K |
async add(
user: UserEntity,
topic: TopicEntity,
addReplyDto: AddReplyDto,
): Promise<ReplyEntity> {
const reply = this.replyRepository.create({
content: addReplyDto.content,
topic,
user,
});
return this.replyRepository.save(reply);
}
async delete(reply: ReplyEntity): ... | ise-uiuc/Magicoder-OSS-Instruct-75K |
if record.levelno > 20:
raise AssertionError(self.formatter.format(record))
logging.getLogger().addHandler(CustomHandler())
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if (completeBefore) {
return;
}
if (SystemDataFactory.MatchResource(dialogName, dialog.DisplayName)) {
CurrentAmount++;
quest.CheckCompletion();
if (CurrentAmount <= Amount && !quest.IsAchievement && CurrentAmount != 0)... | ise-uiuc/Magicoder-OSS-Instruct-75K |
@if($banner['image'])
<img src="{{ asset('/public/images/banners/'.$banner['image']) }}" class="img_border">
@else
Image Not Found.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Deno.test("jsm - no stream lister is empty", async () => {
const { ns, nc } = await setup(jetstreamServerConf({}, true));
const jsm = await nc.jetstreamManager();
const streams = await jsm.streams.list().next();
assertEquals(streams.length, 0);
await cleanup(ns, nc);
});
Deno.test("jsm - lister after empty,... | ise-uiuc/Magicoder-OSS-Instruct-75K |
public class TypeIntegerNucleotide extends Nucleotide{
public TypeIntegerNucleotide(int value){
super(0,value);
}
/**
* @see com.bartnorsk.basic.INucleotide#execute()
*/
@Override
public Object execute() {
return (int)this.getValue();
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from anonymizers.base_anonymizer import Anonymizer
| ise-uiuc/Magicoder-OSS-Instruct-75K |
db.close()
return response
| ise-uiuc/Magicoder-OSS-Instruct-75K |
callback_data="splus"
)
]
]
return InlineKeyboardMarkup(upload_selection)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
center = 0.0
self._values = self._values.at[idx].set(center)
def set_values(self, new_values: Union[jnp.ndarray, np.ndarray]):
"""Set the values of these design parameters using the given values.
args:
new_values: the array of new values
"""
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// MARK: - Coordinator
func start() {
let usersCoordinator = UsersCoordinator(window: window)
usersCoordinator.start()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
static {
converterMap.put("m", MessageConverter.class.getName());
converterMap.put("msg", MessageConverter.class.getName());
converterMap.put("message", MessageConverter.class.getName());
}
/**
* Default pattern string for log output.
*/
static final String DEFAUL... | ise-uiuc/Magicoder-OSS-Instruct-75K |
#print('Dataset size: ',dataset.shape)
# ------ ORIGINAL DATA --------
#print('Original Dataset: \n',dataset)
headers = list(dataset.columns.values)
#print(headers)
text = dataset.iloc[:,1] # text = dataset['text']
#print(text.shape)
#print(text)
# ---------------- EXPANDING CONTRACTIONS ------------------... | ise-uiuc/Magicoder-OSS-Instruct-75K |
count++;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
exit('No direct script access allowed');
class Md_ganti extends CI_Model
{
function fetch_prodi()
{
$this->db->join('prodi pd', 'pd.id_prodi = gt.id_prodi');
$this->db->order_by('pd.nama_prodi', 'asc');
$this->db->from('ganti gt');
return $this->db->get()->result();
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Process for every split
for split in args["splits"]:
#Initialize dictionary to store processed information
keys = ["uid","encodings","attention_mask","segments","labels"]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
data = [train_data, valid_data]
model = train_model(data, parameters)
# Print the resulting metrics for the model
model_metrics = get_model_metrics(model, data)
print(model_metrics)
for k, v in model_metrics.items():
run.log(k, v)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Func: FnOnce(&mut Self::Inner, Arg) -> Ret;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class TestZinc(unittest.TestCase):
"""Test class for zinc()"""
def setUp(self):
self.ref = [1.0000, 0.9985, 0.9941, 0.9867, 0.9765, 0.9635,
0.9478, 0.9295, 0.9087, 0.8855, 0.8602, 0.8329,
0.8038, 0.7730, 0.7408, 0.7074, 0.6729, 0.6377,
0.6019... | ise-uiuc/Magicoder-OSS-Instruct-75K |
for sub_deb in $DEBS; do
echo $sub_deb
ar x $sub_deb && tar xf data.tar.xz
done
mv -f usr/include/nccl.h /usr/local/include/
mv -f usr/lib/x86_64-linux-gnu/libnccl* /usr/local/lib/
rm -rf $DIR
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def generator(one, left, right):
if left == 0:
res.append(one + ')'*right)
return 0
if left < right:
generator(one + '(', left - 1, right)
generator(one + ')', left, right - 1)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
1、定义神经网络的结构和前向传播的输出结果
2、定义损失函数以及选择反向传播的优化算法
3、生成会话(tf.Session)并且在训练数据上反复运行反向传播优化算法
| ise-uiuc/Magicoder-OSS-Instruct-75K |
print(result['data'])
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from django import forms
from multimail.models import EmailAddress
class EditUserForm(forms.ModelForm):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
cv2.destroyAllWindows()
edges = cv2.Canny(self.image, 255, 255)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<filename>alipay/aop/api/domain/AlipayDataAiserviceSmartpriceGetModel.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayDataAiserviceSmartpriceGetModel(object):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
with open(temp_download_path, 'wb') as resource_file:
resource_file.write(requests.get(download_url).content)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<span
class={props.attributes?.class || props.attributes?.className}
innerHTML={props.text || ''}
/>
);
}
registerComponent({
name: 'Builder:RawText',
hideFromInsertMenu: true,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class LitClassifier(pl.LightningModule):
def __init__(self, hidden_dim: int = 128, learning_rate: float = 0.0001):
super().__init__()
self.save_hyperparameters()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
</>
);
};
| ise-uiuc/Magicoder-OSS-Instruct-75K |
TMP_WORKDIR=$(mktemp -d -p "${PWD}")
trap "rm -rf '${TMP_WORKDIR}'" EXIT
| ise-uiuc/Magicoder-OSS-Instruct-75K |
args.bundle_size : int
args.pthresh : int
args.bup : int
"""
# load repeat annotations.
repcnts = _load_reps(args.rep_file)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
migrations.CreateModel(
name='Voter',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('answer', models.ForeignKey(to='qa.Answer')),
('user', models.ForeignKey(to='qa.UserProfile')... | ise-uiuc/Magicoder-OSS-Instruct-75K |
ITemplate CreateTemplate(string language, string template, object model);
}
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
cd '/home/ubuntu/webapp'
sudo java -jar ~/project/target/ROOT.jar > /home/ubuntu/csye6225.log 2> /home/ubuntu/csye6225.log< /home/ubuntu/csye6225.log & | ise-uiuc/Magicoder-OSS-Instruct-75K |
item0 = tuple_getitem(bn_grad_output, 0)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
use crate::middleware::{CorrelationId, CorrelationIdPropagate};
impl CorrelationIdPropagate for ClientRequest {
fn with_corr_id(self, v: CorrelationId) -> Self {
self.set_header(v.get_key(), v.get_value())
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
'ftp-entry-path': cu1.getinfo(pycurl.FTP_ENTRY_PATH),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import yaml
return yaml.safe_dump(obj.result, default_flow_style=False)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
assert "tests/test.yaml" in result.output
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def run(self, cfg):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from galleries.sql.connectors.sqlite_connector import SqliteConnector
from galleries.sql.connectors.oracle_connector import OracleConnector
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<gh_stars>0
using System;
namespace LabTask4
{
class Person
{
private string name;
protected string dob;
public void setName(string name)
{
this.name = name;
}
public string getName()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return redirect('/admin/category')->with(['title' => 'Deleted Successfully', 'content' => 'Your category was deleted successfully', 'type' => 'success']);
} catch (QueryException $ex) {
return redirect('/admin/category')->with(['title' => 'Record can not delete', 'content' => 'Your category has constraints in t... | ise-uiuc/Magicoder-OSS-Instruct-75K |
//unsigned char QQKey[] = <KEY>";
const unsigned char QQKey[] = { 0x21, 0x40, 0x23, 0x29, 0x28, 0x2A, 0x24, 0x25, 0x31, 0x32, 0x33, 0x5A, 0x58, 0x43, 0x21, 0x40, 0x21, 0x40, 0x23, 0x29, 0x28, 0x4E, 0x48, 0x4C };
// Deflate from the src buffer. The returned memory is allocated using malloc, and the caller is responsi... | ise-uiuc/Magicoder-OSS-Instruct-75K |
Some(idx)
} else {
None
}
} else {
None
}
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
abstract timeTwo: Time;
/**
* Get total years between two times
* @return {number} Number of years between the two times
*/
getTotalYears(): number {
return Math.abs((this.timeOne.getYear() - this.timeTwo.getYear()));
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"header=" + header +
", rpcType=" + rpcType +
", length=" + length +
", data=" + new String(data) +
'}';
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
for MAILFILE in *.mail; do
echo "*** Sending $MAILFILE..."
| ise-uiuc/Magicoder-OSS-Instruct-75K |
//
pub fn arborist_checks_if_no_data_in_block_contradicts_other_data() {}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
html = f'''
| ise-uiuc/Magicoder-OSS-Instruct-75K |
impl RetryPeriod {
pub const DEFAULT_MIN_PERIOD: u64 = 1;
pub const DEFAULT_MAX_EXPONENT: u8 = 4;
/// Constructs a new object
pub fn new(min_period: u64, max_exponent: u8) -> Self {
Self {
min_period,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
throw ParseError.UnsupportedToken(err: "INI Parse error on Line \(currentLine + 1) Section \(currentSection)")
}
}else if(self.currentScanning == SCAN_STATUS.SCANNING_COMMENT) {
currentLine += 1
currentSection = 0
| ise-uiuc/Magicoder-OSS-Instruct-75K |
createOrder(productID: string): Promise<Order>;
getOrder(id: string): Promise<Order>;
deleteOrder(id: string): Promise<boolean>;
getOrdersOfUser(id: string): Promise<Order[]>;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if x*x +y*y <=1.0:
break
i +=1
stdio.writeln(str(i) + 'times')
stdio.writeln(4*i/a)
stdio.writeln(math.acos(-1))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import tornado.web
class MyHandler(tornado.web.RequestHandler):
def post(self):
data = json.loads(self.request.body.decode('utf-8'))
print('Got JSON data:', data)
self.write({ 'got' : 'your data' })
| ise-uiuc/Magicoder-OSS-Instruct-75K |
};
};
// const APP = (title = `TypeScript & React`, debug = false) => {
// // class component render()
// const html = (
// <>
// <header>
// <h1>${title}</h1>
// </header>
// <section>
// <a href="https://feiqa.xgqfrms.xyz/index.h... | ise-uiuc/Magicoder-OSS-Instruct-75K |
dy = 1
elif y > 0 and x < len(lines[y-1]) and lines[y-1][x].strip() and dy != 1:
dx = 0
dy = -1
elif x > 0 and lines[y][x-1].strip() and dx != 1:
dx = -1
dy = 0
elif lines[y][x] == ' ':
break
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.