seed
stringlengths
1
14k
source
stringclasses
2 values
<reponame>zysundar/Python_programming keys = ['red', 'green', 'blue'] values = ['#FF0000','#008000', '#0000FF'] color_dictionary = dict(zip(keys, values)) print(color_dictionary)
ise-uiuc/Magicoder-OSS-Instruct-75K
""" Method for paginating pages in relation to database objects. :param request: <django.core.handlers.wsgi.WSGIRequest> :param data: <django.db.models.query.QuerySet> :param paginate_by: <int> -> the number of elements on the page on which the page is to be paginated :return: <django.core.paginator.Page> -> number of paginated pages """ url_parameter_page = request.GET.get('page') paginator = Paginator(data, paginate_by) try: users = paginator.page(url_parameter_page) except PageNotAnInteger:
ise-uiuc/Magicoder-OSS-Instruct-75K
{ } namespace DataAccess { } namespace DataAccess { } namespace DataAccess { } namespace DataAccess { }
ise-uiuc/Magicoder-OSS-Instruct-75K
def database(self):
ise-uiuc/Magicoder-OSS-Instruct-75K
) obj = environment.Environment() result = obj.open('file.name') assert result == 'handle' mock_filename.assert_called_once_with('file.name') mock_open.assert_called_once_with('/some/file', 'r', -1) def test_open_alt(self, mocker):
ise-uiuc/Magicoder-OSS-Instruct-75K
fig = px.choropleth(end, locations = end.index, color = 'improved_unmet_mental_health', hover_name = end.index, locationmode= 'USA-states')
ise-uiuc/Magicoder-OSS-Instruct-75K
@extends('admin.layouts.admin') @section('content') @include('admin.partials.categories.index') @stop
ise-uiuc/Magicoder-OSS-Instruct-75K
See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ import GMLImageUtils import XCTest @testable import TFLImageClassifier
ise-uiuc/Magicoder-OSS-Instruct-75K
// Created by Adrian Corscadden on 2016-11-22. // Copyright © 2016 breadwallet LLC. All rights reserved. // import UIKit class CheckView : UIView, AnimatableIcon { public func animate() { let check = UIBezierPath() check.move(to: CGPoint(x: 32.5, y: 47.0)) check.addLine(to: CGPoint(x: 43.0, y: 57.0))
ise-uiuc/Magicoder-OSS-Instruct-75K
DayjsDateProvider );
ise-uiuc/Magicoder-OSS-Instruct-75K
assert parse_commit_message(message) == expected_output def test_message_with_committed_by(self): author_name = '<NAME>' author_email = '<EMAIL>' service_name = 'example-service' tag = '0b5fb3e5-c91d-45f1-8c6e-5ceeaa11ec8f' env = 'test-environment'
ise-uiuc/Magicoder-OSS-Instruct-75K
""" Set of tools to work with different observations. """ __all__ = ["hinode", "iris"]
ise-uiuc/Magicoder-OSS-Instruct-75K
img = PhotographCamera.photographToBytesIO() #识别 res = baidu_graphic.detectImage(img,detect_type) if detect_type is not None else None name = res['name'] if 'name' in res else None if name is not None: speaker.say("这个应该是"+name.encode("UTF-8")) else: speaker.say("没有识别出来,请放好点再试一次吧") else: speaker.say("正在监控中,请关了监控然后再试试吧") in_to_fp.close() out_from_fp.close() son_processor.join()
ise-uiuc/Magicoder-OSS-Instruct-75K
if (cp_space) { return static_cast<SpaceNode*>(cpSpaceGetUserData(cp_space)); } } return nullptr; } BodyNodeType BodyNode::body_type()
ise-uiuc/Magicoder-OSS-Instruct-75K
@url http://scrapy.org """ name = 'url'
ise-uiuc/Magicoder-OSS-Instruct-75K
# get the matching atom neighbours - the ligans don't get the H's read in - so we can use # that list directly fitsRecAngle = False fitsLigAngle = False # first the receptor angles - there are usually less nieghbours for rec atoms for neighIdx in filt[1][1]: # here we are looping over all possible combinations and check at the very end if # both angles are ok # if an angle is already ok we can skip the second calculation # get the vectors
ise-uiuc/Magicoder-OSS-Instruct-75K
class FieldDoesNotExist(Exception): def __init__(self, **kwargs): super().__init__(f"{self.__class__.__name__}: {kwargs}") self.kwargs = kwargs
ise-uiuc/Magicoder-OSS-Instruct-75K
callMonitoring?: boolean; } export default GrantInfo;
ise-uiuc/Magicoder-OSS-Instruct-75K
return Walk(distance); } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
from pandapower.shortcircuit.toolbox import *
ise-uiuc/Magicoder-OSS-Instruct-75K
header: "Name", key: "name", headerIsLink: true, }, {
ise-uiuc/Magicoder-OSS-Instruct-75K
"ijo-nanpa"=>"F162", "ijo-nasa"=>"F163", "ijo-nasin"=>"F164", "ijo-nena"=>"F165", "ijo-ni"=>"F166", "ijo-nimi"=>"F167", "ijo-noka"=>"F168", "ijo-olin"=>"F170", "ijo-ona"=>"F171", "ijo-open"=>"F172", "ijo-pakala"=>"F173", "ijo-pali"=>"F174", "ijo-palisa"=>"F175", "ijo-pan"=>"F176",
ise-uiuc/Magicoder-OSS-Instruct-75K
# download the dynamo jar file if needed
ise-uiuc/Magicoder-OSS-Instruct-75K
FigureCanvas.updateGeometry(self) def plot(self, histogram, color = None): self.axes.set_title("Spatial relations between A and B", va='bottom') if self.is_polar: self.axes.set_rlim(0,1) theta = [float(k)/ 180 * np.pi for k in histogram.values.keys()] #TODO : refractor this ugly-but-working code if len(theta) > 16:
ise-uiuc/Magicoder-OSS-Instruct-75K
//! Two-additive-factor gaussian model class. /*! This class implements a two-additive-factor model defined by \f[ dr_t = \varphi(t) + x_t + y_t
ise-uiuc/Magicoder-OSS-Instruct-75K
Z = np.loadtxt('datos.txt') X = np.array(range(101))/101 Y = X X,Y = np.meshgrid(X,Y) fig = plt.figure() ax = Axes3D(fig) ax.plot_wireframe(X,Y,Z,color = 'r')
ise-uiuc/Magicoder-OSS-Instruct-75K
pub model_view_proj: glam::Mat4, // +64 } // 128 bytes pub fn create_mesh_extract_job( descriptor_set_allocator: DescriptorSetAllocatorRef,
ise-uiuc/Magicoder-OSS-Instruct-75K
/// <param name="textToFormat"></param> /// <param name="fontFamily"></param> /// <param name="fontStyle"></param> /// <param name="fontWeight"></param> /// <param name="fontStretch"></param> /// <returns></returns> public static Geometry GetGeometryFromText(this string textToFormat, FontFamily? fontFamily = null, FontStyle? fontStyle = null, FontWeight? fontWeight = null, FontStretch? fontStretch = null) { //var pixelsPerDip = VisualTreeHelper.GetDpi(visual);
ise-uiuc/Magicoder-OSS-Instruct-75K
#include <Silice3D/common/timer.hpp> namespace Silice3D { double Timer::Tick() { if (!stopped_) { double time = glfwGetTime(); if (last_time_ != 0) { dt_ = time - last_time_; } last_time_ = time; current_time_ += dt_;
ise-uiuc/Magicoder-OSS-Instruct-75K
supportsCreateTable(format); supportsAlterTable(format);
ise-uiuc/Magicoder-OSS-Instruct-75K
import java.awt.Component;
ise-uiuc/Magicoder-OSS-Instruct-75K
def KNMConfig(config): """ Creates config required for KNM from the clarity-ext config (which has more than that)
ise-uiuc/Magicoder-OSS-Instruct-75K
if runner_config['type'] == 'default': from .training.default.builder import build_default_training_runner return build_default_training_runner(model, runner_config, data_source_context, config, event_register) elif runner_config['type'] == 'default_evaluation' or runner_config['type'] == 'coarse_to_fine_evaluation':
ise-uiuc/Magicoder-OSS-Instruct-75K
XCTAssertTrue( URLBuilder().password(from: Constants.testURLComponents) !== URLBuilder.password(from: Constants.testURLComponents), "Something went wrong. Check the initialization in the URLBuilder by URLComponents" ) }
ise-uiuc/Magicoder-OSS-Instruct-75K
if i == 2: if y2 < cuty or x2 < cutx:
ise-uiuc/Magicoder-OSS-Instruct-75K
)); } private AnAction initAboutAction() { return new DumbAwareAction("About","", PluginIcons.Other) { @Override public void actionPerformed(@NotNull AnActionEvent e) { new AboutDialog(project).show();
ise-uiuc/Magicoder-OSS-Instruct-75K
#include <iostream> #include <random> #include <type_traits> using namespace std; using namespace std::chrono; // define class
ise-uiuc/Magicoder-OSS-Instruct-75K
import unittest
ise-uiuc/Magicoder-OSS-Instruct-75K
class UnitedKingdomStores(Stores): """ Base class for united kingdom marketplaces. """
ise-uiuc/Magicoder-OSS-Instruct-75K
from django.db.models.signals import post_save from django.dispatch import receiver, Signal from rest_framework_security.deny_repeat_password import config from rest_framework_security.deny_repeat_password.emails import ChangedPasswordEmail from rest_framework_security.deny_repeat_password.models import UserPassword
ise-uiuc/Magicoder-OSS-Instruct-75K
def _getattr(obj, attr): return getattr(obj, attr, *args) return functools.reduce(_getattr, [obj] + attr.split(".")) class YotiDialogues(BaseYotiDialogues): """The dialogues class keeps track of all dialogues.""" def __init__(self, **kwargs) -> None: """
ise-uiuc/Magicoder-OSS-Instruct-75K
import pytest from energuide.embedded import distance def test_distance() -> None: output = distance.Distance(1) assert output.metres == 1.0 assert output.feet == pytest.approx(3.28084) def test_from_square_feet() -> None: output = distance.Distance.from_feet(1) assert output.metres == pytest.approx(0.304800) assert output.feet == pytest.approx(1.0)
ise-uiuc/Magicoder-OSS-Instruct-75K
println!{"{:?}", *t} } }
ise-uiuc/Magicoder-OSS-Instruct-75K
template: None, }; let el = if rule == Rule::directive_expression { DirectiveExpression(directive)
ise-uiuc/Magicoder-OSS-Instruct-75K
sum_pd = ['PD', '%s' % len(self.pd.hosts), self.item_count([item['config']['cluster-version'] for item in self.pd.pdinfo.values()]) ] summary.append(sum_pd) result.append(summary) return result def display(self): for section in self.build_summary_info(): for row in self.format_columns(section): print(row)
ise-uiuc/Magicoder-OSS-Instruct-75K
B: gfx_hal::Backend, { /// Creates [`KeepAlive`] handler to extend buffer lifetime. /// /// [`KeepAlive`]: struct.KeepAlive.html pub fn keep_alive(&self) -> KeepAlive { Escape::keep_alive(&self.escape) }
ise-uiuc/Magicoder-OSS-Instruct-75K
({"git": "https://github.com/sarugaku/vistir.git", "editable": True}, True), ({"git": "https://github.com/sarugaku/shellingham.git"}, False), ("-e .", True), (".", False), ("-e git+https://github.com/pypa/pip.git", True), ("git+https://github.com/pypa/pip.git", False), ], ) def test_editable_check(input, expected): assert base_utils.is_editable(input) is expected
ise-uiuc/Magicoder-OSS-Instruct-75K
the_user.update_reminder(request.data.get('field'), request.data.get('value')) return Response({'detail': 'successful'}, status=status.HTTP_200_OK) else: return invalid_data_response(request_serializer)
ise-uiuc/Magicoder-OSS-Instruct-75K
} /** * @return SwitcherCore\Config\Objects\Module[] */ function getAll() {
ise-uiuc/Magicoder-OSS-Instruct-75K
""" Return a results dictionary based on PyLint's exit code and a PyLint JSON output file. """
ise-uiuc/Magicoder-OSS-Instruct-75K
setattr(self, key, value) @property def carrier(self): return self._channel def sender(self): return self._channel.sender def receiver(self): return self._channel.receiver class CallbackMessage(Message):
ise-uiuc/Magicoder-OSS-Instruct-75K
""" ShellSort is mainly a variation of Insertion Sort. In insertion sort, we move elements only one position ahead. When an element has to be moved far ahead, many movements are involved.
ise-uiuc/Magicoder-OSS-Instruct-75K
echo -e "\n Buliding gene tree for $Title alignment including $NN sequences \n\n" echo -e "\n Run raxml-ng checking for alignment:\n$ALIGNMENT\n" raxml-ng --parse --msa $ALIGNMENT --model GTR+G --prefix ./${Title}/${Title}.check #getting specific model and threds memerical configuration Model=$(grep "Model:" ./${Title}/${Title}.check.raxml.log|cut -f2 -d' ') TT=$(grep "MPI processes" ./${Title}/${Title}.check.raxml.log|cut -f2 -d':') # Mem=$(grep "memory requirements" ./${Title}/${Title}.check.raxml.log|cut -f2 -d':'|sed 's/ //g;s/./\L&/g') Mem=$(grep "memory requirements" ./${Title}/${Title}.check.raxml.log|cut -f2 -d':'|sed 's/ MB//g;s/ GB//g')
ise-uiuc/Magicoder-OSS-Instruct-75K
# here's the cosine part. omegas_cos = 2.0 * np.pi * ms / (b - a) w = omegas_cos.reshape(-1, 1) m = omegas_cos.reshape(1, -1) # integral_a^b cos(w x) cos(m x) dx = (-m sin(a m) cos(a w)+w cos(a m) sin(a w)+m sin(b m) cos(b w)-w cos(b m) sin(b w))/(m^2-w^2) coscos = ( -m * tf.sin(low * m) * tf.cos(low * w) + w * tf.cos(low * m) * tf.sin(low * w) + m * tf.sin(up * m) * tf.cos(up * w) - w * tf.cos(up * m) * tf.sin(up * w) ) / (tf.square(m) - tf.square(w)) # integral_a^b cos^2(w x) dx = (2 w (b-a)-sin(2 a w)+sin(2 b w))/(4 w)
ise-uiuc/Magicoder-OSS-Instruct-75K
toggleRow(row) { this.selectedrow = row.id;
ise-uiuc/Magicoder-OSS-Instruct-75K
_base_ = ['../actnn/swin_tiny_224_b64x4_300e_imagenet.py'] actnn = False
ise-uiuc/Magicoder-OSS-Instruct-75K
python setup.py install gpuci_logger "Check Python version" python --version gpuci_logger "Check conda environment" conda info conda config --show-sources conda list --show-channel-urls
ise-uiuc/Magicoder-OSS-Instruct-75K
def test_sends_data_for_hidden_field(self): fake = FakeHttpClient() url = "http://yadda.dada" field_name = "taunt" value = "Your mother was a hamster"
ise-uiuc/Magicoder-OSS-Instruct-75K
expect(env.name).toStrictEqual(EnvironmentName.Preview) expect(env).toMatchSnapshot() }) it('should match Development', () => {
ise-uiuc/Magicoder-OSS-Instruct-75K
</a> </div> <?php } ?> </section> <?php } ?> </main> <?php require(__DIR__ . '/../partials/footer.php');?> </body> </html>
ise-uiuc/Magicoder-OSS-Instruct-75K
#endif } }
ise-uiuc/Magicoder-OSS-Instruct-75K
Filename from which to read input parameters """ initializer = Initializer(filename) print('Initializing') # initialize wrappers ll_wrapper, qmmm_wrapper = initializer.initialize_wrappers() if initializer.run_md is True: run_simulation(ll_wrapper, qmmm_wrapper)
ise-uiuc/Magicoder-OSS-Instruct-75K
];
ise-uiuc/Magicoder-OSS-Instruct-75K
dict_data = request.get_json(force=True) app.logger.debug(f"dict_data: {dict_data}") try: if dict_data["message"]["entities"][0]["type"] == "bot_command": app.logger.debug(f"Get Bot command request") self.bot_command.parse(dict_data["message"]) except KeyError: pass return "OK" app.add_url_rule("/hook", view_func=HookAPI.as_view("hook")) app.add_url_rule("/hitcon_zeroday_crawler", view_func=hitcon_zeroday.App.as_view("hitcon_zeroday_crawler"))
ise-uiuc/Magicoder-OSS-Instruct-75K
import com.linda.framework.rpc.net.RpcNetListener; import com.linda.framework.rpc.net.RpcOutputNofity; public abstract class AbstractRpcNioSelector implements Service,RpcOutputNofity,RpcNetExceptionHandler{ public abstract void register(RpcNioAcceptor acceptor); public abstract void unRegister(RpcNioAcceptor acceptor);
ise-uiuc/Magicoder-OSS-Instruct-75K
def to_code(config): rhs = App.init_web_server(config.get(CONF_PORT)) web_server = Pvariable(config[CONF_ID], rhs) if CONF_CSS_URL in config: add(web_server.set_css_url(config[CONF_CSS_URL])) if CONF_JS_URL in config:
ise-uiuc/Magicoder-OSS-Instruct-75K
<gh_stars>10-100
ise-uiuc/Magicoder-OSS-Instruct-75K
/// <summary> /// Specifies the publication in which the article appears /// </summary> [XmlRoot("url", Namespace = XmlNamespaces.News)]
ise-uiuc/Magicoder-OSS-Instruct-75K
response = requests.get(metadata_url) assert response.status_code == 200 metadata = response.content with open(target_dir / str(collection_id) / "collection_metadata.json", "w") as file: file.write(str(metadata)) # Download data data_url = format_neurovault_download_url(collection_id) response = requests.get(data_url) assert response.status_code == 200 data = response.content # Unzip images in the folder
ise-uiuc/Magicoder-OSS-Instruct-75K
#include <fcppt/unique_ptr_impl.hpp> #include <fcppt/log/context_reference_fwd.hpp> namespace sge::systems::impl::audio
ise-uiuc/Magicoder-OSS-Instruct-75K
['0.1.0-beta', true], ])('validates an app version: %s results %s', (appVersion: string, result: boolean) => { const versionRegex = new RegExp(`^${ManifestValidator.versionPattern}$`) expect(versionRegex.test(appVersion)).toBe(result) }) test.each([ ['x.1.0', false], ['0.1.x_beta', false], ['0.x', true], ['0.1.x', true], ['0.1.x-beta', true],
ise-uiuc/Magicoder-OSS-Instruct-75K
GetCodeItem(out var hierarchy, out _); foreach (var error in Output.Errors) { var errorTask = new ErrorTask { Category = TaskCategory.User, ErrorCategory = TaskErrorCategory.Error, HierarchyItem = hierarchy, Document = error.Filename ?? ItemPath, Line = error.Line - 1, Column = error.Column, Text = error.ErrorCode == null ? error.Message : $"{error.ErrorCode}: {error.Message}",
ise-uiuc/Magicoder-OSS-Instruct-75K
<?php namespace Convertio\Exceptions; use Exception; /** * APIException exception is thrown when a the Convertio API returns any HTTP error code
ise-uiuc/Magicoder-OSS-Instruct-75K
(ClipboardManager) mContext.getSystemService(Context.CLIPBOARD_SERVICE); clipboardManager.setText(text); } }
ise-uiuc/Magicoder-OSS-Instruct-75K
def yield_all(): for i in xrange(DIGIT_BASE ** TUPLE_SIZE): tup = tuple([int(x) for x in '%04d' % i]) assert len(tup) == TUPLE_SIZE for l in tup: if tup.count(l) != 1:
ise-uiuc/Magicoder-OSS-Instruct-75K
def get_new_objects(old_objects): all_objects = get_all_nodes() new_objects = [] for object in all_objects: if object not in old_objects: new_objects.append(object) return new_objects def exr_list_to_paths_list(exr_list):
ise-uiuc/Magicoder-OSS-Instruct-75K
public: ListNode* removeNthFromEnd(ListNode* head, int n) {
ise-uiuc/Magicoder-OSS-Instruct-75K
print("Found", len(pieces_with_emotion), "with emotion", discretize_emotion(emotion)) return pieces_with_emotion def get_rand_prefix_with_emotion(vgmidi, emotion, time_steps=4, time_step_token=1): # Load all pieces in the vgmidi dataset with the desired emotion
ise-uiuc/Magicoder-OSS-Instruct-75K
* The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
ise-uiuc/Magicoder-OSS-Instruct-75K
self.sku_p100d = models.Sku.objects.get(variant='P100D') self.sku_70 = models.Sku.objects.get(variant='70') self.owner_tyrell = models.Owner.objects.get() self.organization_ecorp = models.Organization.objects.get()
ise-uiuc/Magicoder-OSS-Instruct-75K
print("Updating repository \"" + name + "\"") # Change to the correct folder. ckan_folder_name = "CKAN-" + name ckan_folder_path = os.path.join(root_path, ckan_folder_name) if not os.path.exists(ckan_folder_path): return
ise-uiuc/Magicoder-OSS-Instruct-75K
############## config end ################# myEcho() { echo "[`date +"%F %T"`] $*" } if [ ! -e $GIT_DIR ] || [ ! -d $GIT_DIR ]; then myEcho "GIT directory is not exists, please check: $GIT_DIR" exit 0 fi
ise-uiuc/Magicoder-OSS-Instruct-75K
return response()->json([ 'message' => 'success', 'status' => true, 'data' => (object)[] ]); }catch (\Exception $exception){ return response()->json([ 'message' => $exception->getMessage(), 'status' => false, 'data' => (object)[]
ise-uiuc/Magicoder-OSS-Instruct-75K
def setUp(self): self.indir, self.workdir, self.outdir = setup_dirs(__file__) def tearDown(self): shutil.rmtree(self.workdir) shutil.rmtree(self.outdir) def test_iteration(self): with FastaParser(f'{self.indir}/test.fa') as parser:
ise-uiuc/Magicoder-OSS-Instruct-75K
complete_solution_set = collaborate(a1, p1, a2, p2, cls, fcls, k) expected_solution = [[[1], [3]], [[1], ['a']], [[2.5], ['a']], [[2.5], [3]]] self.assertEqual(complete_solution_set, expected_solution)
ise-uiuc/Magicoder-OSS-Instruct-75K
} double ss = 0.0; for (int i = 0; i < v1.size(); i++) { ss += (v1.at(i) - v2.at(i)) * (v1.at(i) - v2.at(i)); } return sqrt(ss); }
ise-uiuc/Magicoder-OSS-Instruct-75K
air::CliRecv* cli_recv = new air::CliRecv{cli_result, pid}; int num_cmd{0}; int target_pid{-1}; num_cmd = cli_send->Send(argc, argv, target_pid); if (0 < num_cmd)
ise-uiuc/Magicoder-OSS-Instruct-75K
use std::collections::HashMap; #[derive(Deserialize)] pub struct ItemConfig { pub system_items_initial_capacity: usize, pub system_barrels_initial_capacity: usize, pub physical_radius: f64, pub physical_density: f64, pub render_scale: f32, pub bloom_intensity: f32, pub light_elevation: f32, pub light_attenuation: (f32, f32, f32), pub item_type_light_color: HashMap<ItemType, (f32, f32, f32)>, pub skull_value: HashMap<SkullType, i64>,
ise-uiuc/Magicoder-OSS-Instruct-75K
__e0_size(1, 1), __ek_size(1, 1))); KERNEL_INFO kernelInfoConcat(FAST_NMS_K) ( FAST_NMS_KN,
ise-uiuc/Magicoder-OSS-Instruct-75K
'class' => 'form-horizontal mt-10', 'id'=>'create-prestadora-form', 'enableAjaxValidation' => true, 'data-pjax' => '', ]
ise-uiuc/Magicoder-OSS-Instruct-75K
assert not Solution().isThree(n=8) assert Solution().isThree(n=4) assert Solution().isThree(n=9) if __name__ == '__main__': test()
ise-uiuc/Magicoder-OSS-Instruct-75K
// the low bits of the input, offset by the current bit. // For example, when we're adding: // 0b00000000_00000000_00000000_00000011 // to // 0b01111111_11111111_11111111_11111111 // ^ currentBit (31) // We've already taken 1 bit off the end of the first number, // leaving an extra 1 bit that needs to be represented for the next // write. // Subtract the currentBit from 32 to get the number of bits
ise-uiuc/Magicoder-OSS-Instruct-75K
short_label_func = lambda data_item: '{}|{}|{}|{}|{}'.format(data_item['cell'], data_item['age'], data_item['sex'], data_item['treatment'], item_name) columns = ['lab', 'cell'] tracks = [] with open(metadata_path, 'r') as metadata: metadata_csv = csv.DictReader(metadata, delimiter='\t') # extract the experiment type items = [item for item in metadata_csv] ex_type = lambda item: item['dataType'] if item['dataType'] == 'DnaseSeq' else item['antibody'].split('_')[0] for data_item in items:
ise-uiuc/Magicoder-OSS-Instruct-75K
operations = [ migrations.AlterField( model_name='productvariant',
ise-uiuc/Magicoder-OSS-Instruct-75K
nums = sorted(tmp[1:]) # nlg(n) running time, as per Python Documentation sets = [] for i in nums: if not sets: sets.append([i]) else: for s in sets: if s[len(s) - 1] + distance < i:
ise-uiuc/Magicoder-OSS-Instruct-75K
import unittest from unittest.mock import patch, Mock import urllib.request import urllib.error import http.client import main # Pokemon Go in Brazil Test Suite # -------------------------------- # For the HTML Parser tests, unicode strings # are encoded to utf-8 in bytes, then passed into # the feed methods as string decoded into the system's
ise-uiuc/Magicoder-OSS-Instruct-75K
static func === (lhs: CollectionDataSynchronizer, rhs: UIView) -> Bool { return lhs.view === rhs } static func === (lhs: UIView, rhs: CollectionDataSynchronizer) -> Bool {
ise-uiuc/Magicoder-OSS-Instruct-75K
onChange() { return async (e: React.ChangeEvent<HTMLInputElement>) => { const name = e.target.name; if (e.target.type === "checkbox") this.setValue(name, e.target.checked); else this.setValue(name, e.target.value); }; } setValue(name: string, value: any) {
ise-uiuc/Magicoder-OSS-Instruct-75K
down_revision = 'django_0039' branch_labels = None depends_on = None
ise-uiuc/Magicoder-OSS-Instruct-75K
Icon.register({ 'brands/blackberry': { width: 512, height: 512, paths: [
ise-uiuc/Magicoder-OSS-Instruct-75K