[Gem-web][gem-web] is a tool that capable of providing an interface that allows opening documentation, source code, and website of a ruby gem. My goal on GSoC was integrating it on RubyGems' CLI, which would make this feature available out of the box to all ruby users, improving their productivity, since there would have no need to search this information manually.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch as th | |
""" | |
Author: Josue N Rivera (github.com/wzjoriv) | |
Date: 7/3/2021 | |
Description: Snippet of various clustering implementations only using PyTorch | |
Full project repository: https://github.com/wzjoriv/Lign (A graph deep learning framework that works alongside PyTorch) | |
""" | |
def random_sample(tensor, k): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Taken from https://www.gadgetdaily.xyz/create-a-cool-sliding-and-scrollable-mobile-menu/ | |
# | |
# Convert value returned from Linux event device ("evdev") to a HID code. This | |
# is reverse of what's actually hardcoded in the kernel. | |
# | |
# Lubomir Rintel <[email protected]> | |
# License: GPL | |
# | |
# Ported to a Python module by Liam Fraser. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const trad = require('node-tradfri-client'); | |
const TradfriClient = trad.TradfriClient; | |
const psk = "the psk stored in the QR code on bottom of GW"; | |
const ip = "IP address of GW"; // you find this with avahi | |
const client = new TradfriClient(ip); | |
//console.log(client); | |
client.authenticate(psk).then( (creds) => { |
To have Bundler report anonymous usage metrics over HTTP to rubygems.org when a heavy command is run (to avoid deteriorating the runtime), and to have a backend API endpoint in rubygems.org to instrument it.
Basically, yes. The actual implementation changed a little bit, and we decided to only instrument the low cardinality metrics using Datadog, as the free Datadog version limits value cardinality and wouldn't work with, for example, time related metrics.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for a in $(ls -1 access* | sort -t. -k3,3nr) | |
do | |
cat "$a" >> combined_access.log | |
done | |
for e in $(ls -1 error* | sort -t. -k3,3nr) | |
do | |
cat "$e" >> combined_error.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyspark.sql.functions import * | |
# Implementation of ANOVA function: calculates the degrees of freedom, F-value, eta squared and omega squared values. | |
# Expects that 'categoryData' with two columns, the first being the categorical independent variable and the second being the scale dependent variable | |
def getAnovaStats(categoryData) : | |
cat_val = categoryData.toDF("cat","value") | |
cat_val.createOrReplaceTempView("df") | |
newdf = spark.sql("select A.cat, A.value, cast((A.value * A.value) as double) as valueSq, ((A.value - B.avg) * (A.value - B.avg)) as diffSq from df A join (select cat, avg(value) as avg from df group by cat) B where A.cat = B.cat") | |
grouped = newdf.groupBy("cat") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script will create you CA-signed client certificate. | |
# | |
# First, please follow these steps: | |
# - Create the root pair | |
# - Create the intermediate pair | |
# in https://jamielinux.com/docs/openssl-certificate-authority/ | |
# | |
# Second, this script will NOT use attributes defined in your | |
# `openssl.cnf'. Define your C, ST, and O to the head of this |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# After Ubuntu 16.04, Systemd becomes the default. | |
# It is simpler than https://gist.github.com/Doowon/38910829898a6624ce4ed554f082c4dd | |
[Unit] | |
Description=Jupyter Notebook | |
[Service] | |
Type=simple | |
PIDFile=/run/jupyter.pid | |
ExecStart=/home/phil/Enthought/Canopy_64bit/User/bin/jupyter-notebook --config=/home/phil/.jupyter/jupyter_notebook_config.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Batch change the mode bit (the permission of files and directories) | |
# | |
# USAGE: script_name [path1] [path2]... | |
# script_name | |
# | |
# Author: Jongmin Kim ([email protected]) | |
NewerOlder