seed stringlengths 1 14k | source stringclasses 2
values |
|---|---|
g = DiGraph()
ga = GraphAlgo()
ga.graph = g
ga.load_from_json('../data/A0.json')
self.assertEqual(g.get_mc(),0)
g.remove_edge(10,9)
self.assertEqual(g.get_mc(),1)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<PrivateRoute path="/lifts">
<LiftsRoute />
</PrivateRoute>
<Route path="/login">
<LoginRoute />
</Route>
<Route path="/register">
<RegisterRoute />
</Route>
<Route path="/">
<HomeRoute />
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from django.apps import AppConfig
class InstaphotosConfig(AppConfig):
name = 'instaphotos'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
seeds = np.arange(5) + 1
# split_seeds = np.arange(5) + 1
data_dir = pathlib.Path("data/kaggle_cat-in-the-dat")
models_dir = pathlib.Path(f"models/{pathlib.Path(__file__).stem}")
app = tk.cli.App(output_dir=models_dir)
logger = tk.log.get(__name__)
@app.command()
def train():
train_set = load_train_data()
fol... | ise-uiuc/Magicoder-OSS-Instruct-75K |
modprobe ti_usb_3410_5052
fi
| ise-uiuc/Magicoder-OSS-Instruct-75K |
use _generated\IntegrationTesterActions;
use Nette\DI\Container;
use Doctrine\ORM\EntityManager;
override(Container::getByType(0),
map([
'' => '@',
])
);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if "percent_rsrzoutliers" in val_summ:
percent_rsrzoutliers = val_summ["percent_rsrzoutliers"]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@pytest.mark.django_db
def test_send_password_reset_email(user, rf):
request = rf.request()
send_password_reset_email(user, request)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return <div className={stylesCommon.centerBG} style={PhotoStyle}/>
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
namespace biyn\lvpBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class biynlvpBundle extends Bundle
{
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
XCTAssertEqual(approvals.remaining, 1)
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public interface OnSwitchListener{
void onSwitchListener(boolean isNight);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
monthly=StringVar()
monthx=Entry(f1,font=("arial",16,"bold"),show="blank",bg="black",textvariable=monthly,insertwidth=1,fg="white",bd=10).grid(row=6,column=2)
lbltotal=Label(f1, font=("arial", 16, "bold"),bg="powder blue",text="Total:",fg="black").grid(row=7,column=2)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
* @param deviceId identity of the device
* @param portDesc description of the virtual port that changed
*/
void portStatusChanged(DeviceId deviceId, VirtualPortDescription portDesc);
/**
* Notifies the core about the result of a RoleRequest sent to a device.
*
* @param devi... | ise-uiuc/Magicoder-OSS-Instruct-75K |
#!/bin/bash
# cloned and built from wrk2 project (https://github.com/giltene/wrk2)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
coeff_denom = np.array([1, k - 1])
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
fn main() {}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# client.start()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if service not in ["base", "pubmed"]:
return None
if service == "pubmed":
params.pop("article_types")
params["limit"] = 100
if service == "base":
params["limit"] = 120
doctypes = eval(params["article_types"])
if isinstance(doctypes, list):
params["... | ise-uiuc/Magicoder-OSS-Instruct-75K |
}
.txt_qtyB {
width: 50px;
}
#message {
height: 200px;
overflow: scroll;
}
.box {
border: 1px solid black;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
oid = Oid()
oid.build_config(global_variables.test_config_path)
ds_type = DATASET_TYPE_VAL
oid.build_bbox(ds_type)
oid.build_image(ds_type)
conv = OidConv()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"""
Update jobs.
"""
self.update_jobs_lock.acquire()
resp = None
try:
logger.info("Updating jobs: %s" % req)
res_list = []
| ise-uiuc/Magicoder-OSS-Instruct-75K |
'''每隔十分钟自动登录一次'''
while(1):
main()
time.sleep(10 * 60)
if (__name__ == "__main__"):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import hydra
import torch
import torchmetrics
from omegaconf import DictConfig
from pytorch_lightning import LightningModule
from ..optimizer.scheduler import create_scheduler
from ..utils import utils
from ..utils.misc import mixup_data
log = utils.get_logger(__name__)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// _CSupport2.hpp
// (C)2009, 2010 <NAME>, license: MIT.txt
namespace virtual_machine {
class CPUInfo;
}
// call before first use
void InitializeCLexerDefs(const virtual_machine::CPUInfo& target);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if current_url == '/':
return path_list
for i in furl(current_url).path.segments:
url = quote(urljoin(url, '%s' % i))
name = i
path_list.append((url, name))
url = url + '/'
return path_list
self... | ise-uiuc/Magicoder-OSS-Instruct-75K |
<reponame>heat-labs/HeatProject
pub const SIZE: u8 = 8*4; | ise-uiuc/Magicoder-OSS-Instruct-75K |
</div>
<!--/.col (left) -->
<!-- right column -->
<div class="col-md-6">
</div>
<!--/.col (right) -->
</div>
<!-- /.row -->
</div><!-- /.container-fluid --... | ise-uiuc/Magicoder-OSS-Instruct-75K |
#[no_mangle]
pub extern "sysv64" fn has_sysv64_abi(a: i64) -> i64 {
a * 2
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.activityLoaded.isHidden = true
})
} else {
self.activityLoaded.isHidden = false
activityLoaded.startAnimating()
}
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
REQUIRED_FIELDS = ['first_name', 'last_name']
def __str__(self):
return "Current user is: {}: {} {}".format(self.email, self.first_name, self.last_name)
def has_perm(self, per, obj=None):
return self.is_admin
def has_module_perms(self, app_label):
return True
| ise-uiuc/Magicoder-OSS-Instruct-75K |
assert!(f[0] == 0.0);
assert!(g[0] == 0.0);
let n = std::cmp::max(f.len(), g.len());
let mut m = 1;
while m < n {
m <<= 1
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public function retrieveData(ResolverEntityInterface $resolve);
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
/// Sets the font that should be used by all widgets added to this gui
/// </summary>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.app = app
def load_home_page(self):
wd = self.app.wd
if len(wd.find_elements_by_link_text("Last name")) > 0:
return
wd.find_element_by_link_text("home").click()
def select_by_index(self, index):
wd = self.app.wd
wd.find_elements_by_name("selecte... | ise-uiuc/Magicoder-OSS-Instruct-75K |
if m:
ahead = m.group(3) if m.group(3) else 0
behind = m.group(5) if m.group(5) else 0
else:
if self._is_status_conflict(line):
conflicts = conflicts + 1
else:
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
i = i - 1
j = j + 8 | ise-uiuc/Magicoder-OSS-Instruct-75K |
embed.set_footer(text = main.get_lang(ctx.guild, 'COMMANDS_FOOTER').format(ctx.message.author))
await ctx.send(embed = embed)
def setup(client):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
clean_kwargs[k] = v
nouse_kwargs = list(set(kwargs.keys()).difference(set(include_kwargs)))
if len(nouse_args) > 0 or len(nouse_kwargs) > 0:
logging.warn(
'in {}, index {} of args are dropped, and keys {} of kwargs are d... | ise-uiuc/Magicoder-OSS-Instruct-75K |
from .tracer import main
# Program entry point for module
if __name__ == "__main__":
parser = ArgumentParser(prog='tracer', description='RTOS live tracer provides debug information from a serial connection to your AVR board.')
parser.add_argument('--noweb', '-n', action='store_true', help='run program without ... | ise-uiuc/Magicoder-OSS-Instruct-75K |
CONF_ALLOW_BANDWIDTH_SENSORS = "allow_bandwidth_sensors"
CONF_BLOCK_CLIENT = "block_client"
CONF_DETECTION_TIME = "detection_time"
CONF_POE_CLIENTS = "poe_clients"
CONF_TRACK_CLIENTS = "track_clients"
CONF_TRACK_DEVICES = "track_devices"
CONF_TRACK_WIRED_CLIENTS = "track_wired_clients"
CONF_SSID_FILTER = "ssid_filter"
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
param_inner_values_grad = indexed_slices.IndexedSlices(
values=grad_inner_values, indices=grad_indices,
dense_shape=array_ops.shape(param_inner_values))
return [None for _ in param_nested_splits] + [param_inner_values_grad, None]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
getters: {
},
// 只允许同步函数
| ise-uiuc/Magicoder-OSS-Instruct-75K |
int main() {
const char *str1 = "university";
const char *str2 = "algorithm";
std::cout << LCS(str1, str2);
return 0;
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
import asyncio
| ise-uiuc/Magicoder-OSS-Instruct-75K |
for x in ['bytes','KB','MB','GB']:
if num < 1024.0 and num > -1024.0:
return "{0:.1f} {1}".format(num, x)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
--update-freq 8 \
--warmup-updates 200 \
--decoder-attention False \
--max-epoch 15 \
--weight-decay 0.1 \
--share-all-embeddings \
--decoder-out-embed-dim EMBED_SIZE \
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import django.contrib.gis.db.models.fields
import django.contrib.gis.geos.collections
import django.contrib.gis.geos.polygon
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('lcd', '0052_alter_collectionfootprint_the_geom'),
]
operations = [
migr... | ise-uiuc/Magicoder-OSS-Instruct-75K |
unset new_path
}
export prepend_to_path
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import sys
for line in sys.stdin:
print( "{0:02x}".format(int(line.strip(),2)) )
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# for line in ppd:
# attr = line.split(',')
# test_data.append(map(float, attr[0:31]))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
assert_array_equal(io.pop(), x)
def test_stack_non_array():
with testing.raises(ValueError):
io.push([[1, 2, 3]])
def test_imread_file_url():
| ise-uiuc/Magicoder-OSS-Instruct-75K |
dfcsv=pd.read_csv('gruppen-zeitslots-vers3.csv')
dfcsv.T.to_json('gruppen-zeitslots.json') | ise-uiuc/Magicoder-OSS-Instruct-75K |
from .scheduled_task import ScheduledTask | ise-uiuc/Magicoder-OSS-Instruct-75K |
raise ValueError(
"Incorrect shock type specified -> [{}]. Choices: Strong, Weak".format(
self.shockType.name
| ise-uiuc/Magicoder-OSS-Instruct-75K |
it is represented by a nested type. The `Printable` representation of the enumeration is
the name of the value. For example, .Gray corresponds to "Gray".
| ise-uiuc/Magicoder-OSS-Instruct-75K |
softclips = []
for i, rec in enumerate(normal):
if rec.is_supplementary or rec.is_unmapped:
continue
is_first_read = rec.pos < rec.mpos
get_clip = lambda c: c[1] if c[0] == 4 else None
clip_left = get_clip(rec.cigartuples[0])
| ise-uiuc/Magicoder-OSS-Instruct-75K |
print(f'{distancia / 12:.3f}') | ise-uiuc/Magicoder-OSS-Instruct-75K |
#print(text)
#print(type(text))
#print(type(line))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public void copy_from_6_to_14() {
x_14 = x_6;
y_14 = y_6;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
switch gradientType {
case .baselineScrim:
self.gradientView.gradient = Backpack.Gradient.baselineScrim()
}
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
image = nib.Nifti1Image(reco, np.eye(4))
nib.save(image, pjoin('testing', f'inv_sp3_{plane.name.lower()}.nii.gz'))
def main():
dataset_prediction(HilbertPlane.CORONAL)
dataset_prediction(HilbertPlane.SAGITTAL)
blend_method('inv_sp3')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import { BaseApi } from '../BaseAPI';
export declare class CommonApi extends BaseApi {
constructor();
register(express: Application): void;
uploadImage(req: Request, res: Response): Promise<void>;
private init;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
include='project/*',
omit=[
'project/tests/*',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
edge (const int _to, const int _flow, const int _cap, const double _cost) :
to(_to), flow(_flow), cap(_cap), cost(_cost) {}
};
double dist[N];
vector<int> g[N];
vector<edge> edges;
vector<member> members;
int seen[N], parent[M];
int n, m, source, sink, current;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
@Test
@DisplayName("generate byte values between 0 and max value throws exception")
public void generateBytesThrowsException()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"""Displays "healthy"
"""
return Response({'health': 'healthy'}, status=status.HTTP_200_OK)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
using namespace std;
int main()
{
vector<string> dict;
for(int i = 1; i <= 1000; i++) {
dict.push_back(to_string(i));
}
sort(dict.begin(), dict.end());
for(int i = 0; i < dict.size(); i++) {
cout << dict[i] << endl;
}
return 0;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public class MiniBgCharaMotion
{
public int Id { get; set; }
public long BgId { get; set; }
public long GroupId { get; set; }
public long SubGroupId { get; set; }
public long IsMob { get; set; }
public long MainCharaNum { get; set; }
public string PosObj {... | ise-uiuc/Magicoder-OSS-Instruct-75K |
currentLocalization() {
return this.localizationService.currentLocalization();
}
setLocalization(event) {
this.loading = true;
this.localizationService.setLocalization(Localization[event])
this.loading = false;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
func deleteImage(forKey key: String) {
cache.removeObject(forKey: key as NSString)
let url = imageURL(forKey: key)
do {
try FileManager.default.removeItem(at: url)
} catch let deleteError {
print("Error removing the image from disk: \(deleteError... | ise-uiuc/Magicoder-OSS-Instruct-75K |
__version__ += '-' + rev[:4] + '-dirty' if is_dirty else ''
| ise-uiuc/Magicoder-OSS-Instruct-75K |
object_path="$HOME/.keras/paz/datasets/ycb/models/$class_name/textured.obj"
python3 train.py --images_directory $images_directory --obj_path $object_path --class_name $class_name -st 4
| ise-uiuc/Magicoder-OSS-Instruct-75K |
)
contract_list = self.moco.ProjectContract.getlist(project_create.data.id)
assert project_create.response.status_code == 200
assert contract_list.response.status_code == 200
assert isinstance(contract_list, ListingResponse)
def test_create... | ise-uiuc/Magicoder-OSS-Instruct-75K |
"ssh_port":$ssh_port,
"ssh_clients":$ssh_clients,
"ssh_private_key_file":$ssh_private_key_file,
"ssh_user":$admin_account,
"wireguard_peers":$wireguard_peers,
"wireguard_port":$wireguard_port,
"wireguard_serv... | ise-uiuc/Magicoder-OSS-Instruct-75K |
dataProp2: DataField = DataField(
name='dataProp2',
rule='value 2',
semantic_manager=semantic_manager)
# Relation fields
oProp1: RelationField = RelationField(
name='oProp1',
rule='min 1 Class1, some (Class2 or Class4)',
inverse_of=['objProp3'],
semantic_manager=semantic_manager)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
requires = []
@classmethod
def to_tree(cls, node, ctx): # to ASDF representation
d = {}
d['offset'] = node.offset
d['size'] = node.size
if node.name is not None:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if __name__ == "__main__":
print_banner()
try:
main()
except KeyboardInterrupt:
print("")
print(info("Exiting"))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return msg
def isDone(self):
return True | ise-uiuc/Magicoder-OSS-Instruct-75K |
int X, Y, Z; cin >> X >> Y >> Z;
int sum = 0, cnt = 0;
while(true) {
sum += Y + Z;
if (sum + Z > X) break;
cnt++;
}
printf("%d\n", cnt);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public T getMin() {
return Collections.min(this.list);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
managedFrame = temp + 1;
found = true;
break;
}
else if (managedFrame > 0)
{
// We have already seen at least one managed frame, and we'... | ise-uiuc/Magicoder-OSS-Instruct-75K |
export PYTHONNOUSERSITE=1
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# We should have an empty form on that page
self.assertEqual(soup.form.attrs, {'method': 'POST', 'action': '/'})
self.assertTrue(soup.form.input.getText() == '')
# Now let's post a url
resp = self.client.post(
reverse('home'),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
sys.path.append(os.path.join(os.path.dirname(__file__), '../tools'))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
errors: {
type: GT.NonNullList(IError),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Learn more: https://github.com/kennethreitz/setup.py
from setuptools import setup, find_packages
import os
with open('README.md') as f:
readme = f.read()
with open('LICENSE') as f:
license = f.read()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
namespace POSH_Toolbelt
{
public static class RichTextBoxExtensions
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
super(MainWindow, self).__init__()
self.layout = QVBoxLayout()
self.text = QTextEdit()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
/**
* @var SimpleXMLElement
*/
protected $response;
public function __construct($response)
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
todo = update_todo(todo_id, payload)
assert todo.title == payload['title']
assert todo.description == old_description
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<?php
function SidType($fid){
| ise-uiuc/Magicoder-OSS-Instruct-75K |
echo "props=$additional_properties"
java -cp lib/jinput.jar:lib/lwjgl.jar:lib/lwjgl_util.jar:minecraft/minecraft-$1.jar:build/ \
-Djava.library.path=native/linux \
-Djava.util.Arrays.useLegacyMergeSort=true \
-Dminecraft.param.sessionid \
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# calculate better bound
c = - math.log(grays_prob[0], math.e) / k_values[0] # starting c
for i,x in enumerate(k_values):
c2 = - math.log(grays_prob[i] or 1, math.e) / x # current c
# if I've found a new c2 smaller than the others..
if c2 < c and c2 > 1369/12400:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
ticker_list = read_pickle('ticker_list.pkl')
print(ticker_list)
# Get half-year data from Yahoo
today = date.today()
startday = today - timedelta(days=183)
pd_data = pdr.get_data_yahoo(ticker_list, startday, today)
# Pickle the pd object(input data of Step05)
to_pickle(pd_data, 'pd_data.pkl')
sleep(1)
print('========... | ise-uiuc/Magicoder-OSS-Instruct-75K |
public enum GooglePayStatusCode
{
BlazorUnknownStatusCode,
Canceled,
BuyerAccountError,
DeveloperError,
MerchantAccountError,
InternalError,
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
pub banner: bool,
}
pub fn get_config<'a>() {
match serde_json_core::from_str::<'a, KernelConfig>(CONFIG) {
Ok(_) => serial_log("hi"),
Err(e) => serial_log("Kernel config error."),
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
test('Throw error if value is null.', () => {
expect(() => assertNotNullable(null, 'fuga'))
.toThrowError('Expected value (fuga) not to be nullable, actually null.')
})
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/**
* @var array
*/
protected $results = [];
/**
* Constructor.
*
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from os import listdir
import numpy as np
import os.path as osp
from utils.construct_graph import read_data
| 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.