seed stringlengths 1 14k | source stringclasses 2
values |
|---|---|
#!/usr/bin/env python
#**********************************************************************
# Gnu Cash to CSV (export_csv.py)
#
# Copyright 2012 <NAME> <<EMAIL>>
#
| ise-uiuc/Magicoder-OSS-Instruct-75K |
memset(rows,0,sizeof rows);
memset(cols,0,sizeof cols);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
std::string QEMU_allocate_tun(QemuContext &ctx);
std::string QEMU_allocate_macvtap(QemuContext &ctx, const struct Network &);
std::string generateRandomMACAddress();
std::string QEMU_Generate_Link_Name(std::string prefix, int length);
void QEMU_delete_link(QemuContext &ctx, std::string interface);
int QEMU_OpenQMPSocket(QemuContext &ctx);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
faces = face_cascade.detectMultiScale(gray, 1.3, 5)
while 1:
for (x,y,w,h) in faces:
cv2.rectangle(img,(x,y),(x+w,y+h),(255,0,0),2)
roi_gray = gray[y:y+h, x:x+w]
roi_color = img[y:y+h, x:x+w]
cv2.imshow("Image",img)
k = cv2.waitKey(30) & 0xff
if k == 27:
break
cv2.destroyAllWindows() | ise-uiuc/Magicoder-OSS-Instruct-75K |
let node_path = ctx.mk_node_path_from_tablet(tid).into_ct();
let sid = node_path.sid.clone();
if let Some(lid) = query_leader_map.get(&sid) {
// Recall we already validated that `lid` is no lower than the
// one at this node's LeaderMap.
ctx.send_to_ct_lid(node_path.clone(), common_query, lid.clone());
} else {
ctx.send_to_ct(node_path.clone(), common_query);
}
// Add the TabletGroup into the TMStatus.
tm_status.tm_state.insert(node_path, None);
if let Some(lid) = query_leader_map.get(&sid) {
tm_status.leaderships.insert(sid, lid.clone());
} else {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
lambdex_definition_place[0],
lambdex_definition_place[1],
),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
float side,
int iterations,
int v0, int v1,
int v2, int v3,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return
template = self.options[i][0]
self.window.run_command('dart_stagehand', {'template': template})
def get_templates(self):
sdk = SDK()
out = check_output([sdk.path_to_pub, 'global', 'run',
'stagehand', '--machine'],
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/// Parse a `BitString` from an ASN.1 `Any` value to test decoding behaviors.
fn parse_bitstring_from_any(bytes: &[u8]) -> Result<BitString<'_>> {
Any::new(Tag::BitString, bytes)?.try_into()
}
#[test]
fn decode_empty_bitstring() {
let bs = parse_bitstring_from_any(&[0]).unwrap();
assert_eq!(bs.as_ref(), &[]);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<button type="submit" class="btn btn-outline-primary btn-sm btn-rounded waves-effect"><i class="fas fa-save"></i> Salvar</button>
</div>
</form>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@Contextual("mysql")
public void testFlyway() {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import java.util.Date;
import java.util.Iterator;
public class ReservaBll implements ICRUD_GENERIC {
ReservaDal dal;
public ReservaBll() throws Exception {
dal = new ReservaDal();
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
class BillingNotFoundException extends BadRequestException
{
public $code = 3;
public $msg = "Billing not found";
}
class CustomerNotAuthorizedException extends BadRequestException
{
public $code = 3;
public $msg = "Customer not authorized";
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Create cards
composer card create -p /tmp/composer/mother/efi-network-mother.json -u PeerAdmin -c /tmp/composer/mother/Admin@mother.efi.com-cert.pem -k /tmp/composer/mother/*_sk -r PeerAdmin -r ChannelAdmin -f PeerAdmin@efi-network-mother.card
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from corehq.util.log import with_progress_bar
CHILD_PROPERTIES = ['case_id', 'owner_id', 'opened_on', 'modified_on',
'name', 'aadhar_number', 'dob', 'died']
SOURCE_FIELDS = CHILD_PROPERTIES + ['indices']
CSV_HEADERS = CHILD_PROPERTIES + ['owner_name', 'hh_id', 'hh_name', 'hh_closed_on']
| ise-uiuc/Magicoder-OSS-Instruct-75K |
fn = 'MODELS/'+SH+'/DFM2.pkl'
model = ImportModel(fn)
Models2[SH] = model
AllDates = sorted(set([str(a)[:10] for a in Models2['H&G'].alldates]))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
--chr=${CHR} \
--regionStart=5000000 \
--regionEnd=7000000 \
--buffer=500000 \
--bamlist=${BAM_LIST_FILE} \
--posfile=${SNP_POS_FILE} \
--reference_haplotype_file=${REF_HAP_FILE} \
--reference_legend_file=${REF_LEGEND_FILE} \
--genetic_map_file=${GEN_MAP_FILE} \
--output_gt_phased_genotypes=TRUE \
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# where
# TP = succesfully amplified accessions
# FN = possible accessions that were not amplified
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from .foo import Foo
__all__ = ['Foo'] | ise-uiuc/Magicoder-OSS-Instruct-75K |
return database.sql_exec(database.DATABASE_FILE, query, query_args, False)
def get_data_by_name(username, fields=('*',), case_sensitive=False):
"""Retrieves the data of a user with the given name."""
if not case_sensitive:
query = (f'SELECT {",".join(fields)} FROM users WHERE '
'LOWER(username) = ? LIMIT 1')
query_args = [username.lower()]
else:
query = (f'SELECT {",".join(fields)} FROM users WHERE '
'username = ? LIMIT 1')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#define QEventType_CMScrolled (Qt::QEventType)(1004)
extern PACKAGE TApplication* Application;
extern PACKAGE TScreen* Screen;
extern PACKAGE Qcontrols::TMouse* Mouse;
extern PACKAGE TMetaClass*HintWindowClass;
extern PACKAGE TFormWidgetCreatedHook FormWidgetCreatedHook;
extern PACKAGE TCustomForm* __fastcall GetParentForm(Qcontrols::TControl* Control);
extern PACKAGE TCustomForm* __fastcall ValidParentForm(Qcontrols::TControl* Control);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
describe('DMRs-germ-chr20.csv')
if __name__ == '__main__':
main()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if __name__ == '__main__':
datatype = sys.argv[1]
tree_count = sys.argv[2]
sz = sys.argv[3]
project = sys.argv[4]
prefix = "/home/saikatc/Research/OpenNMT-py/defj_experiment/"
data_path = prefix + "data/raw/" + datatype
model_base = prefix + "models/" + datatype + "."
augmented_token_model = model_base + 'augmented.token.' + project + '-best-acc.pt'
structure_model = model_base + 'rule-best-acc.pt'
src_token = data_path + '/test/' + project + '/prev.augmented.token'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
'email' => 'E-Mail Address',
'password_copy' => 'Create a password that contains at least one character from each of the following categories: lower-case characters (a-z), upper-case characters (A-Z), digits (0-9), and non-alphanumeric symbols (%, $, !, etc.).',
'password' => 'Password',
'confirm_password' => '<PASSWORD>',
'register' => 'Register',
];
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def test_Wavelet3D_PyWt(self):
"""Test the adjoint operator for the 3D Wavelet transform
"""
for i in range(self.max_iter):
print("Process Wavelet3D PyWt test '{0}'...", i)
wavelet_op_adj = WaveletN(wavelet_name="sym8",
nb_scale=4, dim=3,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
it("return the correct rect") {
let expectedRect = CGRect(x: 0, y: 0, width: 3, height: 3)
expect(actualRect).to(equal(expectedRect))
}
}
context("with .topLeft") {
beforeEach {
sut = .topLeft
actualRect = sut.rect(forImage: testImage)
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
plt.colorbar()
plt.title('Vertex-Vertex distances for sphere(9802 vertices)')
plt.xlabel('Vertex i')
plt.ylabel('Vertex j')
plt.show()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# reset indexes
df_test = df_test.reset_index(drop=True)
df_train_val = df_train_val.reset_index(drop=True)
# pickle dataframes
df_test.to_pickle('./df_test.pkl')
df_train_val.to_pickle('./df_train_val.pkl')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
key=Callback(SeasonExtractEmbedded, rating_key=rating_key, language=lang,
base_title=show.section.title, display_items=display_items, item_title=item_title,
title=title,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
exp_work_flows = [
['startexperiment/', 'consent', 'preexperiment/AN/',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
pub use quartiles::Quartiles;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
CHARACTERISTIC_UUID = "f000aa65-0451-4000-b000-000000000000" # <--- Change to the characteristic you want to enable notifications from.
ADDRESS = (
"24:71:89:cc:09:05" # <--- Change to your device's address here if you are using Windows or Linux
if platform.system() != "Darwin"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/// </summary>
public class SqlScaleoutConfiguration : ScaleoutConfiguration
{
private int _tableCount = 1;
public SqlScaleoutConfiguration(string connectionString)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
subsample = data[idxs]
return subsample
## Note: matrices are indexed like mat[rows, cols]. If only one is provided, it is interpreted as mat[rows]. | ise-uiuc/Magicoder-OSS-Instruct-75K |
from .latex_report_builder import LatexReportBuilder
from .markdown_report_builder import MarkdownReportBuilder
from .json_report_builder import JsonReportBuilder
from .html_report_builder import JinjaHtmlReportBuilder
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import torch.nn as nn
from distributions_tor import GaussianDistributionNetwork
from utils_tor import init_param_openaibaselines
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public string Main(string arg0, string arg1)
{
return "Main(string arg0, string arg1)";
}
[Action(IsDefault = false)]
public string Main(int argument)
{
return "Main(int argument)";
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
use CharToImage\Drive\Output\PngOut;
$input = new PngIn;
$output = new PngOut;
$cti = new CharToImage($input, $output, './wzblog.png');
$str = file_get_contents('./text.txt');
| ise-uiuc/Magicoder-OSS-Instruct-75K |
: QWidget(parent, Qt::Tool | //Tool does not force focus changes upon shows
Qt::FramelessWindowHint | //No decorations
| ise-uiuc/Magicoder-OSS-Instruct-75K |
phone_number = models.CharField(max_length=20, unique=True)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
docker build --pull --no-cache --tag docker-registry.intrafind.net/intrafind/sis-sitesearch:latest .
docker push docker-registry.intrafind.net/intrafind/sis-sitesearch:latest
ssh <EMAIL> docker rm -f if-sitesearch
ssh <EMAIL>.sitesearch.cloud docker run -d --name if-sitesearch \
--env SIS_API_SERVICE_URL=$SIS_API_SERVICE_URL \
--env SERVICE_SECRET=$SERVICE_SECRET \
--env SIS_SERVICE_HOST=$SIS_SERVICE_HOST \
--env WOO_COMMERCE_CONSUMER_KEY="$WOO_COMMERCE_CONSUMER_KEY" \
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from jewish.date import InvalidDateError
from jewish.date import JewishDate
from jewish.date import JewishDateError
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def forward(self, x):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// CHECK: define i8 @call_foreign_fn()
#[no_mangle]
pub fn call_foreign_fn() -> u8 {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
valid_image_file_formats = {'png', 'jpg'}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
BrowseTheWeb_Mocked = mock.Mock(spec=BrowseTheWeb)
BrowseTheWeb_Mocked.browser = mock.Mock()
return AnActor.named("Tester").who_can(
AuthenticateWith2FA_Mocked, BrowseTheWeb_Mocked
)
@pytest.fixture(scope="function")
def APITester() -> AnActor:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
params = file_rw.load_object('%s/%s/10wt/forecast_%s_2state_powercut_levy.pl' % (root_dir, res, res))
levy_sigma1 = []
levy_alpha1 = []
levy_sigma2 = []
levy_alpha2 = []
for j in params.hop_parameters[0]:
levy_sigma1.append(j[2])
levy_alpha1.append(j[0])
for j in params.hop_parameters[1]:
levy_sigma2.append(j[2])
levy_alpha2.append(j[0])
| ise-uiuc/Magicoder-OSS-Instruct-75K |
rustup target add $TARGET
fi
sudo pip install --upgrade pip
sudo pip install virtualenv --upgrade
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// ProductCode.swift
// ChallengeCore
//
// Created by Lorenzo Di Vita on 30/9/21.
//
| ise-uiuc/Magicoder-OSS-Instruct-75K |
content = message.content[1:]
if message.author.bot:
return
with open("./configi.json", 'r') as configjsonFile:
config_data = json.load(configjsonFile)
if message.channel.id == int(config_data[str(message.guild.id)]["kanalpropozycje"]):
if message.content.startswith("%"):
await message.delete()
await channel.send(f"**Komentarz {message.author}:** {content}")
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.filteredPosts = self.postsArray.filter { user in
let tag = user!["caption"] as? String
return(tag?.lowercased().contains(searchText.lowercased()))!
}
tableview.reloadData()
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
inicio = time()
result = busca_binaria_it(lista, num)
fim = time()
tempo_gasto = fim-inicio
print('resultado', result)
return tempo_gasto
if __name__ == '__main__':
l = criaLista()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
useLocation,
} from 'react-router-dom';
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if __name__ == '__main__':
MDPairWCA.main()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from astropy.coordinates.matrix_utilities import matrix_transpose
from astropy.coordinates.builtin_frames.icrs import ICRS
import spiceypy as spice
__all__ = ['MCMF']
DEFAULT_OBSTIME = Time('J2000', scale='tt')
@format_doc(base_doc, components="", footer="")
class MCMF(BaseCoordinateFrame):
"""
A coordinate or frame in the lunar "Mean Earth/ Mean Rotation frame". This is a
"Moon-Centered/Moon-Fixed" frame, defined by an X axis through the mean position
| ise-uiuc/Magicoder-OSS-Instruct-75K |
static void Main(string[] args)
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
STANDARD_STORAGE_CLASS = "STANDARD"
"""Storage class for objects accessed more than once per month.
See: https://cloud.google.com/storage/docs/storage-classes
"""
NEARLINE_STORAGE_CLASS = "NEARLINE"
"""Storage class for objects accessed at most once per month.
See: https://cloud.google.com/storage/docs/storage-classes
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Plot first decoded track
print("Example Model Generated Track")
plot_track(decoded_tracks[0])
# Filter Track
decoded_tracks = filter_tracks(decoded_tracks, p_min)
# Plot first filtered track
| 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.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Note: m and n will be at most 100.
"""
class Solution(object):
def uniquePaths(self, m, n):
"""
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import os.path
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#endif
#include <boost/asio.hpp>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
PointToPointHelper p2p;
p2p.SetDeviceAttribute ("DataRate", StringValue ("5Mbps"));
p2p.SetChannelAttribute ("Delay", StringValue ("2ms"));
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"""Convert a PostgreSQL query result to a dict"""
resp = []
for row in result:
resp.append(dict(zip(columns, row)))
if single_object:
return resp[0]
return resp
| ise-uiuc/Magicoder-OSS-Instruct-75K |
var deltaX = _lastMousePoint.X - e.X;
var deltaY = _lastMousePoint.Y - e.Y;
_lastMousePoint = e.Location;
var inflate = 5F;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
}
mutating func notUsername() {
isNotUsernameEnabled = true
delegate?.reload()
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
pub mod velocity;
pub mod movement;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
inputs = tf.keras.Input(input_shape)
x = feat_ex(inputs)
x = layers.GlobalAveragePooling2D()(x)
x = layers.Dropout(0.5)(x)
yh = layers.Dense(
10, kernel_regularizer=regularizers.l2(0.0001), activation="softmax"
)(x)
model = tf.keras.Model(inputs, yh)
print(model.summary())
return model
#######################################
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public static final String FILE_NAME = "build.gradle";
private String applicationId;
private String supportLibraryVersion;
public BuildGradle(String modulePath) {
super(modulePath + "/" + FILE_NAME);
for (String line : codelines) {
if (line.contains("applicationId")) {
applicationId = FileUtils.getStringBetweenQuotes(line);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
inner,
event,
}
}
fn to_wstr(s: &str) -> Vec<u16> {
OsStr::new(s).encode_wide().chain(iter::once(0)).collect()
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
use App\Http\Requests\ProductDetailFeed\CreateRequest;
use App\Http\Requests\ProductDetailFeed\UpdateRequest;
use App\Http\Resources\ProductDetailFeed\ListCollection;
use App\Models\ProductDetailFeed;
use App\Shared\APIResponse;
use Illuminate\Support\Facades\Gate;
use Symfony\Component\HttpFoundation\Response;
use Illuminate\Http\Request;
class ProductFeedController extends Controller
{
/**
* Display a listing of the resource.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
namespace tensorflow {
namespace {
constexpr char kBaseApiDef[] =
"tensorflow/core/api_def/base_api/*.pbtxt";
constexpr char kPythonApiDef[] =
"tensorflow/core/api_def/python_api/*.pbtxt";
constexpr bool kUseApiDef = false;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<reponame>csal90/LeetHub<filename>maximum-subarray/maximum-subarray.py
class Solution:
def maxSubArray(self, nums: List[int]) -> int:
maxsofar = nums[0]
maxendinghere = nums[0]
for i in range(1, len(nums)):
maxendinghere = max(nums[i], nums[i] + maxendinghere)
maxsofar = max(maxsofar, maxendinghere)
return maxsofar
| ise-uiuc/Magicoder-OSS-Instruct-75K |
let rule = ruleset.get(&id).unwrap();
let next_next = next
.iter()
.map(|remain| rule.matches(ruleset, remain))
.filter(|v| !v.is_empty())
.flatten()
.collect();
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class NetworkNotificationReceiver : public pqxx::notification_receiver {
public:
NetworkNotificationReceiver(PostgreSQL *p, pqxx::connection &c, const std::string &channel);
virtual ~NetworkNotificationReceiver() {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public class AuthenticateCommand : IRequest<string>
{
public string UserName { get; set; }
public string Password { get; set; }
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
date
| ise-uiuc/Magicoder-OSS-Instruct-75K |
screen.controller.amountEdit.setText(amountStr);
screen.controller.send(null);
});
}
private void updateTitleForBroadcast() {
final int peers = sendResult.tx.getConfidence().numBroadcastPeers();
titleLabel.setText(String.format("Broadcasting ... seen by %d peers", peers));
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
print ""
| ise-uiuc/Magicoder-OSS-Instruct-75K |
qsort(_ignores.data(), _ignores.size(),
sizeof(_ignores.front()), compareMyType);
}
void KMeansClustering::RemoveIgnore(std::string & ignores)
{
int att = _dataframe.GetAttributeIndex(ignores);
auto result = std::find(_ignores.begin(), _ignores.end(), att);
if (result != _ignores.end())
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def __init__(self, opts):
# TODO: Add things like no. of hidden layers to opts
pass
class LSTM(nn.Module):
# This class is largely derived from
# https://stackabuse.com/time-series-prediction-using-lstm-with-pytorch-in-python on 20210701.
def __init__(self, input_size=2, hidden_layer_size=100, output_size=2):
# param input_size: number of components in input vector
# param output_size: number of components in output vector
# param hidden_layer_size: number of components in hidden layer
super().__init__()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
new = text[int(i):int(i+len(word))]
if new == word:
res.append([i,i+len(word)-1])
return sorted(res)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def test_terminalwriter_computes_width():
| ise-uiuc/Magicoder-OSS-Instruct-75K |
base_url += ':%d' % server.port
return urlparse.urljoin(base_url, url)
@step(r'I visit site page "([^"]*)"')
def visit_page(self, page):
"""
Visit the specific page of the site.
"""
self.given('I visit "%s"' % site_url(page))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# # model.compile(loss={'output':'binary_crossentropy'}, optimizer=Adam())
# model.compile(loss={'output':'categorical_crossentropy'}, optimizer=Adam(options.lr))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
.match(MessageType.Location.class, request ->
| ise-uiuc/Magicoder-OSS-Instruct-75K |
image_np = cv2.cvtColor(image_np, cv2.COLOR_BGR2GRAY)
#(T, thresh) = cv2.threshold(image_np, 0, 255, cv2.THRESH_BINARY)
cv2.imwrite("imgs/{}.jpg".format(count),image_np)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
),
migrations.AlterField(
model_name='sitesettings',
name='TELEGRAM_TOKEN',
field=models.CharField(blank=True, default='', help_text='The token assigned by the BothFather', max_length=50, verbose_name='Token for the telegram bot'),
),
]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
'customer_identity_type' => 'NIF',
'serial' => '43962',
'number' => '3213124',
'date' => '18/05/2018',
'total_net_amount' => '8000',
'total_amount' => '10000',
'included_vat' => '21',
'observations' => 'La Factura ha sigut realitzada correctament',
'lines' => '4',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
}
/// An error with an associated span.
#[derive(Debug)]
pub struct SpannedError {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
ReturnStruct ConstructReturnStruct(unsigned char a, Embedded b,
unsigned char c) {
ReturnStruct ret;
ret.a = a;
ret.b = b;
ret.c = c;
return ret;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def check_edge_condition(px, py, pyaw, start_x, start_y, start_yaw,
end_x, end_y, end_yaw):
assert (abs(px[0] - start_x) <= 0.01)
assert (abs(py[0] - start_y) <= 0.01)
assert (abs(pyaw[0] - start_yaw) <= 0.01)
assert (abs(px[-1] - end_x) <= 0.01)
assert (abs(py[-1] - end_y) <= 0.01)
assert (abs(pyaw[-1] - end_yaw) <= 0.01)
def test_1():
start_x = 1.0 # [m]
start_y = 1.0 # [m]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def predict(self, row):
pred = self.model.predict(row)
return pred
def save(self):
if self.model is not None:
joblib.dump(self.model, Path(__file__).parent / "model_objects" /"ml_model.joblib")
else:
raise TypeError("There is no model object. Train the model with model.train() first or ensure artifact is the correct uri.")
def load(self, artifact_uri):
# will try and load an existing trained model artifact if it exists.
try:
self.model = joblib.load(self.root_path / "mlruns" / "0" / artifact_uri / "artifacts" / "ml_model.joblib")
except:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return data[newFeat],data[['mpg']]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# (http://stackoverflow.com/a/8720632 and http://stackoverflow.com/a/9459208)
bg = Image.new("RGBA", im.size, bg_colour + (255,))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return all_kmers
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class Command(BaseCommand):
help = "Exports a user information as a set of environment variables"
def add_arguments(self, parser):
parser.add_argument("user_id", type=int)
def handle(self, *args, **options):
user_id = options["user_id"]
user = User.objects.get(id=user_id).bot_user()
if not user:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
boo = self._makeOne(__name__='boo')
inst = DummyInst()
boo.set(inst, 0)
self.assertEqual(inst.boo, False)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
'start_date' => Carbon::now(),
'end_date' => Carbon::now()->addYear(1),
'position' => $faker->randomElement(['pa', 'kpa', 'ppk', 'pptk', 'bendahara']),
'status' => 'active'
];
});
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@hello_blueprint.route('/')
@hello_blueprint.route('/hello')
def index():
| 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.