seed stringlengths 1 14k | source stringclasses 2
values |
|---|---|
private unowned let transitionHandler: TransitionHandler
init(transitionHandler: TransitionHandler) {
self.transitionHandler = transitionHandler
| ise-uiuc/Magicoder-OSS-Instruct-75K |
enum b {
protocol A {
let f =
{
func compose( ) {
class
case ,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def game_link(self, obj):
url = '../../../game/%d/change' % obj.game.id
return mark_safe('<a href="%s">%s</a>' % (url, obj.game))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#Ada kata kunci kemudian ada nilaninya. Kata kunci harus unik,
#sedangkan nilai boleh diisi denga apa saja.
# Membuat Dictionary
ira_abri = {
"nama": "<NAME>",
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class RecursiveTestModel(Model):
recursive_model = ModelType('RecursiveTestModel')
test = StringType()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
return moduleConnString;
}
}
//Get default value
return Options.ConnectionStrings.Default;
}
}
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
f.write(data)
print("")
questionary.print("We created your configuration file based on your entries, please update the file if needed. We will use this file if you execute this script again!")
def config():
configFileName = constants.CONFIG_FILE_NAME
configFile = Path(configFileName)
if configFile.is_file():
# file exists
print("We found a configuration file! We will use that file!")
print('\n')
else:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class motor_api(3D) UInt2 : public Output
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<gh_stars>1-10
/*
* Copyright 2002-2022 the original author or authors.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class Migration(migrations.Migration):
dependencies = [
('axfday', '0002_auto_20190107_1507'),
]
operations = [
migrations.AlterField(
model_name='goods',
name='price',
field=models.DecimalField(decimal_places=2, max_digits=10),
),
]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#include <sys/random.h>
#include <zircon/syscalls.h>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return "No"
if __name__ == "__main__":
T = int(input())
for t in range(0,T):
D = input()
print(solve(D))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def _load_img(self, idx):
"""
args: image path
return: pillow image
"""
image = Image.open(self.paths[idx]).convert('RGB')
return image
| ise-uiuc/Magicoder-OSS-Instruct-75K |
init(rowCount: Int, columnCount: Int, makeElement: (Int, Int) -> Element) {
self.storage = Array<Element>()
self.rowCount = rowCount
self.columnCount = columnCount
self.storage.reserveCapacity(columnCount * rowCount)
for row in 0..<rowCount {
for column in 0..<columnCount {
storage.append(makeElement(row, column))
}
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
result = 1
temp_result = 1
curr = s[0]
for c in s[1:]:
if c == curr:
temp_result += 1
else:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from player_commands.set_prefix import set_prefix_cog
from player_commands.link_account import link_account_cog
from player_commands.help_command import help_cog
from player_commands.regenerate_leaderboard import regenerate_leaderboard_cog
#from player_commands._dev import _dev_cog
assistant_commands = [set_prefix_cog, link_account_cog, help_cog, regenerate_leaderboard_cog]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
__all__ = [
'CascadeFCBBoxHead',
'SharedFCBBoxHead']
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<div class="py-3">
{!!Form::submit('Delete',['class'=>'btn btn-danger'])!!}
{!!Form::close()!!}
</div>
</div>
</div>
</div>
</div>
@endsection
@section('scripts')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
return 1;
}
@observer
export class SvgViewer extends React.Component<{
svgContent: string;
svgRef?: (element: SVGSVGElement | null) => void;
}> {
@observable tool: Tool = "pan";
@action.bound
private setTool(tool: Tool): void {
this.tool = tool;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return callObjectMethod(
"addMigratedTypes",
"(Ljava/util/Collection;)Landroid/app/appsearch/SetSchemaResponse$Builder;",
arg0.object()
);
}
android::app::appsearch::SetSchemaResponse_Builder SetSchemaResponse_Builder::addMigrationFailure(android::app::appsearch::SetSchemaResponse_MigrationFailure arg0) const
{
return callObjectMethod(
"addMigrationFailure",
"(Landroid/app/appsearch/SetSchemaResponse$MigrationFailure;)Landroid/app/appsearch/SetSchemaResponse$Builder;",
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def post(self):
decoded = base64.decodebytes(request.data)
return common.data_to_text(decoded, request.args)
class PyOpenOcrURL(Resource):
def post(self):
url = request.data.decode("utf-8")
data = requests.get(url, allow_redirects=True, verify=False)
return common.data_to_text(data.content, request.args)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// Either input our output are depleted even though the stream is not depleted yet.
Ok(Status::Ok) | Ok(Status::BufError) if eof || dst.is_empty() => return Ok(total_written),
// Some progress was made in both the input and the output, it must continue to reach the end.
Ok(Status::Ok) | Ok(Status::BufError) if consumed != 0 || written != 0 => continue,
// A strange state, where zlib makes no progress but isn't done either. Call it out.
Ok(Status::Ok) | Ok(Status::BufError) => unreachable!("Definitely a bug somewhere"),
Err(..) => return Err(io::Error::new(io::ErrorKind::InvalidInput, "corrupt deflate stream")),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
using System.Text;
namespace AllPaySDK.Flutterwave.Settlements
{
public interface ISettlementsApi
{
GetAllSettlementsResponse GetAllSettlements(DateTime from, int page = 1, string to = null, string subaccount_id = null);
GetSingleSettlementResponse GetSingleSettlement(int id, string from = null, string to = null);
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
h = hIn; \
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import io.hops.hopsworks.common.project.ProjectController;
import io.hops.metadata.yarn.entity.quota.PriceMultiplicator;
/**
| ise-uiuc/Magicoder-OSS-Instruct-75K |
n = str(input('Digite seu nome completo: '))
nome = n.split()
print('Muito prazer em te conhecer!')
print('Seu primeiro nome é {}'.format(nome[0]))
print('Seu último nome é {}'.format(nome[len(nome)-1])) | ise-uiuc/Magicoder-OSS-Instruct-75K |
export default SearchConnections;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
export default App;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if len(rects) == 0:
return []
return rects
#haarcascade_frontalface_alt.xml
#haarcascade_fullbody.xml
def detect_faces(img):
cascade = cv2.CascadeClassifier("haarcascade_frontalface_alt.xml")
return detect(img, cascade)
def to_grayscale(img):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"size": size,
"css_classes": css_classes,
"show_label": show_label,
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
name = "location"
verbose_name = "Location Management %s" % VERSION
| ise-uiuc/Magicoder-OSS-Instruct-75K |
*/
public function rules()
{
$rules = [
'name' => 'required|max:120|min:2',
'email' => 'required|max:60|min:6|email|unique:ec_customers,email,' . $this->route('customer'),
];
if ($this->input('is_change_password') == 1) {
$rules['password'] = '<PASSWORD>';
$rules['password_confirmation'] = '<PASSWORD>';
}
return $rules;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Tensors: Returns real and imaginary values of head, relation and tail embedding.
"""
pi = 3.14159265358979323846
h_e_r = tf.nn.embedding_lookup(self.ent_embeddings, h)
h_e_i = tf.nn.embedding_lookup(self.ent_embeddings_imag, h)
r_e_r = tf.nn.embedding_lookup(self.rel_embeddings, r)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
binarised_labels[2] = [binariseLabels(label, 2) for label in labels]
binarised_labels[3] = [binariseLabels(label, 3) for label in labels]
for target in [1,2,3]:
for dataset in [0,1,2]:
_, binarised_labels[target][dataset] =\
removePacketsAfterChange(binarised_labels[target][dataset], binarised_labels[target][dataset], label_data[dataset], 256)
for target in [1,2,3]:
for dataset in [0,1,2]:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
extension FileRepresentation {
public var containsTorchEntity: Bool {
return declarations.reduce(false) { $0 || $1.isEntityToken }
}
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
def handle_async_request_error(f):
async def wrapper(*args, **kwargs):
try:
response = await f(*args, **kwargs)
except (
exceptions.ReadTimeout,
exceptions.ReadTimeout,
exceptions.WriteTimeout,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
use server::{start, Config};
/// Simple shell around starting the server.
fn main() {
LoggerBuilder::new().filter_level(LevelFilter::Info).init();
let config: Config = Config::parse_command_line_arguments();
start(config)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
glVertex3f(position.getX(), position.getY() + size.getY(), position.getZ() + size.getZ());
glTexCoord2f(0, timesY);
glVertex3f(position.getX(), position.getY() + size.getY(), position.getZ());
glEnd();
}
else if (size.getY() < 0) {
glNormal3f(0.0F, size.getY() + 2, 0.0F);
glTexCoord2f(0, 0);
glVertex3f(position.getX(), position.getY(), position.getZ());
glTexCoord2f(0, timesZ);
glVertex3f(position.getX(), position.getY(), position.getZ() + size.getZ());
glTexCoord2f(timesX, timesZ);
glVertex3f(position.getX() + size.getX(), position.getY(), position.getZ() + size.getZ());
| ise-uiuc/Magicoder-OSS-Instruct-75K |
tp+=1
print(tp/len(self.gt))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
var array = new int[] { 1, 0, 2, 1, 4, 1 };
long lowestHighest, highestLowest;
QuickSort.ThreewayPartition((i) => array[i],
(i, j) =>
{
var temp = array[i];
array[i] = array[j];
array[j] = temp;
}, 0, array.Length - 1, 0, out highestLowest, out lowestHighest);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
dist_list = []
for i in range(start, end):
kmeans = KMeans(n_clusters=i, init='random', random_state=7)
kmeans.fit(X)
dist_list.append(kmeans.inertia_)
# 可視化
plt.plot(range(start, end), dist_list, marker='+')
plt.xlabel('Number of clusters')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<gh_stars>0
# lab 1
# дан целочисленный массив А из N элементов. проверьте,
# есть ли в нем элементы, равные нулю. если есть, найдите
# номер первого из них, т. е. наименьшее i, при котором
# элемент ai = 0.
if __name__ == '__main__':
lists = [
[1, 2, 3, 4],
[4, 5, 1, 0, 22],
[0, 1, 2],
[42, 1, 2],
[5, 2, 0],
| ise-uiuc/Magicoder-OSS-Instruct-75K |
_failEarlyRangeCheck(
result, bounds: Range(uncheckedBounds: (startIndex, endIndex)))
return result
}
/// Returns an index that is the specified distance from the given index.
///
/// The following example obtains an index advanced four positions from an
/// array's starting index and then prints the element at that position.
///
/// let numbers = [10, 20, 30, 40, 50]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return false
}
}else {
return false
}
}
}
// for d in x {
// Int(x)
// }
return true
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if event.type == pygame.KEYDOWN:
if event.key == pygame.K_a:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
pinyins = [
p[0]
for p in pinyin(
text, style=Style.TONE3, strict=False, neutral_tone_with_five=True
| ise-uiuc/Magicoder-OSS-Instruct-75K |
dependencies = [
('accounts', '0011_auto_20211113_1443'),
]
operations = [
migrations.AlterField(
model_name='customer',
name='gifts',
field=models.IntegerField(default=0),
),
]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def test_background_color_ansi8_via_property():
af = AnsiFormat(term_colors=8)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.applicationCoordinator?.start()
}
}
func setupStorageManager(completion: @escaping (StorageManagerInterface) -> Void) {
createApplicationPersistenceContainer { (container) in
completion(StorageManager(psc: container))
}
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Lab = Label(root, text = "My Label")
Lab.grid(row = r + 1, column = 1, sticky= E + W + S + N)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
state->powerups.push_back(powerup);
powerup = NULL;
}
// clean up the asteroid!
state->remove_asteroids.push_back(this);
state->startRelativeSound(SOUND_ASTEROID_BOOM,position);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
else:
if sbserver.masterMode() > 1 and not isAtLeastMaster(cn):
sbserver.playerMessage(cn, error('Master mode is locked. You cannot unspectate.'))
else:
sbserver.unspectate(tcn)
registerServerEventHandler('player_request_spectate', onReqSpectate)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
tempgui = os.path.join(USERDATAPATH, 'guitemp.xml')
gui = tempgui if os.path.exists(tempgui) else GUISETTINGS
if not os.path.exists(gui): return False
control.log("Reading gui file: %s" % gui)
guif = open(gui, 'r+')
msg = guif.read().replace('\n','').replace('\r','').replace('\t','').replace(' ',''); guif.close()
control.log("Opening gui settings")
match = re.compile('<lookandfeel>.+?<ski.+?>(.+?)</skin>.+?</lookandfeel>').findall(msg)
control.log("Matches: %s" % str(match))
if len(match) > 0:
skinid = match[0]
addonxml = os.path.join(ADDONS, match[0], 'addon.xml')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
mod api;
mod ui;
fn main() {
log4rs::init_file("log.yml", Default::default()).unwrap();
ui::render_ui();
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return self.fb_acc.user
def get_insight_data(self, from_time, to_time):
access_token = self.fb_acc.extra_data.get('access_token', '')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
shell_type="bash_interactive_login",
):
if "unison -version" in cmd:
return 0, echo("unison version 2.51.3")
elif "export UNISON=" in cmd:
return 0, echo("[mock] Successfully ran unison command")
else:
return 1, echo(f"Missing mock implementation for shell command: '{cmd}'")
| ise-uiuc/Magicoder-OSS-Instruct-75K |
la, lb = len(A), len(B)
if la != lb:
return False
diff = [i for i in range(la) if A[i] != B[i]]
if len(diff) > 2 or len(diff) == 1:
return False
| ise-uiuc/Magicoder-OSS-Instruct-75K |
ready: true,
planned: true,
plannedDate: '2016-04-10 10:28:46'
},
{
scanner: 2,
lastScanAt: '2019-04-10 10:28:46',
createdAt: '2018-04-10 10:28:46',
projectId: 'ID-11-222111',
id: 8,
projectName: 'Project yellow',
lastScan: '2019-12-06 14:38:38',
alerts: {blocking: 0, exception: 2, info: 0},
ready: true,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
c=(in_size-1)//d+1
out_size=get_out_size(in_size,pad,d,c,stride=1)
print("\t\tupdate c. after conv{} :{}".format(i+1,out_size))
conv_kernel[i]=c
pool_kernel[i]=CorrectPool(out_size,p)
out_size=get_out_size(out_size,padding=0,dilation=1,kernel_size=pool_kernel[i],stride=pool_kernel[i])
print("\tafter pool{} :{}".format(i+1,out_size))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
throw new BadRequestError('Invalid location for road');
}
}
export function house({ state, request }: PlayOptions<HouseRequest>): void {
const type = state.houses[request.vertex] ? HouseType.city : HouseType.settlement;
ensureCanPlaceHouse(state, request.vertex, type);
const color = state.currentMove.color;
switch (type) {
case HouseType.settlement:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
@pytest.fixture(scope="class")
def all_field_opts(self, client):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/// Gets a value indicating whether the query plan being logged is valid and
/// can be executed against.
/// </summary>
/// <value><c>true</c> if the query plan is valid; otherwise, <c>false</c>.</value>
public bool QueryPlanIsValid
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def main():
now_time = time.strftime("%Y-%m-%d", time.localtime())
f = open("data_kafka_{}".format(now_time), "w+")
for message in kafka_result_consumer.feed():
try:
f.write(message.decode("utf-8") + '\n')
except Exception as e:
print(e)
f.close()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
| tr '\n' ' ' \
|| true)"
if [[ -n "${modified_files}" ]]; then
echo "${linter} ${modified_files}"
${linter} ${modified_files} || HAVE_LINT_ERRORS=1
echo
fi
}
main() {
local -r LINT_KOTLIN="ktlint --experimental --relative"
run_linter "${LINT_KOTLIN}" '\.kt$'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# For details: https://github.com/gaogaotiantian/objprint/blob/master/NOTICE.txt
| ise-uiuc/Magicoder-OSS-Instruct-75K |
using Microsoft.Health.Dicom.Core.Features.Common;
using Microsoft.Health.Dicom.Core.Features.Workitem;
using Microsoft.Health.Dicom.Core.Registration;
using Microsoft.Health.Extensions.DependencyInjection;
namespace Microsoft.Extensions.DependencyInjection
{
public static class DicomServerBuilderBlobRegistrationExtensions
{
/// <summary>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
os.path.dirname(request.module.__file__),
filename,
)
return os.path.relpath(
path,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if whitelist:
self.line('<info>-> </info><comment>whitelist </comment> :')
for crit in whitelist:
self.line("\t * %s" % crit)
if blacklist:
self.line('<info>-> </info><comment>blacklist </comment> :')
for crit in blacklist:
self.line("\t * %s" % crit)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import UIKit
import WebKit
class GitDetailedView: UIViewController, WKNavigationDelegate{
var project: Project?
@IBOutlet weak var gitDesc: UILabel!
@IBOutlet weak var gitStars: UILabel!
@IBOutlet weak var gitReadme: WKWebView!
override func viewDidLoad() {
super.viewDidLoad()
if let project = project {
navigationItem.title = project.name
| ise-uiuc/Magicoder-OSS-Instruct-75K |
print (check_values([34, 56, 77], 22))
print (check_values([34, 56, 77], 34))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
exit(1)
app.config["APP_ENV"] = APP_ENV
if not os.environ.has_key("VERIFY_HEADER_NAME") or not os.environ.has_key("VERIFY_PASSWORD") or not os.environ.has_key("VERIFY_HASHED"):
print 'Wrong Env!'
exit(1)
app.config["API_VERIFY"] = {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<?php foreach ($hitRate as $key){ ?>
<tr>
<td><?php echo $key['alcanceProspectos']; ?></td>
<td><?php echo $key['hitRate']; ?></td>
<td><?php echo $key['comisionFija']; ?></td>
<td><?php echo $key['comisionAdicional']; ?></td>
<td><?php echo $key['comisonTotal']; ?></td>
<td><a href="#" id="update_esqema" data-idEsquema=<?php echo $key["idEsquemaHitRate"];?> data-idEmpresa=<?php echo $idEmpresa;?>><i class="fa fa-pencil-square fa-lg text-primary" aria-hidden="true"></i></a></td>
</tr>
<?php } ?>
</table>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
println!("Response Body: {}", res.text().unwrap());
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public record Manga(String name, int episodes) {
public Manga {
Objects.requireNonNull(name);
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
cd _book
git init
git commit --allow-empty -m 'update book'
git fetch <EMAIL>:airbnb/lottie.git gh-pages
git checkout -b gh-pages
| ise-uiuc/Magicoder-OSS-Instruct-75K |
name="connectionType",
field=models.ForeignKey(
blank=True,
null=True,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return int(cuda.current_context().get_memory_info()[0])
else:
return int(cuda.current_context().get_memory_info()[1])
except NotImplementedError:
if kind == "free":
# Not using NVML "free" memory, because it will not include RMM-managed memory
warnings.warn("get_memory_info is not supported. Using total device memory from NVML.")
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
else{
$newFilename=$fileinfo['filename'] ."_". time() . "." . $fileinfo['extension'];
move_uploaded_file($_FILES["photo"]["tmp_name"],"../uploads/" . $newFilename);
$location="../uploads/" . $newFilename;
}
$sql="insert into prof_stud (dept_id, prof_fname, prof_lname,status, picture, number, username, password, email, deleted_at) values ('$dept_id','$prof_fname','$prof_lname','$status','$location','$number','$username','$password','$email','OPEN')";
$con->query($sql) or die("<script>alert('SESSION ERROR');</script>" );
header('location:professor.php');
?> | ise-uiuc/Magicoder-OSS-Instruct-75K |
def print_json_log(logger_, level_, message_):
dict_ = {"level": level_, "message": message_, "time": str(datetime.datetime.now())}
json_str = json.dumps(dict_)
getattr(logger_, level_)(json_str)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
foo: "bar",
};
const mock_item2: ItemDefinition = {
id: "2",
foo: "bar",
};
const mock_item3: ItemDefinition = {
id: "3",
foo: "bar",
};
export const mock_items: ItemDefinition[] = [
mock_item1,
mock_item2,
mock_item3,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
public class StratumMethodSerializer extends StdSerializer<StratumMethod> {
public StratumMethodSerializer() {
this(null);
}
public StratumMethodSerializer(Class<StratumMethod> type) {
super(type);
}
@Override
| ise-uiuc/Magicoder-OSS-Instruct-75K |
value, use this to retrieve a different attribute from the response
than the publicly named value.
:param str title: The field title (for documentation purpose)
:param str description: The field description (for documentation purpose)
:param bool required: Is the field required ?
:param bool readonly: Is the field read only ? (for documentation purpose)
:param example: An optional data example (for documentation purpose)
:param callable mask: An optional mask function to be applied to output
'''
#: The JSON/Swagger schema type
__schema_type__ = 'object'
#: The JSON/Swagger schema format
__schema_format__ = None
| ise-uiuc/Magicoder-OSS-Instruct-75K |
pub mod lua_rcon;
pub mod lua_world;
pub mod plan_builder;
pub mod planner;
pub mod roll_best_seed;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import torch.optim as optim
import nutsflow as nf
import nutsml as nm
import numpy as np
from nutsml.network import PytorchNetwork
from utils import download_mnist, load_mnist
class Model(nn.Module):
"""Pytorch model"""
def __init__(self, device):
"""Construct model on given device, e.g. 'cpu' or 'cuda'"""
super(Model, self).__init__()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
try:
from .configuration.credentials_test import Configuration # for testing
| ise-uiuc/Magicoder-OSS-Instruct-75K |
message = r'^Decompression failed: corrupt input or insufficient space in destination buffer. Error code: \d+$'
for mode in ['default', 'high_compression']:
compressed = lz4.block.compress(input_data, mode=mode, dict=dict1)
with pytest.raises(lz4.block.LZ4BlockError, match=message):
lz4.block.decompress(compressed)
with pytest.raises(lz4.block.LZ4BlockError, match=message):
lz4.block.decompress(compressed, dict=dict1[:2])
assert lz4.block.decompress(compressed, dict=dict2) != input_data
assert lz4.block.decompress(compressed, dict=dict1) == input_data
assert lz4.block.decompress(lz4.block.compress(
| ise-uiuc/Magicoder-OSS-Instruct-75K |
private Rectangle corridor(){
| ise-uiuc/Magicoder-OSS-Instruct-75K |
_FATALERROR("Messaging interface registration failed!\n");
return false;
}
Hooks::InstallHooks();
_MESSAGE("Hooks installed");
return true;
}
};
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
}
fn check_overwrites(
dst: &Path,
pkg: &Package,
filter: &ops::CompileFilter,
prev: &CrateListingV1,
force: bool,
) -> CargoResult<BTreeMap<String, Option<PackageId>>> {
// If explicit --bin or --example flags were passed then those'll
// get checked during cargo_compile, we only care about the "build
// everything" case here
| ise-uiuc/Magicoder-OSS-Instruct-75K |
sender.sendMessage(send);
}
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import { SharedString } from "@fluidframework/sequence";
import { requestFluidObject } from "@fluidframework/runtime-utils";
import { IUrlResolver } from "@fluidframework/driver-definitions";
import { LocalDeltaConnectionServer, ILocalDeltaConnectionServer } from "@fluidframework/server-local-server";
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// Get question by id
getQuestion(id){
return this.questions.find((q) => q.id == id);
}
addQuestion(questionNew: Question){
// find next id
let maxIdQuestion = this.questions.reduce((prev,cur) => cur.id>prev.id?cur:prev,{id:-Infinity});
console.log('maxIdQuestion: ', maxIdQuestion);
questionNew.id = +maxIdQuestion.id + 1;
let date = new Date();
questionNew.date = new Date();
| ise-uiuc/Magicoder-OSS-Instruct-75K |
count = label_matrix.sum(axis=1)
return unique_labels,count
def true_positives(self, distances, x_labels, y_labels, k):
'''
Find the k nearest y given x, then check if the label of y correnspond to x, and accumulate.
'''
sorted_distances_indices = np.argsort(distances,axis=1) #
batch_size = x_labels.shape[0]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
video_vis = VideoVisualizer(
num_classes=cfg.MODEL.NUM_CLASSES,
class_names_path=cfg.DEMO.LABEL_FILE_PATH,
top_k=cfg.TENSORBOARD.MODEL_VIS.TOPK_PREDS,
thres=cfg.DEMO.COMMON_CLASS_THRES,
lower_thres=cfg.DEMO.UNCOMMON_CLASS_THRES,
common_class_names=common_classes,
colormap=cfg.TENSORBOARD.MODEL_VIS.COLORMAP,
mode=cfg.DEMO.VIS_MODE,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
raiz = valor1 **0.5
print("O dobro {} o triplo {} e a raiz quadrada {}".format(dobro,triplo,raiz)) | ise-uiuc/Magicoder-OSS-Instruct-75K |
const enableFacebook = socialLogins.includes('facebook');
const [isLoading, setLoading] = React.useState<boolean>(false);
return (
<Stack>
{enableGoogle && (
<Box>
<Button
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.s2c.put (result)
@staticmethod
def make_pair( func ):
s2c = multiprocessing.Queue()
c2s = multiprocessing.Queue()
lock = multiprocessing.Lock()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
pub static FINGER_POINTER_RIGHT: Emoji<'_, '_> = Emoji("👉 ", "");
| ise-uiuc/Magicoder-OSS-Instruct-75K |
ANativeWindow* window = GetWindow();
if (window)
{
widthPixels = ANativeWindow_getWidth(window);
heightPixels = ANativeWindow_getHeight(window);
// should an error occur from the above functions a negative value will be returned
return (widthPixels > 0 && heightPixels > 0);
}
return false;
}
////////////////////////////////////////////////////////////////
void SetLoadFilesToMemory(const char* fileNames)
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"Mozilla/5.0 CK={ } (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko",
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36",
"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36",
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36",
"Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:24.0) Gecko/20100101 Firefox/24.0",
"Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20070308 Minefield/3.0a1",
"Mozilla/5.0 (Linux; U; Android 2.2) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1",
| 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.