seed stringlengths 1 14k | source stringclasses 2
values |
|---|---|
ssh root@host01 'curl -skSL https://github.com/storageos/go-cli/releases/download/1.0.0/storageos_linux_amd64 > /usr/local/bin/storageos && chmod +x /usr/local/bin/storageos'
ssh root@host01 'for i in {1..200}; do oc policy add-role-to-user system:image-puller system:anonymous && break || sleep 1; done'
ssh root@host01 'oc adm policy add-cluster-role-to-group sudoer system:authenticated'
ssh root@host01 'for i in {1..200}; do oc get project/openshift && break || sleep 1; done'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
using (DESCryptoServiceProvider des = new DESCryptoServiceProvider())
{
des.Key = ASCIIEncoding.ASCII.GetBytes(sKey);
des.IV = ASCIIEncoding.ASCII.GetBytes(sKey);
System.IO.MemoryStream ms = new System.IO.MemoryStream();
| ise-uiuc/Magicoder-OSS-Instruct-75K |
for i in letLog:
tempLetLog.append(' '.join(i.split(' ')[1:]+[i.split(' ')[0]]))
tempLetLog=sorted(tempLetLog)
letLog=[]
for i in tempLetLog:
tempPrime=i.split(' ')[:-1]
temp=i.split(' ')[-1]
letLog.append(' '.join([temp]+tempPrime))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
protected function getFieldRoutePrefix()
{
return $this->field->route_prefix;
}
/**
* Get field params.
*
* @param string $formKey
* @param Field $field
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from panda3d.core import *
from Utils.Picker import *
from direct.showbase import DirectObject
import direct.directbase.DirectStart
from Utils.StringHelper import *
class Option(object):
def __init__(self, x, y, z, label, activeScreen, color):
(self.x, self.y, self.z) = (x, y, z)
self.label = label
color = color
path = "Graphics/models/" + color + "sphere.egg"
self.sphere = loader.loadModel(path)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"OutputUhooiCore",
]),
.testTarget(
name: "OutputUhooiTests",
dependencies: ["OutputUhooi"]),
.target(
name: "OutputUhooiCore",
dependencies: []),
.testTarget(
name: "OutputUhooiCoreTests",
dependencies: ["OutputUhooiCore"]),
]
)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
rename_files() | ise-uiuc/Magicoder-OSS-Instruct-75K |
import java.util.HashMap;
class ParameterMatchingExample {
void someMethodWithCodeToMatch(){
HashMap<Integer, Object> map = new HashMap<>();
Integer anIntegerKey = 1;
String someText = "SomeText";
map.get(anIntegerKey).toString().equals(someText);
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Hook
path('hook', views.HookSqlOrdersView.as_view(), name='v1.sqlorders.hook-sqlorders'),
# download export files
path('export/download/<str:base64_filename>', views.DownloadExportFilesView.as_view(),
name='v1.sqlorders.download-export-files'),
# 上线版本
path('versions/get', views.ReleaseVersionsGet.as_view(), name='v1.sqlorders.versions.get'),
path('versions/list', views.ReleaseVersionsList.as_view(), name='v1.sqlorders.versions.list'),
path('versions/create', views.ReleaseVersionsCreate.as_view(),
name='v1.sqlorders.versions.create'),
path('versions/update/<int:key>', views.ReleaseVersionsUpdate.as_view(),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public void toI420(
ByteBuffer srcRAW, int srcStrideRAW,
ByteBuffer dstI420, int dstStrideY, int dstStrideU, int dstStrideV,
int width, int height) {
RoboticChameleonJNI.RAWToI420(
srcRAW, srcStrideRAW,
dstI420, dstStrideY, dstStrideU, dstStrideV,
width, height);
}
public void toYV12(
ByteBuffer srcRAW, int srcStrideRAW,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Ok(Box::new(result_stream))
}
}
fn truncate_to_char_boundary(s: &str, mut max_bytes: usize) -> &str {
if max_bytes >= s.len() {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
const int PORT = 18811;
tcp_server server(PORT, make_shared<myecho>());
const char* port = "18811";
tcp_client cli("127.0.0.1", port);
int a = -12;
int b = 13;
callable cc = cli.call("add", a, b);
int i = cc.get<int>();
EXPECT_EQ((a+b), i);
} catch(const argument_error& e) {
ADD_FAILURE() << "argument_error exception " << e.what();
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
system.cpu.icache.connectBus(system.l2bus)
system.cpu.dcache.connectBus(system.l2bus)
system.l2cache = L2Cache()
system.l2cache.connectCPUSideBus(system.l2bus)
system.l2cache.connectMemSideBus(system.membus)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#!/usr/bin/env bash
planemo shed_init --name=biolink_monarch \
--owner=nathandunn \
--description="Query Monarch Initiative using BioLink API." \
--long_description="Tool Suite that Pulls related Variants, Phenotypes, Diseases, Genes, and Homologes using the Monarch Initiative's (monarchinitiative.org) BioLink API (https://api.monarchinitiative.org/api/))" \
--category="Web Services"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
set -xe
addlicense -f licenses/default.tpl -ignore web/** -ignore "**/*.md" -ignore vendor/** -ignore "**/*.yml" -ignore "**/*.yaml" -ignore "**/*.sh" ./**
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def _is_correct_values(self, value1, value2):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// Created by wesley on 08/05/2019.
// Copyright © 2019 corporate-cup. All rights reserved.
//
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
throw new ArgumentException("Field not in collection");
| ise-uiuc/Magicoder-OSS-Instruct-75K |
switched = {}
for index, (y, prediction, confidence) in enumerated:
if confidence < min_conf:
continue
if y == prediction:
continue
if random.uniform(0.0, 1.0) > confidence:
continue
# Perform the switching
y_list[index] = prediction
switched_counter += 1
# Keep track of changes
y = str(y)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=6)]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
assert tup.num_plurals == 1
assert tup.plural_expr == '0'
assert tup.plural_forms == 'npurals=1; plural=0'
assert str(tup) == 'npurals=1; plural=0'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from msrest.serialization import Model
| ise-uiuc/Magicoder-OSS-Instruct-75K |
popup_exp = self.root.ids.popup.text
# activate inspector with root as ctx
inspector.start(self._win, self.root)
self.advance_frames(1)
# pull the Inspector drawer from bottom,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
let node = try SharedConnection.sharedInstance.connection.execute("select * from users where user_id=\(userid)")
guard let first_node = node.array?.first else {
return nil
}
let json = JSON(first_node.wrapped, first_node.context)
return try User(json: json)
}
class func save(username: String) throws -> Int {
let usernameNode = username.makeNode(in: nil)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
status = static_cast<Status>((frame >> 1) & 0b11111);
return (ones & 0b1) == (frame & 0b1);
}
return false;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def __eq__(self, other):
return self.uuid == other.uuid
| ise-uiuc/Magicoder-OSS-Instruct-75K |
else
ICON=audio-volume-high
fi
fi
if [ "$MUTE" == "[off]" ]; then
| ise-uiuc/Magicoder-OSS-Instruct-75K |
title_element.text = title
study_ref = ET.SubElement(experiment, 'STUDY_REF', {'accession': study_accession})
design = ET.SubElement(experiment, 'DESIGN')
design_description = ET.SubElement(design, 'DESIGN_DESCRIPTION')
sample_descriptor = ET.SubElement(design, 'SAMPLE_DESCRIPTOR', {'accession': sample_accession})
library_descriptor = ET.SubElement(design, 'LIBRARY_DESCRIPTOR')
library_name_element = ET.SubElement(library_descriptor, 'LIBRARY_NAME')
library_name_element.text = library_name
library_strategy = ET.SubElement(library_descriptor, 'LIBRARY_STRATEGY')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
model_name='user',
name='date_of_birth',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def all_keys(d: Union[dict, list]) -> list:
"""
Returns a list of all the keys of a dictionary (duplicates included)
d -- a dictionary to iterate through
"""
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# get aws-java-sdk JAR file
mvn dependency:get -DremoteRepositories=http://repo1.maven.org/maven2/ \
| ise-uiuc/Magicoder-OSS-Instruct-75K |
part of the app. The code is tracked so that future developers can continue to check the server according to the
same metrics.
You may, therefore, need to install separate dependencies. See: https://docs.locust.io/en/stable/installation.html
"""
from locust import HttpLocust, TaskSet, task # type: ignore
# Hardcoding this is inelegant. Eventually, every task will grab an item from the API sp that this script
# is server-agnostic
SAMPLE_STUDY_ID = '785722'
class ViewOnlyBehavior(TaskSet):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<x-table id="classes-table"></x-table>
</div>
</div>
</div>
</div>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
* Created by mitola1 on 14/11/2017.
*/
public class Main {
public static void main(String[] args) {
JFrame frame = new JFrame("Console interaction");
frame.setContentPane(new MainApp().panelMain);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(true);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// Tests for problems uncovered with [databind#2016]; related to
// `@JsonDeserialize` modifications to type, deserializer(s)
public class DelegatingCreatorAnnotations2021Test extends BaseMapTest
{
// [databind#2021]
static class DelegatingWithCustomDeser2021 {
public final static Double DEFAULT = 0.25;
Number value;
@JsonCreator(mode = JsonCreator.Mode.DELEGATING)
public DelegatingWithCustomDeser2021(@JsonDeserialize(using = ValueDeser2021.class) Number v) {
value = v;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if star[i] == " " and star[i + 1] == "(":
return i
brightest_uncleaned = page_soup.find_all("tr")
for html in brightest_uncleaned:
col_4 = html.contents[4].contents[0]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return false;
}
public boolean isLink() {
return true;
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
data = json.loads(contents)
for i in data['tips']:
if StreamtipEvent.objects.filter(external_id=i['_id'], updater=ffu).count() > 0:
break
details = json.dumps(i)
try:
ffe = StreamtipEvent(external_id=i['_id'], updater=ffu, details=details)
ffe.save()
except Exception, E:
print "Failed in individual streamtip run: %s\nData:\n%s" % (E, details)
added += 1
return added
| ise-uiuc/Magicoder-OSS-Instruct-75K |
for i in range(query_nsubsequences):
sub_seq = query_subsequences[i]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
obj_names = [obj for obj in obj2id]
new_res_dict = {}
for obj_name, pred_name in zip(obj_names, pkl_paths):
assert obj_name in pred_name, "{} not in {}".format(obj_name, pred_name)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
export * from './step_interfaces'; | ise-uiuc/Magicoder-OSS-Instruct-75K |
def add_line_count(lines: Iterable[str], counter: Iterable[int]) -> Iterable[str]:
return (f"{next(counter):>3}| {lv}" for lv in lines)
def strip_newlines(strs: Iterable[str]) -> Iterable[str]:
return (i.rstrip("\n\r") for i in strs)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def sampleFromPwmAndScore(self, bg):
return self.sampleFromPwm(bg=bg)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<span class="time">
@if (\Carbon\Carbon::now()->diffInSeconds($notificacion->created_at) < 60)
{{\Carbon\Carbon::now()->diffInSeconds($notificacion->created_at).' '.Lang::get('messages.Seconds')}}
@elseif(\Carbon\Carbon::now()->diffInMinutes($notificacion->created_at) < 60)
{{\Carbon\Carbon::now()->diffInMinutes($notificacion->created_at).' '.Lang::get('messages.Minuts')}}
@elseif(\Carbon\Carbon::now()->diffInHours($notificacion->created_at) < 24)
{{\Carbon\Carbon::now()->diffInHours($notificacion->created_at).' '.Lang::get('messages.Hours')}}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
mkdir -p ./bin
./build_lib.sh && ./build_tests.sh && ./build_app.sh
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#PrintStyle.set_style(Style.STATE)
#print(defs)
self.assertTrue(defs.ECF_MICRO, "expected generated variable")
self.assertTrue(defs.ECF_HOME, "expected generated variable")
self.assertTrue(defs.ECF_JOB_CMD , "expected generated variable")
self.assertTrue(defs.ECF_KILL_CMD , "expected generated variable")
self.assertTrue(defs.ECF_STATUS_CMD , "expected generated variable")
self.assertTrue(defs.ECF_URL_CMD , "expected generated variable")
self.assertTrue(defs.ECF_LOG , "expected generated variable")
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// // configure an argument
// ->addArgument('seed', InputArgument::REQUIRED, 'A word')
//;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import PackageDescription
let package = Package(
name: "DS18B20",
products: [
.library(
name: "DS18B20",
targets: ["DS18B20"]),
],
dependencies: [
| ise-uiuc/Magicoder-OSS-Instruct-75K |
new_args.append(newarg)
else:
print('Error ## Danger, danger, high voltage...')
self.args = new_args
self.request = self.base_kit.parser.parse_args(self.args)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
} else {
getter = getterOrOptions.getter;
setter = getterOrOptions.setter;
}
return new ComputedRefImpl(getter, setter);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
('RequirementNotes', models.CharField(blank=True, db_column='RequirementNotes', max_length=255)),
('StampType', models.CharField(choices=[('', ''), ('Wet', 'Wet'), ('Digital', 'Digital'), ('Notary', 'Notary'), ('None', 'None')], db_column='StampType', max_length=7)),
('AHJPK', models.ForeignKey(db_column='AHJPK', on_delete=django.db.models.deletion.DO_NOTHING, to='ahj_app.ahj')),
],
options={
'db_table': 'EngineeringReviewRequirement',
'managed': True,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
elif 75 < valor <= 100:
print('Intervalo (75, 100]')
else:
print('Fora de intervalo')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
new_file_name does not change the file extension
"""
for index, source_path in enumerate(path_to_files):
original_file_name = os.path.basename(source_path)
file_extension = Path(original_file_name).suffix
# don't want to set this expression to new_file_name because it will overwrite the value
# and affect subsequent iterations of the loop
| ise-uiuc/Magicoder-OSS-Instruct-75K |
std::deque<std::pair<sol::function, VK>> OnHotKey::OnHotKeyReleaseHandlers;
int OnHotKey::RegisterHotkey(sol::function function, VK key, VK modifier)
{
OnHotKeyHandlers.push_back(std::make_tuple(function, key, modifier));
return 1;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from pyro.contrib.funsor.handlers.runtime import _DIM_STACK, DimRequest, DimType
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import UIKit
import SCLAlertView
class ProjectEditMembersBriefTableViewCell: UITableViewCell {
var imgURLs: [String]? {
didSet {
if let imgURLs = imgURLs {
memberCount = imgURLs.count
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Ingest CSV data to Postgres')
parser.add_argument('--user', required=True, help='user name for postgres')
parser.add_argument('--password', required=True, help='password for postgres')
parser.add_argument('--host', required=True, help='host for postgres')
parser.add_argument('--port', required=True, help='port for postgres')
parser.add_argument('--db', required=True, help='database name for postgres')
parser.add_argument('--table_name', required=True, help='name of the table where we will write the results to')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
i = 0
while i < N:
j = i
run = cost[j]
big = cost[j]
while j + 1 < N and S[j] == S[j + 1]: # 🚌 accumulate current "run" costs and track the maximum cost
j += 1
run += cost[j]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
const ListListPage = lazy(() => import("../pages/list/ListPage"));
const CreateListPage = lazy(() => import("../pages/list/CreatePage"));
const EditListPage = lazy(() => import("../pages/list/EditPage"));
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if False in arr_tc.mask:
mean_tc = np.nanmean(arr_tc[year-2001, :, :]) # 2000 = year0
n_tc = np.count_nonzero(~arr_tc.mask[year-2001, :, :])
else:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from referee.referee import RCJSoccerReferee
referee = RCJSoccerReferee(
match_time=MATCH_TIME,
progress_check_steps=ceil(15/(TIME_STEP/1000.0)),
progress_check_threshold=0.5,
ball_progress_check_steps=ceil(10/(TIME_STEP/1000.0)),
ball_progress_check_threshold=0.5,
)
while referee.step(TIME_STEP) != -1:
referee.emit_positions()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
pub value: Expr,
}
impl PeekValue<()> for HtmlProp {
fn peek(cursor: Cursor) -> Option<()> {
let (_, cursor) = HtmlPropLabel::peek(cursor)?;
let (punct, _) = cursor.punct()?;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return false;
};
return $fields;
}
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
class ConditionWithArgs(Streamable):
"""
| ise-uiuc/Magicoder-OSS-Instruct-75K |
AbstractMessage = apps.get_class('emails.abstract_models', 'AbstractMessage')
class Connection(AbstractConnection):
pass
| ise-uiuc/Magicoder-OSS-Instruct-75K |
heapq.heappush(self.maxheap, -x)
else:
m = -self.maxheap[0]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
}
?> | ise-uiuc/Magicoder-OSS-Instruct-75K |
export default Providers;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
response_received = True
else:
print('Command response: ' + str(res.status))
else:
qpidCon.session.acknowledge() | ise-uiuc/Magicoder-OSS-Instruct-75K |
}
generic.append_to_result_with_constraints(&mut result);
}
result.punct('>');
result
}
pub(crate) fn impl_generics_with_additional_lifetimes(
&self,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
heightConstraint?.isActive = true
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.mount = instrument.mount
self.containers = [
Container(container)
for container in containers
]
self.tip_racks = [
Container(container)
for container in instrument.tip_racks]
if context:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Remove tmp folder for collections
echo -e "\n\n"
echo "Removing temporary folder for collections"
rm -rf ./cols
# Remove the oldest backup
if [ $BACKUP_COUNT -gt $BACKUP_COUNT_MAX ]; then
echo -e "\n\n"
echo "Removing oldest backup : $OLDEST_BACKUP"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def set_label(self, value, ts=None):
super().set_label(value, ts)
self.client.set_field("*METADATA", self.metadata_field, self.attr.value)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/// </summary>
[JsonConverter(typeof(TimeSpanConverter))]
public class Duration
{
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
tasks = [1,2,1,4,2,1,2]
is_valid(assign(pp, tasks), pp, tasks)
# 6 -> 4,1
# 3 -> 1,1,1
pp = [6,3]
tasks = [4,1,1,1,1]
is_valid(assign(pp, tasks), pp, tasks)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from django.http import HttpResponse
# Taken from http://plumberjack.blogspot.com/2009/09/how-to-treat-logger-like-output-stream.html
import logging
mod_logger=logging.getLogger(__name__)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
while 2**i <n:
i+=1
if 2**i==n:
return True
return False | ise-uiuc/Magicoder-OSS-Instruct-75K |
echo "aws --endpoint-url=http://localhost:4566 sqs receive-message --queue-url $QUEUE"
aws --endpoint-url=http://localhost:4566 sqs receive-message --queue-url $QUEUE
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class ComplianceConfig(AppConfig):
name = 'Compliance'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
oo.append(an[ii1])
oo=sorted(oo)
for ii2 in range(len(oo)):
oo2=oo2+oo[ii2]
return numlist+oo2
def position():
global copy2
global targetWord
global answerStr
| ise-uiuc/Magicoder-OSS-Instruct-75K |
----------
cases : Iterable[TestCase]
Test cases to be displayed
"""
for case in cases:
if test(case):
echo(f"{case.identifier:.<73}{TAG_PASS}")
else:
echo(f"{case.identifier:.<73}{TAG_FAIL}\n\t{case.message}")
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if pdf == ptr::null_mut() {
HPDF_Free (pdf);
return ();
}
/* add a new page object. */
let mut page = HPDF_AddPage (pdf);
HPDF_Page_SetSize (page, HPDF_PageSizes::HPDF_PAGE_SIZE_A5, HPDF_PageDirection::HPDF_PAGE_PORTRAIT);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# read CSV file
with open(csv_path) as csv_file:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
cta: {
text: 'Hear from our editor',
baseUrl: 'https://theguardian.com',
},
},
},
mobileContent: {
heading: 'As Australia prepares to head to the polls...',
messageText:
'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.',
highlightedText:
'Show your support today from just %%CURRENCY_SYMBOL%%1, or sustain us long term with a little more. Thank you.',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from panoramic.cli.husky.core.taxonomy.enums import ValidationType
from panoramic.cli.metadata.engines.with_connection import WithConnection
from panoramic.cli.pano_model import PanoModel, PanoModelField
class InspectorScanner(WithConnection):
"""Metadata scanner using SQLAlchemy inspector"""
_DATA_TYPES_MAP = {
float: ValidationType.numeric,
int: ValidationType.integer,
str: ValidationType.text,
bool: ValidationType.boolean,
bytes: ValidationType.variant,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
cmd('rankmirrors -n 6 /etc/pacman.d/mirrorlist.bak > /etc/pacman.d/mirrorlist')
cmd('rm /etc/pacman.d/mirrorlist.bak')
else:
pass
cmd('pacstrap /mnt base base-devel dialog wpa_supplicant linux-headers virtualbox-guest-utils intel-ucode amd-ucode bash-completion grub os-prober efibootmgr dosfstools gptfdisk acpid cronie avahi cups networkmanager xorg-server xorg-xinit xorg-drivers ttf-dejavu noto-fonts-emoji gnome')
cmd('genfstab -Lp /mnt > /mnt/etc/fstab')
cmd('arch-chroot /mnt echo ' + hos + ' > /etc/hostname')
cmd('arch-chroot /mnt echo KEYMAP=' + key + ' > /etc/vconsole.conf')
cmd('arch-chroot /mnt echo LANG=' + loc + '.UTF-8 > /etc/locale.conf')
cmd('arch-chroot /mnt sed -i "s/^#' + loc + '/' + loc + '/" /etc/locale.gen')
cmd('arch-chroot /mnt locale-gen')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
impl Deref for DBConn {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def __getitem__(self, item):
if isinstance(item, str):
path = item.split("::")[0]
proper = item.split("::")[1:]
current = self.get_path(path)
while len(proper) > 0:
if is_int(proper[0]):
proper: list
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@media (max-width: 768px) {
.headerTitle {
font-size: 20px;
margin-top: 70px;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
* @return array
* Renderable string.
*/
public function buildPage() {
$sitemap = array(
'#theme' => 'sitemap',
);
// Check whether to include the default CSS.
$config = \Drupal::config('sitemap.settings');
if ($config->get('css') == 1) {
$sitemap['#attached']['library'] = array(
'sitemap/sitemap.theme',
);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
export BUILD_VERSION
| ise-uiuc/Magicoder-OSS-Instruct-75K |
fake = self.critic(fake_img)
valid = self.critic(real_img)
# Construct weighted average between real and fake images
interpolated_img = RandomWeightedAverage()([real_img, fake_img])
# Determine validity of weighted sample
validity_interpolated = self.critic(interpolated_img)
# Use Python partial to provide loss function with additional
# 'averaged_samples' argument
partial_gp_loss = partial(self.gradient_penalty_loss,
averaged_samples=interpolated_img)
partial_gp_loss.__name__ = 'gradient_penalty' # Keras requires function names
self.critic_model = Model(inputs=[real_img, z_disc],
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/// into Lua, which then tries to call a method on the same [`UserData`]
/// type. Consider restructuring your API to prevent these errors.
///
/// [`AnyUserData`]: struct.AnyUserData.html
/// [`UserData`]: trait.UserData.html
UserDataBorrowMutError,
/// A `RegistryKey` produced from a different Lua state was used.
MismatchedRegistryKey,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.resized_images = {}
self.old_resized_images = {}
self.render_clock = 0
self.target_frame_rate = target_frame_rate
self.target_count = 1 / self.target_frame_rate
def __enter__(self):
pygame.init()
self.window = pygame.display.set_mode(self.resolution)
pygame.display.set_caption(self.window_title)
def __exit__(self, exc_type, exc_val, exc_tb):
pygame.quit()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
url=self._v3BaseURL + "/public/core/v3/agent/service"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
var valueObject = new ValueObject<object>(value);
var compareObject = new ValueObject<object>(value);
Assert.False(valueObject != compareObject);
}
[Fact]
public void Null_ReturnsTrue()
{
var value = new object();
var valueObject = new ValueObject<object>(value);
ValueObject<object>? compareObject = null;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// Verify
std::vector<std::string> vals = {"L2", "L3", "L4"};
auto& neighbors = s1.GetNeighbors();
int i = 0;
for(auto& neighbor: neighbors)
{
auto id = neighbor->GetSpecies();
ASSERT_EQ(vals[i], id);
i++;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
T_delta = T_delta[idxs]
master_state["T_delta"] = T_delta
T_delta_group_labels = jnp.concatenate(
[jnp.repeat(k, len(T_deltas[k])) for k in range(num_groups)])
T_delta_group_labels = T_delta_group_labels[idxs]
master_state["T_delta_group_labels"] = T_delta_group_labels
master_state["num_groups"] = num_groups
msg["T_delta"] = T_delta
| ise-uiuc/Magicoder-OSS-Instruct-75K |
use zenoh_protocol_core::{EndPoint, WhatAmI};
// Transport Handler for the peer
struct MySH;
impl MySH {
fn new() -> Self {
Self
}
}
impl TransportEventHandler for MySH {
| 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.