seed stringlengths 1 14k | source stringclasses 2
values |
|---|---|
import streamlit as st
from stqdm import stqdm
import pandas as pd
#Paths
| ise-uiuc/Magicoder-OSS-Instruct-75K |
('roomid', models.CharField(max_length=40)),
('roomname', models.CharField(blank=True, max_length=320, null=True)),
('roomdeptid', models.CharField(blank=True, max_length=40, null=True)),
('bookabletype', models.CharField(blank=True, max_length=40, null=Tr... | ise-uiuc/Magicoder-OSS-Instruct-75K |
fn len(&self) -> usize {
Vec::len(self)
}
fn get(&self, index: usize) -> &ProtobufValue {
&self[index]
}
fn set(&mut self, index: usize, value: ReflectValueBox) {
let value = value.downcast().expect("wrong type");
self[index] = value;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from dotenv import load_dotenv
load_dotenv()
if __name__ == "__main__":
from examples import generate_csv
#generate_csv.generate(10,10,33)
backend = Tweets2Graph(interactions=["retweet","quote","reply"],
username="screen_name")
backend.from_stream(hashtags=["#covid"],skip_er... | ise-uiuc/Magicoder-OSS-Instruct-75K |
angle = math.asin(oh)
print('distance: {}\nhorizontal: {}\nangle: {}'.format(distance, horizontal, angle))
#TODO make sure angle is in degrees
'''
if angle < -.1:
differential = 89.1 * angle + 43.7
elif angle > .1:
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
audio: HTMLAudioElement | null
blob: Blob | null
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
//! A node of the consensus network.
#![allow(clippy::ptr_arg)] // Clippy is complaining about code generated by automock.
mod node_impl;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
namespace abel::gui {
// Empty, apparently
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return next((el for el in it if cond(el)), not_found_default)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
unityEvent.Invoke();
}
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
model[pieces[0]] = pieces[1]
infile.close()
outmodel = sorted(model) # gives sorted list of keys
outfile = open("./local_models/time-"+str(timestep)+".model","w")
| ise-uiuc/Magicoder-OSS-Instruct-75K |
'CaDynamics_E2_NML2*gamma*.nml',
'L5PC.cell.nml',
'*TestL5PC*ml',
'analyse_chans.sh',
'compare_nml2_mods.py',
'mods']
if len(sys.argv)==2 and sys.argv[1] == "-f":
extra_files.append('L5bPyrCellHayEtAl2011.net.nml')
extra... | ise-uiuc/Magicoder-OSS-Instruct-75K |
ansible-playbook -i "$1," setup-skolo-bot.yml --ask-pass --ask-become-pass --extra-vars="swarming_server=https://chromium-swarm.appspot.com home=/home/chrome-bot"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
notify_by_sms = models.BooleanField(default=False)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
});
it('should display an error message indicating the isbn format is wrong', () => {
const ctrl = new FormControl('012345678', BookValidators.isbnFormat);
ctrl.markAsDirty();
component.control = ctrl;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"Stats": {}},
"Experiments/Project": {"x1": "y1", "x2": "y2"},
"resources": {},
'longitudinal_data': {}}
graph_object = create_mocker(
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from django.db import migrations
class Migration(migrations.Migration):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<div class="box box-warning">
<div class="box-body">
@include('luckys.search')
</div>
</div>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return this.azureBlobStorageContainer;
}
})();
return [instance.storageAccount, instance.storageContainer];
}
test('Stable', () => {
expect(getPackageInfo(LanguageServerDownloadChannel.stable)).to.be.deep.equal(['https://pvsc.azureedge.net', 'python-language-... | ise-uiuc/Magicoder-OSS-Instruct-75K |
};
let transformed = match self.function {
Function::TRUNCATE => CollectionRelation {
variables,
tuples: tuples.map(move |tuple| {
let mut t = match tuple[key_offsets[0]] {
Value::Instant(inst) => inst as u64,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
:return: List of labels for inputs
"""
raise NotImplementedError()
@property
def inputs(self) -> Dict[str, Tuple[str, str]]:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"width": 750,
"height": 500,
"symbol": symbol,
"interval": "180",
"timezone": "Etc/UTC",
"theme": "light",
"style": "1",
"locale": "en",
"toolbar_bg": "#f1f3f6",
"enable_publishing": false,
"allow_symbol_change": true,
"container_id": "tradingview_... | ise-uiuc/Magicoder-OSS-Instruct-75K |
CurrentSpeed = currentSpeed;
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
let handle = unsafe {
device.logic.handle.create_sampler(&sampler.take_ci(), None)
.or(Err(VkError::create("Sampler")))?
};
handles.push(handle);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
<dt>@prop.Key</dt>
<dd>@prop.Value</dd>
}
</dl> | ise-uiuc/Magicoder-OSS-Instruct-75K |
NotImplemented | ise-uiuc/Magicoder-OSS-Instruct-75K |
import { Response } from "express";
import bcrypt from "bcrypt";
import accountModel from "../../../models/account";
import generateToken from "../../../services/generateToken";
import main from "../..";
async function getAccount(res: Response, email: string, password: string) {
try {
await main();
const us... | ise-uiuc/Magicoder-OSS-Instruct-75K |
print('看到:{0};\n奖励:{1};'.format(obs, reward))
action = self.strategy.run(obs, reward)
if not self.risk_controller.review_action(obs, reward, action):
action.reset()
return action
| ise-uiuc/Magicoder-OSS-Instruct-75K |
</div>
</div>
</div>
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">统计代码</label>
<div class="layui-input-block">
<textarea placeholder="请输入内容" class="layui-textarea w515"></textarea>
</div>
</div>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@Override
public void allTabsClosureCommitted() {
for (TabModelObserver observer : mFilteredObservers) {
observer.allTabsClosureCommitted();
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
skf = StratifiedKFold(y,kfold)
skfind = [None] * len(skf)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class UniversalString(univ.OctetString):
tagSet = univ.OctetString.tagSet.tagImplicitly(
tag.Tag(tag.tagClassUniversal, tag.tagFormatSimple, 28)
)
encoding = "utf-32-be"
class BMPString(univ.OctetString):
tagSet = univ.OctetString.tagSet.tagImplicitly(
tag.Tag(tag.tagClassUniversal, t... | ise-uiuc/Magicoder-OSS-Instruct-75K |
Revision ID: 3243c3538fc
Revises: <PASSWORD>
Create Date: 2015-06-04 18:39:54.895177
"""
# revision identifiers, used by Alembic.
revision = '<KEY>'
down_revision = '<PASSWORD>'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
field=models.CharField(blank=True, max_length=24, unique=True),
),
]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{userContacts.map(({ name, date, id }) => {
const distance = differenceInCalendarDays(new Date(), toDate(date));
const distanceValue = (
<div className="contactCard__distance">
<span className="contactCard__value u-t__fontFamily--secondary">
{distance}
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
model_name='checkingcomment',
name='created_at',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.port = port
self.resource_free = True
self.connection_active = True
self.port_release = True
super(SerialPort, self).__init__(parent)
self.serial = serial.Serial(self.port, '9600', timeout=5)
@relialok.Logger.function_log
def send(self, progress_callback=No... | ise-uiuc/Magicoder-OSS-Instruct-75K |
'throughsubjects': {'subject', 'creative_work'},
}
def regulate_graph(self, graph):
# naive algorithm, O(n*m) (n: number of nodes, m: number of merges)
# but merges shouldn't be common, so probably not worth optimizing
count = 0
while self._merge_first_dupe(graph):
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
idle += v[i];
}
return idle;
}
// NOT USED: Read and return CPU utilization
vector<string> LinuxParser::CpuUtilization() { return {}; }
// ADDED: Process CPU Utilization
float LinuxParser::CpuUtilization(int pid) {
long activeJiffies = LinuxParser::ActiveJiffies(pid);
long uptime = LinuxParser::UpTime(pid... | ise-uiuc/Magicoder-OSS-Instruct-75K |
differenceFromBase = 0
for svTypeInd in range(0, len(svTypes)):
baseAUC = baseAUCs[svTypeInd]
swapAUC = aucs[swapFolder][svTypeInd]
#avoid failed runs that will give a huge difference (e.g. no pathogenic SVs with swap)
if swapAUC == 0:
continue
differenceFromBase += (swapAUC - baseAUC)
allD... | ise-uiuc/Magicoder-OSS-Instruct-75K |
idx1 = int(chunk_size * frequency_limits[pin][0] / sample_rate)
idx2 = int(chunk_size * frequency_limits[pin][1] / sample_rate)
# if index1 is the same as index2 the value is an invalid value
# we can fix this by incrementing index2 by 1, This is a temporary fix
# for Ru... | ise-uiuc/Magicoder-OSS-Instruct-75K |
from nac.core import BenchmarkSuite
| ise-uiuc/Magicoder-OSS-Instruct-75K |
sentences.Add(sentence.Trim().ToLower());
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
}, onError: { [weak self] (error) in
print(error)
self?.formLoadingSubject.accept(false)
}, onCompleted: { [weak self] in
self?.formLoadingSubject.accept(false)
}).disposed(by: disposeBag)
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
),
ForeignKeyConstraint(
pop_periode(cls, ["periode", "kinerja"]),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# define the fields for your item here like:
# name = scrapy.Field()
coverImage = scrapy.Field() #"cover.jpg",
classify = scrapy.Field() #"分类",
index = scrapy.Field() #"列表页中的排名",
pageNo = scrapy.Field() #"列表中的第几页",
content = scrapy.Field() #"html内容"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
void StopLog(void);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
field=models.CharField(blank=True, max_length=255, null=True),
),
migrations.AddField(
model_name='homepage',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
std::cout << inString;
}
XPLM_API void XPLMEnableFeature(
const char * inFeature,
int inEnable)
{
// Not implemented.
}
XPLM_API void XPLMGetPluginInfo(
XPLMPluginID inPlugin,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"""
Args:
obs_dim: number of dimensions in observation vector (int)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
probe_value %= MERSENNES1[2]
yield probe_value % bloom_filter.num_bits_m
def try_unlink(filename):
"""unlink a file. Don't complain if it's not there"""
try:
os.unlink(filename)
except OSError:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
export abstract class PaginatedInput {
@Field(_type => Int, {defaultValue: 0})
readonly take: number;
@Field(_type => Int, {defaultValue: 0})
readonly skip: number;
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
private GameModule(Context context) {
gamePresenter = new GamePresenter(context);
gameLogic = new GameLogic();
}
public static GameModule get() {
if (instance == null) {
throw new RuntimeException("This class must be initialized");
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// VirtualTourist
//
// Created by Mark Tapia on 9/24/17.
// Copyright © 2017 Mark Tapia. All rights reserved.
//
import Foundation
import CoreData
@objc(Photo)
public class Photo: NSManagedObject {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if (tokens.get(cnt).is("rising"))
cnt++;
else throw new ParseException("rising expected: " + Tokenizer.debugShow(tokens, cnt));
ArrayList<Token> subtokens = Tokenizer.startingEnding(cnt, "(", ")", tokens);
cnt += subtokens.size()+2;
p = new P();
int cnt2 = p.parse(subtokens, 0);
if (cnt2 == subt... | ise-uiuc/Magicoder-OSS-Instruct-75K |
}
@Override
public Object empty() {
return Collections.emptyList().toArray();
}
@Override
public Class<?> getEnumerableInterface() {
throw new JaversException(JaversExceptionCode.NOT_IMPLEMENTED);
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
__author__ = """<NAME>"""
__email__ = "<EMAIL>"
__version__ = '0.1.4'
from .typed_environment_configuration import *
| ise-uiuc/Magicoder-OSS-Instruct-75K |
>>> print('hello')
hello
"""
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// MARK: - TODOsWidget
@main
struct TODOsWidget: Widget {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# shellcheck disable=SC2034,SC2154
| ise-uiuc/Magicoder-OSS-Instruct-75K |
schema: The schema of this InputDescriptors [Optional].
"""
constraints: Optional[Constraints] = None
group: Optional[List[str]] = None
id: Optional[str] = None
metadata: Optional[Dict[str, Any]] = None
| ise-uiuc/Magicoder-OSS-Instruct-75K |
'handlers': {
# Writing to console. Use only in dev.
'console': {
'level': 'DEBUG',
'class': 'logging.StreamHandler',
'formatter': 'console'
},
# Send logs to /dev/null.
'null': {
'level': 'DEBUG',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<button class="btn btn-default" data-dismiss="modal">Close</button>
<button id="save" class="btn btn-primary">Save changes</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<!-- /.modal -->
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
ldefs = logDefs if logDefs != 'BestForBase' else (simpleActorTestLogging() if newBase.startswith('multiproc') else False)
# In case the ActorSystem was *already* setup, break the singleton aspect and re-init
ActorSystem(logDefs = ldefs).shutdown()
ActorSystem(newBase, sys... | ise-uiuc/Magicoder-OSS-Instruct-75K |
print(f"Scaling to {str(scale_to)} GPU nodes.")
print(autoscaling_client.set_desired_capacity(
AutoScalingGroupName='terraform-eks-eyra-prod01-gpu',
DesiredCapacity=scale_to
))
@shared_task
def sleep_one_sec():
# used for testing basic tasks
| ise-uiuc/Magicoder-OSS-Instruct-75K |
new WPML_TF_Backend_Scripts(),
$wpdb
);
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
queue.append(x)
visited[x] = 1
cnt = 0
for i in range(1, N + 1):
if visited[i] == 0:
bfs(i)
cnt += 1
print(cnt) | ise-uiuc/Magicoder-OSS-Instruct-75K |
for filename in *.txt
do
# Store the country name from each file into a varible called NAME
# Removing any underscores and replacing them with spaces
NAME=$(echo $filename | sed 's/\(.*\)\.cc\.txt/\1/g' | sed 's/_/ /g')
#DEBUG TEST # awk 'BEGIN{FS="\t"} {print $1}' Congo_Dem_Rep.cc.txt | sed 's/,/ /g'... | ise-uiuc/Magicoder-OSS-Instruct-75K |
return s
| ise-uiuc/Magicoder-OSS-Instruct-75K |
slack_text = slack_json['blocks'][0]['text']['text'].replace(">>>","")
if len(slack_json['blocks']) > 1:
for block in slack_json['blocks']:
slack_text += "\n" + slack_json['blocks'][block]['text']['text']
mattermost_json = '{"text": "' + slack_text... | ise-uiuc/Magicoder-OSS-Instruct-75K |
fig.patch.set_alpha(0)
if kwargs.has_key('orig_size'): # Aspect ratio scaling if required
w,h = kwargs['orig_size']
w2,h2 = fig_size[0],fig_size[1]
fig.set_size_inches([(w2/w)*w,(w2/w)*h])
#fig.set_dpi((w2/w)*fig.get_dpi())
fig.set_dpi(100)
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String)
parent_id = db.Column(db.Integer, db.ForeignKey('category.id'), nullable=True)
last_updated = db.Column(db.DateTime(timezone=True), default=func.now())
display_order = db.Column(db.Integer, nullable=True)
children = db.rela... | ise-uiuc/Magicoder-OSS-Instruct-75K |
/**
* {@inheritdoc}
*/
public function getRate($fromCurrency, $toCurrency)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
results_provided["car_price"] = result
def version():
return "1.0.0"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
* time:2018年7月18日
* author:L
*/
@RequestMapping(value="/selectRequirementType")
@ResponseBody
public Map<String,Object> doSelectRequirementType (){
Map<String,Object> map = new HashMap<String,Object>();
try {
boolean flag = true;
String errorString = "";
Object data = productService.doSe... | ise-uiuc/Magicoder-OSS-Instruct-75K |
extern crate crypto as rcrypto;
extern crate primitives;
extern crate siphasher;
use rcrypto::{digest::Digest, sha2::Sha256, sha1::Sha1, ripemd160::Ripemd160};
use siphasher::sip::SipHasher24;
use std::hash::Hasher;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class TestRowspanContainedRow(WriteTh):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
df = pd.DataFrame.from_dict(info_dict, orient="index")
return df.fillna(self.UNKNOWN)
def to_dict(self):
"""
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# dm2.stream.write("2...")
# with dm2.stream.DoneManager(associated_stream=verbose_stream2) as ( dm3, verbose_stream3 ):
# ... | ise-uiuc/Magicoder-OSS-Instruct-75K |
return need_transformed
def _used_by_paddle_api(self, node):
"""
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if errfile is None:
errfile = sys.stdout
self._errfile = errfile
# Always big endian for Eclipse
| ise-uiuc/Magicoder-OSS-Instruct-75K |
notFound() {
return this.build({}, 404);
}
build(
body: any = {},
statusCode: number = 200,
contentType: string = 'application/json',
headers: { [key: string]: any} = {},
): RestApiResponseOutput {
headers['Content-Type'] = `${contentType};charset=utf-8`;
if (this.cors) {
head... | ise-uiuc/Magicoder-OSS-Instruct-75K |
pub struct BatchRequest {
pub preparer: RequestPreparer,
pub requests: Vec<RequestPreparer>,
}
impl BatchRequest {
pub fn new(config: KintoConfig) -> BatchRequest {
let mut preparer = RequestPreparer::new(config, Paths::Batch.into());
preparer.method = Method::Post;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
name = 'profiles_rest_api'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if __name__ == "__main__":
unittest.main()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from funsor.testing import allclose # noqa F401
from .ops import * # noqa F401
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public final Template.Method<Void> clear = new Template.Method<Void>();
public final Template.Method<Integer> size = new Template.Method<Integer>();
public final Template.Method<Boolean> containsKey = new Template.Method<Boolean>();
public final Template.Method<Object> get = new Templat... | ise-uiuc/Magicoder-OSS-Instruct-75K |
'Name: name\n'
'Version: 1.0\n'
)
pkg_info_data = util.parse_pkg_info_file(mocker.sentinel.path)
open_mock = open_mock.assert_called_once_with(
mocker.sentinel.path,
'rt',
)
assert {
'Name': 'name',
'Version': '1.0',
} == pkg_info_data
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
if has_image:
assert output["image"] == "http://example.com/image"
else:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
SCALE_WIDTH = 25
| ise-uiuc/Magicoder-OSS-Instruct-75K |
title: string;
description: string;
fileName: string;
fileType: string;
userEmail: string;
mediaType: string;
isAdult: boolean;
file: Blob;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.final = None
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from setuptools import find_packages, setup
setup(
name='filetype',
version='1.0.7',
description='Infer file type and MIME type of any file/buffer. '
'No external dependencies.',
long_description=codecs.open('README.rst', 'r',
encoding='utf-8', errors='i... | ise-uiuc/Magicoder-OSS-Instruct-75K |
assert np.array_equal(cksaap_list, np.array([
[0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0],
[0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0],
[1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1]]))
# test ValueError
with pytest.raises(ValueError):
cksaap_error, desc = cksaap(X_err) | ise-uiuc/Magicoder-OSS-Instruct-75K |
def __init__(self, pipe, query):
self.pipe = pipe
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Screw Drive types
'cruciform',
'hex',
'slotted',
'square',
'tamper_resistant',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
),
2
);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
CC_CHECK(pattern.match("test.cpp"));
}
};
TestCase {
"UriDispath",
[]{
List<String> services {
"glibc.*",
"cckit.*",
"books.*",
"test.*",
"*httpecho*"
};
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# This file is being contributed to pyasn1-modules software.
#
# Created by <NAME>.
#
# Copyright (c) 2019, Vigil Security, LLC
# License: http://snmplabs.com/pyasn1/license.html
#
| 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.