seed stringlengths 1 14k | source stringclasses 2
values |
|---|---|
# Sound format
(SOUND_FORMAT_PCM_PLATFORM_ENDIAN,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
'scheme_velocity': LA,
'schemes': [
{
'velocities': [1, 2, 3, 4],
'conserved_moments': U,
'polynomials': [1, X, Y, X**2-Y**2],
'relaxation_parameters': [0, S_1, S_1, S_2],
| ise-uiuc/Magicoder-OSS-Instruct-75K |
path('rewind',apis.rewind),
path('like-me',apis.like_me),
] | ise-uiuc/Magicoder-OSS-Instruct-75K |
thread::sleep_ms(5);
pbar.reach_percent(i);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.members = group.members
self.isPublic = group.isPublic
self.groupId = group.id
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{"category": "History", "type": "boolean", "difficulty": "medium",
"question": "<NAME> was the first U.S. President to be born outside the borders of the thirteen original states. ",
"correct_answer": "True", "incorrect_answers": ["False"]},
{"category": "History", "type": "boolean", "difficulty": "medium",
"question": "United States President <NAME> was the first president to appoint a woman to the Supreme Court. ",
"correct_answer": "True", "incorrect_answers": ["False"]},
| ise-uiuc/Magicoder-OSS-Instruct-75K |
lines.extend(['\n', 'structure S:V{'])
lines.extend(__indent(structure_strings))
lines.extend(['', '\t // INSERT INPUT HERE', '}'])
# main
lines.extend(['\n', 'procedure main(){', 'stdoptions.nbmodels=200', 'printmodels(modelexpand(T,S))', '}'])
with open(file_name, 'w') as text_file:
print('\n'.join(lines), file=text_file)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
note(f"cos θ: {cos_t}")
note(f"algebraic: {x * y}")
note(f"geometric: {geometric}")
assert isclose(x * y, geometric, rel_to=(x, y), rel_exp=2)
@given(x=vectors(), y=vectors())
def test_dot_rmul(x: Vector, y: Vector):
for x_like in vector_likes(x):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
for query in self.queries:
query.fields = fields
def make(
*args: Any, **kwargs: Any
) -> BaseQuery[HashEntity, HashData, FallbackKey]:
if kwargs.get('many') or kwargs.get('many_key_parts'):
return HashQueryMany(*args, **kwargs)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
export function FeaturedContentToFormValues(entity?: FeaturedContentType): FeaturedContentFormValues {
return {
topVideo: entity && entity.topVideo?.id || 0,
featuredVideos: entity && entity.featuredVideos?.map(x => x.id) || [],
featuredAlbums: entity && entity.featuredAlbums?.map(x => x.id) || []
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@version1.route("/party/<int:id>", methods=['GET'])
def get_specific_party(id):
"""this gets a specific party using id"""
for party in parties:
if id == party['id']:
return Responses.complete_response(party), 200
return Responses.not_found("Party not found"), 404
| ise-uiuc/Magicoder-OSS-Instruct-75K |
proxies = get_proxies()
print(proxies)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
with open("lambda-handler.py", encoding="utf8") as fp:
handler_code = fp.read()
lambdaFn = lambda_.Function(
self,
"Singleton",
code=lambda_.InlineCode(handler_code),
handler="index.lambda_handler",
timeout=core.Duration.seconds(300),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
state_dict = torch.load(args.pretrained, map_location=device)['state_dict']
cli._helpers.load_from_state_dict(model, state_dict)
else:
print('No checkpoint was specified, weights will be initialized randomly')
# initialize classifier
classifier = Classifier(
model,
input_dim=args.input_dim,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
enhancers: Enhanced[];
private enhancedEnum: EnhancedEnum<Enhanced>;
constructor(enhancedEnum: EnhancedEnum<Enhanced>) {
this.enhancedEnum = enhancedEnum;
this.enhancers = Object.values(enhancedEnum);
}
public get(enumKey: E): Enhanced {
const enhanced: Enhanced = this.enhancedEnum[`${enumKey}`];
| ise-uiuc/Magicoder-OSS-Instruct-75K |
to_test = 3
prime_count = 1
while prime_count <= n:
if is_prime(to_test):
prime_count += 1
if prime_count == n:
return to_test
to_test += 2
def prime_generator() -> Iterator[int]:
""" Returns an iterable of ints with each next element being the next prime number. """
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#else
#error Unsupported IMU
#endif
| ise-uiuc/Magicoder-OSS-Instruct-75K |
job_name: Optional[str] = None,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import os
# update default secret key if provided
from_env_secret_key = os.environ.get('SECRET_KEY', None)
if from_env_secret_key is not None:
SECRET_KEY = from_env_secret_key
DEBUG = False
STATICFILES_DIRS = [
os.path.join(BASE_DIR, '../project-static/') # project statics
]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class TileGridViewController: UIViewController {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
print(sorted(nums)) | ise-uiuc/Magicoder-OSS-Instruct-75K |
std::lock_guard<std::mutex> guard(m_rx_mutex);
return m_rx_buff.size();
}
uint8_t LegoI2C::read() {
std::lock_guard<std::mutex> guard(m_rx_mutex);
if (m_rx_buff.empty())
| ise-uiuc/Magicoder-OSS-Instruct-75K |
vk = 6
pl = 7
hu = 8
nl = 9
ro = 10
id = 11
de = 12
e2 = 13
ar = 14
ph = 15
lt = 16
jp = 17
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
return $objects;
}
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
def fxp(number, fractionalBits):
"""
Returns a fixed point representation of a floating point number
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{!! Form::submit('Aceptar',['class'=>'ui fluid large blue submit button']) !!}
</div>
<div class="ui error message"></div>
{!! Form::close() !!}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# appends missing naics levels to df
for i in range(length, 6):
sector_merge = 'NAICS_' + str(i)
sector_add = 'NAICS_' + str(i+1)
# subset the df by naics length
cw = cw_load[[sector_merge, sector_add]]
# only keep the rows where there is only one value in sector_add for a value in sector_merge
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Parameters
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import nfc
import nfc.ndef
import ndef
def connected(tag):
print "on card: ", tag.ndef.message.pretty() if tag.ndef else "sorry no NDEF"
for record in tag.ndef.records:
print(record)
return False
if __name__ == "__main__":
with nfc.ContactlessFrontend("tty:S0:pn532") as clf:
print clf
clf.connect(rdwr={"on-connect": connected})
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def test_recall():
y_true = {1: [1, 2], 2: [1, 2]}
y_pred = {1: [1, 3], 2: [0, 0]}
assert recall(y_true, y_pred, 2) == 0.25
def test_mrr():
y_true = {1: [1, 2], 2: [1, 2]}
y_pred = {1: [1, 3], 2: [0, 1]}
assert mrr(y_true, y_pred, 2) == 0.75
def test_map():
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@Test
public void testRecipeConfigLoads() {
assertNotNull(recipes);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"""
return pulumi.get(self, "value")
| ise-uiuc/Magicoder-OSS-Instruct-75K |
} catch (ModelNotFoundException $e) {
return abort(404);
}
}
public function update(Request $request, $id)
{
try {
$sport = Sport::query()->findOrFail($id);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# - CVE-2013-2561
#
# More details:
# - https://www.cyberwatch.fr/vulnerabilites
#
# Licence: Released under The MIT License (MIT), See LICENSE FILE
sudo yum install ibutils.i686-1.5.7 -y
sudo yum install ibutils-devel.i686-1.5.7 -y
sudo yum install ibutils-libs.i686-1.5.7 -y
sudo yum install libibverbs.i686-1.1.7 -y
| ise-uiuc/Magicoder-OSS-Instruct-75K |
using CheckResultConsumerFn = std::function<void (CheckSeverity, const LDDocument&)>;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import Fluent
| ise-uiuc/Magicoder-OSS-Instruct-75K |
new_df.reset_index(drop=True, inplace=True)
return new_df
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def bind(self, hostname, port):
self.__socket.bind((hostname, port))
def connect(self, address, port):
self.__socket.connect((address, port))
def listen(self, num_connections):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
/**
Initializes a coordinate pair based on the given GeoJSON point object.
*/
internal init(geoJSON point: JSONDictionary) {
assert(point["type"] as? String == "Point")
self.init(geoJSON: point["coordinates"] as! [Double])
}
internal static func coordinates(geoJSON lineString: JSONDictionary) -> [CLLocationCoordinate2D] {
let type = lineString["type"] as? String
assert(type == "LineString" || type == "Point")
let coordinates = lineString["coordinates"] as! [[Double]]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Schema::drop('country');
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
request = RequestFactory().post('/')
def test_should_throttle(self):
if not self.resource:
return
with patch.object(self.resource._meta, 'throttle') as throttle:
throttle.should_be_throttled.return_value = True
with self.assertImmediate(HttpTooManyRequests):
self.resource.throttle_check(self.request)
def test_shouldnt_throttle(self):
with patch.object(self, 'resource') as resource:
resource._meta.throttle.should_be_throttled.return_value = False
| ise-uiuc/Magicoder-OSS-Instruct-75K |
nb-card {
transform: translate3d(0, 0, 0);
}
`],
})
export class CarritoComponent implements OnInit{
private source=[];
settings = {
actions: {
add: false,
edit:false,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
case processing = "Processing"
case complete = "Complete"
case canceled = "Canceled"
case error = "Error"
}
public var status: Status?
public var operationId: String?
public var result: WfmBulkShiftTradeStateUpdateNotificationTopicBulkShiftTradeStateUpdateResultListing?
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#Calculate_capacity
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@isAuthorized()
@commands.cooldown(2, 10, commands.BucketType.guild)
async def choose(self, ctx, *, choices : str ):
"""Chooses between multiple choices.
Use quotes if one of your choices contains spaces.
Example: $choose I'm Alice ; Bob"""
try:
possible = choices.split(";")
if len(possible) < 2: raise Exception()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
fn neg(self) -> Self {
Self {
x: -self.x,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
PCMAudio::Wave *wav = new PCMAudio::Wave(bufferA, bufferALength);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/** Highlight for an area of the file. */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DataRange {
/** offset where the range starts. */
private int start;
/** size in bytes of the data range. */
private int size;
/** Returns the offset which is *not* part of the range anymore. */
| ise-uiuc/Magicoder-OSS-Instruct-75K |
0.)
def sigmoid(t, offset):
return 1. / (1. + math.exp(-8. * (t - offset)))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
dd = np.vstack([dx, dy]).T
X.append(dd)
y += [j - 1] * int(mvt[j - 1])
return np.vstack(X), np.array(y).astype(int)
def load_mnist(
n_samples=60000,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class TagAdmin(admin.ModelAdmin):
readonly = ['slug']
admin.site.register(Tag, TagAdmin)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
url = urljoin(URL, result.xpath('.//a[@title]/@href')[0])
title = extract_text(result.xpath('.//a[@title]'))
content = extract_text(result.xpath('.//div[@class="files"]'))
files_data = extract_text(result.xpath('.//div[@class="tail"]')).split()
filesize = get_torrent_size(files_data[FILESIZE], files_data[FILESIZE_MULTIPLIER])
magnetlink = result.xpath('.//div[@class="tail"]//a[@class="title"]/@href')[0]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
```
import tests.common
from in_toto.in_toto_run import main as in_toto_run_main
class TestInTotoRunTool(tests.common.CliTestCase):
cli_main_func = staticmethod(in_toto_run_main)
...
```
"""
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def sub(a, b):
"""Substract two numbers"""
return a - b
def add(a, b):
"""Add two numbers"""
return a + b
def mult(a, b):
"""Product of two numbers"""
| ise-uiuc/Magicoder-OSS-Instruct-75K |
[PreserveSig]
HRESULT SetApplicationCertificate(/* [annotation][in] _In_reads_bytes_(cbBlob) */ [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] byte[] pbBlob, /* [annotation][in] _In_ */ int cbBlob);
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
TimePanel('time_from'),
TimePanel('time_to'),
FieldPanel('tz'),
] + EventBase.content_panels1
# Anything inheriting from models.Model needs its own __init__ or
# modeltranslation patch_constructor may break it
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
@property
| ise-uiuc/Magicoder-OSS-Instruct-75K |
* When a payment is submitted to a Financial Institution, the Financial Institution is required to validate the payment details when accepting it. This API validates the payment details for the Settlement Date specified in a request. This API provides functionality to perform BPAY payment validation before payment is submitted. * This validation result is correct as at the time of calling the API Service. * The Validate BPAY Payment API does not result in a payment being submitted to BPAY for processing. The Payment Instruction must be submitted to your financial institution (or BPAY if you are a Scheme Member) before cut-off on the same Business Banking Day as the Settlement date specified in a request. * A maximum of 200 payment records may be included in a request.
*
* OpenAPI spec version: 1.0.0
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from weibo.watchyou import fetch_replies
for r in fetch_replies(): # fetch_replies所依赖的weibo全局变量是在watchyou模块中存在的, 函数无法访问到这个模块中的全局变量
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/**
* @author nickle
* @description:
* @date 2019/5/8 10:17
*/
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public class ChannelRuleService : BotServiceBase
{
private DiscordSocketClient _discord;
private List<ChannelRuleset> _rulesets;
private Timer _triggerInterval;
private IJobScheduler _jobScheduler;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from django.apps import AppConfig
class DjangoPathConfig(AppConfig):
name = 'django_class'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
time::{Duration, Instant},
},
};
macro_rules! assert_closed {
($x:expr) => {
match $x {
ProtocolState::Closed(_) => {}
state => panic!("State was {:?}, expected Closed", state),
}
};
}
macro_rules! assert_req_sent {
($x:expr) => {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
EXTENSION_MAP = {
'flac': 'flac',
'alac': 'm4a',
'aac' : 'm4a',
'mp3' : 'mp3',
'ogg' : 'ogg',
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
export class FrameworkService {
constructor(
@InjectRepository(FrameworkEntity)
private readonly frameworkRepository: Repository<FrameworkEntity>,
) {}
async findAll() {
return await this.frameworkRepository.find()
}
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
<form method="post">
<input name='q'>
<input type="submit">
</form>
"""
class Handler(BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(200)
self.send_header('Content-Type', 'text/html')
self.end_headers()
if self.path.endswith('/'):
self.wfile.write(form.encode())
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import Foundation
import XCTest
extension XCUIElement {
public func tapOnceVisible(testCase: XCTestCase,
file: String = #file, line: UInt = #line) {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
help = 'Installs / Updates growth rst file(s) in the database.'
def handle(self, **options):
self.using = options['database']
| ise-uiuc/Magicoder-OSS-Instruct-75K |
let mut ret = vec![];
let mut aux = Constraint::new();
| ise-uiuc/Magicoder-OSS-Instruct-75K |
available_devices = ext.get_devices()
print(available_devices)
ext.device_synchronize(available_devices[0])
ext.clear_memory_cache()
'''
import importlib
try:
return importlib.import_module('.' + ext_name, 'nnabla_ext')
except ImportError as e:
from nnabla import logger
logger.error('Extension `{}` does not exist.'.format(ext_name))
raise e
| ise-uiuc/Magicoder-OSS-Instruct-75K |
ontologies = ['ontocompchem', 'ontokin', 'wiki']
def process_puncutation(string):
# Load the regular expression library
# Remove punctuation
string_temp = re.sub('[-\n,.!?()\[\]0-9]', '', string)
# Convert the titles to lowercase
string_temp = string_temp.lower()
# Print out the first rows of papers
| ise-uiuc/Magicoder-OSS-Instruct-75K |
namespace Fjord.XRInteraction.XRUnityEvents
{
[System.Serializable]
public class XRButtonDatumUnityEvent : UnityEvent<XRButtonDatum>
{ }
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
public enum EyeType
{
/** False eye always have the potential to become no eyes */
FalseEye(0) {
@Override
public EyeInformation getInformation(String name) { return new FalseEyeInformation(); }
},
E1(1) {
@Override
public EyeInformation getInformation(String name) { return new E1Information(); }
},
E2(2) {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.end_headers()
# get current price.
latestPrice = get_live_price(ticker)
# todayDateStr = datetime.today().strftime('%d-%m-%Y')
expirationDate = datetime.strptime(expirationDateStr, '%m-%d-%Y')
options_chain = ops.get_options_chain(ticker, expirationDateStr)
df = options_chain["puts"]
# build offset and percentage columns
df["Offset"] = round(
(df["Strike"] - latestPrice) / latestPrice * 100, 0)
df["Percentage"] = round(df["Last Price"] / df["Strike"] * 100, 2)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
mic.deinit()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
import os
import sys
import hysds_commons.linux_utils
def get_container_host_ip():
| ise-uiuc/Magicoder-OSS-Instruct-75K |
image_height=config.IMG_HEIGHT,
image_width=config.IMG_WIDTH,
mean=config.MODEL_MEAN,
std=config.MODEL_STD,
)
train_loader = DataLoader(
train_dataset, batch_size=config.TRAIN_BATCH_SIZE, shuffle=True
)
valid_dataset = BengaliDatasetTrain(
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return this
},
}
}, {})
export default commands
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
Log.debug("Generating \(colorName(color)) solid color image")
guard let topImage = createSolidImage(color: color, width: screen.size.width, height: screen.menuBarHeight) else {
return nil
}
return combineImages(baseImage: resizedWallpaper, addedImage: topImage)
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
characters, UTF-8 is assumed per RFC 3986.
"""
decoded_uri = encoded_uri
# Add spaces.
if '+' in decoded_uri:
decoded_uri = decoded_uri.replace('+', ' ')
# If not encoding return..
if '%' not in decoded_uri:
return decoded_uri
# by encoding to UTF-8 we encode non-ASCII to characters.
decoded_uri = decoded_uri.encode('utf-8')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if (step % 100) == 0:
results.append(dict(
**coeff_features(current_instance),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/// Create a new `StateBuilder` for the given equation of state.
pub fn new(eos: &Rc<E>) -> Self {
StateBuilder {
eos: eos.clone(),
temperature: None,
volume: None,
density: None,
partial_density: None,
total_moles: None,
moles: None,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
assert view_id == '0400'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self._load_data(
self._entity_type,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
export MONGO_DBNAME=DB
export MONGO_URL=localhost
| ise-uiuc/Magicoder-OSS-Instruct-75K |
HospitalService
]
})
| ise-uiuc/Magicoder-OSS-Instruct-75K |
CreateFuseTpuCompileAndExecutePass() {
return std::make_unique<FuseTpuCompileAndExecutePass>();
}
static mlir::PassRegistration<FuseTpuCompileAndExecutePass>
fuse_tpu_compile_and_execute_ops_pass;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
private var header: UIView?
private let amount = UILabel(font: .customMedium(size: 26.0), color: .darkText)
private let body = UILabel.wrapping(font: .customBody(size: 13.0), color: .darkText)
init(walletManager: WalletManager, store: Store) {
self.walletManager = walletManager
self.store = store
super.init(nibName: nil, bundle: nil)
}
override func viewDidLoad() {
if limits.contains(walletManager.spendingLimit) {
selectedLimit = walletManager.spendingLimit
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
let allOwnerRobs = await store
.getState()
.blockchain.robToken?.methods.getOwnerRobs(account)
.call();
dispatch(
fetchDataSuccess({
allRobs,
allOwnerRobs,
})
);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
struct Apply3 {
inline void operator()(Vec& vec, const Vec2& vec2, const Vec3& vec3) const {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
net.sf.jasperreports.charts.fill.JRFillAreaPlot
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"compiling the model once per process")
else:
os.makedirs(cache, exist_ok=True)
assert os.access(cache, os.W_OK), (f"Cache folder {cache}"
" is not writable")
filename = os.path.join(
cache, "%s.lock" %
hashlib.md5(repr(model).encode("utf-8")).hexdigest())
| ise-uiuc/Magicoder-OSS-Instruct-75K |
i += 1
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def test_non_empty(self):
# A request to a non-empty `GET /assets` endpoint
self.install_fixtures(['satellite1'])
rv = self.get_response('/assets')
# receives expected assets
self.assertEqual(rv.status_code, 200)
self.assertEqual(rv.json, [{
'name': 'satellite1',
'type': 'satellite',
'class': 'dove'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from office365.sharepoint.base_entity_collection import BaseEntityCollection
from office365.sharepoint.logger.logFileInfo import LogFileInfo
| ise-uiuc/Magicoder-OSS-Instruct-75K |
$input = ['apple', 'banana', 'orange', 'raspberry'];
$sum = reduce_left(filter(map($input, function($fruit) {
return strlen($fruit);
}), function($length) {
return $length > 5;
}), function($val, $i, $col, $reduction) {
return $val + $reduction;
});
printf("sum: %d\n", $sum); | ise-uiuc/Magicoder-OSS-Instruct-75K |
class Test_abbr_role(unittest.TestCase):
def call_it(self, text):
from pelican.rstdirectives import abbr_role
rawtext = text
| ise-uiuc/Magicoder-OSS-Instruct-75K |
p("Baseline %s positives from %s overall = %1.1f%%" %
(sum(a for a in y_test), len(y_test), 100*sum(a for a in y_test)/len(y_test)))
p("#"*72)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
min_df=min_count,
)
vec = vectorizer.fit_transform(sents)
vocab_idx = vectorizer.vocabulary_
idx_vocab = {idx: vocab for vocab, idx in vocab_idx.items()}
return vec, vocab_idx, idx_vocab
def similarity_matrix(x, min_sim=0.3, min_length=1):
# binary csr_matrix
numerators = (x > 0) * 1
#문장간 유사도 계산, 문장간 유사도가 0.3이하면 간선 연결하지 않음.
min_length = 1
denominators = np.asarray(x.sum(axis=1))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return img
| 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.