seed stringlengths 1 14k | source stringclasses 2
values |
|---|---|
import os
import random
| ise-uiuc/Magicoder-OSS-Instruct-75K |
package com.linkedin.restli.client.base;
import com.linkedin.restli.client.ActionRequest;
import com.linkedin.restli.client.RestliRequestOptions;
import com.linkedin.restli.common.ResourceSpec;
/**
* The abstract base class for all generated request builders classes for entity-level actions.
*
* For entity-level actions the action is being performed against a specific record which means
* that the key/id must be present in the request to identify which record to perform the action
* on. This class adds validation when the request is built that the id was set to a non-null
* value.
*/
public abstract class EntityActionRequestBuilderBase<K, V, RB extends ActionRequestBuilderBase<K, V, RB>>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.preauthChallengeResolver = nil
} else {
(self.messageFetcherJob.run() as Promise<Void>).retainUntilComplete()
}
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
logg.info('email Sent! smtp server: {} port: {}'.format(args.smtp, args.port))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
echo "Project version name:"
read name
git commit -m $name
git push -u res master
zip restaurant.zip -r * .[^.]* | ise-uiuc/Magicoder-OSS-Instruct-75K |
//
#ifndef RMVECTORMATH_TVECTOR2_FUNC_HPP_H
#define RMVECTORMATH_TVECTOR2_FUNC_HPP_H
#ifdef RM_MATH_STAT
#include <profiler/profiler.hpp>
#endif
| ise-uiuc/Magicoder-OSS-Instruct-75K |
None
)
def build_function(relation, refine_overlapping=False):
def fun(self, x: Region, y: Region) -> bool:
return bool(cardinal_relation(
x, y, relation,
refine_overlapping=refine_overlapping,
stop_at=max_tree_depth_level
))
return fun
def anatomical_direction_function(relation, refine_overlapping=False):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import UIKit
import Firebase
import FirebaseAuth
import GoogleMaps
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
$sort = '';
$page = new Page($mongo->getCount($table,$where),6);
$mongo_page = $page->limit;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
auto status = RegSetValueExA(
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class NSDictionary {}
class CIFilter {
init (name: String) {}
}
class MyClass {
// CHECK: define hidden {{.*}} %T7iuo_arg7UIImageC* @_T07iuo_arg7MyClassC11filterImageAA7UIImageCSQyAFG_SbtF
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return KeyVaultSecretReferenceData(secretUrl: secretUrl, sourceVault: sourceVault)
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
print(fullName(first_name = 'Qaidjohar', last_name = 'Jawadwala'))
# name = fullName('Qaidjohar','Jawadwala')
# print(name) | ise-uiuc/Magicoder-OSS-Instruct-75K |
if time.clock() - last_report_time > 1:
last_report_time = time.clock()
eta = (last_report_time - start_time) / current_image * \
(total_images - current_image)
logging.info("completion: %.2f%% (ETA: %dh%dm%ds)",
current_image / total_images * 100,
eta // 3600, (eta % 3600) // 60, eta % 60)
with open("%s.json" % args.image.name, "w") as descr:
descr.write(json.dumps({
"name": "???",
"scale": None,
"layers": layers
}))
logging.info("image description written to: %s" % descr.name)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def test_get_locales_set(self):
"""
Test get_locales_set
"""
active_locales, inactive_locales, aliases = \
self.inventory_manager.get_locales_set()
self.assertEqual(len(active_locales), 3)
self.assertEqual(len(inactive_locales), 1)
self.assertEqual(len(aliases), 4)
def test_get_locale_lang_tuple(self):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
else:
#Check if temparature range field is not empty
if Tempmin == "" or Tempmax == "":
print("Please provide a temperature range")
exit()
else:
if Optimization == "power":
#THIS IS THE MAIN FUNCTION for power optimization
print("*********Performing Power Optimization*********")
time.sleep(5)
return calculate_min_error_new(df, delta_1st_pass, number_rows)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
}
// MARK: - TableView DataSource/Delefate Methods
extension ListViewController:UITableViewDelegate, UITableViewDataSource,SliderProtocol{
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return self.arrayOfSliderValue.count
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/// Open a path/URL with its default handler
Open {
#[clap(required = true)]
paths: Vec<UserPath>,
},
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#!/usr/bin/env python
from setuptools import setup, find_packages
import os
data_files = [(d, [os.path.join(d, f) for f in files])
for d, folders, files in os.walk(os.path.join('src', 'config'))]
setup(name='splunk-connector',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<reponame>nancyeiceblue/Free-Spire.Doc-for-.NET
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Spire.Doc;
namespace ToPdfWithPassword
{
public partial class Form1 : Form
{
public Form1()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
vol_loc = os.path.join(t1_parent, 'vols')
if not os.path.exists(vol_loc):
os.mkdir(vol_loc)
fs_orig_loc = os.path.join(SUBJECTS_DIR, subjid)
fs_out_loc = os.path.join(vol_loc, 'fs')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def __init__(self, library_path, requires_release, release_reason, version,
version_increment_strategy):
self.library_path = library_path
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# constructor
def __init__ (self, x = 0, y = 0):
self.x = x
self.y = y
# get the distance to another Point object
def dist (self, other):
return math.hypot (self.x - other.x, self.y - other.y)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
// If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
// This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
guard let _ = (scene as? UIWindowScene) else { return }
}
func sceneDidDisconnect(_ scene: UIScene) {
// Called as the scene is being released by the system.
// This occurs shortly after the scene enters the background, or when its session is discarded.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public override IEnumerable<object> Solve(TextReader inputStream)
{
var (height, width) = inputStream.ReadValue<int, int>();
var isBlack = new bool[height, width];
for (int row = 0; row < height; row++)
{
var s = inputStream.ReadLine();
for (int column = 0; column < width; column++)
{
isBlack[row, column] = s[column] == '#';
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
a.uprn,
a.address,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
ReceivedUnsolicitedScannerStatusInfo = -9932,
ReceivedUnsolicitedScannerErrorInfo = -9933,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
bd = dummy_directive_class(
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Build ip->interface dict and get the interface we're looking for.
ip_to_name = ip_utils.ipv4_to_name(raising_exec(c, 'ip address').decode())
return ip_to_name[ip]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def test_calculator_base_methods(test_obj: CalculatorBase, failed_dict: dict):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# ListAdminView.list_per_page = 20
class GlobalSetting(CommAdminView):
CommAdminView.site_title = u'自动化测试用例管理'
CommAdminView.site_footer = u'轻松筹'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
RenderWindow window(VideoMode(1000, 500), "Circles");
srand(time(0));
const int SIZE = 10;
auto arr = new CircleShape[SIZE];
int count = 0;
for (int i = 0; i < SIZE; i++)
{
arr[i] = create();
}
while (window.isOpen())
{
Event event;
while (window.pollEvent(event))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
int max_channels = parser.get<int>("max-number-of-channels");
rpiasgige::USB_Interface usb_camera;
std::string identifier = device;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def restore_weights(sess,opt):
var_list = tf.trainable_variables()
g_list = tf.global_variables()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Returns a named tuple with the values of the nighborhood cells in the following
order: up_left, up, up_right,
left, self, right,
down_left, down, down_right
"""
from collections import namedtuple
Neighbors = namedtuple(
"Neighbors",
[
"up_left",
"up",
"up_right",
"left",
| ise-uiuc/Magicoder-OSS-Instruct-75K |
continue
else:
print(f'{file_path} in progress...')
if test_name=='time':
to_benchmark, labels, yaxis_name = time_test(dataset_name, frac_samples)
else:
to_benchmark, labels, yaxis_name = approx_test(dataset_name, frac_samples)
fig, ax = plot_bench(to_benchmark,
frac_samples,
labels,
xlabel="Number of tuples",
ylabel=yaxis_name,
logy=False,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
case_list += f"**{x['real_id']}** | Serial: {x['id']} | {x['moderator']} | {x['target']} | {x['guild']} | {x['time_punished']} | {x['reason']}\n"
await ctx.send(case_list)
@commands.command(name="reason")
async def _update_reason(self,ctx,case,*,new_reason):
if case.lower() in ['|','^','%','&','/','?','recent','r','~','-']:
case = self.bot.cases[ctx.guild.id]
async with self.bot.pool.acquire() as conn:
fetch_case = await conn.fetchrow("SELECT * FROM infractions WHERE real_id = $1 AND guild = $2",int(case),ctx.guild.id)
if not fetch_case:
return await ctx.send(":wood: not a case.")
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import click
import leavemanager
from leavemanager.configuration import getconf, setconf, get_keys
from leavemanager.utils import slightlybeautify, clickDate
from leavemanager.leavemanager import Leave, AllLeave
from datetime import datetime
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from .DoveNet import DoveNetG
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"\xb0\xd5"
"\xcd\x80"
"\x31\xc0"
"\x50"
"\x68""//sh"
"\x68""/bin"
"\x89\xe3"
"\x50"
"\x53"
"\x89\xe1"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
let CLShowDayInMenu = "showDay"
let CLShowDateInMenu = "showDate"
let CLShowPlaceInMenu = "showPlaceName"
let CLDisplayFutureSliderKey = "displayFutureSlider"
let CLStartAtLogin = "startAtLogin"
let CLShowAppInForeground = "displayAppAsForegroundApp"
let CLSunriseSunsetTime = "showSunriseSetTime"
let CLUserFontSizePreference = "userFontSize"
let CLShowUpcomingEventView = "ShowUpcomingEventView"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
SELECTED_MITIGATION = 4 # look at what the state is and get the file for that
# We are using enum 2 for consistency with the website
OBSERVED_MITIGATION = 2 # given the previous pattern, how do we predict going forward
@classmethod
def county_supported_interventions(cls):
return [
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if (node->getNodeType() == cfg::CFGNode::KernelFunc) {
auto kernel_name = node->getName();
auto grid_node = node->getNext(); //getISPCGridNode(CASTAS(cfg::KernelFuncNode*, node));
auto& queue = workspace.shmem_queue[kernel_name];
while(queue.size()){
auto shmem_node = queue.front();
cfg::rmCFGNode(shmem_node);
grid_node->splitEdge(shmem_node);
queue.pop();
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
BB_DO1 = False
BB_DO2 = False
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#mobi_pre_files = []
# HTML files shat should be inserted after the pages created by sphinx.
# The format is a list of tuples containing the path and title.
#mobi_post_files = []
# A list of files that should not be packed into the mobi file.
mobi_exclude_files = ['_static/opensearch.xml', '_static/doctools.js',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
using System;
using System.Data;
using System.Linq;
using System.Windows.Forms;
using static System.Windows.Forms.ListViewItem;
namespace PortProxyGUI
| ise-uiuc/Magicoder-OSS-Instruct-75K |
name='pollimetermodel',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('datetime', models.DateTimeField(blank=True)),
('long', models.FloatField()),
('lat', models.FloatField()),
('city', models.CharField(max_length=255)),
('area', models.CharField(max_length=255)),
('pol_co2', models.FloatField()),
('pol_co', models.FloatField()),
('pol_so2', models.FloatField()),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
A module for generating a map with 10 nearest movies
"""
from data_reader import read_data, select_year
from locations_finder import coord_finder, find_nearest_movies
from map_generator import generate_map
| ise-uiuc/Magicoder-OSS-Instruct-75K |
],
'dependancies' => ['editor'],
'formatValue' => function (\Bixie\Framework\Field\FieldBase $field, \Bixie\Framework\FieldValue\FieldValueBase $fieldValue) {
return array_map(function ($site) use ($field) {
$blank = (!empty($site['blank']) ? 1 : $field->get('blank_default', 0)) ? ' target="_blank"' : '';
$class = $field->get('href_class') ? ' class="' . $field->get('href_class') . '"' : '';
$link_text = !empty($site['link_text']) ? $site['link_text'] : $field->get('link_text_default', $site['value']);
return sprintf('<a href="%s"%s%s>%s</a>', $site['value'], $class, $blank, $link_text);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
// test commit | ise-uiuc/Magicoder-OSS-Instruct-75K |
raise NotImplementedError()
@classmethod
def find_usage_page(cls, value):
if not hasattr(cls, "usage_page_map"):
cls.usage_page_map = {usage_page._get_usage_page_index(): usage_page for usage_page in cls.__subclasses__()}
if value in cls.usage_page_map.keys():
return cls.usage_page_map[value]
if value not in range(0xFF00,0xFFFF):
raise ValueError("Reserved or missing usage page 0x{:04X}".format(value))
raise NotImplementedError("Yet to support Vendor defined usage pages")
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return self.predict_json({"sentence": sentence})
@overrides
def _json_to_instance(self, json_dict: JsonDict) -> Instance:
sentence = json_dict["sentence"]
return self._dataset_reader.text_to_instance(sentence)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
INMON="0"
VGAID="`pciconf -l | grep vgapci0 | sed 's|^.*chip=||' | cut -d " " -f 1 | cut -c 1-6`"
echo $VGAID
| ise-uiuc/Magicoder-OSS-Instruct-75K |
worker_class = "uvicorn.workers.UvicornWorker"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
print(' Shape of Feature vectors after FA process: [%d, %d] '.center(66, '*') % (vectors.shape[0],
vectors.shape[1]))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
namespace FakerFixtures\Faker;
class FakerAliases
{
const FAKER_METHOD_ALIASES = [
'postcode' => [
'fields' => ['zip', 'postalcode', 'postal_code', 'postcode', 'post_code'],
],
'currencyCode' => [
'fields' => ['curr', 'currency', 'currencycode']
],
'email' => [
'fields' => ['email', 'mail', 'email_address', 'mail_address'],
],
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"G4RADIOACTIVEDATA": "RadioactiveDecay",
"G4REALSURFACEDATA": "RealSurface",
"G4ENSDFSTATEDATA" : "G4ENSDFSTATE2.2",
"G4SAIDXSDATA" : "G4SAIDDATA1.1"
}
geant4_env = {}
# try to get vars from geant4.sh script
| ise-uiuc/Magicoder-OSS-Instruct-75K |
i += 1;
}
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return 1 + max(l_height, r_height)
return 0
def diameterOfBinaryTree(self, root: TreeNode) -> int:
if root:
diameter = [-1]
calc_diameter(diameter, root)
return diameter[0] - 1
return 0
| ise-uiuc/Magicoder-OSS-Instruct-75K |
__maintainer__ = '<NAME>'
__email__ = '<EMAIL>'
data_dir = os.path.join(os.getcwd(), 'data')
files = [Dataset(x) for x in os.listdir(data_dir) if x.endswith('.csv') or x.endswith('.xlsx')]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
desconto = preço - (preço * 5 / 100)
print('o produto que custava R${:.2f}, na promoção com desconto de 5% vai custar R${:.2f}'.format(preço, desconto))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
size 2780
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
$course=Course::all();
$timer=Timer::all();
return view('backend.pages.timer.create',compact('timer','course'));
}
public function storeTimer(Request $request)
{
Timer::insert([
'course_id'=>$request->course_id,
'time' => $request->timer,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Make sure that the layer is never training
# Test with training=True passed to the call method:
training_arg = True
should_be_training = False
self._test_batchnorm_layer(norm, should_be_training, test_data,
testing_mean, testing_var, training_arg,
training_mean, training_var)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
impl Value for List {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
for group in groups:
if group['group'] in group_reduce_idx:
idx = group_reduce_idx[group['group']]
if group['read']:
group_reduce[idx]['read']
if group['write']:
group_reduce[idx]['write']
if group['delete']:
group_reduce[idx]['delete']
if group['change_config']:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
spy = xapian.ValueCountMatchSpy(1)
enquire.add_matchspy(spy)
for match in enquire.get_mset(offset, pagesize, 100):
fields = json.loads(match.document.get_data().decode('utf8'))
print(u"%(rank)i: #%(docid)3.3i %(title)s" % {
'rank': match.rank + 1,
'docid': match.docid,
'title': fields.get('TITLE', u''),
})
| ise-uiuc/Magicoder-OSS-Instruct-75K |
curl "https://dumps.wikimedia.org/frwiki/latest/frwiki-latest-stub-meta-history.xml.gz" |
| ise-uiuc/Magicoder-OSS-Instruct-75K |
[['email', 'url'], 'string', 'max' => 128]
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'comment_id' => 'ID',
'content' => '内容',
'comment_status_id' => '状态',
'create_time' => '时间',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
elif cirq.has_channel(op):
K = np.asarray(cirq.channel(op), dtype=np.complex128)
kraus_inds = [f'k{kraus_frontier}']
tensors.append(
qtn.Tensor(data=K,
inds=kraus_inds + end_inds_f + start_inds_f,
tags={
f'kQ{len(op.qubits)}', f'i{mi + 1}f',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
$asdf_mock global ruby rbx-5.0
EOF
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<gh_stars>1-10
import numpy as np
import cv2
img = np.zeros([512, 512, 3], np.uint8)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
export * from './form.type';
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def __init__(self, check_item: dict):
self.check_item = check_item
@staticmethod
def url_submit(data_url: str, submit_url: str, times: int = 100) -> str:
site = parse.parse_qs(parse.urlsplit(submit_url).query).get("site")[0]
urls_data = requests.get(url=data_url)
remian = 100000
success_count = 0
error_count = 0
for one in range(times):
try:
response = requests.post(url=submit_url, data=urls_data)
if response.json().get("success"):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import { Callback, RequestMethodReturnMap, RequestMethodsArgsMap } from './typings/obsWebsocket';
| ise-uiuc/Magicoder-OSS-Instruct-75K |
boeffc = [((i + (((i**2) - i) / 2)) * math.log10(i)) for i in n] # it is a list comprehension method for bo algoritm efficiency.
topalg = sheffc + bfeffc + boeffc # here compiles all efficency into one list
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return collection.Count < 1;
}
return !enumerable.Any();
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from .rules import *
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
const rVals = ratingValues || []
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from metadefender_menlo.api.handlers.base_handler import BaseHandler
| ise-uiuc/Magicoder-OSS-Instruct-75K |
default:
break;
}
}
else
{
}
System.Threading.Thread.Sleep(100); // Throttle CPU load.
}
}
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#[no_mangle]
pub extern "C" fn fmax(x: f64, y: f64) -> f64 {
libm::fmax(x, y)
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
*/
public function setup(Collection $collection)
{
$registered = $collection->filter(function (Session $item) {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public bool ExistingOperations { get; internal set; }
public int OperationCount { get; internal set; }
}
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
fn get_sequence(&mut self)->E;
fn hello(&mut self){
println!("hello,world");
}
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
assert False # TODO: implement your test here
class TestCombineTwoCodeStrings(unittest.TestCase):
def test_combine_two_code_strings(self):
# self.assertEqual(expected, combine_two_code_strings(template, cs1, cs2))
assert False # TODO: implement your test here
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Battalions,
Traits,
Units,
}
export default WanderersArmy
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"""
Software views
"""
import socket
from django.shortcuts import render
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Cleaning old stunnel
rm -rf /usr/local/etc/stunnel
rm -rf homebrew-core
echo "Installation of brew is done..."
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return false;
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return infoMsg
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#[test]
fn identity_u16() {
let mut buf = encode::u16_buffer();
for n in 0 .. u16::MAX {
assert_eq!(n, decode::u16(encode::u16(n, &mut buf)).unwrap().0)
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
* with red background and white foreground
*
* @param string $message
* @return void
*/
protected function error(string $message): void
{
$this->line($message, '1;37;41m');
}
/**
* print line to terminal
* with green foreground
*
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return scaled_basis
def get_basis_functions(self, X):
return self.sess.run(self.basis_functions, {self.X: X})
def _count_params(self):
params_main = super()._count_params()
params_mesh_weights = self._size_of_variable_list(self.weights_mesh)
params_mesh_biases = self._size_of_variable_list(self.biases_mesh)
return params_main + params_mesh_weights + params_mesh_biases
def get_architecture_description(self):
params = self._count_params()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
pixelselectioncourieri.ColorSelection(ms, imageobj,
self.reference, self.range))
pixelselection.VoxelSelectionModRegistration(
'Color Range',
ColorRange,
ordering=3.14,
params=[
whoville.WhoParameter(
'image', whoville.getClass('Image'),
tip=parameter.emptyTipString),
color.NewColorParameter(
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import numpy as np
from werkzeug import ImmutableMultiDict
from .endpoint import Endpoint
def predict(model, input_data: Union[Dict, ImmutableMultiDict], config: Endpoint):
# new model
if hasattr(model, "public_inputs"):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
public class CspMiddleware
{
private readonly RequestDelegate next;
private readonly string headerValue;
private readonly string reportingGroupJson;
public CspMiddleware(RequestDelegate next, CspOptions options)
{
if (options == null)
throw new ArgumentNullException(nameof(options));
| ise-uiuc/Magicoder-OSS-Instruct-75K |
null //max
};
public override void WriteParams(System.Xml.XmlWriter writer, Dictionary<HavokClassNode, int> classNodes)
{
foreach (ClassMemberInstanceNode i in Children)
{
if (!i.SerializedAsZero)
{
writer.WriteStartElement("hkparam");
writer.WriteAttributeString("name", i.Name);
i.WriteParams(writer, classNodes);
writer.WriteEndElement();
}
else
| ise-uiuc/Magicoder-OSS-Instruct-75K |
prob = prob / torch.sum(prob, dim=0)[None]
prob_trF.append(prob)
xyz = xyz[0, :, 1]
TRF = TRFold(prob_trF, fold_params)
xyz = TRF.fold(xyz, batch=15, lr=0.1, nsteps=200)
print (xyz.shape, lddt[0].shape, seq[0].shape)
self.write_pdb(seq[0], xyz, Ls, Bfacts=lddt[0], prefix=out_prefix)
def write_pdb(self, seq, atoms, Ls, Bfacts=None, prefix=None):
chainIDs = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
L = len(seq)
filename = "%s.pdb"%prefix
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# (3, 3)
"""
(4)product()函数,笛卡尔积
product函数与上述方法最大的不同点是:其针对多个输入序列进行排列组合,实例如下:
"""
ab = ['a','b']
cd = ['c','d']
for item in itertools.product(ab,cd):
print(item)
# ('a', 'c')
# ('a', 'd')
# ('b', 'c')
# ('b', 'd')
| 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.