seed
stringlengths
1
14k
source
stringclasses
2 values
pub mod place_model; pub mod router;
ise-uiuc/Magicoder-OSS-Instruct-75K
datadir: the directory where the metadata was written Returns:
ise-uiuc/Magicoder-OSS-Instruct-75K
""" return cellIdentifiersEnum(for: tableViewCellIdentifiers, named: "TableCell", blockIndent: blockIndent, topComment: topCopmment) } final func cvCellIdentifiersEnum(blockIndent: String = "") -> String { let topCopmment = """ \(blockIndent)// All UICollectionViewCell reuseIdentifiers, which were found in all storyboards \(blockIndent)// and xibs at the last time SBEnumerator ran and scanned the IB files\n """ return cellIdentifiersEnum(for: collectionViewCellIdentifiers, named: "CollectionCell", blockIndent: blockIndent, topComment: topCopmment) } final func aiCellIdentifiersEnum(blockIndent: String = "") -> String { let topCopmment = """
ise-uiuc/Magicoder-OSS-Instruct-75K
Process.__init__(self) BaseCrawl.__init__(self, id) self.url = m3u8_url self.path_url = self.__get_path_url() rstr = r"[\/\\\:\*\?\"\<\>\|]" # '/ \ : * ? " < > |' title = re.sub(rstr, "", title) self.title = "".join(title.split()).replace("!", "").replace("?", "") + ".mp4" def run(self): print("开始爬取:", self.title) m3u8_content = requests.get(self.url, headers=self.headers).text self.__parse_m3u8(m3u8_content)
ise-uiuc/Magicoder-OSS-Instruct-75K
id = Column(Integer, primary_key=True) email = Column(String) date = Column(String) def __init__(self, email, date): self.email = email self.date = date
ise-uiuc/Magicoder-OSS-Instruct-75K
return False return super(UserStateHelperCustom, self).is_update_necessary( existing_resource_dict ) class TagActionsHelperCustom: # overriding the perform_action method as bulk_delete tags operation does not support # get_resource method which is an integral part of the main perform_action method def perform_action(self, action): action_fn = self.get_action_fn(action)
ise-uiuc/Magicoder-OSS-Instruct-75K
String hashed = BCrypt.hashpw(args[0], BCrypt.gensalt(12)); System.out.println(hashed); } }
ise-uiuc/Magicoder-OSS-Instruct-75K
# By <NAME> # For 2015 Analysis of Algorithms class # Implemented top-down import math def mergeSort(a): if len(a) <= 1: return a # if length of the list is 1, it is sorted, and ready to be re-merged else: midpoint = len(a) / 2 left = mergeSort(a[:midpoint]) right = mergeSort(a[midpoint:])
ise-uiuc/Magicoder-OSS-Instruct-75K
}, }, }
ise-uiuc/Magicoder-OSS-Instruct-75K
export const structureReducer = createReducer< UserStructureState, UserStructureActions >(initialUserStructureState, { SET_USER_STRUCTURE: (_, action) => action.payload, });
ise-uiuc/Magicoder-OSS-Instruct-75K
# re-write the robots.txt file to not allow crawlers (echo "User-Agent: *" && echo "Disallow: /") > robots.txt echo "$(<robots.txt)"
ise-uiuc/Magicoder-OSS-Instruct-75K
return 0 return float(dataset[category][word])/no_of_items[category] # Weighted probability of a word for a category def weighted_prob(word,category): # basic probability of a word - calculated by calc_prob basic_prob=calc_prob(word,category) # total_no_of_appearances - in all the categories if word in feature_set: tot=sum(feature_set[word].values()) else: tot=0
ise-uiuc/Magicoder-OSS-Instruct-75K
def update_repo_state(self, value): if value['state'] == 'enabled': return 1 return 0 def __iter__(self): for attr, value in self.__dict__.items(): yield attr, value
ise-uiuc/Magicoder-OSS-Instruct-75K
import junit.framework.Assert; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.robolectric.RobolectricGradleTestRunner;
ise-uiuc/Magicoder-OSS-Instruct-75K
byte currentSpeed = CurrentSpeed; if (currentSpeed != 0x00) { properties.Add(DmiProperty.MemoryModule.CurrentSpeed, GetMemorySpeeds(currentSpeed)); } properties.Add(DmiProperty.MemoryModule.CurrentMemoryType, GetCurrentMemoryTypes(CurrentMemoryType)); properties.Add(DmiProperty.MemoryModule.InstalledSize, GetSize(InstalledSize)); properties.Add(DmiProperty.MemoryModule.EnabledSize, GetSize(EnabledSize)); properties.Add(DmiProperty.MemoryModule.ErrorStatus, GetErrorStatus(ErrorStatus)); #endregion } #endregion
ise-uiuc/Magicoder-OSS-Instruct-75K
private String id; private String name; private int rank; }
ise-uiuc/Magicoder-OSS-Instruct-75K
#limitations under the License. #************************************************************************* import os import subprocess import math import sys from collections import OrderedDict import utils def generate_command_args(tl_list,\
ise-uiuc/Magicoder-OSS-Instruct-75K
plant_recommendation('low') plant_recommendation('medium') plant_recommendation('high')
ise-uiuc/Magicoder-OSS-Instruct-75K
async def test_returns_the_response_on_success( self, request_fixture ): response = await exception_handler_middleware( request=request_fixture,
ise-uiuc/Magicoder-OSS-Instruct-75K
if (!window.angular) { throw new Error('window.angular is undefined. This could be either ' + 'because this is a non-angular page or because your test involves ' + 'client-side navigation, which can interfere with Protractor\'s ' + 'bootstrapping. See http://git.io/v4gXM for details'); } if (angular.getTestability) {
ise-uiuc/Magicoder-OSS-Instruct-75K
if item[key] == value: return item return default
ise-uiuc/Magicoder-OSS-Instruct-75K
</form> </section>
ise-uiuc/Magicoder-OSS-Instruct-75K
type=Colour, choices=(Colour.Blue, Colour.Red),
ise-uiuc/Magicoder-OSS-Instruct-75K
using UniRx; using UnityEngine.UI; public partial class UIProjectInfoPanel { private ModProject _project; private int _selectedEditorIndex; public ModProject Project { get => _project; set { _project = value; RefreshProjectInfo();
ise-uiuc/Magicoder-OSS-Instruct-75K
from selfdrive.config import Conversions as CV from cereal import car ButtonType = car.CarState.ButtonEvent.Type ButtonPrev = ButtonType.unknown
ise-uiuc/Magicoder-OSS-Instruct-75K
topology_reader: TopologyReader, connection_config: ConnectionConfig, // To listen for refresh requests refresh_channel: tokio::sync::mpsc::Receiver<RefreshRequest>, } #[derive(Debug)] struct RefreshRequest { response_chan: tokio::sync::oneshot::Sender<Result<(), QueryError>>, }
ise-uiuc/Magicoder-OSS-Instruct-75K
{ _service = TestServiceProvider.Current.GetRequiredService<IEmailService>(); } [Fact] public void SendAsyncTest() { Assert.ThrowsAsync<SocketException>(() =>
ise-uiuc/Magicoder-OSS-Instruct-75K
rospy.spin() if __name__ == "__main__": main()
ise-uiuc/Magicoder-OSS-Instruct-75K
return self._backup_index[date] else: return self._tree[date] def get(self, date): if self.empty: return self.default
ise-uiuc/Magicoder-OSS-Instruct-75K
b.Property<string>("Email") .HasColumnType("nvarchar(max)"); b.Property<string>("FirstName") .HasColumnType("nvarchar(max)"); b.Property<string>("LastName") .HasColumnType("nvarchar(max)"); b.HasKey("EnitityId"); b.ToTable("Accounts"); b.HasData(
ise-uiuc/Magicoder-OSS-Instruct-75K
{space}}} """
ise-uiuc/Magicoder-OSS-Instruct-75K
import XmlFile = require('nashorn/com/intellij/psi/xml/XmlFile'); import XmlBackedJSClass = require('nashorn/com/intellij/lang/javascript/psi/ecmal4/XmlBackedJSClass'); import XmlTag = require('nashorn/com/intellij/psi/xml/XmlTag'); declare class XmlBackedJSClassFactory extends Object { static instance : XmlBackedJSClassFactory; constructor(); static getInstance() : XmlBackedJSClassFactory; static getXmlBackedClass(arg1 : XmlFile) : XmlBackedJSClass; static getRootTag(arg1 : XmlFile) : XmlTag; getXmlBackedClass(arg1 : XmlTag) : XmlBackedJSClass;
ise-uiuc/Magicoder-OSS-Instruct-75K
diff = socks[0] left = socks[1]-socks[0] same = left//2 #output format s = str(diff) + ' ' + str(same) print(s)
ise-uiuc/Magicoder-OSS-Instruct-75K
clang meson perl pkgconf-pkg-config which ) dnf install -y "${PACKAGES[@]}"
ise-uiuc/Magicoder-OSS-Instruct-75K
use Algolia\AlgoliaSearch\Config\SearchConfig; use Algolia\AlgoliaSearch\Exceptions\NotFoundException; final class UpdateApiKeyResponse extends AbstractResponse { /** * @var \Algolia\AlgoliaSearch\SearchClient */ private $client;
ise-uiuc/Magicoder-OSS-Instruct-75K
help = "Run migration in docker container." def handle(self, *args, **options): super().handle(*args, **options) success, error = self.migrate(options) if not success: self._print(error, 'ERROR')
ise-uiuc/Magicoder-OSS-Instruct-75K
visited_nodes = set()
ise-uiuc/Magicoder-OSS-Instruct-75K
for i in range(len(nearest_neighbours)): if nearest_neighbours[i] not in labels: labels[nearest_neighbours[i]]=1 else: labels[nearest_neighbours[i]]=labels[nearest_neighbours[i]]+1 v=list(labels.values()) k=list(labels.keys()) return max(labels, key=labels.get)
ise-uiuc/Magicoder-OSS-Instruct-75K
Get the asset pages from the fofa, which search the given grammar. :param grammar: the search grammar :param size: the size of the page :return: the pages of the asset counts """ results = self._search(grammar, 1, 1) if not results: return 1 all_counts = results['size'] if all_counts >= 10000: logger.warning("Fofa's asset counts is {all_counts}, which is too much, so we only search the first 10000.") count = 10000 % size pages = 10000 // size if count == 0 else 10000 // size + 1 else:
ise-uiuc/Magicoder-OSS-Instruct-75K
var minimumDate: Date? // specify min/max date range. default is nil. When min > max, the values are ignored. Ignored in countdown timer mode var maximumDate: Date? // default is nil var minuteInterval: Int = 1 var date: Date = Date() var expandCollapseWhenSelectingRow = true var selectionStyle = UITableViewCell.SelectionStyle.default var titleFont: RFFont = RFPreferredFontForTextStyle.body var valueFont: RFFont = RFPreferredFontForTextStyle.body var valueDidChange: (Date) -> Void = { (date: Date) in RFLog("date \(date)") }
ise-uiuc/Magicoder-OSS-Instruct-75K
# tRRT_SEM_list.append(SEM_list[i]) # for i in range (12,24,4): # biRRT_cost_list.append(cost_list[i]) # biRRT_SEM_list.append(SEM_list[i]) # for i in range (14,24,4): # tbiRRT_cost_list.append(cost_list[i]) # tbiRRT_SEM_list.append(SEM_list[i]) # #Convert from list to tuple, type neccessaty to to the graphs
ise-uiuc/Magicoder-OSS-Instruct-75K
* @copyright 2010 - 2013 Fuel Development Team * @link http://fuelphp.com */ // determine the file we're loading, we need to strip the query string for that if (isset($_SERVER['SCRIPT_NAME']))
ise-uiuc/Magicoder-OSS-Instruct-75K
with open(jsonfile, 'w') as outfile: json.dump(sectionAnnos, outfile, indent=4)
ise-uiuc/Magicoder-OSS-Instruct-75K
public void preload() { // run the methods that will preload the data preloadEvalConfig();
ise-uiuc/Magicoder-OSS-Instruct-75K
#* Library General Public License for more details. #* #* You should have received a copy of the GNU Library General Public #* License along with this library; if not, write to the Free #* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #* ''' Created on Dec 3, 2009 ''' # standard library imports import string
ise-uiuc/Magicoder-OSS-Instruct-75K
import os AIRFLOW_HOME = os.environ.get('AIRFLOW_HOME')
ise-uiuc/Magicoder-OSS-Instruct-75K
from tqdm import tqdm from pm4py.objects.log.importer.xes import importer as xes_importer from pm4py.algo.discovery.inductive import algorithm as inductive_miner from pm4py.algo.discovery.heuristics import algorithm as heuristics_miner from pm4py.algo.discovery.alpha import algorithm as alpha_miner
ise-uiuc/Magicoder-OSS-Instruct-75K
if (_currentCommand != null) { throw new InvalidOperationException("already a command processing"); } _commandCompleteEvent.Reset(); ShellCommandCallback commandCallback = new ShellCommandCallback(_commandCompleteEvent);
ise-uiuc/Magicoder-OSS-Instruct-75K
import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Service; import java.util.concurrent.TimeUnit; /** * @ClassName WechatServiceImpl * @Description TODO * @Author dengcheng * @Date 2018/11/16 0016 下午 13:13 **/ @Service("wechatService") public class WechatServiceImpl implements IWechatService { @Autowired
ise-uiuc/Magicoder-OSS-Instruct-75K
<div class="dropdown dropdown-user"> <a href="#0" class="logged" data-toggle="dropdown p-3 m-5" title="Logged"> <img src="{{asset('storage/profil_pic/'.$user->photo)}}" alt="no photo"></a> <div class="dropdown-menu px-1 "> <ul> <li><a href="{{route('Profil')}}">Profile</a></li> <li><a href="{{route('Parametres')}}">Parametres de compte</a></li> <li><a href=" {{ route('logout')}} ">Déconnexion</a></li>
ise-uiuc/Magicoder-OSS-Instruct-75K
use Illuminate\Database\Eloquent\Model;
ise-uiuc/Magicoder-OSS-Instruct-75K
while node.children is not None: choice, node = self._choose_action(node) self.node_path.append(node) self.choice_path.append(choice) def run(self): """Choose the node sequence for this simulation.
ise-uiuc/Magicoder-OSS-Instruct-75K
# gct_file = 'all_aml_train.gct' # gct_file = 'all_aml_test.gct' # gct_file = '/Users/edjuaro/GoogleDrive/modules/download_from_gdc/src/demo.gct' # gct_file = 'https://datasets.genepattern.org/data/test_data/BRCA_minimal_60x19.gct' # gct_file = 'https://datasets.genepattern.org/data/test_data/BRCA_large_20783x40.gct' gct_file = 'https://datasets.genepattern.org/data/test_data/BRCA_minimal_60x19.gct' # gct_file = 'https://datasets.genepattern.org/data/test_data/BRCA_large_20783x40.gct' # func = 'euclidean' func = 'pearson' # func = 'manhattan' # func = 'uncentered_pearson'
ise-uiuc/Magicoder-OSS-Instruct-75K
print(B - N + A) else: print(0)
ise-uiuc/Magicoder-OSS-Instruct-75K
edges[3] = [4] graph = obg.GraphWithReversals(nodes, edges)
ise-uiuc/Magicoder-OSS-Instruct-75K
} private static int countChange(int n, int[] denominations, int x) { if(n <0 || x < 0 || x>= denominations.length) return 0; if (n == 0) return 1;
ise-uiuc/Magicoder-OSS-Instruct-75K
m_sortedHubPath = m_unsortedHubPath;
ise-uiuc/Magicoder-OSS-Instruct-75K
targetId = "Search"; } @Html.Commerce().Breadcrumb(targetId, clickStream, Model.Rendering) }
ise-uiuc/Magicoder-OSS-Instruct-75K
pi = math.pi fix_bit_pow = 65536 run = 1 res = fix_bit_pow * 3; while run: if res / fix_bit_pow > pi: print(res) break
ise-uiuc/Magicoder-OSS-Instruct-75K
$commodities = Commodity::all(); return $this->response->collection($commodities, new CommodityTransformer()); }
ise-uiuc/Magicoder-OSS-Instruct-75K
) self.semantics_graph.add_edge(new_u, new_v, weight=data["weight"]) self.nodes = list(self.semantics_graph.nodes) self.semantics_matrix = to_numpy_matrix(self.semantics_graph) def object_concept_embedding(self, concept: str) -> Any: # Get a numpy array weighted adjacency embedding of the concept from the graph
ise-uiuc/Magicoder-OSS-Instruct-75K
# candidateops = [candidateops] # to fix error where candidateops has unexpected format # for j in reversed(range(len(candidateops[0]))): # for each candidate op... (reversed to avoid e.g. 'OP10' -> 'candidatevalues(..., 0)0') # equation = equation.replace('OP' + str(j + 1), 'op_values[j]') # rc_values.append(eval(equation)) # commit_flag = 'False' # return 'False' if no beads are in bounds # for value in rc_values: # if rc_min <= value <= rc_max: # todo: this needs to be changed to the min and max of the given window that this thread is constrained to
ise-uiuc/Magicoder-OSS-Instruct-75K
return returnType; } if (op == BinOp.SHL_ASSIGN || op == BinOp.SHL || op == BinOp.SHR_ASSIGN || op == BinOp.SHR) { return getRandomScalarInteger(); } else { return leftOperandType; } } @Override public BasicType getAvailableTypeFromReturnType(BasicType returnType) { if (returnType.equals(BasicType.BOOL)) {
ise-uiuc/Magicoder-OSS-Instruct-75K
<div className="icon"> <IoIosSync /> </div> <h3>request-response</h3> <p>Clients can register functions to be called by other clients. deepstream will smartly route requests and responses. </p> </li> </ul> </Section> )
ise-uiuc/Magicoder-OSS-Instruct-75K
) for sdk_path ($sdk_path_candidates); do if [ -d $sdk_path ] ; then export ANDROID_SDK_PATH=$sdk_path export ANDROID_SDK_ROOT=$ANDROID_SDK_PATH
ise-uiuc/Magicoder-OSS-Instruct-75K
} return new Proxy(ds, { get: (target, prop, ...rest) => {
ise-uiuc/Magicoder-OSS-Instruct-75K
} }; } #[macro_export] macro_rules! pt_mdpt {
ise-uiuc/Magicoder-OSS-Instruct-75K
return self.authenticate_credentials(token) def authenticate_credentials(self, key): try: token = self.model.objects.get(key=key) except self.model.DoesNotExist: raise exceptions.AuthenticationFailed(_('Invalid token.')) return (None, token)
ise-uiuc/Magicoder-OSS-Instruct-75K
import { Service } from 'typedi' import id from '../id'
ise-uiuc/Magicoder-OSS-Instruct-75K
namespace XF.ChartLibrary.Animation { }
ise-uiuc/Magicoder-OSS-Instruct-75K
// Called as the scene transitions from the foreground to the background. // Use this method to save data, release shared resources, and store enough scene-specific state information // to restore the scene back to its current state. }
ise-uiuc/Magicoder-OSS-Instruct-75K
double a = PI / 10; REQUIRE_NEAR(a / 4, slerp(0, a, 0.25), 1e-15); REQUIRE_NEAR(a - a / 4, slerp(a, 0, 0.25), 1e-15); REQUIRE_NEAR(PI - a / 2, slerp(PI - a, PI + a, 0.25), 1e-15); REQUIRE_NEAR(PI + a / 2, slerp(PI + a, PI - a, 0.25), 1e-15); }
ise-uiuc/Magicoder-OSS-Instruct-75K
{ description: 'run unit tests with jest', usage: 'bre test:unit [options] <regexForTestFiles>', options: { '--watch': 'run tests in watch mode', }, details: `All jest command line options are supported.\n` + `See https://facebook.github.io/jest/docs/en/cli.html for more details.`, }, async args => { // 过滤掉无用参数 delete args._; await bootJest(jestConfig, args);
ise-uiuc/Magicoder-OSS-Instruct-75K
return new LoggerConfig(ini, loggerType, verbosity, filePath); }
ise-uiuc/Magicoder-OSS-Instruct-75K
a.load(SeqCst) } pub fn main() { println!("{:?}", crux_test());
ise-uiuc/Magicoder-OSS-Instruct-75K
def is_recording(self): return self.Recording > 0 def length(self): return (self.LengthHigh << 7) | self.LengthLow
ise-uiuc/Magicoder-OSS-Instruct-75K
import Foundation import NIO final class PacketDecoder: ByteToMessageDecoder { typealias InboundOut = Packet func decode(context: ChannelHandlerContext, buffer: inout ByteBuffer) throws -> DecodingState { Logger.log("PacketDecoder received decode(context:buffer:)") Logger.log("readableBytes: \(buffer.readableBytes)") // Need enough bytes for the fixed header and possible remaining length. guard buffer.readableBytes >= 2 else { return .needMoreData } let saved = buffer
ise-uiuc/Magicoder-OSS-Instruct-75K
# Initialize Rollbar SDK with your server-side ACCESS_TOKEN rollbar.init( 'ACCESS_TOKEN', environment='staging', handler='async', # For asynchronous reporting use: default, async or httpx ) # Set root logger to log DEBUG and above logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) # Report ERROR and above to Rollbar rollbar_handler = RollbarHandler()
ise-uiuc/Magicoder-OSS-Instruct-75K
// // TreatmentManager.swift // Split // // Created by Javier L. Avrudsky on 05/07/2019. // Copyright © 2019 Split. All rights reserved. // import Foundation
ise-uiuc/Magicoder-OSS-Instruct-75K
public String getFullname() { return fullname; } public void setFullname(String fullname) { this.fullname = fullname; } @Override public String toString() { return "HireEmployeeResponse [identity=" + identity + ", fullname=" + fullname + "]";
ise-uiuc/Magicoder-OSS-Instruct-75K
foreach (char c in Input.inputString) {
ise-uiuc/Magicoder-OSS-Instruct-75K
using skadiprices.csgofast.Factories; using skadiprices.csgofast.Interfaces; namespace skadiprices.csgofast { /// <summary> /// Class to contact the csgofast pricing api. /// </summary> public static class SkadiCsGoFast {
ise-uiuc/Magicoder-OSS-Instruct-75K
text: 'Recommendations', url: '', }, ];
ise-uiuc/Magicoder-OSS-Instruct-75K
mod library;
ise-uiuc/Magicoder-OSS-Instruct-75K
<ul class="categories_mega_menu"> @foreach ($childs as $child) <li class="menu_item_children"><a href="#">{{ $child->name }}</a></li> @endforeach </ul>
ise-uiuc/Magicoder-OSS-Instruct-75K
self.assertResponse('expand http://x0.no/a53s', self.sfUrl) self.assertResponse('expand http://x0.no/a53s', self.sfUrl) self.assertResponse('expand http://x0.no/0l2k', self.udUrl)
ise-uiuc/Magicoder-OSS-Instruct-75K
# Arrays to store object points and image points from all the images. objpoints = [] # 3d point in real world space imgpoints = [] # 2d points in image plane. gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) # Find the chess board corners ret, corners = cv2.findChessboardCornersSB(gray, (rows,cols))
ise-uiuc/Magicoder-OSS-Instruct-75K
import sqlalchemy as sa from sqlalchemy.orm import relationship from godmode.database import database
ise-uiuc/Magicoder-OSS-Instruct-75K
await db.SaveChangesAsync(); return RedirectToAction("Index");
ise-uiuc/Magicoder-OSS-Instruct-75K
function its_display_route_is_mutable() { $this->setDisplayRoute('display_route'); $this->getDisplayRoute()->shouldReturn('display_route');
ise-uiuc/Magicoder-OSS-Instruct-75K
func provideContent(completion: (_ conent: Content) -> Void) { completion(content) } }
ise-uiuc/Magicoder-OSS-Instruct-75K
} } template<class Allocator> class Stack { Allocator mAllocator; uint32_t mSize, mCapacity;
ise-uiuc/Magicoder-OSS-Instruct-75K
@pytest.mark.parametrize("backend", ["loky", "multiprocessing", "threading"]) def test_SGDClassifier_fit_for_all_backends(backend): # This is a non-regression smoke test. In the multi-class case, # SGDClassifier.fit fits each class in a one-versus-all fashion using
ise-uiuc/Magicoder-OSS-Instruct-75K
} public void setFieldName(String fieldName) { this.fieldName = fieldName; } public Object getValue() { return value; }
ise-uiuc/Magicoder-OSS-Instruct-75K
println!("- Now type your weight in kilograms: "); let weight_string = iterator.next().unwrap().unwrap(); let weight = weight_string.parse::<f64>().unwrap(); println!("Weight: {}", weight); let bmi = calculate(height / 100.0, weight); let classification = get_classification_by_bmi(bmi); println!("Your BMI is: {:.2}", bmi); println!("Your current classification is: {:?}", classification); }
ise-uiuc/Magicoder-OSS-Instruct-75K
<reponame>webitproff/freelance-scripts <?php /** * projects module * * @package projects
ise-uiuc/Magicoder-OSS-Instruct-75K
const withSass = require("@zeit/next-sass") config = compose( withTypescript, withSass )() } module.exports = config
ise-uiuc/Magicoder-OSS-Instruct-75K
geomr="$(awk '/HEAT OF FORMATION/{natom=0};{if(NF==4) {++natom;line[natom]=$0} };END{i=1;while(i<=natom){print line[i];i++}}' $tsdirll/IRC/$ircnr)" else ets=$(awk '/Energy=/{e0=$2};END{printf "%10.2f\n",e0*627.51}' $tsdirll/${name}.out ) deltar=$(awk 'BEGIN{act=0};/DVV/{if($NF=="1") act=1};{if(act==1 && NF==6) delta=$2};{if(act==1 && NF==0) {print delta;exit}};{if(act==1 && $2=="QCORE") {print delta;exit}}' $tsdirll/IRC/${name}_ircr.out) er=$(echo "$ets + $deltar" | bc -l) geomr="$(awk 'NR>2' $tsdirll/IRC/${name}_reverse_last.xyz)" fi
ise-uiuc/Magicoder-OSS-Instruct-75K
self.addConstraint(NSLayoutConstraint(item: v, attribute: .height, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 1.0, constant: h)) } self.setNeedsDisplay() self.setNeedsUpdateConstraints() self.setNeedsLayout() } func pinViewToBottom(_ v: UIView, withHeight height: CGFloat?) { self.pinViewToBottom(v, withBottomDistance: 0, withHeight: height) } func pinViewToBottom(_ v: UIView) { self.pinViewToBottom(v, withBottomDistance: 0, withHeight: nil)
ise-uiuc/Magicoder-OSS-Instruct-75K
for filename in filenames:
ise-uiuc/Magicoder-OSS-Instruct-75K