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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c94aca271568ab00f3c86f9599a88f50e9eeab3a | 95 | py | Python | fruitsales/apps.py | khajime/fruit-sales-management-console | 4f802578cd9ddcdbbc3259263d0d19df11432a0c | [
"MIT"
] | null | null | null | fruitsales/apps.py | khajime/fruit-sales-management-console | 4f802578cd9ddcdbbc3259263d0d19df11432a0c | [
"MIT"
] | 16 | 2019-02-21T14:12:01.000Z | 2019-03-11T08:00:15.000Z | fruitsales/apps.py | khajime/fruit-sales-management-console | 4f802578cd9ddcdbbc3259263d0d19df11432a0c | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class FruitsalesConfig(AppConfig):
name = 'fruitsales'
| 15.833333 | 34 | 0.768421 | 58 | 0.610526 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 0.126316 |
c94dc603c09e41f347618a870bb8e3d545494ed0 | 61 | py | Python | run.py | Tokisaki-Kurumi001/ASMART-34 | 04ffbabe4a1c18f8ed68a2ee883145985fc5ec7f | [
"MIT"
] | 3 | 2021-04-17T08:34:08.000Z | 2021-04-17T08:57:23.000Z | run.py | Tokisaki-Kurumi001/ASMART-34 | 04ffbabe4a1c18f8ed68a2ee883145985fc5ec7f | [
"MIT"
] | null | null | null | run.py | Tokisaki-Kurumi001/ASMART-34 | 04ffbabe4a1c18f8ed68a2ee883145985fc5ec7f | [
"MIT"
] | null | null | null | import os
os.system('python function_18351015.py > log.txt')
| 20.333333 | 50 | 0.770492 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 39 | 0.639344 |
c950e89a11e706b3a1a0ba3575143820351f7247 | 3,337 | py | Python | upandas_test.py | kokes/upandas | f2150e5a74c815b27fd08fc841da01c3b455dadc | [
"MIT"
] | null | null | null | upandas_test.py | kokes/upandas | f2150e5a74c815b27fd08fc841da01c3b455dadc | [
"MIT"
] | null | null | null | upandas_test.py | kokes/upandas | f2150e5a74c815b27fd08fc841da01c3b455dadc | [
"MIT"
] | null | null | null | import sys, os
import upandas as upd
# Run a single Python script
# For many simple, single file projects, you may find it inconvenient
# to write a complete Dockerfile. In such cases, you can run a Python
# script by using the Python Docker image directly:
# versions to consider: 3 (600+ MB), slim (150 MB) alpine (9... | 29.530973 | 132 | 0.574768 | 1,827 | 0.546842 | 0 | 0 | 0 | 0 | 0 | 0 | 1,202 | 0.359773 |
c953f88756774d3e9d070501efa3054134aaa4e2 | 6,555 | py | Python | prettyqt/widgets/lineedit.py | phil65/PrettyQt | 26327670c46caa039c9bd15cb17a35ef5ad72e6c | [
"MIT"
] | 7 | 2019-05-01T01:34:36.000Z | 2022-03-08T02:24:14.000Z | prettyqt/widgets/lineedit.py | phil65/PrettyQt | 26327670c46caa039c9bd15cb17a35ef5ad72e6c | [
"MIT"
] | 141 | 2019-04-16T11:22:01.000Z | 2021-04-14T15:12:36.000Z | prettyqt/widgets/lineedit.py | phil65/PrettyQt | 26327670c46caa039c9bd15cb17a35ef5ad72e6c | [
"MIT"
] | 5 | 2019-04-17T11:48:19.000Z | 2021-11-21T10:30:19.000Z | from __future__ import annotations
from typing import Literal
from prettyqt import constants, core, gui, widgets
from prettyqt.qt import QtCore, QtWidgets
from prettyqt.utils import InvalidParamError, bidict
ECHO_MODE = bidict(
normal=QtWidgets.QLineEdit.EchoMode.Normal,
no_echo=QtWidgets.QLineEdit.EchoMode... | 31.066351 | 89 | 0.653547 | 5,402 | 0.824104 | 0 | 0 | 0 | 0 | 0 | 0 | 1,042 | 0.158963 |
c9544ffadc07ec885bd33e7c84ffb14a0d5a171b | 555 | py | Python | puzzles/easy/puzzle8e.py | mhw32/Code-Boola-Python-Workshop | 08bc551b173ff372a267592f58586adb52c582e3 | [
"MIT"
] | null | null | null | puzzles/easy/puzzle8e.py | mhw32/Code-Boola-Python-Workshop | 08bc551b173ff372a267592f58586adb52c582e3 | [
"MIT"
] | null | null | null | puzzles/easy/puzzle8e.py | mhw32/Code-Boola-Python-Workshop | 08bc551b173ff372a267592f58586adb52c582e3 | [
"MIT"
] | null | null | null | # ------------------------------------
# CODE BOOLA 2015 PYTHON WORKSHOP
# Mike Wu, Jonathan Chang, Kevin Tan
# Puzzle Challenges Number 8
# ------------------------------------
# INSTRUCTIONS:
# Write a function that takes an integer
# as its argument and converts it to a
# string. Return the first character of
... | 21.346154 | 46 | 0.585586 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 508 | 0.915315 |
c95465582eabaa7004deb1d71c383aba26908941 | 1,086 | py | Python | nis_visualizeer/ukf-nis-vis.py | vikram216/unscented-kalman-filter | 1619fe365c73f198b39fa1de70fd5e203f8715a0 | [
"MIT"
] | null | null | null | nis_visualizeer/ukf-nis-vis.py | vikram216/unscented-kalman-filter | 1619fe365c73f198b39fa1de70fd5e203f8715a0 | [
"MIT"
] | null | null | null | nis_visualizeer/ukf-nis-vis.py | vikram216/unscented-kalman-filter | 1619fe365c73f198b39fa1de70fd5e203f8715a0 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
"""
A chi square (X2) statistic is used to investigate whether distributions
of categorical variables differ from one another. Here we consider 3 degrees
of freedom for our system. Plotted against 95% line"""
lidar_nis = []
with open('NISvals_laser.txt') as f:
for line in f:
... | 24.681818 | 78 | 0.721915 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 538 | 0.495396 |
c95546315e55dfb705f35c46c08aaa6f9bae96a5 | 695 | py | Python | benchmark/OfflineRL/offlinerl/config/algo/crr_config.py | ssimonc/NeoRL | 098c58c8e4c3e43e67803f6384619d3bfe7fce5d | [
"Apache-2.0"
] | 50 | 2021-02-07T08:10:28.000Z | 2022-03-25T09:10:26.000Z | benchmark/OfflineRL/offlinerl/config/algo/crr_config.py | ssimonc/NeoRL | 098c58c8e4c3e43e67803f6384619d3bfe7fce5d | [
"Apache-2.0"
] | 7 | 2021-07-29T14:58:31.000Z | 2022-02-01T08:02:54.000Z | benchmark/OfflineRL/offlinerl/config/algo/crr_config.py | ssimonc/NeoRL | 098c58c8e4c3e43e67803f6384619d3bfe7fce5d | [
"Apache-2.0"
] | 4 | 2021-04-01T16:30:15.000Z | 2022-03-31T17:38:05.000Z | import torch
from offlinerl.utils.exp import select_free_cuda
task = "Hopper-v3"
task_data_type = "low"
task_train_num = 99
seed = 42
device = 'cuda'+":"+str(select_free_cuda()) if torch.cuda.is_available() else 'cpu'
obs_shape = None
act_shape = None
max_action = None
hidden_features = 256
hidden_layers = 2
atoms ... | 16.547619 | 83 | 0.680576 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 135 | 0.194245 |
c9555f153510ab57941a2d63dc997b5c2a9d5575 | 8,325 | py | Python | cykel/models/cykel_log_entry.py | mohnbroetchen2/cykel_jenarad | 6ed9fa45d8b98e1021bc41a57e1250ac6f0cfcc4 | [
"MIT"
] | null | null | null | cykel/models/cykel_log_entry.py | mohnbroetchen2/cykel_jenarad | 6ed9fa45d8b98e1021bc41a57e1250ac6f0cfcc4 | [
"MIT"
] | null | null | null | cykel/models/cykel_log_entry.py | mohnbroetchen2/cykel_jenarad | 6ed9fa45d8b98e1021bc41a57e1250ac6f0cfcc4 | [
"MIT"
] | null | null | null | from django.contrib.admin.options import get_content_type_for_model
from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import ObjectDoesNotExist
from django.db import models
from django.urls import reverse
from django.u... | 37.669683 | 87 | 0.538498 | 6,300 | 0.756757 | 0 | 0 | 426 | 0.051171 | 0 | 0 | 2,275 | 0.273273 |
c9565831d1ae75fe2b15d03a39a78761d5e269d5 | 7,991 | py | Python | mlx/od/archive/ssd/test_utils.py | lewfish/mlx | 027decf72bf9d96de3b4de13dcac7b352b07fd63 | [
"Apache-2.0"
] | null | null | null | mlx/od/archive/ssd/test_utils.py | lewfish/mlx | 027decf72bf9d96de3b4de13dcac7b352b07fd63 | [
"Apache-2.0"
] | null | null | null | mlx/od/archive/ssd/test_utils.py | lewfish/mlx | 027decf72bf9d96de3b4de13dcac7b352b07fd63 | [
"Apache-2.0"
] | null | null | null | import unittest
import torch
from torch.nn.functional import binary_cross_entropy as bce, l1_loss
from mlx.od.ssd.utils import (
ObjectDetectionGrid, BoxList, compute_intersection, compute_iou, F1)
class TestIOU(unittest.TestCase):
def test_compute_intersection(self):
a = torch.tensor([[0, 0, 2, 2],
... | 36.322727 | 79 | 0.511325 | 7,732 | 0.967589 | 0 | 0 | 0 | 0 | 0 | 0 | 381 | 0.047679 |
c956809dc40104300810383514543a84d7e16eb4 | 3,284 | py | Python | src/utilsmodule/main.py | jke94/WilliamHill-WebScraping | d570ff7ba8a5c35d7c852327910d39b715ce5125 | [
"MIT"
] | null | null | null | src/utilsmodule/main.py | jke94/WilliamHill-WebScraping | d570ff7ba8a5c35d7c852327910d39b715ce5125 | [
"MIT"
] | 1 | 2020-10-13T15:44:40.000Z | 2020-10-13T15:44:40.000Z | src/utilsmodule/main.py | jke94/WilliamHill-WebScraping | d570ff7ba8a5c35d7c852327910d39b715ce5125 | [
"MIT"
] | null | null | null | '''
AUTOR: Javier Carracedo
Date: 08/10/2020
Auxiliar class to test methods from WilliamHillURLs.py
'''
import WilliamHillURLs
if __name__ == "__main__":
myVariable = WilliamHillURLs.WilliamHillURLs()
# Print all matches played actually.
for item in myVariable.GetAllMatchsPlayedActually(m... | 49.014925 | 109 | 0.670524 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,015 | 0.901885 |
c9570eba69366671540e993ccc63b21a8b23a785 | 3,185 | py | Python | mys/cli/subparsers/install.py | nsauzede/mys | 5f5db80b25e44e3ab9c4b97cb9a0fd6fa3fc0267 | [
"MIT"
] | null | null | null | mys/cli/subparsers/install.py | nsauzede/mys | 5f5db80b25e44e3ab9c4b97cb9a0fd6fa3fc0267 | [
"MIT"
] | null | null | null | mys/cli/subparsers/install.py | nsauzede/mys | 5f5db80b25e44e3ab9c4b97cb9a0fd6fa3fc0267 | [
"MIT"
] | null | null | null | import glob
import os
import shutil
import sys
import tarfile
from tempfile import TemporaryDirectory
from ..utils import ERROR
from ..utils import Spinner
from ..utils import add_jobs_argument
from ..utils import add_no_ccache_argument
from ..utils import add_verbose_argument
from ..utils import box_print
from ..util... | 28.4375 | 85 | 0.674725 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 525 | 0.164835 |
c957b9e1d84b2cf858f2f0ed59b9eda407c2dff9 | 1,011 | py | Python | app/api/v2/models/sale.py | kwanj-k/storemanager-v2 | 89e9573543e32de2e8503dc1440b4ad907bb10b5 | [
"MIT"
] | 1 | 2020-02-29T20:14:32.000Z | 2020-02-29T20:14:32.000Z | app/api/v2/models/sale.py | kwanj-k/storemanager-v2 | 89e9573543e32de2e8503dc1440b4ad907bb10b5 | [
"MIT"
] | 5 | 2018-10-24T17:28:48.000Z | 2019-10-22T11:09:19.000Z | app/api/v2/models/sale.py | kwanj-k/storemanager-v2 | 89e9573543e32de2e8503dc1440b4ad907bb10b5 | [
"MIT"
] | null | null | null | """
A model class for Sale
"""
# local imports
from app.api.common.utils import dt
from app.api.v2.db_config import conn
from app.api.v2.models.cart import Cart
# cursor to perform database operations
cur = conn.cursor()
class Sale(Cart):
"""
Sale object which inherites some of its attributes from cart
... | 25.275 | 106 | 0.578635 | 784 | 0.77547 | 0 | 0 | 0 | 0 | 0 | 0 | 368 | 0.363996 |
c9582e0280978de265a7060549f58e588eceb72b | 3,306 | py | Python | src/dembones/collector.py | TransactCharlie/dembones | b5540a89d4c6d535b589a1a2b06697569879bc05 | [
"MIT"
] | null | null | null | src/dembones/collector.py | TransactCharlie/dembones | b5540a89d4c6d535b589a1a2b06697569879bc05 | [
"MIT"
] | null | null | null | src/dembones/collector.py | TransactCharlie/dembones | b5540a89d4c6d535b589a1a2b06697569879bc05 | [
"MIT"
] | null | null | null | import aiohttp
from bs4 import BeautifulSoup
import asyncio
from dembones.webpage import WebPage
import dembones.urltools as ut
import logging
log = logging.getLogger(__name__)
class Collector:
url_hash = {}
def __init__(self, max_concurrent_fetches=3, max_depth=3, fetch_timeout=5,
target_... | 38.894118 | 95 | 0.629462 | 3,125 | 0.945251 | 0 | 0 | 0 | 0 | 2,412 | 0.729583 | 959 | 0.290079 |
c9599538e684b00c1b9eb75ec04458b635c13ae8 | 501 | py | Python | py_tdlib/constructors/input_inline_query_result_video.py | Mr-TelegramBot/python-tdlib | 2e2d21a742ebcd439971a32357f2d0abd0ce61eb | [
"MIT"
] | 24 | 2018-10-05T13:04:30.000Z | 2020-05-12T08:45:34.000Z | py_tdlib/constructors/input_inline_query_result_video.py | MrMahdi313/python-tdlib | 2e2d21a742ebcd439971a32357f2d0abd0ce61eb | [
"MIT"
] | 3 | 2019-06-26T07:20:20.000Z | 2021-05-24T13:06:56.000Z | py_tdlib/constructors/input_inline_query_result_video.py | MrMahdi313/python-tdlib | 2e2d21a742ebcd439971a32357f2d0abd0ce61eb | [
"MIT"
] | 5 | 2018-10-05T14:29:28.000Z | 2020-08-11T15:04:10.000Z | from ..factory import Type
class inputInlineQueryResultVideo(Type):
id = None # type: "string"
title = None # type: "string"
description = None # type: "string"
thumbnail_url = None # type: "string"
video_url = None # type: "string"
mime_type = None # type: "string"
video_width = None # type: "int32"
v... | 31.3125 | 60 | 0.688623 | 471 | 0.94012 | 0 | 0 | 0 | 0 | 0 | 0 | 191 | 0.381238 |
c959a09cafe37155453fcdb077c647271d246317 | 710 | py | Python | translation/eval_args.py | AkshatSh/BinarizedNMT | 7fa15149fdfcad6b1fd0956157c3730f3dcd781f | [
"MIT"
] | 10 | 2019-01-19T08:15:05.000Z | 2021-12-02T08:54:50.000Z | translation/eval_args.py | AkshatSh/BinarizedNMT | 7fa15149fdfcad6b1fd0956157c3730f3dcd781f | [
"MIT"
] | null | null | null | translation/eval_args.py | AkshatSh/BinarizedNMT | 7fa15149fdfcad6b1fd0956157c3730f3dcd781f | [
"MIT"
] | 2 | 2019-01-25T21:19:49.000Z | 2019-03-21T11:38:13.000Z | import argparse
import train_args
def get_arg_parser() -> argparse.ArgumentParser:
'''
A set of parameters for evaluation
'''
parser = train_args.get_arg_parser()
parser.add_argument('--load_path', type=str, help='the path of the model to test')
parser.add_argument('--eval_train', action='store... | 50.714286 | 126 | 0.723944 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 337 | 0.474648 |
c959fbbb426057adb9170ca9df4b29dd550126f4 | 43,792 | py | Python | src/fidelity_estimation_pauli_sampling.py | akshayseshadri/minimax-fidelity-estimation | 07ff539dc5ea8280bc4f33444da3d6a90c606833 | [
"MIT"
] | 1 | 2021-12-16T14:23:46.000Z | 2021-12-16T14:23:46.000Z | src/fidelity_estimation_pauli_sampling.py | akshayseshadri/minimax-fidelity-estimation | 07ff539dc5ea8280bc4f33444da3d6a90c606833 | [
"MIT"
] | null | null | null | src/fidelity_estimation_pauli_sampling.py | akshayseshadri/minimax-fidelity-estimation | 07ff539dc5ea8280bc4f33444da3d6a90c606833 | [
"MIT"
] | null | null | null | """
Creates a fidelity estimator for any pure state, using randomized Pauli measurement strategy.
Author: Akshay Seshadri
"""
import warnings
import numpy as np
import scipy as sp
from scipy import optimize
import project_root # noqa
from src.optimization.proximal_gradient import minimize_proximal_gradi... | 59.258457 | 226 | 0.643999 | 21,307 | 0.48655 | 0 | 0 | 0 | 0 | 0 | 0 | 27,352 | 0.624589 |
c95c3a9b1e12620c6fdf7ce0fba7e46782237c62 | 2,054 | py | Python | until.py | zlinao/COMP5212-project1 | fa6cb10d238de187fbb891499916c6b44a0cd7b7 | [
"Apache-2.0"
] | 3 | 2018-09-19T11:46:53.000Z | 2018-10-09T04:48:28.000Z | until.py | zlinao/COMP5212-project1 | fa6cb10d238de187fbb891499916c6b44a0cd7b7 | [
"Apache-2.0"
] | null | null | null | until.py | zlinao/COMP5212-project1 | fa6cb10d238de187fbb891499916c6b44a0cd7b7 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Feb 28 10:29:52 2018
@author: lin
"""
import numpy as np
import matplotlib.pyplot as plt
def accuracy(x,y,model):
a = model.predict(x,y)
a[a>=0.5]=1
a[a<0.5]=0
return np.sum(a==y)/len(a)
data1 = np.load("datasets/breast-cancer.n... | 25.358025 | 79 | 0.601266 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 465 | 0.226388 |
c960f97df84624c96f4c85fc91f46edd0a467d9e | 11,996 | py | Python | dumpfreeze/main.py | rkcf/dumpfreeze | e9b18e4bc4574ff3b647a075cecd72977dc8f59a | [
"MIT"
] | 1 | 2020-01-30T17:59:50.000Z | 2020-01-30T17:59:50.000Z | dumpfreeze/main.py | rkcf/dumpfreeze | e9b18e4bc4574ff3b647a075cecd72977dc8f59a | [
"MIT"
] | null | null | null | dumpfreeze/main.py | rkcf/dumpfreeze | e9b18e4bc4574ff3b647a075cecd72977dc8f59a | [
"MIT"
] | null | null | null | # dumpfreeze
# Create MySQL dumps and backup to Amazon Glacier
import os
import logging
import datetime
import click
import uuid
import sqlalchemy as sa
from dumpfreeze import backup as bak
from dumpfreeze import aws
from dumpfreeze import inventorydb
from dumpfreeze import __version__
logger = logging.getLogger(__na... | 29.766749 | 79 | 0.614288 | 0 | 0 | 0 | 0 | 11,402 | 0.950483 | 0 | 0 | 2,429 | 0.202484 |
c96260912cab6b5833f970ad06a26821cebe5439 | 886 | py | Python | 01-tapsterbot/click-accuracy/makeTestData.py | AppTestBot/AppTestBot | 035e93e662753e50d7dcc38d6fd362933186983b | [
"Apache-2.0"
] | null | null | null | 01-tapsterbot/click-accuracy/makeTestData.py | AppTestBot/AppTestBot | 035e93e662753e50d7dcc38d6fd362933186983b | [
"Apache-2.0"
] | null | null | null | 01-tapsterbot/click-accuracy/makeTestData.py | AppTestBot/AppTestBot | 035e93e662753e50d7dcc38d6fd362933186983b | [
"Apache-2.0"
] | null | null | null | import csv
FLAGS = None
def main():
with open('dataset/test.csv', 'w') as csv_file:
writer = csv.writer(csv_file, delimiter=',')
#for w in range(-FLAGS.width, FLAGS.width+1i):
w = -60
while w <= 60:
h = -28
#for h in range(-FLAGS.height, FLAGS.height+1):
... | 28.580645 | 80 | 0.497743 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 211 | 0.238149 |
c96277ac68a88dc09c944967b21d05e1368096d4 | 3,546 | py | Python | CreateBigDataFrame.py | ezsolti/MVA_PWR_data | 3e64c5b1bd643d5ba5d6e275b426d601cff7b270 | [
"MIT"
] | 2 | 2022-02-04T10:47:37.000Z | 2022-03-15T13:03:19.000Z | CreateBigDataFrame.py | ezsolti/MVA_PWR_data | 3e64c5b1bd643d5ba5d6e275b426d601cff7b270 | [
"MIT"
] | null | null | null | CreateBigDataFrame.py | ezsolti/MVA_PWR_data | 3e64c5b1bd643d5ba5d6e275b426d601cff7b270 | [
"MIT"
] | 1 | 2022-01-13T15:55:17.000Z | 2022-01-13T15:55:17.000Z | """
Script to create dataframe from serpent bumat files
including all the nuclides.
Zsolt Elter 2019
"""
import json
import os
with open ('nuclides.json') as json_file:
nuclidesDict = json.load(json_file)
#final name of the file
dataFrame='PWR_UOX-MOX_BigDataFrame-SF-GSRC-noReactorType.csv'
def readInventory... | 35.818182 | 164 | 0.620135 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,692 | 0.477157 |
c963dca9a730234f66f325086da0df26ded50d93 | 453 | py | Python | todolist_backend/cli.py | RenoirTan/TodoListBackend | 149bdf1d883891c87b27f01996816bff251f11d8 | [
"MIT"
] | null | null | null | todolist_backend/cli.py | RenoirTan/TodoListBackend | 149bdf1d883891c87b27f01996816bff251f11d8 | [
"MIT"
] | null | null | null | todolist_backend/cli.py | RenoirTan/TodoListBackend | 149bdf1d883891c87b27f01996816bff251f11d8 | [
"MIT"
] | null | null | null | from mongoengine import disconnect
from waitress import serve
from todolist_backend.server import app, get_configs
from .database import panic_init
from .info import MONGOENGINE_ALIAS
def run_debug():
panic_init()
app.run(**get_configs())
# disconnect(alias=MONGOENGINE_ALIAS)
def run_production():
p... | 22.65 | 52 | 0.743929 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 81 | 0.178808 |
c964301c7d47d614f521b894d1e55685f398fbd2 | 86 | py | Python | sample_code/002_add.py | kaede-san0910/workshop-2022 | 961d3ebfc899565aa6913c90b08881ef857ca945 | [
"Apache-2.0"
] | null | null | null | sample_code/002_add.py | kaede-san0910/workshop-2022 | 961d3ebfc899565aa6913c90b08881ef857ca945 | [
"Apache-2.0"
] | null | null | null | sample_code/002_add.py | kaede-san0910/workshop-2022 | 961d3ebfc899565aa6913c90b08881ef857ca945 | [
"Apache-2.0"
] | null | null | null | a = int(input("a = "))
b = int(input("b = "))
print("{} + {} = {}".format(a, b, a+b)) | 21.5 | 39 | 0.406977 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 26 | 0.302326 |
c965792691ce7606e38e36d2ae95ee8c42d4351b | 2,953 | py | Python | archer_views.py | splunk-soar-connectors/archer | 65b9a5e9e250b6407e3aad08b86a483499a6210f | [
"Apache-2.0"
] | null | null | null | archer_views.py | splunk-soar-connectors/archer | 65b9a5e9e250b6407e3aad08b86a483499a6210f | [
"Apache-2.0"
] | 1 | 2022-02-08T22:54:54.000Z | 2022-02-08T22:54:54.000Z | archer_views.py | splunk-soar-connectors/archer | 65b9a5e9e250b6407e3aad08b86a483499a6210f | [
"Apache-2.0"
] | null | null | null | # File: archer_views.py
#
# Copyright (c) 2016-2022 Splunk Inc.
#
# 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 appli... | 38.350649 | 95 | 0.562817 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 978 | 0.331189 |
c96886f093360dec7c0ce79819456ac3947c46e0 | 12,198 | py | Python | napari/plugins/exceptions.py | yinawang28/napari | 6ea95a9fa2f9150a4dbb5ec1286b8ff2020c3957 | [
"BSD-3-Clause"
] | null | null | null | napari/plugins/exceptions.py | yinawang28/napari | 6ea95a9fa2f9150a4dbb5ec1286b8ff2020c3957 | [
"BSD-3-Clause"
] | null | null | null | napari/plugins/exceptions.py | yinawang28/napari | 6ea95a9fa2f9150a4dbb5ec1286b8ff2020c3957 | [
"BSD-3-Clause"
] | null | null | null | import re
import sys
from collections import defaultdict
from types import TracebackType
from typing import (
Callable,
DefaultDict,
Dict,
Generator,
List,
Optional,
Tuple,
Type,
Union,
)
# This is a mapping of plugin_name -> PluginError instances
# all PluginErrors get added to thi... | 33.237057 | 79 | 0.565175 | 2,161 | 0.17716 | 5,963 | 0.488851 | 0 | 0 | 0 | 0 | 5,199 | 0.426217 |
c9693a49a18c1714e3e73fb34025f16a983d9fca | 572 | py | Python | examples/federation/account.py | syfun/starlette-graphql | 1f57b60a9699bc6a6a2b95d5596ffa93ef13c262 | [
"MIT"
] | 14 | 2020-04-03T08:18:21.000Z | 2021-11-10T04:39:45.000Z | examples/federation/account.py | syfun/starlette-graphql | 1f57b60a9699bc6a6a2b95d5596ffa93ef13c262 | [
"MIT"
] | 2 | 2021-08-31T20:25:23.000Z | 2021-09-21T14:40:56.000Z | examples/federation/account.py | syfun/starlette-graphql | 1f57b60a9699bc6a6a2b95d5596ffa93ef13c262 | [
"MIT"
] | 1 | 2020-08-27T17:04:29.000Z | 2020-08-27T17:04:29.000Z | import uvicorn
from gql import gql, reference_resolver, query
from stargql import GraphQL
from helper import get_user_by_id, users
type_defs = gql("""
type Query {
me: User
}
type User @key(fields: "id") {
id: ID!
name: String
username: String
}
""")
@query('me')
def get_me(_, info):
r... | 16.342857 | 51 | 0.687063 | 0 | 0 | 0 | 0 | 173 | 0.302448 | 0 | 0 | 152 | 0.265734 |
c96971b273caac5ab991341745cb2d8e72b76d77 | 2,519 | py | Python | tests/api_resources/test_application_fee.py | bhch/async-stripe | 75d934a8bb242f664e7be30812c12335cf885287 | [
"MIT",
"BSD-3-Clause"
] | 8 | 2021-05-29T08:57:58.000Z | 2022-02-19T07:09:25.000Z | tests/api_resources/test_application_fee.py | bhch/async-stripe | 75d934a8bb242f664e7be30812c12335cf885287 | [
"MIT",
"BSD-3-Clause"
] | 5 | 2021-05-31T10:18:36.000Z | 2022-01-25T11:39:03.000Z | tests/api_resources/test_application_fee.py | bhch/async-stripe | 75d934a8bb242f664e7be30812c12335cf885287 | [
"MIT",
"BSD-3-Clause"
] | 1 | 2021-05-29T13:27:10.000Z | 2021-05-29T13:27:10.000Z | from __future__ import absolute_import, division, print_function
import stripe
import pytest
pytestmark = pytest.mark.asyncio
TEST_RESOURCE_ID = "fee_123"
TEST_FEEREFUND_ID = "fr_123"
class TestApplicationFee(object):
async def test_is_listable(self, request_mock):
resources = await stripe.Applicatio... | 35.985714 | 78 | 0.687574 | 2,324 | 0.922588 | 0 | 0 | 0 | 0 | 2,217 | 0.880111 | 252 | 0.10004 |
c96a052abb332bba00f134e10d854c779b770b2a | 866 | py | Python | code/busyschedule.py | matthewReff/Kattis-Problems | 848628af630c990fb91bde6256a77afad6a3f5f6 | [
"MIT"
] | 8 | 2020-02-21T22:21:01.000Z | 2022-02-16T05:30:54.000Z | code/busyschedule.py | matthewReff/Kattis-Problems | 848628af630c990fb91bde6256a77afad6a3f5f6 | [
"MIT"
] | null | null | null | code/busyschedule.py | matthewReff/Kattis-Problems | 848628af630c990fb91bde6256a77afad6a3f5f6 | [
"MIT"
] | 3 | 2020-08-05T05:42:35.000Z | 2021-08-30T05:39:51.000Z | def busyschedule():
times = input()
while (times != 0):
timeList = []
for i in range(0, times):
timeS = raw_input()
time = timeS.split()
time[0] = time[0].split(":")
if time[1] == "a.m.":
if time[0][0] == "12":
t... | 30.928571 | 82 | 0.39261 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 19 | 0.02194 |
c96af4a490471a665152773f8f3b2a90f985672a | 607 | py | Python | tests/backtracking/test_path_through_grid.py | davjohnst/fundamentals | f8aff4621432c3187305dd04563425f54ea08495 | [
"Apache-2.0"
] | null | null | null | tests/backtracking/test_path_through_grid.py | davjohnst/fundamentals | f8aff4621432c3187305dd04563425f54ea08495 | [
"Apache-2.0"
] | null | null | null | tests/backtracking/test_path_through_grid.py | davjohnst/fundamentals | f8aff4621432c3187305dd04563425f54ea08495 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
from unittest import TestCase
from fundamentals.backtracking.path_through_grid import PathThroughGrid
class TestPathThroughGrid(TestCase):
def test_no_path(self):
grid = [
[0, 1, 0],
[1, 0, 1],
[0, 0, 1]
]
ptg = PathThroughGrid(g... | 22.481481 | 82 | 0.507414 | 480 | 0.790774 | 0 | 0 | 0 | 0 | 0 | 0 | 21 | 0.034596 |
c96b923ab99cdd18285399edd12e8dfeb03b5f78 | 343 | py | Python | main.py | yukraven/vitg | 27d3d9b73a23e4ff5ff4c769eb1f26b8f57fee72 | [
"MIT"
] | null | null | null | main.py | yukraven/vitg | 27d3d9b73a23e4ff5ff4c769eb1f26b8f57fee72 | [
"MIT"
] | 63 | 2019-08-25T07:48:54.000Z | 2019-10-18T01:52:29.000Z | main.py | yukraven/vitg | 27d3d9b73a23e4ff5ff4c769eb1f26b8f57fee72 | [
"MIT"
] | null | null | null | import sqlite3
import Sources.Parser
conn = sqlite3.connect("Database/vitg.db")
cursor = conn.cursor()
cursor.execute("SELECT * FROM Locations")
results = cursor.fetchall()
print(results)
conn.close()
parser = Sources.Parser.Parser()
words = [u"любить", u"бить"]
for word in words:
command = parser.getCommand(wo... | 19.055556 | 42 | 0.725948 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 69 | 0.195467 |
c96d512247f8395a641feee824bc046d0dbdc522 | 7,018 | py | Python | src/gene.score.array.simulator.py | ramachandran-lab/PEGASUS-WINGS | bdd81b58be4c4fb62916e422a854abdcbfbb6fd7 | [
"MIT"
] | 3 | 2019-03-31T12:32:25.000Z | 2020-01-04T20:57:14.000Z | src/gene.score.array.simulator.py | ramachandran-lab/PEGASUS-WINGS | bdd81b58be4c4fb62916e422a854abdcbfbb6fd7 | [
"MIT"
] | null | null | null | src/gene.score.array.simulator.py | ramachandran-lab/PEGASUS-WINGS | bdd81b58be4c4fb62916e422a854abdcbfbb6fd7 | [
"MIT"
] | 1 | 2020-10-24T23:48:15.000Z | 2020-10-24T23:48:15.000Z | import numpy as np
import pandas as pd
import sys
import string
import time
import subprocess
from collections import Counter
import string
import random
def random_pheno_generator(size=6,chars=string.ascii_lowercase):
return ''.join(random.choice(chars) for _ in range(size))
#First argument is the gene score dist... | 43.320988 | 265 | 0.727273 | 5,649 | 0.80493 | 0 | 0 | 0 | 0 | 0 | 0 | 1,832 | 0.261043 |
c96fe90561c66a9922b3825850ab89dad8c3224a | 7,273 | py | Python | datatools_bdh/dict_utils.py | sfu-bigdata/datatools-bdh | 43303db2e165c10b43f5afe5293d41e655a05040 | [
"MIT"
] | null | null | null | datatools_bdh/dict_utils.py | sfu-bigdata/datatools-bdh | 43303db2e165c10b43f5afe5293d41e655a05040 | [
"MIT"
] | null | null | null | datatools_bdh/dict_utils.py | sfu-bigdata/datatools-bdh | 43303db2e165c10b43f5afe5293d41e655a05040 | [
"MIT"
] | null | null | null | """Convenience functions for dictionary access and YAML"""
from sklearn.utils import Bunch
from collections import OrderedDict
from collections.abc import Mapping
import copy
import yaml
# ----------------------------------------------------------------------------
def deep_convert_list_dict(d, skip_list_level=0):
... | 33.210046 | 99 | 0.641001 | 159 | 0.021862 | 0 | 0 | 0 | 0 | 0 | 0 | 4,301 | 0.591365 |
c9702823a44c14ac03b736bffeea367a229f28da | 6,612 | py | Python | testscripts/RDKB/component/CMAgent/TS_CMAGENT_SetSessionId.py | cablelabs/tools-tdkb | 1fd5af0f6b23ce6614a4cfcbbaec4dde430fad69 | [
"Apache-2.0"
] | null | null | null | testscripts/RDKB/component/CMAgent/TS_CMAGENT_SetSessionId.py | cablelabs/tools-tdkb | 1fd5af0f6b23ce6614a4cfcbbaec4dde430fad69 | [
"Apache-2.0"
] | null | null | null | testscripts/RDKB/component/CMAgent/TS_CMAGENT_SetSessionId.py | cablelabs/tools-tdkb | 1fd5af0f6b23ce6614a4cfcbbaec4dde430fad69 | [
"Apache-2.0"
] | null | null | null | ##########################################################################
# If not stated otherwise in this file or this component's Licenses.txt
# file the following copyright and licenses apply:
#
# Copyright 2016 RDK Management
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not... | 44.675676 | 259 | 0.73775 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,582 | 0.844223 |
c970887827dfacb25a04d949c110b21b2a98595f | 492 | py | Python | blu/config.py | coolman565/blu_two | 5c7626145b3644570be99ff0267f88bd61b9806c | [
"MIT"
] | null | null | null | blu/config.py | coolman565/blu_two | 5c7626145b3644570be99ff0267f88bd61b9806c | [
"MIT"
] | 1 | 2021-06-01T21:57:23.000Z | 2021-06-01T21:57:23.000Z | blu/config.py | coolman565/blu_two | 5c7626145b3644570be99ff0267f88bd61b9806c | [
"MIT"
] | null | null | null | import logging
import yaml
logger = logging.getLogger(__name__)
class Config(object):
__instance__ = None
cfg = {}
def __new__(cls, *args, **kwargs):
if Config.__instance__ is None:
Config.__instance__ = object.__new__(cls)
return Config.__instance__
def load(self, loca... | 23.428571 | 66 | 0.632114 | 423 | 0.859756 | 0 | 0 | 0 | 0 | 0 | 0 | 47 | 0.095528 |
c97156d460bdc88e5f228d10d1465d45738af933 | 8,536 | py | Python | other_useful_scripts/join.py | sklasfeld/ChIP_Annotation | 9ce9db7a129bfdec91ec23b33d73ff22f37408ad | [
"MIT"
] | 1 | 2020-08-23T23:12:56.000Z | 2020-08-23T23:12:56.000Z | other_useful_scripts/join.py | sklasfeld/ChIP_Annotation | 9ce9db7a129bfdec91ec23b33d73ff22f37408ad | [
"MIT"
] | null | null | null | other_useful_scripts/join.py | sklasfeld/ChIP_Annotation | 9ce9db7a129bfdec91ec23b33d73ff22f37408ad | [
"MIT"
] | 1 | 2020-08-23T23:16:47.000Z | 2020-08-23T23:16:47.000Z | #!/usr/bin/env python3
# -*- coding: iso-8859-15 -*-
# 2017, Samantha Klasfeld, the Wagner Lab
# the Perelman School of Medicine, the University of Pennsylvania
# Samantha Klasfeld, 12-21-2017
import argparse
import sys
import pandas as pd
import numpy as np
parser = argparse.ArgumentParser(description="this scrip... | 42.467662 | 85 | 0.72493 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,988 | 0.584349 |
c971e430652331e744f0b8b0fc1ac07db5704fb9 | 884 | py | Python | 6.py | mattclark-net/aoc21 | d4dcd78524a8cb27e1445cb6c39e696e64cc4e7a | [
"MIT"
] | null | null | null | 6.py | mattclark-net/aoc21 | d4dcd78524a8cb27e1445cb6c39e696e64cc4e7a | [
"MIT"
] | null | null | null | 6.py | mattclark-net/aoc21 | d4dcd78524a8cb27e1445cb6c39e696e64cc4e7a | [
"MIT"
] | null | null | null | # parse the input
with open("6-input.txt") as f:
fish = [int(n) for n in f.readline().split(",")]
startcounts = dict(zip(range(0, 9), [0 for x in range(9)]))
for f in fish:
startcounts[f] += 1
def updatedcounts(counts):
newcounts = {}
newcounts[8] = counts[0]
newcounts[7] = counts[8]
newcount... | 25.257143 | 59 | 0.616516 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 57 | 0.06448 |
c97337433ecaa8303091ad4ba921fe29802304f0 | 3,287 | py | Python | packages/mccomponents/tests/mccomponents/sample/samplecomponent_SQkernel_TestCase.py | mcvine/mcvine | 42232534b0c6af729628009bed165cd7d833789d | [
"BSD-3-Clause"
] | 5 | 2017-01-16T03:59:47.000Z | 2020-06-23T02:54:19.000Z | packages/mccomponents/tests/mccomponents/sample/samplecomponent_SQkernel_TestCase.py | mcvine/mcvine | 42232534b0c6af729628009bed165cd7d833789d | [
"BSD-3-Clause"
] | 293 | 2015-10-29T17:45:52.000Z | 2022-01-07T16:31:09.000Z | packages/mccomponents/tests/mccomponents/sample/samplecomponent_SQkernel_TestCase.py | mcvine/mcvine | 42232534b0c6af729628009bed165cd7d833789d | [
"BSD-3-Clause"
] | 1 | 2019-05-25T00:53:31.000Z | 2019-05-25T00:53:31.000Z | #!/usr/bin/env python
#
#
standalone = True
import os, numpy as np
os.environ['MCVINE_MPI_BINDING'] = 'NONE'
import unittestX as unittest
class TestCase(unittest.TestCase):
def test1(self):
'mccomponents.sample.samplecomponent: SQkernel'
# The kernel spec is in sampleassemblies/V-sqkernel/V-... | 35.728261 | 98 | 0.606632 | 3,071 | 0.934287 | 0 | 0 | 0 | 0 | 0 | 0 | 912 | 0.277457 |
c973d138beb4bdeb8b96079770c98d55a9dad08e | 693 | py | Python | app/ZeroKnowledge/bbs.py | MilkyBoat/AttriChain | ad3a7e5cc58e4add21ffd289d925f73e3367210b | [
"MIT"
] | 5 | 2020-07-10T21:00:28.000Z | 2022-02-23T01:41:01.000Z | app/ZeroKnowledge/bbs.py | MilkyBoat/AttriChain | ad3a7e5cc58e4add21ffd289d925f73e3367210b | [
"MIT"
] | null | null | null | app/ZeroKnowledge/bbs.py | MilkyBoat/AttriChain | ad3a7e5cc58e4add21ffd289d925f73e3367210b | [
"MIT"
] | 4 | 2020-09-13T14:31:45.000Z | 2022-03-23T04:06:38.000Z | from ZeroKnowledge import primality
import random
def goodPrime(p):
return p % 4 == 3 and primality.probablyPrime(p, accuracy=100)
def findGoodPrime(numBits=512):
candidate = 1
while not goodPrime(candidate):
candidate = random.getrandbits(numBits)
return candidate
def makeModulus(numBits=5... | 21 | 66 | 0.685426 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.01443 |
c9743d63b6769b341831d17f36b94f9161097eb4 | 5,811 | py | Python | differannotate/datastructures.py | zyndagj/differannotate | c73d9df5f82f1cf97340235265a368b16da9c89b | [
"BSD-3-Clause"
] | null | null | null | differannotate/datastructures.py | zyndagj/differannotate | c73d9df5f82f1cf97340235265a368b16da9c89b | [
"BSD-3-Clause"
] | null | null | null | differannotate/datastructures.py | zyndagj/differannotate | c73d9df5f82f1cf97340235265a368b16da9c89b | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#
###############################################################################
# Author: Greg Zynda
# Last Modified: 12/11/2019
###############################################################################
# BSD 3-Clause License
#
# Copyright (c) 2019, Greg Zynda
# All rights reserved.
#
# ... | 30.584211 | 134 | 0.66202 | 3,031 | 0.521597 | 0 | 0 | 0 | 0 | 0 | 0 | 2,954 | 0.508346 |
c9743e069ad8fe0a795c53358dc5e0951de0d7c7 | 2,113 | py | Python | examples/regional_constant_preservation/plotCurve.py | schoonovernumerics/FEOTs | d8bf24d0e0c23a9ee65e2be6a75f5dbc83d3e5ad | [
"BSD-3-Clause"
] | null | null | null | examples/regional_constant_preservation/plotCurve.py | schoonovernumerics/FEOTs | d8bf24d0e0c23a9ee65e2be6a75f5dbc83d3e5ad | [
"BSD-3-Clause"
] | 13 | 2017-08-03T22:30:25.000Z | 2019-01-23T16:32:28.000Z | examples/regional_constant_preservation/plotCurve.py | schoonovernumerics/FEOTS | d8bf24d0e0c23a9ee65e2be6a75f5dbc83d3e5ad | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python3
DOC="""plotCurve
plotCurve is used to create vertical profiles of different lateral ylabel statistics of FEOTS output.
Usage:
plotCurve plot <file> [--out=<out>] [--opts=<opts>] [--scalex=<scalex>] [--xlabel=<xlabel>] [--ylabel=<ylabel>]
Commands:
plot Create a vertical profile p... | 26.08642 | 114 | 0.644108 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,061 | 0.50213 |
c974860e7717afdaa174abddb3959a9916ac8f90 | 6,535 | py | Python | statefun-examples/statefun-python-walkthrough-example/walkthrough_pb2.py | authuir/flink-statefun | ca16055de31737a8a0073b8f9083268fc24b9828 | [
"Apache-2.0"
] | 1 | 2020-05-27T03:38:36.000Z | 2020-05-27T03:38:36.000Z | statefun-examples/statefun-python-walkthrough-example/walkthrough_pb2.py | authuir/flink-statefun | ca16055de31737a8a0073b8f9083268fc24b9828 | [
"Apache-2.0"
] | null | null | null | statefun-examples/statefun-python-walkthrough-example/walkthrough_pb2.py | authuir/flink-statefun | ca16055de31737a8a0073b8f9083268fc24b9828 | [
"Apache-2.0"
] | null | null | null | ################################################################################
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this... | 28.413043 | 286 | 0.72303 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,243 | 0.343229 |
c9778ad426ae5b59849224563d916aed7af67c6a | 2,438 | py | Python | dnsdetect.py | bhaveshgoyal/DNSpoPy | 978beae9028b6122f1d9c1e7316e630ed466a628 | [
"MIT"
] | 3 | 2022-01-03T12:10:41.000Z | 2022-03-21T22:14:51.000Z | dnsdetect.py | bhaveshgoyal/DNSpoPy | 978beae9028b6122f1d9c1e7316e630ed466a628 | [
"MIT"
] | null | null | null | dnsdetect.py | bhaveshgoyal/DNSpoPy | 978beae9028b6122f1d9c1e7316e630ed466a628 | [
"MIT"
] | null | null | null | #import pcap
#import dpkt
#import dnet
from collections import defaultdict
from scapy.all import *
from scapy.all import send as ssend
import netifaces
import getopt
import datetime
conf.sniff_promisc=True
pcap_specified = False
detection_map = defaultdict(list)
def detect_poison(pkt):
global pcap_specified
if IP i... | 29.731707 | 123 | 0.651354 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 474 | 0.194422 |
c977bbeabde9764661a77f5cb005a889127439bd | 534 | py | Python | yeti/core/entities/malware.py | Darkheir/TibetanBrownBear | c3843daa4f84730e733c2dde1cda7739e6cdad8e | [
"Apache-2.0"
] | 9 | 2018-01-15T22:44:24.000Z | 2021-05-28T11:13:03.000Z | yeti/core/entities/malware.py | Darkheir/TibetanBrownBear | c3843daa4f84730e733c2dde1cda7739e6cdad8e | [
"Apache-2.0"
] | 140 | 2018-01-12T10:07:47.000Z | 2021-08-02T23:03:49.000Z | yeti/core/entities/malware.py | Darkheir/TibetanBrownBear | c3843daa4f84730e733c2dde1cda7739e6cdad8e | [
"Apache-2.0"
] | 11 | 2018-01-16T19:49:35.000Z | 2022-01-18T16:30:34.000Z | """Detail Yeti's Malware object structure."""
from .entity import Entity
class Malware(Entity):
"""Malware Yeti object.
Extends the Malware STIX2 definition.
"""
_collection_name = 'entities'
type = 'malware'
@property
def name(self):
return self._stix_object.name
@property... | 19.777778 | 50 | 0.683521 | 416 | 0.779026 | 0 | 0 | 241 | 0.451311 | 0 | 0 | 138 | 0.258427 |
c978b614564b15ad98ff9be9b231eda20bb8f13d | 6,405 | py | Python | python/dsbox/template/template_files/loaded/SRIClassificationTemplate.py | usc-isi-i2/dsbox-ta2 | 85e0e8f5bbda052fa77cb98f4eef1f4b50909fd2 | [
"MIT"
] | 7 | 2018-05-10T22:19:44.000Z | 2020-07-21T07:28:39.000Z | python/dsbox/template/template_files/loaded/SRIClassificationTemplate.py | usc-isi-i2/dsbox-ta2 | 85e0e8f5bbda052fa77cb98f4eef1f4b50909fd2 | [
"MIT"
] | 187 | 2018-04-13T17:19:24.000Z | 2020-04-21T00:41:15.000Z | python/dsbox/template/template_files/loaded/SRIClassificationTemplate.py | usc-isi-i2/dsbox-ta2 | 85e0e8f5bbda052fa77cb98f4eef1f4b50909fd2 | [
"MIT"
] | 7 | 2018-07-10T00:14:07.000Z | 2019-07-25T17:59:44.000Z | from dsbox.template.template import DSBoxTemplate
from d3m.metadata.problem import TaskKeyword
from dsbox.template.template_steps import TemplateSteps
from dsbox.schema import SpecializedProblem
import typing
import numpy as np # type: ignore
class SRIClassificationTemplate(DSBoxTemplate):
def __init__(self... | 48.157895 | 274 | 0.444653 | 6,151 | 0.960343 | 0 | 0 | 0 | 0 | 0 | 0 | 2,802 | 0.437471 |
c978cd7b9db932291bd60fddc562ff295cb80fc4 | 192 | py | Python | beecrowd exercises/beecrowd-1019.py | pachecosamuel/Python-Exercises | de542536dd1a2bc0ad27e81824713cda8ad34054 | [
"MIT"
] | null | null | null | beecrowd exercises/beecrowd-1019.py | pachecosamuel/Python-Exercises | de542536dd1a2bc0ad27e81824713cda8ad34054 | [
"MIT"
] | null | null | null | beecrowd exercises/beecrowd-1019.py | pachecosamuel/Python-Exercises | de542536dd1a2bc0ad27e81824713cda8ad34054 | [
"MIT"
] | null | null | null | time = eval(input())
qtdtime = [3600, 60, 1]
result = []
for i in qtdtime:
qtd = time // i
result.append(str(qtd))
time -= qtd * i
print(f'{result[0]}:{result[1]}:{result[2]}')
| 16 | 45 | 0.557292 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 38 | 0.197917 |
c979df9649b375b708736b82938ddd72a6f161b7 | 161 | py | Python | Retired/How many times mentioned.py | mwk0408/codewars_solutions | 9b4f502b5f159e68024d494e19a96a226acad5e5 | [
"MIT"
] | 6 | 2020-09-03T09:32:25.000Z | 2020-12-07T04:10:01.000Z | Retired/How many times mentioned.py | mwk0408/codewars_solutions | 9b4f502b5f159e68024d494e19a96a226acad5e5 | [
"MIT"
] | 1 | 2021-12-13T15:30:21.000Z | 2021-12-13T15:30:21.000Z | Retired/How many times mentioned.py | mwk0408/codewars_solutions | 9b4f502b5f159e68024d494e19a96a226acad5e5 | [
"MIT"
] | null | null | null | from collections import Counter
def count_mentioned(con,names):
con=con.lower()
res=[con.count(i.lower()) for i in names]
return res if res else None | 32.2 | 45 | 0.714286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c97a5d77ecd44aba596f1a6d89d78783ed1f6a39 | 5,458 | py | Python | bigorm/database.py | AnthonyPerez/bigorm | 67ecdbb1f99cd5c8ec2ca24c7ba5f5dbed7493bb | [
"MIT"
] | null | null | null | bigorm/database.py | AnthonyPerez/bigorm | 67ecdbb1f99cd5c8ec2ca24c7ba5f5dbed7493bb | [
"MIT"
] | 3 | 2020-04-06T19:13:58.000Z | 2020-05-22T22:21:31.000Z | bigorm/database.py | AnthonyPerez/bigorm | 67ecdbb1f99cd5c8ec2ca24c7ba5f5dbed7493bb | [
"MIT"
] | null | null | null | import threading
import functools
import sqlalchemy
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
class DatabaseContextError(RuntimeError):
pass
"""
Once an engine is created is is not destroyed until the program itself exits.
Engines are used to produce a new session when... | 34.327044 | 177 | 0.622206 | 4,579 | 0.838952 | 0 | 0 | 1,304 | 0.238915 | 0 | 0 | 2,539 | 0.465189 |
c97adf2252f256379d95e93fa38af238ed647da0 | 114 | py | Python | Leetcode/1323. Maximum 69 Number/solution1.py | asanoviskhak/Outtalent | c500e8ad498f76d57eb87a9776a04af7bdda913d | [
"MIT"
] | 51 | 2020-07-12T21:27:47.000Z | 2022-02-11T19:25:36.000Z | Leetcode/1323. Maximum 69 Number/solution1.py | CrazySquirrel/Outtalent | 8a10b23335d8e9f080e5c39715b38bcc2916ff00 | [
"MIT"
] | null | null | null | Leetcode/1323. Maximum 69 Number/solution1.py | CrazySquirrel/Outtalent | 8a10b23335d8e9f080e5c39715b38bcc2916ff00 | [
"MIT"
] | 32 | 2020-07-27T13:54:24.000Z | 2021-12-25T18:12:50.000Z | class Solution:
def maximum69Number(self, num: int) -> int:
return int(str(num).replace('6', '9', 1))
| 28.5 | 49 | 0.605263 | 113 | 0.991228 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0.052632 |
c97aeafdeaa32ce81d91fe53e55f4082c9dd290e | 444 | py | Python | src/rover/project/code/decision.py | juancruzgassoloncan/Udacity-Robo-nanodegree | 7621360ce05faf90660989e9d28f56da083246c9 | [
"MIT"
] | 1 | 2020-12-28T13:58:34.000Z | 2020-12-28T13:58:34.000Z | src/rover/project/code/decision.py | juancruzgassoloncan/Udacity-Robo-nanodegree | 7621360ce05faf90660989e9d28f56da083246c9 | [
"MIT"
] | null | null | null | src/rover/project/code/decision.py | juancruzgassoloncan/Udacity-Robo-nanodegree | 7621360ce05faf90660989e9d28f56da083246c9 | [
"MIT"
] | null | null | null | import numpy as np
from rover_sates import *
from state_machine import *
# This is where you can build a decision tree for determining throttle, brake and steer
# commands based on the output of the perception_step() function
def decision_step(Rover, machine):
if Rover.nav_angles is not None:
machine.ru... | 23.368421 | 87 | 0.702703 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 151 | 0.34009 |
c97ce1f34312b0218b91e4e2faa6b094d0a6ab72 | 188 | py | Python | iotbot/logger.py | li7yue/python--iotbot | ca721b795114202114a4eb355d20f9ecfd9b8901 | [
"MIT"
] | 1 | 2020-10-05T01:09:15.000Z | 2020-10-05T01:09:15.000Z | iotbot/logger.py | li7yue/python--iotbot | ca721b795114202114a4eb355d20f9ecfd9b8901 | [
"MIT"
] | null | null | null | iotbot/logger.py | li7yue/python--iotbot | ca721b795114202114a4eb355d20f9ecfd9b8901 | [
"MIT"
] | null | null | null | import sys
from loguru import logger
logger.remove()
logger.add(
sys.stdout,
format='{level.icon} {time:YYYY-MM-DD HH:mm:ss} <lvl>{level}\t{message}</lvl>',
colorize=True,
)
| 17.090909 | 83 | 0.664894 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 71 | 0.37766 |
c97d3cc7b903e622320da5991308503b0ba6a84c | 1,770 | py | Python | cloudcafe/networking/lbaas/common/types.py | rcbops-qa/cloudcafe | d937f85496aadafbb94a330b9adb8ea18bee79ba | [
"Apache-2.0"
] | null | null | null | cloudcafe/networking/lbaas/common/types.py | rcbops-qa/cloudcafe | d937f85496aadafbb94a330b9adb8ea18bee79ba | [
"Apache-2.0"
] | null | null | null | cloudcafe/networking/lbaas/common/types.py | rcbops-qa/cloudcafe | d937f85496aadafbb94a330b9adb8ea18bee79ba | [
"Apache-2.0"
] | 1 | 2020-04-13T17:44:28.000Z | 2020-04-13T17:44:28.000Z | """
Copyright 2013 Rackspace
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 writing, software
dist... | 36.875 | 76 | 0.716949 | 1,209 | 0.683051 | 0 | 0 | 0 | 0 | 0 | 0 | 1,605 | 0.90678 |
c97d6ba493e05a165ce59471439dfde7e1eb3a10 | 2,953 | py | Python | utils.py | sthagen/example-app-report | dedb70755debfbe959d00515b101314dfeed6ec1 | [
"MIT"
] | 1 | 2021-09-05T18:12:27.000Z | 2021-09-05T18:12:27.000Z | utils.py | sthagen/example-app-report | dedb70755debfbe959d00515b101314dfeed6ec1 | [
"MIT"
] | null | null | null | utils.py | sthagen/example-app-report | dedb70755debfbe959d00515b101314dfeed6ec1 | [
"MIT"
] | null | null | null | import os
from dash import dcc, html
URL_PATH_SEP = '/'
URL_BASE_PATHNAME = os.getenv('REPORT_URL_BASE', URL_PATH_SEP)
if URL_BASE_PATHNAME[-1] != URL_PATH_SEP:
URL_BASE_PATHNAME += URL_PATH_SEP
def Header(app):
return html.Div([get_header(app), html.Br([]), get_menu()])
def get_header(app):
header = h... | 29.53 | 79 | 0.385371 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 619 | 0.209617 |
c97e6b1f40a5bb81ae2c559b1a1285a802b08835 | 53 | py | Python | social/backends/ubuntu.py | raccoongang/python-social-auth | 81c0a542d158772bd3486d31834c10af5d5f08b0 | [
"BSD-3-Clause"
] | 1,987 | 2015-01-01T16:12:45.000Z | 2022-03-29T14:24:25.000Z | social/backends/ubuntu.py | raccoongang/python-social-auth | 81c0a542d158772bd3486d31834c10af5d5f08b0 | [
"BSD-3-Clause"
] | 731 | 2015-01-01T22:55:25.000Z | 2022-03-10T15:07:51.000Z | virtual/lib/python3.6/site-packages/social/backends/ubuntu.py | dennismwaniki67/awards | 80ed10541f5f751aee5f8285ab1ad54cfecba95f | [
"MIT"
] | 1,082 | 2015-01-01T16:27:26.000Z | 2022-03-22T21:18:33.000Z | from social_core.backends.ubuntu import UbuntuOpenId
| 26.5 | 52 | 0.886792 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c97f4aad4afc2d34135bd0a531bcabb3725f19f6 | 10,715 | py | Python | tests/unit/states/test_libvirt.py | cvedel/salt | 8731f42829ca1f0a38d2434057c485abeff222a7 | [
"Apache-2.0",
"MIT"
] | null | null | null | tests/unit/states/test_libvirt.py | cvedel/salt | 8731f42829ca1f0a38d2434057c485abeff222a7 | [
"Apache-2.0",
"MIT"
] | null | null | null | tests/unit/states/test_libvirt.py | cvedel/salt | 8731f42829ca1f0a38d2434057c485abeff222a7 | [
"Apache-2.0",
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
'''
:codeauthor: Jayesh Kariya <jayeshk@saltstack.com>
'''
# pylint: disable=3rd-party-module-not-gated
# Import Python libs
from __future__ import absolute_import, print_function, unicode_literals
import tempfile
import shutil
# Import Salt Testing Libs
from tests.support.mixins import Lo... | 44.832636 | 110 | 0.466729 | 10,069 | 0.939711 | 0 | 0 | 9,871 | 0.921232 | 0 | 0 | 2,746 | 0.256276 |
c97fb65ad57fdb00bbfc2ec6a2a6804e6bf866f3 | 50 | py | Python | src/__init__.py | ProfessorManhattan/mod-ansible-autodoc | 3cc6fd25f817efc63ec0fc158088d637dd689ad3 | [
"MIT"
] | null | null | null | src/__init__.py | ProfessorManhattan/mod-ansible-autodoc | 3cc6fd25f817efc63ec0fc158088d637dd689ad3 | [
"MIT"
] | null | null | null | src/__init__.py | ProfessorManhattan/mod-ansible-autodoc | 3cc6fd25f817efc63ec0fc158088d637dd689ad3 | [
"MIT"
] | null | null | null | __name__ = "{{Name}}"
__version__ = "{{Version}}"
| 16.666667 | 27 | 0.6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 23 | 0.46 |
c9801e27d75fc448c57278f4f2febd70cf000239 | 3,203 | py | Python | alfred/views/main_widget.py | Sefrwahed/Alfred | 0b77ec547fb665ef29fe1a3b7e1c4ad30c31170d | [
"MIT"
] | 5 | 2016-09-06T10:29:24.000Z | 2017-02-22T14:07:48.000Z | alfred/views/main_widget.py | Sefrwahed/Alfred | 0b77ec547fb665ef29fe1a3b7e1c4ad30c31170d | [
"MIT"
] | 66 | 2016-09-06T06:40:24.000Z | 2022-03-11T23:18:05.000Z | alfred/views/main_widget.py | Sefrwahed/Alfred | 0b77ec547fb665ef29fe1a3b7e1c4ad30c31170d | [
"MIT"
] | 3 | 2016-10-06T15:17:38.000Z | 2016-12-04T13:25:53.000Z | import json
# PyQt imports
from PyQt5.QtCore import Qt, pyqtSignal, pyqtSlot
from PyQt5.QtWidgets import QDialog
from PyQt5.QtWebChannel import QWebChannel
# Local includes
from .ui.widget_ui import Ui_Dialog
from alfred import data_rc
import alfred.alfred_globals as ag
from alfred.modules.api.view_components import ... | 37.244186 | 138 | 0.67468 | 2,850 | 0.889791 | 0 | 0 | 1,131 | 0.353106 | 0 | 0 | 540 | 0.168592 |
c98046d6e476b2db7f4e9b5014b73851b0a58d74 | 5,573 | py | Python | projects/11/jackTokenizer.py | nadavWeisler/Nand2Tetris | 59c2e616c45044c15b99aeb8459d39b59e5e07ba | [
"MIT"
] | null | null | null | projects/11/jackTokenizer.py | nadavWeisler/Nand2Tetris | 59c2e616c45044c15b99aeb8459d39b59e5e07ba | [
"MIT"
] | null | null | null | projects/11/jackTokenizer.py | nadavWeisler/Nand2Tetris | 59c2e616c45044c15b99aeb8459d39b59e5e07ba | [
"MIT"
] | null | null | null | import re
from utils import *
class JackTokenizer:
def __init__(self, file_name):
self._file = open(file_name, 'r')
self._data = []
self._types = []
self._tokens = []
self._xml = ['<tokens>']
self._tokens_iterator = iter(self._tokens)
self._token_types_iter... | 33.981707 | 102 | 0.466535 | 5,540 | 0.994079 | 0 | 0 | 1,715 | 0.307734 | 0 | 0 | 421 | 0.075543 |
c98092ff02eaf3078402f8fe2053638da3880d53 | 1,115 | py | Python | main.py | TimKozak/NearestFilms | 991f8b7b1cb9f7f47c6bff818aaae3b91eb80375 | [
"MIT"
] | 2 | 2021-02-15T20:38:03.000Z | 2021-12-15T12:42:54.000Z | main.py | TimKozak/NearestFilms | 991f8b7b1cb9f7f47c6bff818aaae3b91eb80375 | [
"MIT"
] | null | null | null | main.py | TimKozak/NearestFilms | 991f8b7b1cb9f7f47c6bff818aaae3b91eb80375 | [
"MIT"
] | null | null | null | """
Main module of a program.
"""
import folium
from tools import find_coords, user_input
def creating_map():
"""
Creates HTML page for a given data.
"""
year, coords = user_input()
locations = find_coords(year, coords)
mp = folium.Map(location=coords, zoom_start=10)
mp.add_child(folium.... | 27.195122 | 75 | 0.552466 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 257 | 0.230493 |
c98373f93bfe070f74725f6b7462934da5ef570c | 1,366 | py | Python | ptCrypt/Symmetric/Modes/ECB.py | 0awawa0/aCrypt | 7c5d07271d524b9e5b03035d63587b69bff5abc7 | [
"MIT"
] | null | null | null | ptCrypt/Symmetric/Modes/ECB.py | 0awawa0/aCrypt | 7c5d07271d524b9e5b03035d63587b69bff5abc7 | [
"MIT"
] | 25 | 2021-12-08T07:20:11.000Z | 2021-12-10T12:07:05.000Z | ptCrypt/Symmetric/Modes/ECB.py | 0awawa0/aCrypt | 7c5d07271d524b9e5b03035d63587b69bff5abc7 | [
"MIT"
] | null | null | null | from ptCrypt.Symmetric.Modes.Mode import Mode
from ptCrypt.Symmetric.BlockCipher import BlockCipher
from ptCrypt.Symmetric.Paddings.Padding import Padding
class ECB(Mode):
"""Electronic codebook mode of encryption. The simplest encryption mode.
Encrypts every block independently from other blocks.
More: ... | 35.947368 | 170 | 0.666179 | 1,209 | 0.885066 | 0 | 0 | 0 | 0 | 0 | 0 | 352 | 0.257687 |
c983d81c361719032d41d5bf9ca26fcce754a0f2 | 1,335 | py | Python | src/static-vxlan-agent/test/arp_tracer.py | jbemmel/srl-evpn-proxy | 240b8180ab03ee06a5043e646781860ba32a3530 | [
"Apache-2.0"
] | 8 | 2021-08-25T01:08:09.000Z | 2022-01-18T12:44:41.000Z | src/static-vxlan-agent/test/arp_tracer.py | jbemmel/srl-evpn-proxy | 240b8180ab03ee06a5043e646781860ba32a3530 | [
"Apache-2.0"
] | null | null | null | src/static-vxlan-agent/test/arp_tracer.py | jbemmel/srl-evpn-proxy | 240b8180ab03ee06a5043e646781860ba32a3530 | [
"Apache-2.0"
] | 1 | 2022-03-13T22:36:18.000Z | 2022-03-13T22:36:18.000Z | #!/usr/bin/env python3 # Originally python2
# Sample from https://www.collabora.com/news-and-blog/blog/2019/05/14/an-ebpf-overview-part-5-tracing-user-processes/
# Python program with embedded C eBPF program
from bcc import BPF, USDT
import sys
bpf = """
#include <uapi/linux/ptrace.h>
BPF_PERF_OUTPUT(events);
struc... | 31.046512 | 117 | 0.702622 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 898 | 0.672659 |
c984c4501d6e403db82fdd8d7b4131f8e313f048 | 1,004 | py | Python | test/test_reference.py | ognibit/sudoku-solver | 1c47b80b36b4bd57a11a4084e04defd849531782 | [
"Apache-2.0"
] | null | null | null | test/test_reference.py | ognibit/sudoku-solver | 1c47b80b36b4bd57a11a4084e04defd849531782 | [
"Apache-2.0"
] | null | null | null | test/test_reference.py | ognibit/sudoku-solver | 1c47b80b36b4bd57a11a4084e04defd849531782 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import pytest
from sudoku import SudokuLine, build_rows, build_columns
from sudoku import SudokuSquare, build_squares
def test_reference():
dimension = 3
dim_pow = dimension ** 2
board = np.zeros((dim_pow, dim_pow), dtype='int')
symbols = np.arange(1, dim_pow + 1)
squares = build_squares(board... | 23.348837 | 56 | 0.657371 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0.00498 |
c985d647edcaf8c1a409b8e34f91d4add29cf574 | 1,424 | py | Python | ReaderBoard/Score.py | JongbinRyu/Ajou_Challenge | 26c1e6e8464f2b50941dccbbca017ab99b6d4489 | [
"MIT"
] | null | null | null | ReaderBoard/Score.py | JongbinRyu/Ajou_Challenge | 26c1e6e8464f2b50941dccbbca017ab99b6d4489 | [
"MIT"
] | null | null | null | ReaderBoard/Score.py | JongbinRyu/Ajou_Challenge | 26c1e6e8464f2b50941dccbbca017ab99b6d4489 | [
"MIT"
] | null | null | null | import os
import json
import datetime
from pytz import timezone, utc
def update_total_score(name_list_dict, score_rules, now_kst_aware, penalty_const=.1):
"""
Update Total Score when scheduled day written in "ScoreRule.json"
:param name_list_dict: This contains contestants score info loaded from "namelist.... | 45.935484 | 95 | 0.67486 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 620 | 0.435393 |
c98644a1740c0b9a2213d68e9dafb7bed9e7032f | 3,500 | py | Python | src/utils/loaders.py | OE-Heart/span-based-srl | a03b46a5ea4c59e14bea80ea724b0de276df4bc1 | [
"MIT"
] | 41 | 2018-10-05T21:48:33.000Z | 2022-02-16T10:24:39.000Z | src/utils/loaders.py | OE-Heart/span-based-srl | a03b46a5ea4c59e14bea80ea724b0de276df4bc1 | [
"MIT"
] | 9 | 2018-10-21T14:45:01.000Z | 2022-02-25T14:25:29.000Z | src/utils/loaders.py | OE-Heart/span-based-srl | a03b46a5ea4c59e14bea80ea724b0de276df4bc1 | [
"MIT"
] | 9 | 2018-10-16T07:00:51.000Z | 2022-02-17T13:10:47.000Z | import os
import gzip
import pickle
import h5py
import numpy as np
import theano
from utils.misc import get_file_names_in_dir
from utils.vocab import UNK
class Loader(object):
def __init__(self, argv):
self.argv = argv
def load(self, **kwargs):
raise NotImplementedError
@staticmethod
... | 26.315789 | 69 | 0.513714 | 2,591 | 0.740286 | 0 | 0 | 429 | 0.122571 | 0 | 0 | 36 | 0.010286 |
a309e90ac2f88ea56edc2aaeacb9b7f74fba3681 | 591 | py | Python | system_test_progress_tracking/progress_tracking/urls.py | TobKed/system_test_progress_tracking | 633792e7057289b6a23db30c6353241123eaa2e4 | [
"MIT"
] | null | null | null | system_test_progress_tracking/progress_tracking/urls.py | TobKed/system_test_progress_tracking | 633792e7057289b6a23db30c6353241123eaa2e4 | [
"MIT"
] | 3 | 2020-02-11T23:29:05.000Z | 2021-06-10T21:03:42.000Z | system_test_progress_tracking/progress_tracking/urls.py | TobKed/system_test_progress_tracking | 633792e7057289b6a23db30c6353241123eaa2e4 | [
"MIT"
] | 2 | 2019-01-24T20:39:31.000Z | 2019-01-29T07:42:27.000Z | from django.urls import path
from .views import (
home,
MachineDetailView,
MachineListView,
DryRunDataDetailView,
MachineLastDataView,
)
urlpatterns = [
path('', MachineListView.as_view(), name='home-view'),
path('', MachineListView.as_view(), name='machine-list-view'),
path('machine/<... | 32.833333 | 103 | 0.698816 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 173 | 0.292724 |
a30a5b9c466fd79c98aae5b462aff3ba4ea72d40 | 480 | py | Python | main.py | mrroot5/wall-builder | 2f0414359080fecdba5312463dd05cd9c11da6c1 | [
"MIT"
] | null | null | null | main.py | mrroot5/wall-builder | 2f0414359080fecdba5312463dd05cd9c11da6c1 | [
"MIT"
] | null | null | null | main.py | mrroot5/wall-builder | 2f0414359080fecdba5312463dd05cd9c11da6c1 | [
"MIT"
] | null | null | null | """
Python version 3.6.7
OS Linux Ubuntu 18.04.1 LTS
Created: 30/11/2018 17:12
Finished: 30/11/2018 19:
Author: Adrian Garrido Garcia
"""
import sys
from wall.builder import build_a_wall
if __name__ == '__main__':
try:
build_a_wall(sys.argv[1], sys.argv[2])
except IndexError:
rows = input("Ple... | 25.263158 | 83 | 0.672917 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 249 | 0.51875 |
a30c417b3a747422a1fa92c8a3a68fa2a0ddf883 | 2,770 | py | Python | dataset.py | njoel-ethz/saliency-rl | 61cf7acf10569b04c3a59528a4fc511c6e794895 | [
"MIT"
] | null | null | null | dataset.py | njoel-ethz/saliency-rl | 61cf7acf10569b04c3a59528a4fc511c6e794895 | [
"MIT"
] | null | null | null | dataset.py | njoel-ethz/saliency-rl | 61cf7acf10569b04c3a59528a4fc511c6e794895 | [
"MIT"
] | null | null | null | import os
import csv
import cv2
import numpy as np
import torch
from torch.utils.data import Dataset, DataLoader
def transform(snippet):
''' stack & noralization '''
snippet = np.concatenate(snippet, axis=-1)
snippet = torch.from_numpy(snippet).permute(2, 0, 1).contiguous().float()
snippet = snippet.mu... | 37.432432 | 136 | 0.615884 | 2,254 | 0.813718 | 0 | 0 | 0 | 0 | 0 | 0 | 339 | 0.122383 |
a30c4f34a3721276b10ca7d81878d13ffef5c2e3 | 1,342 | py | Python | back-end/api/migrations/0003_address_event.py | tuftsjumbocode/bostonathleticsassociation | 4a01607bd530e9f4973d3b345a442b4eceafa8e1 | [
"MIT"
] | 2 | 2017-01-30T01:33:07.000Z | 2017-02-12T22:00:19.000Z | back-end/api/migrations/0003_address_event.py | tuftsjumbocode/bostonathleticsassociation | 4a01607bd530e9f4973d3b345a442b4eceafa8e1 | [
"MIT"
] | 90 | 2017-02-02T01:56:30.000Z | 2017-05-07T02:58:46.000Z | back-end/api/migrations/0003_address_event.py | tuftsjumbocode/bostonathleticsassociation | 4a01607bd530e9f4973d3b345a442b4eceafa8e1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-10-19 08:29
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('api', '0002_auto_20161006_0128'),
]
operations = [... | 34.410256 | 114 | 0.551416 | 1,151 | 0.857675 | 0 | 0 | 0 | 0 | 0 | 0 | 223 | 0.16617 |
a30c6a24fddc04808da5db4f7c0d305641d9674e | 8,505 | py | Python | Pre-Processing/generate_tfrecords.py | beric7/COCO-Bridge | c3ae8e5eb72cbc2fce982215c55bac09844764d8 | [
"Apache-2.0"
] | 2 | 2020-07-06T23:25:12.000Z | 2021-09-21T23:11:55.000Z | Pre-Processing/generate_tfrecords.py | beric7/COCO-Bridge | c3ae8e5eb72cbc2fce982215c55bac09844764d8 | [
"Apache-2.0"
] | null | null | null | Pre-Processing/generate_tfrecords.py | beric7/COCO-Bridge | c3ae8e5eb72cbc2fce982215c55bac09844764d8 | [
"Apache-2.0"
] | null | null | null | # generate_tfrecords.py
# Note: substantial portions of this code, expecially the create_tf_example() function, are credit to Dat Tran
# see his website here: https://towardsdatascience.com/how-to-train-your-own-object-detector-with-tensorflows-object-detector-api-bec72ecfe1d9
# and his GitHub here: https://github.com... | 45 | 142 | 0.642563 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,309 | 0.506643 |
a30d6af902c1a8c64022ae0458cac17dd1fa6032 | 6,398 | py | Python | openprocurement/chronograph/__init__.py | yshalenyk/openprocurement.chronograph | c15a6da519cea8a09b5d9a943752a49dd6f5131f | [
"Apache-2.0"
] | null | null | null | openprocurement/chronograph/__init__.py | yshalenyk/openprocurement.chronograph | c15a6da519cea8a09b5d9a943752a49dd6f5131f | [
"Apache-2.0"
] | null | null | null | openprocurement/chronograph/__init__.py | yshalenyk/openprocurement.chronograph | c15a6da519cea8a09b5d9a943752a49dd6f5131f | [
"Apache-2.0"
] | null | null | null | import gevent.monkey
gevent.monkey.patch_all()
import os
from logging import getLogger
#from apscheduler.executors.pool import ThreadPoolExecutor, ProcessPoolExecutor
from apscheduler.schedulers.gevent import GeventScheduler as Scheduler
from couchdb import Server, Session
from couchdb.http import Unauthorized, extract... | 44.124138 | 215 | 0.664739 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,995 | 0.311816 |
a30f4fc2ab1f50558de3a730d24cdd2bc794f650 | 1,078 | py | Python | poc/setmanyblocks.py | astro-pi/SpaceCRAFT | b577681b31c0554db9e77ed816cd63900fe195ca | [
"BSD-3-Clause"
] | 12 | 2016-03-05T16:40:16.000Z | 2019-10-27T07:48:12.000Z | poc/setmanyblocks.py | astro-pi/SpaceCRAFT | b577681b31c0554db9e77ed816cd63900fe195ca | [
"BSD-3-Clause"
] | 1 | 2016-03-03T16:54:59.000Z | 2016-03-09T12:14:33.000Z | poc/setmanyblocks.py | astro-pi/SpaceCRAFT | b577681b31c0554db9e77ed816cd63900fe195ca | [
"BSD-3-Clause"
] | 2 | 2015-12-01T08:01:07.000Z | 2019-10-27T07:48:19.000Z | #code which sends many setBlock commands all in one go, to see if there was
# a performance improvement.. It sent them a lot quicker, but you still had to wait
# for minecraft to catch up
import mcpi.minecraft as minecraft
import mcpi.block as block
import mcpi.util as util
from time import time, sleep
def setManyBloc... | 25.069767 | 83 | 0.666976 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 209 | 0.193878 |
a31137aa372b035d450bbbaac3b873065c92d845 | 2,059 | py | Python | modules/yatse/templatetags/strings.py | Hinnack/yatse | 3386630d974cfe2d832c0297defd1822e463855d | [
"MIT"
] | null | null | null | modules/yatse/templatetags/strings.py | Hinnack/yatse | 3386630d974cfe2d832c0297defd1822e463855d | [
"MIT"
] | 1 | 2021-02-22T18:06:52.000Z | 2021-02-22T18:06:52.000Z | modules/yatse/templatetags/strings.py | Hinnack/yatse | 3386630d974cfe2d832c0297defd1822e463855d | [
"MIT"
] | null | null | null | from django import template
from django.conf import settings
from django.utils.translation import ugettext as _
from django.forms.forms import pretty_name
#from yats.diff import generate_patch_html
import re
try:
import json
except ImportError:
from django.utils import simplejson as json
register = template.L... | 27.824324 | 107 | 0.599806 | 992 | 0.481787 | 0 | 0 | 0 | 0 | 0 | 0 | 329 | 0.159786 |
a3140847cb4f8ae37f600751b8e796fb5fea58ee | 129 | py | Python | Lib/test/test_import/data/circular_imports/rebinding.py | sireliah/polish-python | 605df4944c2d3bc25f8bf6964b274c0a0d297cc3 | [
"PSF-2.0"
] | 1 | 2018-06-21T18:21:24.000Z | 2018-06-21T18:21:24.000Z | Lib/test/test_import/data/circular_imports/rebinding.py | sireliah/polish-python | 605df4944c2d3bc25f8bf6964b274c0a0d297cc3 | [
"PSF-2.0"
] | null | null | null | Lib/test/test_import/data/circular_imports/rebinding.py | sireliah/polish-python | 605df4944c2d3bc25f8bf6964b274c0a0d297cc3 | [
"PSF-2.0"
] | null | null | null | """Test the binding of names when a circular zaimportuj shares the same name jako an
attribute."""
z .rebinding2 zaimportuj util
| 32.25 | 84 | 0.782946 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 98 | 0.75969 |
a3156184194412b6c58e7f98504a56f1d8eea1bf | 1,132 | py | Python | Chapter08/8_2_save_packets_in_pcap_format.py | shamir456/Python-Network-Programming-Cookbook-Second-Edition | 7f5ebcbb4ef79c41da677afdf0d8e0fb575dcf0b | [
"MIT"
] | 125 | 2017-08-10T18:09:55.000Z | 2022-03-29T10:14:31.000Z | Chapter08/8_2_save_packets_in_pcap_format.py | shamir456/Python-Network-Programming-Cookbook-Second-Edition | 7f5ebcbb4ef79c41da677afdf0d8e0fb575dcf0b | [
"MIT"
] | 4 | 2018-01-19T05:42:58.000Z | 2019-03-07T06:18:52.000Z | Chapter08/8_2_save_packets_in_pcap_format.py | shamir456/Python-Network-Programming-Cookbook-Second-Edition | 7f5ebcbb4ef79c41da677afdf0d8e0fb575dcf0b | [
"MIT"
] | 79 | 2017-08-15T00:40:36.000Z | 2022-02-26T10:20:24.000Z | #!/usr/bin/env python
# Python Network Programming Cookbook, Second Edition -- Chapter - 8
# This program is optimized for Python 2.7.12 and Python 3.5.2.
# It may run on any other version with/without modifications.
import os
from scapy.all import *
pkts = []
count = 0
pcapnum = 0
def write_cap(x):
global pkts... | 24.085106 | 74 | 0.590106 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 406 | 0.358657 |
a316647d2535cb3b325343092f5d4ee583cf738e | 2,862 | py | Python | tests/test_init.py | Javex/pyramid_crud | 873ca8a84c9e5030257a327259f7f1972ba42c9d | [
"MIT"
] | 4 | 2015-03-04T11:35:15.000Z | 2017-05-05T04:00:26.000Z | tests/test_init.py | Javex/pyramid_crud | 873ca8a84c9e5030257a327259f7f1972ba42c9d | [
"MIT"
] | 16 | 2015-02-14T00:56:03.000Z | 2015-02-19T22:23:13.000Z | tests/test_init.py | Javex/pyramid_crud | 873ca8a84c9e5030257a327259f7f1972ba42c9d | [
"MIT"
] | 3 | 2015-08-25T13:20:17.000Z | 2020-05-10T19:02:18.000Z | import pyramid_crud
import pytest
from pyramid.exceptions import ConfigurationError
from pyramid.interfaces import ISessionFactory
@pytest.fixture
def static_prefix(config):
"Add a static URL prefix with the name '/testprefix'"
config.add_settings({'crud.static_url_prefix': '/testprefix'})
@pytest.fixture
d... | 30.446809 | 74 | 0.759609 | 0 | 0 | 0 | 0 | 1,615 | 0.564291 | 0 | 0 | 536 | 0.187282 |
a3168c69f4eb9f2ba122306fee2a6890c6f1230e | 1,621 | py | Python | Assignments/Sprint2/FinValuePivot.py | mark-morelos/CS_Notes | 339c47ae5d7e678b7ac98d6d78857d016c611e38 | [
"MIT"
] | 1 | 2021-02-28T07:43:59.000Z | 2021-02-28T07:43:59.000Z | Assignments/Sprint2/FinValuePivot.py | mark-morelos/CS_Notes | 339c47ae5d7e678b7ac98d6d78857d016c611e38 | [
"MIT"
] | null | null | null | Assignments/Sprint2/FinValuePivot.py | mark-morelos/CS_Notes | 339c47ae5d7e678b7ac98d6d78857d016c611e38 | [
"MIT"
] | 1 | 2021-03-03T03:52:21.000Z | 2021-03-03T03:52:21.000Z | """
You are given a sorted array in ascending order that is rotated at some unknown pivot
(i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]) and a target value.
Write a function that returns the target value's index. If the target value is not present
in the array, return -1.
You may assume no duplicate exists in... | 25.730159 | 91 | 0.58359 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 526 | 0.324491 |
a31d402b111d9ee652386e79f628f7e0ddffa959 | 987 | py | Python | utility.py | Forthyse/Forsythe-Bot | c8871b1fde456403d951a9dde13dddaca2d3f67b | [
"MIT"
] | 3 | 2021-01-18T22:10:05.000Z | 2022-01-07T21:46:34.000Z | utility.py | Forthyse/Forsythe-Bot | c8871b1fde456403d951a9dde13dddaca2d3f67b | [
"MIT"
] | null | null | null | utility.py | Forthyse/Forsythe-Bot | c8871b1fde456403d951a9dde13dddaca2d3f67b | [
"MIT"
] | 2 | 2020-10-21T01:27:34.000Z | 2021-01-02T23:51:02.000Z | import discord
from discord.ext import commands
class utility(commands.Cog):
def __init__(self, client):
self.client = client
@commands.guild_only()
@commands.command(name = "avatar", aliases = ["av", "pic"])
async def avatar(self, ctx, user: discord.User=None):
if user is No... | 37.961538 | 140 | 0.64843 | 876 | 0.887538 | 0 | 0 | 769 | 0.779129 | 556 | 0.563323 | 173 | 0.175279 |
a31f5b674099dd26d6054dab2dbff6ca679ee640 | 8,215 | py | Python | torch/ao/quantization/fx/fusion_patterns.py | li-ang/pytorch | 17f3179d607b9a2eac5efdfc36673e89f70e6628 | [
"Intel"
] | 1 | 2022-02-15T07:07:31.000Z | 2022-02-15T07:07:31.000Z | torch/ao/quantization/fx/fusion_patterns.py | xiaozhoushi/pytorch | 7dba88dfdb414def252531027658afe60409291d | [
"Intel"
] | null | null | null | torch/ao/quantization/fx/fusion_patterns.py | xiaozhoushi/pytorch | 7dba88dfdb414def252531027658afe60409291d | [
"Intel"
] | null | null | null | import torch
from torch.fx.graph import Node
from .pattern_utils import (
register_fusion_pattern,
)
from .utils import _parent_name
from .quantization_types import QuantizerCls, NodePattern, Pattern
from ..fuser_method_mappings import get_fuser_method
from ..fuser_method_mappings import get_fuser_method_new
from a... | 48.89881 | 118 | 0.684967 | 6,059 | 0.737553 | 0 | 0 | 7,486 | 0.91126 | 0 | 0 | 1,053 | 0.12818 |
a31fadf9b33e9208ee29c713435331b8514e5684 | 9,786 | py | Python | derender/networks.py | tonyman1008/RADAR | b2fc944230c2fd445528a9827eea42e1a94957b8 | [
"CC0-1.0"
] | 38 | 2021-08-19T18:07:49.000Z | 2022-02-28T10:41:29.000Z | derender/networks.py | tonyman1008/RADAR | b2fc944230c2fd445528a9827eea42e1a94957b8 | [
"CC0-1.0"
] | 1 | 2021-10-30T14:43:18.000Z | 2021-11-13T01:18:53.000Z | derender/networks.py | tonyman1008/RADAR | b2fc944230c2fd445528a9827eea42e1a94957b8 | [
"CC0-1.0"
] | 5 | 2021-08-20T05:12:42.000Z | 2022-01-13T06:14:27.000Z | import numpy as np
import torch
import torch.nn as nn
import torchvision
EPS = 1e-7
class Encoder(nn.Module):
def __init__(self, cin, cout, in_size=64, nf=64, activation=nn.Tanh):
super(Encoder, self).__init__()
network = [
nn.Conv2d(cin, nf, kernel_size=4, stride=2, padding=1, bias=... | 41.466102 | 128 | 0.54251 | 9,688 | 0.989986 | 0 | 0 | 0 | 0 | 0 | 0 | 761 | 0.077764 |
a31fd12f7a47de59f2c6b4b5f49ad1fb2f1eaf44 | 244 | py | Python | app/generator-input.py | consoles/dsa4js | 83a064c3485e33bf3f0c70a10167b8a5bc08e10e | [
"MIT"
] | 2 | 2018-01-19T08:16:13.000Z | 2019-08-15T12:26:08.000Z | app/generator-input.py | consoles/dsa4js | 83a064c3485e33bf3f0c70a10167b8a5bc08e10e | [
"MIT"
] | null | null | null | app/generator-input.py | consoles/dsa4js | 83a064c3485e33bf3f0c70a10167b8a5bc08e10e | [
"MIT"
] | 1 | 2019-08-15T12:26:11.000Z | 2019-08-15T12:26:11.000Z | #!/usr/bin python
#coding:utf-8
#
# 生成10^7个乱序整数
import random
RANGE = 10000000
f = open('../test/input/bitSort.input','w')
for i in random.sample(range(RANGE),RANGE):
f.write(str(i) + '\n')
f.close()
print 'generator input file success!' | 15.25 | 43 | 0.672131 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 125 | 0.484496 |
a323da1e6144f951fab0d4c366a9e8d27bf93ca5 | 46,478 | py | Python | sdk/ml/azure-ai-ml/azure/ai/ml/_restclient/v2020_09_01_dataplanepreview/models/_models.py | dubiety/azure-sdk-for-python | 62ffa839f5d753594cf0fe63668f454a9d87a346 | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/ml/azure-ai-ml/azure/ai/ml/_restclient/v2020_09_01_dataplanepreview/models/_models.py | ellhe-blaster/azure-sdk-for-python | 82193ba5e81cc5e5e5a5239bba58abe62e86f469 | [
"MIT"
] | null | null | null | sdk/ml/azure-ai-ml/azure/ai/ml/_restclient/v2020_09_01_dataplanepreview/models/_models.py | ellhe-blaster/azure-sdk-for-python | 82193ba5e81cc5e5e5a5239bba58abe62e86f469 | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 39.48853 | 146 | 0.650652 | 45,855 | 0.986596 | 0 | 0 | 0 | 0 | 0 | 0 | 33,997 | 0.731464 |
a3256f1d5ce64484739511b64bf4572f8dcbb09c | 407 | py | Python | utils.py | AbinavRavi/Federated-learning-MI | 06294e5de94bf5b8826dedb469a3430fdae76e37 | [
"MIT"
] | 3 | 2021-04-04T19:32:29.000Z | 2022-02-10T05:25:27.000Z | utils.py | AbinavRavi/Federated-learning-MI | 06294e5de94bf5b8826dedb469a3430fdae76e37 | [
"MIT"
] | null | null | null | utils.py | AbinavRavi/Federated-learning-MI | 06294e5de94bf5b8826dedb469a3430fdae76e37 | [
"MIT"
] | null | null | null | import nibabel as nib
import numpy as np
from glob import glob
def to_slice(image_path,seg_path):
image = nib.load(image_path).get_fdata()
seg = nib.load(seg_path).get_fdata()
image_list = []
seg_list = []
for i in range(image.shape[2]):
if(np.nonzero(image[i])!= 0):
image_list.... | 22.611111 | 44 | 0.638821 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a3259ed1f24efeaecf755551060f140ed167c93c | 576 | py | Python | tests/test_ebook.py | plysytsya/doublebook | 09dcd5399288c9544df928136a9e2f2e54639cbd | [
"MIT"
] | null | null | null | tests/test_ebook.py | plysytsya/doublebook | 09dcd5399288c9544df928136a9e2f2e54639cbd | [
"MIT"
] | null | null | null | tests/test_ebook.py | plysytsya/doublebook | 09dcd5399288c9544df928136a9e2f2e54639cbd | [
"MIT"
] | null | null | null | import os
import unittest
from doublebook.ebook import Ebook
THIS_DIR = os.path.dirname(os.path.abspath(__file__))
class EbookTest(unittest.TestCase):
def setUp(self):
path_to_text = os.path.join(THIS_DIR, "test_data", "zen_en.txt")
self.ebook = Ebook(path_to_text)
def test_read(self):
... | 22.153846 | 72 | 0.689236 | 396 | 0.6875 | 0 | 0 | 0 | 0 | 0 | 0 | 33 | 0.057292 |
a32929c2bf6ce5c743f0108e1a7c3d364e872fd0 | 299 | py | Python | server/entities/log_group.py | thulio/watchlogs | 17469f77851ce0cab916c472f9f508790b6157bf | [
"MIT"
] | 1 | 2019-12-30T16:32:47.000Z | 2019-12-30T16:32:47.000Z | server/entities/log_group.py | thulio/watchlogs | 17469f77851ce0cab916c472f9f508790b6157bf | [
"MIT"
] | null | null | null | server/entities/log_group.py | thulio/watchlogs | 17469f77851ce0cab916c472f9f508790b6157bf | [
"MIT"
] | null | null | null | class LogGroup(object):
def __init__(self, name, streams=None):
self.name = name
self.streams = streams
@classmethod
def from_dict(cls, group_dict):
return LogGroup(group_dict['logGroupName'])
def __eq__(self, other):
return self.name == other.name
| 24.916667 | 51 | 0.64214 | 298 | 0.996656 | 0 | 0 | 100 | 0.334448 | 0 | 0 | 14 | 0.046823 |
a32a2a3e9e3b2d5447dc0047b1a00f9577f9eedc | 13,924 | py | Python | build_github_actions.py | Geequlim/ECMAScript | 8817a9f63b28d07bde65334e8663d324da06282b | [
"MIT"
] | 155 | 2019-02-04T20:24:35.000Z | 2020-07-10T00:14:37.000Z | build_github_actions.py | Geequlim/ECMAScript | 8817a9f63b28d07bde65334e8663d324da06282b | [
"MIT"
] | 25 | 2019-02-15T05:36:02.000Z | 2020-07-10T08:06:00.000Z | build_github_actions.py | Geequlim/ECMAScript | 8817a9f63b28d07bde65334e8663d324da06282b | [
"MIT"
] | 13 | 2019-04-09T09:32:55.000Z | 2020-07-07T20:56:46.000Z | #!/usr/bin/env python
"""
run this every time you upgrade the godot-base version to generate new matching github workflows
You must be in this directory, and in the modules subfolder of godot (just as if you would install this project into godot)
usage:
python build_github_actions.py --godot-version "3.4.4-stable" --g... | 40.242775 | 214 | 0.568946 | 501 | 0.035973 | 0 | 0 | 512 | 0.036763 | 0 | 0 | 6,220 | 0.446614 |
a32ad9de709c3a24f830152b0d7a35e9a5113527 | 10,061 | py | Python | src/panoramic/cli/husky/service/blending/tel_planner.py | kubamahnert/panoramic-cli | 036f45a05d39f5762088ce23dbe367b938192f79 | [
"MIT"
] | 5 | 2020-11-13T17:26:59.000Z | 2021-03-19T15:11:26.000Z | src/panoramic/cli/husky/service/blending/tel_planner.py | kubamahnert/panoramic-cli | 036f45a05d39f5762088ce23dbe367b938192f79 | [
"MIT"
] | 5 | 2020-10-28T10:22:35.000Z | 2021-01-27T17:33:58.000Z | src/panoramic/cli/husky/service/blending/tel_planner.py | kubamahnert/panoramic-cli | 036f45a05d39f5762088ce23dbe367b938192f79 | [
"MIT"
] | 3 | 2021-01-26T07:58:03.000Z | 2021-03-11T13:28:34.000Z | from collections import defaultdict
from typing import Dict, Iterable, List, Optional, Set, Tuple, cast
from sqlalchemy import column
from panoramic.cli.husky.common.enum import EnumHelper
from panoramic.cli.husky.core.taxonomy.aggregations import AggregationDefinition
from panoramic.cli.husky.core.taxonomy.enums imp... | 43.743478 | 125 | 0.657191 | 8,763 | 0.870987 | 0 | 0 | 7,189 | 0.714541 | 0 | 0 | 1,308 | 0.130007 |
a32bb9ecf389628aa17fb222486d5eb8bc144dcb | 13,836 | py | Python | mrcnn/callbacks.py | dtitenko-dev/Mask_RCNN | 5167db4174d96e9f2accc0a9f4866fb3a7bf5993 | [
"MIT"
] | null | null | null | mrcnn/callbacks.py | dtitenko-dev/Mask_RCNN | 5167db4174d96e9f2accc0a9f4866fb3a7bf5993 | [
"MIT"
] | null | null | null | mrcnn/callbacks.py | dtitenko-dev/Mask_RCNN | 5167db4174d96e9f2accc0a9f4866fb3a7bf5993 | [
"MIT"
] | null | null | null | import os
import re
import six
import h5py
import json
import logging
import tensorflow.keras as keras
from tensorflow.python.keras import optimizers
from tensorflow.python.keras.saving import hdf5_format
from tensorflow.python.keras.utils import tf_utils
from tensorflow.python.keras.saving import saving_utils
from t... | 44.632258 | 92 | 0.626337 | 10,746 | 0.77667 | 0 | 0 | 0 | 0 | 0 | 0 | 5,096 | 0.368315 |
a32cb578d2151333cae6b68de0344e2c78b2c29d | 875 | py | Python | wapps/gallery/migrations/0002_manual_album_image_deletion.py | apihackers/wapps | e8158747aa3d77246d41142580faf9a5f2b0d968 | [
"MIT"
] | 7 | 2018-01-17T20:26:59.000Z | 2022-03-23T08:12:00.000Z | wapps/gallery/migrations/0002_manual_album_image_deletion.py | apihackers/wapps | e8158747aa3d77246d41142580faf9a5f2b0d968 | [
"MIT"
] | 511 | 2017-10-21T17:59:50.000Z | 2022-03-28T18:49:21.000Z | wapps/gallery/migrations/0002_manual_album_image_deletion.py | apihackers/wapps | e8158747aa3d77246d41142580faf9a5f2b0d968 | [
"MIT"
] | 2 | 2018-05-02T08:27:42.000Z | 2020-08-17T18:42:49.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-10-26 06:57
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
from wapps.utils import get_image_model
def drop_empty_gallery_images(apps, schema_editor):
AlbumImage = apps.get_model('galle... | 28.225806 | 121 | 0.693714 | 419 | 0.478857 | 0 | 0 | 0 | 0 | 0 | 0 | 155 | 0.177143 |
a32cce774b4abbb45c4fa0ea764a45099fab3182 | 6,888 | py | Python | lib/examples/TOA_balance.py | CliMT/climt-legacy | adbd4fe77426c90deb8d2c046a2f3dc3b72df89e | [
"BSD-3-Clause"
] | null | null | null | lib/examples/TOA_balance.py | CliMT/climt-legacy | adbd4fe77426c90deb8d2c046a2f3dc3b72df89e | [
"BSD-3-Clause"
] | null | null | null | lib/examples/TOA_balance.py | CliMT/climt-legacy | adbd4fe77426c90deb8d2c046a2f3dc3b72df89e | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import climt
from pylab import *
# Replicates the behavior of the online radiation calculator
# see maths.ucd.ie/~rca
scheme = 'ccm3'
Insolation = 337. #* .75
Imbalance = 30.
Albedo = 30. /100.
CO2 = 350.
CH4 = 1.7 + 1.e-9
N2O = 0. + 1.e-... | 30.613333 | 123 | 0.612079 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,031 | 0.294861 |
a32d307b1fe682f59762c7e5a70a9d45122fc794 | 117 | py | Python | tools/inject_pydoc/idp.py | fengjixuchui/src | 0c5a6cd8057717f73b1373f8d85eb9b19e1934e1 | [
"BSD-3-Clause"
] | 1,160 | 2015-05-02T15:13:20.000Z | 2022-03-31T20:04:28.000Z | tools/inject_pydoc/idp.py | fengjixuchui/src | 0c5a6cd8057717f73b1373f8d85eb9b19e1934e1 | [
"BSD-3-Clause"
] | 19 | 2015-04-20T13:47:00.000Z | 2021-07-07T13:00:42.000Z | tools/inject_pydoc/idp.py | fengjixuchui/src | 0c5a6cd8057717f73b1373f8d85eb9b19e1934e1 | [
"BSD-3-Clause"
] | 257 | 2015-04-01T21:42:33.000Z | 2022-03-10T11:57:51.000Z | {
"ev_get_bg_color" : {
"repl_text" : ("(self, color, ea) -> int", "(self, ea) -> int or None"),
}
}
| 19.5 | 80 | 0.452991 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 81 | 0.692308 |
a32d410f0fad03a9c0fdccb975ef58812fe45a3f | 4,576 | py | Python | pca.py | vgp314/Udacity-Arvato-Identify-Customer-Segments | 6be1d4f1eeac391c17c70fdf584bdc4813f80fd8 | [
"ADSL"
] | 1 | 2020-05-21T23:56:57.000Z | 2020-05-21T23:56:57.000Z | pca.py | vgp314/Udacity-Arvato-Identify-Customer-Segments | 6be1d4f1eeac391c17c70fdf584bdc4813f80fd8 | [
"ADSL"
] | null | null | null | pca.py | vgp314/Udacity-Arvato-Identify-Customer-Segments | 6be1d4f1eeac391c17c70fdf584bdc4813f80fd8 | [
"ADSL"
] | null | null | null | #pca model n componentes
from sklearn.decomposition import PCA
import numpy as np
from pylab import rcParams
import matplotlib.pyplot as plt
import pandas as pd
def pca_model_n_components(df,n_components):
'''
Definition:
Initialize pca with n_components
args:
dataframe and number of components
returns:
... | 29.908497 | 101 | 0.671547 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,369 | 0.29917 |
a32ec2ac9f37deceb74746f32c5ce3fa89c08ee8 | 4,446 | py | Python | media_analyzer/core/top_news.py | nyancol/MediaAnalyzer | fe504aa63646d27dfca6ca2c5435b0877d65ab2a | [
"MIT"
] | null | null | null | media_analyzer/core/top_news.py | nyancol/MediaAnalyzer | fe504aa63646d27dfca6ca2c5435b0877d65ab2a | [
"MIT"
] | null | null | null | media_analyzer/core/top_news.py | nyancol/MediaAnalyzer | fe504aa63646d27dfca6ca2c5435b0877d65ab2a | [
"MIT"
] | null | null | null | import datetime
import numpy as np
import json
from sklearn.decomposition import NMF, LatentDirichletAllocation, TruncatedSVD
from sklearn.feature_extraction.text import CountVectorizer
from nltk.corpus import stopwords
import spacy
from media_analyzer import database
NUM_TOPICS = 20
def load_data(begin, end, langu... | 33.938931 | 97 | 0.634278 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 792 | 0.178138 |
a3306511794dd745848ecb0131b99b481e38843f | 669 | py | Python | PYTHON/IP-Address-Checker.py | ayushyado/HACKTOBERFEST2021-2 | b63d568fd7f33023ca0b0dbd91325444c70c4d10 | [
"MIT"
] | 125 | 2021-10-01T19:05:26.000Z | 2021-10-03T13:32:42.000Z | PYTHON/IP-Address-Checker.py | ayushyado/HACKTOBERFEST2021-2 | b63d568fd7f33023ca0b0dbd91325444c70c4d10 | [
"MIT"
] | 201 | 2021-10-30T20:40:01.000Z | 2022-03-22T17:26:28.000Z | PYTHON/IP-Address-Checker.py | ayushyado/HACKTOBERFEST2021-2 | b63d568fd7f33023ca0b0dbd91325444c70c4d10 | [
"MIT"
] | 294 | 2021-10-01T18:46:05.000Z | 2021-10-03T14:25:07.000Z | import urllib2
def get_public_ip(request_target):
grabber = urllib2.build_opener()
grabber.addheaders = [('Useragent','Mozilla/5.0')]
try:
public_ip_address = grabber.open(target_url).read()
except urllib2.HTTPError, error:
print("There was an error trying to get your Public IP: %s") % (error)
except urllib2.... | 31.857143 | 72 | 0.730942 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 232 | 0.346786 |
a3325c6fb73e3191f10fa77771bfdc292d1ff768 | 2,586 | py | Python | scraper.py | squash-bit/Automate-Whatsapp-News | 9bdbbbb397dc680825b19adcda4da81d1f66270c | [
"MIT"
] | 4 | 2020-11-21T19:08:56.000Z | 2021-05-06T13:09:45.000Z | scraper.py | squash-bit/Agent-Wallie | 9bdbbbb397dc680825b19adcda4da81d1f66270c | [
"MIT"
] | 1 | 2021-05-06T19:26:06.000Z | 2021-05-06T19:26:06.000Z | scraper.py | squash-bit/Agent-Wallie | 9bdbbbb397dc680825b19adcda4da81d1f66270c | [
"MIT"
] | 1 | 2021-05-06T13:25:08.000Z | 2021-05-06T13:25:08.000Z | # import necessary modules
import os
import re
import requests
import newspaper
from bs4 import BeautifulSoup
from newspaper import Article
from newspaper import Config
from article_summarizer import summarizer
from time import sleep
# clean data
class Cleanser:
"""Scrape the news site and get the relevant updates... | 39.181818 | 144 | 0.593968 | 2,337 | 0.903712 | 0 | 0 | 0 | 0 | 0 | 0 | 854 | 0.33024 |
a3340d73b31131cbb0f369140b3afe55408788f6 | 1,351 | py | Python | soli/aria/forms/species.py | rcdixon/soli | d29c77c1d391dfcc3c0dd0297ecf93fa9aa046ab | [
"MIT"
] | null | null | null | soli/aria/forms/species.py | rcdixon/soli | d29c77c1d391dfcc3c0dd0297ecf93fa9aa046ab | [
"MIT"
] | null | null | null | soli/aria/forms/species.py | rcdixon/soli | d29c77c1d391dfcc3c0dd0297ecf93fa9aa046ab | [
"MIT"
] | null | null | null | from aria.models import Genus, Species, Subspecies
from django import forms
from django.forms import inlineformset_factory
from .templates.templates import createTextInput, createSelectInput
class CreateSpeciesForm(forms.ModelForm):
class Meta:
model = Species
fields = ["name", "common_name"]
... | 29.369565 | 67 | 0.634345 | 761 | 0.563286 | 0 | 0 | 0 | 0 | 0 | 0 | 138 | 0.102147 |
a3349b6abd791f21baf0e781406ef6802460401f | 285 | py | Python | hour.py | anokata/pythonPetProjects | 245c3ff11ae560b17830970061d8d60013948fd7 | [
"MIT"
] | 3 | 2017-04-30T17:44:53.000Z | 2018-02-03T06:02:11.000Z | hour.py | anokata/pythonPetProjects | 245c3ff11ae560b17830970061d8d60013948fd7 | [
"MIT"
] | 10 | 2021-03-18T20:17:19.000Z | 2022-03-11T23:14:19.000Z | hour.py | anokata/pythonPetProjects | 245c3ff11ae560b17830970061d8d60013948fd7 | [
"MIT"
] | null | null | null | import math
def angle(m):
return 5.5 * m/60;
print(angle(20))
i = 0
for m in range(0,1440*60):
a = angle(m) / 360
d = a - math.floor(a)
if (d < 0.00001):
print(a, math.floor(a), d, d == 0.0)
i += 1
print(i)
for m in range(25):
print(360*m/5.5)
| 14.25 | 44 | 0.508772 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a33556dfd1ea6c5a377213bf148dae18a67adec5 | 4,038 | py | Python | src/third_party/wiredtiger/test/suite/test_encrypt08.py | benety/mongo | 203430ac9559f82ca01e3cbb3b0e09149fec0835 | [
"Apache-2.0"
] | null | null | null | src/third_party/wiredtiger/test/suite/test_encrypt08.py | benety/mongo | 203430ac9559f82ca01e3cbb3b0e09149fec0835 | [
"Apache-2.0"
] | null | null | null | src/third_party/wiredtiger/test/suite/test_encrypt08.py | benety/mongo | 203430ac9559f82ca01e3cbb3b0e09149fec0835 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Public Domain 2014-present MongoDB, Inc.
# Public Domain 2008-2014 WiredTiger, Inc.
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a com... | 43.419355 | 87 | 0.698613 | 2,365 | 0.585686 | 0 | 0 | 0 | 0 | 0 | 0 | 2,942 | 0.728579 |
a336bdbfb6767de53ac20167cacab792872e5ecf | 1,779 | py | Python | {{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/urls.py | mabdullahabid/cookiecutter-django-rest | 8cab90f115b99f7b700ec38a08cb3647eb0a847b | [
"MIT"
] | null | null | null | {{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/urls.py | mabdullahabid/cookiecutter-django-rest | 8cab90f115b99f7b700ec38a08cb3647eb0a847b | [
"MIT"
] | null | null | null | {{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/urls.py | mabdullahabid/cookiecutter-django-rest | 8cab90f115b99f7b700ec38a08cb3647eb0a847b | [
"MIT"
] | null | null | null | from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import path, re_path, include, reverse_lazy
from django.views.generic.base import RedirectView
from rest_framework import permissions
from rest_framework.authtoken import views
from rest_framew... | 35.58 | 88 | 0.754918 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 507 | 0.284992 |
a33868010eb5e7ae344ef9b1e3fe0336947b0c2f | 4,260 | py | Python | pdk_api.py | audacious-software/Passive-Data-Kit-External-Sensors | c4781c04ce3cb485b0c1e50a9e7c6db0c92a9959 | [
"Apache-2.0"
] | null | null | null | pdk_api.py | audacious-software/Passive-Data-Kit-External-Sensors | c4781c04ce3cb485b0c1e50a9e7c6db0c92a9959 | [
"Apache-2.0"
] | null | null | null | pdk_api.py | audacious-software/Passive-Data-Kit-External-Sensors | c4781c04ce3cb485b0c1e50a9e7c6db0c92a9959 | [
"Apache-2.0"
] | null | null | null | # pylint: disable=line-too-long, no-member
from __future__ import print_function
import arrow
import requests
from django.conf import settings
from django.contrib.gis.geos import GEOSGeometry
from django.utils import timezone
from django.utils.text import slugify
from passive_data_kit_external_sensors.models import... | 38.035714 | 141 | 0.603286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 576 | 0.135211 |
a339496b618754603c49253c77c1461b236400c0 | 37,496 | py | Python | fgcm/fgcmConfig.py | erykoff/fgcm | 51c39c5c7f904fbac755e775038730b4e6ba11bd | [
"Apache-2.0"
] | 5 | 2018-02-02T15:36:46.000Z | 2021-05-11T21:54:49.000Z | fgcm/fgcmConfig.py | erykoff/fgcm | 51c39c5c7f904fbac755e775038730b4e6ba11bd | [
"Apache-2.0"
] | 1 | 2021-08-19T19:56:33.000Z | 2021-08-19T19:56:33.000Z | fgcm/fgcmConfig.py | lsst/fgcm | 51c39c5c7f904fbac755e775038730b4e6ba11bd | [
"Apache-2.0"
] | 10 | 2019-01-09T22:50:04.000Z | 2020-02-12T16:36:27.000Z | import numpy as np
import os
import sys
import yaml
from .fgcmUtilities import FocalPlaneProjectorFromOffsets
from .fgcmLogger import FgcmLogger
class ConfigField(object):
"""
A validatable field with a default
"""
def __init__(self, datatype, value=None, default=None, required=False, length=None):
... | 46.063882 | 139 | 0.618759 | 37,345 | 0.995973 | 0 | 0 | 1,179 | 0.031443 | 0 | 0 | 8,855 | 0.236159 |
a339e1e76e5e76805cb412ba27d8dde8548e8e54 | 1,474 | py | Python | spearmint/transformations/demos/bibeta/show_warp_bibeta.py | fernandezdaniel/Spearmint | 3c9e0a4be6108c3d652606bd957f0c9ae1bfaf84 | [
"RSA-MD"
] | 6 | 2021-06-29T11:26:49.000Z | 2022-01-20T18:12:47.000Z | spearmint/transformations/demos/bibeta/show_warp_bibeta.py | fernandezdaniel/Spearmint | 3c9e0a4be6108c3d652606bd957f0c9ae1bfaf84 | [
"RSA-MD"
] | null | null | null | spearmint/transformations/demos/bibeta/show_warp_bibeta.py | fernandezdaniel/Spearmint | 3c9e0a4be6108c3d652606bd957f0c9ae1bfaf84 | [
"RSA-MD"
] | 9 | 2018-06-28T13:06:35.000Z | 2021-06-20T18:21:58.000Z | #Bibeta in action.
import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import beta
from scipy.stats import randint
def plot_1D_function(x, y, y_name='y'):
ax = plt.subplot(111)
ax.plot(x, y, label=y_name)
plt.legend(loc='best')
plt.title(y_name)
plt.show()
def fixed_ob... | 29.48 | 94 | 0.720488 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 121 | 0.08209 |
a33b33e393caf1662689964e235489b7f1ad1bdc | 1,350 | py | Python | setup.py | agflood/scatteringmatrix | dc9a048e4b57475c67bbac7d3165cf29b5cc66e9 | [
"MIT"
] | 1 | 2021-04-18T16:09:17.000Z | 2021-04-18T16:09:17.000Z | setup.py | agflood/scatteringmatrix | dc9a048e4b57475c67bbac7d3165cf29b5cc66e9 | [
"MIT"
] | 6 | 2018-09-03T06:46:39.000Z | 2019-05-25T21:42:17.000Z | setup.py | agflood/scatteringmatrix | dc9a048e4b57475c67bbac7d3165cf29b5cc66e9 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
from scatteringmatrix import __version__
with open("README.md", "r") as fh:
long_description = fh.read()
setup(name='scatteringmatrix',
version=__version__,
description='Optical scattering matrix library',
long_description=long_description,
long_... | 39.705882 | 66 | 0.60963 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 651 | 0.482222 |