seed stringlengths 1 14k | source stringclasses 2
values |
|---|---|
from keras.preprocessing.text import Tokenizer
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Binary(&'a [u8]),
}
/// Feature property processing trait
#[allow(unused_variables)]
pub trait PropertyProcessor {
/// Process property value. Abort processing, if return value is true.
fn property(&mut self, idx: usize, name: &str, value: &ColumnValue) -> Result<bool> {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
// Email is pre-verified for the test user
$response = $this->get(route('verification.notice'));
$response->assertRedirect(route('dashboard'));
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
If enabled the default .db file is \"pykms_database.db\". You can also provide a specific location.', 'def' : False,
'file': os.path.join('.', 'pykms_database.db'), 'des' : "sqlite"},
'hwid' : {'help' : 'Use this option to specify a HWID. The HWID must be an 16-character string of ... | ise-uiuc/Magicoder-OSS-Instruct-75K |
self.m_X = xform(reader)
self.m_Type = reader.read_u_int()
self.m_XMotionType = reader.read_u_int()
self.m_YMotionType = reader.read_u_int()
self.m_ZMotionType = reader.read_u_int()
self.m_MinLimitX = reader.read_float()
self.m_MaxLimitX = reader.read_float()
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
tag::x
, required<deduced<tag::y>, boost::is_convertible<mpl::_, int> >
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def pre_process():
print("analyze images")
for Files in tqdm(os.listdir(path)):
if "jpg" in Files:
#print(Files)
img = cv2.imread(path + Files, 1)
height, width, chan = img.shape
#print(width)
#print(height)
list_width.append(width)... | ise-uiuc/Magicoder-OSS-Instruct-75K |
"codigo"=>$value[0],
"nombre"=>$value[1],
"ubicacion"=>"Consignación",
"cliente"=>$value[2],
"FV"=>$value[3],
);
array_push($matAlertas,$alerta);
}
$myJSON = json_encode($matAlertas);
echo $myJSON;
?>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
DEFAULT_MONGODB_HOST = "mongodb://mongo:password@127.0.0.1:27017"
def create_client() -> MongoClient:
host = os.getenv("MONGODB_HOST", DEFAULT_MONGODB_HOST)
return MongoClient(host)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from mmdet.datasets.pipelines.transforms import Pad
from mmdet.datasets.pipelines.transforms import FilterBox
import numpy as np
import cv2
def test_pad():
raw = dict(
img=np.zeros((200, 401, 3), dtype=np.uint8)
)
cv2.imshow('raw', raw['img'])
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
});
</script>
</body>
</html> | ise-uiuc/Magicoder-OSS-Instruct-75K |
return []
def write_json(filename, contents):
with open(filename, "w") as outfile:
outfile.write(json.dumps(contents, indent=2))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public string GroupName { get; set; }
public string SubjectId { get; set; }
public string IdentityProvider { get; set; }
}
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
$config['height'] = $h;
$config['x_axis'] = round(($w - $config['width'])/2);
}
$ci->image_lib->initialize($config);
$cropstatus=$ci->image_lib->crop();
if(!$cropstatus){
$message .= $ci->image_lib->display_errors();
}
$ci->image_lib->clear();
$config['source_image'] = $new_path;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
* Unless required by applicable law or agreed to in writing, software
* 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 |
impl Getter for PeerAddress {
// GetFrom decodes XOR-PEER-ADDRESS from message.
fn get_from(&mut self, m: &Message) -> Result<(), Error> {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<gh_stars>1-10
import type { DiscordGuard } from '@discord-nestjs/core';
import { Injectable } from '@nestjs/common';
import { ClientEvents, TextChannel } from 'discord.js';
@Injectable()
export class IsChannelButtonInteractionGuard implements DiscordGuard {
async canActive(event: keyof ClientEvents, [interaction]: C... | ise-uiuc/Magicoder-OSS-Instruct-75K |
#include <time.h>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/**
* ANSI X9.24 version 2009 DUKPT key derivation.
*
* All core key derivation functions from:
* - Java Triple DES DUKPT Library by Software Verde (authors: <NAME> and <NAME>).
| ise-uiuc/Magicoder-OSS-Instruct-75K |
###########################################################
# IMAGE MANIPULATION
###########################################################
def adjust_contrast(image, contrast_level):
"""Return the image scaled to a certain contrast level in [0, 1].
parameters:
- image: a numpy.ndarray
- contrast... | ise-uiuc/Magicoder-OSS-Instruct-75K |
* @return String
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#!/bin/bash
/usr/bin/kafka-console-consumer --bootstrap-server localhost:9092 --timeout-ms 200000 --topic testtopic | ise-uiuc/Magicoder-OSS-Instruct-75K |
user = SlackAlertUserData.objects.get(slack_alias=slack_alias).user.user
service = Service.objects.get(pk=service_id)
service.acknowledge_alert(user)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
fn empty_query_gives_proper_error_instead_of_panicking() {
use diesel::dsl::sql;
use diesel::result::DatabaseErrorKind::Unknown;
use diesel::result::Error::DatabaseError;
let connection = &mut connection();
let query = sql::<Integer>("");
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class Critic(tf.keras.Model):
def __init__(self, state_dim, action_dim, wd=1e-2, name="Critic"):
super().__init__(name=name)
self.l1 = layers.Dense(400, kernel_initializer=PytorchInitializer(),
kernel_regularizer=regularizers.l2(wd), bias_regularizer=regularizers.l2(... | ise-uiuc/Magicoder-OSS-Instruct-75K |
entry_points={
'console_scripts': [
| ise-uiuc/Magicoder-OSS-Instruct-75K |
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class PhotoshootAsset extends Model
{
use HasFactory;
public function photoshoot()
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/**
* Default checker which validates if a next task should begin.
* This can be overwritten to write own checks for example checking the amount
* of used ram and waiting till the ram is low enough for a next task.
*
* It should always resolve with a boolean, either `true` to start a next task
* or `false... | ise-uiuc/Magicoder-OSS-Instruct-75K |
def lead(self):
text = html_to_text(self.description)
if len(text) > 160:
return text[:160] + '…'
else:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
for folder in root_content:
no_sub_folders = folders_service.is_folder_empty(folder)
sub_projects = projects_service.get_projectIds_under_folder(folder)
if no_sub_folders and not sub_projects:
folder_name = folders_service.get_folder_name(root_folder, folder)
if folde... | ise-uiuc/Magicoder-OSS-Instruct-75K |
xi = np.zeros_like(r)
cluster_toolkit._lib.calc_xi_DK_app1(r.cast(), len(r), M, rhos, conc, be, se, alpha, beta, gamma, delta, k.cast(), P.cast(), len(k), om, bias, xi_mm.cast(), xi.cast())
| ise-uiuc/Magicoder-OSS-Instruct-75K |
elif n == 11:
return 'eleven'
elif n == 12:
return 'twelve'
elif n == 13:
return 'thirteen'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
pub fn attach(builder: &mut Builder, cx: &mut ExtCtxt, node: Rc<node::Node>) {
match node.name {
Some(ref name) => {
match name.as_slice() {
"lpc17xx" => lpc17xx_pt::attach(builder, cx, node.clone()),
// "tiva_c" => tiva_c_pt::attach(builder, cx, node.clone()),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@Binding var isSquare: Bool
var body: some View {
if isSquare {
RoundedRectangle(cornerRadius: 10).fill(Color.green)
.frame(width: 100, height: 100)
} else {
Circle()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
use rand::{thread_rng, Rng};
use std::{thread, time};
use term_size;
fn main() {
let mut width = 0;
if let Some((w, h)) = term_size::dimensions() {
println!("Width: {}\nHeight: {}", w, h);
width = w;
} else {
println!("Unable to get term size :(")
}
let consonants = "bcdfghj... | ise-uiuc/Magicoder-OSS-Instruct-75K |
#moving avg
#Parameters
| ise-uiuc/Magicoder-OSS-Instruct-75K |
risk_score = IntegerField('Filter by Risk Score', validators=[DataRequired('Input must be a positive integer.'), NumberRange(0, 100, 'Risk score must be between 0 and 100.')])
# Represents <input type="text">, except all input is coerced to an integer. Erroneous input is ignored and rejected.
# NumberRange ... | ise-uiuc/Magicoder-OSS-Instruct-75K |
def get(self, uid):
policy_model = self.session.query(PolicyModel).get(uid)
if not policy_model:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
value = current_value + " " + value;
}
if (!value.equals("") && !value.equals(".")) {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def add(self, word):
node = self.root
for c in word:
node = node.setdefault(c, {})
node[self.END] = None
def find(self, word):
node = self.root
for c in word:
if c not in node:
return False
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if subreddit[:2] == 'r/':
subreddit = subreddit[2:]
if CONFIG.botconfig.subreddit_length.MIN > len(
subreddit) > CONFIG.botconfig.subreddit_length.MAX\
and reddit.sub_exists(subreddit):
return None
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#[cfg_attr(doc_cfg, doc(cfg(feature = "nstd_os_alloc")))]
pub mod alloc;
#[cfg(feature = "nstd_os_def")]
#[cfg_attr(doc_cfg, doc(cfg(feature = "nstd_os_def")))]
pub mod def;
#[cfg(feature = "nstd_os_io")]
#[cfg_attr(doc_cfg, doc(cfg(feature = "nstd_os_io")))]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class FileMover():
SETTINGS = {}
LOOKUP_TABLE = {}
def __init__(self, csv_file, src, dst_folder, classes, opr, ext):
self.SETTINGS = {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
data["before_end"] = True
if now >= term.registration_period1_start:
data["period1_started"] = True
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return ERROR;
}
catch ( UserNotFoundException ue )
{
addActionError(
getText( "user.not.found.exception", Arrays.asList( (Object) username, ue.getMessage() ) ) );
AuditEvent event = new AuditEvent( getText( "log.login.fail" ) );
ev... | ise-uiuc/Magicoder-OSS-Instruct-75K |
* User: User
* Date: 15.12.2015
* Time: 14:12
*/
use common\widgets\GoogleMapsMarkers\GoogleMaps;
//$object = \Yii::$app->googleApi->getGeoCodeObject(\Yii::$app->getRequest()->getCookies()->getValue('_city'), null);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Check URL parameters
http_params = self.get_url_params()
right_params = self.check_url_params(http_params)
if not right_params:
print('Error : URL has invalid parameters.')
self.set_status_and_headers(400)
return
self.set_status_and_headers(2... | ise-uiuc/Magicoder-OSS-Instruct-75K |
self.generate_weapp_webview = None # 是否生成唤起微信客户端链接,true-是,false-否,默认false
self.generate_we_app = None # 是否生成小程序推广
self.pid = None # 推广位
self.theme_id_list = None # 主题ID列表,例如[1,235]
def getapiname(self):
return 'pdd.ddk.theme.prom.url.generate'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
impl<'de> Deserialize<'de> for DcName {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de> {
struct DcNameVisitor;
impl<'de> Visitor<'de> for DcNameVisitor {
type Value = DcName;
fn expecting(&self, formatter: &mut fmt::Format... | ise-uiuc/Magicoder-OSS-Instruct-75K |
get_R_Q_D_ns([l_Qs[0]] + neg_l_Ds[0])
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def iev_prob(offsprings, AA_AA, AA_Aa, AA_aa, Aa_Aa, Aa_aa, aa_aa):
allel_prob = [1, 1, 1, 0.75, 0.5, 0]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from .components import Host, Network
from .objects import *
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# TODO: Implement this at some point
| ise-uiuc/Magicoder-OSS-Instruct-75K |
sgFile.txt[int(start_temp_old):int(end_temp_old)],
newText[new_start:new_end])
s, e = self.find_match(text_ann_new, newText)
ent.start = str(s)
ent.end = str(e)
ent.text = text_ann_new
i... | ise-uiuc/Magicoder-OSS-Instruct-75K |
// corresponding to the sequence of queued commands.
// Each response follows the format `[err, result]`.
return results[1][1] // return result of get
});
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def get_tests_results(question):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
print("\n--------------- Cross-validated Evaluation Metrics ---------------\n")
print("Accuracy \t= \t", metrics_list[0])
print("Precision \t= \t", metrics_list[1])
print("Recall \t\t= \t", metrics_list[2])
print("F1 score \t= \t", 2 * metrics_list[1] * metrics_list[2] / (metrics_list[1] + metrics_list[2])... | ise-uiuc/Magicoder-OSS-Instruct-75K |
cd ~/electionbuster
d=`date +%Y%m%d`
mkdir -p $d
| ise-uiuc/Magicoder-OSS-Instruct-75K |
bool added = false;
if(index >= 0 && index < scene->mNumMaterials)
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
};
next_1_hours: {
summary: {
symbol_code: string;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import br.com.crescer.social.entity.entities.Perfil;
import org.springframework.data.repository.PagingAndSortingRepository;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
ptr = __realloc(ptr, 12); // just resizes (<= 16)
assert(ptr == originalPtr);
ptr = __realloc(ptr, 16); // just resizes (<= 16)
assert(ptr == originalPtr);
ptr = __realloc(ptr, 33); // last: resizes checking for grow (<= 48)
assert(ptr == originalPtr);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
});
/**
* Overload with type of integration
*/
export type LocationSubCategory =
typeof LocationSubCategory[keyof typeof LocationSubCategory];
| ise-uiuc/Magicoder-OSS-Instruct-75K |
std::cout << "Variance: " << statistics::variance(num_friends) << "\n";
| ise-uiuc/Magicoder-OSS-Instruct-75K |
else:
sess.run(train_step, feed_dict={
input_image: batch[0], output_valid: batch[1], keep_prob: 0.5})
if (step + 1) % savePeriod == 0 or step == trainSteps - 1:
savepath = saver.save(sess, modelCkpPath, global_step=step)
print("save check point in %s" % (savepath))
print("te... | ise-uiuc/Magicoder-OSS-Instruct-75K |
key: Binary::from(concat(
&to_length_prefixed(b"balance").to_vec(),
account_addr.as_slice(),
)),
}))
.unwrap_or_else(|_| to_binary(&Uint128::zero()).unwrap());
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
}
}
public EquipmentClassEnum EquipmentClassEnum
{
get
{
return EquipmentClass.EquipmentClassEnum;
}
}
public EquipmentGroupEnum EquipmentGroupEnum
| ise-uiuc/Magicoder-OSS-Instruct-75K |
docker stop $(docker ps -a --format '{{.ID}}')
}
ct_docker_rm_all(){
docker rm $(docker ps -a --format '{{.ID}}')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
'''
Created on Aug 1, 2015
@author: Itai
'''
import pytest
| ise-uiuc/Magicoder-OSS-Instruct-75K |
$this->load->helper('url');
redirect(base_url());
}
}
$this->load->helper('form');
$this->load->view('header');
$this->load->view('navBar');
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/**
* AuthService
*
* @author Sunnly
* @since 2020/12/11
*/
public interface AuthService {
/**
| ise-uiuc/Magicoder-OSS-Instruct-75K |
__license__,
__copyright__
)
__all__ = [
__packagename__,
__description__,
__url__,
__version__,
__author__,
__email__,
__license__,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
exc(e1)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
updateItem,
]);
return (
<div className={css['parent-demo']}>
<ul>{items.map(ItemCreator)}</ul>
</div>
);
};
const App = connect(
mapAllItemsToProps,
mapDispatchToProps
)(InternalApp);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
path('helloworld/',helloworldview)
]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
var identifier4 = new MathMLIdentifier();
var textNode6 = new MathMLTextNode("c");
identifier4.Children.Add(textNode6);
row.Children.Add(identifier1);
row.Children.Add(operator1);
row.Children.Add(identifier2);
row.Children.Add(identif... | ise-uiuc/Magicoder-OSS-Instruct-75K |
return x + y
def circle_area (r):
return math.pi * (r ** 2)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
void onLoaded(int adType);
void onAdClicked(int adType);
void onFacebookAdCreated(com.facebook.ads.AdView facebookBanner);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
ICommand LoadConditionAssessmentForm { get; }
bool IsHistoricCondition { get; set; }
bool IsCondition { get; set; }
}
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
if __name__ == '__main__':
energy.main()
optical.main()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
display = USER_FORMATTER.format(login=user.login, name=user.name or 'unnamed')
yield prompt_toolkit.completion.Completion(
text=display,
start_position=-len(word),
)
def prompt_for_users(users: List[models.User]):
while True:
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
file.write("Primera línea" + os.linesep)
file.write("Segunda línea")
file.close() | ise-uiuc/Magicoder-OSS-Instruct-75K |
# as the first date of the year
df['datetime'] = datetime.datetime(2018, 1, 1)
# save processed dataset to csv
processed_data_file = os.path.join(data_dir, dataset_name+'_edit.csv')
df.to_csv(processed_data_file, index=False)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
$curr = Currency::where('name','=',$order->currency_code)->first();
if($curr->name != "BDT"){
return redirect()->back()->with('unsuccess','Please Select BDT Currency For Sslcommerz .');
}
$settings = Generalsetting::findOrFail(1);
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
icon={HiOutlineLink}
href={urlify(socialHandles.blog)}
/>
)}
{twitterHandle && (
| ise-uiuc/Magicoder-OSS-Instruct-75K |
super(ContextualEmbedV2, self).__init__()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
n = n + 1
return tuple(blade)
# todo: work out how to let numba use the COO objects directly
@numba.njit
def _numba_val_get_left_gmt_matrix(x, k_list, l_list, m_list, mult_table_vals, ndims):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
}
@SuppressWarnings("unchecked")
@Override
protected <T> Iterable<T> findCandidatesByType(Class<T> beanClass) {
return this.candidatesByType.get(beanClass);
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
min_value: f32,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
description: "The user to unban",
required: true,
},
],
userPermissions: ["MANAGE_GUILD"],
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public double EstimateResidualNormRatio(PcgAlgorithmBase pcg) => Math.Sqrt(pcg.ResDotPrecondRes) / denominator;
public void Initialize(PcgAlgorithmBase pcg) => denominator = Math.Sqrt(pcg.Rhs.Norm2());
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def __repr__(self):
__mode = self._Mode
if self._Mode is _FeatureMode.Asynchronous:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<reponame>joamatab/install_new_computer
#!/bin/sh
# presentation from the command line
git clone https://github.com/visit1985/mdp.git
cd mdp
| ise-uiuc/Magicoder-OSS-Instruct-75K |
get
{
if (_instance == null)
_instance = new Container();
return _instance;
}
}
private Dictionary<string, object> _registry;
private Container()
{
_registry = new Dictionary<string, object>();
| ise-uiuc/Magicoder-OSS-Instruct-75K |
df.to_csv('results_timeseries.csv')
s.to_csv('results_values.csv')
print(model.calculate_LCOE(s))
# ----------------------
| ise-uiuc/Magicoder-OSS-Instruct-75K |
using System.Threading.Tasks;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
ReplyToAddresses=[sender_email],
)
return response | ise-uiuc/Magicoder-OSS-Instruct-75K |
}
});
// bump the schemaVersion
clone.item.properties.schemaVersion = 1.1;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
CONTAINER=$(docker run -d ${TAG} false)
| 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.