seed stringlengths 1 14k | source stringclasses 2
values |
|---|---|
title='My second post',
publish=datetime.datetime(2015, 1, 2, 6, 0),
body='This is the second post.'
)
post_list = [post.serialized() for post in blog.posts.all()]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
};
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
urlpatterns = [
url(r'^create-location/$', LocationSearchView.as_view(), name='location_create'),
]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<script src="<?php echo base_url(); ?>assets/js/subview.js"></script>
<script src="<?php echo base_url(); ?>assets/js/subview-examples.js"></script>
<!-- end: JAVASCRIPTS REQUIRED FOR SUBVIEW CONTENTS -->
<!-- start: JAVASCRIPTS REQUIRED FOR THIS PAGE ONLY -->
<script src="<?php echo base_url(); ?>assets/p... | ise-uiuc/Magicoder-OSS-Instruct-75K |
)
self.raw_check_run.edit(
status=value_or_NotSet(status.name if status else None),
conclusion=value_or_NotSet(conclusion.name if conclusion else None),
completed_at=value_or_NotSet(completed_at),
)
@staticmethod
def get_list(
| ise-uiuc/Magicoder-OSS-Instruct-75K |
assert_eq!(parse_memory_limit("1000000").unwrap(), 1000000);
assert!(parse_memory_limit("-1").is_err());
assert!(parse_memory_limit("").is_err());
assert_eq!(parse_passes("loop-fusion,inline-let").unwrap().len(), 2);
assert_eq!(parse_passes("loop-fusion").unwrap().len(), 1);
assert_eq!(parse_p... | ise-uiuc/Magicoder-OSS-Instruct-75K |
# (c) 2016 <NAME> [<EMAIL>]
from .extra_routines import state_to_id, period_to_date
from .query import IBGEQuery
| ise-uiuc/Magicoder-OSS-Instruct-75K |
c = {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import { ConnectionAdapter } from './ConnectionAdapter';
/**
* The configuration of the middleware connection adapter.
*/
export interface MiddlewareAdapterConfig {
/**
* The host name the root application is available under.
*/
hostName: string;
/**
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<?php foreach ($standar as $s) : ?>
<option value="<?= $s['id_standar']; ?>"><?= $s['no_standar']; ?> (<?= $s['deskripsi_standar']; ?>)</option>
<? endforeach; ?>
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
# Correct solution, not very slow, but the code is just plain ugly!
# Should reimplement the nested fors as a pretty recursive depth first search
import eulerlib
import pickle
#LIMIT = 100000000
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#define Root2Char( root ) HKEY_LOOKUP[ root & 0x00000007]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import org.ensembl.healthcheck.GroupOfTests;
import org.ensembl.healthcheck.testcase.generic.NoopSuccessTestCase;
/**
* Group of tests that always succeed. Use for testing.
* @author dstaines
*
*/
public class NoopSuccessTests extends GroupOfTests {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public class TestCMaxConcurrentSetting extends AbstractTest {
@Test
public void testSend2ndRequestOnlyOnCompletionOfFirst() throws InterruptedException, ExecutionException {
RequestsSent sent = sendTwoRequests();
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if not hasattr(item, '__iter__'): # Not some iterable
if -1 in shape: # Array of shape length of dimensions with one item
return np.array(item, ndmin = len(shape))
else:
return np.full(shape, item) # Array of copies in the shape
elif not isinstance(item, np.ndarray): # It... | ise-uiuc/Magicoder-OSS-Instruct-75K |
import dialogflow_v2 as dialogflow
import random
import os
import logging
import logging.config
from dotenv import load_dotenv
load_dotenv()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import numpy as np
import numpy.testing as npt
import f1_solver
from pulp import getSolver
class TestF1Solver(unittest.TestCase):
def test_check_shapes_correct(self):
C, V = np.zeros((3)), np.ones((5,3))
nums = np.array([3, 5])
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if args.semantics and os.path.exists(sm_path):
# backup semantics map
out_backup_path = os.path.join(output_backup_path, '{:s}_semantics.npy'.format(
'/'.join(file_name.split('/')[input_path_len:])))
shutil.copy(sm_path... | ise-uiuc/Magicoder-OSS-Instruct-75K |
/**
* Кнопка хедера для автотестирования
*/
public interface MenuItem extends Component {
void labelShouldHave(String text);
void click();
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#? Check the existence of IAM user.
#?
#? Usage:
#? @exist [USERNAME]
#?
#? Return:
#? 0: yes
#? 1: no
#?
function exist () {
declare query
| ise-uiuc/Magicoder-OSS-Instruct-75K |
assert_allclose(coords, expected_coord, atol=1e-4, rtol=1e-4)
def test_hot_diag_norm(self, device, dtype):
input = torch.tensor([[[[
[0., 0., 0., 0., 0.],
[0., 1., 0., 0., 0.],
[0., 0., 0., 0., 0.],
[0., 0., 0., 1., 0.],
[0., 0., 0., 0., 0... | ise-uiuc/Magicoder-OSS-Instruct-75K |
} else {
blinkTime++;
}
if (!show) {
return;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
private String username;
private LocalDateTime createTime;
private LocalDateTime updateTime;
private String detail;
private BigDecimal price;
private BigDecimal discount;
private Integer num;
private LocalDateTime payTime;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
response += 12 * b'\x00' # reserved space
response += b'\x80' # drive number for PC-BIOS (0x80 = hard disk)
response += b'\x00' # reserved space
response += b'\x29' # boot signature (from mkfs.vfat)
response += b'0000' #... | ise-uiuc/Magicoder-OSS-Instruct-75K |
get children(): TreeviewNode[] {
return this.childrenChange.value;
}
constructor(public item: VocabularyEntryDetail,
public hasChildren = false,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/**
* Returns all configs defined either in the .env or the constructor
*
* @return array
| ise-uiuc/Magicoder-OSS-Instruct-75K |
echo | ise-uiuc/Magicoder-OSS-Instruct-75K |
===================
https://github.com/phoronix-test-suite/phoronix-test-suite
The Phoronix Test Suite is the most comprehensive testing and
benchmarking platform available for Linux, Solaris, macOS, Windows,
and BSD operating systems.
"""
if __name__ == '__main__':
pass
| ise-uiuc/Magicoder-OSS-Instruct-75K |
for i in `ls "$d"`; do
f=$d/$i
test -f "$f" && test -r "$f" && test -x "$f" && . "$f"
done
| ise-uiuc/Magicoder-OSS-Instruct-75K |
else:
self._remove_all_actors()
# self.zombie_cars = list()
# self.vehicle_planners = list()
self._scenario_init()
def _remove_all_actors(self):
actors = [self.hero_car] + self.zombie_cars
# actors = self.zombie_cars
for actor in actor... | ise-uiuc/Magicoder-OSS-Instruct-75K |
#
# @lc code=start
class Solution:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
do
echo "ROUND"
echo $i
for f in out/*.zynq100.raw;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
path('login/',
views.Login.as_view(),
name='login'),
path('logout/',
views.Logout.as_view(),
name='logout'),
path('register-user/',
views.RegisterUser.as_view(),
name='register-user'),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
__all__ = ['CustomerService', 'DraftService', 'InvoiceService', 'TaxService']
| ise-uiuc/Magicoder-OSS-Instruct-75K |
c = get_contract(code)
assert c.test() == Decimal('5001')
assert c.test2() == Decimal('1234')
def test_convert_from_int128(get_contract_with_gas_estimation):
code = """
a: int128
| ise-uiuc/Magicoder-OSS-Instruct-75K |
});
Route::get('/subkomponen', function(){
return view('komponen.subkomponen');
});
Route::get('komponen','komponenController@data');
Route::get('komponen/add','komponenController@add');
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Hi... how's it going? | ise-uiuc/Magicoder-OSS-Instruct-75K |
self.g0 << storage.load('g_weiss_iw')
except KeyError:
pass
self.se << storage.load('se_imp_iw')
if load_mu:
self.mu = storage.load('mu')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
img = np.random.randn(*img_size)
target = np.random.randint(0, num_classes)
target_ret = np.array([target]).astype(np.float32)
if is_onehot:
target_onehot = np.zeros(shape=(num_classes,))
target_onehot[target] = 1
target_ret = target_onehot.astype(np.f... | ise-uiuc/Magicoder-OSS-Instruct-75K |
`))
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
utils.save_releases(db, releases, repo_full["id"])
time.sleep(1)
utils.ensure_releases_fts(db)
def load_token(auth):
try:
token = json.load(open(auth))["github_personal_token"]
except (KeyError, FileNotFoundError):
token = None
return token
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// swiftlint:disable function_body_length
class MiniAppNSErrorTests: QuickSpec {
override func spec() {
describe("When Mini app") {
context("throws server error") {
it("will return server with NSError type") {
let error = NSError.serverError(code: 0, message: ... | ise-uiuc/Magicoder-OSS-Instruct-75K |
print('R$ {:.2f}'.format(resul)) | ise-uiuc/Magicoder-OSS-Instruct-75K |
def random_stochastic_matrix(n_examples, n_classes):
"""Create a random stochastic matrix of shape (`n_examples`, `n_classes`)"""
X = np.random.rand(n_examples, n_classes)
X /= X.sum(axis=1, keepdims=True)
return X
def random_tensor(shape, standardize=False):
"""
Create a random real-valued t... | ise-uiuc/Magicoder-OSS-Instruct-75K |
from .extractors import AlexNet | ise-uiuc/Magicoder-OSS-Instruct-75K |
'toy_category',
'was_included_in_home')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
continue;
}
list.add(UserView.valueOf(user));
}
return list;
// return new TransList<UserView, User>(group.getUsers()) {
//
// @Override
// public UserView trans(User v) {
// return UserView.valueOf(v);
// }
// };
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/// </summary>
public void Reset()
{
CurrentValue = Initial;
CurrentStep = 0;
}
/// <summary>
/// Go to the next step in the sweep.
/// </summary>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
result.start()
time.sleep(0.1)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
- proba [1-dim numpy array of floats]: the percentage at which the percentile is computed (for ex. 0.95) -> 0<=proba<=1. Several values are allowed (put them in a vector) in order to compute the percentiles at different percentages.
- MaxFunEvals: "max_nfev" option for "least_squares" - see python help of "scipy.op... | ise-uiuc/Magicoder-OSS-Instruct-75K |
./pack.sh
rm -rf ~/.nuget/packages/netmicro*
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Generated by Django 3.1.7 on 2021-03-02 15:10
from django.conf import settings
| ise-uiuc/Magicoder-OSS-Instruct-75K |
name="plagiarism_policy"),
path("privacy_policy/", views.privacy_policy, name="privacy_policy"),
path("post_login/", views.index, name="post_login"),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
legal = ""
for i in cards[0].legalities:
legal = legal + i["format"] + " : "
if i["legality"] == "Legal":
legal = legal + "✅"
else:
legal = legal + "🚫"
legal = legal + "\n"
rules = ""
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
if [ $credit == "lnd" ]; then
suffix="_lndCap"
amt=3200
credit1=6400
| ise-uiuc/Magicoder-OSS-Instruct-75K |
setIfIsFile('afterInstall', os.path.join(dir, 'postinst'))
setIfIsFile('beforeInstall', os.path.join(dir, 'preinst'))
setIfIsFile('afterRemove', os.path.join(dir, 'postrm'))
setIfIsFile('beforeRemove', os.path.join(dir, 'prerm'))
def _handle_package(self, content, line):
sel... | ise-uiuc/Magicoder-OSS-Instruct-75K |
opt_errorThreshold?: number,
opt_renderEdges?: boolean,
opt_contextOptions?: any,
);
/**
* Get the HTML Canvas element for this tile.
*/
getImage(): HTMLCanvasElement;
/**
* Load not yet loaded URI.
*/
load(): void;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
export const OS_PLATFORM: string = os.platform() // linux, mac, win32
export const OS_ARCH: string = os.arch()
export const IS_WINDOWS: boolean = OS_PLATFORM === 'win32'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
//for now just show the first pages movies.
var response = await _service.GetNowPlayingMovies();
_nowPlaying = response?.Movies;
}
finally
| ise-uiuc/Magicoder-OSS-Instruct-75K |
----------
variables : DataFrame
The DataFrame containing schema information
Returns
-------
list
'''
labels = []
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"s" ) echo "Down" ;;
"d" ) echo "Right" ;;
"." ) echo "Confirm" ;;
" " ) echo "Pause" ;;
"\r" ) echo "Enter" ;;
"b" ) echo "Return" ;;
"i" ) echo "Input" ;;
"m" ) echo "Mute" ;;
"h" ) echo "Home" ;;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
connector.commit()
connector.close()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
var name: [Int32] = [CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid()]
var info: kinfo_proc = kinfo_proc()
var info_size = MemoryLayout<kinfo_proc>.size
let isDebuggerAttached = name.withUnsafeMutableBytes {
$0.bindMemory(to: Int32.self).baseAddress
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.activation = activation
self.scope = 'enc_conv_layers' if scope is None else scope
| ise-uiuc/Magicoder-OSS-Instruct-75K |
</thead>
<tbody>
<tr>
<th scope="row">1</th>
<td>654</td>
<td>Otto</td>
<td>@mdo</td>
<td>Glass</td>
<td><a href="#" class="info-data" data-toggle="modal" data-... | ise-uiuc/Magicoder-OSS-Instruct-75K |
if len(new_lst) == len(S_lst):
break
S_lst = new_lst
return ''.join(S_lst)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
POGOProtos.Rpc.SetPokemonTagsForPokemonProto.PokemonTagChangeProtoOrBuilder getTagChangesOrBuilder(
int index);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
namespace Reverberate
{
public static class AppConstants
{
private static SpotifyClient spotifyClient;
public static SpotifyClient SpotifyClient
{
get
{
return spotifyClient;
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<reponame>sandeepchugh/aws-lambda-apigw-python<filename>deploy/scripts/build.sh
#!/bin/bash
current_directory=${pwd}
cd ..
cd ..
pip install -r ./requirements.txt -t ./dist/src
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@pelicula_bp.route('/api/pelicula', methods=['POST'])
def pelicula_create():
if request.data:
json_data = request.get_json()
else:
return {"message": "No data provided"}, 400
# Validate and deserialize input
try:
data = peliculaSchema.load(json_data)
except Exception as e :... | ise-uiuc/Magicoder-OSS-Instruct-75K |
fn main() {
let xlib = x11_dl::xlib::Xlib::open().expect("Unable to load xlib");
let xft = x11_dl::xft::Xft::open().expect("Unable to load xft");
let args: Vec<String> = std::env::args().collect();
if args.len() > 1 {
let desc_cstr =
std::ffi::CString::new(args[1].clone()).expect("U... | ise-uiuc/Magicoder-OSS-Instruct-75K |
{
attributeTypesCombo.setSelectedItemByName(name2);
}
public AttributeType getAttributeType()
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
fprintf(
"WARNING: You do not have an active invoice set. "
"You won't be able to record your hours without one. "
"Create an invoice with the command: `gitime invoice -n "
"<invoice name>` first, or suppress this warning by running "
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
GzDecoder {
inner: bufread::GzDecoder::new(BufReader::new(r)),
}
}
}
impl<R> GzDecoder<R> {
/// Returns the header associated with this stream, if it was valid.
pub fn header(&self) -> Option<&GzHeader> {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class ElectionLog(models.Model):
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
performanceStackView.addArrangedSubview(performanceTableView)
firearmTypeCell.detailTextLabel?.text = firearm.firearmType.local()
caliberCell.detailTextLabel?.text = firearm.caliber
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import re
# from table import (names, aliases, points, awake, SEPARATOR, generate_table)
# cast to list in case of generator
table1 = list(generate_table(names))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<?php
namespace MiladRahimi\Jwt\Tests;
use MiladRahimi\Jwt\Base64\Base64Parser;
use MiladRahimi\Jwt\Base64\Base64ParserInterface;
class Base64ParserTest extends TestCase
{
/**
* @var Base64ParserInterface
*/
private $service;
public function setUp()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
//
// http://www.apache.org/licenses/LICENSE-2.0
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def sendVersionMessage(self):
#stuff version msg into sendbuf
| ise-uiuc/Magicoder-OSS-Instruct-75K |
response = webserver.CGIResponse(200, '/data/file.md', 'python -c "import six; print(six.moves.input().upper())"')
self.assertEqual(response.get_code(), 200)
self.assertEqual(response.get_content(), b'CONTENT' + os.linesep.encode())
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<filename>foxylib/tools/arithmetic/tests/test_arithmetic_tool.py
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<tfoot>
<tr>
<th>Product</th>
<th>Date</th>
<th>Overall Rating</th>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
lenG = len(G)
lenx = len(x)
lenP = len(P)
q = np.zeros((lenG,lenx,lenP))
for i in xrange(lenG):
for j in xrange(lenx):
for k in xrange(lenP):
q[i,j,k] = q_raw[i + k*lenG,j]
# Create the datasets:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#!/usr/bin/env python
import os
import sys
import subprocess
from pandocfilters import toJSONFilter, Para, Image
| ise-uiuc/Magicoder-OSS-Instruct-75K |
namespace Dashboard
{
using System.Net.Mail;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
for dir in ["rotgen/ok", "rotgen/ko"]:
for f in os.listdir(dir):
file = "%s/%s" %(dir,f)
img0 = cv.cvtColor(cv.imread(file), cv.COLOR_BGR2GRAY)
n = np.sum(img0)
if n in m:
m[n].append(file)
print("rm -v %s" % file)
else:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
for path in glob.iglob(pathglob):
with open(path) as f:
kb = rssrx.match(f.readline()).group(1)
size = sizerx.match(path).group(1)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
cv::Mat &imgFrame2Copy) {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return Err(ContractError::VoterNotFound {});
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
for p in pids:
p.kill()
atexit.register(fun)
for i in range(1000):
p = subprocess.Popen(commands)
pids.append(p)
print('stop')
a = input()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if (JSON.stringify(jsonData?.scrobble) != JSON.stringify(domData?.scrobble)) {
console.warn(`TraktRoller: Dom and Json data do not match`, jsonData, domData);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return [
'product' => 'Product',
'products' => 'Products',
'create' => 'Create',
'edit' => 'Edit',
'delete' => 'Delete',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
LOG.error("Unknown Dither type: {}".format(dither))
filters = self.template.find("{}:Filters".format(self.NS), c.ns)
for filter_element in filters:
exposures = int(filter_element.find("{}:Exposures".format(self.NS), c.ns).text)
integrations = int(filter_element.... | ise-uiuc/Magicoder-OSS-Instruct-75K |
from .models import Contact
class ContactAdmin(admin.ModelAdmin):
list_display = ('id', 'email_address', 'subject', 'created_on')
list_display_links = ('id', 'email_address')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public interface TestResultsRepository extends MongoRepository<TestResultBean, String> {
Optional<TestResultBean> findByTestName(String testName);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing
enum A
{
var A {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
pub mod jobs;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade zoom" tabindex="-1" id="user-details">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Update User Details</h5>
<a href="#"... | ise-uiuc/Magicoder-OSS-Instruct-75K |
if not processed_constraints:
ext_jac = int_jac
ext_hess = int_hess
else:
ext_jac = "No external Jacobian defined due to constraints."
ext_hess = "No external Hessian defined due to constraints."
# =============================================================================... | 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.