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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b748129a257264ee78fbb33c2f52b2552698dcea | 2,418 | py | Python | CalibTracker/SiStripCommon/python/theBigNtuple_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | CalibTracker/SiStripCommon/python/theBigNtuple_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | CalibTracker/SiStripCommon/python/theBigNtuple_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
from CalibTracker.SiStripCommon.ShallowEventDataProducer_cfi import *
from CalibTracker.SiStripCommon.ShallowDigisProducer_cfi import *
from CalibTracker.SiStripCommon.ShallowClustersProducer_cfi import *
from CalibTracker.SiStripCommon.ShallowTrackClustersProducer_cfi import *... | 43.178571 | 130 | 0.700165 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 254 | 0.105045 |
b748865dafd57226e01bad7504ce06ab355e363a | 75 | py | Python | anti_freeze/__main__.py | Donluigimx/anti-freeze | 03699e5c4f82ccd06f37b4e8b51da22cc5841b57 | [
"MIT"
] | null | null | null | anti_freeze/__main__.py | Donluigimx/anti-freeze | 03699e5c4f82ccd06f37b4e8b51da22cc5841b57 | [
"MIT"
] | null | null | null | anti_freeze/__main__.py | Donluigimx/anti-freeze | 03699e5c4f82ccd06f37b4e8b51da22cc5841b57 | [
"MIT"
] | null | null | null | if __name__ == '__main__':
from .system import MyApp
MyApp().run()
| 18.75 | 29 | 0.626667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.133333 |
b74908cfbdafb8fdf6ed4e638d485501633fe75d | 18,656 | py | Python | classic_NN/nn.py | disooqi/learning-machine-learning | 5fcef0a18f0c2e9aeab4abf45b968eb6ca5ba463 | [
"MIT"
] | 1 | 2020-09-30T18:09:51.000Z | 2020-09-30T18:09:51.000Z | classic_NN/nn.py | disooqi/learning-machine-learning | 5fcef0a18f0c2e9aeab4abf45b968eb6ca5ba463 | [
"MIT"
] | null | null | null | classic_NN/nn.py | disooqi/learning-machine-learning | 5fcef0a18f0c2e9aeab4abf45b968eb6ca5ba463 | [
"MIT"
] | null | null | null | import numpy as np
from scipy.special import expit, logit
import time
import logging
np.random.seed(4) # 4
logger = logging.getLogger(__name__)
fr = logging.Formatter('%(asctime)s:%(levelname)s:%(message)s')
sh = logging.StreamHandler()
# sh.setFormatter(fr)
logger.addHandler(sh)
logger.setLevel(logging.DEBUG)
logge... | 39.609342 | 187 | 0.582547 | 18,074 | 0.968804 | 0 | 0 | 7,938 | 0.425493 | 0 | 0 | 4,768 | 0.255575 |
b749f4714d0c5e5ad919fdd5ae7b07a02ccd8628 | 71 | py | Python | sensorAtlas/__init__.py | iosefa/pyMatau | 7b3f768db578771ba55a912bc4a9b8be58619070 | [
"MIT"
] | 2 | 2021-05-28T10:26:17.000Z | 2021-07-03T03:11:22.000Z | sensorAtlas/__init__.py | iosefa/pyMatau | 7b3f768db578771ba55a912bc4a9b8be58619070 | [
"MIT"
] | 2 | 2020-11-19T00:51:19.000Z | 2020-11-19T01:18:03.000Z | sensorAtlas/__init__.py | sensoratlas/sensoratlas | 7b3f768db578771ba55a912bc4a9b8be58619070 | [
"MIT"
] | 1 | 2019-10-10T14:03:42.000Z | 2019-10-10T14:03:42.000Z | # app config
default_app_config = 'sensorAtlas.apps.sensorAtlasConfig'
| 23.666667 | 57 | 0.830986 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 48 | 0.676056 |
b74a328698a70e0b159b7d2e8ddf8ec1e64183ed | 376 | py | Python | api/urls.py | yasminfarza/country-state-address-api | 39c8d349095dcca4f2411f7097497d6a8f39c1e1 | [
"MIT"
] | 4 | 2021-06-06T14:16:33.000Z | 2021-06-09T03:42:11.000Z | api/urls.py | yasminfarza/country-state-address-api | 39c8d349095dcca4f2411f7097497d6a8f39c1e1 | [
"MIT"
] | null | null | null | api/urls.py | yasminfarza/country-state-address-api | 39c8d349095dcca4f2411f7097497d6a8f39c1e1 | [
"MIT"
] | null | null | null | from django.urls import path, include
from rest_framework.routers import DefaultRouter
from api import views
router = DefaultRouter()
router.register('countries', views.CountryViewSet)
router.register('states/(?P<country>[^/.]+)', views.StateViewSet)
router.register('addresses', views.AddressViewSet)
app_name = 'api... | 23.5 | 65 | 0.755319 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 57 | 0.151596 |
b74a946738ed6712ecf1be81551ad79c1bd928a1 | 1,401 | py | Python | tests/test_protocol.py | gimbas/openinput | 9cbb4b22aebe46dfc33ae9c56b164baa6c1fe693 | [
"MIT"
] | 38 | 2020-05-11T10:54:15.000Z | 2022-03-30T13:19:09.000Z | tests/test_protocol.py | gimbas/openinput | 9cbb4b22aebe46dfc33ae9c56b164baa6c1fe693 | [
"MIT"
] | 45 | 2020-04-21T23:52:22.000Z | 2022-02-19T20:29:27.000Z | tests/test_protocol.py | gimbas/openinput | 9cbb4b22aebe46dfc33ae9c56b164baa6c1fe693 | [
"MIT"
] | 5 | 2020-08-29T02:10:42.000Z | 2021-08-31T03:12:15.000Z | # SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021 Filipe Laíns <[email protected]>
def test_dispatch(basic_device):
basic_device.protocol_dispatch([0x03, 0x02, 0x01]) # unrelated
basic_device.protocol_dispatch([0x20]) # invalid length short
basic_device.protocol_dispatch([0x21]) # invalid le... | 32.581395 | 95 | 0.712348 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 190 | 0.135521 |
b74acbae89490d10494c82735b42d81274199ebb | 4,314 | py | Python | zaqar-8.0.0/zaqar/storage/sqlalchemy/driver.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 97 | 2015-01-02T09:35:23.000Z | 2022-03-25T00:38:45.000Z | zaqar-8.0.0/zaqar/storage/sqlalchemy/driver.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | zaqar-8.0.0/zaqar/storage/sqlalchemy/driver.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 44 | 2015-01-28T03:01:28.000Z | 2021-05-13T18:55:19.000Z | # Copyright (c) 2013 Red Hat, Inc.
# Copyright 2014 Catalyst IT 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/licenses/LICENSE-2.0
#
# Unless required by a... | 36.871795 | 79 | 0.653454 | 3,383 | 0.784191 | 0 | 0 | 2,328 | 0.539638 | 0 | 0 | 1,283 | 0.297404 |
b74c264ab951da49d482e8b5b2b953e6b1285a3b | 792 | py | Python | tests/explainers/test_explainer.py | zduey/shap | 1bb8203f2d43f7552396a5f26167a258cbdc505c | [
"MIT"
] | 1 | 2021-03-03T11:00:32.000Z | 2021-03-03T11:00:32.000Z | tests/explainers/test_explainer.py | zduey/shap | 1bb8203f2d43f7552396a5f26167a258cbdc505c | [
"MIT"
] | null | null | null | tests/explainers/test_explainer.py | zduey/shap | 1bb8203f2d43f7552396a5f26167a258cbdc505c | [
"MIT"
] | null | null | null | """ Tests for Explainer class.
"""
import pytest
import shap
def test_wrapping_for_text_to_text_teacher_forcing_logits_model():
""" This tests using the Explainer class to auto choose a text to text setup.
"""
transformers = pytest.importorskip("transformers")
def f(x): # pylint: disable=unused-arg... | 31.68 | 111 | 0.753788 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 212 | 0.267677 |
b74d8e9763f51be71d9332444a4477006848a8de | 1,301 | py | Python | main/urls.py | guinslym/django-Django-Code-Review-CodeEntrepreneurs | 2ad9bd3d352f7eba46e16a7bf24e06b809049d62 | [
"BSD-3-Clause"
] | 2 | 2017-07-31T13:52:40.000Z | 2017-09-19T15:07:09.000Z | main/urls.py | guinslym/Django-Code-Review-CodeEntrepreneurs | 2ad9bd3d352f7eba46e16a7bf24e06b809049d62 | [
"BSD-3-Clause"
] | null | null | null | main/urls.py | guinslym/Django-Code-Review-CodeEntrepreneurs | 2ad9bd3d352f7eba46e16a7bf24e06b809049d62 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from django.conf import settings
from django.contrib import admin
from django.conf.urls.static import static
from django.conf.urls.i18n import i18n_patterns
from django.views.decorators.cache import cache_page
from django.conf.urls import url, include, handler404, handler500
admin.autodiscover(... | 27.104167 | 69 | 0.687164 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 452 | 0.347425 |
b74eef5240ddb793f5798e460265805a101c2233 | 486 | py | Python | examples/simpleform/app/forms.py | ezeev/Flask-AppBuilder | d95f0ed934272629ee44ad3241646fa7ba09cdf8 | [
"BSD-3-Clause"
] | 71 | 2016-11-02T06:45:42.000Z | 2021-11-15T12:33:48.000Z | examples/simpleform/app/forms.py | ezeev/Flask-AppBuilder | d95f0ed934272629ee44ad3241646fa7ba09cdf8 | [
"BSD-3-Clause"
] | 3 | 2021-06-08T23:39:54.000Z | 2022-03-12T00:50:13.000Z | examples/simpleform/app/forms.py | ezeev/Flask-AppBuilder | d95f0ed934272629ee44ad3241646fa7ba09cdf8 | [
"BSD-3-Clause"
] | 23 | 2016-11-02T06:45:44.000Z | 2022-02-08T14:55:13.000Z | from wtforms import Form, StringField
from wtforms.validators import DataRequired
from flask_appbuilder.fieldwidgets import BS3TextFieldWidget
from flask_appbuilder.forms import DynamicForm
class MyForm(DynamicForm):
field1 = StringField(('Field1'),
description=('Your field number one!'),
validato... | 37.384615 | 76 | 0.751029 | 293 | 0.602881 | 0 | 0 | 0 | 0 | 0 | 0 | 64 | 0.131687 |
b74ef20d1f5294557f6193fe99adc3a01e0224ec | 403 | py | Python | comms.py | kajusz/ufscreenadsclient | 0151edec0117161c522a87643eef2f7be214210c | [
"MIT"
] | null | null | null | comms.py | kajusz/ufscreenadsclient | 0151edec0117161c522a87643eef2f7be214210c | [
"MIT"
] | null | null | null | comms.py | kajusz/ufscreenadsclient | 0151edec0117161c522a87643eef2f7be214210c | [
"MIT"
] | null | null | null | import zmq
context = zmq.Context()
socket = context.socket(zmq.PAIR)
address = "tcp://127.0.0.1:5000"
def client(address):
socket.connect(address)
def server(address):
socket.bind(address)
def send(data):
socket.send_string(data)
def recv():
try:
return socket.recv(flags=zmq.NOBLOCK)
ex... | 18.318182 | 45 | 0.66005 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 63 | 0.156328 |
b74f2a4a74090ecd5db981f0f8052fb5379e118a | 410 | py | Python | runtime/python/Lib/site-packages/numpy/typing/tests/data/fail/datasource.py | hwaipy/InteractionFreeNode | 88642b68430f57b028fd0f276a5709f89279e30d | [
"MIT"
] | null | null | null | runtime/python/Lib/site-packages/numpy/typing/tests/data/fail/datasource.py | hwaipy/InteractionFreeNode | 88642b68430f57b028fd0f276a5709f89279e30d | [
"MIT"
] | null | null | null | runtime/python/Lib/site-packages/numpy/typing/tests/data/fail/datasource.py | hwaipy/InteractionFreeNode | 88642b68430f57b028fd0f276a5709f89279e30d | [
"MIT"
] | null | null | null | from pathlib import Path
import numpy as np
path: Path
d1: np.DataSource
d1.abspath(path) # E: incompatible type
d1.abspath(b"...") # E: incompatible type
d1.exists(path) # E: incompatible type
d1.exists(b"...") # E: incompatible type
d1.open(path, "r") # E: incompatible type
d1.open(b"...", encod... | 25.625 | 57 | 0.656098 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 192 | 0.468293 |
b7509767f47f312767bff162702df8fc8da90b4c | 2,821 | py | Python | applications/admin/controllers/gae.py | otaviocarvalho/forca-inf | 93b61f1d6988d4fb00a1736633d85b4f99a2f259 | [
"BSD-3-Clause"
] | 1 | 2017-03-28T21:31:51.000Z | 2017-03-28T21:31:51.000Z | applications/admin/controllers/gae.py | murray3/augmi-a | 9f8cff457fa3966d67d3752ccd86876b08bb19b1 | [
"BSD-3-Clause"
] | null | null | null | applications/admin/controllers/gae.py | murray3/augmi-a | 9f8cff457fa3966d67d3752ccd86876b08bb19b1 | [
"BSD-3-Clause"
] | 1 | 2022-03-10T19:53:44.000Z | 2022-03-10T19:53:44.000Z | ### this works on linux only
try:
import fcntl
import subprocess
import signal
import os
except:
session.flash='sorry, only on Unix systems'
redirect(URL(request.application,'default','site'))
forever=10**8
def kill():
p = cache.ram('gae_upload',lambda:None,forever)
if not p or p.poll... | 36.636364 | 90 | 0.515066 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 410 | 0.145339 |
b751a3b9de29d209e3c48a06bc158c7966ca65b5 | 1,110 | py | Python | basicts/archs/AGCRN_arch/AGCRNCell.py | zezhishao/GuanCang_BasicTS | bbf82b9d08e82db78d4e9e9b11f43a676b54ad7c | [
"Apache-2.0"
] | 3 | 2022-02-22T12:50:08.000Z | 2022-03-13T03:38:46.000Z | basicts/archs/AGCRN_arch/AGCRNCell.py | zezhishao/GuanCang_BasicTS | bbf82b9d08e82db78d4e9e9b11f43a676b54ad7c | [
"Apache-2.0"
] | null | null | null | basicts/archs/AGCRN_arch/AGCRNCell.py | zezhishao/GuanCang_BasicTS | bbf82b9d08e82db78d4e9e9b11f43a676b54ad7c | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn as nn
from basicts.archs.AGCRN_arch.AGCN import AVWGCN
class AGCRNCell(nn.Module):
def __init__(self, node_num, dim_in, dim_out, cheb_k, embed_dim):
super(AGCRNCell, self).__init__()
self.node_num = node_num
self.hidden_dim = dim_out
self.gate ... | 42.692308 | 81 | 0.648649 | 1,020 | 0.918919 | 0 | 0 | 0 | 0 | 0 | 0 | 61 | 0.054955 |
b7529f85e20a09a7d94f12902a504b82d6d2f333 | 1,763 | py | Python | lib/python2.7/site-packages/openopt/kernel/iterPrint.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | lib/python2.7/site-packages/openopt/kernel/iterPrint.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | lib/python2.7/site-packages/openopt/kernel/iterPrint.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | from numpy import log10, isnan
def signOfFeasible(p):
r = '-'
if p.isFeas(p.xk): r = '+'
return r
textOutputDict = {\
'objFunVal': lambda p: p.iterObjFunTextFormat % (-p.Fk if p.invertObjFunc else p.Fk),
'log10(maxResidual)': lambda p: '%0.2f' % log10(p.rk+1e-100),
'log10(MaxResidual/ConTol)':lambda p: '... | 37.510638 | 123 | 0.604651 | 817 | 0.463415 | 0 | 0 | 0 | 0 | 0 | 0 | 289 | 0.163925 |
b752f435d4eed268979210bf9a7cb3d5c6b5fde1 | 1,833 | py | Python | src/cli.py | blu3r4y/ccc-linz-mar2019 | a012a8e8d0cbf01c495385c62f2571bfb1b01962 | [
"MIT"
] | null | null | null | src/cli.py | blu3r4y/ccc-linz-mar2019 | a012a8e8d0cbf01c495385c62f2571bfb1b01962 | [
"MIT"
] | null | null | null | src/cli.py | blu3r4y/ccc-linz-mar2019 | a012a8e8d0cbf01c495385c62f2571bfb1b01962 | [
"MIT"
] | null | null | null | import os
from main import main
from pprint import pprint
def parse(lines):
# world bounds
wx = int(lines[0].split()[0])
wy = int(lines[0].split()[0])
# initial position
x = int(lines[1].split()[0])
y = int(lines[1].split()[1])
cmds = []
# command / step pair
it = iter(lines[2].... | 24.118421 | 73 | 0.505728 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 288 | 0.157119 |
b75565cf56b991351466f79c8a9946c1474351a6 | 5,749 | py | Python | card_utils/games/gin/ricky/utils.py | cdrappi/card_utils | dd12d3be22774cf35d7a6ce6b5f05ff6ee527929 | [
"MIT"
] | null | null | null | card_utils/games/gin/ricky/utils.py | cdrappi/card_utils | dd12d3be22774cf35d7a6ce6b5f05ff6ee527929 | [
"MIT"
] | null | null | null | card_utils/games/gin/ricky/utils.py | cdrappi/card_utils | dd12d3be22774cf35d7a6ce6b5f05ff6ee527929 | [
"MIT"
] | null | null | null | import itertools
from typing import List, Tuple
from card_utils import deck
from card_utils.deck.utils import (
rank_partition,
suit_partition,
ranks_to_sorted_values
)
from card_utils.games.gin.deal import new_game
def deal_new_game():
""" shuffle up and deal each player 7 cards,
put one car... | 27.117925 | 83 | 0.584623 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,750 | 0.304401 |
b7569ffd8bee128efc51f5bcf493cd00aa1b2d94 | 899 | py | Python | evennia/contrib/rpg/dice/tests.py | davidrideout/evennia | 879eea55acdf4fe5cdc96ba8fd0ab5ccca4ae84b | [
"BSD-3-Clause"
] | null | null | null | evennia/contrib/rpg/dice/tests.py | davidrideout/evennia | 879eea55acdf4fe5cdc96ba8fd0ab5ccca4ae84b | [
"BSD-3-Clause"
] | null | null | null | evennia/contrib/rpg/dice/tests.py | davidrideout/evennia | 879eea55acdf4fe5cdc96ba8fd0ab5ccca4ae84b | [
"BSD-3-Clause"
] | null | null | null | """
Testing of TestDice.
"""
from evennia.commands.default.tests import BaseEvenniaCommandTest
from mock import patch
from . import dice
@patch("evennia.contrib.rpg.dice.dice.randint", return_value=5)
class TestDice(BaseEvenniaCommandTest):
def test_roll_dice(self, mocked_randint):
self.assertEqual(dice... | 37.458333 | 100 | 0.657397 | 693 | 0.770857 | 0 | 0 | 757 | 0.842047 | 0 | 0 | 259 | 0.288098 |
b75755658b51065a953a59f32b666762d1790a50 | 9,247 | py | Python | ardour_tally_relay.py | Jajcus/ardour_tally_relay | aa69035a86bd282238f70ef17c427068249efd59 | [
"BSD-2-Clause"
] | null | null | null | ardour_tally_relay.py | Jajcus/ardour_tally_relay | aa69035a86bd282238f70ef17c427068249efd59 | [
"BSD-2-Clause"
] | null | null | null | ardour_tally_relay.py | Jajcus/ardour_tally_relay | aa69035a86bd282238f70ef17c427068249efd59 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/python3
import argparse
import logging
import signal
import time
from logging import debug, error, info, warning
import pythonosc.osc_server
import pythonosc.udp_client
from pythonosc.dispatcher import Dispatcher
import hid
LOG_FORMAT = '%(message)s'
POLL_INTERVAL = 1
# Supported USB relay vendor-id and... | 37.589431 | 106 | 0.54861 | 8,677 | 0.938358 | 0 | 0 | 0 | 0 | 0 | 0 | 1,400 | 0.1514 |
b757a3fb8db3b96f5cc0d1f1dd19f7847059351f | 1,408 | py | Python | python second semester working scripts/electrode_fcn.py | pm2111/Heart-Defibrillation-Project | 48ea3570c360aac7c3ff46354891998f4f364fab | [
"MIT"
] | null | null | null | python second semester working scripts/electrode_fcn.py | pm2111/Heart-Defibrillation-Project | 48ea3570c360aac7c3ff46354891998f4f364fab | [
"MIT"
] | null | null | null | python second semester working scripts/electrode_fcn.py | pm2111/Heart-Defibrillation-Project | 48ea3570c360aac7c3ff46354891998f4f364fab | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import os
path = "/Users/petermarinov/msci project/electrode data/test data/data/"
filenames = []
for f in os.listdir(path):
if not f.startswith('.'):
filenames.append(f)
i=-12
data = np.genfromtxt(path + filenames[i])
V = np.zeros((200,20... | 31.288889 | 139 | 0.496449 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 381 | 0.270597 |
b757a454248faaffeb488872e86cf07d801bf71c | 1,355 | py | Python | resources/lib/IMDbPY/bin/get_first_movie.py | bopopescu/ServerStatus | a883598248ad6f5273eb3be498e3b04a1fab6510 | [
"MIT"
] | 1 | 2017-11-02T06:06:39.000Z | 2017-11-02T06:06:39.000Z | resources/lib/IMDbPY/bin/get_first_movie.py | bopopescu/ServerStatus | a883598248ad6f5273eb3be498e3b04a1fab6510 | [
"MIT"
] | 1 | 2015-04-21T22:05:02.000Z | 2015-04-22T22:27:15.000Z | resources/lib/IMDbPY/bin/get_first_movie.py | GetSomeBlocks/Score_Soccer | a883598248ad6f5273eb3be498e3b04a1fab6510 | [
"MIT"
] | 4 | 2017-11-01T19:24:31.000Z | 2018-09-13T00:05:41.000Z | #!/usr/bin/env python
"""
get_first_movie.py
Usage: get_first_movie "movie title"
Search for the given title and print the best matching result.
"""
import sys
# Import the IMDbPY package.
try:
import imdb
except ImportError:
print 'You bad boy! You need to install the IMDbPY package!'
sys.exit(1)
if... | 22.583333 | 79 | 0.702583 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 676 | 0.498893 |
b7592e3ec4b70120c5e12cf12590570b289d59a3 | 14,079 | py | Python | ID3.py | idiomatic/id3.py | 574b2a6bd52897e07c220198d451e5971577fc02 | [
"MIT"
] | null | null | null | ID3.py | idiomatic/id3.py | 574b2a6bd52897e07c220198d451e5971577fc02 | [
"MIT"
] | null | null | null | ID3.py | idiomatic/id3.py | 574b2a6bd52897e07c220198d451e5971577fc02 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- mode: python -*-
import re
import struct
import types
def items_in_order(dict, order=[]):
"""return all items of dict, but starting in the specified order."""
done = { }
items = [ ]
for key in order + dict.keys():
if not done.has_key(key) and dict.has_key(key):
... | 32.291284 | 79 | 0.539882 | 7,020 | 0.498615 | 0 | 0 | 0 | 0 | 0 | 0 | 4,482 | 0.318346 |
b75a00768c2cceed8ca46774029ad378bc7cc2e6 | 1,180 | py | Python | workflow/pnmlpy/pmnl_model.py | SODALITE-EU/verification | 584e3c61bc20e65944e34b875eb5ed0ec02d6fa9 | [
"Apache-2.0"
] | null | null | null | workflow/pnmlpy/pmnl_model.py | SODALITE-EU/verification | 584e3c61bc20e65944e34b875eb5ed0ec02d6fa9 | [
"Apache-2.0"
] | 2 | 2020-03-30T12:02:32.000Z | 2021-04-20T19:09:25.000Z | workflow/pnmlpy/pmnl_model.py | SODALITE-EU/verification | 584e3c61bc20e65944e34b875eb5ed0ec02d6fa9 | [
"Apache-2.0"
] | null | null | null | from xml.dom import minidom
from xml.etree import ElementTree
from xml.etree.cElementTree import Element, SubElement, ElementTree, tostring
class PNMLModelGenerator:
def generate(self, tasks):
top = Element('pnml')
child = SubElement(top, 'net',
attrib={'id': "net1", 't... | 31.891892 | 115 | 0.582203 | 811 | 0.687288 | 0 | 0 | 0 | 0 | 0 | 0 | 221 | 0.187288 |
b75be5ebe9cb0ad6772b99405564c425be4f2dda | 969 | py | Python | examples/truss/truss_01.py | ofgod2/Analisis-matricial-nusa-python | 7cea329ba00449b97711a0c67725053a0d194335 | [
"MIT"
] | 92 | 2016-11-14T01:39:55.000Z | 2022-03-27T17:23:41.000Z | examples/truss/truss_01.py | ofgod2/Analisis-matricial-nusa-python | 7cea329ba00449b97711a0c67725053a0d194335 | [
"MIT"
] | 1 | 2017-11-30T05:04:02.000Z | 2018-08-29T04:31:39.000Z | examples/truss/truss_01.py | ofgod2/Analisis-matricial-nusa-python | 7cea329ba00449b97711a0c67725053a0d194335 | [
"MIT"
] | 31 | 2017-05-17T18:50:18.000Z | 2022-03-12T03:08:00.000Z | # -*- coding: utf-8 -*-
# ***********************************
# Author: Pedro Jorge De Los Santos
# E-mail: [email protected]
# Blog: numython.github.io
# License: MIT License
# ***********************************
from nusa import *
"""
Logan, D. (2007). A first course in the finite element analysis.
... | 21.065217 | 64 | 0.585139 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 454 | 0.468524 |
b75dd73022d3840c6328953902299b38ebc5ba18 | 2,919 | py | Python | Profiles/Mahmoud Higazy/logistic_regression.py | AhmedHani/FCIS-Machine-Learning-2017 | f241d989fdccfabfe351cd9c01f5de4da8df6ef3 | [
"Apache-2.0"
] | 13 | 2017-07-02T06:45:46.000Z | 2020-12-26T16:35:24.000Z | Profiles/Mahmoud Higazy/logistic_regression.py | AhmedHani/FCIS-Machine-Learning-2017 | f241d989fdccfabfe351cd9c01f5de4da8df6ef3 | [
"Apache-2.0"
] | 4 | 2017-07-22T00:09:41.000Z | 2017-12-15T15:54:33.000Z | Profiles/Mahmoud Higazy/logistic_regression.py | AhmedHani/FCIS-Machine-Learning-2017 | f241d989fdccfabfe351cd9c01f5de4da8df6ef3 | [
"Apache-2.0"
] | 25 | 2017-07-01T23:07:08.000Z | 2019-01-24T09:45:08.000Z | from data_reader.reader import CsvReader
from util import *
import numpy as np
import matplotlib.pyplot as plt
class LogisticRegression(object):
def __init__(self, learning_rate=0.01, epochs=50):
self.__epochs= epochs
self.__learning_rate = learning_rate
def fit(self, X, y):
self.w_ =... | 34.341176 | 148 | 0.656732 | 1,477 | 0.505995 | 0 | 0 | 0 | 0 | 0 | 0 | 410 | 0.140459 |
b75eb4207857101d04d38eb0f52b4294fd616690 | 1,413 | py | Python | wavefront_reader/reading/readobjfile.py | SimLeek/wavefront_reader | 4504f5b6185a03fcdd1722dbea660f7af35b8b8c | [
"MIT"
] | null | null | null | wavefront_reader/reading/readobjfile.py | SimLeek/wavefront_reader | 4504f5b6185a03fcdd1722dbea660f7af35b8b8c | [
"MIT"
] | null | null | null | wavefront_reader/reading/readobjfile.py | SimLeek/wavefront_reader | 4504f5b6185a03fcdd1722dbea660f7af35b8b8c | [
"MIT"
] | null | null | null | from wavefront_reader.wavefront_classes.objfile import ObjFile
from .readface import read_face
def read_objfile(fname):
"""Takes .obj filename and return an ObjFile class."""
obj_file = ObjFile()
with open(fname) as f:
lines = f.read().splitlines()
if 'OBJ' not in lines[0]:
raise Valu... | 39.25 | 107 | 0.573248 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 218 | 0.154282 |
b760116d8d8fe2d046e6af340b2d6bd9cb6fc8e2 | 157 | py | Python | constants.py | Guedelho/snake-ai | 176db202aaec76ff5c7cac6cc9d7a7bc46ff2b16 | [
"MIT"
] | null | null | null | constants.py | Guedelho/snake-ai | 176db202aaec76ff5c7cac6cc9d7a7bc46ff2b16 | [
"MIT"
] | null | null | null | constants.py | Guedelho/snake-ai | 176db202aaec76ff5c7cac6cc9d7a7bc46ff2b16 | [
"MIT"
] | null | null | null | # Directions
UP = 'UP'
DOWN = 'DOWN'
LEFT = 'LEFT'
RIGHT = 'RIGHT'
# Colors
RED = (255, 0, 0)
BLACK = (0, 0, 0)
GREEN = (0, 255, 0)
WHITE = (255, 255, 255)
| 13.083333 | 23 | 0.547771 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 43 | 0.273885 |
b76026927b6eb058284eefad5002a87c72c21db0 | 520 | py | Python | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/openedx/core/djangoapps/video_pipeline/utils.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 3 | 2021-12-15T04:58:18.000Z | 2022-02-06T12:15:37.000Z | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/openedx/core/djangoapps/video_pipeline/utils.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | null | null | null | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/openedx/core/djangoapps/video_pipeline/utils.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 1 | 2019-01-02T14:38:50.000Z | 2019-01-02T14:38:50.000Z | """
Utils for video_pipeline app.
"""
from django.conf import settings
from edx_rest_api_client.client import OAuthAPIClient
def create_video_pipeline_api_client(api_client_id, api_client_secret):
"""
Returns an API client which can be used to make Video Pipeline API requests.
Arguments:
api_cli... | 28.888889 | 82 | 0.765385 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 269 | 0.517308 |
b76161b7b67049e769a1af4d2aa06f728082679c | 2,695 | py | Python | run.py | Galaxy-SynBioCAD/extractTaxonomy | da3a1da443909dbefe143a3b7de66905c43eaf82 | [
"MIT"
] | null | null | null | run.py | Galaxy-SynBioCAD/extractTaxonomy | da3a1da443909dbefe143a3b7de66905c43eaf82 | [
"MIT"
] | null | null | null | run.py | Galaxy-SynBioCAD/extractTaxonomy | da3a1da443909dbefe143a3b7de66905c43eaf82 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
Created on March 18 2020
@author: Melchior du Lac
@description: Extract the taxonomy ID from an SBML file
"""
import argparse
import tempfile
import os
import logging
import shutil
import docker
def main(inputfile, output):
"""Call the extractTaxonomy docker to return the JSON file
... | 35 | 127 | 0.565121 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 813 | 0.30167 |
b761fb951040af2347c2dd2aa478c82dca9ff08e | 10,460 | py | Python | src/ebay_rest/api/buy_browse/models/refinement.py | matecsaj/ebay_rest | dd23236f39e05636eff222f99df1e3699ce47d4a | [
"MIT"
] | 3 | 2021-12-12T04:28:03.000Z | 2022-03-10T03:29:18.000Z | src/ebay_rest/api/buy_browse/models/refinement.py | jdavv/ebay_rest | 20fc88c6aefdae9ab90f9c1330e79abddcd750cd | [
"MIT"
] | 33 | 2021-06-16T20:44:36.000Z | 2022-03-30T14:55:06.000Z | src/ebay_rest/api/buy_browse/models/refinement.py | jdavv/ebay_rest | 20fc88c6aefdae9ab90f9c1330e79abddcd750cd | [
"MIT"
] | 7 | 2021-06-03T09:30:23.000Z | 2022-03-08T19:51:33.000Z | # coding: utf-8
"""
Browse API
<p>The Browse API has the following resources:</p> <ul> <li><b> item_summary: </b> Lets shoppers search for specific items by keyword, GTIN, category, charity, product, or item aspects and refine the results by using filters, such as aspects, compatibility, and fields values.<... | 46.488889 | 2,332 | 0.67782 | 7,924 | 0.757553 | 0 | 0 | 4,221 | 0.403537 | 0 | 0 | 6,558 | 0.62696 |
b76571e31217da708c1ce0ba259ecc1d18b070d9 | 1,878 | py | Python | tests/dataio_tests/test_import_data_filter_empty_directories.py | cdeitrick/Lolipop | 5b87b00a2c7ccbeeb3876bddb32e54aedf6bdf6d | [
"MIT"
] | 6 | 2020-04-18T15:43:19.000Z | 2022-02-19T18:43:23.000Z | tests/dataio_tests/test_import_data_filter_empty_directories.py | cdeitrick/Lolipop | 5b87b00a2c7ccbeeb3876bddb32e54aedf6bdf6d | [
"MIT"
] | 5 | 2020-05-04T16:09:03.000Z | 2020-10-13T03:52:56.000Z | tests/dataio_tests/test_import_data_filter_empty_directories.py | cdeitrick/muller_diagrams | 5b87b00a2c7ccbeeb3876bddb32e54aedf6bdf6d | [
"MIT"
] | 3 | 2020-03-23T17:12:56.000Z | 2020-07-24T22:22:12.000Z | from pathlib import Path
import pandas
from muller.dataio import import_tables
from loguru import logger
DATA_FOLDER = Path(__file__).parent.parent / "data"
def test_filter_empty_trajectories():
input_column_0 = ['genotype-1', 'genotype-2', 'genotype-3', 'genotype-4', 'genotype-5', 'genotype-6']
input_column_1 = [... | 33.535714 | 102 | 0.746006 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 264 | 0.140575 |
b765d8a9e197945a8d8e649b5d2aab25a4ba41c1 | 1,548 | py | Python | posthog/apps.py | adamb70/posthog | 54ae8f0e70092f86b4aefbd93b56680dbd28b1c5 | [
"MIT"
] | null | null | null | posthog/apps.py | adamb70/posthog | 54ae8f0e70092f86b4aefbd93b56680dbd28b1c5 | [
"MIT"
] | null | null | null | posthog/apps.py | adamb70/posthog | 54ae8f0e70092f86b4aefbd93b56680dbd28b1c5 | [
"MIT"
] | null | null | null | import os
import sys
import posthoganalytics
from django.apps import AppConfig
from django.conf import settings
from posthog.utils import get_git_branch, get_git_commit, get_machine_id
from posthog.version import VERSION
class PostHogConfig(AppConfig):
name = "posthog"
verbose_name = "PostHog"
def read... | 34.4 | 111 | 0.628553 | 1,322 | 0.854005 | 0 | 0 | 0 | 0 | 0 | 0 | 414 | 0.267442 |
b765edd3d7064dd1a82224294d673c2cee6bca1a | 836 | py | Python | src/task_timer.py | dlb-rl/pulse-rl | ebe78d2286b2199d18b86941fbc9990e0d5c354a | [
"MIT"
] | 4 | 2021-12-06T09:19:14.000Z | 2022-01-31T13:58:06.000Z | src/task_timer.py | dlb-rl/pulse-rl | ebe78d2286b2199d18b86941fbc9990e0d5c354a | [
"MIT"
] | null | null | null | src/task_timer.py | dlb-rl/pulse-rl | ebe78d2286b2199d18b86941fbc9990e0d5c354a | [
"MIT"
] | null | null | null | import os
import json
import time
from datetime import timedelta
class TaskTimer:
def __init__(self):
self.time_performance = {}
self.start_times = {}
def start(self, task):
self.start_times[task] = time.time()
print('--- [{}] Start "{}"'.format(time.ctime(self.start_times[ta... | 26.967742 | 85 | 0.574163 | 768 | 0.91866 | 0 | 0 | 0 | 0 | 0 | 0 | 80 | 0.095694 |
b7660ef0961ba8b4931477e766e7019f01819220 | 8,718 | py | Python | tasks-deploy/terminal/check.py | chankruze/qctf-school-2018 | 1e732cf264ee0a94bc2fc1fd8cf3a20660d57605 | [
"MIT"
] | null | null | null | tasks-deploy/terminal/check.py | chankruze/qctf-school-2018 | 1e732cf264ee0a94bc2fc1fd8cf3a20660d57605 | [
"MIT"
] | null | null | null | tasks-deploy/terminal/check.py | chankruze/qctf-school-2018 | 1e732cf264ee0a94bc2fc1fd8cf3a20660d57605 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
flags = ['QCTF{2a5576bc51a5c3feb82c96fe80d3a520}', 'QCTF{eb2ddbf0e318812ede843e8ecec6144f}', 'QCTF{5cdf65c6069a6b815352c3f1b4d09a56}', 'QCTF{69d7b7deb23746b8bd18b22f3eb92b50}', 'QCTF{44e37938c0bc05393b5b33a70c5a70db}', 'QCTF{3b37a953391e38ce0b8e168e9eaa6ec5}', 'QCTF{ee2848cb73236007d36cb5ae75c4... | 670.615385 | 8,408 | 0.848704 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8,022 | 0.920165 |
b76732831186e479ef5311c8854a1d2a5b3efda3 | 18,186 | py | Python | bioshareX/api/views.py | amschaal/bioshare | 7ac5da6874f70605ded8757c46fd9629d2d3d18b | [
"MIT"
] | 7 | 2015-12-10T23:23:53.000Z | 2018-08-22T11:00:28.000Z | bioshareX/api/views.py | amschaal/bioshare | 7ac5da6874f70605ded8757c46fd9629d2d3d18b | [
"MIT"
] | 61 | 2015-12-11T01:26:26.000Z | 2021-10-05T00:25:20.000Z | bioshareX/api/views.py | amschaal/bioshare | 7ac5da6874f70605ded8757c46fd9629d2d3d18b | [
"MIT"
] | 2 | 2019-05-31T16:33:37.000Z | 2021-05-03T20:51:25.000Z | # Create your views here.
from django.core.urlresolvers import reverse
from django.http.response import JsonResponse, HttpResponse
from settings.settings import AUTHORIZED_KEYS_FILE, SITE_URL
from bioshareX.models import Share, SSHKey, MetaData, Tag
from bioshareX.forms import MetaDataForm, json_form_validate
from guar... | 47.11399 | 298 | 0.651875 | 4,662 | 0.256351 | 0 | 0 | 13,939 | 0.766469 | 0 | 0 | 3,739 | 0.205598 |
b769a2ddbb714e86c922fd616f0acb57b564206d | 5,192 | py | Python | db_query.py | UiOHive/FinseDashboard | 14184fbc425e87a4b9a13b3a9b31159b181cf357 | [
"MIT"
] | null | null | null | db_query.py | UiOHive/FinseDashboard | 14184fbc425e87a4b9a13b3a9b31159b181cf357 | [
"MIT"
] | null | null | null | db_query.py | UiOHive/FinseDashboard | 14184fbc425e87a4b9a13b3a9b31159b181cf357 | [
"MIT"
] | null | null | null | import datetime
import os, sys
import pprint
import requests
from pandas.io.json import json_normalize
import pandas as pd
URL = 'https://wsn.latice.eu/api/query/v2/'
#URL = 'http://localhost:8000/wsn/api/query/v2/'
#TOKEN = os.getenv('WSN_TOKEN')
TOKEN = os.getenv('WSN_TOKEN')
path = os.getcwd()
def query(
limi... | 28.217391 | 125 | 0.573575 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,817 | 0.349961 |
b76bc1e49faa136f8b812dcedd6dc878d0d8aa05 | 4,716 | py | Python | src/olympia/reviews/tests/test_models.py | leplatrem/addons-server | 8b5ebda6f33194aa9fce12c0453574e7f850e6ad | [
"BSD-3-Clause"
] | null | null | null | src/olympia/reviews/tests/test_models.py | leplatrem/addons-server | 8b5ebda6f33194aa9fce12c0453574e7f850e6ad | [
"BSD-3-Clause"
] | null | null | null | src/olympia/reviews/tests/test_models.py | leplatrem/addons-server | 8b5ebda6f33194aa9fce12c0453574e7f850e6ad | [
"BSD-3-Clause"
] | null | null | null | from django.utils import translation
from olympia import amo
from olympia.amo.tests import TestCase, ESTestCase
from olympia.addons.models import Addon
from olympia.reviews import tasks
from olympia.reviews.models import (
check_spam, GroupedRating, Review, ReviewFlag, Spam)
from olympia.users.models import UserPr... | 31.44 | 78 | 0.636556 | 4,378 | 0.928329 | 0 | 0 | 0 | 0 | 0 | 0 | 637 | 0.135072 |
b76c4833b7dafb63e3cda3a938dba6519b8c5061 | 1,544 | py | Python | snpy/spline2/__init__.py | emirkmo/snpy | 2a0153c84477ba8a30310d7dbca3d5a8f24de3c6 | [
"MIT"
] | 6 | 2019-01-14T19:40:45.000Z | 2021-06-05T12:19:39.000Z | snpy/spline2/__init__.py | emirkmo/snpy | 2a0153c84477ba8a30310d7dbca3d5a8f24de3c6 | [
"MIT"
] | 3 | 2017-04-25T20:06:22.000Z | 2021-06-09T20:46:41.000Z | snpy/spline2/__init__.py | emirkmo/snpy | 2a0153c84477ba8a30310d7dbca3d5a8f24de3c6 | [
"MIT"
] | 8 | 2017-04-25T19:57:57.000Z | 2021-11-12T11:54:19.000Z | ''' Spline2.py: wrapper for B. Thijsse et al.'s hyper-spline routines.
Yet another spline interpolation routine. The problem: given a set of
experimental data with noise, find the spline with the optimal number of
knots.
Solution : They use the usual kind of routines to determine least-squares
splines ... | 49.806452 | 74 | 0.687824 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,520 | 0.984456 |
b76e06eb55845d82a11e8d62864a8001b125af43 | 703 | py | Python | halo_app/infra/cache.py | halo-framework/halo-app | 98e057b2f433d97d903589ac75a6c2544174bac8 | [
"MIT"
] | null | null | null | halo_app/infra/cache.py | halo-framework/halo-app | 98e057b2f433d97d903589ac75a6c2544174bac8 | [
"MIT"
] | null | null | null | halo_app/infra/cache.py | halo-framework/halo-app | 98e057b2f433d97d903589ac75a6c2544174bac8 | [
"MIT"
] | null | null | null | from __future__ import annotations
import elasticache_auto_discovery
from pymemcache.client.hash import HashClient
# elasticache settings
elasticache_config_endpoint = "your-elasticache-cluster-endpoint:port"
nodes = elasticache_auto_discovery.discover(elasticache_config_endpoint)
nodes = map(lambda x: (x[1], int(x[2... | 25.107143 | 72 | 0.752489 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 229 | 0.325747 |
b76e3c3a78b500e4bd43645ac8426138d20f7491 | 659 | py | Python | uniclass_to_nf_ea_com_source/b_code/migrators/uniclass_raw_to_domain/evolve/evolve_stage_4/domain_table_data_processor/parent_code_column_adder.py | boro-alpha/uniclass_to_nf_ea_com | 753e97467ce53c25bc86341b915489c2eeeb3f49 | [
"MIT"
] | 2 | 2021-08-09T14:40:04.000Z | 2022-03-13T22:22:19.000Z | uniclass_to_nf_ea_com_source/b_code/migrators/uniclass_raw_to_domain/evolve/evolve_stage_4/domain_table_data_processor/parent_code_column_adder.py | boro-alpha/uniclass_to_nf_ea_com | 753e97467ce53c25bc86341b915489c2eeeb3f49 | [
"MIT"
] | null | null | null | uniclass_to_nf_ea_com_source/b_code/migrators/uniclass_raw_to_domain/evolve/evolve_stage_4/domain_table_data_processor/parent_code_column_adder.py | boro-alpha/uniclass_to_nf_ea_com | 753e97467ce53c25bc86341b915489c2eeeb3f49 | [
"MIT"
] | null | null | null | import numpy as np
from uniclass_to_nf_ea_com_source.b_code.configurations.common_constants.uniclass_bclearer_constants import PARENT_CODE_COLUMN_NAME, \
UNICLASS2015_OBJECT_TABLE_NAME
def add_parent_code_column_to_uniclass_objects_table(
dictionary_of_dataframes: dict)\
-> dict:
uniclass_201... | 27.458333 | 134 | 0.752656 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b771162a3330c2472592fd5f42c757bebf6eb7a4 | 12,046 | py | Python | ext/ANTsPyNet/antspynet/utilities/mixture_density_utilities.py | tsmonteiro/fmri_proc | ee740cfa3c3a7ef8e1ee1ebd3b286a66712e0ec1 | [
"MIT"
] | 2 | 2021-11-16T10:00:33.000Z | 2021-12-13T02:57:40.000Z | ext/ANTsPyNet/antspynet/utilities/mixture_density_utilities.py | tsmonteiro/fmri_proc | ee740cfa3c3a7ef8e1ee1ebd3b286a66712e0ec1 | [
"MIT"
] | null | null | null | ext/ANTsPyNet/antspynet/utilities/mixture_density_utilities.py | tsmonteiro/fmri_proc | ee740cfa3c3a7ef8e1ee1ebd3b286a66712e0ec1 | [
"MIT"
] | 1 | 2021-12-13T02:57:27.000Z | 2021-12-13T02:57:27.000Z |
import keras.backend as K
from keras.engine import Layer, InputSpec
from keras.layers import Concatenate
from keras import initializers
import numpy as np
import tensorflow as tf
import tensorflow_probability as tfp
class MixtureDensityLayer(Layer):
"""
Layer for modeling arbitrary functions using neural ne... | 30.651399 | 94 | 0.628341 | 3,803 | 0.315706 | 0 | 0 | 0 | 0 | 0 | 0 | 3,438 | 0.285406 |
b7712de7485aecf34c54bcaa9134a8c65cfc7aa6 | 1,481 | py | Python | test.py | pnawalramka/cowin | f8ce6286d38fc0616a385ac0a971c8947f71348c | [
"MIT"
] | null | null | null | test.py | pnawalramka/cowin | f8ce6286d38fc0616a385ac0a971c8947f71348c | [
"MIT"
] | null | null | null | test.py | pnawalramka/cowin | f8ce6286d38fc0616a385ac0a971c8947f71348c | [
"MIT"
] | null | null | null | import json
from unittest import mock, TestCase
import check_availability
json_data = \
"""
{
"centers": [
{
"center_id": 1234,
"name": "District General Hostpital",
"name_l": "",
"address": "45 M G Road",
"address_l": "",
"state_name": "Maharashtra",
"state_name_l": ""... | 21.779412 | 63 | 0.532073 | 233 | 0.157326 | 0 | 0 | 205 | 0.13842 | 0 | 0 | 1,058 | 0.714382 |
b771d6a65389f019399e4105e7ca9559208f9b9c | 271 | py | Python | pycon_project/apps/proposals/admin.py | mitsuhiko/pycon | 73688a82080539a1c0d575cf3248f55fefb6b9ba | [
"BSD-3-Clause"
] | 1 | 2017-09-04T08:19:08.000Z | 2017-09-04T08:19:08.000Z | pycon_project/apps/proposals/admin.py | mitsuhiko/pycon | 73688a82080539a1c0d575cf3248f55fefb6b9ba | [
"BSD-3-Clause"
] | null | null | null | pycon_project/apps/proposals/admin.py | mitsuhiko/pycon | 73688a82080539a1c0d575cf3248f55fefb6b9ba | [
"BSD-3-Clause"
] | null | null | null | from django.contrib import admin
from proposals.models import Proposal, ProposalSessionType
admin.site.register(ProposalSessionType)
admin.site.register(Proposal,
list_display = ["title", "session_type", "audience_level", "cancelled", "extreme_pycon", "invited"]
) | 30.111111 | 103 | 0.785978 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 72 | 0.265683 |
b7720c668afa28b45e212a7ec9a950d7f27725bb | 12,805 | py | Python | cemc/mcmc/cov_reaction_crd.py | davidkleiven/WangLandau | 0b253dd98033c53560fe95c76f5e38257834bdf6 | [
"MIT"
] | 2 | 2022-02-10T00:38:53.000Z | 2022-03-17T22:08:40.000Z | cemc/mcmc/cov_reaction_crd.py | davidkleiven/CEMC | 0b253dd98033c53560fe95c76f5e38257834bdf6 | [
"MIT"
] | 30 | 2018-05-21T14:52:00.000Z | 2021-02-24T07:45:09.000Z | cemc/mcmc/cov_reaction_crd.py | davidkleiven/WangLandau | 0b253dd98033c53560fe95c76f5e38257834bdf6 | [
"MIT"
] | 3 | 2018-10-09T14:03:32.000Z | 2022-02-09T05:36:05.000Z | import sys
from cemc.mcmc import ReactionCrdInitializer, ReactionCrdRangeConstraint
import numpy as np
from itertools import product
import time
from numpy.linalg import inv
class CouldNotFindValidStateError(Exception):
pass
class CovarianceCrdInitializer(ReactionCrdInitializer):
"""Initializer for various ... | 38.338323 | 109 | 0.617415 | 12,617 | 0.985318 | 0 | 0 | 1,970 | 0.153846 | 0 | 0 | 4,385 | 0.342444 |
b77285d78a57f47f11411ca9d0f97da9f2e1f31c | 3,810 | py | Python | mysql/main.py | migachevalexey/BigQuery-integrations | d44546fbd3ff116e35ef90800ade2399e7266d9e | [
"MIT"
] | null | null | null | mysql/main.py | migachevalexey/BigQuery-integrations | d44546fbd3ff116e35ef90800ade2399e7266d9e | [
"MIT"
] | null | null | null | mysql/main.py | migachevalexey/BigQuery-integrations | d44546fbd3ff116e35ef90800ade2399e7266d9e | [
"MIT"
] | null | null | null | from google.cloud import bigquery
from mysql.connector import connect
import os
# writeable part of the filesystem for Cloud Functions instance
gc_write_dir = "/tmp"
def get_file_mysql(mysql_configuration):
"""
Querying data using Connector/Python via *host* MySQL server.
The function return the f... | 39.6875 | 193 | 0.664829 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,309 | 0.34357 |
b7728a4f2303e9918fa06fb3ec419829f1f73d23 | 2,413 | py | Python | arthur.carvalho/snakepro/game.py | LUDUSLab/stem-games | 347afa8b1511d76f8070fa69f27a49b57e551376 | [
"MIT"
] | 2 | 2021-01-24T01:04:34.000Z | 2021-05-06T16:25:53.000Z | arthur.carvalho/snakepro/game.py | LUDUSLab/stem-games | 347afa8b1511d76f8070fa69f27a49b57e551376 | [
"MIT"
] | null | null | null | arthur.carvalho/snakepro/game.py | LUDUSLab/stem-games | 347afa8b1511d76f8070fa69f27a49b57e551376 | [
"MIT"
] | 3 | 2021-01-26T21:35:43.000Z | 2021-05-06T16:06:47.000Z | from config import *
from fruit import *
from snakebody import *
from wall import *
def scoring(sp, ap):
global score
background_score = pygame.Surface(rectangle)
background_score.fill(color_gray)
score_text = score_font.render(f'Score: {score}', True, color_black, color_gray)
screen.blit(backg... | 25.135417 | 110 | 0.574803 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 113 | 0.04683 |
b7728d4f3bcf2508223268aec9d55c9c7919b6a4 | 821 | py | Python | preprocessing_pipeline/so/util/log.py | sotorrent/preprocessing-pipeline | d407a56760fa5ab975dc2043c89f478bd7c89e99 | [
"Apache-2.0"
] | null | null | null | preprocessing_pipeline/so/util/log.py | sotorrent/preprocessing-pipeline | d407a56760fa5ab975dc2043c89f478bd7c89e99 | [
"Apache-2.0"
] | null | null | null | preprocessing_pipeline/so/util/log.py | sotorrent/preprocessing-pipeline | d407a56760fa5ab975dc2043c89f478bd7c89e99 | [
"Apache-2.0"
] | 1 | 2021-09-22T16:07:18.000Z | 2021-09-22T16:07:18.000Z | import logging
from preprocessing_pipeline.so.util.config import LOG_LEVEL
def initialize_logger(logger_name):
"""
Configure a named logger (see https://stackoverflow.com/a/43794480).
"""
# create logger for module
module_logger = logging.getLogger(logger_name)
# set lowest log level the log... | 30.407407 | 96 | 0.742996 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 304 | 0.37028 |
b7734741f7d6376de18287d5b5965809361df47f | 995 | py | Python | utilityFunction/CommandFunc.py | The-Fragment/FragmentFembot | bca0027b423753eb162590e8fd440a2c1e65d133 | [
"MIT"
] | null | null | null | utilityFunction/CommandFunc.py | The-Fragment/FragmentFembot | bca0027b423753eb162590e8fd440a2c1e65d133 | [
"MIT"
] | 3 | 2021-03-23T04:58:47.000Z | 2021-04-02T02:40:54.000Z | utilityFunction/CommandFunc.py | The-Fragment/FragmentFembot | bca0027b423753eb162590e8fd440a2c1e65d133 | [
"MIT"
] | null | null | null | import random
# Ex. takes in 2d20 and outputs the string Rolling 2 d20
def roll_str(rolls):
numDice = rolls.split('d')[0]
diceVal = rolls.split('d')[1]
if numDice == '':
numDice = int(1)
return "Rolling %s d%s" % (numDice, diceVal)
# Ex. takes in 2d20 and outputs resultString = 11, 19 result... | 27.638889 | 78 | 0.582915 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 250 | 0.251256 |
b773ef3748302d9fb0e80bd06beb0fda6a677835 | 12,339 | py | Python | src/reviews/tests/test_forms.py | Talengi/phase | 60ff6f37778971ae356c5b2b20e0d174a8288bfe | [
"MIT"
] | 8 | 2016-01-29T11:53:40.000Z | 2020-03-02T22:42:02.000Z | src/reviews/tests/test_forms.py | Talengi/phase | 60ff6f37778971ae356c5b2b20e0d174a8288bfe | [
"MIT"
] | 289 | 2015-03-23T07:42:52.000Z | 2022-03-11T23:26:10.000Z | src/reviews/tests/test_forms.py | Talengi/phase | 60ff6f37778971ae356c5b2b20e0d174a8288bfe | [
"MIT"
] | 7 | 2015-12-08T09:03:20.000Z | 2020-05-11T15:36:51.000Z | # -*- coding: utf-8 -*-
import datetime
from django.test import TestCase
from django.contrib.contenttypes.models import ContentType
from accounts.factories import UserFactory
from categories.factories import CategoryFactory
from documents.factories import DocumentFactory
from default_documents.models import Contrac... | 34.275 | 86 | 0.630359 | 11,741 | 0.951536 | 0 | 0 | 0 | 0 | 0 | 0 | 1,630 | 0.132101 |
b77448adc21f21e754acd95d28d79c117e90042e | 2,814 | py | Python | WWW/pycopia/WWW/HTML5simple.py | kdart/pycopia | 1446fabaedf8c6bdd4ab1fc3f0ea731e0ef8da9d | [
"Apache-2.0"
] | 89 | 2015-03-26T11:25:20.000Z | 2022-01-12T06:25:14.000Z | WWW/pycopia/WWW/HTML5simple.py | kdart/pycopia | 1446fabaedf8c6bdd4ab1fc3f0ea731e0ef8da9d | [
"Apache-2.0"
] | 1 | 2015-07-05T03:27:43.000Z | 2015-07-11T06:21:20.000Z | WWW/pycopia/WWW/HTML5simple.py | kdart/pycopia | 1446fabaedf8c6bdd4ab1fc3f0ea731e0ef8da9d | [
"Apache-2.0"
] | 30 | 2015-04-30T01:35:54.000Z | 2022-01-12T06:19:49.000Z | #!/usr/bin/python2.7
# -*- coding: utf-8 -*-
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
# 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
... | 35.620253 | 90 | 0.678749 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,058 | 0.731343 |
b77490b49e8e303cfb2f69ab8e30192b9d37bd8f | 2,077 | py | Python | zairachem/reports/report.py | ersilia-os/ersilia-automl-chem | fabb1f05d17cff11ec0e084495eed4c0152f2f63 | [
"MIT"
] | null | null | null | zairachem/reports/report.py | ersilia-os/ersilia-automl-chem | fabb1f05d17cff11ec0e084495eed4c0152f2f63 | [
"MIT"
] | null | null | null | zairachem/reports/report.py | ersilia-os/ersilia-automl-chem | fabb1f05d17cff11ec0e084495eed4c0152f2f63 | [
"MIT"
] | null | null | null | from .plots import (
ActivesInactivesPlot,
ConfusionPlot,
RocCurvePlot,
ProjectionPlot,
RegressionPlotRaw,
HistogramPlotRaw,
RegressionPlotTransf,
HistogramPlotTransf,
Transformation,
IndividualEstimatorsAurocPlot,
InidvidualEstimatorsR2Plot,
)
from .. import ZairaBase
from ... | 28.847222 | 69 | 0.692826 | 1,723 | 0.829562 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b777765b36345a7cbdc249bcc3d7922fbe5e7398 | 2,198 | py | Python | tests/backend/configobj.py | edyan/python-anyconfig | d237909a6e4848737539b80951b710238c72052f | [
"MIT"
] | null | null | null | tests/backend/configobj.py | edyan/python-anyconfig | d237909a6e4848737539b80951b710238c72052f | [
"MIT"
] | null | null | null | tests/backend/configobj.py | edyan/python-anyconfig | d237909a6e4848737539b80951b710238c72052f | [
"MIT"
] | null | null | null | #
# Copyright (C) 2013 - 2017 Satoru SATOH <ssato @ redhat.com>
# License: MIT
#
# pylint: disable=missing-docstring,invalid-name,too-few-public-methods
# pylint: disable=ungrouped-imports
from __future__ import absolute_import
import anyconfig.backend.configobj as TT
import tests.backend.common as TBC
from anyconfig... | 27.135802 | 76 | 0.589172 | 314 | 0.142857 | 0 | 0 | 0 | 0 | 0 | 0 | 1,304 | 0.593267 |
b777b683adb530c1229387728fa21c1239e09fa6 | 23 | py | Python | backend/lorre/__init__.py | nhurman/Lorre | 9a19d00809bd3850d288c9ef1166da016d29b819 | [
"MIT"
] | null | null | null | backend/lorre/__init__.py | nhurman/Lorre | 9a19d00809bd3850d288c9ef1166da016d29b819 | [
"MIT"
] | null | null | null | backend/lorre/__init__.py | nhurman/Lorre | 9a19d00809bd3850d288c9ef1166da016d29b819 | [
"MIT"
] | null | null | null | __author__ = 'nhurman'
| 11.5 | 22 | 0.73913 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 0.391304 |
b778baead541bab3544aa4b5bfec40bbfb0e7118 | 1,794 | py | Python | tests/test_spider.py | aezhov/sw_downloader | 325f6fe98579dda4f98613e4513fc46c7bd962c7 | [
"MIT"
] | 1 | 2020-01-23T06:56:34.000Z | 2020-01-23T06:56:34.000Z | tests/test_spider.py | aezhov/sw_downloader | 325f6fe98579dda4f98613e4513fc46c7bd962c7 | [
"MIT"
] | null | null | null | tests/test_spider.py | aezhov/sw_downloader | 325f6fe98579dda4f98613e4513fc46c7bd962c7 | [
"MIT"
] | 2 | 2020-01-23T06:56:36.000Z | 2020-01-24T05:34:25.000Z | import requests
from scrapy.http import HtmlResponse
from sw_downloader.sw_downloader.spiders.smashing_magazine \
import SmashingMagazineSpider
class TestSmashingMagazineSpider:
def test_ruleset(self):
url = ('https://www.smashingmagazine.com/category/wallpapers')
response = requests.get(url... | 39.866667 | 70 | 0.628763 | 1,642 | 0.915273 | 0 | 0 | 0 | 0 | 0 | 0 | 277 | 0.154404 |
b778ede17d0ff72b747e93fc5f260c19e384862d | 160 | py | Python | 1_PROGI/Exe 5.py | Julymusso/IFES | 939277c375dacc7750705c5593537d80ab4cbc0e | [
"MIT"
] | null | null | null | 1_PROGI/Exe 5.py | Julymusso/IFES | 939277c375dacc7750705c5593537d80ab4cbc0e | [
"MIT"
] | null | null | null | 1_PROGI/Exe 5.py | Julymusso/IFES | 939277c375dacc7750705c5593537d80ab4cbc0e | [
"MIT"
] | null | null | null | #var
#num, media, i: inteiro
media=0
for i in range(1,11,1):
num=int(input("Digite um número: "))
media = media+num
media=media/i
print (media) | 17.777778 | 40 | 0.61875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 48 | 0.298137 |
b7794cab91544e360a3b3517961177ee512565ea | 4,289 | py | Python | rio/tasks.py | soasme/rio | e6b89634db8d3ad75ac7f7b25ddec5b19d4f66e2 | [
"MIT"
] | null | null | null | rio/tasks.py | soasme/rio | e6b89634db8d3ad75ac7f7b25ddec5b19d4f66e2 | [
"MIT"
] | 14 | 2016-04-14T04:18:41.000Z | 2016-05-12T03:46:37.000Z | rio/tasks.py | soasme/rio | e6b89634db8d3ad75ac7f7b25ddec5b19d4f66e2 | [
"MIT"
] | 1 | 2016-04-06T08:54:20.000Z | 2016-04-06T08:54:20.000Z | # -*- coding: utf-8 -*-
"""
rio.tasks
~~~~~~~~~~
Implement of rio tasks based on celery.
"""
from time import time
from celery import chord
from requests import ConnectionError
from celery.utils.log import get_task_logger
from rio.core import celery
from rio.core import sentry
from rio.utils.http import dispatch_w... | 26.312883 | 77 | 0.55211 | 0 | 0 | 0 | 0 | 2,024 | 0.471905 | 0 | 0 | 1,393 | 0.324784 |
b77a241d42c4accce70a300b51e344bbc1b51e81 | 2,932 | py | Python | security_app/createuserpoolgroup.py | jagalembu/chalice_cognito_multi_tenancy | b1a6569e716848adfd5b443239fca1ae883d4f4b | [
"MIT"
] | null | null | null | security_app/createuserpoolgroup.py | jagalembu/chalice_cognito_multi_tenancy | b1a6569e716848adfd5b443239fca1ae883d4f4b | [
"MIT"
] | null | null | null | security_app/createuserpoolgroup.py | jagalembu/chalice_cognito_multi_tenancy | b1a6569e716848adfd5b443239fca1ae883d4f4b | [
"MIT"
] | null | null | null | import os
import uuid
import json
import argparse
import boto3
USERPOOL = {
'env_var_poolid': 'APPUSERPOOLID',
'env_var_cognito_url': 'COGNITOJWKSURL',
'env_var_pool_client': 'APPCLIENTID',
}
def create_user_pool(pool_name, region, stage):
client = boto3.client('cognito-idp')
resp = client.creat... | 30.863158 | 104 | 0.645634 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 723 | 0.246589 |
b77c8918ea2f71cb1258eb1a156531c01f3b83b2 | 269 | py | Python | Chapter 07/hmac-md5.py | Prakshal2607/Effective-Python-Penetration-Testing | f49fedc172a1add45edb21f66f74746dfa9c944a | [
"MIT"
] | 346 | 2016-06-21T11:39:39.000Z | 2022-01-26T03:19:29.000Z | Chapter 07/hmac-md5.py | liceaga/Effective-Python-Penetration-Testing | 0b043885231662efd63402eec3c9cb413b9693e2 | [
"MIT"
] | 1 | 2016-06-21T11:44:42.000Z | 2016-11-17T05:10:08.000Z | Chapter 07/hmac-md5.py | liceaga/Effective-Python-Penetration-Testing | 0b043885231662efd63402eec3c9cb413b9693e2 | [
"MIT"
] | 210 | 2016-06-22T12:08:47.000Z | 2022-03-16T15:54:30.000Z | import hmac
hmac_md5 = hmac.new('secret-key')
f = open('sample-file.txt', 'rb')
try:
while True:
block = f.read(1024)
if not block:
break
hmac_md5.update(block)
finally:
f.close()
digest = hmac_md5.hexdigest()
print digest | 16.8125 | 33 | 0.598513 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 33 | 0.122677 |
b77cac8f40a35a229bb7b41f7b04619f55a2baf4 | 31,686 | py | Python | dingtalk/python/alibabacloud_dingtalk/alitrip_1_0/models.py | yndu13/dingtalk-sdk | 700fb7bb49c4d3167f84afc5fcb5e7aa5a09735f | [
"Apache-2.0"
] | null | null | null | dingtalk/python/alibabacloud_dingtalk/alitrip_1_0/models.py | yndu13/dingtalk-sdk | 700fb7bb49c4d3167f84afc5fcb5e7aa5a09735f | [
"Apache-2.0"
] | null | null | null | dingtalk/python/alibabacloud_dingtalk/alitrip_1_0/models.py | yndu13/dingtalk-sdk | 700fb7bb49c4d3167f84afc5fcb5e7aa5a09735f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# This file is auto-generated, don't edit it. Thanks.
from Tea.model import TeaModel
from typing import Dict, List
class AddCityCarApplyHeaders(TeaModel):
def __init__(
self,
common_headers: Dict[str, str] = None,
x_acs_dingtalk_access_token: str = None,
):
... | 33.636943 | 142 | 0.581424 | 32,704 | 0.994345 | 0 | 0 | 0 | 0 | 0 | 0 | 5,500 | 0.167224 |
b7800aafff5c8094f397d2e3b7573a73689dfdba | 560 | py | Python | src/while_exit.py | Alex9808/py101 | 18c585c1433e8ec6f5e4962e556a781e0c3c3cd5 | [
"MIT"
] | 25 | 2018-08-14T22:13:13.000Z | 2021-07-23T04:14:06.000Z | src/while_exit.py | Alex9808/py101 | 18c585c1433e8ec6f5e4962e556a781e0c3c3cd5 | [
"MIT"
] | 1 | 2021-05-21T23:46:42.000Z | 2021-05-21T23:46:42.000Z | src/while_exit.py | Alex9808/py101 | 18c585c1433e8ec6f5e4962e556a781e0c3c3cd5 | [
"MIT"
] | 34 | 2018-07-30T20:48:17.000Z | 2022-02-04T19:01:27.000Z | #!/usr/bin/env python
''' Este programa se repetirá 3 veces o hasta que se ingrese
la palabra "despedida" y desplegará sólo el número de intentos
fallidos hasta que cualquiera de los eventos ocurentradara. Al
ingresar la palabra "termina" el programa se detendrá.'''
entrada = ""
suma = 0
while su... | 29.473684 | 67 | 0.630357 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 364 | 0.644248 |
b78064bab0e579a79f199c581d29dfd0023d9a67 | 1,337 | py | Python | src/kong/db.py | paulgessinger/kong | b1e2ec0c18f432fa2419b2b0dc95ee1e391cf7a5 | [
"MIT"
] | 3 | 2020-02-14T09:23:56.000Z | 2020-08-24T16:19:00.000Z | src/kong/db.py | paulgessinger/kong | b1e2ec0c18f432fa2419b2b0dc95ee1e391cf7a5 | [
"MIT"
] | 159 | 2019-09-16T19:17:16.000Z | 2022-03-29T19:12:37.000Z | src/kong/db.py | paulgessinger/kong | b1e2ec0c18f432fa2419b2b0dc95ee1e391cf7a5 | [
"MIT"
] | null | null | null | """
Singleton database instance
"""
from typing import TYPE_CHECKING, Any, List, ContextManager, Tuple, Iterable
if not TYPE_CHECKING:
from playhouse.sqlite_ext import SqliteExtDatabase, AutoIncrementField
else: # pragma: no cover
class SqliteExtDatabase:
"""
Mypy stub for the not type-hinted... | 20.890625 | 86 | 0.449514 | 1,051 | 0.786088 | 0 | 0 | 0 | 0 | 0 | 0 | 533 | 0.398654 |
b7828d9ca80482a07e76866d18c12b99668834d3 | 2,582 | py | Python | selenium_wrapper/factory.py | dfeeley/selenium-wrapper | f69576802e7847d120a051a2902da5750b9c6203 | [
"MIT"
] | 1 | 2022-01-14T20:21:19.000Z | 2022-01-14T20:21:19.000Z | selenium_wrapper/factory.py | dfeeley/selenium-wrapper | f69576802e7847d120a051a2902da5750b9c6203 | [
"MIT"
] | null | null | null | selenium_wrapper/factory.py | dfeeley/selenium-wrapper | f69576802e7847d120a051a2902da5750b9c6203 | [
"MIT"
] | null | null | null | import os
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from selenium.webdriver.chrome.options import Options
from .driver import Driver
def remote(url, browser="chrome", **kwargs):
if browser != "chrome":
raise ValueError(f"Browser {browser... | 39.723077 | 84 | 0.703718 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 933 | 0.361348 |
b782afffa41a32debaad33cd5a697c066dc182f8 | 14,153 | py | Python | networking_cisco/tests/unit/saf/agent/vdp/test_lldpad.py | arvindsharma16/networking-cisco | 2f38c25742296f07ab80479c152504353da0a1d4 | [
"Apache-2.0"
] | null | null | null | networking_cisco/tests/unit/saf/agent/vdp/test_lldpad.py | arvindsharma16/networking-cisco | 2f38c25742296f07ab80479c152504353da0a1d4 | [
"Apache-2.0"
] | null | null | null | networking_cisco/tests/unit/saf/agent/vdp/test_lldpad.py | arvindsharma16/networking-cisco | 2f38c25742296f07ab80479c152504353da0a1d4 | [
"Apache-2.0"
] | 1 | 2020-08-31T22:53:38.000Z | 2020-08-31T22:53:38.000Z | # Copyrigh 2015 Cisco Systems.
# 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... | 50.366548 | 79 | 0.466191 | 13,122 | 0.927153 | 0 | 0 | 0 | 0 | 0 | 0 | 3,057 | 0.215997 |
b7836e4485ed6acdd7e26cba6a9e54fccf62bd20 | 15,656 | py | Python | py/prospect/viewer/cds.py | segasai/prospect | 0237fad5b04f5a982ba4178320e1ca5bb5fa408f | [
"BSD-3-Clause"
] | 4 | 2018-10-22T21:12:43.000Z | 2019-07-11T20:08:12.000Z | py/prospect/viewer/cds.py | segasai/prospect | 0237fad5b04f5a982ba4178320e1ca5bb5fa408f | [
"BSD-3-Clause"
] | 54 | 2019-12-07T08:24:53.000Z | 2022-02-25T10:17:59.000Z | py/prospect/viewer/cds.py | segasai/prospect | 0237fad5b04f5a982ba4178320e1ca5bb5fa408f | [
"BSD-3-Clause"
] | 5 | 2019-12-20T21:47:40.000Z | 2021-01-20T23:54:43.000Z | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
"""
===================
prospect.viewer.cds
===================
Class containing all bokeh's ColumnDataSource objects needed in viewer.py
"""
import numpy as np
from pkg_resources import resource_filename
import bokeh.plotting a... | 45.37971 | 135 | 0.551993 | 14,500 | 0.925985 | 0 | 0 | 0 | 0 | 0 | 0 | 3,780 | 0.241395 |
b785c28b83b4fcf0dd190a336d9e93908aec9ec2 | 4,865 | py | Python | tests/test_32_read_registration.py | jschlyter/oidcendpoint | 3192e6043f00b22809f63329893c50bedbdeafbc | [
"Apache-2.0"
] | null | null | null | tests/test_32_read_registration.py | jschlyter/oidcendpoint | 3192e6043f00b22809f63329893c50bedbdeafbc | [
"Apache-2.0"
] | null | null | null | tests/test_32_read_registration.py | jschlyter/oidcendpoint | 3192e6043f00b22809f63329893c50bedbdeafbc | [
"Apache-2.0"
] | null | null | null | # -*- coding: latin-1 -*-
import json
import pytest
from oidcendpoint.endpoint_context import EndpointContext
from oidcendpoint.oidc.authorization import Authorization
from oidcendpoint.oidc.read_registration import RegistrationRead
from oidcendpoint.oidc.registration import Registration
from oidcendpoint.oidc.token i... | 35.510949 | 87 | 0.567523 | 3,013 | 0.617545 | 0 | 0 | 1,881 | 0.38553 | 0 | 0 | 1,850 | 0.379176 |
b786deb138ef01a31f9f64e2908250e1c39d81e6 | 253 | py | Python | thippiproject/modelapp/admin.py | Anandgowda18/djangocomplete | c9eebe7834e404c73deca295289142a1e95ab573 | [
"Apache-2.0"
] | null | null | null | thippiproject/modelapp/admin.py | Anandgowda18/djangocomplete | c9eebe7834e404c73deca295289142a1e95ab573 | [
"Apache-2.0"
] | null | null | null | thippiproject/modelapp/admin.py | Anandgowda18/djangocomplete | c9eebe7834e404c73deca295289142a1e95ab573 | [
"Apache-2.0"
] | 1 | 2021-08-31T10:20:49.000Z | 2021-08-31T10:20:49.000Z | from django.contrib import admin
from modelapp.models import Project
# Register your models here.
class Projectadmin(admin.ModelAdmin):
list_display = ['startdate','enddate','name','assignedto','priority']
admin.site.register(Project,Projectadmin) | 31.625 | 73 | 0.786561 | 111 | 0.438735 | 0 | 0 | 0 | 0 | 0 | 0 | 76 | 0.300395 |
b786e3a7dfda3169fee4e233a099bad862bcb4ab | 621 | py | Python | 2013.6/2015.6.py | luisalvaradoar/olimpiada.ct | aea479116036abe1c9cca3b482fed61f275ed319 | [
"Apache-2.0"
] | null | null | null | 2013.6/2015.6.py | luisalvaradoar/olimpiada.ct | aea479116036abe1c9cca3b482fed61f275ed319 | [
"Apache-2.0"
] | null | null | null | 2013.6/2015.6.py | luisalvaradoar/olimpiada.ct | aea479116036abe1c9cca3b482fed61f275ed319 | [
"Apache-2.0"
] | null | null | null | def transaccion(retiro, saldo):
if retiro % 5 != 0:
return(saldo)
elif (saldo - retiro) < 0:
return(saldo)
elif saldo == retiro:
return(saldo)
else:
return(saldo - retiro - 0.5)
def main():
entrada = open("input.txt","r")
salida = open("output.txt","w")
T = ... | 19.40625 | 58 | 0.516908 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 56 | 0.090177 |
b78725b75722098cca7515b9adddc2dea857de17 | 538 | py | Python | hash.py | STR-Coding-Club/blockchain-demo | fae29a52d97c7595fa1e9d99527c4b034b721b8f | [
"MIT"
] | null | null | null | hash.py | STR-Coding-Club/blockchain-demo | fae29a52d97c7595fa1e9d99527c4b034b721b8f | [
"MIT"
] | null | null | null | hash.py | STR-Coding-Club/blockchain-demo | fae29a52d97c7595fa1e9d99527c4b034b721b8f | [
"MIT"
] | null | null | null | import hashlib, json
# def hash(to_hash):
# h = hashlib.md5()
# h.update(bytes(str(to_hash), 'utf-8'))
# return h.hexdigest()
def hash(to_hash, proof_of_work):
s = ''.join(str(_) for _ in (to_hash[:2])) #Add block number and previous hash to string
s += ''.join(str(_) for _ in (to_hash[2])) #Add l... | 24.454545 | 92 | 0.60223 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 237 | 0.44052 |
b78782c19f15096aec39ba8d508066aa4591ae37 | 1,008 | py | Python | covid-modeling-master/generate_ma_csv.py | rdkap42/caedus-covid | f64a833bdf386708fcb9394f94026c48f8d474ee | [
"MIT"
] | 10 | 2020-03-17T21:21:50.000Z | 2020-04-30T02:30:47.000Z | covid-modeling-master/generate_ma_csv.py | rdkap42/caedus-covid | f64a833bdf386708fcb9394f94026c48f8d474ee | [
"MIT"
] | 5 | 2020-03-17T04:39:03.000Z | 2021-04-30T21:11:14.000Z | covid-modeling-master/generate_ma_csv.py | rdkap42/caedus-covid | f64a833bdf386708fcb9394f94026c48f8d474ee | [
"MIT"
] | null | null | null | import logging
import time
import numpy as np
from eda import ma_data, tx_data
from sir_fitting_us import seir_experiment, make_csv_from_tx_traj
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
logger.info("Fitting model.")
# initial values taken from previous fit, used to seed MH sampler efficie... | 31.5 | 82 | 0.727183 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 374 | 0.371032 |
b7886dbd5b5bd5591584039afc3ce54cfdba530a | 6,877 | py | Python | For_Simulator/learning/plot_gmm_nd.py | a-taniguchi/CSL-BGM | 64bd803289e55b76a219c02ea040325a8a5b949e | [
"MIT"
] | 1 | 2018-09-27T12:19:05.000Z | 2018-09-27T12:19:05.000Z | learning/plot_gmm_nd.py | neuronalX/CSL-BGM | 2fc66611928783c9b65c675ec84d9c06e0b6cd8a | [
"MIT"
] | null | null | null | learning/plot_gmm_nd.py | neuronalX/CSL-BGM | 2fc66611928783c9b65c675ec84d9c06e0b6cd8a | [
"MIT"
] | 1 | 2018-09-27T12:19:21.000Z | 2018-09-27T12:19:21.000Z | #coding:utf-8
#gaussian plot (position category)
#Akira Taniguchi 2016/06/16
import itertools
import numpy as np
from scipy import linalg
import matplotlib.pyplot as plt
import matplotlib as mpl
from sklearn import mixture
from __init__ import *
from numpy.random import multinomial,uniform,dirichlet
from sci... | 38.418994 | 757 | 0.574378 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,198 | 0.601864 |
b789e2f11f57608cb00f55b63d916cf77099aa18 | 338 | py | Python | condiment/tests/test_simple.py | WeilerWebServices/Kivy | 54e3438156eb0c853790fd3cecc593f09123f892 | [
"MIT"
] | 3 | 2020-09-13T09:55:02.000Z | 2021-01-23T11:13:59.000Z | condiment/tests/test_simple.py | WeilerWebServices/Kivy | 54e3438156eb0c853790fd3cecc593f09123f892 | [
"MIT"
] | 2 | 2018-03-16T22:01:12.000Z | 2020-01-13T10:33:22.000Z | condiment/tests/test_simple.py | WeilerWebServices/Kivy | 54e3438156eb0c853790fd3cecc593f09123f892 | [
"MIT"
] | 2 | 2015-04-26T15:31:40.000Z | 2017-09-12T12:36:14.000Z | #exclude
import condiment; condiment.install()
#endexclude
if WITH_TIMEBOMB:
timebomb = int(WITH_TIMEBOMB)
print 'timebomb feature is activated, and set to', timebomb
if WITH_INAPP_PURCHASE:
print 'inapp purchase feature is activated'
if WITH_TIMEBOMB and WITH_INAPP_PURCHASE:
print 'both features hav... | 24.142857 | 63 | 0.775148 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 134 | 0.39645 |
b78d491f7594796538d954c219bf7266a1779707 | 1,096 | py | Python | tests/init.py | touqir14/Emergent | 0782e1304702f3c95092953ce5da1d8ed69bbe6f | [
"MIT"
] | null | null | null | tests/init.py | touqir14/Emergent | 0782e1304702f3c95092953ce5da1d8ed69bbe6f | [
"MIT"
] | null | null | null | tests/init.py | touqir14/Emergent | 0782e1304702f3c95092953ce5da1d8ed69bbe6f | [
"MIT"
] | null | null | null | import pathlib
import os
import sys
from multiprocessing import resource_tracker
def modify_resource_tracker():
# See discussion: https://bugs.python.org/issue39959
# See source code: https://github.com/python/cpython/blob/master/Lib/multiprocessing/resource_tracker.py
rt = resource_tracker._resource_tracker
def... | 27.4 | 106 | 0.718978 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 304 | 0.277372 |
b78f243f121a8fb7c7eb83f7fd3d5745810817b9 | 12,586 | py | Python | data-processor/modules/wikia_handler.py | stephanietuerk/art-history-jobs | d10718ce7c8eb591cea9808945d01a2273425a58 | [
"MIT"
] | null | null | null | data-processor/modules/wikia_handler.py | stephanietuerk/art-history-jobs | d10718ce7c8eb591cea9808945d01a2273425a58 | [
"MIT"
] | null | null | null | data-processor/modules/wikia_handler.py | stephanietuerk/art-history-jobs | d10718ce7c8eb591cea9808945d01a2273425a58 | [
"MIT"
] | null | null | null | import csv
import re
import unicodedata
import bs4
import wikia
from modules import utils
from modules.config import Config
class WikiaHandler():
def __init__(self):
config = Config()
self.scraping_config = config.get_scraping_config()
self.parsing_config = config.get_parsing_config()
... | 44.161404 | 245 | 0.571667 | 12,443 | 0.988638 | 0 | 0 | 0 | 0 | 0 | 0 | 1,473 | 0.117035 |
b78f91bde4f8867fdadaaee058845f1ee62f598c | 3,949 | py | Python | ucsmsdk/mometa/cimcvmedia/CimcvmediaExtMgmtRuleEntry.py | anoop1984/python_sdk | c4a226bad5e10ad233eda62bc8f6d66a5a82b651 | [
"Apache-2.0"
] | null | null | null | ucsmsdk/mometa/cimcvmedia/CimcvmediaExtMgmtRuleEntry.py | anoop1984/python_sdk | c4a226bad5e10ad233eda62bc8f6d66a5a82b651 | [
"Apache-2.0"
] | null | null | null | ucsmsdk/mometa/cimcvmedia/CimcvmediaExtMgmtRuleEntry.py | anoop1984/python_sdk | c4a226bad5e10ad233eda62bc8f6d66a5a82b651 | [
"Apache-2.0"
] | null | null | null | """This module contains the general information for CimcvmediaExtMgmtRuleEntry ManagedObject."""
import sys, os
from ...ucsmo import ManagedObject
from ...ucscoremeta import UcsVersion, MoPropertyMeta, MoMeta
from ...ucsmeta import VersionMeta
class CimcvmediaExtMgmtRuleEntryConsts():
MOUNT_PROTOCOL_CIFS = "cifs... | 58.940299 | 248 | 0.66042 | 3,697 | 0.936186 | 0 | 0 | 0 | 0 | 0 | 0 | 1,519 | 0.384654 |
b78fac6287214282885abd8ffbebb076e0bdd37a | 3,672 | py | Python | paddlescience/pde/pde_navier_stokes.py | juneweng/PaddleScience | f30ce908b6fbec2403936007d12d9701f74fd00e | [
"Apache-2.0"
] | null | null | null | paddlescience/pde/pde_navier_stokes.py | juneweng/PaddleScience | f30ce908b6fbec2403936007d12d9701f74fd00e | [
"Apache-2.0"
] | null | null | null | paddlescience/pde/pde_navier_stokes.py | juneweng/PaddleScience | f30ce908b6fbec2403936007d12d9701f74fd00e | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 40.351648 | 223 | 0.510349 | 3,032 | 0.825708 | 0 | 0 | 0 | 0 | 0 | 0 | 1,924 | 0.523965 |
b7907344916d1e840e9f663cfdac58234f01e739 | 327 | py | Python | tests/strict/it_mod_double_fun.py | Euromance/pycopy | 540cfcc52d17667a5f6b2a176427cc031029b78f | [
"MIT"
] | 663 | 2018-12-30T00:17:59.000Z | 2022-03-14T05:03:41.000Z | tests/strict/it_mod_double_fun.py | Euromance/pycopy | 540cfcc52d17667a5f6b2a176427cc031029b78f | [
"MIT"
] | 41 | 2019-06-06T08:31:19.000Z | 2022-02-13T16:53:41.000Z | tests/strict/it_mod_double_fun.py | Euromance/pycopy | 540cfcc52d17667a5f6b2a176427cc031029b78f | [
"MIT"
] | 60 | 2019-06-01T04:25:00.000Z | 2022-02-25T01:47:31.000Z | import mod
def foo():
return 1
try:
mod.foo = foo
except RuntimeError:
print("RuntimeError1")
print(mod.foo())
try:
mod.foo = 1
except RuntimeError:
print("RuntimeError2")
print(mod.foo)
try:
mod.foo = 2
except RuntimeError:
print("RuntimeError3")
print(mod.foo)
def __main__():
... | 10.21875 | 26 | 0.642202 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.137615 |
b791735533ee827f9ea58cc60b007fcd8bb18dbd | 2,295 | py | Python | LungCancer.py | SpiroGanas/Lung-Cancer-Machine-Learning | 4e38b3df9b560194f67ab03e9aaefad6c84216db | [
"MIT"
] | 1 | 2019-04-28T02:25:32.000Z | 2019-04-28T02:25:32.000Z | LungCancer.py | SpiroGanas/Lung-Cancer-Machine-Learning | 4e38b3df9b560194f67ab03e9aaefad6c84216db | [
"MIT"
] | null | null | null | LungCancer.py | SpiroGanas/Lung-Cancer-Machine-Learning | 4e38b3df9b560194f67ab03e9aaefad6c84216db | [
"MIT"
] | null | null | null | # Spiro Ganas
# 9/27/17
#
# Python 3 script to
######### NOTES ########################################
# 1. Each "slice" is a 512x512 image, stored in a single .dcm file.
# 2. A 3-dimensional CT Scan consists of between 94 and 541 slices (according to the Stage 1 data).
# 3. We need to rescale all the CT scans so... | 27.650602 | 127 | 0.662309 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,406 | 0.612636 |
b791ac3d3021c73d2b06aeec225eba82f7ecf599 | 852 | py | Python | setup.py | LEGO-Robotics/aistorms | abfb6b978215507d331d9ade764310ee9d8c9448 | [
"MIT"
] | 1 | 2020-06-06T22:47:09.000Z | 2020-06-06T22:47:09.000Z | setup.py | AntoniLuongPham/LEGO-Mindstorms-AI | abfb6b978215507d331d9ade764310ee9d8c9448 | [
"MIT"
] | null | null | null | setup.py | AntoniLuongPham/LEGO-Mindstorms-AI | abfb6b978215507d331d9ade764310ee9d8c9448 | [
"MIT"
] | 1 | 2020-06-08T15:53:42.000Z | 2020-06-08T15:53:42.000Z | import json
import os
from setuptools import find_packages, setup
PACKAGE_NAMESPACE_NAME = 'aistorms'
METADATA_FILE_NAME = 'metadata.json'
REQUIREMENTS_FILE_NAME = 'requirements.txt'
_metadata = \
json.load(
open(os.path.join(
os.path.dirname(__file__),
PACKAGE_NAMESPAC... | 24.342857 | 60 | 0.676056 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 130 | 0.152582 |
b791e622824560b49e99db6ea638309e033920f8 | 3,357 | py | Python | scripts/merge.py | jgonzalezdemendibil/movie_publisher | 0e58cb616e6e6c2c5cac7cb5016e0874c0409b42 | [
"BSD-3-Clause"
] | null | null | null | scripts/merge.py | jgonzalezdemendibil/movie_publisher | 0e58cb616e6e6c2c5cac7cb5016e0874c0409b42 | [
"BSD-3-Clause"
] | null | null | null | scripts/merge.py | jgonzalezdemendibil/movie_publisher | 0e58cb616e6e6c2c5cac7cb5016e0874c0409b42 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
# Copied from https://raw.githubusercontent.com/srv/srv_tools/kinetic/bag_tools/scripts/merge.py since this script is
# not released for indigo.
"""
Copyright (c) 2015,
Enrique Fernandez Perdomo
Clearpath Robotics, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or w... | 42.493671 | 117 | 0.739053 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,230 | 0.664284 |
b7925483ba95f2bb530529066114343ba1164af4 | 1,567 | py | Python | src/pyforest/auto_import.py | tnwei/pyforest | 73b36298e8cbce9a861c13c01509e34f0e3397fe | [
"MIT"
] | 1,002 | 2019-08-13T15:00:39.000Z | 2022-03-29T19:14:41.000Z | src/pyforest/auto_import.py | tnwei/pyforest | 73b36298e8cbce9a861c13c01509e34f0e3397fe | [
"MIT"
] | 40 | 2019-08-13T19:17:49.000Z | 2022-02-14T08:46:09.000Z | src/pyforest/auto_import.py | tnwei/pyforest | 73b36298e8cbce9a861c13c01509e34f0e3397fe | [
"MIT"
] | 202 | 2019-08-13T19:37:25.000Z | 2022-03-21T20:05:27.000Z | from pathlib import Path
IPYTHON_STARTUP_FOLDER = Path.home() / ".ipython" / "profile_default" / "startup"
STARTUP_FILE = IPYTHON_STARTUP_FOLDER / "pyforest_autoimport.py"
def _create_or_reset_startup_file():
if STARTUP_FILE.exists():
STARTUP_FILE.unlink() # deletes the old file
# this is impor... | 31.34 | 137 | 0.699426 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 954 | 0.608807 |
b7936727533c1b6e64a5988a2f89fc499bcee832 | 23,430 | py | Python | tests/torch/pruning/test_model_pruning_analysis.py | sarthakpati/nncf | 29ad62c664c1dd53b3c8c50fc001a1b36bd1e8ac | [
"Apache-2.0"
] | null | null | null | tests/torch/pruning/test_model_pruning_analysis.py | sarthakpati/nncf | 29ad62c664c1dd53b3c8c50fc001a1b36bd1e8ac | [
"Apache-2.0"
] | 1 | 2021-07-23T07:46:52.000Z | 2021-07-23T07:46:52.000Z | tests/torch/pruning/test_model_pruning_analysis.py | sarthakpati/nncf | 29ad62c664c1dd53b3c8c50fc001a1b36bd1e8ac | [
"Apache-2.0"
] | null | null | null | """
Copyright (c) 2020 Intel Corporation
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 writin... | 51.721854 | 119 | 0.660606 | 1,234 | 0.052668 | 0 | 0 | 566 | 0.024157 | 0 | 0 | 5,308 | 0.226547 |
b7937e5f465626651bc0a037a47d5bc1cfd62cdf | 261 | py | Python | tests/future_division_eval.py | mayl8822/onelinerizer | bad341f261d35e56872b4c22297a44dc6d5cfab3 | [
"MIT"
] | 1,062 | 2015-11-18T01:04:33.000Z | 2022-03-29T07:13:30.000Z | tests/future_division_eval.py | CoDeRgAnEsh/1line | 507ef35b0006fc2998463dee92c2fdae53fe0694 | [
"MIT"
] | 26 | 2015-11-17T06:58:07.000Z | 2022-01-15T18:11:16.000Z | tests/future_division_eval.py | CoDeRgAnEsh/1line | 507ef35b0006fc2998463dee92c2fdae53fe0694 | [
"MIT"
] | 100 | 2015-11-17T09:01:22.000Z | 2021-09-12T13:58:28.000Z | from __future__ import division
print eval('1/2')
exec('print 1/2')
eval(compile('print 1/2', 'wat.py', 'exec'))
print eval(compile('1/2', 'wat.py', 'eval'))
print eval(compile('1/2', 'wat.py', 'eval', 0, 0))
print eval(compile('1/2', 'wat.py', 'eval', 0, ~0))
| 32.625 | 51 | 0.62069 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 98 | 0.375479 |
b7939b77631def2ec27e1370419a519e33e2db7a | 180 | py | Python | matchms/similarity/spec2vec/__init__.py | fossabot/matchms | 090db31b22829dc224e5ed78fb4901e8c14a8e92 | [
"Apache-2.0"
] | null | null | null | matchms/similarity/spec2vec/__init__.py | fossabot/matchms | 090db31b22829dc224e5ed78fb4901e8c14a8e92 | [
"Apache-2.0"
] | null | null | null | matchms/similarity/spec2vec/__init__.py | fossabot/matchms | 090db31b22829dc224e5ed78fb4901e8c14a8e92 | [
"Apache-2.0"
] | null | null | null | from .Document import Document
from .SpectrumDocument import SpectrumDocument
from .Spec2Vec import Spec2Vec
__all__ = [
"Document",
"SpectrumDocument",
"Spec2Vec"
]
| 16.363636 | 46 | 0.738889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 38 | 0.211111 |
b794d1e8ea63cc3bf3146f5e45ab36528d92826b | 22,826 | py | Python | cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_wanphy_ui_oper.py | tkamata-test/ydk-py | b637e7853a8edbbd31fbc05afa3aa4110b31c5f9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_wanphy_ui_oper.py | tkamata-test/ydk-py | b637e7853a8edbbd31fbc05afa3aa4110b31c5f9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_wanphy_ui_oper.py | tkamata-test/ydk-py | b637e7853a8edbbd31fbc05afa3aa4110b31c5f9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | """ Cisco_IOS_XR_wanphy_ui_oper
This module contains a collection of YANG definitions
for Cisco IOS\-XR wanphy\-ui package operational data.
This module contains definitions
for the following management objects\:
wanphy\: WANPHY operational data
Copyright (c) 2013\-2016 by Cisco Systems, Inc.
All rights reserved.... | 30.434667 | 293 | 0.423596 | 22,304 | 0.977131 | 0 | 0 | 2,097 | 0.091869 | 0 | 0 | 12,474 | 0.546482 |
b79500b1906f3f8e77f736bcb5d3e403aa5d9a7d | 773 | py | Python | test/unit/solver/test_lamb.py | megvii-research/basecls | 6b395a0a888370b4523764afb78a5a7634a3f6cd | [
"Apache-2.0"
] | 23 | 2021-12-08T02:35:01.000Z | 2022-03-16T02:23:19.000Z | test/unit/solver/test_lamb.py | megvii-research/basecls | 6b395a0a888370b4523764afb78a5a7634a3f6cd | [
"Apache-2.0"
] | 4 | 2021-12-23T11:31:17.000Z | 2022-02-28T01:35:31.000Z | test/unit/solver/test_lamb.py | megvii-research/basecls | 6b395a0a888370b4523764afb78a5a7634a3f6cd | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
import megengine as mge
import numpy as np
import pytest
from megengine.autodiff import GradManager
from basecls.solver.optimizer import LAMB
@pytest.mark.parametrize("weight_decay", [0.0, 0.001])
@pytest.mark.parametrize("betas", [(0.... | 26.655172 | 67 | 0.633894 | 0 | 0 | 0 | 0 | 545 | 0.705045 | 0 | 0 | 119 | 0.153946 |
b7961cc47beaac8f9cce44564f475f951b32b24b | 2,180 | py | Python | onenote-dump/__main__.py | genericmoniker/onenote-dump | 78b2ee2dcf854f6bc989d3081f42c97f245e49cc | [
"MIT"
] | 39 | 2019-07-17T06:08:56.000Z | 2022-03-22T09:48:58.000Z | onenote-dump/__main__.py | nicknickel/onenote-dump | 84607f89f8c14c51796ab660dc0e741af3ccf55c | [
"MIT"
] | 5 | 2020-07-02T02:44:38.000Z | 2021-11-11T18:16:13.000Z | onenote-dump/__main__.py | nicknickel/onenote-dump | 84607f89f8c14c51796ab660dc0e741af3ccf55c | [
"MIT"
] | 6 | 2020-11-01T12:46:56.000Z | 2022-01-12T22:24:50.000Z | import argparse
import logging
import os
import pathlib
import time
import log
import onenote_auth
import onenote
import pipeline
logger = logging.getLogger()
def main():
args = parse_args()
if args.verbose:
log.setup_logging(logging.DEBUG)
else:
log.setup_logging(logging.INFO)
# Al... | 27.25 | 76 | 0.624771 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 470 | 0.215596 |
b7971aac602f7d60f9d06ecc4d523b5988cef546 | 10,391 | py | Python | venv/lib/python3.8/site-packages/ansible_collections/community/aws/tests/unit/plugins/modules/test_data_pipeline.py | saeedya/docker-ansible | 6fb0cfc6bc4a5925b21380952a5a4502ec02119a | [
"Apache-2.0"
] | 7 | 2021-11-16T04:05:42.000Z | 2022-02-19T21:14:29.000Z | venv/lib/python3.8/site-packages/ansible_collections/community/aws/tests/unit/plugins/modules/test_data_pipeline.py | saeedya/docker-ansible | 6fb0cfc6bc4a5925b21380952a5a4502ec02119a | [
"Apache-2.0"
] | 1 | 2022-03-12T02:25:26.000Z | 2022-03-12T02:25:26.000Z | venv/lib/python3.8/site-packages/ansible_collections/community/aws/tests/unit/plugins/modules/test_data_pipeline.py | saeedya/docker-ansible | 6fb0cfc6bc4a5925b21380952a5a4502ec02119a | [
"Apache-2.0"
] | 1 | 2022-03-01T05:43:07.000Z | 2022-03-01T05:43:07.000Z | # (c) 2017 Red Hat Inc.
#
# This file is part of Ansible
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import collections
import os
import json
import p... | 40.909449 | 128 | 0.698008 | 334 | 0.032143 | 1,991 | 0.191608 | 2,023 | 0.194688 | 0 | 0 | 3,072 | 0.29564 |
b7977b33c0e4a7ba789fa84d50fd2df4ed4339db | 3,433 | py | Python | Janela/Cadastro_clientes/Clientes.py | marcosj046/Treinando-Python-Tkinter | 7b88a6b6afba46e6c013b65b952723047c173901 | [
"MIT"
] | null | null | null | Janela/Cadastro_clientes/Clientes.py | marcosj046/Treinando-Python-Tkinter | 7b88a6b6afba46e6c013b65b952723047c173901 | [
"MIT"
] | null | null | null | Janela/Cadastro_clientes/Clientes.py | marcosj046/Treinando-Python-Tkinter | 7b88a6b6afba46e6c013b65b952723047c173901 | [
"MIT"
] | null | null | null | import sqlite3
import tkinter as tk
import pandas as pd
#----------------------------------------------
#Para criação do banco de dados retira o comentário (#) da linha 9 à 23 somente a primeira vez que rodar o cód,
#depois, basta comentar novamente.
#Criando o Banco de Dados
# conexao = sqlite3.connect('Clientes.db'... | 33.990099 | 171 | 0.669677 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,491 | 0.432049 |
b79823a97f320a9bd4990bfd614e964f079da76e | 14,382 | py | Python | pygitbucket/client.py | SimiCode/pygitbucket | 46a22fcc0292231905eb4e0e2da47f8a85743bbd | [
"MIT"
] | 1 | 2021-07-04T19:45:05.000Z | 2021-07-04T19:45:05.000Z | pygitbucket/client.py | SimiCode/pygitbucket | 46a22fcc0292231905eb4e0e2da47f8a85743bbd | [
"MIT"
] | null | null | null | pygitbucket/client.py | SimiCode/pygitbucket | 46a22fcc0292231905eb4e0e2da47f8a85743bbd | [
"MIT"
] | null | null | null | import math
import requests
from pygitbucket.exceptions import (
UnknownError,
InvalidIDError,
NotFoundIDError,
NotAuthenticatedError,
PermissionError,
)
class Client:
BASE_URL = "https://api.bitbucket.org/"
def __init__(self, user: str, password: str, owner=None):
"""Initial ses... | 28.821643 | 117 | 0.578779 | 14,204 | 0.987623 | 0 | 0 | 0 | 0 | 0 | 0 | 7,741 | 0.538242 |
b79836d2b12f5a44dd3688e75af8cc0da3616913 | 3,982 | py | Python | egg/zoo/basic_games/data_readers.py | renata-nerenata/EGG | b8532efc3569defabeba6851986cecb0c6640984 | [
"MIT"
] | 1 | 2021-05-26T14:23:25.000Z | 2021-05-26T14:23:25.000Z | egg/zoo/basic_games/data_readers.py | renata-nerenata/EGG | b8532efc3569defabeba6851986cecb0c6640984 | [
"MIT"
] | 1 | 2019-10-31T16:21:01.000Z | 2019-10-31T16:21:01.000Z | egg/zoo/basic_games/data_readers.py | renata-nerenata/EGG | b8532efc3569defabeba6851986cecb0c6640984 | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import torch
from torch.utils.data import Dataset
import numpy as np
# These input-data-processing classes take input data from a text file an... | 45.770115 | 106 | 0.678805 | 2,019 | 0.507032 | 0 | 0 | 0 | 0 | 0 | 0 | 1,875 | 0.470869 |
b798b33e304086ef9c7efe2c716e2e87dfcb993a | 3,594 | py | Python | viroconcom/read_write.py | adrdrew/viroconcom | 3eb748ba8e3e076eddd174a0fcdfee3917aa4045 | [
"MIT"
] | null | null | null | viroconcom/read_write.py | adrdrew/viroconcom | 3eb748ba8e3e076eddd174a0fcdfee3917aa4045 | [
"MIT"
] | 1 | 2020-05-18T11:06:28.000Z | 2020-05-18T11:06:28.000Z | viroconcom/read_write.py | adrdrew/viroconcom | 3eb748ba8e3e076eddd174a0fcdfee3917aa4045 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Reads datasets, reads and writes contour coordinates.
"""
import numpy as np
import csv
def read_ecbenchmark_dataset(path='datasets/1year_dataset_A.txt'):
"""
Reads a 2D dataset that uses a an ASCI format with ';' as a seperator.
This format... | 31.526316 | 107 | 0.574012 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,185 | 0.607958 |
b798e6d01b3ed050802b1fbfc6ef1f267c2dd36a | 601 | py | Python | check_python_install/check_numba.py | sdpython/_check_python_install | 06a34e3b8559370c8c41b655ed2acc72c7f1bf34 | [
"MIT"
] | null | null | null | check_python_install/check_numba.py | sdpython/_check_python_install | 06a34e3b8559370c8c41b655ed2acc72c7f1bf34 | [
"MIT"
] | 2 | 2019-11-07T18:11:18.000Z | 2021-01-02T11:49:38.000Z | check_python_install/check_numba.py | sdpython/_check_python_install | 06a34e3b8559370c8c41b655ed2acc72c7f1bf34 | [
"MIT"
] | null | null | null | """
@file
@brief Test for :epkg:`cartopy`.
"""
import numpy
import numba
@numba.jit(nopython=True, parallel=True)
def logistic_regression(Y, X, w, iterations):
"Fits a logistic regression."
for _ in range(iterations):
w -= numpy.dot(((1.0 / (1.0 + numpy.exp(-Y * numpy.dot(X, w))) - 1.0) * Y), X)
r... | 24.04 | 86 | 0.62396 | 0 | 0 | 0 | 0 | 252 | 0.419301 | 0 | 0 | 124 | 0.206323 |
b799b353c37ba22ae18a337e8553a686eb6d2908 | 793 | py | Python | app/utils/to_file.py | MichelHanzenScheeren/SpectralClustering | be0a2645b965442d57c1fb016556d3003921f84a | [
"MIT"
] | null | null | null | app/utils/to_file.py | MichelHanzenScheeren/SpectralClustering | be0a2645b965442d57c1fb016556d3003921f84a | [
"MIT"
] | null | null | null | app/utils/to_file.py | MichelHanzenScheeren/SpectralClustering | be0a2645b965442d57c1fb016556d3003921f84a | [
"MIT"
] | null | null | null | class ToFile:
""" Classe que recebe uma instância de dados e os salva em um arquivo de saída. """
def __init__(self, path, data):
maxs = [len(x) + 4 for x in data.legend]
with open(path, 'w') as file:
file.write('id' + (' ' * 6))
for index, element in enumerate(data.legend):
file.write(... | 37.761905 | 85 | 0.538462 | 794 | 0.998742 | 0 | 0 | 0 | 0 | 0 | 0 | 198 | 0.249057 |
b799cded976768ac0fb3f24b3d043843412ec29f | 4,056 | py | Python | Round 3/fence_design.py | e-ntro-py/GoogleCodeJam-2021 | c42283480fa20a853c6d31d5faf0e83c6ad0f5f7 | [
"MIT"
] | 30 | 2021-03-27T20:18:15.000Z | 2022-03-19T06:18:58.000Z | Round 3/fence_design.py | e-ntro-py/GoogleCodeJam-2021 | c42283480fa20a853c6d31d5faf0e83c6ad0f5f7 | [
"MIT"
] | 1 | 2021-05-24T19:14:29.000Z | 2021-05-25T04:14:10.000Z | Round 3/fence_design.py | e-ntro-py/GoogleCodeJam-2021 | c42283480fa20a853c6d31d5faf0e83c6ad0f5f7 | [
"MIT"
] | 7 | 2021-03-28T12:38:55.000Z | 2021-09-19T15:30:39.000Z | # Copyright (c) 2021 kamyu. All rights reserved.
#
# Google Code Jam 2021 Round 3 - Problem C. Fence Design
# https://codingcompetitions.withgoogle.com/codejam/round/0000000000436142/0000000000813bc7
#
# Time: O(NlogN) on average, pass in PyPy2 but Python2
# Space: O(N)
#
from random import seed, randint
# Compute t... | 38.264151 | 115 | 0.554487 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 553 | 0.136341 |
b79b05e86bdffa34c0cb47c7868d179ea550149c | 50,505 | py | Python | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pygsl/_block.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2019-07-29T02:53:51.000Z | 2019-07-29T02:53:51.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pygsl/_block.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pygsl/_block.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 2.0.11
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info
if version_info >= (2,6,0):
def swig_import_helper():
from os.path impo... | 41.161369 | 90 | 0.825542 | 20 | 0.000396 | 0 | 0 | 0 | 0 | 0 | 0 | 419 | 0.008296 |
b79b4b3441162b8ce9025428d639fcec36693cf3 | 42 | py | Python | tests/__init__.py | chasefinch/amp-renderer | a226140d8a8a6f8c21c073e394b672cf75c8671e | [
"Apache-2.0"
] | 13 | 2020-08-19T18:37:01.000Z | 2021-12-10T17:33:14.000Z | tests/__init__.py | chasefinch/amp-renderer | a226140d8a8a6f8c21c073e394b672cf75c8671e | [
"Apache-2.0"
] | 5 | 2020-08-24T18:31:12.000Z | 2022-02-07T17:36:59.000Z | tests/__init__.py | chasefinch/amp-renderer | a226140d8a8a6f8c21c073e394b672cf75c8671e | [
"Apache-2.0"
] | null | null | null | """Tests for the AMP Renderer project."""
| 21 | 41 | 0.690476 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 41 | 0.97619 |
b79c02ce02e6d31db2455c7ba97e981d1dda98d5 | 3,564 | py | Python | sudoku/sudoku.py | Ostap2003/backtracking-team-project | 2a6fb2fc80dcdd286c76dbc3b546baf452098d98 | [
"MIT"
] | null | null | null | sudoku/sudoku.py | Ostap2003/backtracking-team-project | 2a6fb2fc80dcdd286c76dbc3b546baf452098d98 | [
"MIT"
] | null | null | null | sudoku/sudoku.py | Ostap2003/backtracking-team-project | 2a6fb2fc80dcdd286c76dbc3b546baf452098d98 | [
"MIT"
] | null | null | null |
from pprint import pprint
'''The module has class Grid for solving sudoku.
Grid should be given as a list of integers or a path to a file.
'''
class Grid():
'''Class for solving sudoku.
'''
def __init__(self, path= None, grid= None) -> None:
'''Initialize grid, columns, squares.
'''
... | 28.741935 | 81 | 0.45679 | 2,968 | 0.832772 | 0 | 0 | 0 | 0 | 0 | 0 | 890 | 0.249719 |
b79f4a64c362393fd37c99b135489a7797ae3252 | 1,421 | py | Python | device_e2e/sync/test_sync_c2d.py | dt-boringtao/azure-iot-sdk-python | 35a09679bdf4d7a727391b265a8f1fbb99a30c45 | [
"MIT"
] | null | null | null | device_e2e/sync/test_sync_c2d.py | dt-boringtao/azure-iot-sdk-python | 35a09679bdf4d7a727391b265a8f1fbb99a30c45 | [
"MIT"
] | null | null | null | device_e2e/sync/test_sync_c2d.py | dt-boringtao/azure-iot-sdk-python | 35a09679bdf4d7a727391b265a8f1fbb99a30c45 | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
import pytest
import logging
import json
import threading
from utils import get_random_dict
logger = logging.getLogger(__name__)
logger.setLevel(level=logging.INF... | 30.891304 | 93 | 0.713582 | 911 | 0.641098 | 0 | 0 | 947 | 0.666432 | 0 | 0 | 380 | 0.267417 |
b79f9124d587b0b999491249d4952350ec3b140e | 6,588 | py | Python | addons/mixer/blender_data/tests/test_bpy_blend_diff.py | trisadmeslek/V-Sekai-Blender-tools | 0d8747387c58584b50c69c61ba50a881319114f8 | [
"MIT"
] | null | null | null | addons/mixer/blender_data/tests/test_bpy_blend_diff.py | trisadmeslek/V-Sekai-Blender-tools | 0d8747387c58584b50c69c61ba50a881319114f8 | [
"MIT"
] | null | null | null | addons/mixer/blender_data/tests/test_bpy_blend_diff.py | trisadmeslek/V-Sekai-Blender-tools | 0d8747387c58584b50c69c61ba50a881319114f8 | [
"MIT"
] | null | null | null | # GPLv3 License
#
# Copyright (C) 2020 Ubisoft
#
# 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 Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This program is dis... | 41.961783 | 120 | 0.622495 | 5,607 | 0.851093 | 0 | 0 | 0 | 0 | 0 | 0 | 1,809 | 0.27459 |
b7a030be152f3c0e93089efb532b4fde2f3761dd | 17,258 | py | Python | dependencies/svgwrite/examples/ltattrie/tiling_part_5.py | charlesmchen/typefacet | 8c6db26d0c599ece16f3704696811275120a4044 | [
"Apache-2.0"
] | 21 | 2015-01-16T05:10:02.000Z | 2021-06-11T20:48:15.000Z | dependencies/svgwrite/examples/ltattrie/tiling_part_5.py | charlesmchen/typefacet | 8c6db26d0c599ece16f3704696811275120a4044 | [
"Apache-2.0"
] | 1 | 2019-09-09T12:10:27.000Z | 2020-05-22T10:12:14.000Z | dependencies/svgwrite/examples/ltattrie/tiling_part_5.py | charlesmchen/typefacet | 8c6db26d0c599ece16f3704696811275120a4044 | [
"Apache-2.0"
] | 2 | 2015-05-03T04:51:08.000Z | 2018-08-24T08:28:53.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
import math, sys
import svgwrite
#
# http://www.w3.org/TR/SVG11/struct.html#UseElement
#
# For more information on tesselation / tiling see http://en.wikipedia.org/wiki/Wallpaper_group
# The organization of these tilings are from the interesting book
# Designing Te... | 51.825826 | 137 | 0.670877 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,977 | 0.288388 |