hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fc5a7f4ca0194617ccf4d78bfd82260295b067f8 | 219 | py | Python | mnemocards/any2dict/json_reader.py | guiferviz/mnemocard | 6b5ef0a6d4aa5f5c01f8c467c3e406b424106a43 | [
"MIT"
] | null | null | null | mnemocards/any2dict/json_reader.py | guiferviz/mnemocard | 6b5ef0a6d4aa5f5c01f8c467c3e406b424106a43 | [
"MIT"
] | null | null | null | mnemocards/any2dict/json_reader.py | guiferviz/mnemocard | 6b5ef0a6d4aa5f5c01f8c467c3e406b424106a43 | [
"MIT"
] | null | null | null | import json
from .reader import Reader
from .register import add_reader
@add_reader
class JSON(Reader):
extensions = ["json"]
def loads(self, string, **options):
return json.loads(string, **options)
| 16.846154 | 44 | 0.694064 |
515b72a9bff95d0ecb29a5106b156b07b98b31b9 | 18,980 | py | Python | src/aiodynamo/expressions.py | uvve/aiodynamo | 39100748691ffe2c34caae4dcddaddb1dfa505a5 | [
"Apache-2.0"
] | null | null | null | src/aiodynamo/expressions.py | uvve/aiodynamo | 39100748691ffe2c34caae4dcddaddb1dfa505a5 | [
"Apache-2.0"
] | 1 | 2022-01-25T02:19:03.000Z | 2022-01-25T11:00:17.000Z | src/aiodynamo/expressions.py | Tinche/aiodynamo | 963a6baecb7782fb5820179e2ec0c041a527d02e | [
"Apache-2.0"
] | null | null | null | from __future__ import annotations
import abc
import decimal
from dataclasses import dataclass, field
from itertools import chain, count
from typing import *
from .errors import CannotAddToNestedField
from .types import AttributeType, Numeric, ParametersDict
from .utils import low_level_serialize
_ParametersCache = ... | 29.47205 | 132 | 0.6147 |
bab475c1be29c20cdeb89e8d4059d7f6c8d4512d | 3,121 | py | Python | api/tests/test_meta_records.py | jcuna/green-crn | bbb69a50801b68eb94e754d21be171e81e7a78a9 | [
"MIT"
] | null | null | null | api/tests/test_meta_records.py | jcuna/green-crn | bbb69a50801b68eb94e754d21be171e81e7a78a9 | [
"MIT"
] | 5 | 2021-06-08T20:28:10.000Z | 2022-02-26T18:56:05.000Z | api/tests/test_meta_records.py | jcuna/green-crn | bbb69a50801b68eb94e754d21be171e81e7a78a9 | [
"MIT"
] | null | null | null | from flask.testing import FlaskClient
from tests import endpoint
def test_countries(client: FlaskClient, admin_login):
resp = client.get(endpoint('/meta/countries'), headers=admin_login)
assert resp.status_code == 200
assert len(resp.json) == 2
for country in resp.json:
if country['name'] ==... | 30.598039 | 77 | 0.684076 |
0ae7c9bff52cd83c1b9cf7a94eb006905e663ce6 | 2,383 | py | Python | app/main/service/event_participant_service.py | luke-truitt/room40-underground | 174f57e0aa4b04bb7c983e10aaf4f4af6589d478 | [
"MIT"
] | null | null | null | app/main/service/event_participant_service.py | luke-truitt/room40-underground | 174f57e0aa4b04bb7c983e10aaf4f4af6589d478 | [
"MIT"
] | null | null | null | app/main/service/event_participant_service.py | luke-truitt/room40-underground | 174f57e0aa4b04bb7c983e10aaf4f4af6589d478 | [
"MIT"
] | 1 | 2021-07-21T13:36:13.000Z | 2021-07-21T13:36:13.000Z | import uuid
import datetime
from app.main import db
from app.main.model.event_participant import EventParticipant
def save_new_event_participant(data):
try:
new_event_participant = EventParticipant(
event_id=data['event_id'],
participant_id=data['participant_id'],
)
... | 27.709302 | 76 | 0.625682 |
a2084cac35a16ddd379174ca165814644dcf8bcf | 46,133 | py | Python | mypy/server/update.py | Herst/mypy | 437d7467af51199697937b4943be391bfffd23be | [
"PSF-2.0"
] | null | null | null | mypy/server/update.py | Herst/mypy | 437d7467af51199697937b4943be391bfffd23be | [
"PSF-2.0"
] | null | null | null | mypy/server/update.py | Herst/mypy | 437d7467af51199697937b4943be391bfffd23be | [
"PSF-2.0"
] | null | null | null | """Update build by processing changes using fine-grained dependencies.
Use fine-grained dependencies to update targets in other modules that
may be affected by externally-visible changes in the changed modules.
This forms the core of the fine-grained incremental daemon mode. This
module is not used at all by the 'cla... | 42.834726 | 99 | 0.645482 |
91392ce0a72738fb127b69128b82c3b92c9fc56d | 16,688 | py | Python | sdno-mpls-optimizer/tunnel_handler.py | openov2/sdno-optimize | a169b0d31541126db61af77ea3acb66d4a91072f | [
"CC-BY-4.0"
] | null | null | null | sdno-mpls-optimizer/tunnel_handler.py | openov2/sdno-optimize | a169b0d31541126db61af77ea3acb66d4a91072f | [
"CC-BY-4.0"
] | null | null | null | sdno-mpls-optimizer/tunnel_handler.py | openov2/sdno-optimize | a169b0d31541126db61af77ea3acb66d4a91072f | [
"CC-BY-4.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2016-2017 China Telecommunication Co., Ltd.
#
# 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/lice... | 36.357298 | 206 | 0.543444 |
2e5d5af639cb85da74232b1130cd832343351b86 | 3,896 | py | Python | rlpyt/envs/po_fourrooms/po_fourrooms_env.py | DavidSlayback/rlpyt | 445adbd3917842caae0cae0d06e4b2866c8f1258 | [
"MIT"
] | null | null | null | rlpyt/envs/po_fourrooms/po_fourrooms_env.py | DavidSlayback/rlpyt | 445adbd3917842caae0cae0d06e4b2866c8f1258 | [
"MIT"
] | null | null | null | rlpyt/envs/po_fourrooms/po_fourrooms_env.py | DavidSlayback/rlpyt | 445adbd3917842caae0cae0d06e4b2866c8f1258 | [
"MIT"
] | null | null | null | import gym
import gym_classics
from gym_classics.envs.four_rooms import FourRooms, NoisyGridworld
from rlpyt.envs.gym import GymEnvWrapper, GymSpaceWrapper
import numpy as np
all_squares = [(i,j) for i in range(11) for j in range(11)]
oc_initial_goal = [(8,4)] # Goal in east doorway
# Base FourRooms from gym-classics... | 48.7 | 136 | 0.650154 |
f4d74ad68f69215b379539fd519707ea6c453928 | 3,069 | py | Python | forceatlas.py | tpoisot/nxfa2 | 155497b4c7db73b2449b17bb12862b2d2f41b8c9 | [
"WTFPL"
] | 19 | 2015-04-08T15:23:47.000Z | 2021-09-29T15:41:47.000Z | forceatlas.py | tpoisot/nxfa2 | 155497b4c7db73b2449b17bb12862b2d2f41b8c9 | [
"WTFPL"
] | 1 | 2015-06-15T12:35:01.000Z | 2015-06-15T13:27:55.000Z | forceatlas.py | tpoisot/nxfa2 | 155497b4c7db73b2449b17bb12862b2d2f41b8c9 | [
"WTFPL"
] | 8 | 2015-01-26T23:07:43.000Z | 2016-12-13T22:53:43.000Z | #! /usr/bin/python
import networkx as nx
from scipy.sparse import spdiags, coo_matrix
import scipy as sp
import numpy as np
import matplotlib.pyplot as plt
## Now the layout function
def forceatlas2_layout(G, iterations=10, linlog=False, pos=None, nohubs=False,
kr=0.001, k=None, dim=2):
... | 34.1 | 78 | 0.572499 |
b34f797694715dc966830d71bf1b516711540753 | 1,475 | py | Python | result_to_plot.py | WeiWeic6222848/CT3 | 83eca467391b21c9edfc835623b4038369ffbbbb | [
"MIT"
] | null | null | null | result_to_plot.py | WeiWeic6222848/CT3 | 83eca467391b21c9edfc835623b4038369ffbbbb | [
"MIT"
] | null | null | null | result_to_plot.py | WeiWeic6222848/CT3 | 83eca467391b21c9edfc835623b4038369ffbbbb | [
"MIT"
] | null | null | null | # this file is added for clean plots and tables - CT3
from tabulate import tabulate
import pandas as pd
import matplotlib.pyplot as plt
resultB = pd.read_json("results/2b_eval_on_test.json")
resultC = pd.read_json("results/3_different_size.json")
scores = resultB.keys()
for algorithm in resultB.columns:
for key ... | 32.065217 | 78 | 0.68678 |
94dd8e2171b63e90e8b5d28aae4245460826fa6c | 4,607 | py | Python | tests/unit/conftest.py | SteveMayze/leawood_gateway | 4eee019f14ebc0c72dd8323acd5fc8c8981cc2fd | [
"MIT"
] | null | null | null | tests/unit/conftest.py | SteveMayze/leawood_gateway | 4eee019f14ebc0c72dd8323acd5fc8c8981cc2fd | [
"MIT"
] | null | null | null | tests/unit/conftest.py | SteveMayze/leawood_gateway | 4eee019f14ebc0c72dd8323acd5fc8c8981cc2fd | [
"MIT"
] | null | null | null | from dataclasses import dataclass
from typing import Callable, TypedDict
from leawood.domain.messages import Message, Telegram
from leawood.domain import messages
from leawood.domain.model import Node
from leawood.domain.hardware import Gateway, Modem, Sensor
from leawood.services.messagebus import LocalMessageBus
from... | 28.091463 | 93 | 0.685696 |
4079571aa7e6adf628a05b0bbbe409e69922f3de | 715 | py | Python | tests/test_annulus.py | Michael-4/Annulus | 1a1db2b2ddf289528ebfcef44b5ad4c43aebca49 | [
"MIT"
] | 3 | 2018-03-15T07:59:49.000Z | 2019-07-30T19:47:39.000Z | tests/test_annulus.py | Michael-4/Annulus | 1a1db2b2ddf289528ebfcef44b5ad4c43aebca49 | [
"MIT"
] | null | null | null | tests/test_annulus.py | Michael-4/Annulus | 1a1db2b2ddf289528ebfcef44b5ad4c43aebca49 | [
"MIT"
] | null | null | null | import pytest
import annulus
import cv2
import os.path
@pytest.fixture
def image():
path = os.path.abspath(os.path.dirname(__file__)) + "/../examples/image.png"
image = cv2.imread(path)
return image
def test_annulus(image):
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
gray = cv2.blur(gray, (5,... | 25.535714 | 80 | 0.682517 |
2fcd4c2a60b4b63582aa9eb0f1aa385019a7e30a | 627 | py | Python | hello/manage.py | manper32/WiseR | 253811568749b370bbe26db6de85eba83ec46e8a | [
"0BSD"
] | null | null | null | hello/manage.py | manper32/WiseR | 253811568749b370bbe26db6de85eba83ec46e8a | [
"0BSD"
] | null | null | null | hello/manage.py | manper32/WiseR | 253811568749b370bbe26db6de85eba83ec46e8a | [
"0BSD"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ClaroCV.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise Import... | 28.5 | 73 | 0.682616 |
4e84bedce724f87ada728b1c871f1068e7e1c00c | 484 | py | Python | parsec/commands/histories/show_dataset.py | simonbray/parsec | c0e123cbf7cb1289ec722357a6262f716575e4d9 | [
"Apache-2.0"
] | null | null | null | parsec/commands/histories/show_dataset.py | simonbray/parsec | c0e123cbf7cb1289ec722357a6262f716575e4d9 | [
"Apache-2.0"
] | null | null | null | parsec/commands/histories/show_dataset.py | simonbray/parsec | c0e123cbf7cb1289ec722357a6262f716575e4d9 | [
"Apache-2.0"
] | null | null | null | import click
from parsec.cli import pass_context, json_loads
from parsec.decorators import custom_exception, dict_output
@click.command('show_dataset')
@click.argument("history_id", type=str)
@click.argument("dataset_id", type=str)
@pass_context
@custom_exception
@dict_output
def cli(ctx, history_id, dataset_id):
... | 24.2 | 64 | 0.77686 |
07de2eb1dc471ac6912d1181ae70d36915f61f21 | 55,860 | py | Python | sanic/app.py | jmarcet/sanic | 7384047f958ce9b6e6df531f9172429b87ac7ad2 | [
"MIT"
] | null | null | null | sanic/app.py | jmarcet/sanic | 7384047f958ce9b6e6df531f9172429b87ac7ad2 | [
"MIT"
] | null | null | null | sanic/app.py | jmarcet/sanic | 7384047f958ce9b6e6df531f9172429b87ac7ad2 | [
"MIT"
] | null | null | null | from __future__ import annotations
import asyncio
import logging
import logging.config
import re
import sys
from asyncio import (
AbstractEventLoop,
CancelledError,
Task,
ensure_future,
get_event_loop_policy,
get_running_loop,
wait_for,
)
from asyncio.futures import Future
from collections... | 35.220681 | 82 | 0.538149 |
0bbfcdfd2aa623405d0eebc074c0781f050ee3d8 | 1,278 | py | Python | gui/labeled_textarea.py | keremkoseoglu/Joseki | dbf2dbbc71bb98bad139a98f178b4793445f3f2c | [
"MIT"
] | 2 | 2019-03-11T07:17:30.000Z | 2019-03-25T12:18:18.000Z | gui/labeled_textarea.py | keremkoseoglu/Joseki | dbf2dbbc71bb98bad139a98f178b4793445f3f2c | [
"MIT"
] | 13 | 2020-05-17T11:54:09.000Z | 2022-03-31T13:06:39.000Z | gui/labeled_textarea.py | keremkoseoglu/Joseki | dbf2dbbc71bb98bad139a98f178b4793445f3f2c | [
"MIT"
] | 1 | 2019-07-14T18:00:44.000Z | 2019-07-14T18:00:44.000Z | """ Labeled text are module """
import tkinter
from config.constants import GUI_CELL_WIDTH
class LabeledTextarea:
""" Labeled text are class """
_LINE_FEED = "\r\n"
def __init__(self,
parent: tkinter.Toplevel,
label_text: str,
text_value,
... | 29.72093 | 63 | 0.582942 |
5e154eb21b029d120c099e5a50837ec81e958376 | 3,979 | py | Python | Python/extinction.py | agsreejith/CUTE-SNR | 9b263401c635ebaaab06835757a9436ae0dfdba5 | [
"MIT"
] | null | null | null | Python/extinction.py | agsreejith/CUTE-SNR | 9b263401c635ebaaab06835757a9436ae0dfdba5 | [
"MIT"
] | null | null | null | Python/extinction.py | agsreejith/CUTE-SNR | 9b263401c635ebaaab06835757a9436ae0dfdba5 | [
"MIT"
] | null | null | null | import numpy as np
def extinction_amores(glong,glat,distance):
#Interstellar Extinction in the Galaxy (Amores & L�pine - 2004)
#This program corresponds to the Axysimetric Model (Model A)
#If you have any difficulty, sugestion | comments, please contact:
#jacques@astro.iag.usp.br | amores@astro.iag.usp.b... | 36.842593 | 120 | 0.60769 |
344e6a5a48c0fd5dbe673b747ae8946b9353a6f0 | 1,442 | py | Python | tests/test_1_sub.py | timsears/imagezmq | 258453be9d86d213b31d83dcbcfcc68f26198328 | [
"MIT"
] | null | null | null | tests/test_1_sub.py | timsears/imagezmq | 258453be9d86d213b31d83dcbcfcc68f26198328 | [
"MIT"
] | null | null | null | tests/test_1_sub.py | timsears/imagezmq | 258453be9d86d213b31d83dcbcfcc68f26198328 | [
"MIT"
] | null | null | null | """test_1_sub.py -- basic receive images test in PUB/SUB mode.
A simple test program that uses imagezmq to receive images from a program that
is sending images. This test pair uses the PUB/SUB messaging pattern.
1. Run this program in its own terminal window:
python test_1_sub.py
There is no particular order in whic... | 36.05 | 79 | 0.776699 |
c0465484641dcd90ac642433664b011370e50b8d | 45,549 | py | Python | src/CADRE/comm.py | JustinSGray/OpenMDAO-CADRE | d8378a8a571179990531d8a409efe727cbdf2bb7 | [
"Apache-2.0"
] | 1 | 2021-07-11T19:15:22.000Z | 2021-07-11T19:15:22.000Z | src/CADRE/comm.py | JustinSGray/OpenMDAO-CADRE | d8378a8a571179990531d8a409efe727cbdf2bb7 | [
"Apache-2.0"
] | null | null | null | src/CADRE/comm.py | JustinSGray/OpenMDAO-CADRE | d8378a8a571179990531d8a409efe727cbdf2bb7 | [
"Apache-2.0"
] | 1 | 2015-11-19T18:18:01.000Z | 2015-11-19T18:18:01.000Z | ''' Communications Discpline for CADRE '''
import numpy as np
import scipy.sparse
import MBI
import os
from openmdao.lib.datatypes.api import Float, Array
from openmdao.main.api import Component
from CADRE.kinematics import fixangles, computepositionspherical, \
computepositionsphericaljacobian, computepositionro... | 30.901628 | 118 | 0.452436 |
fd0015fe8aa832f10d50c8397dce9214a0d34519 | 1,511 | py | Python | corehq/apps/locations/resources/v0_1.py | dslowikowski/commcare-hq | ad8885cf8dab69dc85cb64f37aeaf06106124797 | [
"BSD-3-Clause"
] | 1 | 2017-02-10T03:14:51.000Z | 2017-02-10T03:14:51.000Z | corehq/apps/locations/resources/v0_1.py | dslowikowski/commcare-hq | ad8885cf8dab69dc85cb64f37aeaf06106124797 | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/locations/resources/v0_1.py | dslowikowski/commcare-hq | ad8885cf8dab69dc85cb64f37aeaf06106124797 | [
"BSD-3-Clause"
] | null | null | null | from tastypie import fields
from corehq.apps.locations.models import Location, root_locations
from corehq.apps.api.resources.v0_1 import CustomResourceMeta, LoginAndDomainAuthentication
from corehq.apps.api.util import get_object_or_not_exist
import json
from corehq.apps.api.resources import HqBaseResource
class Loca... | 41.972222 | 98 | 0.735275 |
081ae4e264681d5f9bddb003c7b7934eda51e4c8 | 4,933 | py | Python | monoscene/scripts/generate_output.py | Teaksters/MonoScene | 0a5803052b54e57eb98556e53d3bf45be890b269 | [
"Apache-2.0"
] | null | null | null | monoscene/scripts/generate_output.py | Teaksters/MonoScene | 0a5803052b54e57eb98556e53d3bf45be890b269 | [
"Apache-2.0"
] | null | null | null | monoscene/scripts/generate_output.py | Teaksters/MonoScene | 0a5803052b54e57eb98556e53d3bf45be890b269 | [
"Apache-2.0"
] | null | null | null | from pytorch_lightning import Trainer
from monoscene.models.monoscene import MonoScene
from monoscene.data.NYU.nyu_dm import NYUDataModule
from monoscene.data.semantic_kitti.kitti_dm import KittiDataModule
from monoscene.data.kitti_360.kitti_360_dm import Kitti360DataModule
import hydra
from omegaconf import DictConfig... | 37.946154 | 101 | 0.57612 |
6bfa1749ef56b40281fab67eaa21665ece53fa05 | 4,301 | py | Python | code/10-sequence-lookup/verify_amplicon_type.py | GLOMICON/emp | c1f752d1ae4c009328bbdcecf9666dbd4dac39b6 | [
"BSD-3-Clause"
] | 1 | 2020-01-30T15:06:26.000Z | 2020-01-30T15:06:26.000Z | code/10-sequence-lookup/verify_amplicon_type.py | GLOMICON/emp | c1f752d1ae4c009328bbdcecf9666dbd4dac39b6 | [
"BSD-3-Clause"
] | null | null | null | code/10-sequence-lookup/verify_amplicon_type.py | GLOMICON/emp | c1f752d1ae4c009328bbdcecf9666dbd4dac39b6 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright (c) 2016, The Deblur Development Team.
#
# Distributed under the terms of the BSD 3-clause License.
#
# The full license is in the file LICENSE, distributed with this software.
# ---------------------------... | 46.75 | 90 | 0.613578 |
7b3b195501f31e5a761789a638311d6719c70d21 | 53 | py | Python | src/hw.py | romilly/pi-towers-workshop | dabd9c70a102f3c0501547ab14c678bb58281ec9 | [
"MIT"
] | 1 | 2018-05-26T19:52:05.000Z | 2018-05-26T19:52:05.000Z | src/hw.py | romilly/pi-towers-workshop | dabd9c70a102f3c0501547ab14c678bb58281ec9 | [
"MIT"
] | null | null | null | src/hw.py | romilly/pi-towers-workshop | dabd9c70a102f3c0501547ab14c678bb58281ec9 | [
"MIT"
] | null | null | null | from microbit import *
display.scroll('Hello World') | 17.666667 | 29 | 0.773585 |
5e97f63a4ca325ce0f7058d0112d4de091aba760 | 6,083 | py | Python | netket/vqs/mc/mc_state/expect_grad.py | NetKet/netket | 96758e814fc3128e6821564d6cc2852bac40ecf2 | [
"Apache-2.0"
] | null | null | null | netket/vqs/mc/mc_state/expect_grad.py | NetKet/netket | 96758e814fc3128e6821564d6cc2852bac40ecf2 | [
"Apache-2.0"
] | null | null | null | netket/vqs/mc/mc_state/expect_grad.py | NetKet/netket | 96758e814fc3128e6821564d6cc2852bac40ecf2 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The NetKet 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 applicable ... | 26.563319 | 88 | 0.646556 |
8130473b3627356e66cdd50d29a7893580ddc193 | 9,650 | py | Python | csbuild/project_generator_slickedit.py | brandonmbare/csbuild | ccdddb46f96364f50947f827efd3b3ef8af4a27e | [
"MIT"
] | null | null | null | csbuild/project_generator_slickedit.py | brandonmbare/csbuild | ccdddb46f96364f50947f827efd3b3ef8af4a27e | [
"MIT"
] | null | null | null | csbuild/project_generator_slickedit.py | brandonmbare/csbuild | ccdddb46f96364f50947f827efd3b3ef8af4a27e | [
"MIT"
] | null | null | null | # Copyright (C) 2013 Jaedyn K. Draper
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, di... | 38.91129 | 193 | 0.750155 |
ddaeb9a831930aa4f691296e519cf5a391d93940 | 332 | py | Python | hooks/pre_gen_project.py | aft-analytics/cookiecutter-poetry | 7577c44a0cceb8f524064f46d5aca56453d4a34e | [
"MIT"
] | 5 | 2021-04-06T06:32:30.000Z | 2022-02-20T07:40:45.000Z | hooks/pre_gen_project.py | aft-analytics/cookiecutter-poetry | 7577c44a0cceb8f524064f46d5aca56453d4a34e | [
"MIT"
] | 8 | 2020-12-31T11:45:38.000Z | 2021-08-08T15:03:33.000Z | hooks/pre_gen_project.py | aft-analytics/cookiecutter-poetry | 7577c44a0cceb8f524064f46d5aca56453d4a34e | [
"MIT"
] | 1 | 2021-08-11T03:02:32.000Z | 2021-08-11T03:02:32.000Z | #!/usr/bin/env python
import re
import sys
MODULE_REGEX = r"^[_a-zA-Z][_a-zA-Z0-9]+$"
module_name = "{{ cookiecutter.module_name }}"
if not re.match(MODULE_REGEX, module_name):
print(
"ERROR: The project slug (%s) is not a valid Python module name." % module_name
)
# Exit to cancel project
... | 19.529412 | 87 | 0.650602 |
53181a663b722e20d08e38bf31fddfbd9a255f00 | 1,727 | py | Python | scripts/fbi/hate_crime/preprocess_aggregations_test.py | rpatil524/data | 9e76c7f22a75ad4e52522444a080ed3f5c6da7dd | [
"Apache-2.0"
] | null | null | null | scripts/fbi/hate_crime/preprocess_aggregations_test.py | rpatil524/data | 9e76c7f22a75ad4e52522444a080ed3f5c6da7dd | [
"Apache-2.0"
] | null | null | null | scripts/fbi/hate_crime/preprocess_aggregations_test.py | rpatil524/data | 9e76c7f22a75ad4e52522444a080ed3f5c6da7dd | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 38.377778 | 77 | 0.605675 |
676a6c2689bf2e22172bc38208042014f6169ca6 | 1,619 | py | Python | sklearn/covariance/tests/test_elliptic_envelope.py | emarkou/scikit-learn | d73822f84f2832dcc25f0ff58769f60871a78025 | [
"BSD-3-Clause"
] | 6,989 | 2017-07-18T06:23:18.000Z | 2022-03-31T15:58:36.000Z | sklearn/covariance/tests/test_elliptic_envelope.py | emarkou/scikit-learn | d73822f84f2832dcc25f0ff58769f60871a78025 | [
"BSD-3-Clause"
] | 1,978 | 2017-07-18T09:17:58.000Z | 2022-03-31T14:28:43.000Z | sklearn/covariance/tests/test_elliptic_envelope.py | emarkou/scikit-learn | d73822f84f2832dcc25f0ff58769f60871a78025 | [
"BSD-3-Clause"
] | 1,228 | 2017-07-18T09:03:13.000Z | 2022-03-29T05:57:40.000Z | """
Testing for Elliptic Envelope algorithm (sklearn.covariance.elliptic_envelope).
"""
import numpy as np
import pytest
from sklearn.covariance import EllipticEnvelope
from sklearn.utils._testing import assert_almost_equal
from sklearn.utils._testing import assert_array_almost_equal
from sklearn.utils._testing impor... | 35.195652 | 79 | 0.671402 |
ee4de7c0828acbccc00f6e4a83fa87cbd8783b3b | 2,082 | py | Python | designate/api/admin/controllers/extensions/export.py | kiall/designate-py3 | 2b135d64bb0ced77327a563e037b270d1e5ca308 | [
"Apache-2.0"
] | null | null | null | designate/api/admin/controllers/extensions/export.py | kiall/designate-py3 | 2b135d64bb0ced77327a563e037b270d1e5ca308 | [
"Apache-2.0"
] | null | null | null | designate/api/admin/controllers/extensions/export.py | kiall/designate-py3 | 2b135d64bb0ced77327a563e037b270d1e5ca308 | [
"Apache-2.0"
] | null | null | null | # COPYRIGHT 2015 Hewlett-Packard Development Company, L.P.
#
# 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 applicabl... | 33.580645 | 75 | 0.62488 |
df9e0cc26767e4b23fdf29ffabc20b8a62f8b7c8 | 3,179 | py | Python | sbnet_tensorflow/benchmark/reduce_mask_tests.py | digital-idiot/sbnet | dbea11110f2559b56858a9cc2e216d016294f287 | [
"Apache-2.0"
] | 1 | 2018-03-02T02:24:07.000Z | 2018-03-02T02:24:07.000Z | sbnet_tensorflow/benchmark/reduce_mask_tests.py | lawrencewxj/sbnet | cf8ea06430c8d8c8d7c5af266a6f926fdde12312 | [
"Apache-2.0"
] | null | null | null | sbnet_tensorflow/benchmark/reduce_mask_tests.py | lawrencewxj/sbnet | cf8ea06430c8d8c8d7c5af266a6f926fdde12312 | [
"Apache-2.0"
] | 1 | 2021-04-22T08:25:04.000Z | 2021-04-22T08:25:04.000Z | """
Sparse Blocks Network
Copyright (c) 2017, Uber Technologies, 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 re... | 36.965116 | 88 | 0.578798 |
a9ac90cdfab854fc2c1489c576d404b56f0692e5 | 3,782 | py | Python | pyaff4/standards_test.py | aff4/python-aff4 | 94a3583475c07ad92147f70ff8a19e9e36f12aa9 | [
"Apache-2.0"
] | 34 | 2017-10-21T16:12:58.000Z | 2022-02-18T00:37:08.000Z | pyaff4/standards_test.py | aff4/python-aff4 | 94a3583475c07ad92147f70ff8a19e9e36f12aa9 | [
"Apache-2.0"
] | 23 | 2017-11-06T17:01:04.000Z | 2021-12-26T14:09:38.000Z | pyaff4/standards_test.py | aff4/python-aff4 | 94a3583475c07ad92147f70ff8a19e9e36f12aa9 | [
"Apache-2.0"
] | 17 | 2019-02-11T00:47:02.000Z | 2022-03-14T02:52:04.000Z | from __future__ import print_function
from __future__ import unicode_literals
# Copyright 2016,2017 Schatz Forensic Pty Ltd. 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... | 35.679245 | 94 | 0.665785 |
e052aea42c46c12a90b1c934a3ff6562d311657d | 12,206 | py | Python | components/isceobj/Alos2Proc/runSlcOffset.py | 4restwilliams/isce2 | fcf16355a773a94c53d83db380a72b2d024ff8fc | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2019-10-06T12:21:02.000Z | 2019-10-06T12:21:02.000Z | components/isceobj/Alos2Proc/runSlcOffset.py | stoormgeo/isce2 | d22bf1048ff0f7a077981ea4fbe8e0e6bc563961 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | components/isceobj/Alos2Proc/runSlcOffset.py | stoormgeo/isce2 | d22bf1048ff0f7a077981ea4fbe8e0e6bc563961 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-04-29T10:02:28.000Z | 2020-04-29T10:02:28.000Z | #
# Author: Cunren Liang
# Copyright 2015-present, NASA-JPL/Caltech
#
import os
import glob
import logging
import datetime
import numpy as np
import isceobj
import mroipac
from mroipac.ampcor.Ampcor import Ampcor
from isceobj.Alos2Proc.Alos2ProcPublic import topo
from isceobj.Alos2Proc.Alos2ProcPublic import geo2rdr
... | 44.224638 | 205 | 0.556612 |
a249d855edb7bfa214d842b6df7432a5c6d7bae9 | 3,894 | py | Python | tests/test_mapping_action.py | madman-bob/python-argparse-utils | e3a816596d1b374825a4b8d45b56fbce4758a4f4 | [
"MIT"
] | 7 | 2019-07-05T20:17:08.000Z | 2021-09-27T04:56:40.000Z | tests/test_mapping_action.py | madman-bob/python-argparse-utils | e3a816596d1b374825a4b8d45b56fbce4758a4f4 | [
"MIT"
] | 2 | 2019-04-03T09:43:40.000Z | 2020-05-05T17:47:22.000Z | tests/test_mapping_action.py | madman-bob/python-argparse-utils | e3a816596d1b374825a4b8d45b56fbce4758a4f4 | [
"MIT"
] | 1 | 2020-12-11T10:47:49.000Z | 2020-12-11T10:47:49.000Z | from argparse import ArgumentParser
from collections import OrderedDict
from contextlib import redirect_stderr
from enum import Enum
from io import StringIO
from unittest import TestCase
from argparse_utils import mapping_action, enum_action
class TestMappingAction(TestCase):
@property
def options(self):
... | 31.918033 | 112 | 0.639959 |
4fb3f06e19a8fa8ba24f75811e58cf51293cc250 | 20,446 | py | Python | src/config/fabric-ansible/ansible-playbooks/filter_plugins/discover_os_computes.py | atsgen/tf-controller | 9321889cdd3d7108980cc88937b2e82956502cc5 | [
"Apache-2.0"
] | 37 | 2020-09-21T10:42:26.000Z | 2022-01-09T10:16:40.000Z | src/config/fabric-ansible/ansible-playbooks/filter_plugins/discover_os_computes.py | atsgen/tf-controller | 9321889cdd3d7108980cc88937b2e82956502cc5 | [
"Apache-2.0"
] | null | null | null | src/config/fabric-ansible/ansible-playbooks/filter_plugins/discover_os_computes.py | atsgen/tf-controller | 9321889cdd3d7108980cc88937b2e82956502cc5 | [
"Apache-2.0"
] | 21 | 2020-08-25T12:48:42.000Z | 2022-03-22T04:32:18.000Z | #!/usr/bin/python
#
# Copyright (c) 2020 Juniper Networks, Inc. All rights reserved.
#
from builtins import object
import logging
import re
import sys
import traceback
sys.path.append('/opt/contrail/fabric_ansible_playbooks/filter_plugins') # noqa
sys.path.append('/opt/contrail/fabric_ansible_playbooks/common') # ... | 38.216822 | 133 | 0.539959 |
c08f985291e1d9859c141869ec43563efaad7158 | 4,394 | py | Python | test/types.py | carloscanova/python-odml | dff793bff86187b67be139c0f32c7cd036ba8db4 | [
"BSD-4-Clause"
] | null | null | null | test/types.py | carloscanova/python-odml | dff793bff86187b67be139c0f32c7cd036ba8db4 | [
"BSD-4-Clause"
] | null | null | null | test/types.py | carloscanova/python-odml | dff793bff86187b67be139c0f32c7cd036ba8db4 | [
"BSD-4-Clause"
] | null | null | null | import unittest
import odml.types as typ
import odml
import datetime
class TestTypes(unittest.TestCase):
def setUp(self):
pass
def test_date(self):
date = datetime.date(2011, 12, 1)
date_string = '2011-12-01'
self.assertEqual(date, typ.date_get(date_string))
self.asser... | 49.931818 | 621 | 0.69868 |
69ec655f57a8b026ecb950d53ff941c30a570a77 | 217 | py | Python | Understand-Reactions/Dataset/rename.py | juanjoneri/RIPS-2018 | 5502c49b511574a468eb2c603e04b6436db215bd | [
"CECILL-B"
] | null | null | null | Understand-Reactions/Dataset/rename.py | juanjoneri/RIPS-2018 | 5502c49b511574a468eb2c603e04b6436db215bd | [
"CECILL-B"
] | null | null | null | Understand-Reactions/Dataset/rename.py | juanjoneri/RIPS-2018 | 5502c49b511574a468eb2c603e04b6436db215bd | [
"CECILL-B"
] | null | null | null | import os
if __name__ == '__main__':
for i, filename in enumerate(os.listdir('.')):
extension = filename.split('.').pop()
if extension != 'py':
os.rename(filename, f'{i}.{extension}')
| 27.125 | 51 | 0.56682 |
dc7051e907ec4d873187a966f2f076874071f0b6 | 212 | py | Python | samples/s3.py | AndreiHondrari/python_exploration | cb4ac0b92ddc48c322201ba31cd6e7c5ee6af06d | [
"MIT"
] | 3 | 2019-05-04T12:19:09.000Z | 2019-08-30T07:12:31.000Z | samples/s3.py | AndreiHondrari/python_exploration | cb4ac0b92ddc48c322201ba31cd6e7c5ee6af06d | [
"MIT"
] | null | null | null | samples/s3.py | AndreiHondrari/python_exploration | cb4ac0b92ddc48c322201ba31cd6e7c5ee6af06d | [
"MIT"
] | null | null | null | # MAXIMIZING XOR
L = input()
R = input()
results = []
if L >= 1 and R >= L and R <= 10 ** 3:
for A in range(L, R+1):
for B in range(A, R+1):
results.append(A ^ B)
print(max(results))
| 15.142857 | 38 | 0.5 |
7742fc03646d7e87a98b7433cd78233655defce4 | 34 | py | Python | twinkle/__init__.py | emCOMP/twinkle | f1ddfb833b9cb05421317290000232d17f0bad00 | [
"MIT"
] | 2 | 2015-06-24T15:04:10.000Z | 2021-02-12T07:39:58.000Z | twinkle/__init__.py | emCOMP/twinkle | f1ddfb833b9cb05421317290000232d17f0bad00 | [
"MIT"
] | null | null | null | twinkle/__init__.py | emCOMP/twinkle | f1ddfb833b9cb05421317290000232d17f0bad00 | [
"MIT"
] | null | null | null | """
"""
__version__ = '0.0.5'
| 4.25 | 21 | 0.411765 |
5c394f52877267773a67d79f8b12b7f6e97188e3 | 734 | py | Python | setup.py | ahuang11/HoloExt | 01e4f0aaf3b8244c9e029056b54a0e3320957fad | [
"MIT"
] | 11 | 2018-02-14T16:48:21.000Z | 2021-02-24T20:34:43.000Z | setup.py | ahuang11/HoloExt | 01e4f0aaf3b8244c9e029056b54a0e3320957fad | [
"MIT"
] | 18 | 2018-02-20T05:10:03.000Z | 2019-07-26T13:36:28.000Z | setup.py | ahuang11/holoext | 01e4f0aaf3b8244c9e029056b54a0e3320957fad | [
"MIT"
] | null | null | null | from setuptools import setup
setup(name='holoext',
version='1.0.4',
description='Holoviews Extension',
url='http://github.com/ahuang11/holoext',
author='Andrew Huang',
author_email='huang.andrew12@gmail.com',
license='MIT',
packages=['holoext'],
include_package_data=True... | 29.36 | 47 | 0.463215 |
031d4724f3fe20feaf181d0da946fe1563df0390 | 873 | py | Python | INBa/2015/Sarocvashin_M/task_7_23.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Sarocvashin_M/task_7_23.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Sarocvashin_M/task_7_23.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 6. Вариант 23
#1-50. Разработайте систему начисления очков для задачи 6, в соответствии с которой игрок получал бы большее количество баллов за меньшее количество попыток.
# Сароквашин Максим
# 13.05.2016
import random
print("Компьютер загадал название одного из семи дней недели, а Вы должны его угадать.\n"... | 20.302326 | 157 | 0.674685 |
fd669aa1329054339a26f0a996cdde07287287e0 | 4,039 | py | Python | teradata/datadog_checks/teradata/utils.py | OuesFa/integrations-core | 0ffe4ca306580a2e775b515152384034c2dfdc03 | [
"BSD-3-Clause"
] | null | null | null | teradata/datadog_checks/teradata/utils.py | OuesFa/integrations-core | 0ffe4ca306580a2e775b515152384034c2dfdc03 | [
"BSD-3-Clause"
] | null | null | null | teradata/datadog_checks/teradata/utils.py | OuesFa/integrations-core | 0ffe4ca306580a2e775b515152384034c2dfdc03 | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2022-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import time
from typing import Any, AnyStr, Sequence, Set, Tuple
from datadog_checks.base import AgentCheck
from datadog_checks.teradata.config_models.instance import Table
def filter_tables(self, row):... | 33.941176 | 124 | 0.618222 |
085feb84916555840e5126f729199455de471bf7 | 2,493 | py | Python | plotly/graph_objs/layout/mapbox/layer/_line.py | omridanan/plotly.py | a8d26670cba49ce15ce9b7639ae0f55a6088a825 | [
"MIT"
] | null | null | null | plotly/graph_objs/layout/mapbox/layer/_line.py | omridanan/plotly.py | a8d26670cba49ce15ce9b7639ae0f55a6088a825 | [
"MIT"
] | null | null | null | plotly/graph_objs/layout/mapbox/layer/_line.py | omridanan/plotly.py | a8d26670cba49ce15ce9b7639ae0f55a6088a825 | [
"MIT"
] | 1 | 2019-02-18T04:12:56.000Z | 2019-02-18T04:12:56.000Z | from plotly.basedatatypes import BaseLayoutHierarchyType
import copy
class Line(BaseLayoutHierarchyType):
# width
# -----
@property
def width(self):
"""
Sets the line width. Has an effect only when `type` is set to
*line*.
The 'width' property is a number and may ... | 25.96875 | 74 | 0.509426 |
a0de2b0f586f9c2f890087336e864bfb37f48ff8 | 6,170 | py | Python | fec_raw/management/commands/downloadfecrawdata.py | datadesk/django-fec-raw-data | 9d1f49e5ecc1552c55b635c63c1bf021871e4c0b | [
"MIT"
] | 3 | 2016-06-01T18:16:36.000Z | 2021-07-20T14:51:40.000Z | fec_raw/management/commands/downloadfecrawdata.py | datadesk/django-fec-raw-data | 9d1f49e5ecc1552c55b635c63c1bf021871e4c0b | [
"MIT"
] | 9 | 2015-11-24T06:22:56.000Z | 2021-06-10T17:45:57.000Z | fec_raw/management/commands/downloadfecrawdata.py | datadesk/django-fec-raw-data | 9d1f49e5ecc1552c55b635c63c1bf021871e4c0b | [
"MIT"
] | 1 | 2020-12-01T21:22:53.000Z | 2020-12-01T21:22:53.000Z | import os
import subprocess
import feedparser
from tomorrow import threads
from django.conf import settings
from fec_raw import get_download_directory
from fec_raw.management.commands import FecCommand
class Command(FecCommand):
help = "Download FEC filings to data directory"
# Path to ruby script that uses ... | 33.532609 | 145 | 0.568233 |
479ce04ea1fa055dedddd2bc352083ee13d4bf50 | 288 | py | Python | configs/segformer/segformer_mit-b3_8x1_1024x1024_160k_cityscapes.py | heytanay/mmsegmentation | 7ddd2fe2ecff9c95999bd00ec05cc37eafb558f8 | [
"Apache-2.0"
] | 11 | 2022-02-04T01:09:45.000Z | 2022-03-08T05:49:16.000Z | configs/segformer/segformer_mit-b3_8x1_1024x1024_160k_cityscapes.py | heytanay/mmsegmentation | 7ddd2fe2ecff9c95999bd00ec05cc37eafb558f8 | [
"Apache-2.0"
] | 2 | 2022-02-25T03:07:23.000Z | 2022-03-08T12:54:05.000Z | configs/segformer/segformer_mit-b3_8x1_1024x1024_160k_cityscapes.py | heytanay/mmsegmentation | 7ddd2fe2ecff9c95999bd00ec05cc37eafb558f8 | [
"Apache-2.0"
] | 1 | 2022-01-25T05:13:37.000Z | 2022-01-25T05:13:37.000Z | _base_ = ['./segformer_mit-b0_8x1_1024x1024_160k_cityscapes.py']
model = dict(
backbone=dict(
init_cfg=dict(type='Pretrained', checkpoint='pretrain/mit_b3.pth'),
embed_dims=64,
num_layers=[3, 4, 18, 3]),
decode_head=dict(in_channels=[64, 128, 320, 512]))
| 32 | 75 | 0.663194 |
b7461c50618b3e4aea4230265612c4c2c7442fa9 | 75,513 | py | Python | pypureclient/flasharray/FA_2_6/api/host_groups_api.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 14 | 2018-12-07T18:30:27.000Z | 2022-02-22T09:12:33.000Z | pypureclient/flasharray/FA_2_6/api/host_groups_api.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 28 | 2019-09-17T21:03:52.000Z | 2022-03-29T22:07:35.000Z | pypureclient/flasharray/FA_2_6/api/host_groups_api.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 15 | 2020-06-11T15:50:08.000Z | 2022-03-21T09:27:25.000Z | # coding: utf-8
"""
FlashArray REST API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 2.6
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import re
# pyth... | 53.366078 | 671 | 0.655304 |
d34f45131ef036096a0c95ff36f43f2c503f85f2 | 5,063 | py | Python | p587.py | arpit0891/Project-euler | ab36b33c578578595bb518508fa2fe5862f4a044 | [
"MIT"
] | 1 | 2020-05-14T09:22:32.000Z | 2020-05-14T09:22:32.000Z | p587.py | prve17/Project-Euler | 1ff72404ca9ebe7de2eab83d43960d86bc487515 | [
"MIT"
] | 1 | 2020-03-13T12:42:28.000Z | 2020-05-13T13:26:32.000Z | p587.py | prve17/Project-Euler | 1ff72404ca9ebe7de2eab83d43960d86bc487515 | [
"MIT"
] | 3 | 2020-05-13T13:39:46.000Z | 2020-06-26T10:44:53.000Z | import itertools, math
# Start by defining the coordinate system in a convenient way. The position and scale of the diagram don't
# matter because we only care about the ratio of areas, not the absolute areas. So, let the bottom left
# of the diagram be the origin (x = 0, y = 0), and let each circle to have a radius ... | 56.88764 | 115 | 0.670551 |
e0bd14649c77149e31626c73576f05dc7fdc7cc6 | 1,915 | py | Python | test/functional/rpc_help.py | bitcorub/bitrub | 28711e4e8ebdee144a1437ece07afcf792a7cf60 | [
"MIT"
] | 1 | 2019-12-09T18:33:47.000Z | 2019-12-09T18:33:47.000Z | test/functional/rpc_help.py | bitcorub/bitrub | 28711e4e8ebdee144a1437ece07afcf792a7cf60 | [
"MIT"
] | null | null | null | test/functional/rpc_help.py | bitcorub/bitrub | 28711e4e8ebdee144a1437ece07afcf792a7cf60 | [
"MIT"
] | 1 | 2019-12-12T20:05:36.000Z | 2019-12-12T20:05:36.000Z | #!/usr/bin/env python3
# Copyright (c) 2018 The BitRub Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test RPC help output."""
from test_framework.test_framework import BitRubTestFramework
from test_framework.u... | 33.017241 | 123 | 0.649086 |
b87b61491503f7954aaf7772fac605b05d7af6e1 | 9,686 | py | Python | indico/modules/events/cloning.py | yamiacat/indico | 754c02cd7cd25bf1eab0ca5f497eb24b135dd51c | [
"MIT"
] | null | null | null | indico/modules/events/cloning.py | yamiacat/indico | 754c02cd7cd25bf1eab0ca5f497eb24b135dd51c | [
"MIT"
] | null | null | null | indico/modules/events/cloning.py | yamiacat/indico | 754c02cd7cd25bf1eab0ca5f497eb24b135dd51c | [
"MIT"
] | null | null | null | # This file is part of Indico.
# Copyright (C) 2002 - 2021 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from collections import OrderedDict
from operator import attrgetter
from indico.core import signals
from ... | 44.228311 | 112 | 0.650423 |
72f2276dfc8a3f64efed6dbd6117c3591cfe1e4f | 17,362 | py | Python | batchq/core/batch.py | troelsfr/BatchQ | 390ea7179ed457673c6a1d764bc78cf816f603f4 | [
"MIT"
] | 1 | 2017-08-17T12:35:28.000Z | 2017-08-17T12:35:28.000Z | batchq/core/batch.py | troelsfr/BatchQ | 390ea7179ed457673c6a1d764bc78cf816f603f4 | [
"MIT"
] | 1 | 2019-03-06T06:12:07.000Z | 2019-03-06T06:12:07.000Z | batchq/core/batch.py | troelsfr/BatchQ | 390ea7179ed457673c6a1d764bc78cf816f603f4 | [
"MIT"
] | null | null | null | from batchq.core.stack import current_machine
# from profilehooks import profile
import re
import unicodedata
import copy
import time
import hashlib
_slugify_strip_re = re.compile(r'[^\w\s-]')
_slugify_hyphenate_re = re.compile(r'[-\s]+')
def slugify(value):
global _slugify_strip_re, _slugify_hyphenate_re
if no... | 31.114695 | 226 | 0.548266 |
4693461b497093b03e927ab082508283d3a4d8ea | 1,046 | py | Python | aoj/11/aoj1174.py | knuu/competitive-programming | 16bc68fdaedd6f96ae24310d697585ca8836ab6e | [
"MIT"
] | 1 | 2018-11-12T15:18:55.000Z | 2018-11-12T15:18:55.000Z | aoj/11/aoj1174.py | knuu/competitive-programming | 16bc68fdaedd6f96ae24310d697585ca8836ab6e | [
"MIT"
] | null | null | null | aoj/11/aoj1174.py | knuu/competitive-programming | 16bc68fdaedd6f96ae24310d697585ca8836ab6e | [
"MIT"
] | null | null | null | import copy
import itertools
import sys
if sys.version[0] == '2':
range, input = xrange, raw_input
drc = [(-1, 0), (0, 1), (1, 0), (0, -1)]
C_NUM = 6
def dfs(r, c, now_c, next_c):
tmp_board[r][c] = next_c
for dr, dc in drc:
nr, nc = r + dr, c + dc
if 0 <= nr < H and 0 <= nc < W and tmp_b... | 27.526316 | 100 | 0.507648 |
d534dd0de5524cb2baf4fb4285a690919d700e1b | 2,338 | py | Python | venv/lib/python2.7/site-packages/lettuce/terminal.py | GrupoMazoGuay/final | 782b7580848ac01dd878e54574b0a5d36132291b | [
"MIT"
] | null | null | null | venv/lib/python2.7/site-packages/lettuce/terminal.py | GrupoMazoGuay/final | 782b7580848ac01dd878e54574b0a5d36132291b | [
"MIT"
] | null | null | null | venv/lib/python2.7/site-packages/lettuce/terminal.py | GrupoMazoGuay/final | 782b7580848ac01dd878e54574b0a5d36132291b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# <Lettuce - Behaviour Driven Development for python>
# Copyright (C) <2010-2012> Gabriel Falcão <gabriel@nacaolivre.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundatio... | 29.225 | 72 | 0.644996 |
da04f94656cb3e3fc4db0a165939c0daaa8160c0 | 131 | py | Python | src/verinfo.py | user12986714/SpamSoup | 3dace5ed99083995d5d6a25b1abfe9eec7e65b6c | [
"Unlicense"
] | null | null | null | src/verinfo.py | user12986714/SpamSoup | 3dace5ed99083995d5d6a25b1abfe9eec7e65b6c | [
"Unlicense"
] | 29 | 2020-06-06T22:35:05.000Z | 2020-07-18T15:42:19.000Z | src/verinfo.py | user12986714/SpamSoup | 3dace5ed99083995d5d6a25b1abfe9eec7e65b6c | [
"Unlicense"
] | 1 | 2020-06-29T06:38:11.000Z | 2020-06-29T06:38:11.000Z | # coding=utf-8
ver_info = {"major": 1,
"alias": "Config",
"minor": 0}
cfg_ver_min = 2
cfg_ver_active = 2
| 14.555556 | 30 | 0.519084 |
518ddf18532addfefd8af6cb3dec804901299cc6 | 3,456 | py | Python | setup.py | justinjohn0306/uberduck-ml-dev | 439ec326eb7680c4fdd5ee97a09def8e355e0f7c | [
"Apache-2.0"
] | 167 | 2021-10-18T22:04:17.000Z | 2022-03-21T19:44:21.000Z | setup.py | justinjohn0306/uberduck-ml-dev | 439ec326eb7680c4fdd5ee97a09def8e355e0f7c | [
"Apache-2.0"
] | 18 | 2021-10-19T02:33:57.000Z | 2022-03-28T17:25:52.000Z | setup.py | justinjohn0306/uberduck-ml-dev | 439ec326eb7680c4fdd5ee97a09def8e355e0f7c | [
"Apache-2.0"
] | 24 | 2021-10-22T02:16:53.000Z | 2022-03-30T18:22:43.000Z | from pkg_resources import parse_version
from configparser import ConfigParser
import setuptools, re, sys
assert parse_version(setuptools.__version__) >= parse_version("36.2")
# note: all settings are in settings.ini; edit there, not here
config = ConfigParser(delimiters=["="])
config.read("settings.ini")
cfg = config... | 29.793103 | 88 | 0.588831 |
d0ce16a6b66cb17b328c175c17c0f66f9c97ed50 | 2,253 | py | Python | test/test_from_files.py | bmwiedemann/httpolice | 4da2bde3d14a24b0623ee45ae10afd192d6fa771 | [
"MIT"
] | 1 | 2020-09-19T13:50:36.000Z | 2020-09-19T13:50:36.000Z | test/test_from_files.py | 99/httpolice | 8175020af13708801fbefc8d4f3787b11093c962 | [
"MIT"
] | null | null | null | test/test_from_files.py | 99/httpolice | 8175020af13708801fbefc8d4f3787b11093c962 | [
"MIT"
] | null | null | null | # -*- coding: utf-8; -*-
"""File-based test suite.
Treat every file in ``combined_data/`` and ``har_data/`` as a test case.
Run it through HTTPolice and check the list of resulting notices.
In combined stream files, the expected notices are specified in the preamble.
In HAR files, the expected notices are specified i... | 34.136364 | 79 | 0.68087 |
d69147bd1dd5395a4d684869551dffb1c0a0b610 | 1,104 | py | Python | SamplePythonScripts/write_and_read_example.py | DigiLog-N/Arrow | e068255b4991bd313ee10ad71258516c8d4ccb9c | [
"Apache-2.0"
] | null | null | null | SamplePythonScripts/write_and_read_example.py | DigiLog-N/Arrow | e068255b4991bd313ee10ad71258516c8d4ccb9c | [
"Apache-2.0"
] | null | null | null | SamplePythonScripts/write_and_read_example.py | DigiLog-N/Arrow | e068255b4991bd313ee10ad71258516c8d4ccb9c | [
"Apache-2.0"
] | null | null | null |
#
# Simple example to write out an Arrow file to disk and read it back in
#
# This is based on:
# https://arrow.apache.org/docs/python/ipc.html
# https://towardsdatascience.com/apache-arrow-read-dataframe-with-zero-memory-69634092b1a
#
import pyarrow as pa
dataA = [
pa.array([1, 2, 3, 4]),
pa.array(['foo', '... | 26.926829 | 89 | 0.664855 |
d43aba3e78fe5187056d1a64e7f39ac6a5204bc4 | 5,575 | py | Python | meetup2xibo/updater/meetup2xibo.py | jshprentz/meetup2xibo | 236bef01305878943f27d246dac1b21cc78a521b | [
"MIT"
] | 3 | 2019-11-29T04:32:49.000Z | 2020-06-03T01:34:45.000Z | meetup2xibo/updater/meetup2xibo.py | jshprentz/meetup2xibo | 236bef01305878943f27d246dac1b21cc78a521b | [
"MIT"
] | 194 | 2020-06-01T01:42:41.000Z | 2021-08-02T10:25:58.000Z | meetup2xibo/updater/meetup2xibo.py | jshprentz/meetup2xibo | 236bef01305878943f27d246dac1b21cc78a521b | [
"MIT"
] | 1 | 2019-07-31T14:59:05.000Z | 2019-07-31T14:59:05.000Z | """Retrieve events from Meetup, extract data to display on signs, and update
Xibo."""
from collections import namedtuple
XiboSessionScope = namedtuple(
"XiboSessionScope",
"meetup_events cancelled_meetup_events xibo_session")
XiboEventCrudScope = namedtuple(
"XiboEventCrudScope",
"ev... | 41.604478 | 78 | 0.719641 |
103b209d9fa91c1d152128fc3b3b70d110081cb0 | 6,098 | py | Python | setup.py | prestix-studio/sewer | 67867f778eb92c9c14cd028116f5695b0223baa2 | [
"MIT"
] | null | null | null | setup.py | prestix-studio/sewer | 67867f778eb92c9c14cd028116f5695b0223baa2 | [
"MIT"
] | null | null | null | setup.py | prestix-studio/sewer | 67867f778eb92c9c14cd028116f5695b0223baa2 | [
"MIT"
] | null | null | null | import os
from setuptools import setup, find_packages
# To use a consistent encoding
import codecs
here = os.path.abspath(os.path.dirname(__file__))
about = {}
try:
import pypandoc
long_description = pypandoc.convert("README.md", "rst")
except ImportError:
long_description = codecs.open("README.md", en... | 41.202703 | 94 | 0.660216 |
ab6da8daaadb2d55d9974dd9301ac1bfea9d45e0 | 6,126 | py | Python | tsai/metrics.py | imilas/tsai | 0dc4833ddd9ef5404c20c8379698d1f3666a2d8f | [
"Apache-2.0"
] | 1,545 | 2020-11-10T22:23:00.000Z | 2022-03-31T19:50:24.000Z | tsai/metrics.py | imilas/tsai | 0dc4833ddd9ef5404c20c8379698d1f3666a2d8f | [
"Apache-2.0"
] | 345 | 2020-11-10T20:23:48.000Z | 2022-03-31T16:36:35.000Z | tsai/metrics.py | imilas/tsai | 0dc4833ddd9ef5404c20c8379698d1f3666a2d8f | [
"Apache-2.0"
] | 220 | 2020-11-19T21:13:55.000Z | 2022-03-31T23:08:37.000Z | # AUTOGENERATED! DO NOT EDIT! File to edit: nbs/051_metrics.ipynb (unless otherwise specified).
__all__ = ['MatthewsCorrCoefBinary', 'get_task_metrics', 'accuracy_multi', 'metrics_multi_common', 'precision_multi',
'recall_multi', 'specificity_multi', 'balanced_accuracy_multi', 'Fbeta_multi', 'F1_multi', 'ma... | 35.616279 | 141 | 0.667156 |
f7a78a91bbfe6df0d501526af6eeab43022f9356 | 5,742 | py | Python | scripts/integration.py | bhumikapahariapuresoftware/mypy_boto3_builder | 970705c3dee13355c9c5d758841da94d07464b10 | [
"MIT"
] | null | null | null | scripts/integration.py | bhumikapahariapuresoftware/mypy_boto3_builder | 970705c3dee13355c9c5d758841da94d07464b10 | [
"MIT"
] | null | null | null | scripts/integration.py | bhumikapahariapuresoftware/mypy_boto3_builder | 970705c3dee13355c9c5d758841da94d07464b10 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Integration tests.
"""
import argparse
import difflib
import json
import logging
import subprocess
import sys
from pathlib import Path
from mypy_boto3_builder.utils.nice_path import NicePath
ROOT_PATH = Path(__file__).parent.parent.resolve()
EXAMPLES_PATH = ROOT_PATH / "examples"
PYRIGHT_SNA... | 27.873786 | 99 | 0.63201 |
c034d85bf60367ff96157d7d7f65c0fed02ee154 | 1,225 | py | Python | resources/bike.py | pelobairro/pelobairro-py-api | e48775655d3ca9ffa2cbaa98ed42c6b70c9a0d4e | [
"MIT"
] | null | null | null | resources/bike.py | pelobairro/pelobairro-py-api | e48775655d3ca9ffa2cbaa98ed42c6b70c9a0d4e | [
"MIT"
] | null | null | null | resources/bike.py | pelobairro/pelobairro-py-api | e48775655d3ca9ffa2cbaa98ed42c6b70c9a0d4e | [
"MIT"
] | null | null | null | from flask import jsonify, make_response
from flask_restful import Resource, request
import pandas as pd
import os
from geopy.distance import geodesic
class Bike(Resource):
def get(self):
lat = request.args.get('lat', default = 38.746118, type = float)
lng = request.args.get('lng', default = -9.109845, t... | 29.878049 | 104 | 0.618776 |
ecd0f45cc12d02da0ad03e76593b70ee86e967a3 | 3,752 | py | Python | scripts/retrieve offsets.py | muscatmat/vmi-event-naive-detector | 082a8c383f0258de208e059d7d248d877c42bb63 | [
"MIT"
] | null | null | null | scripts/retrieve offsets.py | muscatmat/vmi-event-naive-detector | 082a8c383f0258de208e059d7d248d877c42bb63 | [
"MIT"
] | null | null | null | scripts/retrieve offsets.py | muscatmat/vmi-event-naive-detector | 082a8c383f0258de208e059d7d248d877c42bb63 | [
"MIT"
] | null | null | null | #!/usr/bin/python
print "--- Starting Malware Detection! ---"
# Import System Required Paths
import sys
sys.path.append('/usr/local/src/volatility-master')
# Import Volalatility
import volatility.conf as conf
import volatility.registry as registry
registry.PluginImporter()
config = conf.ConfObject()
import volatilit... | 44.666667 | 139 | 0.486407 |
2fa333f7e525c4be85a3d619cc89ff3da4e65c56 | 869 | py | Python | lisa/tools/kill.py | tyhicks/lisa | 50d07cbd13e4e777eaa211b01387721fe2d2094f | [
"MIT"
] | 65 | 2020-12-15T13:42:29.000Z | 2022-03-03T13:14:16.000Z | lisa/tools/kill.py | acidburn0zzz/lisa | 3934d0546592d3ff71bc3e2c4aab5d4bc646a3b9 | [
"MIT"
] | 236 | 2020-11-24T18:28:26.000Z | 2022-03-30T19:19:25.000Z | lisa/tools/kill.py | acidburn0zzz/lisa | 3934d0546592d3ff71bc3e2c4aab5d4bc646a3b9 | [
"MIT"
] | 52 | 2020-12-08T17:40:46.000Z | 2022-03-31T18:24:14.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
from lisa.executable import Tool
from .pgrep import Pgrep
class Kill(Tool):
@property
def command(self) -> str:
return "kill"
@property
def can_install(self) -> bool:
return False
def by_name(self, process... | 26.333333 | 78 | 0.601841 |
eb69099a0e26b5b1bbec2b0e55cd1a6679f4a3e6 | 3,898 | py | Python | src/obsolete/state_info.py | cmu-delphi/utils | 9228841e9389a8eb25f6dcd65d905bbe87ed35d5 | [
"MIT"
] | 3 | 2019-07-31T02:16:53.000Z | 2020-05-02T03:28:22.000Z | src/obsolete/state_info.py | cmu-delphi/utils | 9228841e9389a8eb25f6dcd65d905bbe87ed35d5 | [
"MIT"
] | 1 | 2021-03-30T20:51:45.000Z | 2021-03-30T20:51:45.000Z | src/obsolete/state_info.py | cmu-delphi/utils | 9228841e9389a8eb25f6dcd65d905bbe87ed35d5 | [
"MIT"
] | 3 | 2020-04-03T22:38:48.000Z | 2021-03-25T21:21:12.000Z | """
==================
=== Deprecated ===
==================
As of 2018-06-25, this file is no longer used. New code should use
geo/locations.py and geo/populations.py instead.
===============
=== Purpose ===
===============
Contains static data for US regions and states.
=================
=== Changelog ===
=====... | 31.95082 | 69 | 0.448948 |
e3d2266e292ad35a17916a8b0194af285b38b059 | 694 | py | Python | setup.py | prostmich/pykupi | 6570d9ba6bf29457a06907ff44eeb1ffc3615e36 | [
"MIT"
] | null | null | null | setup.py | prostmich/pykupi | 6570d9ba6bf29457a06907ff44eeb1ffc3615e36 | [
"MIT"
] | null | null | null | setup.py | prostmich/pykupi | 6570d9ba6bf29457a06907ff44eeb1ffc3615e36 | [
"MIT"
] | null | null | null | import setuptools
from setuptools import find_packages
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="pykupi",
version="0.0.1",
author="Mikhail Smolnikov",
author_email="smolnik.mikhail@gmail.com",
description="The easiest way to getti... | 33.047619 | 80 | 0.695965 |
93cf5be20b9e8d46f0a19e974317a397a57bd8c4 | 19,192 | py | Python | tests/gis_tests/test_geoforms.py | ni-ning/django | 2e7ba6057cfc82a15a22b6021cd60cf307152e2d | [
"CNRI-Python-GPL-Compatible",
"BSD-3-Clause"
] | 4 | 2016-11-29T13:10:37.000Z | 2016-12-19T11:41:54.000Z | tests/gis_tests/test_geoforms.py | ni-ning/django | 2e7ba6057cfc82a15a22b6021cd60cf307152e2d | [
"CNRI-Python-GPL-Compatible",
"BSD-3-Clause"
] | 8 | 2017-04-19T16:20:47.000Z | 2022-03-28T14:40:11.000Z | tests/gis_tests/test_geoforms.py | ni-ning/django | 2e7ba6057cfc82a15a22b6021cd60cf307152e2d | [
"CNRI-Python-GPL-Compatible",
"BSD-3-Clause"
] | 3 | 2020-07-13T04:49:16.000Z | 2021-12-22T21:15:14.000Z | import re
from django.contrib.gis import forms
from django.contrib.gis.forms import BaseGeometryWidget, OpenLayersWidget
from django.contrib.gis.geos import GEOSGeometry
from django.core.exceptions import ValidationError
from django.test import SimpleTestCase, override_settings
from django.utils.html import escape
c... | 43.817352 | 113 | 0.563724 |
503e75712cbdf370691a3c2b9d490c9507d6642d | 8,033 | py | Python | main.py | actuatech/fuel-tourism | 60e6953cdcccf164e5cd03916a1c3b3c2b071a85 | [
"MIT"
] | null | null | null | main.py | actuatech/fuel-tourism | 60e6953cdcccf164e5cd03916a1c3b3c2b071a85 | [
"MIT"
] | null | null | null | main.py | actuatech/fuel-tourism | 60e6953cdcccf164e5cd03916a1c3b3c2b071a85 | [
"MIT"
] | null | null | null | # TODO: Preparar fitxer per fer que ingesta no peti en cas que les columnes del fitxer siguin diferents
# TODO: fitxer configuració
import pandas as pd
from pathlib import Path
from datetime import datetime
import logging
import os
from Logger import setup_logger
from Ingestion import register_ingestor_function
from ... | 43.188172 | 120 | 0.749907 |
6748fb17ea8db09cee2dea140a0c22d3f9bbb057 | 1,209 | py | Python | .history/my_classes/FirstClassFunctions/MapFilterZipList_20210706151716.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | .history/my_classes/FirstClassFunctions/MapFilterZipList_20210706151716.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | .history/my_classes/FirstClassFunctions/MapFilterZipList_20210706151716.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | """Map Filter Zip List Comprehensions
Higher order functions
A function that takes a function as a parameter and/or returns a function as it's return value
Example: sorted
map _
|
-- modern alternative -> list comprehensions and generator expressions
... | 20.844828 | 120 | 0.622829 |
22de12001a354138cf9571f0703b0331c777d832 | 108 | py | Python | custom/succeed/tests/__init__.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | 1 | 2020-07-14T13:00:23.000Z | 2020-07-14T13:00:23.000Z | custom/succeed/tests/__init__.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | 94 | 2020-12-11T06:57:31.000Z | 2022-03-15T10:24:06.000Z | custom/succeed/tests/__init__.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | null | null | null | from custom.succeed.reports.all_patients import date_format
__test__ = {
'date_format': date_format,
}
| 18 | 59 | 0.768519 |
6b8aa6e00038b05edbb52dbfe8f810bc45bb2b5e | 2,856 | py | Python | qa/rpc-tests/blockchain.py | supertref/navcoin-core | cc6fd1c9661fcbd3b82c8f2506c0f863da43b392 | [
"MIT"
] | 1 | 2020-08-28T02:32:47.000Z | 2020-08-28T02:32:47.000Z | qa/rpc-tests/blockchain.py | supertref/navcoin-core | cc6fd1c9661fcbd3b82c8f2506c0f863da43b392 | [
"MIT"
] | 3 | 2019-07-18T02:10:02.000Z | 2019-08-28T22:09:31.000Z | qa/rpc-tests/blockchain.py | supertref/navcoin-core | cc6fd1c9661fcbd3b82c8f2506c0f863da43b392 | [
"MIT"
] | 2 | 2020-09-06T20:02:00.000Z | 2020-11-19T18:47:42.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test RPC calls related to blockchain state. Tests correspond to code in
# rpc/blockchain.cpp.
#
from... | 31.733333 | 73 | 0.678221 |
87689f1619752d3b028a5061f45c9dd412b16fd7 | 5,576 | py | Python | gammapy/irf/io.py | AtreyeeS/gammapy | a3b47c3da08900a833f0360e0374203e054cadfc | [
"BSD-3-Clause"
] | 155 | 2015-02-25T12:38:02.000Z | 2022-03-13T17:54:30.000Z | gammapy/irf/io.py | AtreyeeS/gammapy | a3b47c3da08900a833f0360e0374203e054cadfc | [
"BSD-3-Clause"
] | 3,131 | 2015-01-06T15:36:23.000Z | 2022-03-31T17:30:57.000Z | gammapy/irf/io.py | AtreyeeS/gammapy | a3b47c3da08900a833f0360e0374203e054cadfc | [
"BSD-3-Clause"
] | 158 | 2015-03-16T20:36:44.000Z | 2022-03-30T16:05:37.000Z | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import logging
from astropy.io import fits
from gammapy.utils.scripts import make_path
from gammapy.utils.fits import HDULocation
from gammapy.data.hdu_index_table import HDUIndexTable
__all__ = ["load_cta_irfs", "load_irf_dict_from_file"]
log = logging.... | 29.502646 | 107 | 0.571377 |
4d2a1297fea7aa5fe94680cbebb141fe31d40450 | 8,367 | py | Python | sdk/python/pulumi_azure_nextgen/web/v20181101/web_app_deployment.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/web/v20181101/web_app_deployment.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/web/v20181101/web_app_deployment.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
__a... | 38.380734 | 458 | 0.61635 |
526e57ced88309436252522be14b04625da43b78 | 28,762 | py | Python | integration-testing/client/CasperLabsClient/casperlabs_client/cli.py | zie1ony/CasperLabs | 7921f306ebcc98104cbe628391168afedbb5e2e8 | [
"Apache-2.0"
] | null | null | null | integration-testing/client/CasperLabsClient/casperlabs_client/cli.py | zie1ony/CasperLabs | 7921f306ebcc98104cbe628391168afedbb5e2e8 | [
"Apache-2.0"
] | null | null | null | integration-testing/client/CasperLabsClient/casperlabs_client/cli.py | zie1ony/CasperLabs | 7921f306ebcc98104cbe628391168afedbb5e2e8 | [
"Apache-2.0"
] | null | null | null | """
Command line interface for CasperLabsClient.
"""
import argparse
import textwrap
import base64
import sys
import os
import functools
import logging
from pathlib import Path
import datetime
from casperlabs_client import (
CasperLabsClient,
DEFAULT_HOST,
DEFAULT_PORT,
DEFAULT_INTERNAL_PORT,
bundl... | 44.454405 | 331 | 0.642619 |
6acdfa866890833eaa93b8d60be8bd356b0bd2fe | 6,898 | py | Python | tests/test_fix_type.py | anelendata/getschema | 3cd23ca5bdb98ecc031fdd4bd39864f1c50293f7 | [
"Apache-2.0"
] | 2 | 2021-09-11T20:23:35.000Z | 2021-09-16T21:52:25.000Z | tests/test_fix_type.py | anelendata/getschema | 3cd23ca5bdb98ecc031fdd4bd39864f1c50293f7 | [
"Apache-2.0"
] | 11 | 2020-12-23T01:08:07.000Z | 2021-07-12T04:02:20.000Z | tests/test_fix_type.py | anelendata/getschema | 3cd23ca5bdb98ecc031fdd4bd39864f1c50293f7 | [
"Apache-2.0"
] | 2 | 2021-05-28T14:05:31.000Z | 2021-06-14T12:34:14.000Z | import datetime
import logging
import getschema
import json
LOGGER = logging.getLogger(__name__)
records = [
{
"index": 0,
"array": [
0.0,
],
"nested_field": {
"some_prop": 0,
},
"boolean_field": True,
"another_boolean_field": True,
... | 27.264822 | 85 | 0.626558 |
ad456d38ec9b29ca1378acbe435f78b4c24ab8d5 | 5,292 | py | Python | task3/vcompresslib.py | Chlerry/term-project | 6accf960fea9129ebbb8520d277c47af10ee6d3d | [
"MIT"
] | null | null | null | task3/vcompresslib.py | Chlerry/term-project | 6accf960fea9129ebbb8520d277c47af10ee6d3d | [
"MIT"
] | 9 | 2020-03-14T03:54:26.000Z | 2020-03-14T07:31:35.000Z | task3/vcompresslib.py | Chlerry/term-project | 6accf960fea9129ebbb8520d277c47af10ee6d3d | [
"MIT"
] | null | null | null | import numpy as np
import tensorflow as tf
from keras.models import Model
from keras.layers import Input, Dense, Conv2D, Conv2DTranspose, MaxPooling2D, UpSampling2D
import imgpatch
# Ratio options are: 1/32, 1/16, 1/8, 1/4, 1/2
def model1(train_data, patch_shape, ratio):
input_img = Input(shape=patch_shape)
... | 36.246575 | 102 | 0.603175 |
61cbba53ba0355e346e74df03f405960397873b3 | 8,502 | py | Python | examples/Nolan/AFRL/Carts/cart49.py | Rapid-Design-of-Systems-Laboratory/beluga-legacy | d14713d8211b64293c4427005cf02fbd58630598 | [
"MIT"
] | 1 | 2019-03-26T03:00:03.000Z | 2019-03-26T03:00:03.000Z | examples/Nolan/AFRL/Carts/cart49.py | Rapid-Design-of-Systems-Laboratory/beluga-legacy | d14713d8211b64293c4427005cf02fbd58630598 | [
"MIT"
] | null | null | null | examples/Nolan/AFRL/Carts/cart49.py | Rapid-Design-of-Systems-Laboratory/beluga-legacy | d14713d8211b64293c4427005cf02fbd58630598 | [
"MIT"
] | 1 | 2019-07-14T22:53:52.000Z | 2019-07-14T22:53:52.000Z | if __name__ == "__main__":
import numpy as np
import beluga.Beluga as Beluga
import beluga.bvpsol as bvpsol
import beluga.bvpsol.algorithms as algorithms
import beluga.optim.Problem
from beluga.optim.problem import *
from beluga.continuation import *
import logging
# Import Librari... | 30.473118 | 288 | 0.507998 |
3bbc03a438a74b2ffb111cbac87922a457a67510 | 4,592 | py | Python | home/settings/base.py | ARAldhafeeri/sary-task | 1fe1c091d397c09acc606d3dcb878e725725c506 | [
"MIT"
] | 2 | 2021-11-11T16:28:27.000Z | 2022-03-07T08:29:13.000Z | home/settings/base.py | ARAldhafeeri/sary-task | 1fe1c091d397c09acc606d3dcb878e725725c506 | [
"MIT"
] | null | null | null | home/settings/base.py | ARAldhafeeri/sary-task | 1fe1c091d397c09acc606d3dcb878e725725c506 | [
"MIT"
] | null | null | null | """
Django settings for home project.
Generated by 'django-admin startproject' using Django 3.1.4.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
from pathlib imp... | 27.171598 | 91 | 0.692726 |
cb3d76d61abe94c61edb950d9ad9219a684e972a | 2,132 | py | Python | test/figure_test.py | leotrs/decu | e920a7046220a0547826084c11b6a74029e3c658 | [
"MIT"
] | 4 | 2017-10-30T21:22:32.000Z | 2020-10-16T04:15:44.000Z | test/figure_test.py | leotrs/decu | e920a7046220a0547826084c11b6a74029e3c658 | [
"MIT"
] | 105 | 2017-10-05T18:27:04.000Z | 2018-10-10T15:55:47.000Z | test/figure_test.py | leotrs/decu | e920a7046220a0547826084c11b6a74029e3c658 | [
"MIT"
] | null | null | null | """
figure_test.py
--------------
Test the @figure decorator.
"""
from os import listdir
from os.path import basename
from decu import figure, DecuException
import util
import matplotlib.pyplot as plt
import pytest
def test_save_false(tmpdir):
"""With save=False, @figure should not write to disk."""
class ... | 28.810811 | 72 | 0.662758 |
3286db766328fa62c68a39b2c4c8642d477ce5b0 | 1,500 | py | Python | src/Backend/create_suggestions_index/compute_suggestions.py | uhh-lt/cam | 5b8f03fb8d2258adcefbab4e860800658dc34925 | [
"MIT"
] | 9 | 2018-03-10T11:26:17.000Z | 2021-12-30T13:57:12.000Z | src/Backend/create_suggestions_index/compute_suggestions.py | uhh-lt/cam | 5b8f03fb8d2258adcefbab4e860800658dc34925 | [
"MIT"
] | 67 | 2018-03-10T09:16:22.000Z | 2022-03-11T23:59:16.000Z | src/Backend/create_suggestions_index/compute_suggestions.py | uhh-lt/cam | 5b8f03fb8d2258adcefbab4e860800658dc34925 | [
"MIT"
] | 4 | 2019-03-11T09:27:45.000Z | 2020-07-20T13:49:48.000Z | from multiprocessing import Pool
import requests
import time
import json
#from sample_wordlist import comparison_objects
#from sample_wordlist import comparison_objects_small
CCR_BASE_URL = "http://127.0.0.1:5000/ccr/"
#co_suggestions_dict = {}
co_suggestions = []
def requestSuggestions(comparison_object):
cc... | 29.411765 | 96 | 0.677333 |
c77a68c6dfeac640472551dba1281a031cd30746 | 9,197 | py | Python | releasenotes/source/conf.py | os-cloud/os_zun | daf9f9d60a00edf5c874a35b621acc7d0e5a8e06 | [
"Apache-2.0"
] | null | null | null | releasenotes/source/conf.py | os-cloud/os_zun | daf9f9d60a00edf5c874a35b621acc7d0e5a8e06 | [
"Apache-2.0"
] | null | null | null | releasenotes/source/conf.py | os-cloud/os_zun | daf9f9d60a00edf5c874a35b621acc7d0e5a8e06 | [
"Apache-2.0"
] | 1 | 2019-06-27T01:31:18.000Z | 2019-06-27T01:31:18.000Z | #!/usr/bin/env python3
# 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... | 32.157343 | 79 | 0.715016 |
472d8b15cf60edee3a8706fda70d754addef20b0 | 2,379 | bzl | Python | packages/bazel/rules_nodejs_package.bzl | gbamparop/angular | 213c25fb087939cb668bd47ca34ec7a616d3e371 | [
"MIT"
] | 1 | 2020-06-24T10:24:08.000Z | 2020-06-24T10:24:08.000Z | packages/bazel/rules_nodejs_package.bzl | gbamparop/angular | 213c25fb087939cb668bd47ca34ec7a616d3e371 | [
"MIT"
] | null | null | null | packages/bazel/rules_nodejs_package.bzl | gbamparop/angular | 213c25fb087939cb668bd47ca34ec7a616d3e371 | [
"MIT"
] | null | null | null | # Copyright 2018 The Bazel 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 applicable la... | 41.736842 | 136 | 0.7314 |
a4c3374d58963f310db097125c4b527ef8663f74 | 4,094 | py | Python | app/main/views/brief_responses.py | robot2051/dto-digitalmarketplace-api | de5b1fe67a0ce2d665633b083005263739080903 | [
"MIT"
] | null | null | null | app/main/views/brief_responses.py | robot2051/dto-digitalmarketplace-api | de5b1fe67a0ce2d665633b083005263739080903 | [
"MIT"
] | null | null | null | app/main/views/brief_responses.py | robot2051/dto-digitalmarketplace-api | de5b1fe67a0ce2d665633b083005263739080903 | [
"MIT"
] | null | null | null | from flask import jsonify, abort, request, current_app
from sqlalchemy.exc import IntegrityError, DataError
from dmapiclient.audit import AuditTypes
from .. import main
from ...models import db, Brief, BriefResponse, AuditEvent
from ...utils import (
get_json_from_request, json_has_required_keys, get_int_or_400,
... | 33.557377 | 119 | 0.712262 |
57d996c7074b89e897d2a243304c5576bfbf7f86 | 2,514 | py | Python | networkAnalysis.py | jmotis/twitter-networks | 6a91ed659143f59002f6eae736b072ae88f06647 | [
"MIT"
] | 10 | 2019-01-05T01:04:07.000Z | 2021-07-15T02:09:02.000Z | networkAnalysis.py | jmotis/twitter-networks | 6a91ed659143f59002f6eae736b072ae88f06647 | [
"MIT"
] | null | null | null | networkAnalysis.py | jmotis/twitter-networks | 6a91ed659143f59002f6eae736b072ae88f06647 | [
"MIT"
] | 3 | 2019-03-15T23:14:04.000Z | 2020-05-04T15:56:08.000Z | # import modules
import csv
import networkx as nx
from operator import itemgetter
import community
# define the function to create and analyze the network
def create_network(file):
with open(file, 'r') as edgecsv:
edgereader = csv.reader(edgecsv)
edges = [tuple(e) for e in edgereader][1:]
... | 32.230769 | 101 | 0.633652 |
0696b9f4e25399cfc4f287816c1e31a8ac178434 | 2,133 | py | Python | C3CTF/2019 36C3/numb_theory/solver.py | PurpEth/solved-hacking-problem | 6f289d1647eb9c091caa580c7aae673e3ba02952 | [
"Unlicense"
] | 1 | 2021-08-24T22:16:41.000Z | 2021-08-24T22:16:41.000Z | C3CTF/2019 36C3/numb_theory/solver.py | PurpEth/solved-hacking-problem | 6f289d1647eb9c091caa580c7aae673e3ba02952 | [
"Unlicense"
] | null | null | null | C3CTF/2019 36C3/numb_theory/solver.py | PurpEth/solved-hacking-problem | 6f289d1647eb9c091caa580c7aae673e3ba02952 | [
"Unlicense"
] | null | null | null | # encoding: utf-8
from pwn import *
r = 4
def mul(a, b):
z = [0, 0]*r
for i in range(r):
for j in range(r):
z[i+j] += a[i]*b[j]
while len(z) > r:
y = z.pop()
z[-r] += sum(map(eval, 'yyyyyyy'))
return tuple(t % n for t in z)
def exp(x, k):
y = [not i for i in ... | 22.452632 | 87 | 0.571027 |
74d0f29993b722725281e1c3c3b6b49960370f32 | 500 | py | Python | wrangle/df/df_to_groupby.py | benjolitz/wrangle | bac0c2affe38fd35db171e2a1c1e835355778459 | [
"MIT"
] | 17 | 2018-07-29T20:02:55.000Z | 2022-02-27T20:58:48.000Z | wrangle/df/df_to_groupby.py | benjolitz/wrangle | bac0c2affe38fd35db171e2a1c1e835355778459 | [
"MIT"
] | 24 | 2018-07-10T14:41:40.000Z | 2022-01-31T19:44:32.000Z | wrangle/df/df_to_groupby.py | benjolitz/wrangle | bac0c2affe38fd35db171e2a1c1e835355778459 | [
"MIT"
] | 10 | 2019-07-29T03:36:47.000Z | 2022-03-05T12:29:59.000Z | from ..utils.groupby_func import groupby_func
def df_to_groupby(data, by, func):
'''Takes in a dataframe and returns it in a grouped by format.
data : dataframe
A pandas dataframe
by : str
The column by which the grouping is done
func : str
The function to be used for groupin... | 27.777778 | 79 | 0.624 |
0de86af6cbde50d89bb9b4c2f63829365f169688 | 25,221 | py | Python | hw/vendor/lowrisc_ibex/vendor/google_riscv-dv/pygen/pygen_src/riscv_instr_gen_config.py | asb/opentitan | af68ff5041b10c81e97adc075a4d042f8ac7ab20 | [
"Apache-2.0"
] | 698 | 2019-05-02T17:03:07.000Z | 2022-03-30T21:23:13.000Z | hw/vendor/lowrisc_ibex/vendor/google_riscv-dv/pygen/pygen_src/riscv_instr_gen_config.py | asb/opentitan | af68ff5041b10c81e97adc075a4d042f8ac7ab20 | [
"Apache-2.0"
] | 1,021 | 2019-05-03T12:56:07.000Z | 2022-03-31T21:53:39.000Z | hw/vendor/lowrisc_ibex/vendor/google_riscv-dv/pygen/pygen_src/riscv_instr_gen_config.py | asb/opentitan | af68ff5041b10c81e97adc075a4d042f8ac7ab20 | [
"Apache-2.0"
] | 326 | 2019-05-03T10:11:53.000Z | 2022-03-28T15:35:22.000Z | """
Copyright 2020 Google LLC
Copyright 2020 PerfectVIPs 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 applicable law or agreed t... | 50.141153 | 100 | 0.610682 |
cc1e31249d6b4c11bb2f723642c83f666730c2f7 | 133 | py | Python | scalation_kernel/__main__.py | KevinBonanno/scalation_kernel | 7686ac72216057fbab72e805d0dfab58bbb24feb | [
"MIT"
] | null | null | null | scalation_kernel/__main__.py | KevinBonanno/scalation_kernel | 7686ac72216057fbab72e805d0dfab58bbb24feb | [
"MIT"
] | null | null | null | scalation_kernel/__main__.py | KevinBonanno/scalation_kernel | 7686ac72216057fbab72e805d0dfab58bbb24feb | [
"MIT"
] | null | null | null | from ipykernel.kernelapp import IPKernelApp
from . import ScalaTionKernel
IPKernelApp.launch_instance(kernel_class=ScalaTionKernel)
| 26.6 | 57 | 0.879699 |
3af0d288cb780627ae5b8806a162337fb55f9570 | 3,857 | py | Python | serrano/tokens.py | rysdyk/serrano | 926d874b19efdd18e359d32bca601058b655b288 | [
"BSD-2-Clause"
] | null | null | null | serrano/tokens.py | rysdyk/serrano | 926d874b19efdd18e359d32bca601058b655b288 | [
"BSD-2-Clause"
] | null | null | null | serrano/tokens.py | rysdyk/serrano | 926d874b19efdd18e359d32bca601058b655b288 | [
"BSD-2-Clause"
] | 1 | 2020-01-16T15:26:37.000Z | 2020-01-16T15:26:37.000Z | import sys
import string
import hashlib
from datetime import datetime
from random import SystemRandom
from django.conf import settings as django_settings
from django.utils.http import int_to_base36, base36_to_int
from serrano.conf import settings
# Hex characters
HEX_CHARS = string.lowercase[:6] + string.digits
# Sys... | 32.141667 | 95 | 0.644802 |
220578fb296d36f9ee65d51f7d5ad17ce7e2ad74 | 5,990 | py | Python | marsi/io/parsers.py | biosustain/marsi | a903924c9345db26227a558e0064bd940b41e912 | [
"Apache-2.0"
] | null | null | null | marsi/io/parsers.py | biosustain/marsi | a903924c9345db26227a558e0064bd940b41e912 | [
"Apache-2.0"
] | null | null | null | marsi/io/parsers.py | biosustain/marsi | a903924c9345db26227a558e0064bd940b41e912 | [
"Apache-2.0"
] | 1 | 2020-01-16T12:05:09.000Z | 2020-01-16T12:05:09.000Z | # Copyright 2016 Chr. Hansen A/S and The Novo Nordisk Foundation Center for Biosustainability, DTU.
# 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.... | 42.785714 | 116 | 0.629048 |
28155f13a4364d86893aa31dcf9f09251c75f197 | 963 | py | Python | backend/mlarchive/wsgi.py | dkg/mailarch | 562757c09e212c202c35231d7e7c588cd4d3fb65 | [
"BSD-3-Clause"
] | 6 | 2022-03-09T23:10:28.000Z | 2022-03-21T05:32:40.000Z | backend/mlarchive/wsgi.py | dkg/mailarch | 562757c09e212c202c35231d7e7c588cd4d3fb65 | [
"BSD-3-Clause"
] | 5 | 2022-03-11T09:39:47.000Z | 2022-03-30T16:48:09.000Z | backend/mlarchive/wsgi.py | dkg/mailarch | 562757c09e212c202c35231d7e7c588cd4d3fb65 | [
"BSD-3-Clause"
] | 4 | 2022-03-04T15:36:19.000Z | 2022-03-28T23:45:44.000Z | import os
import sys
import syslog
path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
syslog.openlog("mailarchive", syslog.LOG_PID, syslog.LOG_USER)
# Virtualenv support
virtualenv_activation = os.path.join(os.path.dirname(path), "env", "bin", "activate_this.py")
if os.path.exists(virtualenv_activati... | 35.666667 | 128 | 0.76947 |
4c2c8a2ea6494fa8a5f8db732d825142b2f0b9d5 | 7,284 | py | Python | test/functional/feature_nulldummy.py | blinkhash/blinkhash-core | e05662019c2fa4cb2dc3736f38e48492712c23b1 | [
"MIT"
] | 3 | 2021-07-27T16:59:47.000Z | 2021-12-31T20:55:46.000Z | test/functional/feature_nulldummy.py | blinkhash/blinkhash-core | e05662019c2fa4cb2dc3736f38e48492712c23b1 | [
"MIT"
] | null | null | null | test/functional/feature_nulldummy.py | blinkhash/blinkhash-core | e05662019c2fa4cb2dc3736f38e48492712c23b1 | [
"MIT"
] | 1 | 2021-12-31T12:58:23.000Z | 2021-12-31T12:58:23.000Z | #!/usr/bin/env python3
# Copyright (c) 2016-2021 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test NULLDUMMY softfork.
Connect to a single node.
Generate 2 blocks (save the coinbases for later).
G... | 52.028571 | 165 | 0.711971 |
8a760040c29e0c477333b62c4cde842c80ea10eb | 18,322 | py | Python | redash/handlers/queries.py | patilvikram/redash | 27259b5abe4480d1112831952eb031560f546937 | [
"BSD-2-Clause"
] | 8 | 2019-05-05T10:33:43.000Z | 2021-07-14T11:21:52.000Z | redash/handlers/queries.py | loaiabdalslam/redash | a00c5a8857bab56d2faaa17e296e6281814b091a | [
"BSD-2-Clause"
] | 1 | 2020-10-07T22:25:04.000Z | 2020-10-07T22:44:50.000Z | redash/handlers/queries.py | loaiabdalslam/redash | a00c5a8857bab56d2faaa17e296e6281814b091a | [
"BSD-2-Clause"
] | 15 | 2019-06-29T13:58:00.000Z | 2022-02-27T14:57:03.000Z | import sqlparse
from flask import jsonify, request, url_for
from flask_login import login_required
from flask_restful import abort
from sqlalchemy.orm.exc import StaleDataError
from funcy import partial
from redash import models, settings
from redash.authentication.org_resolving import current_org
from redash.handlers... | 35.785156 | 127 | 0.633992 |
927f63e909e55bfdbda795c2c8fa0e274c345ffe | 4,473 | py | Python | discodo/client/gateway.py | AkiaCode/discodo | 0a76afb196a7945f525896f56f431e82aaf83f44 | [
"MIT"
] | null | null | null | discodo/client/gateway.py | AkiaCode/discodo | 0a76afb196a7945f525896f56f431e82aaf83f44 | [
"MIT"
] | null | null | null | discodo/client/gateway.py | AkiaCode/discodo | 0a76afb196a7945f525896f56f431e82aaf83f44 | [
"MIT"
] | null | null | null | import asyncio
import concurrent.futures
import json
import logging
import threading
import time
from collections import deque
from typing import Any
import websockets
log = logging.getLogger("discodo.client")
class keepAlive(threading.Thread):
def __init__(self, ws, interval: int, *args, **kwargs) -> None:
... | 30.020134 | 86 | 0.558015 |
2e849b07ee0064623c0ced3ad9597c78c10c1031 | 894 | py | Python | oscar/apps/catalogue/reviews/app.py | makielab/django-oscar | 0a325cd0f04a4278201872b2e163868b72b6fabe | [
"BSD-3-Clause"
] | null | null | null | oscar/apps/catalogue/reviews/app.py | makielab/django-oscar | 0a325cd0f04a4278201872b2e163868b72b6fabe | [
"BSD-3-Clause"
] | null | null | null | oscar/apps/catalogue/reviews/app.py | makielab/django-oscar | 0a325cd0f04a4278201872b2e163868b72b6fabe | [
"BSD-3-Clause"
] | null | null | null | from django.conf.urls import patterns, url
from oscar.core.application import Application
from . import views
class ProductReviewsApplication(Application):
name = None
hidable_feature_name = "reviews"
detail_view = views.ProductReviewDetail
create_view = views.CreateProductReview
vote_view = vie... | 30.827586 | 75 | 0.645414 |
7c073317776baef7d8a08280aaeeaaa5989936f3 | 2,651 | py | Python | geomagio/metadata/Metadata.py | usgs/geomag-algorithms | a83a0e36bed9307828e37b9130c25dbc26dd1bc9 | [
"CC0-1.0"
] | 49 | 2015-10-06T17:57:20.000Z | 2022-01-12T18:40:17.000Z | geomagio/metadata/Metadata.py | usgs/geomag-algorithms | a83a0e36bed9307828e37b9130c25dbc26dd1bc9 | [
"CC0-1.0"
] | 229 | 2015-01-26T20:10:36.000Z | 2022-03-12T00:46:33.000Z | geomagio/metadata/Metadata.py | usgs/geomag-algorithms | a83a0e36bed9307828e37b9130c25dbc26dd1bc9 | [
"CC0-1.0"
] | 44 | 2015-03-03T16:18:18.000Z | 2021-11-06T17:07:38.000Z | from datetime import timezone
from typing import Dict
from obspy import UTCDateTime
from pydantic import BaseModel, validator
from .. import pydantic_utcdatetime
from .MetadataCategory import MetadataCategory
class Metadata(BaseModel):
"""
This class is used for Data flagging and other Metadata.
Flag e... | 28.815217 | 87 | 0.622784 |
249e5eacafdff2c059db3a84e45f1c825138494a | 1,362 | py | Python | test/fixtures_vessel.py | ruy-sevalho/german_lloyds_hsc_rules | ac65158ddfeca0b96487c4959476256e83981d3f | [
"MIT"
] | null | null | null | test/fixtures_vessel.py | ruy-sevalho/german_lloyds_hsc_rules | ac65158ddfeca0b96487c4959476256e83981d3f | [
"MIT"
] | null | null | null | test/fixtures_vessel.py | ruy-sevalho/german_lloyds_hsc_rules | ac65158ddfeca0b96487c4959476256e83981d3f | [
"MIT"
] | null | null | null | """
# @ Author: Ruy Sevalho
# @ Create Time: 2021-08-24 08:59:25
# @ Description:
"""
import pytest as pt
from gl_hsc_scantling.vessel import Monohull, Catamaran
from .exp_output import ExpVessel, ExpCatamaran, ExpCatamaranGlobalLoads
@pt.fixture
def vessel_input_ex1():
"""Test vessel 01"""
return {
... | 23.894737 | 74 | 0.585169 |
41ed923f23137df14269d04609f85556aa2a3c13 | 3,688 | py | Python | lib/roi_data_layer/minibatch.py | guanbin1994/arm_fracture_fpn | 9aa59b6d1a8a780addb5c7c3f37ed96b736483f5 | [
"MIT"
] | null | null | null | lib/roi_data_layer/minibatch.py | guanbin1994/arm_fracture_fpn | 9aa59b6d1a8a780addb5c7c3f37ed96b736483f5 | [
"MIT"
] | null | null | null | lib/roi_data_layer/minibatch.py | guanbin1994/arm_fracture_fpn | 9aa59b6d1a8a780addb5c7c3f37ed96b736483f5 | [
"MIT"
] | null | null | null | # --------------------------------------------------------
# Fast R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick and Xinlei Chen
# --------------------------------------------------------
"""Compute minibatch blobs for training a Fast R-CNN ne... | 32.637168 | 113 | 0.59897 |
9fccf44e999dd6ba32e33eb2cd0a006f408caa15 | 2,114 | py | Python | src/shapeandshare/dicebox/models/layer.py | shapeandshare/dicebox | 63b9c05d8e2217b4f2ecaeaa265229148b895f86 | [
"MIT"
] | null | null | null | src/shapeandshare/dicebox/models/layer.py | shapeandshare/dicebox | 63b9c05d8e2217b4f2ecaeaa265229148b895f86 | [
"MIT"
] | 17 | 2017-09-25T00:29:46.000Z | 2022-03-11T23:15:40.000Z | src/shapeandshare/dicebox/models/layer.py | shapeandshare/dicebox | 63b9c05d8e2217b4f2ecaeaa265229148b895f86 | [
"MIT"
] | null | null | null | from abc import ABC
from enum import Enum
from random import choices
from typing import Tuple
class LayerType(Enum):
DROPOUT = "dropout"
DENSE = "dense"
CONV2D = "conv2d" # https://www.tensorflow.org/api_docs/python/tf/keras/layers/Conv2D
def select_random_layer_type() -> LayerType:
return choices... | 23.752809 | 90 | 0.669347 |
fe046340edaf779522cc4cae99e385fe75cd992a | 4,137 | py | Python | TTS_generator/utils/basic_file_operations_class.py | secretsauceai/precise-wakeword-model-maker | 00f91cbeab6d6a230300333ec6557623c99880cb | [
"Apache-2.0"
] | 8 | 2022-02-23T08:17:59.000Z | 2022-03-20T13:34:56.000Z | TTS_generator/utils/basic_file_operations_class.py | secretsauceai/precise-wakeword-model-maker | 00f91cbeab6d6a230300333ec6557623c99880cb | [
"Apache-2.0"
] | 15 | 2021-12-30T11:41:09.000Z | 2022-03-01T18:20:09.000Z | utils/basic_file_operations_class.py | AmateurAcademic/TTS-wakeword-generator | 0d002e9af36c56f97054b06134af2d4e09df1868 | [
"Apache-2.0"
] | 1 | 2021-12-31T19:47:06.000Z | 2021-12-31T19:47:06.000Z | import os
from os import listdir
from os.path import isfile, join
import shutil
class BasicFileOperations:
@staticmethod
def get_files(source_directory):
return [f for f in listdir(source_directory) if isfile(join(source_directory, f))]
@staticmethod
def get_number_of_files(source_directory):... | 38.663551 | 125 | 0.659898 |
e03be90f8dcd0fb9d385de020ec7d6d67b11d497 | 1,267 | py | Python | tag_generator.py | nshobe/nshobe.github.io | d958bdd7180cb9d9a41553bbee2164e210731bd7 | [
"MIT"
] | null | null | null | tag_generator.py | nshobe/nshobe.github.io | d958bdd7180cb9d9a41553bbee2164e210731bd7 | [
"MIT"
] | null | null | null | tag_generator.py | nshobe/nshobe.github.io | d958bdd7180cb9d9a41553bbee2164e210731bd7 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
'''
tag_generator.py
Copyright 2017 Long Qian
Contact: lqian8@jhu.edu
This script creates tags for your Jekyll blog hosted by Github page.
No plugins required.
'''
import glob
import os
post_dir = '_posts/'
tag_dir = 'tag/'
filenames = glob.glob(post_dir + '*md')
total_tags = []
for filename in ... | 23.90566 | 109 | 0.579321 |
985ca4b30c64a4b4924dbf5ae3d65d85a52c3d52 | 125 | py | Python | hello.py | jhaigler94/cs3240-labdemo | 4a921f4a8c8dec00fbd12d691513763becab6e0e | [
"MIT"
] | null | null | null | hello.py | jhaigler94/cs3240-labdemo | 4a921f4a8c8dec00fbd12d691513763becab6e0e | [
"MIT"
] | null | null | null | hello.py | jhaigler94/cs3240-labdemo | 4a921f4a8c8dec00fbd12d691513763becab6e0e | [
"MIT"
] | null | null | null | from helper import greeting
if __name__ == "__main__":
greeting("Hello. This greeting comes from the 'develop branch'")
| 25 | 68 | 0.736 |
40db710ebfa02e90add3d34c19b4564c882452d8 | 3,973 | py | Python | contrib/linearize/linearize-hashes.py | hideoussquid/aureus-core-gui | ce075f2f0f9c99a344a1b0629cfd891526daac7b | [
"MIT"
] | null | null | null | contrib/linearize/linearize-hashes.py | hideoussquid/aureus-core-gui | ce075f2f0f9c99a344a1b0629cfd891526daac7b | [
"MIT"
] | null | null | null | contrib/linearize/linearize-hashes.py | hideoussquid/aureus-core-gui | ce075f2f0f9c99a344a1b0629cfd891526daac7b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#
# linearize-hashes.py: List blocks in a linear, no-fork version of the chain.
#
# Copyright (c) 2013-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
from __future__ impo... | 29 | 90 | 0.684873 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.