seed stringlengths 1 14k | source stringclasses 2 values |
|---|---|
"""Function takes a string representing a headline and if it is longer than the maximum width allowed it will
shorten the string and append an ellipse"""
if headline is None:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<reponame>f15gdsy/BT-Extensions
using UnityEngine;
using System.Collections;
namespace BT.Ex.Movement {
public enum GeneralDirection {
Horizontal,
Vertical,
Both
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
packages=find_packages()
)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
elif mode == 'Vnormals':
toggleCvarsValue('mode_%s' % mode, 'r_shownormals', 1, 0)
elif mode == 'Tangents':
toggleCvarsValue('mode_%s' % mode, 'r_ShowTangents', 1, 0)
elif mode == 'texelspermeter360':
toggleCvarsValue('mode_%s' % mode, 'r_TexelsPerMeter', float(256), float(0))
elif mode == 'texelspermeterpc':
toggleCvarsValue('mode_%s' % mode, 'r_TexelsPerMeter', float(512), float(0))
elif mode == 'texelspermeterpc2':
toggleCvarsValue('mode_%s' % mode, 'r_TexelsPerMeter', float(1024), float(0))
elif mode == 'lods':
| ise-uiuc/Magicoder-OSS-Instruct-75K |
wm = maps.World()
wm.title = 'North America'
wm.add('North America', {'ca': 34126000, 'us': 309349000, 'mx': 113423000})
wm.add("Teste", {'br': 202000000})
wm.render_to_file('na_america.svg') | ise-uiuc/Magicoder-OSS-Instruct-75K |
# c1.add_block(block_data)
# print(c1.blocks[3])
# print('C1: Block chain verify: %s' % (c1.verify_chain(public_key)))
# Note: This is how you would load and verify a blockchain contained in a file called blockchain.dat
# verify the integrity of the blockchain
# print(f'Block chain verify: {chain.verify_chain(official_public_key, "c6e2e6ecb785e7132c8003ab5aaba88d")}')
# print(c2.blocks[0])
# c2.blocks[0].dump_doc(1)
# print("number of chunks", len(c2.blocks))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# first pass gets zip_keys entries from each and merges them. We treat these specially
# below, keeping the size of related fields identical, or else the zipping makes no sense
| ise-uiuc/Magicoder-OSS-Instruct-75K |
MultipleEventContainsFilter filter = new MultipleEventContainsFilter("", false, factory);
filter.setEventContainsString("one,two");
DefaultLogEvent eventA = LogEventBuilder.create(0, Logger.info, "one");
DefaultLogEvent eventB = LogEventBuilder.create(0, Logger.info, "two");
DefaultLogEvent eventC = LogEventBuilder.create(0, Logger.info, "three");
assertThat(filter.passes(eventA), is(true));
assertThat(filter.passes(eventB), is(true));
assertThat(filter.passes(eventC), is(false));
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
=========================================
"""
import json
import re
from .. import CommandParser, parser
from insights.specs import Specs
@parser(Specs.ceph_insights)
class CephInsights(CommandParser):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
func decimals() -> SolidityInvocation
}
/// Generic implementation class. Use directly, or subclass to conveniently add your contract's events or methods.
open class GenericERC20Contract: StaticContract, ERC20Contract, AnnotatedERC20 {
public var address: Address?
public let eth: Web3.Eth
| ise-uiuc/Magicoder-OSS-Instruct-75K |
corners: [Phaser.Point, Phaser.Point, Phaser.Point, Phaser.Point, Phaser.Point, Phaser.Point];
constructor (game, size: number, x: number, y: number, scale: number = 1) {
super(game);
this.outerRadius = size / 2;
this.innerRadius = this.outerRadius * Math.sqrt(3) / 2;
this.corners = [
new Phaser.Point(0, this.outerRadius),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Parameters
----------
param : dict
Parameters of combiner method.
type_model : str
Type of model: regressor or classifier
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
/**
* Tests the {@link Buttons} class
*
* @author miha
*/
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Optionally examine the logs of the master
client.stop(container['Id'])
client.wait(container['Id'])
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// Launch the Immersive Reader.
immersiveReaderButton.tap()
// Ensure the Immersive Reader launched.
if (!immeriveReaderLaunchHelper()) {
XCTAssert(false)
}
// Exit the Immersive Reader.
app.navigationBars["immersive_reader_sdk.ImmersiveReaderView"].buttons["Back"].tap()
// Ensure the Immersive Reader exited.
if (!immersiveReaderButton.exists) {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
print("Relic Forecast ", fidx, " complete...")
dill.dump_session(os.path.join(fp_resultsdir, 'fp_'+str(temp_index)+'_'+str(mass_index)+'.db'))
else:
print('Fisher matrix already generated!')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
//
// RecordCallTest.swift
// sugarcrmcandybar
//
// Created by Ben Selby on 20/11/2016.
// Copyright © 2016 Ben Selby. All rights reserved.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def cmd(ctx, key_path, user_name):
"""Creates a new user"""
shell = ctx.shell
home = "/home/%s" % user_name
#create user for the domain
if (ctx.verbose):
click.echo("Creating user...")
code, output = shell.cmd("sudo adduser --home %s --force-badname --disabled-password %s" % (home, user_name))
#create .ssh dir
if (ctx.verbose):
click.echo("Creating ssh dir...")
code, output = shell.cmd("sudo mkdir -vp %s/.ssh" % home)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
inorder(root->right);
}
int rangeSumBST(TreeNode* root, int low, int high) {
lb = low;
hb = high;
inorder(root);
return ans;
}
};
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return False # Runs until interrupted
def end(self):
self.robot.drivetrain.driveManual(0,0,0)
pass
def interrupted(self):
self.end()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# This file is auto-generted by antlr4conanexample/conanfile.py by conan install ..
export ANTLR_HOME="~/.local/bin"
export ANTLR_JAR="$ANTLR_HOME/antlr-4.10.1-complete.jar"
export CLASSPATH=".:$ANTLR_JAR:$CLASSPATH"
alias antlr4="java -jar $ANTLR_JAR"
alias grun="java org.antlr.v4.gui.TestRig"
cd ~/.local/bin && [ ! -f "antlr-4.10.1-complete.jar" ] && wget https://www.antlr.org/download/antlr-4.10.1-complete.jar
cd -
antlr4 -o Parser -no-listener -no-visitor -Dlanguage=Cpp Gram.g4
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return response()->json([
'message' => 'Message at NOTFAVORITES',
'favorit' => 1
]);
}
return back()->with('success', 'The question has been favorited');
}else{
$question->favorites()->detach(auth()->id());
if(request()->expectsJson()){
| ise-uiuc/Magicoder-OSS-Instruct-75K |
'email' => 'Email',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
ans = ans + arr2[i:]
print(ans) | ise-uiuc/Magicoder-OSS-Instruct-75K |
@NotNull
private Long msgId;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Do not return anything, modify s in-place instead.
"""
beg = 0
end = len(s) - 1
while beg < end:
s[beg], s[end] = s[end], s[beg]
beg += 1
end -= 1
| ise-uiuc/Magicoder-OSS-Instruct-75K |
fp = open(rootDir+'output/star_list/stars.csv','r')
line = fp.readline()
while len(line) != 0:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@pytest.mark.django_db
def test_public_private_default():
c = ChallengeFactory()
r1 = ResultFactory(job__submission__challenge=c)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
// RUN: not %target-swift-frontend %s -typecheck
case
{
{{
{
{[
{
((((((((){
({
[[{
[{
{{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if array_dim == 1:
reader = tick_float_array_from_file
elif array_dim == 2:
reader = tick_float_array2d_from_file
else:
raise ValueError('Only 1d and 2d arrays can be loaded')
elif array_type == 'sparse':
if array_dim == 2:
reader = tick_float_sparse2d_from_file
else:
raise ValueError('Only 2d sparse arrays can be loaded')
else:
raise ValueError('Cannot load this class of array')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
</header>
<div class="card-body">
<div>
{!!$annonce->content!!}
</div>
</div>
<footer class="card-footer">
{{$annonce->created_at->format('d/m/y à H:i:s')}}
</footer>
</article>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def __init__(self, eventEngine, info, configFile=None, accountConfigFile=None):
super().__init__(eventEngine, info, configFile, accountConfigFile)
self._httpAdapter = None
def _preLogin(self):
# 开始一个会话
self._session = requests.session()
if self._httpAdapter is not None:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<gh_stars>0
import matplotlib.pyplot as plt
| ise-uiuc/Magicoder-OSS-Instruct-75K |
NUM_REGIONS=16
# Make a layout - 4K regions on 4K boundaries. This will test basic
| ise-uiuc/Magicoder-OSS-Instruct-75K |
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class UserRepository extends \Doctrine\ORM\EntityRepository
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public String name() {
return "basic";
}
@Override
public BasicFileAttributes readAttributes() throws IOException {
return target;
}
/**
* This API is implemented is not supported but instead of throwing an exception just do nothing
* to not break the method {@code java.nio.file.CopyMoveHelper#copyToForeignTarget(java.nio.file.Path, java.nio.file.Path, java.nio.file.CopyOption...)}
*
| ise-uiuc/Magicoder-OSS-Instruct-75K |
coder_urn = ['beam:coder:varint:v1']
args = {
'start':
ConfigValue(
coder_urn=coder_urn,
payload=coder.encode(self.start))
}
if self.stop:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.n_classes = len(self.classes)
else:
self.n_classes = np.random.randint(low=2, high=len(self.classes))
classes_sample = np.random.choice(self.classes, self.n_classes,
replace=False)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def __exit__(self, exc_type, exc_value, traceback):
if self._to_log:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
self.currentCartID = id
completion(nil)
}
}
func removeItemFromCart(id: Int64, completion: @escaping (String?) -> ()) {
service.removeItemFromCart(id: id) { error in
if let error = error as? CartAPIServiceError {
completion(error.errorMessage)
return
}
completion(nil)
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
cutoff_top_n (int): cutoff number in pruning. Only the top cutoff_top_n characters with the highest probability
in the vocab will be used in beam search.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
foreach (CurrencyFixtures::CURRENCIES as $key=>$value){
$repository = $this->container->get('doctrine')->getRepository(Currencies::class);
$currency = $repository->findOneBy(['code' => $value]);
$rate = new Rates();
$rate->setRateValue(random_int(4000,20000));
$rate->created_at = new \DateTime($date);
$rate->setCurrencyId($currency);
$manager->persist($rate);
}
}
$manager->flush();
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
w_->actionRemove_->setEnabled(false);
w_->actionRemoveAll_->setEnabled(false);
}
}
void LimitEditor::slotSelection(const QItemSelection& /*selected*/, const QItemSelection& /*deselected*/)
{
bool st = w_->pathView_->selectionModel()->selectedIndexes().count() > 0;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
flash('"%s" was saved.' % page.title, 'success')
return redirect(url_for('wiki.display', url=url))
return render_template('editor.html', form=form, page=page)
@bp.route('/preview/', methods=['POST'])
@protect
| ise-uiuc/Magicoder-OSS-Instruct-75K |
NfseUraProducao.NfseServicesClient WebServiceProducao = new NfseUraProducao.NfseServicesClient();
WebServiceProducao.ClientCredentials.ClientCertificate.Certificate = certificado;
return WebServiceProducao.RecepcionarLoteRps(WebServiceUra.Cabecalho_NFSe, WebServiceUra.SerializaObjetoEmXml(lote).InnerXml);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<gh_stars>1-10
from datetime import datetime
from scrapy import signals
class MonitorExtension(object):
"""
采集并上报监控指标,如scrapy状态或需要的业务指标
"""
def __init__(self, stats):
self.stats = stats
self.spider = None
| ise-uiuc/Magicoder-OSS-Instruct-75K |
m_blurShader.loadFromFile("quad-shader", "blur-shader");
}
void SSAORenderer::reloadFramebuffers(const sf::Vector2i & screenDimensions)
{
m_screenDimensions = screenDimensions;
TexParams params;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
trueDisp_left = disparity_left.astype(np.float32) / 16.
trueDisp_right = disparity_right.astype(np.float32) / 16.
return trueDisp_left, trueDisp_right
# 将h×w×3数组转换为N×3的数组
def hw3ToN3(points):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import { SentTX } from '../..';
import TransactionController from './controllers/Transaction';
export declare type TransactionSchema = SentTX;
export interface DatabaseSchema {
transactions: TransactionSchema[];
| ise-uiuc/Magicoder-OSS-Instruct-75K |
helper = BootstrapHelper(wider_labels=True, add_cancel_button=False,
duplicate_buttons_on_top=False)
class Meta(DCEventRequestNoCaptchaForm.Meta):
exclude = ('state', 'event') \
+ DCEventRequestNoCaptchaForm.Meta.exclude
class DCSelfOrganizedEventRequestForm(
DCSelfOrganizedEventRequestFormNoCaptcha, PrivacyConsentMixin):
captcha = ReCaptchaField()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<reponame>ALIENK9/Kuzushiji-recognition
import os
import pandas as pd
import regex as re
from networks.classes.centernet.utils.BBoxesVisualizer import BBoxesVisualizer
class Visualizer:
def __init__(self, log):
self.__log = log
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.x += settings::PADDLE_X_DELTA;
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
model_name='querysetrule',
name='rule_type',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@deal.pre(lambda x: x > 0)
def f(x):
return x + 1
contracts = deal.introspection.get_contracts(f)
for contract in contracts:
assert isinstance(contract, deal.introspection.Contract)
assert isinstance(contract, deal.introspection.Pre)
assert contract.source == 'x > 0'
assert contract.exception is deal.PreContractError
contract.validate(1)
```
"""
from ._extractor import get_contracts, init_all, unwrap
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// If the Space button is being press and it's time to shoot...
if (Input.GetKey(KeyCode.Space) && timer >= timeBetweenBullets && Time.timeScale != 0)
{
Shoot();
}
}
void Shoot()
{
// Reset the timer.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolore consequuntur praesentium dignissimos voluptatum esse, perspiciatis mollitia repellendus rerum magni aspernatur ipsam maxime dolorem iure laudantium at veritatis doloribus, numquam, dicta?</p>
</div>
</div>
</div>
<!-- end about us -->
@endsection
| ise-uiuc/Magicoder-OSS-Instruct-75K |
list_display = ('name', 'icon_thumbnail')
icon_thumbnail = AdminThumbnail(image_field='thumbnail')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
type: 'simplified',
passForward(input) {
return input
},
passBack(error) {
return error
},
size,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
with pytest.raises(RuntimeError):
next(unasync_path(async_folder, sync_folder, create_missed_paths=False))
def test_raising_error_if_path_does_not_exist() -> None:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if model_name == "GoogleNet":
| ise-uiuc/Magicoder-OSS-Instruct-75K |
* http://www.apache.org/licenses/LICENSE-2.0
*/
#include <lfant/Component.h>
// External
// Internal
#include <lfant/Console.h>
#include <lfant/Entity.h>
#include <lfant/ScriptSystem.h>
#include <lfant/Scene.h>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
print(data.format(cidade,dia,mes,ano,canal))#forma de impressão
| ise-uiuc/Magicoder-OSS-Instruct-75K |
static IEnumerable<int> Range(int from, int to) {
for (int i = from; i < to; i++) {
yield return i;
}
yield break;
}
static void Main() {
foreach (int x in Range(-10,10)) {
Console.WriteLine(x);
}
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def set(self):
self._val = True
return self
def clear(self):
self._val = False
| ise-uiuc/Magicoder-OSS-Instruct-75K |
--tx-in 6abc9cded89953747e8f22609917c3170008dbbca1b97cdf4c5c05bb454c4fd1#0 \
--tx-out $(cat $WORKDIR/fund.addr)+333333333 \
--ttl $TTL \
--fee 0 \
--tx-body-file $WORKDIR/genesis_tx.txbody
run 'cardano-cli' transaction sign \
--tx-body-file $WORKDIR/genesis_tx.txbody \
--signing-key-file $WORKDIR/configuration/genesis/utxo-keys/utxo1.skey \
--testnet-magic $MAGIC \
--tx-file $WORKDIR/genesis_tx.tx
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def solution(A):
# write your code in Python 2.7
s = set(A)
N_set = len(s) #O(n)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
my_image = Image.open("assets/images/splashscreen_background.png")
width, height = my_image.size
| ise-uiuc/Magicoder-OSS-Instruct-75K |
*
* @return void
*/
private function dispatchImportReconfigurationRequest(): void
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if __name__ == '__main__':
main()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#if args.h5_path is None:
if args.type == 'h36m':
subject = args.subject # "S9"
camera_id = args.camera_id # -1
cameras = ["54138969", "55011271", "58860488", "60457274"]
camera = None
if camera_id is not None:
camera = cameras[camera_id]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import { KeyHandler } from "../../plugins/KeyHandler";
export declare const ListTabKeyHandler: KeyHandler;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
kMaxSums[k - 1] = kSum;
for (int upperBound = k; upperBound < a.length - l; upperBound++) {
kSum = kSum - a[upperBound - k] + a[upperBound];
kMaxSums[upperBound] = max(kMaxSums[upperBound - 1], kSum);
}
return kMaxSums;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
right_count = 0
star_count = 0
for char in s[::-1]:
if char == ')':
right_count += 1
elif char == '*':
star_count += 1
| ise-uiuc/Magicoder-OSS-Instruct-75K |
profitability: yup.string().required('Campo obrigatório'),
})
.required()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import procrunner
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.assertTrue(np.allclose(obj1, obj2))
def test_binaray_crossentropy_average_loss_false_torch(self):
obj1 = fe.backend.binary_crossentropy(y_pred=self.torch_pred, y_true=self.torch_true,
average_loss=False).numpy()
obj2 = np.array([0.10536041, 0.3566748, 0.22314338, 0.10536041])
self.assertTrue(np.allclose(obj1, obj2))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
[RequestEndPoint("cep?cep={PostalCode}")]
public sealed class PostalCodeRequest : BaseRequest
{
/// <summary>
/// Gets or sets the postal code.
/// </summary>
/// <value>The postal code.</value>
public string PostalCode { get; set; }
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from uio import Uio
from argsort_axi import ArgSort_AXI
if __name__ == '__main__':
uio = Uio('uio_argsort')
argsort_axi = ArgSort_AXI(uio.regs())
argsort_axi.print_info()
argsort_axi.print_debug()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// http://constructor.io/
//
import XCTest
@testable import ConstructorAutocomplete
class UIColorRGBConversionTests: XCTestCase {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Expect(() => new ConfigurationModify(this.ssm, this.scm)).not.toThrow();
const sm = new ConfigurationModify(this.ssm, this.scm);
Expect(sm.serverSettings).toBeDefined();
Expect(sm.slashCommands).toBeDefined();
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def convert(size, box):
'''
convert (xmin, ymin, xmax, ymax) to (cx/w, cy/h, bw/w, bw/h)
param:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
res = cv2.resize(img,None,fx=3, fy=3, interpolation = cv2.INTER_LINEAR)
#OR
# height, width = img.shape[:2]
# res = cv.resize(img,(2*width, 2*height), interpolation = cv.INTER_LINEAR
cv2.imwrite('../Images/8scaling.jpg', res)
cv2.imshow('img',res)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
sudo -u $USER yarn application -kill $1
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return NofollowExtension(configs=configs) | ise-uiuc/Magicoder-OSS-Instruct-75K |
'EXPIRED_CONFIRMATION_ID': 'Confirmation code expired',
'INVALID_CONSENT_STATUS': 'Invalid consent status',
'UNKNOWN_CONSENT': 'Unknown consent',
'INVALID_DATA': 'Invalid parameters',
'MISSING_PERSON_ID': 'Missing person id',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Arguments:
runner (Runner): reference to Runner object
resource (str): identifies project, study, expression, continuous
response_obj (Response): response object to parse
"""
for filter_obj in response_obj:
runner.retrieved_server_settings[resource]["supp_filters"]\
.append(filter_obj["filter"])
def update_expected_format(runner, resource, response_obj):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
rmtree("./mots", ignore_errors=True)
os.makedirs("./mots", exist_ok=True)
for i, word in enumerate(words):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
v_varname=$1
v_sourcecsv=$2
echo "var ${v_varname} = new google.visualization.DataTable();"
echo "${v_varname}.addColumn('string', 'Owner');"
echo "${v_varname}.addColumn('string', 'Name');"
echo "${v_varname}.addColumn('string', 'Type');"
echo "${v_varname}.addColumn('number', 'Container');"
echo "${v_varname}.addColumn('boolean', 'Result');"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def calculate_metrics(df_gs, df_pred):
Pred_Pos_per_cc = df_pred.drop_duplicates(subset=['clinical_case',
"code"]).groupby("clinical_case")["code"].count()
Pred_Pos = df_pred.drop_duplicates(subset=['clinical_case', "code"]).shape[0]
# Gold Standard Positives:
GS_Pos_per_cc = df_gs.drop_duplicates(subset=['clinical_case',
"code"]).groupby("clinical_case")["code"].count()
GS_Pos = df_gs.drop_duplicates(subset=['clinical_case', "code"]).shape[0]
cc = set(df_gs.clinical_case.tolist())
TP_per_cc = pd.Series(dtype=float)
for c in cc:
pred = set(df_pred.loc[df_pred['clinical_case']==c,'code'].values)
gs = set(df_gs.loc[df_gs['clinical_case']==c,'code'].values)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class PDFExtractionTestCase(PDFTestCase):
def test_pdf_extraction(self):
results = pdf_extraction(PDF)
assert 'text' in results.keys()
assert 'metadata' in results.keys()
assert isinstance(results.get('text'), six.string_types)
assert isinstance(results.get('metadata'), dict)
def test_image_support(self):
results = pdf_extraction(PDF, images=True)
assert 'text' in results.keys()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# What it says.
export HISTCONTROL=ignoredups
# Append to ~/.bash_history instead of overwriting it -- this stops terminals
# from overwriting one another's histories.
shopt -s histappend
# Save each history entry immediately (protects against terminal crashes/
# disconnections, and interleaves commands from multiple terminals in correct
# chronological order).
export PROMPT_COMMAND="history -a; $PROMPT_COMMAND" | ise-uiuc/Magicoder-OSS-Instruct-75K |
# in the Software without restriction, including without limitation the rights
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
public class DocumentEditResponseModel
{
public DocumentEditModel ProposedValues { get; set; }
public DocumentEditModel DatabaseValues { get; set; }
public bool HasConcurrencyError { get; set; }
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
})
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Determine if queue is empty.
"""
return self.N == 0
def is_full(self):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
migrations.RunSQL(
sql=[
'alter table only recipient_profile alter column last_12_months set default 0.00',
"alter table only recipient_profile alter column recipient_affiliations set default '{}'::text[]",
'create index idx_recipient_profile_name on recipient_profile using gin (recipient_name gin_trgm_ops)',
],
),
]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
pos_neg_test.pos = -4
assert "greater than" in str(excinfo.value)
with pytest.raises(ValueError) as excinfo:
pos_neg_test.pos = -4.5
assert "greater than" in str(excinfo.value)
# Ensure 0 works if allow_zero is true
if pos_neg_test.allow_zero:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
ctx: commands.Context,
users: commands.Greedy[discord.Member],
*,
time_and_reason: MuteTime = {},
):
"""Mute a user in their current voice channel.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
params = {
| 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.