seed stringlengths 1 14k | source stringclasses 2
values |
|---|---|
public class GraphMLFormat extends Format {
private static final GraphMLFormat instance = new GraphMLFormat();
| ise-uiuc/Magicoder-OSS-Instruct-75K |
*/
public function match($binaryOp) : ?\Rector\Php80\ValueObject\StrStartsWith
{
$isPositive = $binaryOp instanceof \PhpParser\Node\Expr\BinaryOp\Identical;
if ($binaryOp->left instanceof \PhpParser\Node\Expr\FuncCall && $this->nodeNameResolver->isName($binaryOp->left, self::FUNCTION_NAME)) {
return $this->strStartsWithFactory->createFromFuncCall($binaryOp->left, $isPositive);
}
if (!$binaryOp->right instanceof \PhpParser\Node\Expr\FuncCall) {
return null;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
data: Iterable[Union[Sequence, Any]],
key_field,
use_get_item: bool,
cast_index: Callable = None,
):
"""
Will index a list of objects based on key_field.
Returns a dict with key based on key_field of object
| ise-uiuc/Magicoder-OSS-Instruct-75K |
$this->assertEquals('bodyLast', $branding->getBodyLast());
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.quadrature_degree = quadrature_degree
self.dx = fe.dx(degree = self.quadrature_degree)
self.solver_parameters = solver_parameters
initial_values = self.initial_values()
if initial_values is not None:
self.solution = self.solution.assign(initial_values)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
n, d = map(lambda x: int(x), first_input.split(' '))
items = second_input.split(' ')
for i in xrange(d):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
git pull origin
rm -rf upgradeRequest
fi
| ise-uiuc/Magicoder-OSS-Instruct-75K |
отфильтровать записи(1)фамилия; 2)год; 3)фамилия и год): ')
if k == '1' or k == '2' or k == '3':
k = int(k)-1
break
| ise-uiuc/Magicoder-OSS-Instruct-75K |
('last_modified', models.DateTimeField(auto_now_add=True, null=True, verbose_name='Last modified')),
],
),
migrations.CreateModel(
name='Rating',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('language', models.CharField(max_length=6, null=True, verbose_name='Language')),
('date_created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='Creation Date')),
('last_modified', models.DateTimeField(blank=True, null=True, verbose_name='Last Modified')),
('agree_to_rules_of_contribution', models.BooleanField(default=False, verbose_name='Agree to Rules of Contribution')),
('name', models.CharField(max_length=90, null=True, verbose_name='Title')),
('description', models.TextField(blank=True, max_length=3000, null=True, verbose_name='Detailed Trip Description')),
('nps_indication', models.PositiveIntegerField(choices=[(1, 'No recommendation'), (2, 'Rather no recommendation'), (3, 'Indifferent'), (4, 'Recommendation'), (5, 'Definite recommendation')], default=3, null=True, verbose_name='Would you recommend the trip?')),
('trophies', django.contrib.postgres.fields.jsonb.JSONField(blank=True, null=True, verbose_name='Trophies')),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/// <param name="culture">The specific <see cref="CultureInfo"/> to use.</param>
/// <param name="fileProvider"></param>
/// <param name="resourcePath"></param>
/// <param name="pathName"></param>
/// <param name="EnabledFiles"></param>
public FileResourceManagerWithCultureStringLocalizer(
ResourceManager resourceManager,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<strong>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
//
import UIKit
let kPromoCodeCellIdentifier = "PromoCodeCell"
class PromoCodeCell: UITableViewCell {
@IBOutlet weak var backgroundPromo: UIView!
@IBOutlet weak var promoCode: UITextView!
let placeholderText = "Shelf2016"
override func awakeFromNib() {
super.awakeFromNib()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"""A model for to embed structured features."""
from typing import Any, Tuple
| ise-uiuc/Magicoder-OSS-Instruct-75K |
_filter_function = staticmethod(filters.simple_str_filter)
repeat = None
placeholder_cache = None
def __init__(self,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#!/bin/bash
set -e
git clone <EMAIL>:xpfriend/pocci-image-taiga-front.git $1
| ise-uiuc/Magicoder-OSS-Instruct-75K |
printf ("Loaded %d datasets.\n", (int) data.size ());
PointCloudPtr final (new PointCloud);
vector<Eigen::Matrix4f, Eigen::aligned_allocator<Eigen::Matrix4f> > matrix_buffer;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return SpikeTrains.load(config.spikes_file)
def to_dataframe(config_file, spikes_file=None):
spike_trains = load_spikes_file(config_file=config_file, spikes_file=spikes_file)
return spike_trains.to_dataframe()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import androidx.recyclerview.widget.RecyclerView;
import androidx.test.ext.junit.rules.ActivityScenarioRule;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
error = neato_laser_scan_get(robot, &laser_data);
if (!error) {
dump_laser(laser_data);
}
break;
case 'p':
error = neato_pose_get(robot, &pose);
if (!error) {
std::cout << "X : " << pose.x << " Y : " << pose.y << " Theta : " << pose.theta << std::endl;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use App\RBACController\UserManagement;
use Giaptt\Oidcda\Authen;
use App\Http\Requests;
class HomeController extends Controller
{
/**
* Create a new controller instance.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from ifcfg.parser import NullParser
from nose.tools import eq_, ok_, raises
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from schematics import Model
from schematics.types import StringType, IntType, FloatType, ListType
| ise-uiuc/Magicoder-OSS-Instruct-75K |
my_env = os.environ.copy()
if(variant == 'windows'):
my_env['PKG_CONFIG_PATH'] = '/tmp/gtk_download_test/lib/pkgconfig'
p = subprocess.Popen(cmd, env = my_env, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = p.communicate()
return list(map(lambda x: str(x, 'utf8'), filter(len, re.compile(b'\s+').split(out))))
@GenRuleFunc
def pkg_config(name):
rule = GenRule(name)
rule.meta.cc_system_so_flags.add_all(get_output(['pkg-config', name, '--libs']))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
$authkey=$this->assist->passgen(8);
$password=$this->assist->secu($authkey,$j['password']);
$name=$j['f_name'].' '.$j['l_name'];
//var_dump($j);
//file_put_contents(FCPATH."application/logs/add_account_mod.log","\n".$name,FILE_APPEND);
$data=array(
| ise-uiuc/Magicoder-OSS-Instruct-75K |
sys.path.insert(0, os.path.join(os.path.dirname(__file__),'../src'))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from ._schema import BaseField, ModelSchema, ModelSchemaMeta, Pluck, fields
from .attachment import AttachmentModel
from .table import TableModel
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"""This function create a quote object from given fields dictionary.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
for i in range(first + 1, second):
token = sentence[i]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
int x = points[i].x - points[j].x;
int y = points[i].y - points[j].y;
if (x == 0 && y == 0) {
++overlap;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
scheme = {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
table.row_values(row)[10],#column "價值比"
table.row_values(row)[4],#column 'PBR'
#table.row_values(row)[8]]#column '現金殖利率'
table.row_values(row)[7]]#column '現金股利'
list_rtu_row_values.append(list_row_values)
#print(list_rtu_row_values,list_row_values)
return list_rtu_row_values
def writeCSVbyTable(self,dir_csvfile,list_table):
# 開啟輸出的 CSV 檔案
with open(dir_csvfile, 'w', newline='') as csvfile:
# 建立 CSV 檔寫入器
| ise-uiuc/Magicoder-OSS-Instruct-75K |
[0, 1], [1, 1], [2, 1], [3, 1], [4, 1],
[0, 2], [1, 2], [2, 2], [3, 2], [4, 2],
[0, 3], [1, 3], [2, 3], [3, 3], [4, 3],
[0, 4], [1, 4], [2, 4], [3, 4], [4, 4],
], $result);
}
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
# no states here
def remap(self, samples):
""" Always apply random_map on out-bounded samples """
return opt.random_map(samples, self.lb, self.ub)
def eval(self, e):
""" Evaluate un-evaluated individuals here """
raise NotImplementedError
| ise-uiuc/Magicoder-OSS-Instruct-75K |
A, M, R, !, ?
Example - added one.txt, modified a_folder/two.txt and three.txt::
| ise-uiuc/Magicoder-OSS-Instruct-75K |
lhs.green == rhs.green &&
lhs.blue == rhs.blue &&
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public static DateTime FirstDayOfTheMonth(this DateTime pDate)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from keras.datasets import mnist
import numpy as np
from matplotlib import pyplot as plt
if __name__ == '__main__':
(x_train, y_train), (x_test, y_test) = mnist.load_data()
image_size = x_train.shape[1]
original_dim = image_size * image_size
x_train = np.reshape(x_train, [-1, original_dim])
x_test = np.reshape(x_test, [-1, original_dim])
x_train = x_train.astype('float32') / 255
x_test = x_test.astype('float32') / 255
vae_sampler = VAEOversampler(epochs=50,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
project: String,
toolchain: DToolchainDef,
},
AlterDependency {
project: String,
dependency: DDependencyDef,
},
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# coding=UTF-8
from django.db.models import Q
from ladder.models import Challenge, Rank
from math import ceil
def _open_challenges_exist(user, ladder):
"""Returns True if there are challenges open in the provided ladder for the user."""
| ise-uiuc/Magicoder-OSS-Instruct-75K |
new_result = self.client().post("/auth/register", data=self.user, content_type="application/json")
self.assertEqual(new_result.status_code, 409)
data = json.loads(new_result.data.decode())
self.assertEqual(data["message"], "User already exists")
def test_registration_missing_username(self):
"""Test against registration of a user with no username
"""
no_username = json.dumps(dict({"username": "",
"email": "<EMAIL>",
"password": "password"}))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#[inline]
fn update(&mut self, data: impl AsRef<[u8]>) {
self.update(data);
}
#[inline]
fn finalize_reset(&mut self) -> parts::GenericArray<u8, Self::OutputSize> {
self.finalize_reset()
}
#[inline]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
GLOG_CRITICAL("Failed to create sampler.");
imageView.destroy();
image.destroy();
}
}
else
{
image.destroy();
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
ans = []
for a in A:
o.setdefault(a, 0)
o[a] += 1
for i in range(len(Aset)-1):
for j in range(i+1, len(Aset)):
ans.append((A[i]^A[j])*o[A[i]]*o[A[j]])
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#data[srcip]['end_time'] = last_seen
#data[srcip]['total_duration'] = data[srcip]['end_time'] - data[srcip]['start_time']
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
}
optTheta = new Eigen::MatrixXf(featureSize, 1);
for(int i = 0; i < featureSize; i++) {
(*optTheta)(i,0) = optThetaData[i];
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
void ffw::GuiTabs::showTabByWidget(const GuiWidget *widget) {
for (auto w : bar->getAllWidgets()) {
auto btn = dynamic_cast<GuiTabs::Button*>(w);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from singa_auto.advisor import Proposal, TrialResult
from .redis import RedisSession
logger = logging.getLogger(__name__)
REDIS_NAMESPACE = 'TRAIN'
class TrainCache(object):
'''
Caches proposals and trial results to facilitate communication between advisor & train workers.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
guests=$(vagrant status | grep vmware | awk '{print $1}')
vagrant up --no-provision
declare -A pids
| ise-uiuc/Magicoder-OSS-Instruct-75K |
version="0.3.0",
author="<NAME>",
author_email="<EMAIL>",
description=("Livestreamer stream dumper"),
license="Simplified BSD",
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/*
* InvoicePlane
*
* A free and open source web based invoicing system
*
| ise-uiuc/Magicoder-OSS-Instruct-75K |
fail('Request should raise HTTPError')
except urllib.error.HTTPError as e:
assert e.code == 418
assert e.read() == b'{"id": "abc"}'
mock_test1.test.request_mock.assert_called_once()
assert mock_test1.test.request_mock.call_args[0][0] == {
'test_id': 'abc'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return m_private && m_private->supportsInitData(initDataType, initData);
}
RefPtr<SharedBuffer> CDM::sanitizeResponse(const SharedBuffer& response)
{
if (!m_private)
return nullptr;
return m_private->sanitizeResponse(response);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
using BookManagementSystem.Service.Dto;
namespace BookManagementSystem.AutoMapperProfiles
{
public class BookProfiles : Profile
{
public BookProfiles()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
echo "The current shell is: $(ps $$ -ocomm=)"
exists brew && echo "yes" || echo "no"
which exists
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return request(
method=method,
url=url,
params=params,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
modelAndView.addObject(PROPERTY_VIEW_MODEL, viewModel);
modelAndView.addObject(PROPERTY_TITLE, title);
return modelAndView;
}
final ModelAndView view(final String viewName,
final String title) {
return this.view(viewName, null, title);
}
final ModelAndView view(final String viewName,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# end of worker node & ps node
| ise-uiuc/Magicoder-OSS-Instruct-75K |
view.layer.shadowRadius = _shadowRadius
return view.layer
}
debugPrint(
"""
| ise-uiuc/Magicoder-OSS-Instruct-75K |
rst = reformat_section("@short_description", reformat_short_description, rst)
rst = subst_common(rst)
rst = normalize_empty_lines(rst)
print rst
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# node's uncle is red 1 -> 0
# parent parent is black 0 -> 1
:param node: conflict node
:return: node's grandparent
'''
| ise-uiuc/Magicoder-OSS-Instruct-75K |
baseangle = 0.125*np.pi
#pos_rcv = [[mic_middle_point[0]+mic_distance*np.cos(16*baseangle), mic_middle_point[1]+mic_distance*np.sin(baseangle*16), mic_middle_point[2]],
# [mic_middle_point[0]+mic_distance*np.cos(14*baseangle), mic_middle_point[1]+mic_distance*np.sin(baseangle*14), mic_middle_point[2]],
# [mic_middle_point[0]+mic_distance*np.cos(12*baseangle), mic_middle_point[1]+mic_distance*np.sin(baseangle*12), mic_middle_point[2]],
# [mic_middle_point[0]+mic_distance*np.cos(10*baseangle), mic_middle_point[1]+mic_distance*np.sin(baseangle*10), mic_middle_point[2]],
# [mic_middle_point[0]+mic_distance*np.cos(8*baseangle), mic_middle_point[1]+mic_distance*np.sin(baseangle*8), mic_middle_point[2]],
# [mic_middle_point[0]+mic_distance*np.cos(6*baseangle), mic_middle_point[1]+mic_distance*np.sin(baseangle*6), mic_middle_point[2]],
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if gt_vp in seen_gt_vps or dt_vp in seen_dt_vps:
continue
seen_gt_vps.add(gt_vp)
seen_dt_vps.add(dt_vp)
if distance > 0:
total_error += math.log(distance)
return total_error / min(len(detected_vps), len(ground_truth_vps))
def num_model_detection_error(ground_truth_vps, detected_vps):
"""Measures error in the number of detected vanishing points.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// output to file
gui.sendProgress("Writing output file");
File outputMapscript;
if (runArgs.getOutFile() != null) {
outputMapscript = new File(runArgs.getOutFile());
} else {
//outputMapscript = File.createTempFile("outputMapscript", ".j");
outputMapscript = new File("./temp/output.j");
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#include "software/ai/hl/stp/tactic/move_tactic.h"
#include <algorithm>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
satisfy(
| ise-uiuc/Magicoder-OSS-Instruct-75K |
MANAGE_WEBHOOKS: "536870912",
MANAGE_EMOJIS_AND_STICKERS: "1073741824",
USE_APPLICATION_COMMANDS: "2147483648",
REQUEST_TO_SPEAK: "4294967296",
MANAGE_THREADS: "17179869184",
CREATE_PUBLIC_THREADS: "34359738368",
CREATE_PRIVATE_THREADS: "68719476736",
USE_EXTERNAL_STICKERS: "137438953472",
SEND_MESSAGES_IN_THREADS: "274877906944",
START_EMBEDDED_ACTIVITIES: "549755813888",
| ise-uiuc/Magicoder-OSS-Instruct-75K |
recharge_embed.set_thumbnail(url="https://thelanguagesloth.com/media/sloth_classes/Agares.png")
recharge_embed.set_footer(text=channel.guild, icon_url=channel.guild.icon_url)
recharge_embed.set_image(url='https://media1.tenor.com/images/623500b09831e08eb963bdc7d75797c4/tenor.gif?itemid=20299439')
return recharge_embed
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from PyObjCTools.TestSupport import TestCase
class TestNSHost(TestCase):
def testCreation(self):
#
# This gives an exception on GNUstep:
# Foundation.NSRecursiveLockException - unlock: failed to unlock mutex
#
# testIndirectCreation performs the same operation from Objective-C
# and doesn't fail. I don't see any significant differences in the
# implementation of -hostWithAddress: and -hostWithName: yet the latter
# does not have the problem we're seeing here.
#
o = Foundation.NSHost.hostWithAddress_(b"127.0.0.1".decode("ascii"))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
}
//-----------------------------------------------------------------------------
void pqBoxWidget::onEnableRotation(bool b)
{
vtkSMProxy* widget = this->getWidgetProxy();
if (widget)
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
return "Convex Hull - Extreme Points";
}
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<filename>src/model/mod.rs<gh_stars>10-100
//! Structures for the [Java SE 8 JVM class file
//! format](https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html).
pub mod class_file;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
TooltipBalance::~TooltipBalance()
{
delete ui;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
set -euxo pipefail
docker rm -f test_keto_postgres || true
docker rm -f test_keto_mysql || true
docker rm -f test_keto_cockroach || true
postgres_port="$(docker port "$(docker run --name test_keto_postgres -e "POSTGRES_PASSWORD=<PASSWORD>" -e "POSTGRES_DB=postgres" -p 0:5432 -d postgres:11.8)" 5432 | sed 's/.*:\([0-9]*\)/\1/')"
mysql_port="$(docker port "$(docker run --name test_keto_mysql -e "MYSQL_ROOT_PASSWORD=<PASSWORD>" -p 0:3306 -d mysql:8.0)" 3306 | sed 's/.*:\([0-9]*\)/\1/')"
cockroach_port="$(docker port "$(docker run --name test_keto_cockroach -p 0:26257 -d cockroachdb/cockroach:v20.2.4 start-single-node --insecure)" 26257 | sed 's/.*:\([0-9]*\)/\1/')"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if (mediaStream.CanSeek)
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
ServerConfig {
listen,
tls: None,
sites: vec![site],
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
pca9633.write_out(Channels4::_3, LedOut::Pwm)?;
pca9633.write_out(Channels4::_4, LedOut::PwmGroup)?;
// Set a blinking pattern
pca9633.write_group_duty(128)?;
pca9633.write_group_freq(128)?;
// Set PWM registers
pca9633.write_duty(Channels4::_3, 64)?;
pca9633.write_duty(Channels4::_4, 192)?;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
os.rename(
path_to_directory + file,
path_to_directory + new_name + str(i) + "." + extension,
)
except FileNotFoundError:
print("Got unccorect directory path")
| ise-uiuc/Magicoder-OSS-Instruct-75K |
extern crate ptx;
#[allow(warnings)]
mod cuda;
mod cuda_impl;
pub(crate) mod r#impl;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if dataset_cfg['name'] == 'coco':
dataset_cfg.pop('name')
return CocoDataset(mode=mode, **dataset_cfg)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
ros use ${LISP}
cd ~/.roswell/local-projects/target
rove *.asd
| ise-uiuc/Magicoder-OSS-Instruct-75K |
shopkeeper="<NAME>",
client="<NAME>",
sketch="Cheese Shop Sketch")
def list_example(*mylist):
for i in mylist:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public string SharedKey { get; set; }
public string AuthenticatorUri { get; set; }
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<form method="post" onsubmit="registerForm(this); return false;">
<div class="input-group mb-3 text-center">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon3"> <i class="fab fa-github"></i> https://github.com/</span>
</div>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Value is element of ['A','2','3','4','5','6','7','8','9','10','J','Q','K'].
"""
def __init__(self, suit, value):
self.suit = suit
self.value = value
def __repr__(self):
return f"{self.value} of {self.suit}"
class Deck:
def __init__(self):
suits = ['Hearts','Diamonds','Clubs','Spades']
values = ['A','2','3','4','5','6','7','8','9','10','J','Q','K']
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// Assign Role for user
User::assignRole($user, User::ROLE_TEACHER);
// Assign Enrolment for user
User::assignEnrolment(new User(), User::ROLE_TEACHER);
$user->save();
}
});
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/// Associate a indicator when loading image with url
/// - Parameter indicator: The indicator type, see `Indicator`
public func indicator<T>(_ indicator: Indicator<T>) -> some View where T : View {
return self.modifier(IndicatorViewModifier(reporter: self.imageLoading, indicator: indicator))
}
/// Associate a indicator when loading image with url, convenient method with block
/// - Parameter content: A view that describes the indicator.
public func indicator<T>(@ViewBuilder content: @escaping (_ isAnimating: Binding<Bool>, _ progress: Binding<Double>) -> T) -> some View where T : View {
return indicator(Indicator(content: content))
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.assertTrue(isinstance(self.mech.dhcp_driver,
odl_dhcp_driver.OdlDhcpDriver))
def test_dhcp_port_create_on_subnet_event(self):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
fc_layer = layers.FCLayer(params)
self._FpropBprop(fc_layer, adam_rmsprop_opt)
def testCompositeOptimizerRaises(self):
sgd_op = optimizer.SGD.Params()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
*/
String JOB_DATA_KEY = "JOB_DATA_KEY";
/**
* 待审核
*/
String LEAVE_BILL_STATUS_CREATE = "0";
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from django.test import TestCase
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// ImageSegmentationViewController
// Heartbeat
//
// Created by Chris Kelly on 9/12/2018.
// Copyright © 2018 Fritz Labs, Inc. All rights reserved.
//
import UIKit
import AVFoundation
import Vision
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def __init__(self, module_class_list, args_dict, **kwargs):
"""
| ise-uiuc/Magicoder-OSS-Instruct-75K |
docker run \
--rm \
-it \
-v $(pwd):/root/scraper \
-v $HOME/.bash_history:/root/.bash_history \
--name emoji-scraper \
emoji-scraper \
bash -c "scrapy runspider EmojiSpider.py" | ise-uiuc/Magicoder-OSS-Instruct-75K |
st.session_state.annotations = {}
st.session_state.files = files
st.session_state.current_image = "cat.1.jpg"
def annotate(label):
st.session_state.annotations[st.session_state.current_image] = label
if st.session_state.files:
st.session_state.current_image = random.choice(st.session_state.files)
st.session_state.files.remove(st.session_state.current_image)
image_path = (
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# License for the specific language governing permissions and limitations
# under the License.
from openstack import resource
from otcextensions.sdk import quotamixin
class Quota(quotamixin.QuotaProxyMixin, resource.Resource):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from CommunicationLayer import ServiceRegistry
@cherrypy.popargs('imageName')
class ImageAPI(object):
address = "http://127.0.0.1:8761/"
@cherrypy.expose()
def index(self, imageName):
#Get data centaras
servicesArray = ServiceRegistry.getServices("Data")
s = requests.Session()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
align-items: center;
color: #fff;
padding: 0 8px;
overflow: hidden;
opacity: 0;
margin-top: -30px;
transition: 0.25s ease-in-out;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
source deps/bin/activate
export FLASK_APP=main.py
flask run --host=0.0.0.0 | ise-uiuc/Magicoder-OSS-Instruct-75K |
});
it('should create an instance', () => {
expect(campaignsModule).toBeTruthy();
});
});
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#fpm --python-bin python3 --python-pip pip3 --python-package-name-prefix "python36" --python-obey-requirements-txt -s python -t deb ./setup.py && mv *.deb /result/
NAME=wavespy
VERSION=0.1
python3 setup.py bdist_wheel
WHEEL=$(ls dist/"${NAME}-${VERSION}"*.whl)
echo "Found wheel: ${WHEEL}"
pip3 install virtualenv virtualenv-tools3
fpm -s virtualenv -t deb --python-bin python3 --name $NAME -v $VERSION --virtualenv-setup-install --prefix /opt/wavespy/virtualenv $WHEEL && mv *.deb /result/
| 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.