seed
stringlengths
1
14k
source
stringclasses
2 values
from src.utils.config import * from src.games.poker.lobby import * from src.discord.manage import * from src.utils.logs import getlogger def check_botowner(ctx): config = Config() return ctx.author.id in config.owners def check_inserv(ctx): config = Config()
ise-uiuc/Magicoder-OSS-Instruct-75K
async def root(request): return text("Welcome! Call me via POST with graphql query in body.") @app.route("/", methods=['POST']) async def post_root(request): result = schema.execute(request.json['query']) return json(result.data) app.add_route(GraphQLView.as_view(schema=schema, graphiql=True), '/graphql...
ise-uiuc/Magicoder-OSS-Instruct-75K
# Configure microcontroller beetle_ssh 'Beetle --SetGpioDirection "$gpio" OUT' # Get blk dev name connected to interposer beetle_ssh 'Beetle --SetGpio "$gpio" HIGH' sleep $kernel_hotplug_time $rootdir/scripts/setup.sh reset blk_list1=$(lsblk -d --output NAME | grep "^nvme") remove_device
ise-uiuc/Magicoder-OSS-Instruct-75K
import random import time from tqdm import tqdm client = carla.Client('localhost', 2000) client.set_timeout(2.0)
ise-uiuc/Magicoder-OSS-Instruct-75K
using Exico.Shopify.Web.Core.Modules; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; namespace Exico.Shopify.Web.Core.Controllers.BaseControllers { /// <summary> /// Extend this abstract controller if you w...
ise-uiuc/Magicoder-OSS-Instruct-75K
@with_in_memory_connection def test_on_message_is_sending_to_reply_queue(self, conn): ret_result = 'foooo'
ise-uiuc/Magicoder-OSS-Instruct-75K
id: number; node_id: string; head_branch: string; head_sha: string; run_number: number; event: string; status: string;
ise-uiuc/Magicoder-OSS-Instruct-75K
with open(expected_data_file_path) as file: expected_output = np.genfromtxt(file, delimiter=',') actual_output = eot_da_rosa(self.input_data) np.testing.assert_array_almost_equal(actual_output, expected_output)
ise-uiuc/Magicoder-OSS-Instruct-75K
for a_dev in (brocade_rtr1, hp_sw1):
ise-uiuc/Magicoder-OSS-Instruct-75K
def close(self) -> None: self.close_calls += 1 class FakeWorker(AbstractBatchWorker[KafkaMessage, Any]): def __init__(self) -> None: self.processed: MutableSequence[Optional[Any]] = [] self.flushed: MutableSequence[Sequence[Any]] = [] def process_message(self, message: KafkaMessa...
ise-uiuc/Magicoder-OSS-Instruct-75K
Post Condition -------------- * Logging messages are printed. * HTML report is saved. ''' if lap is not None: lapFrac = lap
ise-uiuc/Magicoder-OSS-Instruct-75K
entry.save() self._validate_redirect(self.invalid_url, self.redirect_to_url) def test_redirect_to_page(self): PageNotFoundEntry.objects.all().delete()
ise-uiuc/Magicoder-OSS-Instruct-75K
* * @param observerMethod observer method */ void addObserverMethod(ObserverMethod<?> observerMethod); /** * Adds given context to the container. * * @param context new context */ void addContext(Context context); /** * This will return the AnnotatedType i...
ise-uiuc/Magicoder-OSS-Instruct-75K
def test(): r""" This function will only be called after the test.vice singlezone output has been produced by the module test which calls this. """ from ....core.dataframe.tests.history import _ELEMENTS_
ise-uiuc/Magicoder-OSS-Instruct-75K
dec_event.terminal = True dec_event.direction = -1 # simulate until a jump occurs if default_savepoints: ivp_solution = solve_ivp(time_derivative, (time, max_time), state,
ise-uiuc/Magicoder-OSS-Instruct-75K
package ca.corefacility.bioinformatics.irida.ria.web.ajax.dto; /** * Abstract class for the response for creating a new sample if a project. */ public abstract class CreateSampleResponse { }
ise-uiuc/Magicoder-OSS-Instruct-75K
use std::sync::Arc; use std::thread; use std::time::Duration; use std::{ fs, sync::atomic::{AtomicU32, Ordering}, }; use apply_revealer::ApplyRevealer; use daemon::daemon_connection::DaemonConnection; use daemon::gpu_controller::GpuStats; use daemon::DaemonError; use gtk::*;
ise-uiuc/Magicoder-OSS-Instruct-75K
shift $((OPTIND-1))
ise-uiuc/Magicoder-OSS-Instruct-75K
if __name__ == '__main__': args = sys.argv device_id = int(args[1]) water_supply_time = int(args[2]) device = get_all_device_by_device_id(device_id) if device == {}: raise DeviceNotFound('Device does not exist.') if device['device']['type'] != DEVICE_TYPE['FEED_PUMP']: ra...
ise-uiuc/Magicoder-OSS-Instruct-75K
author_email='<EMAIL>', license='MIT', packages=['MSATwtdenoiser'], install_requires=[ 'numpy','matplotlib','scipy','PyWavelets','opencv-python' ], zip_safe=False)
ise-uiuc/Magicoder-OSS-Instruct-75K
- **ClusterId** (str) - (Required) UK8S集群ID。 可从UK8S控制台获取。 - **Password** (str) - (Required) Node节点密码。请遵照 `字段规范 <https://docs.ucloud.cn/api/uhost-api/specification>`_ 设定密码。密码需使用base64进行编码,如下:# echo -n Password1 | base64 - **UHostId** (str) - (Required) 云主机Id,为了保证节点正常运行,该主机配置不得低于2C4G。 - **...
ise-uiuc/Magicoder-OSS-Instruct-75K
{ public static class ApiHelper { public static string GetJsonString(string url) { string json = string.Empty; using(WebClient client = new WebClient()) json = client.DownloadString(url); return json;
ise-uiuc/Magicoder-OSS-Instruct-75K
from netket.custom.fermionic_hilbert import Fermions from netket.custom.fermion_operator import SparseHermitianFermionOperator, FermionSumOperators, FermionTotalSpinNumberOperator import numpy as np class AbInitio(FermionSumOperators): def __init__(self, hi, one_body_mat, two_body_mat): n_orbitals = hi.si...
ise-uiuc/Magicoder-OSS-Instruct-75K
@endsection @include('front-include.titleseo') @include('front-include.index_js')
ise-uiuc/Magicoder-OSS-Instruct-75K
include_total = False @staticmethod def get_object_not_found_error_response(object_name, object_lookup_key): return ErrorResponse(data="{0} with ID '{1}' not found.".format(object_name, object_lookup_key), status=status.HTTP_404_NOT_FOUND) @staticmethod
ise-uiuc/Magicoder-OSS-Instruct-75K
this.router = Router(); this.router.get('/', isAuthenticated, IndexController.index ); } } export default new IndexRouter().router;
ise-uiuc/Magicoder-OSS-Instruct-75K
string PublicRouteName { get; set; } string Url { get; set; } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
'almMadreDui' => $this->input->post('txtMadreDui'), 'almPadreDui' => $this->input->post('txtPadreDui'), 'dptId' => $this->input->post('cboDptId'), 'munId' => $this->input->post('cboMunId') ); $b = $this->Alum...
ise-uiuc/Magicoder-OSS-Instruct-75K
item['geometry'] = buffered_geom return item
ise-uiuc/Magicoder-OSS-Instruct-75K
DropdownContext.displayName = 'DropdownContext'; export default DropdownContext;
ise-uiuc/Magicoder-OSS-Instruct-75K
$republish = true; $Alert->set('success', PerchLang::get('Republishing is underway.')); } }
ise-uiuc/Magicoder-OSS-Instruct-75K
for i in range(1, 1000): batch_xs, batch_ys = mnist.train.next_batch(100) if i % 100 == 0:
ise-uiuc/Magicoder-OSS-Instruct-75K
SAAS_MODEL = import_from_string(SAAS_SETTINGS.get('MODEL'), 'MODEL' ) if SAAS_SETTINGS.get('MODEL') else None
ise-uiuc/Magicoder-OSS-Instruct-75K
.addRow("Blinky", "red", 123, "Apple", 1, "One Apple"); DataFrameUtil.assertEquals(expected, joined); }
ise-uiuc/Magicoder-OSS-Instruct-75K
""" from ._coefficient import FourierCoefficient class AlphaCoefficient( FourierCoefficient, ): pass
ise-uiuc/Magicoder-OSS-Instruct-75K
adUnitId = "ca-app-pub-3940256099942544/2934735716"; #endif } return adUnitId;
ise-uiuc/Magicoder-OSS-Instruct-75K
using System.Drawing.Drawing2D; using System.Linq; using System.Windows.Forms; using Sce.Atf.VectorMath; namespace Sce.Atf.Controls.Adaptable.Graphs
ise-uiuc/Magicoder-OSS-Instruct-75K
if [ "$TIMEIT" = "" ]; then echo "error: missing required argument -t for path to 'timeit'" exit 1
ise-uiuc/Magicoder-OSS-Instruct-75K
cnt = 0 for i in range(len(permutations)):
ise-uiuc/Magicoder-OSS-Instruct-75K
pub fn is_match(&self, text: &str) -> bool { self.rules.iter().any(|r| r.is_match(text)) } pub fn find(&self, text: &str) -> Option<(TokenKind, usize)> { // max returns the last max so we reverse iteration to get the first max. self.rules .iter() .rev() ...
ise-uiuc/Magicoder-OSS-Instruct-75K
pub struct __SecStaticCode {} pub struct __SecCertificate {} pub struct __SecRequirement {} pub type SecCertificateRef = *const __SecCertificate; pub type SecCodeRef = *const __SecCode; pub type SecStaticCodeRef = *const __SecStaticCode; pub type SecRequirementRef = *const __SecRequirement;
ise-uiuc/Magicoder-OSS-Instruct-75K
} private void OnToolTipClosing(object sender, ToolTipEventArgs e) { _element.ToolTip = this;
ise-uiuc/Magicoder-OSS-Instruct-75K
self.fixture_count = 0 self.loaded_object_count = 0 self.fixture_object_count = 0 self.models = set() self.serialization_formats = serializers.get_public_serializer_formats() # Forcing binary mode may be revisited after dropping Python 2 support (see #22399) ...
ise-uiuc/Magicoder-OSS-Instruct-75K
class LoginForm(forms.Form): username = forms.CharField(max_length=150) password = forms.CharField(widget=forms.PasswordInput)
ise-uiuc/Magicoder-OSS-Instruct-75K
opts = utils.parse(argv, redirect_port_args, ".splunkrc", usage=usage) args = [("scheme", opts.kwargs["scheme"]), ("host", opts.kwargs["host"]), ("port", opts.kwargs["port"]), ("redirecthost", "localhost"), ("redirectport", opts.kwargs["redirectport"]), ...
ise-uiuc/Magicoder-OSS-Instruct-75K
pub fn transform(input: &BTreeMap<i32, Vec<char>>) -> BTreeMap<char, i32> { input
ise-uiuc/Magicoder-OSS-Instruct-75K
self.hemispheres = hemispheres self.message = message super().__init__(self.message)
ise-uiuc/Magicoder-OSS-Instruct-75K
Business Communications and Journalism Computer Science,Education
ise-uiuc/Magicoder-OSS-Instruct-75K
export = DocumentAttachment20;
ise-uiuc/Magicoder-OSS-Instruct-75K
'Main call: %s' % func_name, 'Starting date: %s' % start_time.strftime( DATE_FORMAT), 'End date: %s' % end_time.strftime(DATE_FORMAT), 'Training duration: %s' % str(elapsed_tim...
ise-uiuc/Magicoder-OSS-Instruct-75K
IEnumerator Disappear () { var t = 0f; var originScale = transform.localScale; while (t <= 1f) { t += Time.deltaTime * 20f; transform.localScale = Vector3.Lerp (originScale, Vector3.zero, t);
ise-uiuc/Magicoder-OSS-Instruct-75K
/// Deserializes the given hex string with optional `0x` prefix. pub fn deserialize_from_byte_str<'de, D>(deserializer: D) -> Result<Vec<u8>, D::Error> where D: serde::Deserializer<'de>,
ise-uiuc/Magicoder-OSS-Instruct-75K
# -*- coding: utf-8 -*- # Copyright 2017, IBM. # # This source code is licensed under the Apache License, Version 2.0 found in # the LICENSE.txt file in the root directory of this source tree. """This module implements the abstract base class for backend modules. To create add-on backend modules subclass the Backend...
ise-uiuc/Magicoder-OSS-Instruct-75K
self.embedding_h = nn.Embedding(num_atom_type, hidden_dim) for layer in range(self.n_layers): mlp = MLP(n_mlp_layers, hidden_dim, hidden_dim, hidden_dim) self.ginlayers.append(GINLayer(ApplyNodeFunc(mlp), neighbor_aggr_type, ...
ise-uiuc/Magicoder-OSS-Instruct-75K
print '1 4 0 1 0 0 50 -1 20 0.000 1 0.0000 {cx} {cy} {point_radius} {point_radius} {sx} {sy} {ex} {ey}'.format(**locals()) count += 1
ise-uiuc/Magicoder-OSS-Instruct-75K
#num.remove(2) #vai remover o primeiro 2 #if 4 in num: # num.remove(4) #else: # print('Não achei o número 4') #print(num)
ise-uiuc/Magicoder-OSS-Instruct-75K
SECONDS_IN_YEAR = 31536000 # Print out formatted time difference if total_time_diff.total_seconds() < 10: return f'just now'
ise-uiuc/Magicoder-OSS-Instruct-75K
DURATION.COUNTER = { 'lookupDB': GetCostOfLookup, 'wrap': GetCostOfWrap, 'pickup': GetCostOfPickup, 'putdown': GetCostOfPutdown, 'loadMachine': GetCostOfLoad, 'moveRobot': GetCostOfMove, 'acquireRobot': 1, 'freeRobot': 1, 'wait': 5 } rv.LOCATIONS = [0, 1, 2, 3, 4, 5, 200] rv.FACTORY...
ise-uiuc/Magicoder-OSS-Instruct-75K
g_allowed.remove_nodes_from(vrs) g.remove_nodes_from(vrs)
ise-uiuc/Magicoder-OSS-Instruct-75K
* Graph is the main structure of GreyCat.
ise-uiuc/Magicoder-OSS-Instruct-75K
use susfetch::{get_item_from_c_buf, IOResult}; #[derive(Debug)] pub struct SusFetch { kernel: String, shell: String, wm: String, host: String, os: String, terminal: String, } impl SusFetch { fn default() -> IOResult<Self> { let kernel = susfetch::get_kernel_version()?;
ise-uiuc/Magicoder-OSS-Instruct-75K
class CardTemplateResource(BaseResource): ''' Classe que obtém a estrutura de dados de um modelo de card. ''' @swagger.doc({ 'tags':['card_template'], 'description':'Obtém um a estrutura de dados de um modelo de card', 'parameters':[ {
ise-uiuc/Magicoder-OSS-Instruct-75K
#!/bin/sh echo $(hostname) received the message: $PT_message
ise-uiuc/Magicoder-OSS-Instruct-75K
if os.path.exists(meta_path): with open(meta_path, 'r') as fp: return sort_meta_dict(json.load(fp)) else: return OrderedDict() def add_storage(self, file_path): # Convert bytes to mega bytes file_size = os.path.getsize(file_path) / 1e+6 ...
ise-uiuc/Magicoder-OSS-Instruct-75K
Windows: get DirectShow device list from:
ise-uiuc/Magicoder-OSS-Instruct-75K
{ [EnumMember] Executing, [EnumMember]
ise-uiuc/Magicoder-OSS-Instruct-75K
d = ', ' if delimiter == ',': d = '; ' var = d.join(make_safe(x,trans_delimiter) for x in sorted(var.keys(), key = lambda y: var[y])) word_outline.append(var) print(delimiter.join(word_outline), file=f)
ise-uiuc/Magicoder-OSS-Instruct-75K
def get_form_import_list_website(self):
ise-uiuc/Magicoder-OSS-Instruct-75K
def from_ast(self, namespace, node): """ Creates an assignment statement from an AST node. """ # Create a new assignment statement. assign = Assign(
ise-uiuc/Magicoder-OSS-Instruct-75K
{ // Handles simple text formats
ise-uiuc/Magicoder-OSS-Instruct-75K
namespace Sep.Git.Tfs.Core.TfsInterop { public interface IWorkItemCheckedInfo { } }
ise-uiuc/Magicoder-OSS-Instruct-75K
for i in range(len(predict_val['user id'])):
ise-uiuc/Magicoder-OSS-Instruct-75K
""" import time from pathlib import Path
ise-uiuc/Magicoder-OSS-Instruct-75K
class Field(ConfigComponent): pass
ise-uiuc/Magicoder-OSS-Instruct-75K
<gh_stars>1-10 #!/bin/bash alias dfc="/home/vagrant/vagrant_data/dfc/dfc_pkg/./main.py"
ise-uiuc/Magicoder-OSS-Instruct-75K
def log(data: str): if verbose: print(data) def throttle_data_from_destination(pkt: Packet): ip, tcp = pkt[IP], pkt[TCP] # verify that the DST sent packet to SRC if ip.src != dst or ip.dst != src: return
ise-uiuc/Magicoder-OSS-Instruct-75K
*/ #include "Interface/IR/PassManager.h" #include <FEXCore/Core/CoreState.h> #include <FEXCore/IR/IR.h> #include <FEXCore/IR/IREmitter.h> #include <FEXCore/IR/IntrusiveIRList.h> #include <FEXCore/Utils/LogManager.h>
ise-uiuc/Magicoder-OSS-Instruct-75K
import * as path from "path" import * as fs from "fs" import examplePlugin from "../src" const fixture = (filename: string) => fs.readFileSync(path.join(__dirname, "fixtures", filename)).toString() const transformWith = (plugin: PluginObj) => (input: string) => transformSync(input, { plugins: [plugin] }).code d...
ise-uiuc/Magicoder-OSS-Instruct-75K
#include <iostream> #include "Huffman.h" using namespace std; int main (int argc, char* argv[]) { string fileArgument {}; bool both = false;
ise-uiuc/Magicoder-OSS-Instruct-75K
public ModuleStandard(final EntityMinecartModular cart) { super(cart); } @Override public int getConsumption(final boolean isMoving) { if (!isMoving) { return super.getConsumption(false); } return 1; } }
ise-uiuc/Magicoder-OSS-Instruct-75K
../build/bin/cisat --bench --input output_meta.txt --output output_metabench.txt --verbose
ise-uiuc/Magicoder-OSS-Instruct-75K
class JenkinsCredentialTestBase(JenkinsTestBase): config_xml = """<com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl> <scope>GLOBAL</scope> <id>Test Credential</id> <username>Test-User</username> <password><PASSWORD></password> </com.cloudbees.plugins.crede...
ise-uiuc/Magicoder-OSS-Instruct-75K
def test_app_is_created(app): assert app.name == 'joalheria.app' def test_config_is_loaded(config): assert config["DEBUG"] is False
ise-uiuc/Magicoder-OSS-Instruct-75K
override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. //Auto-set the UITableViewCells height (requires iOS8+)
ise-uiuc/Magicoder-OSS-Instruct-75K
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { self.as_ref().fmt(f) } }
ise-uiuc/Magicoder-OSS-Instruct-75K
private EditText et;
ise-uiuc/Magicoder-OSS-Instruct-75K
if indices is None: indices = range(len(self.outputImages)) for i, ind in enumerate(indices): self.outputImages[ind].writeAsVTK(name='img{:02d}'.format(i)) def execute(self): self.pipeline[0].inputImage = self.inputImage self.pipeline[0].execute() sel...
ise-uiuc/Magicoder-OSS-Instruct-75K
<reponame>getzinj/nunjucks-typescript import { NunjucksNode } from './nunjucksNode'; export class InlineIf extends NunjucksNode {
ise-uiuc/Magicoder-OSS-Instruct-75K
def test_main_group(id): BASE_URL = 'https://www.realoem.com/bmw/' LANGUAGE = 'enUS' URL = f"{BASE_URL}{LANGUAGE}" params = {'id':id} r = httpx.get(f'{URL}/partgrp', params=params) soup = bso(r.text, "html.parser") for links in soup.find_all("div", {"class": "mg-thumb"}):
ise-uiuc/Magicoder-OSS-Instruct-75K
{ Console.Write(number + ". "); } public void PrintRanking<T>(IDictionary<T, IPlayer> rank) where T : notnull { Console.WriteLine("Players Ranking..."); var count = 0; foreach (var player in rank.Values)
ise-uiuc/Magicoder-OSS-Instruct-75K
let user = User.template let activity = .template |> Activity.lens.category .~ .backingReward |> Activity.lens.memberData.oldRewardId .~ oldReward.id |> Activity.lens.memberData.newRewardId .~ newReward.id
ise-uiuc/Magicoder-OSS-Instruct-75K
from sensor_msgs.msg import Image from constants import STARTER_TOPIC, IMAGE_TOPIC, STARTER_NODE class StarterNode: def __init__(self): rospy.init_node(STARTER_NODE) self.start_publisher = rospy.Publisher(STARTER_TOPIC, Bool, queue_size=10) ...
ise-uiuc/Magicoder-OSS-Instruct-75K
def test_print_list_no_crash(): print_formats.list_print([], do_print=False) print_formats.list_print(["text"], do_print=False) print_formats.list_print(["text"] * 50, do_print=False)
ise-uiuc/Magicoder-OSS-Instruct-75K
data_src, data_tar, label_src, label_tar = self.__session.run( [self.data_src, self.data_tar, self.label_src, self.label_tar] ) if data_src.shape != data_tar.shape: break ...
ise-uiuc/Magicoder-OSS-Instruct-75K
t = i/(self.m_segment_count-1) invt = 1-t pos = invt * invt * invt * self.m_p1 \ + 3 * invt * invt * t * self.m_p2 \ + 3 * invt * t * t * self.m_p3 \ + t * t * t * self.m_p4 vertices[i].set(pos.x()*w, pos.y()*h) ...
ise-uiuc/Magicoder-OSS-Instruct-75K
from asposehtmlcloud.models import BaseModel class FilesUploadResult(BaseModel):
ise-uiuc/Magicoder-OSS-Instruct-75K
public enum ReturnValue { CANCEL, CREATE } /** * Panels for the dialogue. */ private JPanel panelName, panelTapes, panelButtons;
ise-uiuc/Magicoder-OSS-Instruct-75K
<filename>src/ROS/src/workspace/ros/semantic_slam_ws/devel/.private/ShapeColor_ObjectDetection/lib/python2.7/dist-packages/ShapeColor_ObjectDetection/msg/__init__.py from ._DetectedObjects import *
ise-uiuc/Magicoder-OSS-Instruct-75K
print(frequency_dictionary(["apple", "apple", "cat", 1])) # should print {"apple":2, "cat":1, 1:1} print(frequency_dictionary([0,0,0,0,0])) # should print {0:5}
ise-uiuc/Magicoder-OSS-Instruct-75K
x_best, y_best = sa.optimize(f = maxtf_job, ybound=(0, np.inf), initf=init_f, randf=randf, t=1000, alpha=0.98, stop=0.01, iterPerT=10, l=1) print(y_best) print(x_best) # joblib.dump((x_best, y_best)) # x, y = sa.optimize(f = maxtf_job, ybound=(0, np.inf), initf=init_f, randf=randf, # ...
ise-uiuc/Magicoder-OSS-Instruct-75K