hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6afbd0d610e5a63b6a074ba49e684ae0359ba35a | 3,957 | py | Python | ttt_package/libs/best_move.py | Ipgnosis/tic_tac_toe | e1519b702531965cc647ff37c1c46d72f4b3b24e | [
"BSD-3-Clause"
] | null | null | null | ttt_package/libs/best_move.py | Ipgnosis/tic_tac_toe | e1519b702531965cc647ff37c1c46d72f4b3b24e | [
"BSD-3-Clause"
] | 4 | 2021-03-25T19:52:40.000Z | 2021-12-12T17:57:11.000Z | ttt_package/libs/best_move.py | Ipgnosis/tic_tac_toe | e1519b702531965cc647ff37c1c46d72f4b3b24e | [
"BSD-3-Clause"
] | null | null | null | # refactored from make_play to simplify
# by Russell on 3/5/21
#from ttt_package.libs.move_utils import get_open_cells
from ttt_package.libs.compare import get_transposed_games, reorient_games
from ttt_package.libs.calc_game_bound import calc_game_bound
from ttt_package.libs.maxi_min import maximin
# find the best mo... | 42.548387 | 100 | 0.703058 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,339 | 0.591104 |
6afc188b33bb84dbd980d2429af99225dafac393 | 805 | py | Python | yard/skills/66-python/cookbook/yvhai/demo/mt/raw_thread.py | paser4se/bbxyard | d09bc6efb75618b2cef047bad9c8b835043446cb | [
"Apache-2.0"
] | 1 | 2016-03-29T02:01:58.000Z | 2016-03-29T02:01:58.000Z | yard/skills/66-python/cookbook/yvhai/demo/mt/raw_thread.py | paser4se/bbxyard | d09bc6efb75618b2cef047bad9c8b835043446cb | [
"Apache-2.0"
] | 18 | 2019-02-13T09:15:25.000Z | 2021-12-09T21:32:13.000Z | yard/skills/66-python/cookbook/yvhai/demo/mt/raw_thread.py | paser4se/bbxyard | d09bc6efb75618b2cef047bad9c8b835043446cb | [
"Apache-2.0"
] | 2 | 2020-07-05T01:01:30.000Z | 2020-07-08T22:33:06.000Z | #!/usr/bin/env python3
# python 线程测试
import _thread
import time
from yvhai.demo.base import YHDemo
def print_time(thread_name, interval, times):
for cnt in range(times):
time.sleep(interval)
print(" -- %s: %s" % (thread_name, time.ctime(time.time())))
class RawThreadDemo(YHDemo):
def __in... | 20.125 | 70 | 0.601242 | 497 | 0.592372 | 0 | 0 | 378 | 0.450536 | 0 | 0 | 146 | 0.174017 |
6afc7c91ed45303d7c201609e1cc6104aa29ad90 | 3,108 | py | Python | rasa/utils/tensorflow/constants.py | praneethgb/rasa | 5bf227f165d0b041a367d2c0bbf712ebb6a54792 | [
"Apache-2.0"
] | 8 | 2020-09-16T17:22:13.000Z | 2022-02-01T00:11:30.000Z | rasa/utils/tensorflow/constants.py | praneethgb/rasa | 5bf227f165d0b041a367d2c0bbf712ebb6a54792 | [
"Apache-2.0"
] | 216 | 2020-09-20T13:05:58.000Z | 2022-03-28T12:10:24.000Z | rasa/utils/tensorflow/constants.py | praneethgb/rasa | 5bf227f165d0b041a367d2c0bbf712ebb6a54792 | [
"Apache-2.0"
] | 1 | 2022-02-01T18:23:23.000Z | 2022-02-01T18:23:23.000Z | # constants for configuration parameters of our tensorflow models
LABEL = "label"
IDS = "ids"
# LABEL_PAD_ID is used to pad multi-label training examples.
# It should be < 0 to avoid index out of bounds errors by tf.one_hot.
LABEL_PAD_ID = -1
HIDDEN_LAYERS_SIZES = "hidden_layers_sizes"
SHARE_HIDDEN_LAYERS = "share_hid... | 27.75 | 87 | 0.818855 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,632 | 0.525097 |
6afcd2c6547b58f11a5de71fbf337c71913e7438 | 32,025 | py | Python | client/canyons-of-mars/maze.py | GamesCreatorsClub/GCC-Rover | 25a69f62a1bb01fc421924ec39f180f50d6a640b | [
"MIT"
] | 3 | 2018-02-13T21:39:55.000Z | 2018-04-26T18:17:39.000Z | client/canyons-of-mars/maze.py | GamesCreatorsClub/GCC-Rover | 25a69f62a1bb01fc421924ec39f180f50d6a640b | [
"MIT"
] | null | null | null | client/canyons-of-mars/maze.py | GamesCreatorsClub/GCC-Rover | 25a69f62a1bb01fc421924ec39f180f50d6a640b | [
"MIT"
] | null | null | null |
#
# Copyright 2016-2019 Games Creators Club
#
# MIT License
#
import math
import pyroslib
import pyroslib.logging
import time
from pyroslib.logging import log, LOG_LEVEL_ALWAYS, LOG_LEVEL_INFO, LOG_LEVEL_DEBUG
from rover import WheelOdos, WHEEL_NAMES
from rover import normaiseAngle, angleDiference
from challenge_uti... | 43.75 | 238 | 0.600031 | 29,010 | 0.905855 | 0 | 0 | 158 | 0.004934 | 0 | 0 | 3,291 | 0.102763 |
6afda5b387926673c59318881a0eddf14e127e55 | 732 | py | Python | src/spaceone/monitoring/conf/proto_conf.py | jean1042/monitoring | 0585a1ea52ec13285eaca81cc5b19fa3f7a1fba4 | [
"Apache-2.0"
] | 5 | 2020-06-04T23:01:30.000Z | 2020-09-09T08:58:51.000Z | src/spaceone/monitoring/conf/proto_conf.py | jean1042/monitoring | 0585a1ea52ec13285eaca81cc5b19fa3f7a1fba4 | [
"Apache-2.0"
] | 8 | 2021-11-12T08:13:00.000Z | 2022-03-28T11:13:12.000Z | src/spaceone/monitoring/conf/proto_conf.py | jean1042/monitoring | 0585a1ea52ec13285eaca81cc5b19fa3f7a1fba4 | [
"Apache-2.0"
] | 7 | 2020-06-10T01:56:35.000Z | 2021-12-02T05:36:21.000Z | PROTO = {
'spaceone.monitoring.interface.grpc.v1.data_source': ['DataSource'],
'spaceone.monitoring.interface.grpc.v1.metric': ['Metric'],
'spaceone.monitoring.interface.grpc.v1.project_alert_config': ['ProjectAlertConfig'],
'spaceone.monitoring.interface.grpc.v1.escalation_policy': ['EscalationPolicy']... | 56.307692 | 89 | 0.730874 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 620 | 0.846995 |
6afe84146c4619406b9150aea7be577bdc37e585 | 2,929 | py | Python | tests/delete_regress/models.py | PirosB3/django | 9b729ddd8f2040722971ccfb3b12f7d8162633d1 | [
"BSD-3-Clause"
] | 2 | 2015-01-21T15:45:07.000Z | 2015-02-21T02:38:13.000Z | tests/delete_regress/models.py | PirosB3/django | 9b729ddd8f2040722971ccfb3b12f7d8162633d1 | [
"BSD-3-Clause"
] | null | null | null | tests/delete_regress/models.py | PirosB3/django | 9b729ddd8f2040722971ccfb3b12f7d8162633d1 | [
"BSD-3-Clause"
] | 1 | 2020-05-25T08:55:19.000Z | 2020-05-25T08:55:19.000Z | from django.contrib.contenttypes.fields import (
GenericForeignKey, GenericRelation
)
from django.contrib.contenttypes.models import ContentType
from django.db import models
class Award(models.Model):
name = models.CharField(max_length=25)
object_id = models.PositiveIntegerField()
content_type = model... | 20.626761 | 80 | 0.725162 | 2,624 | 0.895869 | 0 | 0 | 0 | 0 | 0 | 0 | 91 | 0.031069 |
6afe91d71e827ccc78b53873ca9a15887ff25298 | 5,550 | py | Python | All_Program.py | TheoSaify/Yolo-Detector | f1ac387370982de323a4fc09109c57736b8ce8d6 | [
"Apache-2.0"
] | null | null | null | All_Program.py | TheoSaify/Yolo-Detector | f1ac387370982de323a4fc09109c57736b8ce8d6 | [
"Apache-2.0"
] | null | null | null | All_Program.py | TheoSaify/Yolo-Detector | f1ac387370982de323a4fc09109c57736b8ce8d6 | [
"Apache-2.0"
] | null | null | null | import cv2
from cv2 import *
import numpy as np
from matplotlib import pyplot as plt
###############################SIFT MATCH Function#################################
def SIFTMATCH(img1,img2):
# Initiate SIFT detector
sift = cv2.xfeatures2d.SIFT_create()
# find the keypoints and descri... | 29.83871 | 127 | 0.571171 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,063 | 0.371712 |
6afebab1780e5e05d2dbd1b300b2e8c2a43c36a7 | 17,003 | py | Python | apps/UI_phone_mcdm.py | industrial-optimization-group/researchers-night | 68f2fcb8530032e157badda772a795e1f3bb2c4b | [
"MIT"
] | null | null | null | apps/UI_phone_mcdm.py | industrial-optimization-group/researchers-night | 68f2fcb8530032e157badda772a795e1f3bb2c4b | [
"MIT"
] | null | null | null | apps/UI_phone_mcdm.py | industrial-optimization-group/researchers-night | 68f2fcb8530032e157badda772a795e1f3bb2c4b | [
"MIT"
] | null | null | null | import dash
from dash.exceptions import PreventUpdate
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output, State
import dash_bootstrap_components as dbc
import dash_table
import plotly.express as ex
import plotly.graph_objects as go
import pandas as pd
imp... | 43.485934 | 95 | 0.283597 | 0 | 0 | 0 | 0 | 1,718 | 0.101029 | 0 | 0 | 2,450 | 0.144075 |
6aff4d7639431aa38a4d3a68b963afee4300b218 | 3,479 | py | Python | pyxon/utils.py | k-j-m/Pyxon | a7f9b3ce524f2441e952c47acd199dd4024d2322 | [
"MIT"
] | null | null | null | pyxon/utils.py | k-j-m/Pyxon | a7f9b3ce524f2441e952c47acd199dd4024d2322 | [
"MIT"
] | null | null | null | pyxon/utils.py | k-j-m/Pyxon | a7f9b3ce524f2441e952c47acd199dd4024d2322 | [
"MIT"
] | null | null | null | import pyxon.decode as pd
def unobjectify(obj):
"""
Turns a python object (must be a class instance)
into the corresponding JSON data.
Example:
>>> @sprop.a # sprop annotations are needed to tell the
>>> @sprop.b # unobjectify function what parameter need
>>> @sprop.c # to be written out.... | 28.284553 | 72 | 0.627479 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,988 | 0.571429 |
6affc41b95b69a262ac3e3eb689401cbbc182548 | 19,112 | py | Python | AxonDeepSeg/segment.py | sophie685/newfileplzworklord | fbbb03c44dc9e4b0409364b49265f453ac80d3c0 | [
"MIT"
] | null | null | null | AxonDeepSeg/segment.py | sophie685/newfileplzworklord | fbbb03c44dc9e4b0409364b49265f453ac80d3c0 | [
"MIT"
] | 8 | 2020-09-26T00:42:19.000Z | 2022-02-10T00:41:55.000Z | AxonDeepSeg/segment.py | sophie685/newfileplzworklord | fbbb03c44dc9e4b0409364b49265f453ac80d3c0 | [
"MIT"
] | null | null | null | # Segmentation script
# -------------------
# This script lets the user segment automatically one or many images based on the default segmentation models: SEM or
# TEM.
#
# Maxime Wabartha - 2017-08-30
# Imports
import sys
from pathlib import Path
import json
import argparse
from argparse import RawTextHelpFormatter... | 45.075472 | 202 | 0.604071 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7,667 | 0.401162 |
ed0142db547eada6fd1f50b0e7939a47e99944a3 | 1,746 | py | Python | tests/test_hedges.py | aplested/DC_Pyps | da33fc7d0e7365044e368488d1c7cbbae7473cc7 | [
"MIT"
] | 1 | 2021-03-25T18:09:25.000Z | 2021-03-25T18:09:25.000Z | tests/test_hedges.py | aplested/DC_Pyps | da33fc7d0e7365044e368488d1c7cbbae7473cc7 | [
"MIT"
] | null | null | null | tests/test_hedges.py | aplested/DC_Pyps | da33fc7d0e7365044e368488d1c7cbbae7473cc7 | [
"MIT"
] | null | null | null | from dcstats.hedges import Hedges_d
from dcstats.statistics_EJ import simple_stats as mean_SD
import random
import math
def generate_sample (length, mean, sigma):
#generate a list of normal distributed samples
sample = []
for n in range(length):
sample.append(random.gauss(mean, sigma))
return ... | 29.59322 | 102 | 0.689003 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 275 | 0.157503 |
ed0157759bef39b622e00be4f990c696bc0f3dd8 | 110 | py | Python | src/FYP/fifaRecords/urls.py | MustafaAbbas110/FinalProject | 30d371f06a8a1875285cfd4a8940ca3610ec1274 | [
"BSD-3-Clause"
] | null | null | null | src/FYP/fifaRecords/urls.py | MustafaAbbas110/FinalProject | 30d371f06a8a1875285cfd4a8940ca3610ec1274 | [
"BSD-3-Clause"
] | null | null | null | src/FYP/fifaRecords/urls.py | MustafaAbbas110/FinalProject | 30d371f06a8a1875285cfd4a8940ca3610ec1274 | [
"BSD-3-Clause"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
path('', views.Records, name ="fRec"),
] | 18.333333 | 42 | 0.672727 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 0.072727 |
ed0176bb36b001f6300ef33bd058b934c1c2ff34 | 2,022 | py | Python | spacy_transformers/tests/regression/test_spacy_issue6401.py | KennethEnevoldsen/spacy-transformers | fa39a94ba276ae3681d14a4b376ea50fadd574b3 | [
"MIT"
] | null | null | null | spacy_transformers/tests/regression/test_spacy_issue6401.py | KennethEnevoldsen/spacy-transformers | fa39a94ba276ae3681d14a4b376ea50fadd574b3 | [
"MIT"
] | null | null | null | spacy_transformers/tests/regression/test_spacy_issue6401.py | KennethEnevoldsen/spacy-transformers | fa39a94ba276ae3681d14a4b376ea50fadd574b3 | [
"MIT"
] | null | null | null | import pytest
from spacy.training.example import Example
from spacy.util import make_tempdir
from spacy import util
from thinc.api import Config
TRAIN_DATA = [
("I'm so happy.", {"cats": {"POSITIVE": 1.0, "NEGATIVE": 0.0}}),
("I'm so angry", {"cats": {"POSITIVE": 0.0, "NEGATIVE": 1.0}}),
]
cfg_string = """
... | 29.304348 | 85 | 0.678536 | 0 | 0 | 0 | 0 | 1,169 | 0.57814 | 0 | 0 | 969 | 0.479228 |
ed0376f91f0c41a8fa993fc5f6223d8bbb5eb7cb | 712 | py | Python | hydra/client/repl.py | rpacholek/hydra | 60e3c2eec5ab1fd1dde8e510baa5175173c66a6a | [
"MIT"
] | null | null | null | hydra/client/repl.py | rpacholek/hydra | 60e3c2eec5ab1fd1dde8e510baa5175173c66a6a | [
"MIT"
] | null | null | null | hydra/client/repl.py | rpacholek/hydra | 60e3c2eec5ab1fd1dde8e510baa5175173c66a6a | [
"MIT"
] | null | null | null | import asyncio
from ..core.common.io import input
from .action_creator import ActionCreator
class REPL:
def __init__(self, action_queue, config, *args, **kwargs):
self.action_queue = action_queue
self.config = config
async def run(self):
await asyncio.sleep(1)
print("Insert c... | 28.48 | 62 | 0.58427 | 616 | 0.865169 | 0 | 0 | 0 | 0 | 466 | 0.654494 | 23 | 0.032303 |
ed037d47b7c87bc348767b05b7307204b77059ed | 35,606 | py | Python | train_dv3.py | drat/Neural-Voice-Cloning-With-Few-Samples | 4febde43ccc143fc88d74d5fa0c5a117636778b4 | [
"MIT"
] | 361 | 2018-08-17T14:37:29.000Z | 2022-03-15T13:04:16.000Z | train_dv3.py | drat/Neural-Voice-Cloning-With-Few-Samples | 4febde43ccc143fc88d74d5fa0c5a117636778b4 | [
"MIT"
] | 22 | 2018-11-25T13:42:26.000Z | 2020-04-29T05:16:25.000Z | train_dv3.py | drat/Neural-Voice-Cloning-With-Few-Samples | 4febde43ccc143fc88d74d5fa0c5a117636778b4 | [
"MIT"
] | 121 | 2018-08-30T03:53:09.000Z | 2022-03-25T09:03:17.000Z | """Trainining script for seq2seq text-to-speech synthesis model.
usage: train.py [options]
options:
--data-root=<dir> Directory contains preprocessed features.
--checkpoint-dir=<dir> Directory where to save model checkpoints [default: checkpoints].
--hparams=<parmas> Hyper param... | 37.559072 | 102 | 0.63068 | 5,987 | 0.168146 | 0 | 0 | 246 | 0.006909 | 0 | 0 | 5,004 | 0.140538 |
ed03eb092480421cebe7ff1098718fc83eac9aac | 3,324 | py | Python | magic_mirror.py | alcinnz/Historical-Twin | 54a9ab5dc130aaeb2e00058bbaeace7377e2ff3d | [
"MIT"
] | 1 | 2018-08-16T10:06:21.000Z | 2018-08-16T10:06:21.000Z | magic_mirror.py | alcinnz/Historical-Twin | 54a9ab5dc130aaeb2e00058bbaeace7377e2ff3d | [
"MIT"
] | null | null | null | magic_mirror.py | alcinnz/Historical-Twin | 54a9ab5dc130aaeb2e00058bbaeace7377e2ff3d | [
"MIT"
] | null | null | null | #! /usr/bin/python2
import time
start = time.time()
import pygame, numpy
import pygame.camera
# Init display
screen = pygame.display.set_mode((0,0), pygame.FULLSCREEN)
pygame.display.set_caption("Magic Mirror")
#pygame.mouse.set_visible(False)
# Init font
pygame.font.init()
font_colour = 16, 117, 186
fonts = {40: p... | 28.655172 | 87 | 0.653129 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 293 | 0.088147 |
ed0441122c358fac6781aee918c51f234c854920 | 288 | py | Python | resolwe/__init__.py | plojyon/resolwe | 1bee6f0860fdd087534adf1680e9350d79ab97cf | [
"Apache-2.0"
] | 27 | 2015-12-07T18:29:12.000Z | 2022-03-16T08:01:47.000Z | resolwe/__init__.py | plojyon/resolwe | 1bee6f0860fdd087534adf1680e9350d79ab97cf | [
"Apache-2.0"
] | 681 | 2015-12-01T11:52:24.000Z | 2022-03-21T07:43:37.000Z | resolwe/__init__.py | plojyon/resolwe | 1bee6f0860fdd087534adf1680e9350d79ab97cf | [
"Apache-2.0"
] | 28 | 2015-12-01T08:32:57.000Z | 2021-12-14T00:04:16.000Z | """.. Ignore pydocstyle D400.
=======
Resolwe
=======
Open source enterprise dataflow engine in Django.
"""
from resolwe.__about__ import ( # noqa: F401
__author__,
__copyright__,
__email__,
__license__,
__summary__,
__title__,
__url__,
__version__,
)
| 14.4 | 49 | 0.638889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 122 | 0.423611 |
ed04e3a19994480a40ef35eabbb8a7e09343ee2c | 8,898 | py | Python | audio_som64_u_grupo1.py | andremsouza/swine_sound_analysis | 5583bf91b18e8ad2dcaccb30a94c134e2eab34a5 | [
"MIT"
] | null | null | null | audio_som64_u_grupo1.py | andremsouza/swine_sound_analysis | 5583bf91b18e8ad2dcaccb30a94c134e2eab34a5 | [
"MIT"
] | 1 | 2021-01-20T01:56:42.000Z | 2021-01-20T01:56:42.000Z | audio_som64_u_grupo1.py | andremsouza/swine_sound_analysis | 5583bf91b18e8ad2dcaccb30a94c134e2eab34a5 | [
"MIT"
] | null | null | null | # %% [markdown]
# # Testing python-som with audio dataset
# %% [markdown]
# # Imports
# %%
import matplotlib.pyplot as plt
# import librosa as lr
# import librosa.display as lrdisp
import numpy as np
import pandas as pd
import pickle
import seaborn as sns
import sklearn.preprocessing
from python_som import SOM
FILE... | 30.682759 | 80 | 0.615532 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,628 | 0.295347 |
ed0683361fef86b73c36e55f72fcd846b4e5dd8c | 1,019 | py | Python | footy/engine/UpdateEngine.py | dallinb/footy | d6879481a85b4a84023805bf29bd7dff32afa67f | [
"BSD-3-Clause"
] | 2 | 2020-08-27T17:59:13.000Z | 2021-10-10T02:26:20.000Z | footy/engine/UpdateEngine.py | FootyStats/footy | d6879481a85b4a84023805bf29bd7dff32afa67f | [
"BSD-3-Clause"
] | 32 | 2020-08-24T15:01:57.000Z | 2022-03-12T00:47:02.000Z | footy/engine/UpdateEngine.py | dallinb/footy | d6879481a85b4a84023805bf29bd7dff32afa67f | [
"BSD-3-Clause"
] | null | null | null | """Prediction Engine - Update the data model with the most resent fixtures and results."""
from footy.domain import Competition
class UpdateEngine:
"""Prediction Engine - Update the data model with the most resent fixtures and results."""
def __init__(self):
"""Construct a UpdateEngine object."""
... | 29.970588 | 109 | 0.649657 | 887 | 0.870461 | 0 | 0 | 0 | 0 | 0 | 0 | 752 | 0.737978 |
ed06ae9dc5fa12b66e8b0650821700fcf43fb094 | 2,286 | py | Python | bindings/pydeck/docs/scripts/embed_examples.py | marsupialmarcos/deck.gl | c9867c1db87e492253865353f68c985019c7c613 | [
"MIT"
] | 2 | 2021-08-11T08:05:51.000Z | 2021-08-11T08:05:54.000Z | bindings/pydeck/docs/scripts/embed_examples.py | marsupialmarcos/deck.gl | c9867c1db87e492253865353f68c985019c7c613 | [
"MIT"
] | null | null | null | bindings/pydeck/docs/scripts/embed_examples.py | marsupialmarcos/deck.gl | c9867c1db87e492253865353f68c985019c7c613 | [
"MIT"
] | null | null | null | """Script to embed pydeck examples into .rst pages with code
These populate the files you see once you click into a grid cell
on the pydeck gallery page
"""
from multiprocessing import Pool
import os
import subprocess
import sys
from const import DECKGL_URL_BASE, EXAMPLE_GLOB, GALLERY_DIR, HTML_DIR, HOSTED_STATIC_PAT... | 35.169231 | 106 | 0.71916 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 630 | 0.275591 |
ed0721912431ef604f57495e6aa85dbb0102f18a | 45,482 | py | Python | symbolicR/python/forward_kin.py | mharding01/augmented-neuromuscular-RT-running | 7e1ef00d3fdf9cfa9d59fc4f3a6a0e6dd792a834 | [
"MIT"
] | null | null | null | symbolicR/python/forward_kin.py | mharding01/augmented-neuromuscular-RT-running | 7e1ef00d3fdf9cfa9d59fc4f3a6a0e6dd792a834 | [
"MIT"
] | null | null | null | symbolicR/python/forward_kin.py | mharding01/augmented-neuromuscular-RT-running | 7e1ef00d3fdf9cfa9d59fc4f3a6a0e6dd792a834 | [
"MIT"
] | null | null | null | import numpy as np
import sympy as sp
import re
import os
######################
# #
# 17 16 21 #
# 18 15 22 #
# 19 14 23 #
# 20 01 24 #
# 02 08 #
# 03 09 #
# 04 10 #
# 05 11 #
# 06 12 #
# 07... | 32.348506 | 189 | 0.633767 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14,459 | 0.317906 |
ed07be5c12830ff2ea484a69a77d31923d6aa5cb | 1,223 | py | Python | examples/last.py | 0xiso/PyMISP | 20a340414422714dcf31389957343c663550ed1a | [
"BSD-2-Clause"
] | 5 | 2019-08-12T15:21:00.000Z | 2021-10-01T01:50:52.000Z | examples/last.py | DragonDev1906/PyMISP | 5c72dc9c33b4ae850d40ff06dfb05c27f3e80e5d | [
"BSD-2-Clause"
] | null | null | null | examples/last.py | DragonDev1906/PyMISP | 5c72dc9c33b4ae850d40ff06dfb05c27f3e80e5d | [
"BSD-2-Clause"
] | 3 | 2018-11-22T15:33:16.000Z | 2019-09-02T14:23:35.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from pymisp import PyMISP
from keys import misp_url, misp_key, misp_verifycert
import argparse
import os
import json
# Usage for pipe masters: ./last.py -l 5h | jq .
def init(url, key):
return PyMISP(url, key, misp_verifycert, 'json')
def download_last(m, last, o... | 27.795455 | 133 | 0.644317 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 367 | 0.300082 |
ed0ba1aa04531d363f3421c385e69a867b69168b | 2,949 | py | Python | saleor/dashboard/urls.py | Chaoslecion123/Diver | 8c5c493701422eada49cbf95b0b0add08f1ea561 | [
"BSD-3-Clause"
] | null | null | null | saleor/dashboard/urls.py | Chaoslecion123/Diver | 8c5c493701422eada49cbf95b0b0add08f1ea561 | [
"BSD-3-Clause"
] | null | null | null | saleor/dashboard/urls.py | Chaoslecion123/Diver | 8c5c493701422eada49cbf95b0b0add08f1ea561 | [
"BSD-3-Clause"
] | null | null | null | from django.conf.urls import include, url
from django.views.generic.base import TemplateView
from . import views as core_views
from .category.urls import urlpatterns as category_urls
from .collection.urls import urlpatterns as collection_urls
from .customer.urls import urlpatterns as customer_urls
from .discount.urls ... | 49.15 | 83 | 0.714819 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 616 | 0.208884 |
ed0cbfaf8410cb124a4ef21f7ca9796ba91008fc | 1,146 | py | Python | experiments/CUB_fewshot_raw/FRN/ResNet-12/train.py | Jf-Chen/FRN-main | 5b57b9e0d7368058a8e3ba41a53c460b54ab9b91 | [
"MIT"
] | 43 | 2021-04-27T23:42:35.000Z | 2022-03-30T02:41:19.000Z | experiments/CUB_fewshot_raw/FRN/ResNet-12/train.py | Jf-Chen/FRN-main | 5b57b9e0d7368058a8e3ba41a53c460b54ab9b91 | [
"MIT"
] | 7 | 2021-05-31T10:38:17.000Z | 2022-01-06T05:20:08.000Z | experiments/CUB_fewshot_raw/FRN/ResNet-12/train.py | Jf-Chen/FRN-main | 5b57b9e0d7368058a8e3ba41a53c460b54ab9b91 | [
"MIT"
] | 7 | 2021-05-18T00:37:46.000Z | 2022-01-23T07:09:51.000Z | import os
import sys
import torch
import yaml
from functools import partial
sys.path.append('../../../../')
from trainers import trainer, frn_train
from datasets import dataloaders
from models.FRN import FRN
args = trainer.train_parser()
with open('../../../../config.yml', 'r') as f:
temp = yaml.safe_load(f)
data... | 30.157895 | 89 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 69 | 0.060209 |
ed0d0fb11e355951942a4b93a958119ead61c53e | 6,037 | py | Python | exp/DFRdatasets/simulate.py | zzzace2000/dropout-feature-rankin | 7769ce822f3c0a6d23167d11f1569f59e56b1266 | [
"CC-BY-4.0"
] | 6 | 2019-02-24T07:31:38.000Z | 2021-12-27T08:57:38.000Z | exp/DFRdatasets/simulate.py | zzzace2000/dropout-feature-rankin | 7769ce822f3c0a6d23167d11f1569f59e56b1266 | [
"CC-BY-4.0"
] | 2 | 2019-01-13T11:49:35.000Z | 2020-05-18T01:59:15.000Z | exp/DFRdatasets/simulate.py | zzzace2000/dropout-feature-rankin | 7769ce822f3c0a6d23167d11f1569f59e56b1266 | [
"CC-BY-4.0"
] | 6 | 2018-11-06T14:17:07.000Z | 2021-11-06T14:30:10.000Z | import argparse
import argparse
import os
import numpy as np
import torch
from dataloaders.LoaderBase import LoaderBase
import exp.feature.feature_utils as feature_utils
def run_with_identifier(unit, corr_val, datasize, rank_names, loader, show_ols=True):
loader.clear_cache()
# Ex: 'nn_rank:0.01'. Then ext... | 41.068027 | 98 | 0.629617 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,057 | 0.340732 |
ed0d8ae3aab7a47853ec71583d13c54d255d0f51 | 2,430 | py | Python | gym_pcgrl/envs/reps/wide_3D_rep.py | JiangZehua/gym-pcgrl | 80ddbde173803e81060578c2c4167d8d1f5cacba | [
"MIT"
] | null | null | null | gym_pcgrl/envs/reps/wide_3D_rep.py | JiangZehua/gym-pcgrl | 80ddbde173803e81060578c2c4167d8d1f5cacba | [
"MIT"
] | null | null | null | gym_pcgrl/envs/reps/wide_3D_rep.py | JiangZehua/gym-pcgrl | 80ddbde173803e81060578c2c4167d8d1f5cacba | [
"MIT"
] | null | null | null | from gym_pcgrl.envs.reps.representation3D import Representation3D
from PIL import Image
from gym import spaces
import numpy as np
from gym_pcgrl.envs.probs.minecraft.mc_render import reps_3D_render
"""
The wide representation where the agent can pick the tile position and tile value at each update.
"""
class Wide3DRep... | 32.837838 | 101 | 0.671605 | 2,124 | 0.874074 | 0 | 0 | 0 | 0 | 0 | 0 | 1,441 | 0.593004 |
ed0ede6f5172ebc43a6bba82ff98dc80379f3c8f | 10,696 | py | Python | ucsmsdk/mometa/adaptor/AdaptorMenloQStats.py | thinkitdata/ucsmsdk | da6599e1dbc1207a30eabe548a7e5791af5f476b | [
"Apache-2.0"
] | null | null | null | ucsmsdk/mometa/adaptor/AdaptorMenloQStats.py | thinkitdata/ucsmsdk | da6599e1dbc1207a30eabe548a7e5791af5f476b | [
"Apache-2.0"
] | null | null | null | ucsmsdk/mometa/adaptor/AdaptorMenloQStats.py | thinkitdata/ucsmsdk | da6599e1dbc1207a30eabe548a7e5791af5f476b | [
"Apache-2.0"
] | null | null | null | """This module contains the general information for AdaptorMenloQStats ManagedObject."""
from ...ucsmo import ManagedObject
from ...ucscoremeta import MoPropertyMeta, MoMeta
from ...ucsmeta import VersionMeta
class AdaptorMenloQStatsConsts:
MENLO_QUEUE_COMPONENT_N = "N"
MENLO_QUEUE_COMPONENT_CPU = "cpu"
... | 76.94964 | 277 | 0.708022 | 10,480 | 0.979806 | 0 | 0 | 0 | 0 | 0 | 0 | 4,280 | 0.40015 |
ed0fc8cf4f946e650eb4b14f0a5d7690952a62a3 | 980 | py | Python | python/old_password_test.py | XelaRellum/old_password | b461941069bc7f1187776a992f86c89317ab215e | [
"MIT"
] | null | null | null | python/old_password_test.py | XelaRellum/old_password | b461941069bc7f1187776a992f86c89317ab215e | [
"MIT"
] | null | null | null | python/old_password_test.py | XelaRellum/old_password | b461941069bc7f1187776a992f86c89317ab215e | [
"MIT"
] | null | null | null | import unittest
import pytest
from old_password import old_password
import csv
import re
@pytest.mark.parametrize("password,expected_hash", [
(None, None),
("", ""),
("a", "60671c896665c3fa"),
("abc", "7cd2b5942be28759"),
("ä", "0751368d49315f7f"),
])
def test_old_password(password, expected_hash... | 22.272727 | 67 | 0.643878 | 0 | 0 | 0 | 0 | 282 | 0.287462 | 0 | 0 | 264 | 0.269113 |
ed10c3db0c256d5bebae34542a471bf7c8fc94ae | 6,829 | py | Python | src/RS_model/train_mlp.py | CindyChen1995/MKR | f9ae37903dcf43b6d101dfc08644ce4a29ecbf9d | [
"MIT"
] | null | null | null | src/RS_model/train_mlp.py | CindyChen1995/MKR | f9ae37903dcf43b6d101dfc08644ce4a29ecbf9d | [
"MIT"
] | null | null | null | src/RS_model/train_mlp.py | CindyChen1995/MKR | f9ae37903dcf43b6d101dfc08644ce4a29ecbf9d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
-------------------------------------------------
Description :
Author : cmy
date: 2020/1/2
-------------------------------------------------
"""
import datetime
import heapq
import numpy as np
import tensorflow as tf
import time
from metrics import ndcg_at_k
from tr... | 41.387879 | 130 | 0.516767 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,056 | 0.154589 |
ed12384bdaa43735e81fa807c26ed334db11e7a1 | 84,211 | py | Python | pylipid.py | glass-w/PyLipID | ee29f92ba6187cd22b9554a599177152ebed9c4c | [
"MIT"
] | null | null | null | pylipid.py | glass-w/PyLipID | ee29f92ba6187cd22b9554a599177152ebed9c4c | [
"MIT"
] | null | null | null | pylipid.py | glass-w/PyLipID | ee29f92ba6187cd22b9554a599177152ebed9c4c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Aug 28 19:28:17 2019
@author: Wanling Song
"""
import mdtraj as md
import numpy as np
import pandas as pd
import argparse
import sys
from collections import defaultdict
import pickle
import os
import matplotlib
matplotlib.use('Agg')
import matplotlib.p... | 62.332346 | 227 | 0.574723 | 66,728 | 0.792391 | 0 | 0 | 0 | 0 | 0 | 0 | 22,025 | 0.261545 |
ed123b848cc69e55c673d2f62ec3999397f7c2b8 | 547 | py | Python | main.py | yaakiyu/rt-bot | f68bca95c516e08c31ecc846524dcea4c8ba1503 | [
"BSD-4-Clause"
] | null | null | null | main.py | yaakiyu/rt-bot | f68bca95c516e08c31ecc846524dcea4c8ba1503 | [
"BSD-4-Clause"
] | null | null | null | main.py | yaakiyu/rt-bot | f68bca95c516e08c31ecc846524dcea4c8ba1503 | [
"BSD-4-Clause"
] | null | null | null | # RT by Rext
from asyncio import run
from discord import Intents, Status, Game, AllowedMentions
from core.bot import RT
from data import SECRET
try: from uvloop import install
except ModuleNotFoundError: ...
else: install()
intents = Intents.default()
intents.message_content = True
intents.members = True
bot = RT... | 21.038462 | 70 | 0.753199 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 48 | 0.087114 |
ed1329b2789d579e2ef82e7b330a86a58150d0b6 | 13,014 | py | Python | hiplot/fetchers_demo.py | dmitryvinn/hiplot | 52fe8b195a4e254240eb1a0847953fa3c1957a43 | [
"MIT"
] | 1 | 2022-03-21T15:46:17.000Z | 2022-03-21T15:46:17.000Z | hiplot/fetchers_demo.py | ai2ys/hiplot | 148f7c4eba11c6393957a819169f3cf07c469bec | [
"MIT"
] | null | null | null | hiplot/fetchers_demo.py | ai2ys/hiplot | 148f7c4eba11c6393957a819169f3cf07c469bec | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import uuid
import random
import math
import time
import typing as t
from . import experiment as hip
# Demos from the README. If one of those ... | 34.247368 | 140 | 0.593592 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,486 | 0.267865 |
ed148a5bf47d0fb8ac1d5504a3f607cd11c82fbf | 313 | py | Python | app/endpoints/common/dtos/ingredient.py | brauls/ingredients-service | 67c1408f96f4b407d7e7b3e5e62406a6931de1c1 | [
"MIT"
] | null | null | null | app/endpoints/common/dtos/ingredient.py | brauls/ingredients-service | 67c1408f96f4b407d7e7b3e5e62406a6931de1c1 | [
"MIT"
] | 1 | 2021-06-01T23:34:40.000Z | 2021-06-01T23:34:40.000Z | app/endpoints/common/dtos/ingredient.py | brauls/ingredients-service | 67c1408f96f4b407d7e7b3e5e62406a6931de1c1 | [
"MIT"
] | null | null | null | """Ingredient dto.
"""
class Ingredient():
"""Class to represent an ingredient.
"""
def __init__(self, name, availability_per_month):
self.name = name
self.availability_per_month = availability_per_month
def __repr__(self):
return """{} is the name.""".format(self.name)
| 24.076923 | 60 | 0.642173 | 288 | 0.920128 | 0 | 0 | 0 | 0 | 0 | 0 | 87 | 0.277955 |
ed14a6749afbe24501971f360abe8e3e8754902d | 423 | py | Python | barcode.py | kallangerard/grocery-barcode-scanner | 0a866c5b20c43355b642c0b78ba09d5cf4b0383c | [
"MIT"
] | null | null | null | barcode.py | kallangerard/grocery-barcode-scanner | 0a866c5b20c43355b642c0b78ba09d5cf4b0383c | [
"MIT"
] | null | null | null | barcode.py | kallangerard/grocery-barcode-scanner | 0a866c5b20c43355b642c0b78ba09d5cf4b0383c | [
"MIT"
] | null | null | null | import logging
import groceries.api as groceries
import barcodescanner.scan as barcode
def main():
grocy = groceries.GrocyAPIClient()
while True:
scanner = barcode.Scan()
line = scanner.PollScanner()
if line != None:
response = grocy.consume_barcode(line)
loggin... | 22.263158 | 50 | 0.65721 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.023641 |
ed152979dba20d65fa46d571939edbfd7eb69a09 | 790 | py | Python | setup.py | mr-sk/easy-icm-runner | 01cf9d7d8e4ef13afc18dbdda2862035121f3624 | [
"MIT"
] | null | null | null | setup.py | mr-sk/easy-icm-runner | 01cf9d7d8e4ef13afc18dbdda2862035121f3624 | [
"MIT"
] | null | null | null | setup.py | mr-sk/easy-icm-runner | 01cf9d7d8e4ef13afc18dbdda2862035121f3624 | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="easy-icm-runner",
version="1.0.6",
author="Bachir El Koussa",
author_email="[email protected]",
description="A wrapper for IBM ICMs Scheduler API Calls",
long_description=long_descrip... | 30.384615 | 93 | 0.641772 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 411 | 0.520253 |
ed15a4196531124a25ec9256f08c4c288fc464c6 | 1,784 | py | Python | test_molecule.py | zee93/molecule_parser | 42f5a3722d733ef9f7243bfa2b0b9a08c7bc5d23 | [
"MIT"
] | null | null | null | test_molecule.py | zee93/molecule_parser | 42f5a3722d733ef9f7243bfa2b0b9a08c7bc5d23 | [
"MIT"
] | null | null | null | test_molecule.py | zee93/molecule_parser | 42f5a3722d733ef9f7243bfa2b0b9a08c7bc5d23 | [
"MIT"
] | null | null | null | import unittest
from molecule import onize_formula, update_equation_with_multiplier, flaten_formula, parse_molecule
class MoleculeParserTestCases(unittest.TestCase):
def test_onizing_formulas(self):
self.assertEqual(onize_formula('H'), 'H1')
self.assertEqual(onize_formula('H2O'), 'H2O1')
... | 39.644444 | 100 | 0.669283 | 1,616 | 0.90583 | 0 | 0 | 0 | 0 | 0 | 0 | 264 | 0.147982 |
ed17f5890d6b8f37c6b6d897dfdeee0fd244dace | 544 | py | Python | config.py | lyth031/ptb_lm | 71f687fdf41c6b981a306269c1341ea8a8347bb6 | [
"MIT"
] | null | null | null | config.py | lyth031/ptb_lm | 71f687fdf41c6b981a306269c1341ea8a8347bb6 | [
"MIT"
] | null | null | null | config.py | lyth031/ptb_lm | 71f687fdf41c6b981a306269c1341ea8a8347bb6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
class Config(object):
def __init__(self):
self.init_scale = 0.1
self.learning_rate = 1.0
self.max_grad_norm = 5
self.num_layers = 2
self.slice_size = 30
self.hidden_size = 200
self.max_epoch = 13
self.keep_prob = 0.8
se... | 24.727273 | 44 | 0.549632 | 517 | 0.950368 | 0 | 0 | 0 | 0 | 0 | 0 | 56 | 0.102941 |
ed17fa4c7a350d13f37c06feb06cdcd3b65f55bf | 859 | gyp | Python | binding.gyp | HupuInc/node-mysql-listener | d23e55910acd1559d8339f36b1549f21aee8adaa | [
"MIT"
] | 2 | 2015-10-04T02:09:11.000Z | 2021-02-03T00:12:28.000Z | binding.gyp | HupuInc/node-mysql-listener | d23e55910acd1559d8339f36b1549f21aee8adaa | [
"MIT"
] | 1 | 2015-10-04T02:10:02.000Z | 2015-10-05T07:29:40.000Z | binding.gyp | HupuInc/node-mysql-listener | d23e55910acd1559d8339f36b1549f21aee8adaa | [
"MIT"
] | null | null | null | {
'targets': [
{
# have to specify 'liblib' here since gyp will remove the first one :\
'target_name': 'mysql_bindings',
'sources': [
'src/mysql_bindings.cc',
'src/mysql_bindings_connection.cc',
'src/mysql_bindings_result.cc',
'src/mysql_bindings_statement.cc',
... | 23.861111 | 76 | 0.436554 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 491 | 0.571595 |
ed1909657faffd879b4424a3c02025a1afc7ff54 | 1,272 | py | Python | pymel/__init__.py | GlenWalker/pymel | 8b69b72e1bb726a66792707af39626a987bf5c21 | [
"BSD-3-Clause"
] | null | null | null | pymel/__init__.py | GlenWalker/pymel | 8b69b72e1bb726a66792707af39626a987bf5c21 | [
"BSD-3-Clause"
] | null | null | null | pymel/__init__.py | GlenWalker/pymel | 8b69b72e1bb726a66792707af39626a987bf5c21 | [
"BSD-3-Clause"
] | null | null | null |
# copyright Chad Dombrova [email protected]
# created at luma pictures www.luma-pictures.com
"""
*******************************
PyMEL
*******************************
PyMEL makes python scripting in Maya work the way it should. Maya's command module is a direct
translation of MEL commands into p... | 37.411765 | 116 | 0.676887 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,052 | 0.827044 |
ed1acc095f46eeb713b4bbe4bbc113d4ca38760c | 399 | py | Python | setup.py | rlbellaire/ActT | b6e936e5037c5f92ad1c281e2bf3700bf91aea42 | [
"BSD-3-Clause"
] | 2 | 2020-01-24T20:20:02.000Z | 2021-09-25T03:32:17.000Z | setup.py | rlbellaire/ActT | b6e936e5037c5f92ad1c281e2bf3700bf91aea42 | [
"BSD-3-Clause"
] | 1 | 2020-11-16T17:08:08.000Z | 2020-11-16T17:08:08.000Z | setup.py | rlbellaire/ActT | b6e936e5037c5f92ad1c281e2bf3700bf91aea42 | [
"BSD-3-Clause"
] | 1 | 2020-11-16T16:58:39.000Z | 2020-11-16T16:58:39.000Z | from setuptools import find_packages, setup
setup(name='ActT',
version='0.6',
description='Active Testing',
url='',
author='',
author_email='none',
license='BSD',
packages=find_packages(),
install_requires=[
'numpy', 'pandas', 'matplotlib','scipy','scikit-learn',... | 24.9375 | 79 | 0.588972 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 127 | 0.318296 |
ed1aeb45638b0f4e22adf71d2445a7c3b1908ff3 | 3,121 | py | Python | Fusion/deltat.py | coylen/pySG | 6af1b8387c256f8898e2198c635c8e4b72ec3942 | [
"MIT"
] | 264 | 2015-10-07T19:31:15.000Z | 2022-03-31T23:34:59.000Z | deltat.py | CharlesAO/micropython-fusion | fe72a6870357c8f9b1cae78b98564412382943d9 | [
"MIT"
] | 14 | 2015-11-13T02:40:30.000Z | 2022-01-22T10:44:48.000Z | deltat.py | CharlesAO/micropython-fusion | fe72a6870357c8f9b1cae78b98564412382943d9 | [
"MIT"
] | 75 | 2015-12-12T00:26:28.000Z | 2022-03-23T13:32:30.000Z | # deltat.py time difference calculation for sensor fusion
# Released under the MIT License (MIT)
# Copyright (c) 2018 Peter Hinch
# Provides TimeDiff function and DeltaT class.
# The following notes cover special cases. Where the device performing fusion
# is linked to the IMU and is running MicroPython no special tre... | 41.065789 | 97 | 0.707786 | 1,110 | 0.355427 | 0 | 0 | 0 | 0 | 0 | 0 | 2,123 | 0.679795 |
ed1b14ee7367d8cae14cb322f5cd81df68be3c15 | 11,336 | py | Python | colour/models/rgb/datasets/sony.py | wenh06/colour | 445fdad2711ae39c95b4375166905568d24a95f4 | [
"BSD-3-Clause"
] | 1 | 2021-09-09T01:53:40.000Z | 2021-09-09T01:53:40.000Z | colour/models/rgb/datasets/sony.py | wenh06/colour | 445fdad2711ae39c95b4375166905568d24a95f4 | [
"BSD-3-Clause"
] | null | null | null | colour/models/rgb/datasets/sony.py | wenh06/colour | 445fdad2711ae39c95b4375166905568d24a95f4 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Sony Colourspaces
=================
Defines the *Sony* colourspaces:
- :attr:`colour.models.RGB_COLOURSPACE_S_GAMUT`.
- :attr:`colour.models.RGB_COLOURSPACE_S_GAMUT3`.
- :attr:`colour.models.RGB_COLOURSPACE_S_GAMUT3_CINE`.
- :attr:`colour.models.RGB_COLOURSPACE_VENICE_S_GAMUT3`.
- ... | 28.918367 | 81 | 0.763585 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,745 | 0.595007 |
ed1b3de2cf4ee0d6a94657c3843653ea66d9ad27 | 723 | py | Python | network.py | QiaoZhongzheng/EWC-sample-PMNIST | cd5e10b401582ab7f0dcd7a1e38aed6552192484 | [
"MIT"
] | null | null | null | network.py | QiaoZhongzheng/EWC-sample-PMNIST | cd5e10b401582ab7f0dcd7a1e38aed6552192484 | [
"MIT"
] | null | null | null | network.py | QiaoZhongzheng/EWC-sample-PMNIST | cd5e10b401582ab7f0dcd7a1e38aed6552192484 | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
'''=================================================
@Project -> File :EWC -> network
@IDE :PyCharm
@Author :Qiao Zhongzheng
@Date :2021/6/23 20:28
@Desc :
=================================================='''
from tensorflow.keras import Model
from tensorflow.keras.layers import Dense,... | 36.15 | 83 | 0.562932 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 401 | 0.547067 |
ed1b9e6a531c569f1a1cfb6234bd90d5b845bbe9 | 1,909 | py | Python | src/quanguru/classes/exceptions.py | Qfabiolous/QuanGuru | 285ca44ae857cc61337f73ea2eb600f485a09e32 | [
"BSD-3-Clause"
] | null | null | null | src/quanguru/classes/exceptions.py | Qfabiolous/QuanGuru | 285ca44ae857cc61337f73ea2eb600f485a09e32 | [
"BSD-3-Clause"
] | null | null | null | src/quanguru/classes/exceptions.py | Qfabiolous/QuanGuru | 285ca44ae857cc61337f73ea2eb600f485a09e32 | [
"BSD-3-Clause"
] | null | null | null | # TODO turn prints into actual error raise, they are print for testing
def qSystemInitErrors(init):
def newFunction(obj, **kwargs):
init(obj, **kwargs)
if obj._genericQSys__dimension is None:
className = obj.__class__.__name__
print(className + ' requires a dimension')
... | 40.617021 | 92 | 0.600838 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 689 | 0.360922 |
ed1c74c77f9a61e232ea9a2a837cdc1274993efb | 6,997 | py | Python | reagent/gym/tests/test_gym.py | alexnikulkov/ReAgent | e404c5772ea4118105c2eb136ca96ad5ca8e01db | [
"BSD-3-Clause"
] | null | null | null | reagent/gym/tests/test_gym.py | alexnikulkov/ReAgent | e404c5772ea4118105c2eb136ca96ad5ca8e01db | [
"BSD-3-Clause"
] | null | null | null | reagent/gym/tests/test_gym.py | alexnikulkov/ReAgent | e404c5772ea4118105c2eb136ca96ad5ca8e01db | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
import logging
import os
import pprint
import unittest
import numpy as np
# pyre-fixme[21]: Could not find module `pytest`.
import pytest
import torch
from parameterized import parameterized
from reagent.core.types import R... | 36.253886 | 88 | 0.711019 | 1,101 | 0.157353 | 0 | 0 | 915 | 0.13077 | 0 | 0 | 2,408 | 0.344147 |
ed1ce2b7ae05d6c1c0bdabe48547eeeb53fe25e1 | 1,949 | py | Python | src/deep_dialog/usersims/usersim.py | CommissarSilver/TC-Bot | 4579706a18028b5da9b8a7807fb2e2d4043dcaf8 | [
"MIT"
] | 1 | 2021-05-29T01:32:49.000Z | 2021-05-29T01:32:49.000Z | D3Q/src/deep_dialog/usersims/usersim.py | Yuqing2018/D3Q_Python3 | 2a9918494e3f0ed18f9b7560b1e6f13119fbee91 | [
"MIT"
] | null | null | null | D3Q/src/deep_dialog/usersims/usersim.py | Yuqing2018/D3Q_Python3 | 2a9918494e3f0ed18f9b7560b1e6f13119fbee91 | [
"MIT"
] | null | null | null |
"""
Created on June 7, 2016
a rule-based user simulator
@author: xiul, t-zalipt
"""
import random
class UserSimulator:
""" Parent class for all user sims to inherit from """
def __init__(self, movie_dict=None, act_set=None, slot_set=None, start_set=None, params=None):
""" Construc... | 30.453125 | 99 | 0.606978 | 1,833 | 0.940482 | 0 | 0 | 0 | 0 | 0 | 0 | 506 | 0.25962 |
ed1dd7ccddd4e92e0775574a201cc45ae9f018c0 | 57 | py | Python | kendall_w/__init__.py | ugolbck/KendallW | ace7c68d6c3c2dfcf6b3ee5fb3817240ed050c9b | [
"BSD-3-Clause"
] | 4 | 2020-03-28T13:42:58.000Z | 2021-04-05T12:45:25.000Z | kendall_w/__init__.py | ugolbck/KendallW | ace7c68d6c3c2dfcf6b3ee5fb3817240ed050c9b | [
"BSD-3-Clause"
] | null | null | null | kendall_w/__init__.py | ugolbck/KendallW | ace7c68d6c3c2dfcf6b3ee5fb3817240ed050c9b | [
"BSD-3-Clause"
] | 2 | 2020-08-05T03:36:43.000Z | 2020-09-09T00:33:06.000Z | from .kendall_w import compute_w
__version__ = (1, 0, 0) | 19 | 32 | 0.736842 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ed1e65bf06947a5b605eebf0c5bd1f30e38649c8 | 142 | py | Python | admin.py | nielsrolf/django-error-logs | 4e516e021d34e255f1282c98bffa53a265c48bab | [
"Apache-2.0"
] | null | null | null | admin.py | nielsrolf/django-error-logs | 4e516e021d34e255f1282c98bffa53a265c48bab | [
"Apache-2.0"
] | null | null | null | admin.py | nielsrolf/django-error-logs | 4e516e021d34e255f1282c98bffa53a265c48bab | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from .models import *
# Register your models here.
admin.site.register(ErrorGroup)
admin.site.register(Error) | 28.4 | 32 | 0.809859 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.197183 |
ed1f38ec9a444c4d387d2b1c3bbd4a46cc3895ba | 2,132 | py | Python | mcpython/common/block/ISlab.py | mcpython4-coding/core | e4c4f59dab68c90e2028db3add2e5065116bf4a6 | [
"CC0-1.0",
"MIT"
] | 2 | 2019-11-02T05:26:11.000Z | 2019-11-03T08:52:18.000Z | mcpython/common/block/ISlab.py | mcpython4-coding/core | e4c4f59dab68c90e2028db3add2e5065116bf4a6 | [
"CC0-1.0",
"MIT"
] | 25 | 2019-11-02T05:24:29.000Z | 2022-02-09T14:09:08.000Z | mcpython/common/block/ISlab.py | mcpython4-coding/core | e4c4f59dab68c90e2028db3add2e5065116bf4a6 | [
"CC0-1.0",
"MIT"
] | 5 | 2019-11-09T05:36:06.000Z | 2021-11-28T13:07:08.000Z | """
mcpython - a minecraft clone written in python licenced under the MIT-licence
(https://github.com/mcpython4-coding/core)
Contributors: uuk, xkcdjerry (inactive)
Based on the game of fogleman (https://github.com/fogleman/Minecraft), licenced under the MIT-licence
Original game "minecraft" by Mojang Studios (www.m... | 32.30303 | 103 | 0.701689 | 1,014 | 0.47561 | 0 | 0 | 0 | 0 | 409 | 0.191839 | 681 | 0.319418 |
ed207a7611696af8395d372e4e8d01f42d7c6467 | 25,419 | py | Python | CourseOutlineBackend/courseoutline/serializers.py | stancsz/web-development-project-ensf-607 | 03b11df4971afd4f27fee54a1800a40d4cc10240 | [
"Apache-2.0"
] | null | null | null | CourseOutlineBackend/courseoutline/serializers.py | stancsz/web-development-project-ensf-607 | 03b11df4971afd4f27fee54a1800a40d4cc10240 | [
"Apache-2.0"
] | null | null | null | CourseOutlineBackend/courseoutline/serializers.py | stancsz/web-development-project-ensf-607 | 03b11df4971afd4f27fee54a1800a40d4cc10240 | [
"Apache-2.0"
] | null | null | null | from rest_framework import serializers
from .models import *
class CoordinatorSerializer(serializers.ModelSerializer):
# ModelID = serializers.CharField(max_length=100, required=True)
CourseID = serializers.CharField(max_length=100, required=True)
FName = serializers.CharField(max_length=100, required=Fa... | 42.649329 | 108 | 0.66824 | 25,315 | 0.995909 | 0 | 0 | 0 | 0 | 0 | 0 | 4,264 | 0.167749 |
ed2132797a348954493a3cea6dfb9bfa857770a6 | 209 | py | Python | tools/math_tools.py | oliverscheer/python-pytest-ci | d67c379440d1873a753c47e7031bb9564d96de21 | [
"MIT"
] | null | null | null | tools/math_tools.py | oliverscheer/python-pytest-ci | d67c379440d1873a753c47e7031bb9564d96de21 | [
"MIT"
] | 1 | 2021-05-26T19:58:09.000Z | 2021-05-26T19:58:09.000Z | tools/math_tools.py | oliverscheer/python-pytest-ci | d67c379440d1873a753c47e7031bb9564d96de21 | [
"MIT"
] | null | null | null | """ some math tools """
class MathTools:
""" some math tools """
def add(a, b):
""" add two values """
return a + b
def sub(a, b):
""" subtract two values """
| 17.416667 | 36 | 0.444976 | 180 | 0.861244 | 0 | 0 | 0 | 0 | 0 | 0 | 95 | 0.454545 |
ed2176e9a9c0aa2fe888859654d1422302e6cce3 | 325 | py | Python | hackerrank/Algorithms/Correctness and the Loop Invariant/solution.py | ATrain951/01.python-com_Qproject | c164dd093954d006538020bdf2e59e716b24d67c | [
"MIT"
] | 4 | 2020-07-24T01:59:50.000Z | 2021-07-24T15:14:08.000Z | hackerrank/Algorithms/Correctness and the Loop Invariant/solution.py | ATrain951/01.python-com_Qproject | c164dd093954d006538020bdf2e59e716b24d67c | [
"MIT"
] | null | null | null | hackerrank/Algorithms/Correctness and the Loop Invariant/solution.py | ATrain951/01.python-com_Qproject | c164dd093954d006538020bdf2e59e716b24d67c | [
"MIT"
] | null | null | null | def insertion_sort(l):
for i in range(1, len(l)):
j = i - 1
key = l[i]
while (j >= 0) and (l[j] > key):
l[j + 1] = l[j]
j -= 1
l[j + 1] = key
m = int(input().strip())
ar = [int(i) for i in input().strip().split()]
insertion_sort(ar)
print(" ".join(map(str, a... | 21.666667 | 46 | 0.443077 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0.009231 |
ed2203dc728c9eb06bb608004ab33922f3baa3bc | 3,279 | py | Python | cvp_rest_api_examples/cvpLabelAdd.py | kakkotetsu/CVP-Scripts | 4075eaf9987be6220a7bed188dcee11f56a7bf35 | [
"Apache-2.0"
] | 8 | 2019-06-04T14:22:45.000Z | 2020-10-02T16:56:43.000Z | cvp_rest_api_examples/cvpLabelAdd.py | kakkotetsu/CVP-Scripts | 4075eaf9987be6220a7bed188dcee11f56a7bf35 | [
"Apache-2.0"
] | 1 | 2021-04-16T00:43:00.000Z | 2021-04-16T00:43:00.000Z | cvp_rest_api_examples/cvpLabelAdd.py | kakkotetsu/CVP-Scripts | 4075eaf9987be6220a7bed188dcee11f56a7bf35 | [
"Apache-2.0"
] | 4 | 2020-05-13T14:03:13.000Z | 2021-08-10T14:47:23.000Z | #!/usrb/bin/env python
# Copyright (c) 2019, Arista Networks, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# - Redistributions of source code must retain the above copyright notice,
# t... | 42.584416 | 84 | 0.720647 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,030 | 0.619091 |
ed22f71576a11a3b9302f73902c8de9c8f96d4dd | 1,244 | py | Python | frontends/pytorch/python/torch_mlir_torchscript_e2e_test_configs/torchscript.py | raikonenfnu/mlir-npcomp | 29e1b2fe89848d58c9bc07e7df7ce651850a5244 | [
"Apache-2.0"
] | null | null | null | frontends/pytorch/python/torch_mlir_torchscript_e2e_test_configs/torchscript.py | raikonenfnu/mlir-npcomp | 29e1b2fe89848d58c9bc07e7df7ce651850a5244 | [
"Apache-2.0"
] | null | null | null | frontends/pytorch/python/torch_mlir_torchscript_e2e_test_configs/torchscript.py | raikonenfnu/mlir-npcomp | 29e1b2fe89848d58c9bc07e7df7ce651850a5244 | [
"Apache-2.0"
] | null | null | null | # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
import copy
from typing import Any
import torch
from torch_mlir_torchscript.e2e_test.framework import TestConfig, Tr... | 34.555556 | 82 | 0.644695 | 906 | 0.728296 | 0 | 0 | 0 | 0 | 0 | 0 | 402 | 0.323151 |
ed23166702dcea8d3e5e73f8ed58f0971f2a45b0 | 2,495 | py | Python | app/balltracking/pubnubpython/pnconfiguration.py | gdmgent-1718-wot/interactive-wall | af7ecff126b1ee9c85c270fe13d1338aa790c34b | [
"Apache-2.0"
] | null | null | null | app/balltracking/pubnubpython/pnconfiguration.py | gdmgent-1718-wot/interactive-wall | af7ecff126b1ee9c85c270fe13d1338aa790c34b | [
"Apache-2.0"
] | null | null | null | app/balltracking/pubnubpython/pnconfiguration.py | gdmgent-1718-wot/interactive-wall | af7ecff126b1ee9c85c270fe13d1338aa790c34b | [
"Apache-2.0"
] | null | null | null | from .enums import PNHeartbeatNotificationOptions, PNReconnectionPolicy
from . import utils
class PNConfiguration(object):
DEFAULT_PRESENCE_TIMEOUT = 300
DEFAULT_HEARTBEAT_INTERVAL = 280
def __init__(self):
# TODO: add validation
self.uuid = None
self.origin = "ps.pndsn.com"
... | 29.352941 | 85 | 0.666132 | 2,400 | 0.961924 | 0 | 0 | 447 | 0.179158 | 0 | 0 | 103 | 0.041283 |
ed2393de8d1d80d0e5b9c6610dd11fbf42e62a83 | 18,305 | py | Python | tests/scripts/thread-cert/thread_cert.py | lmaciejonczyk/openthread | 9ca79ddd9af3d4e3f78cb6e611a3117a71b2198c | [
"BSD-3-Clause"
] | null | null | null | tests/scripts/thread-cert/thread_cert.py | lmaciejonczyk/openthread | 9ca79ddd9af3d4e3f78cb6e611a3117a71b2198c | [
"BSD-3-Clause"
] | null | null | null | tests/scripts/thread-cert/thread_cert.py | lmaciejonczyk/openthread | 9ca79ddd9af3d4e3f78cb6e611a3117a71b2198c | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright (c) 2019, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# ... | 36.536926 | 170 | 0.607648 | 15,725 | 0.859055 | 0 | 0 | 83 | 0.004534 | 0 | 0 | 5,228 | 0.285605 |
ed242bad81da2f05250a803d492c40b86c9b59d3 | 1,770 | py | Python | FaceMaskDetection with webcam.py | Anurag-Varma/facemask-detection | 9ac681261e246e6ab1837c576d933dc7324e3a92 | [
"MIT"
] | 1 | 2021-07-13T09:16:12.000Z | 2021-07-13T09:16:12.000Z | FaceMaskDetection with webcam.py | Anurag-Varma/facemask-detection | 9ac681261e246e6ab1837c576d933dc7324e3a92 | [
"MIT"
] | null | null | null | FaceMaskDetection with webcam.py | Anurag-Varma/facemask-detection | 9ac681261e246e6ab1837c576d933dc7324e3a92 | [
"MIT"
] | null | null | null |
import cv2
import numpy as np
from keras.models import model_from_json
from keras.preprocessing.image import img_to_array
#load model
model = model_from_json(open("fer.json", "r").read()) #change the path accoring to files
#load weights
model.load_weights('fer.h5') #change the path accor... | 28.095238 | 124 | 0.641243 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 335 | 0.189266 |
ed24828337abdac65179c3d1fc89a55415ddc15a | 1,871 | py | Python | language/Basics/stringformatting.py | Binary-bug/Python | 233425ded6abc26c889599a82a181487789e3bab | [
"MIT"
] | null | null | null | language/Basics/stringformatting.py | Binary-bug/Python | 233425ded6abc26c889599a82a181487789e3bab | [
"MIT"
] | null | null | null | language/Basics/stringformatting.py | Binary-bug/Python | 233425ded6abc26c889599a82a181487789e3bab | [
"MIT"
] | null | null | null | age = 24
print("My age is " + str(age) + " years ")
# the above procedure is tedious since we dont really want to include str for every number we encounter
#Method1 Replacement Fields
print("My age is {0} years ".format(age)) # {0} is the actual replacement field, number important for multiple replacement fields
... | 25.986111 | 140 | 0.649385 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,468 | 0.784607 |
ed24c0adb8cc7ebd6871903b985fa571a276f939 | 5,391 | py | Python | toggl.py | ulrikpedersen/toggl-gnome-applet | ae48358414d14d44ef5731c59f1813bac97e3257 | [
"Unlicense"
] | null | null | null | toggl.py | ulrikpedersen/toggl-gnome-applet | ae48358414d14d44ef5731c59f1813bac97e3257 | [
"Unlicense"
] | 1 | 2017-11-21T09:36:06.000Z | 2017-11-21T09:36:06.000Z | toggl.py | ulrikpedersen/toggl-gnome-applet | ae48358414d14d44ef5731c59f1813bac97e3257 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
import logging
from datetime import datetime
logging.basicConfig(level=logging.WARNING)
import os
import urllib2, base64, json
import dateutil.parser
def from_ISO8601( str_iso8601 ):
return dateutil.parser.parse(str_iso8601)
def to_ISO8601( timestamp ):
return timestamp.isoformat()
de... | 38.234043 | 116 | 0.586533 | 4,661 | 0.864589 | 0 | 0 | 0 | 0 | 0 | 0 | 1,537 | 0.285105 |
ed2565f6739ecf83e80e8445b8eb480489832a2d | 432 | py | Python | gs_divergence/symmetrized_geodesical_skew_divergence.py | ISMHinoLab/geodesical_skew_divergence | 293648a30e86bdd14749af5b107f1d3687d67700 | [
"MIT"
] | 7 | 2021-04-01T09:21:49.000Z | 2022-03-24T05:28:22.000Z | gs_divergence/symmetrized_geodesical_skew_divergence.py | ISMHinoLab/geodesical_skew_divergence | 293648a30e86bdd14749af5b107f1d3687d67700 | [
"MIT"
] | 21 | 2021-04-01T02:56:54.000Z | 2021-05-07T01:02:09.000Z | gs_divergence/symmetrized_geodesical_skew_divergence.py | ISMHinoLab/geodesical_skew_divergence | 293648a30e86bdd14749af5b107f1d3687d67700 | [
"MIT"
] | 2 | 2021-04-12T15:00:17.000Z | 2021-04-26T03:10:26.000Z | from typing import Optional
import torch
from gs_divergence import gs_div
def symmetrized_gs_div(
input: torch.Tensor,
target: torch.Tensor,
alpha: float = -1,
lmd: float = 0.5,
reduction: Optional[str] = 'sum',
) -> torch.Tensor:
lhs = gs_div(input, target, alpha=alpha, lmd=lmd, reduction=re... | 24 | 74 | 0.680556 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0.011574 |
ed25675ecd1960dc8b520c3cb84ff43fb7cab0a0 | 1,946 | py | Python | train.py | kushaliitm/deep-learning | ab8e23d1414d3b79bbe4a3acd57a475f6def7277 | [
"MIT"
] | null | null | null | train.py | kushaliitm/deep-learning | ab8e23d1414d3b79bbe4a3acd57a475f6def7277 | [
"MIT"
] | null | null | null | train.py | kushaliitm/deep-learning | ab8e23d1414d3b79bbe4a3acd57a475f6def7277 | [
"MIT"
] | null | null | null | import argparse
import helper as hp
import torch
import os
import json
parser = argparse.ArgumentParser(description = 'train.py')
parser.add_argument('--data-dir', nargs = '*', action = "store", default = "./flowers/", help = "folder path for data")
parser.add_argument('--save-dir', action = "store", required=True, h... | 37.423077 | 155 | 0.731757 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 813 | 0.41778 |
ed25ac3871761ab8e7fb05fe5b59a6a001de70b4 | 154 | py | Python | Euler0001.py | rbarillec/project_euler | db812f9ae53090b34716452d0cb9ec14bf218290 | [
"MIT"
] | null | null | null | Euler0001.py | rbarillec/project_euler | db812f9ae53090b34716452d0cb9ec14bf218290 | [
"MIT"
] | null | null | null | Euler0001.py | rbarillec/project_euler | db812f9ae53090b34716452d0cb9ec14bf218290 | [
"MIT"
] | null | null | null | def Euler0001():
max = 1000
sum = 0
for i in range(1, max):
if i%3 == 0 or i%5 == 0:
sum += i
print(sum)
Euler0001() | 15.4 | 32 | 0.448052 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ed261100e8ba320319dd45fa75984055274a92f9 | 11,020 | py | Python | models/blip.py | lmathia2/BLIP | 8ca42256e83654858856d40886509be8fbca51a7 | [
"BSD-3-Clause"
] | null | null | null | models/blip.py | lmathia2/BLIP | 8ca42256e83654858856d40886509be8fbca51a7 | [
"BSD-3-Clause"
] | null | null | null | models/blip.py | lmathia2/BLIP | 8ca42256e83654858856d40886509be8fbca51a7 | [
"BSD-3-Clause"
] | null | null | null | '''
* Copyright (c) 2022, salesforce.com, inc.
* All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
* By Junnan Li
'''
import warnings
warnings.filterwarnings("ignore")
from models.vit import V... | 45.916667 | 128 | 0.551996 | 7,213 | 0.654537 | 0 | 0 | 0 | 0 | 0 | 0 | 1,428 | 0.129583 |
ed26aa5f1dfa9b893282f08b252dba7679012685 | 28,524 | py | Python | venv/Lib/site-packages/pandas/tests/reshape/merge/test_multi.py | OliviaNabbosa89/Disaster_Responses | 1e66d77c303cec685dfc2ca94f4fca4cc9400570 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pandas/tests/reshape/merge/test_multi.py | OliviaNabbosa89/Disaster_Responses | 1e66d77c303cec685dfc2ca94f4fca4cc9400570 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pandas/tests/reshape/merge/test_multi.py | OliviaNabbosa89/Disaster_Responses | 1e66d77c303cec685dfc2ca94f4fca4cc9400570 | [
"MIT"
] | null | null | null | import numpy as np
from numpy.random import randn
import pytest
import pandas as pd
from pandas import DataFrame, Index, MultiIndex, Series
import pandas._testing as tm
from pandas.core.reshape.concat import concat
from pandas.core.reshape.merge import merge
@pytest.fixture
def left():
"""left dataf... | 33.876485 | 89 | 0.425186 | 26,147 | 0.916667 | 0 | 0 | 6,415 | 0.224898 | 0 | 0 | 4,735 | 0.166001 |
ed26d3056f6a5641259d87e73533b42ec4832318 | 11,894 | py | Python | test/api/test_histories.py | mmiladi/galaxy | 7857b152cd10d9490ac2433ff2905ca1a47ee32c | [
"CC-BY-3.0"
] | 1 | 2021-04-26T08:46:21.000Z | 2021-04-26T08:46:21.000Z | test/api/test_histories.py | mmiladi/galaxy | 7857b152cd10d9490ac2433ff2905ca1a47ee32c | [
"CC-BY-3.0"
] | null | null | null | test/api/test_histories.py | mmiladi/galaxy | 7857b152cd10d9490ac2433ff2905ca1a47ee32c | [
"CC-BY-3.0"
] | 1 | 2018-12-09T13:50:28.000Z | 2018-12-09T13:50:28.000Z | # -*- coding: utf-8 -*-
from requests import (
get,
post,
put
)
from base import api # noqa: I100
from base.populators import ( # noqa: I100
DatasetCollectionPopulator,
DatasetPopulator,
wait_on
)
class HistoriesApiTestCase(api.ApiTestCase):
def setUp(self):
super(HistoriesApiT... | 41.442509 | 105 | 0.673701 | 11,675 | 0.980928 | 0 | 0 | 0 | 0 | 0 | 0 | 2,281 | 0.191648 |
ed26edcb5cf96b914509d3c9f532db02422a6189 | 701 | py | Python | Algorithms_easy/0461. Hamming Distance.py | VinceW0/Leetcode_Python_solutions | 09e9720afce21632372431606ebec4129eb79734 | [
"Xnet",
"X11"
] | 4 | 2020-08-11T20:45:15.000Z | 2021-03-12T00:33:34.000Z | Algorithms_easy/0461. Hamming Distance.py | VinceW0/Leetcode_Python_solutions | 09e9720afce21632372431606ebec4129eb79734 | [
"Xnet",
"X11"
] | null | null | null | Algorithms_easy/0461. Hamming Distance.py | VinceW0/Leetcode_Python_solutions | 09e9720afce21632372431606ebec4129eb79734 | [
"Xnet",
"X11"
] | null | null | null | """
0461. Hamming Distance
The Hamming distance between two integers is the number of positions at which the corresponding bits are different.
Given two integers x and y, calculate the Hamming distance.
Note:
0 ≤ x, y < 231.
Example:
Input: x = 1, y = 4
Output: 2
Explanation:
1 (0 0 0 1)
4 (0 1 0 0)
↑ ... | 20.028571 | 115 | 0.596291 | 281 | 0.397454 | 0 | 0 | 0 | 0 | 0 | 0 | 417 | 0.589816 |
ed275088d36ba770ab503299abfac84060ea0475 | 2,136 | py | Python | AllProjects/Projects/Spider/DownloadImage.py | CoderXAndZ/PycharmProjects | 94b3cc68d39614a4291bd63d4811dab61eb2e64a | [
"MIT"
] | 3 | 2018-08-30T03:53:25.000Z | 2020-07-02T09:27:39.000Z | Spider/DownloadImage.py | CoderXAndZ/Python_demo | b1b1067f3ee2de82b4b2678ac9d09a5a0bf7d698 | [
"MIT"
] | null | null | null | Spider/DownloadImage.py | CoderXAndZ/Python_demo | b1b1067f3ee2de82b4b2678ac9d09a5a0bf7d698 | [
"MIT"
] | 4 | 2020-07-01T02:29:33.000Z | 2021-06-07T09:32:30.000Z | #! /usr/local/bin/python3
# -*- coding: UTF-8 -*-
# 抓取 妹子图 并存储
import urllib.request
import os
import random
def open_url(url):
request = urllib.request.Request(url)
request.add_header('User-Agent',
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Firefox/60.0')
... | 24.837209 | 108 | 0.586142 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 679 | 0.293939 |
ed2762c6cacc123594407c4391a955c0922acc79 | 7,324 | py | Python | utility/extractor_batch.py | BA-HanseML/NF_Prj_MIMII_Dataset | c9dd130a48c5ee28491a3f9369ace8f7217753d6 | [
"MIT"
] | 10 | 2020-08-25T21:12:32.000Z | 2021-11-04T22:14:37.000Z | utility/extractor_batch.py | BA-HanseML/NF_Prj_MIMII_Dataset | c9dd130a48c5ee28491a3f9369ace8f7217753d6 | [
"MIT"
] | 44 | 2020-05-04T11:37:55.000Z | 2021-09-26T04:12:23.000Z | utility/extractor_batch.py | ArneSch/NF_Prj_MIMII_Dataset | c9dd130a48c5ee28491a3f9369ace8f7217753d6 | [
"MIT"
] | 4 | 2020-11-24T02:14:13.000Z | 2021-07-01T08:52:59.000Z | print('load extractor_batch')
# Utility to run multiple feature extraction
# diagrams over many files with multiple threats
import pandas as pd
import os
import sys
import glob
from tqdm.auto import tqdm
from queue import Queue
from threading import Thread
from datetime import datetime
import time
im... | 38.34555 | 120 | 0.497679 | 1,237 | 0.168897 | 0 | 0 | 0 | 0 | 0 | 0 | 1,243 | 0.169716 |
ed27ebcd5adfdfd408f83681c96698af5592ab3f | 393 | py | Python | multitenancy/context_processors.py | cmalek/django-site-multitenancy | 1b943f63c0d6247529805e05dcced68ceffa2a69 | [
"Apache-2.0"
] | null | null | null | multitenancy/context_processors.py | cmalek/django-site-multitenancy | 1b943f63c0d6247529805e05dcced68ceffa2a69 | [
"Apache-2.0"
] | null | null | null | multitenancy/context_processors.py | cmalek/django-site-multitenancy | 1b943f63c0d6247529805e05dcced68ceffa2a69 | [
"Apache-2.0"
] | null | null | null | from .models import Tenant
def tenant(request):
"""
Return context variables required by apps that use django-site-multitenancy.
If there is no 'tenant' attribute in the request, extract one from the request.
"""
if hasattr(request, 'tenant'):
tenant = request.tenant
else:
ten... | 24.5625 | 83 | 0.6743 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 193 | 0.491094 |
ed28fda11893d2529a33ba5b4cee8f469db7aad9 | 185 | py | Python | hello/forms.py | odhiambocuttice/mypersonalapp | b2fb12046302104569aa5c4e4869aeb669e51b1b | [
"MIT"
] | null | null | null | hello/forms.py | odhiambocuttice/mypersonalapp | b2fb12046302104569aa5c4e4869aeb669e51b1b | [
"MIT"
] | 10 | 2019-12-04T23:35:48.000Z | 2022-02-10T09:04:53.000Z | hello/forms.py | odhiambocuttice/app-version3 | 6b5e526a03c905cf832aae805c2a570b373aea52 | [
"MIT"
] | null | null | null | from django import forms
from .models import Project
class ProjectForm(forms.ModelForm):
class Meta:
model = Project
fields = ["title", "describe", "technology"]
| 18.5 | 52 | 0.67027 | 128 | 0.691892 | 0 | 0 | 0 | 0 | 0 | 0 | 29 | 0.156757 |
ed2903bbc29759d94352b5e8a5d0370e20ce8b16 | 361 | py | Python | pset_classes/class_basics/solutions/p1.py | mottaquikarim/pydev-psets | 9749e0d216ee0a5c586d0d3013ef481cc21dee27 | [
"MIT"
] | 5 | 2019-04-08T20:05:37.000Z | 2019-12-04T20:48:45.000Z | pset_classes/class_basics/solutions/p1.py | mottaquikarim/pydev-psets | 9749e0d216ee0a5c586d0d3013ef481cc21dee27 | [
"MIT"
] | 8 | 2019-04-15T15:16:05.000Z | 2022-02-12T10:33:32.000Z | pset_classes/class_basics/solutions/p1.py | mottaquikarim/pydev-psets | 9749e0d216ee0a5c586d0d3013ef481cc21dee27 | [
"MIT"
] | 2 | 2019-04-10T00:14:42.000Z | 2020-02-26T20:35:21.000Z | """
Person class
"""
# Create a Person class with the following properties
# 1. name
# 2. age
# 3. social security number
class Person:
def __init__(self, name, age, social_number):
self.name = name
self.age = age
self.social = social_number
p1 = Person("John", 36, "111-11-1111")
print... | 15.695652 | 53 | 0.645429 | 147 | 0.407202 | 0 | 0 | 0 | 0 | 0 | 0 | 136 | 0.376731 |
ed29375d22bb9febc1771fb6ca4eaac661a4c75a | 19,452 | py | Python | python/paddle/fluid/contrib/slim/tests/test_imperative_out_scale.py | huangxu96/Paddle | 372ac08a171d76c745deaab0feed2d587798f734 | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/contrib/slim/tests/test_imperative_out_scale.py | huangxu96/Paddle | 372ac08a171d76c745deaab0feed2d587798f734 | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/contrib/slim/tests/test_imperative_out_scale.py | huangxu96/Paddle | 372ac08a171d76c745deaab0feed2d587798f734 | [
"Apache-2.0"
] | null | null | null | # copyright (c) 2018 paddlepaddle authors. all rights reserved.
#
# licensed under the apache license, version 2.0 (the "license");
# you may not use this file except in compliance with the license.
# you may obtain a copy of the license at
#
# http://www.apache.org/licenses/license-2.0
#
# unless required by app... | 38.826347 | 127 | 0.585955 | 15,479 | 0.795754 | 0 | 0 | 0 | 0 | 0 | 0 | 2,222 | 0.11423 |
ed297c05f15fda89099111b92e19812bf53e5838 | 4,289 | py | Python | grr/server/hunts/results.py | nickamon/grr | ad1936c74728de00db90f6fafa47892b54cfc92d | [
"Apache-2.0"
] | null | null | null | grr/server/hunts/results.py | nickamon/grr | ad1936c74728de00db90f6fafa47892b54cfc92d | [
"Apache-2.0"
] | 1 | 2018-05-08T21:15:51.000Z | 2018-05-08T21:15:51.000Z | grr/server/hunts/results.py | nickamon/grr | ad1936c74728de00db90f6fafa47892b54cfc92d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""Classes to store and manage hunt results.
"""
from grr.lib import rdfvalue
from grr.lib import registry
from grr.lib.rdfvalues import structs as rdf_structs
from grr_response_proto import jobs_pb2
from grr.server import access_control
from grr.server import aff4
from grr.server import data_sto... | 30.41844 | 80 | 0.669853 | 3,788 | 0.88319 | 0 | 0 | 2,743 | 0.639543 | 0 | 0 | 1,093 | 0.254838 |
ed298e1020b52cd93721c03300f989d51ef1134b | 4,748 | py | Python | src/simple_sharepoint/site.py | NodeJSmith/py-simple-rest-sharepoint | 77ee5f76364e7b6096228945ed7e3bd637214a66 | [
"MIT"
] | null | null | null | src/simple_sharepoint/site.py | NodeJSmith/py-simple-rest-sharepoint | 77ee5f76364e7b6096228945ed7e3bd637214a66 | [
"MIT"
] | null | null | null | src/simple_sharepoint/site.py | NodeJSmith/py-simple-rest-sharepoint | 77ee5f76364e7b6096228945ed7e3bd637214a66 | [
"MIT"
] | null | null | null | """
Module for higher level SharePoint REST api actions - utilize methods in the api.py module
"""
class Site():
def __init__(self, sp):
self.sp = sp
@property
def info(self):
endpoint = "_api/site"
value = self.sp.get(endpoint).json()
return value
@property
def w... | 31.03268 | 116 | 0.619208 | 4,646 | 0.978517 | 0 | 0 | 1,555 | 0.327506 | 0 | 0 | 2,665 | 0.561289 |
ed2abc9ecde219ec6fc0610ffdc2709ba8c49de3 | 6,317 | py | Python | pypeit/tests/test_metadata.py | rcooke-ast/PYPIT | 0cb9c4cb422736b855065a35aefc2bdba6d51dd0 | [
"BSD-3-Clause"
] | null | null | null | pypeit/tests/test_metadata.py | rcooke-ast/PYPIT | 0cb9c4cb422736b855065a35aefc2bdba6d51dd0 | [
"BSD-3-Clause"
] | null | null | null | pypeit/tests/test_metadata.py | rcooke-ast/PYPIT | 0cb9c4cb422736b855065a35aefc2bdba6d51dd0 | [
"BSD-3-Clause"
] | null | null | null | import os
import glob
import shutil
import yaml
from IPython import embed
import pytest
import numpy as np
from pypeit.par.util import parse_pypeit_file
from pypeit.pypeitsetup import PypeItSetup
from pypeit.tests.tstutils import dev_suite_required, data_path
from pypeit.metadata import PypeItMetaData
from pypeit.s... | 38.054217 | 97 | 0.653158 | 0 | 0 | 0 | 0 | 4,327 | 0.684977 | 0 | 0 | 1,949 | 0.308533 |
ed2b4e055e79bf5051229abe9c3b6aceb972d7aa | 15,930 | py | Python | tortoise/query_utils.py | DDevine/tortoise-orm | 414737a78e98ffd247174590720f5c90aeac4dde | [
"Apache-2.0"
] | 1 | 2020-05-15T19:50:12.000Z | 2020-05-15T19:50:12.000Z | tortoise/query_utils.py | Tomes111/tortoise-orm | 8b55499a228e44f33fec9099f4d559c77c73beb7 | [
"Apache-2.0"
] | null | null | null | tortoise/query_utils.py | Tomes111/tortoise-orm | 8b55499a228e44f33fec9099f4d559c77c73beb7 | [
"Apache-2.0"
] | null | null | null | from copy import copy
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Type, cast
from pypika import Table
from pypika.terms import Criterion
from tortoise.exceptions import FieldError, OperationalError
from tortoise.fields.relational import BackwardFKRelation, ManyToManyFieldInstance, RelationalFi... | 37.748815 | 101 | 0.629881 | 12,065 | 0.757376 | 0 | 0 | 0 | 0 | 0 | 0 | 2,984 | 0.18732 |
ed2c2633a7cab56346726bab1085f5ed14b0a1bf | 1,372 | py | Python | L3_numpy_pandas_2D/B_NumPy_Axis.py | angelmtenor/IDAFC | 9d23746fd02e4eda2569d75b3c7a1383277e6e78 | [
"MIT"
] | null | null | null | L3_numpy_pandas_2D/B_NumPy_Axis.py | angelmtenor/IDAFC | 9d23746fd02e4eda2569d75b3c7a1383277e6e78 | [
"MIT"
] | null | null | null | L3_numpy_pandas_2D/B_NumPy_Axis.py | angelmtenor/IDAFC | 9d23746fd02e4eda2569d75b3c7a1383277e6e78 | [
"MIT"
] | null | null | null | import numpy as np
# Change False to True for this block of code to see what it does
# NumPy axis argument
if True:
a = np.array([
[1, 2, 3],
[4, 5, 6],
[7, 8, 9]
])
print(a.sum())
print(a.sum(axis=0))
print(a.sum(axis=1))
# Subway ridership for 5 stations on 10 different... | 28.583333 | 85 | 0.652332 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 520 | 0.379009 |
ed2ce29f604f771e38af6d30ffbe09233cdd48b6 | 9,956 | py | Python | Protein-ligand-binding/TopBio/Feature/LigandFeature.py | WeilabMSU/TopologyNet | 4f4d13cec7e50624b43990c863dd84b8bbf359d8 | [
"MIT"
] | 1 | 2021-12-09T02:38:53.000Z | 2021-12-09T02:38:53.000Z | Protein-ligand-binding/TopBio/Feature/LigandFeature.py | WeilabMSU/TopologyNet | 4f4d13cec7e50624b43990c863dd84b8bbf359d8 | [
"MIT"
] | null | null | null | Protein-ligand-binding/TopBio/Feature/LigandFeature.py | WeilabMSU/TopologyNet | 4f4d13cec7e50624b43990c863dd84b8bbf359d8 | [
"MIT"
] | 1 | 2021-12-09T02:38:54.000Z | 2021-12-09T02:38:54.000Z | import numpy as np
import pickle
import os
def GenerateFeature_alpha(ligand_name, working_dir):
Cut = 12.0
LIGELE = ['C','N','O','S','CN','CO','CS','NO','NS','OS','CCl','CBr','CP','CF','CNO','CNS','COS','NOS','CNOS','CNOSPFClBrI','H','CH','NH','OH','SH','CNH','COH','CSH','NOH','NSH','OSH','CNOH','CNSH','COSH'... | 49.78 | 264 | 0.518682 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 565 | 0.05675 |
ed2d4c9ed22365d84b24c00ca0cddff12ecae572 | 1,105 | py | Python | emailthreads/util.py | emersion/python-emailthreads | 99f1a04fa0dd2ce8a9c870016b067bf56f3d3bfd | [
"MIT"
] | 34 | 2018-06-14T09:30:29.000Z | 2022-03-13T20:56:06.000Z | emailthreads/util.py | emersion/python-emailreview | 99f1a04fa0dd2ce8a9c870016b067bf56f3d3bfd | [
"MIT"
] | 5 | 2019-12-01T20:20:51.000Z | 2022-01-26T08:42:37.000Z | emailthreads/util.py | emersion/python-emailreview | 99f1a04fa0dd2ce8a9c870016b067bf56f3d3bfd | [
"MIT"
] | 3 | 2019-06-21T20:31:42.000Z | 2021-12-18T00:09:07.000Z | import re
import sys
from email.message import EmailMessage
def get_message_by_id(msgs, msg_id):
# TODO: handle weird brackets stuff
for msg in msgs:
if msg["message-id"] == msg_id:
return msg
return None
def strip_prefix(s, prefix):
if s.startswith(prefix):
s = s[len(prefix):]
return s
def flatten_heade... | 22.1 | 69 | 0.709502 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 159 | 0.143891 |
ed2e075475e31924b346949bce0058c5690b9443 | 7,930 | py | Python | trainval.py | JanAlexanderPersonal/covid19_weak_supervision | 5599e48c9945f1e08a2731740bc8f6e44a031703 | [
"Apache-2.0"
] | null | null | null | trainval.py | JanAlexanderPersonal/covid19_weak_supervision | 5599e48c9945f1e08a2731740bc8f6e44a031703 | [
"Apache-2.0"
] | null | null | null | trainval.py | JanAlexanderPersonal/covid19_weak_supervision | 5599e48c9945f1e08a2731740bc8f6e44a031703 | [
"Apache-2.0"
] | null | null | null | from haven import haven_chk as hc
from haven import haven_results as hr
from haven import haven_utils as hu
import torch
import torchvision
import tqdm
import pandas as pd
import pprint
import itertools
import os
import pylab as plt
import exp_configs
import time
import numpy as np
from src import models
from src impo... | 33.459916 | 82 | 0.577427 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,527 | 0.19256 |
ed2e4b3cf6fdf1d5d74d3435c7259f6fa34ae5df | 297,511 | py | Python | languages/pt-br.py | unimauro/eden | b739d334e6828d0db14b3790f2f5e2666fc83576 | [
"MIT"
] | 1 | 2017-03-15T23:29:41.000Z | 2017-03-15T23:29:41.000Z | languages/pt-br.py | unimauro/eden | b739d334e6828d0db14b3790f2f5e2666fc83576 | [
"MIT"
] | null | null | null | languages/pt-br.py | unimauro/eden | b739d334e6828d0db14b3790f2f5e2666fc83576 | [
"MIT"
] | null | null | null | # coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" é uma expressão opcional como "field1=\'newvalue\'". Não é possível atualizar ou excluir os resultados de uma junção',
'# of International Staff': '# De equipe internacional'... | 61.737082 | 995 | 0.74161 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 277,825 | 0.920234 |
ed2e9fbfce1e8173a04660813facfdf161e513ee | 598 | py | Python | pyxq/app/__init__.py | goodchinas/pyxq | c7f6ea63084c18178049451f30f32f04080a511c | [
"MIT"
] | 4 | 2019-12-17T11:05:53.000Z | 2020-06-01T05:41:02.000Z | pyxq/app/__init__.py | goodchinas/pyxq | c7f6ea63084c18178049451f30f32f04080a511c | [
"MIT"
] | null | null | null | pyxq/app/__init__.py | goodchinas/pyxq | c7f6ea63084c18178049451f30f32f04080a511c | [
"MIT"
] | 2 | 2019-11-13T01:11:53.000Z | 2019-12-17T10:55:44.000Z | from .. import ba, cb, actor
from ..service import account
class A0(ba.App):
center: cb.CallBackManager
a: account.Account
def __init__(self, stg: actor.GateWay):
a = account.Account()
center = cb.CallBackManager()
stg.init(a=a, center=center, broker=cb.CallBackManager())
... | 27.181818 | 87 | 0.610368 | 536 | 0.896321 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ed2eaa3880c0ded822c74f91d96fe10e19adfbe7 | 25 | py | Python | python-files/Analysis/plot_rber_curve.py | AdrianLundell/ldpc-investigation-master-thesis | 075f5cd10dae498e4fcda2f4aabedd0e27caf122 | [
"MIT"
] | 1 | 2022-03-07T15:52:10.000Z | 2022-03-07T15:52:10.000Z | python-files/Analysis/plot_rber_curve.py | AdrianLundell/ldpc-investigation-master-thesis | 075f5cd10dae498e4fcda2f4aabedd0e27caf122 | [
"MIT"
] | 6 | 2022-03-09T10:31:25.000Z | 2022-03-09T10:50:34.000Z | python-files/Analysis/plot_rber_curve.py | AdrianLundell/ldpc-investigation-master-thesis | 075f5cd10dae498e4fcda2f4aabedd0e27caf122 | [
"MIT"
] | null | null | null | #%%
#Calculate_capacity
| 6.25 | 19 | 0.72 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 22 | 0.88 |
ed2f544f652b3b129baea0ccaadd7dd101ff1f6a | 49 | py | Python | 2_b_builtins_dynamic_recall.py | traff/python_completion_benchmark | df25caaabf46f8b6eca34d5618052bff7ea8b0bf | [
"Xnet",
"X11"
] | 1 | 2018-11-23T18:53:05.000Z | 2018-11-23T18:53:05.000Z | 2_b_builtins_dynamic_recall.py | traff/python_completion_benchmark | df25caaabf46f8b6eca34d5618052bff7ea8b0bf | [
"Xnet",
"X11"
] | null | null | null | 2_b_builtins_dynamic_recall.py | traff/python_completion_benchmark | df25caaabf46f8b6eca34d5618052bff7ea8b0bf | [
"Xnet",
"X11"
] | null | null | null | import builtins
builtins.foo = 'bar'
foo # foo | 9.8 | 20 | 0.693878 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.204082 |
ed2f62da1eeae65673f61b0ca0f66640810c94b0 | 7,802 | py | Python | gva/data/validator/__init__.py | gva-jhabte/gva-data | 7a605ff01faa3fd38e91a324341d6166f17544a7 | [
"Apache-2.0"
] | null | null | null | gva/data/validator/__init__.py | gva-jhabte/gva-data | 7a605ff01faa3fd38e91a324341d6166f17544a7 | [
"Apache-2.0"
] | null | null | null | gva/data/validator/__init__.py | gva-jhabte/gva-data | 7a605ff01faa3fd38e91a324341d6166f17544a7 | [
"Apache-2.0"
] | null | null | null | """
Schema Validation
Tests a dictionary against a schema to test for conformity.
Schema definition is similar to - but not the same as - avro schemas
Supported Types:
- string - a character sequence
- format
- numeric - a number
- min:
- max
- date - a datetime.date or... | 32.781513 | 137 | 0.57575 | 4,849 | 0.621507 | 0 | 0 | 0 | 0 | 0 | 0 | 2,904 | 0.372212 |
ed3077484491f3ce68c431839bde2db924a8e7be | 2,350 | py | Python | fuzzers/ECP5/050-pio_routing/fuzzer.py | umarcor/prjtrellis | 9b3db7ba9a02e7d2f49c52ce062d5b22e320004c | [
"MIT"
] | 256 | 2018-03-05T00:28:46.000Z | 2022-03-04T22:33:29.000Z | fuzzers/ECP5/050-pio_routing/fuzzer.py | umarcor/prjtrellis | 9b3db7ba9a02e7d2f49c52ce062d5b22e320004c | [
"MIT"
] | 70 | 2018-03-12T21:55:02.000Z | 2020-06-22T12:06:08.000Z | fuzzers/ECP5/050-pio_routing/fuzzer.py | umarcor/prjtrellis | 9b3db7ba9a02e7d2f49c52ce062d5b22e320004c | [
"MIT"
] | 68 | 2018-03-12T21:05:01.000Z | 2021-03-14T21:08:33.000Z | from fuzzconfig import FuzzConfig
import interconnect
import nets
import pytrellis
import re
jobs = [
{
"pos": [(47, 0), (48, 0), (49, 0)],
"cfg": FuzzConfig(job="PIOROUTEL", family="ECP5", device="LFE5U-45F", ncl="pioroute.ncl",
tiles=["MIB_R47C0:PICL0", "MIB_R48C0:PICL1"... | 36.71875 | 109 | 0.50383 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 594 | 0.252766 |
ed32adc4f5470b9099ab1976e987f8994269a9b8 | 6,841 | py | Python | convnet3d/backend/tensorflow_backend.py | yecharlie/convnet3d | 0b2771eec149b196ef59b58d09eef71c9b201d40 | [
"MIT"
] | 6 | 2020-03-12T10:28:41.000Z | 2021-11-18T16:17:20.000Z | convnet3d/backend/tensorflow_backend.py | yecharlie/convnet3d | 0b2771eec149b196ef59b58d09eef71c9b201d40 | [
"MIT"
] | null | null | null | convnet3d/backend/tensorflow_backend.py | yecharlie/convnet3d | 0b2771eec149b196ef59b58d09eef71c9b201d40 | [
"MIT"
] | 1 | 2019-08-01T02:50:05.000Z | 2019-08-01T02:50:05.000Z | import tensorflow as tf
def _is_tensor(x):
"""Returns `True` if `x` is a symbolic tensor-like object.
From http://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/ops/image_ops_impl.py
Args:
x: A python object to check.
Returns:
`True` if `x` is a `tf.Tensor` or `tf.Va... | 35.630208 | 217 | 0.627686 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,778 | 0.406081 |
ed333974ac7fc15e4814ac031f495886accd5008 | 1,169 | py | Python | extensions/everywhere.py | cobrab11/black1-bot | 47c1a80029d6183fc990960b422bb3155360702d | [
"Apache-2.0"
] | 3 | 2015-10-15T15:40:17.000Z | 2021-06-08T05:39:21.000Z | extensions/everywhere.py | cobrab11/black1-bot | 47c1a80029d6183fc990960b422bb3155360702d | [
"Apache-2.0"
] | 1 | 2019-04-06T11:54:56.000Z | 2019-04-07T00:57:49.000Z | extensions/everywhere.py | cobrab11/black1-bot | 47c1a80029d6183fc990960b422bb3155360702d | [
"Apache-2.0"
] | 3 | 2015-10-26T14:49:57.000Z | 2018-03-04T15:34:11.000Z | # BS mark.1-55
# /* coding: utf-8 */
# BlackSmith plugin
# everywhere_plugin.py
# Coded by: WitcherGeralt ([email protected])
# http://witcher-team.ucoz.ru/
def handler_everywhere(type, source, body):
if body:
args = body.split()
if len(args) >= 2:
mtype = args[0].strip().lower()
if mtype == u'чат... | 27.186047 | 97 | 0.637297 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 423 | 0.333596 |
ed34a763af3706d73ed657481a4202938e665e7b | 327 | py | Python | 0100.same_tree/solution.py | WZMJ/Algorithms | 07f648541d38e24df38bda469665c12df6a50637 | [
"MIT"
] | 5 | 2020-05-23T02:18:26.000Z | 2021-07-05T05:36:01.000Z | 0100.same_tree/solution.py | WZMJ/Algorithms | 07f648541d38e24df38bda469665c12df6a50637 | [
"MIT"
] | 1 | 2020-06-10T07:17:24.000Z | 2020-07-20T02:21:24.000Z | 0100.same_tree/solution.py | WZMJ/Algorithms | 07f648541d38e24df38bda469665c12df6a50637 | [
"MIT"
] | 1 | 2019-04-23T13:01:50.000Z | 2019-04-23T13:01:50.000Z | from utils import TreeNode
class Solution:
def is_same_tree(self, p: TreeNode, q: TreeNode) -> bool:
if p is None and q is None:
return True
if not p or not q:
return False
return p.val == q.val and self.is_same_tree(p.left, q.left) and self.is_same_tree(p.right, q.... | 29.727273 | 107 | 0.620795 | 297 | 0.908257 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ed38d1c43b9d70e3ac1c1d8a3bb7c7068b2ec679 | 6,946 | py | Python | tests/test_azure.py | The-Academic-Observatory/mag-archiver | 76988020047b4ab9eb2d125f5141dfa7297a6fb3 | [
"Apache-2.0"
] | null | null | null | tests/test_azure.py | The-Academic-Observatory/mag-archiver | 76988020047b4ab9eb2d125f5141dfa7297a6fb3 | [
"Apache-2.0"
] | 5 | 2020-07-22T03:51:17.000Z | 2021-08-08T21:56:00.000Z | tests/test_azure.py | The-Academic-Observatory/mag-archiver | 76988020047b4ab9eb2d125f5141dfa7297a6fb3 | [
"Apache-2.0"
] | 1 | 2020-07-19T22:39:20.000Z | 2020-07-19T22:39:20.000Z | # Copyright 2020 Curtin University
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 39.022472 | 119 | 0.662971 | 5,805 | 0.835733 | 0 | 0 | 0 | 0 | 0 | 0 | 1,482 | 0.21336 |
ed3a7989a6ca1353a9b8069ec10dfdff872950bd | 16,283 | py | Python | tensorflow/contrib/framework/python/framework/tensor_util_test.py | uve/tensorflow | e08079463bf43e5963acc41da1f57e95603f8080 | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/framework/python/framework/tensor_util_test.py | uve/tensorflow | e08079463bf43e5963acc41da1f57e95603f8080 | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/framework/python/framework/tensor_util_test.py | uve/tensorflow | e08079463bf43e5963acc41da1f57e95603f8080 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | 41.966495 | 81 | 0.63772 | 14,685 | 0.901861 | 0 | 0 | 0 | 0 | 0 | 0 | 1,222 | 0.075048 |
ed3a9aaa2f6bd7c47892c2149c2e5804bf96b4fe | 1,442 | py | Python | tpv/modals/sugerencias.py | vallemrv/tpvB3 | 9988a528b32692b01bd042cc6486188c4dc2109b | [
"Apache-2.0"
] | 3 | 2017-07-16T09:31:56.000Z | 2019-03-20T11:11:24.000Z | tpv/modals/sugerencias.py | ljimaz33/tpvB3 | 9988a528b32692b01bd042cc6486188c4dc2109b | [
"Apache-2.0"
] | null | null | null | tpv/modals/sugerencias.py | ljimaz33/tpvB3 | 9988a528b32692b01bd042cc6486188c4dc2109b | [
"Apache-2.0"
] | 1 | 2022-01-02T11:22:45.000Z | 2022-01-02T11:22:45.000Z | # @Author: Manuel Rodriguez <valle>
# @Date: 10-May-2017
# @Email: [email protected]
# @Last modified by: valle
# @Last modified time: 23-Feb-2018
# @License: Apache license vesion 2.0
from kivy.uix.modalview import ModalView
from kivy.uix.button import Button
from kivy.properties import ObjectProperty, String... | 29.428571 | 72 | 0.645631 | 1,025 | 0.710818 | 0 | 0 | 0 | 0 | 0 | 0 | 217 | 0.150485 |
ed3b6f60e4e30cf75b95e63f68e2b18f1cb5a0e8 | 1,122 | py | Python | templates/integration/__init__.py | p7g/dd-trace-py | 141ac0ab6e9962e3b3bafc9de172076075289a19 | [
"Apache-2.0",
"BSD-3-Clause"
] | 308 | 2016-12-07T16:49:27.000Z | 2022-03-15T10:06:45.000Z | templates/integration/__init__.py | p7g/dd-trace-py | 141ac0ab6e9962e3b3bafc9de172076075289a19 | [
"Apache-2.0",
"BSD-3-Clause"
] | 1,928 | 2016-11-28T17:13:18.000Z | 2022-03-31T21:43:19.000Z | templates/integration/__init__.py | p7g/dd-trace-py | 141ac0ab6e9962e3b3bafc9de172076075289a19 | [
"Apache-2.0",
"BSD-3-Clause"
] | 311 | 2016-11-27T03:01:49.000Z | 2022-03-18T21:34:03.000Z | """
The foo integration instruments the bar and baz features of the
foo library.
Enabling
~~~~~~~~
The foo integration is enabled automatically when using
:ref:`ddtrace-run <ddtracerun>` or :ref:`patch_all() <patch_all>`.
Or use :ref:`patch() <patch>` to manually enable the integration::
from ddtrace import pa... | 20.777778 | 70 | 0.678253 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 861 | 0.76738 |
ed3b7de286ac4f4bebceec94867062df2dc32542 | 8,194 | py | Python | libs/linux/wpa_cli.py | hpagseddy/ZPUI | b82819e523987639c2dfab417f9895d7cd7ce049 | [
"Apache-2.0",
"MIT"
] | null | null | null | libs/linux/wpa_cli.py | hpagseddy/ZPUI | b82819e523987639c2dfab417f9895d7cd7ce049 | [
"Apache-2.0",
"MIT"
] | 2 | 2020-01-17T00:44:53.000Z | 2020-01-19T21:10:48.000Z | libs/linux/wpa_cli.py | hpagseddy/ZPUI | b82819e523987639c2dfab417f9895d7cd7ce049 | [
"Apache-2.0",
"MIT"
] | 1 | 2020-01-14T22:44:27.000Z | 2020-01-14T22:44:27.000Z | from subprocess import check_output, CalledProcessError
from ast import literal_eval
from time import sleep
from helpers import setup_logger
logger = setup_logger(__name__, "warning")
current_interface = None
#wpa_cli related functions and objects
def wpa_cli_command(*command):
run = ["wpa_cli"]
if current_... | 35.167382 | 128 | 0.691726 | 527 | 0.064315 | 0 | 0 | 0 | 0 | 0 | 0 | 2,397 | 0.292531 |
ed3c39ee9d299277d428f6d6c8408e0b9a778f0c | 17,635 | py | Python | demos/ServerSideBrowser.py | eukreign/python-v8 | f20d7bef766a2ae3573cc536e7d03e07afe9b173 | [
"Apache-2.0"
] | 2 | 2018-02-12T22:34:09.000Z | 2019-01-03T05:18:00.000Z | demos/ServerSideBrowser.py | eukreign/python-v8 | f20d7bef766a2ae3573cc536e7d03e07afe9b173 | [
"Apache-2.0"
] | null | null | null | demos/ServerSideBrowser.py | eukreign/python-v8 | f20d7bef766a2ae3573cc536e7d03e07afe9b173 | [
"Apache-2.0"
] | 3 | 2019-02-13T08:00:06.000Z | 2020-05-17T22:40:20.000Z | #!/usr/bin/env python
from __future__ import with_statement
import sys, traceback, os, os.path
import xml.dom.minidom
import logging
class Task(object):
@staticmethod
def waitAll(tasks):
pass
class FetchFile(Task):
def __init__(self, url):
self.url = url
def _... | 34.176357 | 155 | 0.489424 | 17,275 | 0.979586 | 281 | 0.015934 | 502 | 0.028466 | 0 | 0 | 1,690 | 0.095832 |
ed3c6cc6ba561bf90153ae8e03fe8da305f91245 | 4,169 | py | Python | pypeira/io/fits.py | WielderOfMjoelnir/pypeira | 4ef554c577875e09f55673f8e6ea53ba129fb37f | [
"MIT"
] | null | null | null | pypeira/io/fits.py | WielderOfMjoelnir/pypeira | 4ef554c577875e09f55673f8e6ea53ba129fb37f | [
"MIT"
] | null | null | null | pypeira/io/fits.py | WielderOfMjoelnir/pypeira | 4ef554c577875e09f55673f8e6ea53ba129fb37f | [
"MIT"
] | null | null | null | from __future__ import division
import fitsio
"""
A FITS file is comprised of segments called Header/Data Units (HDUs), where the first
HDU is called the 'Primary HDU', or 'Primary Array'. The primary data array can contain
a 1-999 dimensional array of 1, 2 or 4 byte integers or 4 or 8 byte floating point numbers
usi... | 38.962617 | 104 | 0.710962 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,485 | 0.835932 |
ed3d3135e9d1178c7b64b4da6cccbf9abc64c76d | 1,727 | py | Python | system/lib/update_musl.py | RyanCargan/emscripten | 6d3859f88e1d6394395760153c0a8cfa6a876ac7 | [
"MIT"
] | 6,541 | 2019-01-17T22:13:18.000Z | 2022-03-31T07:20:21.000Z | system/lib/update_musl.py | RyanCargan/emscripten | 6d3859f88e1d6394395760153c0a8cfa6a876ac7 | [
"MIT"
] | 7,584 | 2019-01-17T22:58:27.000Z | 2022-03-31T23:10:22.000Z | system/lib/update_musl.py | RyanCargan/emscripten | 6d3859f88e1d6394395760153c0a8cfa6a876ac7 | [
"MIT"
] | 1,275 | 2019-01-19T16:18:04.000Z | 2022-03-30T19:32:35.000Z | #!/usr/bin/env python3
# Copyright 2021 The Emscripten Authors. All rights reserved.
# Emscripten is available under two separate licenses, the MIT license and the
# University of Illinois/NCSA Open Source License. Both these licenses can be
# found in the LICENSE file.
"""Simple script for updating musl from extern... | 28.311475 | 78 | 0.72264 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,121 | 0.649102 |
ed3dd47b74e1445e656b23816bec9c93f6315a3e | 3,358 | py | Python | src/scout_apm/instruments/pymongo.py | xiamx/scout_apm_python | d03dab45f65cf7d1030e11fabf6da4cf6e72ee59 | [
"MIT"
] | null | null | null | src/scout_apm/instruments/pymongo.py | xiamx/scout_apm_python | d03dab45f65cf7d1030e11fabf6da4cf6e72ee59 | [
"MIT"
] | null | null | null | src/scout_apm/instruments/pymongo.py | xiamx/scout_apm_python | d03dab45f65cf7d1030e11fabf6da4cf6e72ee59 | [
"MIT"
] | null | null | null | from __future__ import absolute_import, division, print_function, unicode_literals
import logging
# Used in the exec() call below.
from scout_apm.core.monkey import monkeypatch_method, unpatch_method # noqa: F401
from scout_apm.core.tracked_request import TrackedRequest # noqa: F401
logger = logging.getLogger(__na... | 28.700855 | 87 | 0.579512 | 3,029 | 0.902025 | 0 | 0 | 0 | 0 | 0 | 0 | 1,266 | 0.37701 |
ed3e5d031590d8e6dff347577131d013386c5855 | 3,235 | py | Python | measures/tests/factories.py | uktrade/tamato | 4ba2ffb25eea2887e4e081c81da7634cd7b4f9ca | [
"MIT"
] | 14 | 2020-03-25T11:11:29.000Z | 2022-03-08T20:41:33.000Z | measures/tests/factories.py | uktrade/tamato | 4ba2ffb25eea2887e4e081c81da7634cd7b4f9ca | [
"MIT"
] | 352 | 2020-03-25T10:42:09.000Z | 2022-03-30T15:32:26.000Z | measures/tests/factories.py | uktrade/tamato | 4ba2ffb25eea2887e4e081c81da7634cd7b4f9ca | [
"MIT"
] | 3 | 2020-08-06T12:22:41.000Z | 2022-01-16T11:51:12.000Z | import random
from typing import Optional
import factory
from common.tests import factories
from measures.sheet_importers import MeasureSheetRow
class MeasureSheetRowFactory(factory.Factory):
"""
A factory that produces a row that might be read from a sheet of measures as
recognised by the :class:`measu... | 37.616279 | 98 | 0.681607 | 3,085 | 0.953632 | 0 | 0 | 919 | 0.28408 | 0 | 0 | 910 | 0.281298 |
ed3e7f550a07ae5965b40bbbda69660ec272d2cf | 6,077 | py | Python | autoscalingsim/scaling/policiesbuilder/metric/correlator/correlator.py | Remit/autoscaling-simulator | 091943c0e9eedf9543e9305682a067ab60f56def | [
"MIT"
] | 6 | 2021-03-10T16:23:10.000Z | 2022-01-14T04:57:46.000Z | autoscalingsim/scaling/policiesbuilder/metric/correlator/correlator.py | Remit/autoscaling-simulator | 091943c0e9eedf9543e9305682a067ab60f56def | [
"MIT"
] | null | null | null | autoscalingsim/scaling/policiesbuilder/metric/correlator/correlator.py | Remit/autoscaling-simulator | 091943c0e9eedf9543e9305682a067ab60f56def | [
"MIT"
] | 1 | 2022-01-14T04:57:55.000Z | 2022-01-14T04:57:55.000Z | from abc import ABC, abstractmethod
import collections
import pandas as pd
from autoscalingsim.utils.error_check import ErrorChecker
class Correlator(ABC):
_Registry = {}
@abstractmethod
def _compute_correlation(self, metrics_vals_1 : pd.Series, metrics_vals_2 : pd.Series, lag : int):
pass
... | 57.87619 | 245 | 0.751687 | 5,913 | 0.973013 | 0 | 0 | 539 | 0.088695 | 0 | 0 | 178 | 0.029291 |