hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | 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 239 | max_issues_repo_name stringlengths 5 130 | 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 239 | max_forks_repo_name stringlengths 5 130 | 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 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7979fd783fb06d2aaac4a030bddd0f6a0a59e748 | 2,707 | py | Python | src/V-detector/algorithms/V_detector(robert).py | kishordgupta/NSA-VdetectorPython | 21cd5748befe7884cd52b4549afb24d95978fe2f | [
"MIT"
] | 3 | 2021-01-13T12:57:32.000Z | 2021-04-12T14:15:08.000Z | src/V-detector/algorithms/V_detector(robert).py | kishordgupta/NSA-VdetectorPython | 21cd5748befe7884cd52b4549afb24d95978fe2f | [
"MIT"
] | null | null | null | src/V-detector/algorithms/V_detector(robert).py | kishordgupta/NSA-VdetectorPython | 21cd5748befe7884cd52b4549afb24d95978fe2f | [
"MIT"
] | 1 | 2020-11-27T10:39:43.000Z | 2020-11-27T10:39:43.000Z | import matplotlib.animation as animation
from scipy.integrate import odeint
from numpy import arange
from pylab import *
import matplotlib.pyplot as plt
import random
from matplotlib.patches import Ellipse
fig, ax = plt.subplots()
#fig = figure()
xlabel('x')
ylabel('y')
z=8
#circ = Ellipse((0.5, 0.5),width=0.75/z, hei... | 27.343434 | 89 | 0.588105 |
7979fde4908ea8de7e4a6c07b4a32ec1871823f6 | 8,555 | py | Python | easymunk/utilities/svg_path.py | fabiommendes/easymunk | 420dfc4a006997c47887f6876876249674feb3cd | [
"MIT"
] | 1 | 2021-07-02T11:59:07.000Z | 2021-07-02T11:59:07.000Z | easymunk/utilities/svg_path.py | fabiommendes/easymunk | 420dfc4a006997c47887f6876876249674feb3cd | [
"MIT"
] | null | null | null | easymunk/utilities/svg_path.py | fabiommendes/easymunk | 420dfc4a006997c47887f6876876249674feb3cd | [
"MIT"
] | 1 | 2022-01-14T20:18:35.000Z | 2022-01-14T20:18:35.000Z | """
Parse SVG paths and extensions
Code adapted from `svg.path`_ by Lennart Regebro.
_svg.path: https://pypi.org/project/svg.path/
"""
import re
from typing import NamedTuple
from ..linalg import Vec2d
COMMANDS = set("MmZzLlHhVvCcSsQqTtAa")
UPPERCASE = set("MZLHVCSQTA")
COMMAND_RE = re.compile(r"([MmZzLlHhVvCcSsQqT... | 27.775974 | 85 | 0.555465 |
7979fde68e99f79502cfd4237722211ef54844f5 | 420 | py | Python | api/migrations/0080_song_available.py | eiling/SchoolIdolAPI | a05980fdb33b143dbe2febfc1ad6cf723f025c8d | [
"Apache-2.0"
] | 65 | 2017-12-29T12:28:11.000Z | 2022-03-15T06:42:26.000Z | api/migrations/0080_song_available.py | eiling/SchoolIdolAPI | a05980fdb33b143dbe2febfc1ad6cf723f025c8d | [
"Apache-2.0"
] | 31 | 2017-12-18T02:03:09.000Z | 2022-01-13T00:43:35.000Z | api/migrations/0080_song_available.py | eiling/SchoolIdolAPI | a05980fdb33b143dbe2febfc1ad6cf723f025c8d | [
"Apache-2.0"
] | 7 | 2018-08-27T15:11:01.000Z | 2021-08-16T05:15:13.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('api', '0079_song'),
]
operations = [
migrations.AddField(
model_name='song',
name='available',
... | 20 | 52 | 0.585714 |
7979fe830e5532afeb143ccc5ad92877acb1e734 | 4,005 | py | Python | server/personality.py | sridharswain/NeuroImpression | ecd4c262fbbec1c45b6092ace27246a6b6b08bb4 | [
"MIT"
] | null | null | null | server/personality.py | sridharswain/NeuroImpression | ecd4c262fbbec1c45b6092ace27246a6b6b08bb4 | [
"MIT"
] | null | null | null | server/personality.py | sridharswain/NeuroImpression | ecd4c262fbbec1c45b6092ace27246a6b6b08bb4 | [
"MIT"
] | 1 | 2020-07-11T17:38:18.000Z | 2020-07-11T17:38:18.000Z | import sys
import ast
# MYERS-BRIGGS PREDICTOR, WHEN BIG FIVE PERSONALITY TRAITS GIVEN AS INPUT
Financial_personality = []
#Give this traits matrix as input
dict_personality = {}
def personality_analyzer(traits_matrix):
Personality_word_list = []
traits_matrix = list(traits_matrix)
e = traits_matrix[0]
... | 37.429907 | 158 | 0.696879 |
7979fe9c13eaec4d7776ca209eb7259388569867 | 616 | py | Python | tests/bento_service_examples/onnx_onnxruntime_iris_classifier.py | docteurZ/BentoML | 2ea9848f907a212818fc0c9da434e88cdecab19f | [
"Apache-2.0"
] | 2 | 2019-04-02T02:31:02.000Z | 2019-04-02T02:55:49.000Z | tests/bento_service_examples/onnx_onnxruntime_iris_classifier.py | docteurZ/BentoML | 2ea9848f907a212818fc0c9da434e88cdecab19f | [
"Apache-2.0"
] | null | null | null | tests/bento_service_examples/onnx_onnxruntime_iris_classifier.py | docteurZ/BentoML | 2ea9848f907a212818fc0c9da434e88cdecab19f | [
"Apache-2.0"
] | null | null | null | import numpy
import bentoml
from bentoml.artifact import OnnxModelArtifact
from bentoml.handlers import DataframeHandler
@bentoml.env(auto_pip_dependencies=True)
@bentoml.artifacts([OnnxModelArtifact('model', backend='onnxruntime')])
class OnnxIrisClassifier(bentoml.BentoService):
@bentoml.api(DataframeHandler)
... | 36.235294 | 83 | 0.758117 |
7979ff4556c46bf1d891b20e42aac304e889a819 | 2,649 | py | Python | tree/zero_one_knapsack.py | anhtumai/data-structure-and-algorithms-collection | 6eac2a8dfec9a89a9e9f800d2a23d37bf6d82d31 | [
"MIT"
] | 1 | 2021-12-14T14:51:31.000Z | 2021-12-14T14:51:31.000Z | tree/zero_one_knapsack.py | anhtumai/data-structure-and-algorithms-collection | 6eac2a8dfec9a89a9e9f800d2a23d37bf6d82d31 | [
"MIT"
] | null | null | null | tree/zero_one_knapsack.py | anhtumai/data-structure-and-algorithms-collection | 6eac2a8dfec9a89a9e9f800d2a23d37bf6d82d31 | [
"MIT"
] | 1 | 2021-12-14T14:50:46.000Z | 2021-12-14T14:50:46.000Z | """
You have to prepare for a hiking trip. There are a knapsack and a list of food.
Each food has its own value (representing calories) and weight.
The knapsack cannot take more than w weight. Meanwhile, you want to consume as much
calories as possible during the hiking trip.
Which food to put into the knapsack?
Give... | 31.164706 | 94 | 0.640619 |
7979ff707a7af2b1140b5b545c4484b662fdb0bc | 5,939 | py | Python | tests/integration/console_render/test_checkbox.py | SteinRobert/python-inquirer | 2bb4a308beb03868295ea68edb7702bbb515a12c | [
"MIT"
] | 640 | 2015-01-05T11:57:21.000Z | 2022-03-31T17:56:48.000Z | tests/integration/console_render/test_checkbox.py | SteinRobert/python-inquirer | 2bb4a308beb03868295ea68edb7702bbb515a12c | [
"MIT"
] | 130 | 2015-01-11T13:09:52.000Z | 2022-03-30T19:15:10.000Z | tests/integration/console_render/test_checkbox.py | SteinRobert/python-inquirer | 2bb4a308beb03868295ea68edb7702bbb515a12c | [
"MIT"
] | 99 | 2015-02-14T04:01:08.000Z | 2022-03-27T06:25:41.000Z | import unittest
import inquirer.questions as questions
from . import helper
from readchar import key
from inquirer.render import ConsoleRender
class CheckboxRenderTest(unittest.TestCase, helper.BaseTestCase):
def setUp(self):
self.base_setup()
def tearDown(self):
self.base_teardown()
d... | 31.094241 | 102 | 0.628557 |
7979ffb9cf17becfe32061c4a9b438cc0bab4e08 | 5,257 | py | Python | homeassistant/components/tfiac/climate.py | petewill/home-assistant | 5859dba4344f05fb8774aa1207e47ac28f627a67 | [
"Apache-2.0"
] | 3 | 2020-01-21T18:09:09.000Z | 2022-01-17T08:06:03.000Z | homeassistant/components/tfiac/climate.py | petewill/home-assistant | 5859dba4344f05fb8774aa1207e47ac28f627a67 | [
"Apache-2.0"
] | 39 | 2016-12-16T12:40:34.000Z | 2017-02-13T17:53:42.000Z | homeassistant/components/tfiac/climate.py | petewill/home-assistant | 5859dba4344f05fb8774aa1207e47ac28f627a67 | [
"Apache-2.0"
] | 4 | 2019-10-15T21:03:53.000Z | 2020-05-27T19:53:20.000Z | """Climate platform that offers a climate device for the TFIAC protocol."""
from concurrent import futures
from datetime import timedelta
import logging
from pytfiac import Tfiac
import voluptuous as vol
from homeassistant.components.climate import PLATFORM_SCHEMA, ClimateDevice
from homeassistant.components.climate.... | 27.380208 | 85 | 0.66635 |
797a0020d2eab17cd4dfc0e50c3b6b3d45d6cdfc | 1,120 | py | Python | maas-ne-kadar-kaldi.py | buraakx0/maastan-kalan-para | 92d8a00d672020c526e8410b210664003ed70164 | [
"MIT"
] | 1 | 2022-02-17T08:36:39.000Z | 2022-02-17T08:36:39.000Z | maas-ne-kadar-kaldi.py | buraakx0/maastan-kalan-para | 92d8a00d672020c526e8410b210664003ed70164 | [
"MIT"
] | null | null | null | maas-ne-kadar-kaldi.py | buraakx0/maastan-kalan-para | 92d8a00d672020c526e8410b210664003ed70164 | [
"MIT"
] | null | null | null | maas = float(input("Lütfen aldığınız maaş miktarını giriniz: "))
mutfak = float(input("Lütfen market alışveriş tutarını giriniz: "))
tel = float(input("Telefon fatura fiyatını giriniz: "))
tel2 = float(input("Eğer 2. telefon fatura varsa giriniz. (yoksa 0 yazın): "))
su = float(input("Bu ay su faturası ne kadar gel... | 56 | 125 | 0.725 |
797a0029d3288c490dd528b17340ef252dceca33 | 1,040 | py | Python | examples/apk_install.py | WedjDev/uiautomator | d9b4e30c6281ed7f307fcea4c115c6c52e22678f | [
"MIT"
] | null | null | null | examples/apk_install.py | WedjDev/uiautomator | d9b4e30c6281ed7f307fcea4c115c6c52e22678f | [
"MIT"
] | null | null | null | examples/apk_install.py | WedjDev/uiautomator | d9b4e30c6281ed7f307fcea4c115c6c52e22678f | [
"MIT"
] | null | null | null | # coding: utf-8
#
# Install problems
#
# OPPO need password
import time
import uiautomator2 as u2
def oppo_verify(u):
password = "your-password"
if u(packageName="com.coloros.safecenter", textContains="请验证身份后安装").exists:
print("Auto click install")
u.set_fastinput_ime()
u(className='a... | 25.365854 | 81 | 0.650962 |
797a002f2f3047f5abdbea699efed18d91202786 | 2,076 | py | Python | sgtpy/vrmie_pure/a2m_monomer.py | MatKie/SGTPy | 8e98d92fedd2b07d834e547e5154ec8f70d80728 | [
"MIT"
] | 12 | 2020-12-27T17:04:33.000Z | 2021-07-19T06:28:28.000Z | sgtpy/vrmie_pure/a2m_monomer.py | MatKie/SGTPy | 8e98d92fedd2b07d834e547e5154ec8f70d80728 | [
"MIT"
] | 2 | 2021-05-15T14:27:57.000Z | 2021-08-19T15:42:24.000Z | sgtpy/vrmie_pure/a2m_monomer.py | MatKie/SGTPy | 8e98d92fedd2b07d834e547e5154ec8f70d80728 | [
"MIT"
] | 5 | 2021-02-21T01:33:29.000Z | 2021-07-26T15:11:08.000Z | from __future__ import division, print_function, absolute_import
import numpy as np
# Second pertubation Eq 36
def a2m(suma_a2, khs, xi, cte_a2m):
a2 = khs*(1+xi)*suma_a2*cte_a2m
return a2
def da2m_deta(suma_a2, dKhs, dXi, cte_a2m):
khs, dkhs = dKhs
xi, dx1 = dXi
x1 = 1. + xi
#sum1, dsum1 ... | 23.862069 | 68 | 0.602601 |
797a00cf5bd2b364fdc7a5f21aed87295878037a | 3,412 | py | Python | cryptofeed_werks/exchanges/bybit.py | globophobe/cryptofeed-werks | 3034bd49142dcbe4b9d9f818324407b619cd6201 | [
"MIT"
] | 10 | 2021-11-28T02:30:47.000Z | 2022-02-01T04:42:42.000Z | cryptofeed_werks/exchanges/bybit.py | globophobe/cryptoblotter | 3034bd49142dcbe4b9d9f818324407b619cd6201 | [
"MIT"
] | 1 | 2021-11-07T10:51:42.000Z | 2021-11-07T10:51:42.000Z | cryptofeed_werks/exchanges/bybit.py | globophobe/cryptofeed-werks | 3034bd49142dcbe4b9d9f818324407b619cd6201 | [
"MIT"
] | 3 | 2021-11-09T21:59:11.000Z | 2021-12-17T11:58:56.000Z | from decimal import Decimal
from functools import partial
from typing import Any
from cryptofeed.connection import AsyncConnection, WSAsyncConn
from cryptofeed.defines import TRADES
from cryptofeed.exchanges import Bybit
from ..exchange import Exchange
class BybitExchange(Exchange, Bybit):
def connect(self) -> ... | 36.297872 | 88 | 0.495897 |
797a02330b7208c8886119850bfed92d0cbb9b15 | 9,403 | py | Python | pyvideoai/utils/lr_scheduling.py | kiyoon/PyVideoAI | c4d3ba7a69723aeae7da48245989ae11cbdb1f8b | [
"MIT"
] | 22 | 2021-06-01T07:40:01.000Z | 2022-03-14T07:09:01.000Z | pyvideoai/utils/lr_scheduling.py | kiyoon/PyVideoAI | c4d3ba7a69723aeae7da48245989ae11cbdb1f8b | [
"MIT"
] | null | null | null | pyvideoai/utils/lr_scheduling.py | kiyoon/PyVideoAI | c4d3ba7a69723aeae7da48245989ae11cbdb1f8b | [
"MIT"
] | null | null | null | import torch
from typing import Iterable
from torch._six import inf
from torch.optim.optimizer import Optimizer
def multistep_lr_nonlinear(optimiser, milestones: Iterable[int], factors: Iterable[float], last_epoch=-1):
"""Similar to torch.optim.lr_scheduler.MultiStepLR,
but with this you can define the factor... | 40.882609 | 132 | 0.623418 |
797a03c2f417365989a965cac1d4218b33ed8705 | 38,869 | py | Python | toontown/minigame/DistributedCogThiefGame.py | journeyfan/toontown-journey | 7a4db507e5c1c38a014fc65588086d9655aaa5b4 | [
"MIT"
] | 1 | 2020-09-27T22:12:47.000Z | 2020-09-27T22:12:47.000Z | toontown/minigame/DistributedCogThiefGame.py | journeyfan/toontown-journey | 7a4db507e5c1c38a014fc65588086d9655aaa5b4 | [
"MIT"
] | null | null | null | toontown/minigame/DistributedCogThiefGame.py | journeyfan/toontown-journey | 7a4db507e5c1c38a014fc65588086d9655aaa5b4 | [
"MIT"
] | 2 | 2020-09-26T20:37:18.000Z | 2020-11-15T20:55:33.000Z | from pandac.PandaModules import Point3, CollisionSphere, CollisionNode, CollisionHandlerEvent, NodePath, TextNode
from direct.distributed.ClockDelta import globalClockDelta
from direct.interval.IntervalGlobal import Wait, LerpFunctionInterval, LerpHprInterval, Sequence, Parallel, Func, SoundInterval, ActorInterval, Pro... | 42.713187 | 455 | 0.61468 |
797a03c527f294ebea496ef937bb69e31fed634c | 2,474 | py | Python | Functions/libsvm-3.23/tools/checkdata.py | klop670/TwitterBotDetectMLClass | 88a22807a5d07378935d02fbca4cd6cc36a68d24 | [
"MIT"
] | 5 | 2022-02-28T05:21:46.000Z | 2022-03-17T10:38:28.000Z | Functions/libsvm-3.23/tools/checkdata.py | klop670/TwitterBotDetectMLClass | 88a22807a5d07378935d02fbca4cd6cc36a68d24 | [
"MIT"
] | 2 | 2021-09-27T12:24:42.000Z | 2021-12-02T10:02:31.000Z | Functions/libsvm-3.23/tools/checkdata.py | klop670/TwitterBotDetectMLClass | 88a22807a5d07378935d02fbca4cd6cc36a68d24 | [
"MIT"
] | 2 | 2020-07-26T07:27:57.000Z | 2020-08-17T07:09:15.000Z | #!/usr/bin/env python
#
# A format checker for LIBSVM
#
#
# Copyright (c) 2007, Rong-En Fan
#
# All rights reserved.
#
# This program is distributed under the same license of the LIBSVM package.
#
from sys import argv, exit
import os.path
def err(line_no, msg):
print("line {0}: {1}".format(line_no, msg))
# works ... | 22.697248 | 130 | 0.63945 |
797a0483ee03681830de1c6cd56f1742862186ec | 1,115 | py | Python | OmniMarkupLib/Renderers/libs/python2/creoleparser/__init__.py | henumohe/OmniMarkupPreviewer | a15382a8309fe04f2c515151c00c074ab9c0d1ab | [
"MIT"
] | 476 | 2015-01-07T08:59:53.000Z | 2022-02-11T09:46:06.000Z | OmniMarkupLib/Renderers/libs/python2/creoleparser/__init__.py | henumohe/OmniMarkupPreviewer | a15382a8309fe04f2c515151c00c074ab9c0d1ab | [
"MIT"
] | 82 | 2015-01-15T12:30:43.000Z | 2022-01-06T02:56:53.000Z | OmniMarkupLib/Renderers/libs/python2/creoleparser/__init__.py | henumohe/OmniMarkupPreviewer | a15382a8309fe04f2c515151c00c074ab9c0d1ab | [
"MIT"
] | 99 | 2015-01-14T19:53:45.000Z | 2021-08-11T15:17:26.000Z | # __init__.py
# -*- coding: utf-8 -*-
#
# Copyright © Stephen Day
#
# This module is part of Creoleparser and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
#
import string
import keyword
from core import Parser, ArgParser
from dialects import (creole11_base, creole10_base, cre... | 30.135135 | 79 | 0.696861 |
797a049334416df5a175bafe2f58b1c1836af78f | 502 | py | Python | messenger/migrations/0017_auto_20200522_1428.py | acounsel/asfour | a4872a5709736f6c7333f683b1394e3c852349f4 | [
"MIT"
] | 1 | 2020-05-12T02:29:56.000Z | 2020-05-12T02:29:56.000Z | messenger/migrations/0017_auto_20200522_1428.py | saraabi/asfour | a4872a5709736f6c7333f683b1394e3c852349f4 | [
"MIT"
] | null | null | null | messenger/migrations/0017_auto_20200522_1428.py | saraabi/asfour | a4872a5709736f6c7333f683b1394e3c852349f4 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.4 on 2020-05-22 21:28
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('messenger', '0016_auto_20200413_1551'),
]
operations = [
migrations.AlterModelOptions(
name='contact',
options={'ord... | 21.826087 | 50 | 0.563745 |
797a04fa45740c4dcda887ff234d7d966eb1de88 | 6,326 | py | Python | tests/python/unittest/test_lang_constructor.py | robo-corg/incubator-tvm | 4ddfdb4b15d05a5bf85a984837967d004efee5dd | [
"Apache-2.0"
] | 3 | 2020-03-12T10:25:51.000Z | 2020-08-05T05:36:23.000Z | tests/python/unittest/test_lang_constructor.py | robo-corg/incubator-tvm | 4ddfdb4b15d05a5bf85a984837967d004efee5dd | [
"Apache-2.0"
] | null | null | null | tests/python/unittest/test_lang_constructor.py | robo-corg/incubator-tvm | 4ddfdb4b15d05a5bf85a984837967d004efee5dd | [
"Apache-2.0"
] | 1 | 2018-10-19T18:11:41.000Z | 2018-10-19T18:11:41.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 30.413462 | 73 | 0.596902 |
797a05d302fd2d07ab1c68ce85a7d2a2b3c26a22 | 771 | py | Python | src/optimization/grassman.py | endsley/InterpretableKernelDimReduction | 520c7517f633ce4f0eac534c924d2e7e687d0160 | [
"MIT"
] | 1 | 2021-10-30T13:05:32.000Z | 2021-10-30T13:05:32.000Z | src/optimization/grassman.py | endsley/Interpretable_Kernel_Dim_Reduction | 520c7517f633ce4f0eac534c924d2e7e687d0160 | [
"MIT"
] | null | null | null | src/optimization/grassman.py | endsley/Interpretable_Kernel_Dim_Reduction | 520c7517f633ce4f0eac534c924d2e7e687d0160 | [
"MIT"
] | 1 | 2022-02-07T02:04:17.000Z | 2022-02-07T02:04:17.000Z | #!/usr/bin/python3
# Note : This is designed for Python 3
import autograd.numpy as np
from pymanopt.manifolds import Stiefel
from pymanopt.manifolds import Grassmann
from pymanopt import Problem
from pymanopt.solvers import SteepestDescent
class grassman:
def __init__(self, db):
self.cost_function = db['compute_c... | 24.09375 | 68 | 0.735409 |
797a0602cf33626cf4858f083bec11a3e667f89a | 436 | py | Python | optuna/multi_objective/samplers/__init__.py | jeffzi/optuna | 133e9d678723ad9e5183789f9271b7f96db32322 | [
"MIT"
] | 4,950 | 2019-11-15T07:35:51.000Z | 2022-03-31T10:32:42.000Z | optuna/multi_objective/samplers/__init__.py | SCUTJcfeng/optuna | 9331374a2460da067a6922e4ea09dd4706f3d950 | [
"MIT"
] | 2,490 | 2019-11-15T07:06:20.000Z | 2022-03-31T23:52:45.000Z | optuna/multi_objective/samplers/__init__.py | SCUTJcfeng/optuna | 9331374a2460da067a6922e4ea09dd4706f3d950 | [
"MIT"
] | 621 | 2019-11-15T11:26:57.000Z | 2022-03-28T11:46:34.000Z | from optuna.multi_objective.samplers._adapter import _MultiObjectiveSamplerAdapter # NOQA
from optuna.multi_objective.samplers._base import BaseMultiObjectiveSampler # NOQA
from optuna.multi_objective.samplers._motpe import MOTPEMultiObjectiveSampler # NOQA
from optuna.multi_objective.samplers._nsga2 import NSGAIIMu... | 72.666667 | 90 | 0.873853 |
797a0690301e70f01de0f5f46a51ddaa5f77a0da | 37 | py | Python | ModellingArch/__init__.py | MikaZeilstra/ModellingArch | 71a8948f0e8feb086b291fa12d53a0a0adf50c3d | [
"MIT"
] | null | null | null | ModellingArch/__init__.py | MikaZeilstra/ModellingArch | 71a8948f0e8feb086b291fa12d53a0a0adf50c3d | [
"MIT"
] | null | null | null | ModellingArch/__init__.py | MikaZeilstra/ModellingArch | 71a8948f0e8feb086b291fa12d53a0a0adf50c3d | [
"MIT"
] | null | null | null | from ModellingArch.Model import Model | 37 | 37 | 0.891892 |
797a0692c47c7a37cb0085d5687886663ae845bc | 514 | py | Python | app.py | ErikAkertPersonal/dash_portfolio | 8726dfa8da29306d5083aa250c2492eb4233d201 | [
"MIT"
] | null | null | null | app.py | ErikAkertPersonal/dash_portfolio | 8726dfa8da29306d5083aa250c2492eb4233d201 | [
"MIT"
] | null | null | null | app.py | ErikAkertPersonal/dash_portfolio | 8726dfa8da29306d5083aa250c2492eb4233d201 | [
"MIT"
] | null | null | null | import dash
from flask_caching import Cache
external_stylesheets = ['bWLwgP.css']
# external_stylesheets = ['https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css']
app = dash.Dash(__name__, external_stylesheets=external_stylesheets)
server = app.server
cache = Cache(server, config={
'CACHE_TYPE... | 30.235294 | 101 | 0.754864 |
797a06e776a1a90c37a99fbb618aa51827b14dd0 | 3,326 | py | Python | src/compas_rhino/artists/coneartist.py | XingxinHE/compas | d2901dbbacdaf4694e5adae78ba8f093f10532bf | [
"MIT"
] | null | null | null | src/compas_rhino/artists/coneartist.py | XingxinHE/compas | d2901dbbacdaf4694e5adae78ba8f093f10532bf | [
"MIT"
] | null | null | null | src/compas_rhino/artists/coneartist.py | XingxinHE/compas | d2901dbbacdaf4694e5adae78ba8f093f10532bf | [
"MIT"
] | null | null | null | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
from compas.utilities import pairwise
import compas_rhino
from compas_rhino.artists._shapeartist import ShapeArtist
class ConeArtist(ShapeArtist):
"""Artist for drawing cone shapes.
Parameters
--... | 34.645833 | 129 | 0.585087 |
797a0848d8e0b1c888990dc2a75b1cd031b004a9 | 1,890 | py | Python | modules/adbmirror/start-mirror.py | VforV93/lookup-lucapp | 47c078f00cef26e9eddaf7f4969f8a43a60a4283 | [
"MIT"
] | null | null | null | modules/adbmirror/start-mirror.py | VforV93/lookup-lucapp | 47c078f00cef26e9eddaf7f4969f8a43a60a4283 | [
"MIT"
] | null | null | null | modules/adbmirror/start-mirror.py | VforV93/lookup-lucapp | 47c078f00cef26e9eddaf7f4969f8a43a60a4283 | [
"MIT"
] | 1 | 2019-10-17T17:30:18.000Z | 2019-10-17T17:30:18.000Z | import subprocess
import re
from time import time
from PIL import ImageTk, Image
from io import BytesIO
from os.path import isfile
from os import remove, mkdir
from shutil import copyfile, rmtree, copy
from modules.adbmirror.adb import *
if __name__ == '__main__':
abi = run_adb('shell getprop ro.product.cpu.abi', as... | 39.375 | 83 | 0.72963 |
797a0a6f28167d44191c3db630f7af27d132bad1 | 5,294 | py | Python | www/work/chromehooks.py | sergeychernyshev/webpagetest | d53fba00bc0941cbfc9c15cb27944c1ba052f345 | [
"BSD-3-Clause"
] | 1 | 2020-11-25T21:10:57.000Z | 2020-11-25T21:10:57.000Z | www/work/chromehooks.py | sergeychernyshev/webpagetest | d53fba00bc0941cbfc9c15cb27944c1ba052f345 | [
"BSD-3-Clause"
] | null | null | null | www/work/chromehooks.py | sergeychernyshev/webpagetest | d53fba00bc0941cbfc9c15cb27944c1ba052f345 | [
"BSD-3-Clause"
] | 1 | 2021-03-09T13:54:30.000Z | 2021-03-09T13:54:30.000Z | #!/usr/bin/env python
# Copyright 2017 Google Inc. All rights reserved.
# Use of this source code is governed by the Apache 2.0 license that can be
# found in the LICENSE file.
"""Chrome PDB fetch and parser"""
import os
import platform
import re
import subprocess
import urllib
import pdbparse
def get_pdb(signature):
... | 34.154839 | 96 | 0.560824 |
797a0b88876b059b18bfcb56bf9b2e80ec5cbe57 | 1,041 | py | Python | 1/word_ladder.py | IronCore864/leetcode | a62a4cdde9814ae48997176debcaad537f7ad01f | [
"Apache-2.0"
] | 4 | 2018-03-07T02:56:03.000Z | 2021-06-15T05:43:31.000Z | 1/word_ladder.py | IronCore864/leetcode | a62a4cdde9814ae48997176debcaad537f7ad01f | [
"Apache-2.0"
] | null | null | null | 1/word_ladder.py | IronCore864/leetcode | a62a4cdde9814ae48997176debcaad537f7ad01f | [
"Apache-2.0"
] | 1 | 2021-09-02T12:05:15.000Z | 2021-09-02T12:05:15.000Z | class Solution(object):
def _get_next(self, word, wordDict):
next_possible = set()
for i in xrange(len(word)):
for c in 'abcdefghijklmnopqrstuvwxyz':
next_word = word[:i] + c + word[i + 1:]
if next_word != word and next_word in wordDict:
... | 31.545455 | 80 | 0.528338 |
797a0bf0562ced871efd3ea5ff2c37879b2b4783 | 58,628 | py | Python | test/functional/test_framework/mininode.py | blockchaingate/fabcoin | ae69201eb9f73e3bb82d7332f84a99f242d171b2 | [
"MIT"
] | 26 | 2018-04-24T00:33:11.000Z | 2022-03-26T15:46:04.000Z | test/functional/test_framework/mininode.py | rlinxy/fcore | 652288940bd27ecbad69c0366bba20ad0f7515b6 | [
"MIT"
] | 4 | 2018-07-17T13:33:26.000Z | 2018-08-27T07:10:49.000Z | test/functional/test_framework/mininode.py | blockchaingate/fabcoin | ae69201eb9f73e3bb82d7332f84a99f242d171b2 | [
"MIT"
] | 22 | 2018-04-24T00:33:31.000Z | 2022-02-03T09:40:26.000Z | #!/usr/bin/env python3
# Copyright (c) 2010 ArtForz -- public domain half-a-node
# Copyright (c) 2012 Jeff Garzik
# Copyright (c) 2010-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Fabcoin P2P ... | 31.085896 | 262 | 0.600225 |
797a0c2a5890e2d0cc66ce22be20339036e0c775 | 7,518 | py | Python | src/tools/fuse/src/elektra_fuse/elektra_util.py | dev2718/libelektra | cd581101febbc8ee2617243d0d93f871ef2fae88 | [
"BSD-3-Clause"
] | null | null | null | src/tools/fuse/src/elektra_fuse/elektra_util.py | dev2718/libelektra | cd581101febbc8ee2617243d0d93f871ef2fae88 | [
"BSD-3-Clause"
] | null | null | null | src/tools/fuse/src/elektra_fuse/elektra_util.py | dev2718/libelektra | cd581101febbc8ee2617243d0d93f871ef2fae88 | [
"BSD-3-Clause"
] | null | null | null | from pathlib import Path
import os, re, errno, sys, subprocess
import kdb
elektra_namespaces = ["user:", "system:", "dir:", "spec:", "cascading:", "proc:"]
parent_key = None # not yet set
dir_file_special_name = "®elektra.value"
xattr_kdb_file = "®elektra.file"
#translates from filesystem (that are below the "pid"-le... | 34.328767 | 191 | 0.652168 |
797a0c8cef8fcf6b32266b6ee3173c162ea604c4 | 2,950 | py | Python | tests/test_addressbook.py | l-n-s/kote | 40aa047db978a99512d2dbc657fd112d12c14a87 | [
"MIT"
] | 5 | 2019-01-26T13:39:14.000Z | 2021-11-03T16:45:51.000Z | tests/test_addressbook.py | r4sas/kote | 40aa047db978a99512d2dbc657fd112d12c14a87 | [
"MIT"
] | 1 | 2020-12-18T01:22:54.000Z | 2020-12-18T01:22:54.000Z | tests/test_addressbook.py | r4sas/kote | 40aa047db978a99512d2dbc657fd112d12c14a87 | [
"MIT"
] | 1 | 2020-12-18T02:12:33.000Z | 2020-12-18T02:12:33.000Z | from unittest import TestCase
from kote.addressbook import Addressbook
vasya_dest = "3cmcwwwvitnh5y7nhmpsdiwadukzandg3bkzcvqvml5h4jmwtejq"
petya_dest = "5h4j3cmcwwwvitnh5y7nmwtejqhmpsdiwadukzandg3bkzcvqvml"
masha_dest = "tnh5y7nmwtejqhmps5h4j3cmcwwwvidivqvmlwadukzandg3bkzc"
class TestAddressbook(TestCase):
def ... | 30.412371 | 70 | 0.641695 |
797a0c96bd3735298e3390609ada14fd08575ff4 | 4,444 | py | Python | pythalesians/market/indices/indicesfx.py | PauloRui/pythalesians | a32f884a83476a6a6e7e77aa1a3f5f53468bad66 | [
"Apache-2.0"
] | 1 | 2021-07-05T13:21:28.000Z | 2021-07-05T13:21:28.000Z | pythalesians/market/indices/indicesfx.py | PauloRui/pythalesians | a32f884a83476a6a6e7e77aa1a3f5f53468bad66 | [
"Apache-2.0"
] | null | null | null | pythalesians/market/indices/indicesfx.py | PauloRui/pythalesians | a32f884a83476a6a6e7e77aa1a3f5f53468bad66 | [
"Apache-2.0"
] | null | null | null | __author__ = 'saeedamen' # Saeed Amen / saeed@thalesians.com
#
# Copyright 2015 Thalesians Ltd. - http//www.thalesians.com / @thalesians
#
# 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://... | 40.036036 | 121 | 0.64559 |
797a0dd472735a7bce4c2efd826b1758f89200e9 | 7,740 | py | Python | enota2.py | marcotessarotto/learnslo | 51bcb75364353f4ae26f33fc613555751c2fa310 | [
"MIT"
] | 1 | 2020-07-08T20:03:10.000Z | 2020-07-08T20:03:10.000Z | enota2.py | marcotessarotto/learnslo | 51bcb75364353f4ae26f33fc613555751c2fa310 | [
"MIT"
] | null | null | null | enota2.py | marcotessarotto/learnslo | 51bcb75364353f4ae26f33fc613555751c2fa310 | [
"MIT"
] | null | null | null | from utilities import WordType, WordNote, PronNote, BookPage, Level, Item, process_dictionary, find_random_answers, \
start_tests, Gender
enota = {}
enota[2] = (
("družina", "famiglia"),
("oče", "padre"),
("mama", "madre"),
("starši", "genitori"),
("otrok/otroci", "bambini"),
("sin", "figl... | 35.668203 | 117 | 0.533721 |
797a0e885571fb1d8767aa26fa9d97e79f40d09a | 808 | py | Python | setup.py | sanctus91/suedoename | 4b19a38058176b2f1ceed785bb7e204e57ea37c2 | [
"MIT"
] | null | null | null | setup.py | sanctus91/suedoename | 4b19a38058176b2f1ceed785bb7e204e57ea37c2 | [
"MIT"
] | null | null | null | setup.py | sanctus91/suedoename | 4b19a38058176b2f1ceed785bb7e204e57ea37c2 | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="suedoename",
version="0.0.1",
author="sanctus91",
author_email="author@example.com",
description="Pseudoname generator",
long_description=long_description,
long_... | 26.933333 | 72 | 0.649752 |
797a0ee700a9046c2c887fe4d561f89d15e0d8c5 | 3,982 | py | Python | word2veclite/test/test_word2veclite.py | chalothon/word2veclite | 336786a96b0d7bca04268d8f65c928a7926c821b | [
"Apache-2.0"
] | 30 | 2018-04-05T01:44:59.000Z | 2021-03-07T18:48:09.000Z | word2veclite/test/test_word2veclite.py | tansutascioglu/word2veclite | 336786a96b0d7bca04268d8f65c928a7926c821b | [
"Apache-2.0"
] | 3 | 2018-05-23T06:39:40.000Z | 2018-07-10T21:18:17.000Z | word2veclite/test/test_word2veclite.py | tansutascioglu/word2veclite | 336786a96b0d7bca04268d8f65c928a7926c821b | [
"Apache-2.0"
] | 23 | 2018-01-29T18:17:49.000Z | 2020-09-11T13:16:25.000Z | import unittest
from unittest import TestCase
from word2veclite.word2veclite import Word2Vec
import numpy as np
import tensorflow as tf
class TestFunctions(TestCase):
learning_rate = 0.1
W1 = np.ones((7, 2))
W2 = np.array([[0.2, 0.2, 0.3, 0.4, 0.5, 0.3, 0.2],
[0.3, 0., 0.1, 0., 1., 0.1... | 43.758242 | 132 | 0.561527 |
797a0fa8c59d2cd1734475fd8b484388b69b818b | 465 | py | Python | setup.py | BramDriesen/social-media-count | 4dbe3cbfbd32b0cc4bb5da114d7d390d7a87b1cb | [
"MIT"
] | null | null | null | setup.py | BramDriesen/social-media-count | 4dbe3cbfbd32b0cc4bb5da114d7d390d7a87b1cb | [
"MIT"
] | null | null | null | setup.py | BramDriesen/social-media-count | 4dbe3cbfbd32b0cc4bb5da114d7d390d7a87b1cb | [
"MIT"
] | null | null | null | from distutils.core import setup
setup(
name='social-media-count',
version='0.1dev',
author='Bram Driesen',
author_email='bram.opensource@gmail.com',
packages=['social-media-count'],
#url='http://pypi.python.org/pypi/TowelStuff/',
license='LICENSE.txt',
description='Library to fetch lik... | 27.352941 | 76 | 0.664516 |
797a1026ffd45702a2dd96e024bc6b4b81cb2caf | 11,867 | py | Python | humann/tools/util.py | wbazant/humann | 13e8c7910d9aff4cabb58df19aa652a3c20e101b | [
"MIT"
] | null | null | null | humann/tools/util.py | wbazant/humann | 13e8c7910d9aff4cabb58df19aa652a3c20e101b | [
"MIT"
] | null | null | null | humann/tools/util.py | wbazant/humann | 13e8c7910d9aff4cabb58df19aa652a3c20e101b | [
"MIT"
] | null | null | null | from __future__ import print_function # PYTHON 2.7+ REQUIRED
import os
import sys
import re
import subprocess
import csv
import gzip
import bz2
# ---------------------------------------------------------------
# utilities used by the split and join tables scripts
# -----------------------------------------------------... | 31.729947 | 95 | 0.548749 |
797a102cefb972e1dc5f27b0129f84f60fbb09eb | 13,882 | py | Python | flopy/mf6/utils/binaryfile_utils.py | ritchie46/flopy | 8e7284dcb3aaf5c12293d442248c2c2d9959f835 | [
"CC0-1.0",
"BSD-3-Clause"
] | null | null | null | flopy/mf6/utils/binaryfile_utils.py | ritchie46/flopy | 8e7284dcb3aaf5c12293d442248c2c2d9959f835 | [
"CC0-1.0",
"BSD-3-Clause"
] | null | null | null | flopy/mf6/utils/binaryfile_utils.py | ritchie46/flopy | 8e7284dcb3aaf5c12293d442248c2c2d9959f835 | [
"CC0-1.0",
"BSD-3-Clause"
] | null | null | null | import os
import numpy as np
from ...utils import binaryfile as bf
class MFOutput:
"""
Wrapper class for Binary Arrays. This class enables directly getting slices
from the binary output. It is intended to be called from the __getitem__
method of the SimulationDict() class. Implemented to co... | 36.245431 | 80 | 0.5237 |
797a10a60759e3183e204ad264a25a743928fb19 | 2,099 | py | Python | krippendorf_library_sample.py | joshmiller17/icr | 9ae27ef5c67307cb18895d6870cfc263d6549883 | [
"MIT"
] | null | null | null | krippendorf_library_sample.py | joshmiller17/icr | 9ae27ef5c67307cb18895d6870cfc263d6549883 | [
"MIT"
] | null | null | null | krippendorf_library_sample.py | joshmiller17/icr | 9ae27ef5c67307cb18895d6870cfc263d6549883 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import krippendorff
import numpy as np
def main():
print("Example from http://en.wikipedia.org/wiki/Krippendorff's_Alpha")
print()
reliability_data_str = (
"* * * * * 3 4 1 2 1 1 3 3 * 3", # coder A
"1 * 2 1 3 ... | 41.156863 | 114 | 0.409242 |
797a13fe943c0a71fa35eb03b7f2462dbb268156 | 556 | py | Python | python_code/angle_PID_no_GUI/daniel_plot.py | CooperControlsLab/CU-Home_feedback_controls | c5f031bed00f1643b2e9dac74c3b336cb98d7d9e | [
"MIT"
] | 2 | 2020-07-27T17:20:51.000Z | 2020-12-24T01:47:28.000Z | python_code/angle_PID_no_GUI/daniel_plot.py | CooperControlsLab/CU-Home_feedback_controls | c5f031bed00f1643b2e9dac74c3b336cb98d7d9e | [
"MIT"
] | null | null | null | python_code/angle_PID_no_GUI/daniel_plot.py | CooperControlsLab/CU-Home_feedback_controls | c5f031bed00f1643b2e9dac74c3b336cb98d7d9e | [
"MIT"
] | 5 | 2020-06-22T15:03:05.000Z | 2020-12-25T02:10:40.000Z | import matplotlib.pyplot as plt
import csv
import os
os.chdir(r"D:\\") #Change directory
x = []
y1 = []
y2 = []
def csv2list(input):
with open(input,'r') as csvfile:
next(csvfile, None)
plots = csv.reader(csvfile, delimiter=',')
for row in plots:
x.append(float(row[0]))
... | 20.592593 | 50 | 0.591727 |
797a1526f0d9682f44a802db38f9359157d2d7e8 | 2,871 | py | Python | Anchors/Anchor Mover.py | tiennguyen0910/Glyphs-Scripts | fca80d684fd152dda40093c5c43586545e6518e9 | [
"Apache-2.0"
] | null | null | null | Anchors/Anchor Mover.py | tiennguyen0910/Glyphs-Scripts | fca80d684fd152dda40093c5c43586545e6518e9 | [
"Apache-2.0"
] | null | null | null | Anchors/Anchor Mover.py | tiennguyen0910/Glyphs-Scripts | fca80d684fd152dda40093c5c43586545e6518e9 | [
"Apache-2.0"
] | null | null | null | #MenuTitle: Anchor Mover 1.1
# -*- coding: utf-8 -*-
__doc__="""
Vertically move anchors in selected glyphs (GUI).
"""
import vanilla
class AnchorMover(object):
def __init__(self):
self.w = vanilla.FloatingWindow((340, 40), "Move anchors")
self.w.text_anchor = vanilla.TextBox((15, 12+2, 45, 14), "Move", sizeSty... | 35.012195 | 138 | 0.700801 |
797a1692a219431451b002f260427a888aefb304 | 10,977 | py | Python | tests/integration/test_scm.py | aweeraman/debian-watchman | 65cc5e30f61e4f8e9bdb4a194f7b4adfa1d98155 | [
"Apache-2.0"
] | null | null | null | tests/integration/test_scm.py | aweeraman/debian-watchman | 65cc5e30f61e4f8e9bdb4a194f7b4adfa1d98155 | [
"Apache-2.0"
] | 2 | 2020-02-27T11:22:22.000Z | 2021-05-20T10:23:12.000Z | tests/integration/test_scm.py | aweeraman/debian-watchman | 65cc5e30f61e4f8e9bdb4a194f7b4adfa1d98155 | [
"Apache-2.0"
] | null | null | null | # vim:ts=4:sw=4:et:
# Copyright 2017-present Facebook, Inc.
# Licensed under the Apache License, Version 2.0
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
# no unicode literals
import WatchmanInstance
import WatchmanTestCase
import pywatchman
import os
im... | 41.422642 | 86 | 0.570101 |
797a16981b84949fd1257d0b383312bb3b4911f7 | 1,814 | py | Python | MeaKanu/03-CLASSIFICATION/ClassificationOutputTop5andTiles.py | HACC2018/Mea-Kanu | d1db0ad428cc30f71d84e01641ecfc57361385ad | [
"MIT"
] | 1 | 2019-01-16T18:46:36.000Z | 2019-01-16T18:46:36.000Z | MeaKanu/03-CLASSIFICATION/ClassificationOutputTop5andTiles.py | HACC2018/Mea-Kanu | d1db0ad428cc30f71d84e01641ecfc57361385ad | [
"MIT"
] | 1 | 2018-11-07T02:06:53.000Z | 2018-11-07T02:06:53.000Z | MeaKanu/03-CLASSIFICATION/ClassificationOutputTop5andTiles.py | HACC2018/Mea-Kanu | d1db0ad428cc30f71d84e01641ecfc57361385ad | [
"MIT"
] | 1 | 2018-11-07T10:55:15.000Z | 2018-11-07T10:55:15.000Z | from keras.models import model_from_json
import numpy as np
import os,cv2
from keras.utils import np_utils
import csv
#################################################################
## PLANT
# Define data path
data_pathp = 'D:/MeaKanu/01-SEGMENTATION/plant/a'
img_listp = sorted(os.listdir(data_pathp))
s... | 31.275862 | 89 | 0.646637 |
797a17872d44b397ad6adab11c1b45fb5905d4af | 2,521 | py | Python | data/bug_reports_division.py | studyaboard/IncBL-demo | 7a0768c6516cc6b5916a928921a086a8852be146 | [
"MIT"
] | 4 | 2021-07-27T14:19:54.000Z | 2022-02-03T03:05:53.000Z | data/bug_reports_division.py | studyaboard/IncBL-demo | 7a0768c6516cc6b5916a928921a086a8852be146 | [
"MIT"
] | 14 | 2021-06-24T02:07:50.000Z | 2021-11-09T05:07:23.000Z | data/bug_reports_division.py | studyaboard/IncBL-demo | 7a0768c6516cc6b5916a928921a086a8852be146 | [
"MIT"
] | 2 | 2021-06-11T15:24:01.000Z | 2021-06-24T01:41:26.000Z | import os
from dateutil.parser import parse
import xml.etree.ElementTree as ET
def bug_reports_division(bug_reports_base, storage_path):
dir_path = os.walk(bug_reports_base)
for parent_dir, dir_name, file_names in dir_path:
if file_names[0].split(".")[-1].strip() == "xml":
if not ... | 56.022222 | 164 | 0.574772 |
797a1823247c2ef3d80b6cbe5f4a28f229969dce | 688 | py | Python | pyconnectomist/preproc/__init__.py | neurospin/pyconnectomist | 81881fd88d94b3c2bd401602783261a64e818a05 | [
"CECILL-B"
] | 1 | 2018-05-24T13:02:41.000Z | 2018-05-24T13:02:41.000Z | pyconnectomist/preproc/__init__.py | neurospin/pyconnectomist | 81881fd88d94b3c2bd401602783261a64e818a05 | [
"CECILL-B"
] | null | null | null | pyconnectomist/preproc/__init__.py | neurospin/pyconnectomist | 81881fd88d94b3c2bd401602783261a64e818a05 | [
"CECILL-B"
] | 2 | 2018-06-25T14:20:34.000Z | 2022-03-02T14:43:38.000Z | ##########################################################################
# NSAp - Copyright (C) CEA, 2015 - 2016
# Distributed under the terms of the CeCILL-B license, as published by
# the CEA-CNRS-INRIA. Refer to the LICENSE file or to
# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html for details.
#####... | 38.222222 | 78 | 0.607558 |
797a187eca52fc52c362d8c91f10f93eee7e0729 | 4,367 | py | Python | GENBOT/old_versions/v4/agentCreator.py | Snd18/GENBOT_public | a60f69749ffdf43b9b688153d5c4a3488b3a9396 | [
"Apache-2.0"
] | null | null | null | GENBOT/old_versions/v4/agentCreator.py | Snd18/GENBOT_public | a60f69749ffdf43b9b688153d5c4a3488b3a9396 | [
"Apache-2.0"
] | null | null | null | GENBOT/old_versions/v4/agentCreator.py | Snd18/GENBOT_public | a60f69749ffdf43b9b688153d5c4a3488b3a9396 | [
"Apache-2.0"
] | null | null | null | import json
import copy
import io
import entityCreator as ec
import dataCreator as dc
import intentCreator as ic
'''
{
"apiVersion": "API_VERSION_V2",
"parent": "projects/sqlBot-1562750179610",
"displayName": "sqlBot-Plaques",
"defaultLanguageCode": "en",
"timeZone": "Europe/Paris"
}
Email address
starting... | 26.95679 | 271 | 0.586215 |
797a19801576cb8a3c58aea92c04378178e3a84d | 937 | py | Python | ДА+ДА=НЕТ.py | gil9red/SimplePyScripts | c191ce08fbdeb29377639184579e392057945154 | [
"CC-BY-4.0"
] | 117 | 2015-12-18T07:18:27.000Z | 2022-03-28T00:25:54.000Z | ДА+ДА=НЕТ.py | gil9red/SimplePyScripts | c191ce08fbdeb29377639184579e392057945154 | [
"CC-BY-4.0"
] | 8 | 2018-10-03T09:38:46.000Z | 2021-12-13T19:51:09.000Z | ДА+ДА=НЕТ.py | gil9red/SimplePyScripts | c191ce08fbdeb29377639184579e392057945154 | [
"CC-BY-4.0"
] | 28 | 2016-08-02T17:43:47.000Z | 2022-03-21T08:31:12.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'ipetrash'
# SOURCE: https://stepik.org/lesson/360560/step/10?unit=345000
"""
Дан ребус ДА + ДА = НЕТ. Необходимо заменить буквы цифрами так, чтобы получилось верное равенство.
Разным буквам соответствуют разные цифры. Число не может начинаться с нуля.
... | 31.233333 | 99 | 0.537887 |
797a1c01c38455cc4ee725e77593864ddec7bc68 | 3,277 | py | Python | tracked-sample/tracked_sample.py | echasnovski/curiosity-projects | cec93b20f6ec489d7fc12134de5207914d1683cd | [
"MIT"
] | null | null | null | tracked-sample/tracked_sample.py | echasnovski/curiosity-projects | cec93b20f6ec489d7fc12134de5207914d1683cd | [
"MIT"
] | null | null | null | tracked-sample/tracked_sample.py | echasnovski/curiosity-projects | cec93b20f6ec489d7fc12134de5207914d1683cd | [
"MIT"
] | null | null | null | import random
class TrackedSample:
"""Tracked random sampling
This implements sampling in which elements that can be sampled are
"tracked" in terms of ordering "from most to least recently used". Elements
ordered in that way is called "sampling pool" or just "pool".
Drawing elements from a pool ... | 33.438776 | 79 | 0.614892 |
797a1ce0890b171af707b17907083959452973a5 | 49 | py | Python | stream_alert/__init__.py | tuapuikia/streamalert | b1f733259aa051f8d533e7881018280fe77d7bda | [
"Apache-2.0"
] | null | null | null | stream_alert/__init__.py | tuapuikia/streamalert | b1f733259aa051f8d533e7881018280fe77d7bda | [
"Apache-2.0"
] | 1 | 2018-08-08T03:26:58.000Z | 2018-08-08T03:26:58.000Z | stream_alert/__init__.py | tuapuikia/streamalert | b1f733259aa051f8d533e7881018280fe77d7bda | [
"Apache-2.0"
] | null | null | null | """StreamAlert version."""
__version__ = '1.6.1'
| 16.333333 | 26 | 0.653061 |
797a1cf09d1304d8579503a722a9ae188a2dccfa | 5,018 | py | Python | amonguslobby/amonguslobby.py | ismaeelakram/Mahjestic-Cogs | f0140c6aef2b5bef069cb59f76db058d05876541 | [
"MIT"
] | 2 | 2020-12-06T10:27:28.000Z | 2020-12-08T01:14:03.000Z | amonguslobby/amonguslobby.py | IsmaeelAkram/Mahjestic-Cogs | f0140c6aef2b5bef069cb59f76db058d05876541 | [
"MIT"
] | 1 | 2020-12-19T21:36:23.000Z | 2020-12-19T21:36:23.000Z | amonguslobby/amonguslobby.py | ismaeelakram/Mahjestic-Cogs | f0140c6aef2b5bef069cb59f76db058d05876541 | [
"MIT"
] | 1 | 2022-03-03T19:40:22.000Z | 2022-03-03T19:40:22.000Z | from redbot.core import commands, checks
from redbot.core.bot import Config, Red
import discord
from discord.ext import commands as Commands
import logging
import asyncio
class AmongUsLobby(commands.Cog):
def __init__(self, bot: Red):
self.bot = bot
self.config = Config.get_conf(self, identifier=24... | 53.956989 | 512 | 0.713631 |
797a1e1daada5b13ead6d4ea988ce65c25ba885e | 320 | py | Python | core/tests/test_tec.py | rodolfolotte/tec | b97c39db7c90b87b5fe61888cf63111b2a32df5a | [
"MIT"
] | 4 | 2019-08-15T17:27:02.000Z | 2022-03-15T13:36:26.000Z | core/tests/test_tec.py | rodolfolotte/tec | b97c39db7c90b87b5fe61888cf63111b2a32df5a | [
"MIT"
] | null | null | null | core/tests/test_tec.py | rodolfolotte/tec | b97c39db7c90b87b5fe61888cf63111b2a32df5a | [
"MIT"
] | 2 | 2022-01-05T10:56:27.000Z | 2022-03-03T14:20:11.000Z | import unittest
# import core.tec as t
class RelativeTecTest(unittest.TestCase):
pass
class SlantTecTest(unittest.TestCase):
pass
class SubIonosphericPointTecTest(unittest.TestCase):
pass
class CalcZenitalAngleTecTest(unittest.TestCase):
pass
class Car2PolTecTest(unittest.TestCase):
pass
| 13.333333 | 52 | 0.765625 |
797a1e24d50fee1eb3b1c107a9e3f885865273a2 | 998 | py | Python | tests/testOrRule.py | andersonjwan/tltk-mtl-ext | a4f0314df6c55d532b7f9d169b6d08bff3811ef3 | [
"BSD-3-Clause"
] | 1 | 2020-12-11T21:32:46.000Z | 2020-12-11T21:32:46.000Z | tests/testOrRule.py | andersonjwan/tltk-mtl-ext | a4f0314df6c55d532b7f9d169b6d08bff3811ef3 | [
"BSD-3-Clause"
] | null | null | null | tests/testOrRule.py | andersonjwan/tltk-mtl-ext | a4f0314df6c55d532b7f9d169b6d08bff3811ef3 | [
"BSD-3-Clause"
] | null | null | null | import tltk_mtl as MTL
import tltk_mtl_ext as MTLE
def testOrRule():
preds = {}
preds['pred1'] = MTL.Predicate('pred1', 1, 2)
preds['pred2'] = MTL.Predicate('pred2', 2, 4)
preds['pred3'] = MTL.Predicate('pred3', 4, 8)
assert isinstance(MTLE.parse_mtl('pred1 || pred1', preds), MTL.Or), printFail(1)
printPass(1)... | 35.642857 | 109 | 0.694389 |
797a1ec6bad056f5c790d6103bd18405e0894b1c | 660 | py | Python | invenio_rdm_records/services/pids/tasks.py | inveniosoftware/invenio-datacite | d25e3670b74f132390fc42e5647765ae5c605ef3 | [
"MIT"
] | 10 | 2020-01-17T10:13:09.000Z | 2022-03-17T10:14:41.000Z | invenio_rdm_records/services/pids/tasks.py | inveniosoftware/invenio-datacite | d25e3670b74f132390fc42e5647765ae5c605ef3 | [
"MIT"
] | 570 | 2019-08-15T16:35:25.000Z | 2022-03-31T13:46:17.000Z | invenio_rdm_records/services/pids/tasks.py | inveniosoftware/invenio-datacite | d25e3670b74f132390fc42e5647765ae5c605ef3 | [
"MIT"
] | 57 | 2019-09-04T09:25:29.000Z | 2022-03-30T19:32:55.000Z | # -*- coding: utf-8 -*-
#
# Copyright (C) 2021 CERN.
#
# Invenio-RDM-Records is free software; you can redistribute it and/or modify
# it under the terms of the MIT License; see LICENSE file for more details.
"""RDM PIDs Service tasks."""
from celery import shared_task
from invenio_access.permissions import system_id... | 27.5 | 77 | 0.743939 |
797a1f0eb729224168d5892450cd860d5de10a57 | 200 | py | Python | server/songhelper/words_preprocessor.py | mezidia/song-helper | 059d02f4e5e4758bef04322ee53d1f1e815ba08b | [
"MIT"
] | 6 | 2021-02-10T10:50:18.000Z | 2021-08-21T10:44:37.000Z | server/songhelper/words_preprocessor.py | mezgoodle/song-helper | 059d02f4e5e4758bef04322ee53d1f1e815ba08b | [
"MIT"
] | 116 | 2021-02-10T08:09:03.000Z | 2022-03-30T01:50:02.000Z | server/songhelper/words_preprocessor.py | mezgoodle/song-helper | 059d02f4e5e4758bef04322ee53d1f1e815ba08b | [
"MIT"
] | 1 | 2021-08-16T14:31:13.000Z | 2021-08-16T14:31:13.000Z | class WordPreprocessor:
"""
Class for preprocessing some text for future use
"""
# Basic function to clean the text
def clean_text(self, text):
return text.strip().lower()
| 25 | 52 | 0.65 |
797a1f66d876d1e6c62c27fcb24656f27ff22a5f | 130 | py | Python | NN/Errors.py | wangjiangtao-NJPI/MachineLearning | 78124b56a26ec68efb3c517a4a2420860b6e4a75 | [
"MIT"
] | 1,107 | 2016-09-21T02:18:36.000Z | 2022-03-29T02:52:12.000Z | NN/Errors.py | wangjiangtao-NJPI/MachineLearning | 78124b56a26ec68efb3c517a4a2420860b6e4a75 | [
"MIT"
] | 18 | 2016-12-22T10:24:47.000Z | 2022-03-11T23:18:43.000Z | NN/Errors.py | wangjiangtao-NJPI/MachineLearning | 78124b56a26ec68efb3c517a4a2420860b6e4a75 | [
"MIT"
] | 776 | 2016-12-21T12:08:08.000Z | 2022-03-21T06:12:08.000Z | class LayerError(Exception):
pass
class BuildLayerError(Exception):
pass
class BuildNetworkError(Exception):
pass
| 11.818182 | 35 | 0.738462 |
797a200c754889ccfa137436f54cc517aaca09cb | 18,371 | py | Python | virtual/lib/python3.6/site-packages/sqlalchemy/dialects/sqlite/pysqlite.py | mag49/pitch | 5b065c28dfeeb4b57e5d0e81992bada16208daca | [
"Unlicense"
] | 2 | 2020-03-02T14:51:06.000Z | 2020-03-02T14:51:09.000Z | venv/Lib/site-packages/sqlalchemy/dialects/sqlite/pysqlite.py | Gushono/Projeto-cenforce | 978e42c975477ef2e8f57a7379eed55bc13286aa | [
"Apache-2.0"
] | 10 | 2020-02-29T18:22:57.000Z | 2021-04-08T19:36:23.000Z | venv/Lib/site-packages/sqlalchemy/dialects/sqlite/pysqlite.py | Gushono/Projeto-cenforce | 978e42c975477ef2e8f57a7379eed55bc13286aa | [
"Apache-2.0"
] | 2 | 2020-02-21T10:39:32.000Z | 2020-04-12T10:25:23.000Z | # sqlite/pysqlite.py
# Copyright (C) 2005-2020 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
r"""
.. dialect:: sqlite+pysqlite
:name: pysqlite
:dbapi: sqlite3
:co... | 39.936957 | 109 | 0.705188 |
797a2168347693c0ab35f60c0f1ffed1b7434573 | 342 | py | Python | bot/admin.py | pyaf/tpobot | d96a3650de46f6d43ab346d61b922b170cd5fdb2 | [
"MIT"
] | 4 | 2017-07-19T19:18:15.000Z | 2017-11-24T16:15:51.000Z | bot/admin.py | rishabhiitbhu/tpobot | d96a3650de46f6d43ab346d61b922b170cd5fdb2 | [
"MIT"
] | 5 | 2020-02-11T23:53:50.000Z | 2021-12-13T19:45:22.000Z | bot/admin.py | pyaf/tpobot | d96a3650de46f6d43ab346d61b922b170cd5fdb2 | [
"MIT"
] | 1 | 2017-08-27T20:40:50.000Z | 2017-08-27T20:40:50.000Z | from django.contrib import admin
from .models import Company, User
class CompanyAdmin(admin.ModelAdmin):
list_max_show_all = 500
list_display = ('company_name', 'modified_date', 'purpose')
ordering = ('modified_date',)
search_fields = ('company_name',)
admin.site.register(Company, CompanyAdmin)
admi... | 24.428571 | 63 | 0.74269 |
797a226d669aca4a6f2c3f1a1cb37cdf507cb12f | 1,326 | py | Python | data_basket/serializers/base.py | claydodo/data_basket | 733b7f00e7397aae907210d46cfffba685d55ec9 | [
"Unlicense"
] | null | null | null | data_basket/serializers/base.py | claydodo/data_basket | 733b7f00e7397aae907210d46cfffba685d55ec9 | [
"Unlicense"
] | null | null | null | data_basket/serializers/base.py | claydodo/data_basket | 733b7f00e7397aae907210d46cfffba685d55ec9 | [
"Unlicense"
] | null | null | null | __all__ = ['BasketSerializer']
class BasketSerializer(object):
type_name = ''
type_class = object
inline = False
ext = ''
def __init__(self, obj=None):
self.obj = obj
@property
def first_type_class(self):
if isinstance(self.type_class, (list, tuple)):
return s... | 23.263158 | 54 | 0.569382 |
797a229e1ed82ff01367b62f94345755b235f1d1 | 1,577 | py | Python | ayseberna/migrations/versions/640fae8d17a5_record_model.py | ibrahimediz/flaskrest | e0d52d35dc5b3aff8a7a15832c84e1c3882c4f36 | [
"MIT"
] | null | null | null | ayseberna/migrations/versions/640fae8d17a5_record_model.py | ibrahimediz/flaskrest | e0d52d35dc5b3aff8a7a15832c84e1c3882c4f36 | [
"MIT"
] | null | null | null | ayseberna/migrations/versions/640fae8d17a5_record_model.py | ibrahimediz/flaskrest | e0d52d35dc5b3aff8a7a15832c84e1c3882c4f36 | [
"MIT"
] | null | null | null | """Record model
Revision ID: 640fae8d17a5
Revises:
Create Date: 2022-01-30 09:52:50.169058
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '640fae8d17a5'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto gener... | 31.54 | 68 | 0.682308 |
797a23b3424a1fba805ea7837c619557d93b058f | 1,512 | py | Python | tests/test_countDowner.py | tjangoW/computerSitTimer | 2aad4f5d20ad121cb2de2f83e5e80b238e287eb5 | [
"MIT"
] | null | null | null | tests/test_countDowner.py | tjangoW/computerSitTimer | 2aad4f5d20ad121cb2de2f83e5e80b238e287eb5 | [
"MIT"
] | 5 | 2021-01-05T13:01:55.000Z | 2021-01-17T19:50:20.000Z | tests/test_countDowner.py | tjangoW/computerSitTimer | 2aad4f5d20ad121cb2de2f83e5e80b238e287eb5 | [
"MIT"
] | null | null | null | from time import sleep
from computerSitTimer.CountDowner import CountDowner
from datetime import timedelta
def test_formatting():
assert CountDowner.fmtDelta(timedelta(seconds=12, hours=32)) == " 32:00:12"
assert CountDowner.fmtDelta(timedelta(minutes=121, seconds=51)) == " 02:01:51"
def test_start_stop_se... | 21.913043 | 82 | 0.650794 |
797a2437ef9ee20af40e682b19634a34778f32eb | 880 | py | Python | utils/metrics.py | aa10402tw/RealTime-Segmentation | 8c5cf13cd5570c48fa7bae9e6ec014989450889d | [
"MIT"
] | null | null | null | utils/metrics.py | aa10402tw/RealTime-Segmentation | 8c5cf13cd5570c48fa7bae9e6ec014989450889d | [
"MIT"
] | null | null | null | utils/metrics.py | aa10402tw/RealTime-Segmentation | 8c5cf13cd5570c48fa7bae9e6ec014989450889d | [
"MIT"
] | null | null | null | from sklearn.metrics import confusion_matrix
import numpy as np
def iou(y_pred, y_true, labels):
y_pred = y_pred.astype(np.int32).flatten()
y_true = y_true.astype(np.int32).flatten()
cm = confusion_matrix(y_true, y_pred, labels=labels)
diag = np.diag(cm)
sum_row = np.sum(cm, axis=0)
sum_col = n... | 32.592593 | 63 | 0.609091 |
797a247b31177ebfbb4dfa9c278a60fb19c08e86 | 1,932 | py | Python | plugin_examples/cache_responses.py | opencollective/proxy.py | 3aa1dc28245c3d8e289424a261a805c7aed3eefa | [
"BSD-3-Clause"
] | null | null | null | plugin_examples/cache_responses.py | opencollective/proxy.py | 3aa1dc28245c3d8e289424a261a805c7aed3eefa | [
"BSD-3-Clause"
] | null | null | null | plugin_examples/cache_responses.py | opencollective/proxy.py | 3aa1dc28245c3d8e289424a261a805c7aed3eefa | [
"BSD-3-Clause"
] | 1 | 2019-12-12T16:54:28.000Z | 2019-12-12T16:54:28.000Z | # -*- coding: utf-8 -*-
"""
proxy.py
~~~~~~~~
⚡⚡⚡ Fast, Lightweight, Programmable, TLS interception capable
proxy server for Application debugging, testing and development.
:copyright: (c) 2013-present by Abhinav Singh and contributors.
:license: BSD, see LICENSE for more details.
"""
import os... | 31.16129 | 74 | 0.666149 |
797a2592b84d89f27e5cb3e26daac939cb0b6996 | 6,069 | py | Python | lib/python3.9/site-packages/google/auth/crypt/_python_rsa.py | gitloon/sopel | 8cf460fc9ee5c53c36cdfffcf019e6df4801515e | [
"EFL-2.0"
] | null | null | null | lib/python3.9/site-packages/google/auth/crypt/_python_rsa.py | gitloon/sopel | 8cf460fc9ee5c53c36cdfffcf019e6df4801515e | [
"EFL-2.0"
] | null | null | null | lib/python3.9/site-packages/google/auth/crypt/_python_rsa.py | gitloon/sopel | 8cf460fc9ee5c53c36cdfffcf019e6df4801515e | [
"EFL-2.0"
] | null | null | null | # Copyright 2016 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 34.87931 | 85 | 0.654144 |
797a261d377d7b7ea6af7e12872a718ac3c34738 | 195,116 | py | Python | src/sage/geometry/lattice_polytope.py | vbraun/sage | 07d6c37d18811e2b377a9689790a7c5e24da16ba | [
"BSL-1.0"
] | 3 | 2016-06-19T14:48:31.000Z | 2022-01-28T08:46:01.000Z | src/sage/geometry/lattice_polytope.py | vbraun/sage | 07d6c37d18811e2b377a9689790a7c5e24da16ba | [
"BSL-1.0"
] | null | null | null | src/sage/geometry/lattice_polytope.py | vbraun/sage | 07d6c37d18811e2b377a9689790a7c5e24da16ba | [
"BSL-1.0"
] | 7 | 2021-11-08T10:01:59.000Z | 2022-03-03T11:25:52.000Z | r"""
Lattice and reflexive polytopes
This module provides tools for work with lattice and reflexive
polytopes. A *convex polytope* is the convex hull of finitely many
points in `\RR^n`. The dimension `n` of a
polytope is the smallest `n` such that the polytope can be
embedded in `\RR^n`.
A *lattice polytope* is a pol... | 33.571232 | 114 | 0.529664 |
797a262c21a595f5d6e142e50092babd5ab96817 | 539 | py | Python | manage.py | MarianMalvin/blog | 0b9a37f8a8f30f57554cb756bc1d3d6acdf7dea0 | [
"MIT"
] | 1 | 2019-11-28T05:21:41.000Z | 2019-11-28T05:21:41.000Z | manage.py | MarianMalvin/blog | 0b9a37f8a8f30f57554cb756bc1d3d6acdf7dea0 | [
"MIT"
] | null | null | null | manage.py | MarianMalvin/blog | 0b9a37f8a8f30f57554cb756bc1d3d6acdf7dea0 | [
"MIT"
] | 1 | 2019-12-14T09:07:49.000Z | 2019-12-14T09:07:49.000Z | #!/usr/bin/env python
import os
import sys
if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'my_site.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are ... | 33.6875 | 73 | 0.686456 |
797a26ebaddd3649eac791d7023f74c4eb4e32a1 | 49 | py | Python | OpenPGP/__init__.py | mugwort-rc/pyOpenPGP | a1d35a93a69ed5bbec768f3c6347742630d71a15 | [
"MIT"
] | null | null | null | OpenPGP/__init__.py | mugwort-rc/pyOpenPGP | a1d35a93a69ed5bbec768f3c6347742630d71a15 | [
"MIT"
] | null | null | null | OpenPGP/__init__.py | mugwort-rc/pyOpenPGP | a1d35a93a69ed5bbec768f3c6347742630d71a15 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __OpenPGP import *
| 12.25 | 23 | 0.591837 |
797a285edb8112353170bc049baf588d1c47ec3a | 7,107 | py | Python | sdk/packages/detect_net/evaluation/cvat_to_cask.py | ddr95070/RMIsaac | ee3918f685f0a88563248ddea11d089581077973 | [
"FSFAP"
] | null | null | null | sdk/packages/detect_net/evaluation/cvat_to_cask.py | ddr95070/RMIsaac | ee3918f685f0a88563248ddea11d089581077973 | [
"FSFAP"
] | null | null | null | sdk/packages/detect_net/evaluation/cvat_to_cask.py | ddr95070/RMIsaac | ee3918f685f0a88563248ddea11d089581077973 | [
"FSFAP"
] | 1 | 2022-01-28T16:37:51.000Z | 2022-01-28T16:37:51.000Z | '''
Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related docu... | 42.813253 | 97 | 0.668214 |
797a293c46b4808faf1494f055b9684039fddb1b | 11,972 | py | Python | tests/grouping/test_grouping_utils.py | Slimane33/pennylane | fe5d1dffa152fd34e4f9224df02eecb219affa06 | [
"Apache-2.0"
] | null | null | null | tests/grouping/test_grouping_utils.py | Slimane33/pennylane | fe5d1dffa152fd34e4f9224df02eecb219affa06 | [
"Apache-2.0"
] | 1 | 2021-05-27T05:36:41.000Z | 2021-05-27T05:36:41.000Z | tests/grouping/test_grouping_utils.py | Slimane33/pennylane | fe5d1dffa152fd34e4f9224df02eecb219affa06 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018-2020 Xanadu Quantum Technologies Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or... | 40.309764 | 103 | 0.641079 |
797a2a3ca74bad2179833069957afbfa83389246 | 13,880 | py | Python | kanojo_tests.py | Goujer/kanojo_server | a8d24f8a607ef3989ec0bd09a5ec5ca922454669 | [
"Unlicense",
"MIT"
] | null | null | null | kanojo_tests.py | Goujer/kanojo_server | a8d24f8a607ef3989ec0bd09a5ec5ca922454669 | [
"Unlicense",
"MIT"
] | null | null | null | kanojo_tests.py | Goujer/kanojo_server | a8d24f8a607ef3989ec0bd09a5ec5ca922454669 | [
"Unlicense",
"MIT"
] | 2 | 2020-08-18T01:11:04.000Z | 2020-08-28T02:27:09.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__version__ = '0.1'
__author__ = 'Andrey Derevyagin'
__copyright__ = 'Copyright © 2014'
import copy
import random
import string
import unittest
from kanojo import KanojoManager
class KanojoTest(unittest.TestCase):
def __init__(self, *args, **kwargs):
super(K... | 77.977528 | 7,189 | 0.603026 |
797a2ad6c4398991388b208e3a59b7d58f91fa2d | 2,330 | py | Python | scripts/x1_state_republisher.py | StanfordASL/safe_traffic_weaving | e71ac6bf989046adcb2e5ae9821fa2fe3f4821e2 | [
"MIT"
] | 8 | 2018-12-13T12:17:26.000Z | 2022-03-18T06:05:44.000Z | scripts/x1_state_republisher.py | StanfordASL/safe_traffic_weaving | e71ac6bf989046adcb2e5ae9821fa2fe3f4821e2 | [
"MIT"
] | 2 | 2019-02-11T14:17:16.000Z | 2020-08-07T20:47:54.000Z | scripts/x1_state_republisher.py | StanfordASL/safe_traffic_weaving | e71ac6bf989046adcb2e5ae9821fa2fe3f4821e2 | [
"MIT"
] | 3 | 2019-08-07T02:40:00.000Z | 2020-10-06T00:48:45.000Z | #!/usr/bin/env python
import rospy
import numpy as np
import tf2_ros
from geometry_msgs.msg import TransformStamped, PoseStamped, TwistStamped, AccelStamped
from auto_messages.msg import from_autobox
from utils.math_utils import rotate, th_to_quat, TranslationalState, AngularState
rospy.init_node("x1_state_publisher",... | 35.846154 | 94 | 0.742918 |
797a2af2052169b9df8123035f1ddf9d60877879 | 27,604 | py | Python | sympy/polys/numberfields/minpoly.py | inducer/sympy | 551c16facb2081c7b7a085aeaf20316244a1da01 | [
"BSD-3-Clause"
] | null | null | null | sympy/polys/numberfields/minpoly.py | inducer/sympy | 551c16facb2081c7b7a085aeaf20316244a1da01 | [
"BSD-3-Clause"
] | null | null | null | sympy/polys/numberfields/minpoly.py | inducer/sympy | 551c16facb2081c7b7a085aeaf20316244a1da01 | [
"BSD-3-Clause"
] | null | null | null | """Minimal polynomials for algebraic numbers."""
from functools import reduce
from sympy.core.add import Add
from sympy.core.function import expand_mul, expand_multinomial
from sympy.core.mul import Mul
from sympy.core import (GoldenRatio, TribonacciConstant)
from sympy.core.numbers import (I, Rational, pi)
from symp... | 31.332577 | 90 | 0.543907 |
797a2b200aa30bd87214313652699d45d25728a5 | 476 | py | Python | apps/beatitud_corpus/contrib/drf/urls.py | beatitud/beatitud-back | 32de6c33ec5d70e35bf76c38bedc73c5b2c3e719 | [
"MIT"
] | null | null | null | apps/beatitud_corpus/contrib/drf/urls.py | beatitud/beatitud-back | 32de6c33ec5d70e35bf76c38bedc73c5b2c3e719 | [
"MIT"
] | null | null | null | apps/beatitud_corpus/contrib/drf/urls.py | beatitud/beatitud-back | 32de6c33ec5d70e35bf76c38bedc73c5b2c3e719 | [
"MIT"
] | null | null | null | from django.conf.urls import url
from apps.beatitud_corpus.contrib.drf.bible.views import BibleVerseViews
from apps.beatitud_corpus.contrib.drf.daily_readings.views import ReadingsViews
from apps.beatitud_corpus.contrib.drf.saint.views import SaintsViews
urlpatterns = [
url(r'^bible/verse/$', BibleVerseViews.as_v... | 43.272727 | 79 | 0.764706 |
797a2be29ac3a514a93a5da6317756f8b0d7bbdc | 9,063 | py | Python | titanic/submissions/4/randomforest.py | furgerf/kaggle-projects | e80a10fe01df2687adc7632bb2afaa0dcec05cbe | [
"Apache-2.0"
] | null | null | null | titanic/submissions/4/randomforest.py | furgerf/kaggle-projects | e80a10fe01df2687adc7632bb2afaa0dcec05cbe | [
"Apache-2.0"
] | null | null | null | titanic/submissions/4/randomforest.py | furgerf/kaggle-projects | e80a10fe01df2687adc7632bb2afaa0dcec05cbe | [
"Apache-2.0"
] | null | null | null | import csv as csv
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from sklearn.ensemble import RandomForestClassifier
import re
SEPARATOR = '-' * 80
print('')
print('')
print('')
print('')
print(SEPARATOR)
print('STARTING...')
print(SEPARATOR)
def load_data():
train_df = pd.read_csv('data/tra... | 36.544355 | 157 | 0.633565 |
797a2d2f7ef3a72969ff85618e9a4b30ae0f5059 | 12,382 | py | Python | tests/test_frame.py | st-walker/tfs | 7a229f4fecbf04d544c5116d79a281e4365ccd1d | [
"MIT"
] | 5 | 2019-02-18T14:38:59.000Z | 2021-12-14T15:33:50.000Z | tests/test_frame.py | st-walker/tfs | 7a229f4fecbf04d544c5116d79a281e4365ccd1d | [
"MIT"
] | 54 | 2019-02-19T14:44:36.000Z | 2022-02-16T15:07:53.000Z | tests/test_frame.py | st-walker/tfs | 7a229f4fecbf04d544c5116d79a281e4365ccd1d | [
"MIT"
] | 4 | 2019-10-17T08:58:57.000Z | 2022-02-15T15:55:18.000Z | import pathlib
from collections import OrderedDict
from functools import partial, reduce
import pandas as pd
import pytest
from pandas._testing import assert_dict_equal
from pandas.testing import assert_frame_equal
import tfs
from tfs.frame import TfsDataFrame, concat, merge_headers, validate
CURRENT_DIR = pathlib.P... | 49.330677 | 110 | 0.703279 |
797a2dfc1383ab080263597f2bf97e7b4b85679d | 46,831 | py | Python | tornado/test/iostream_test.py | ankitdobhal/tornado | 04268b7a0d96d9100c74534a8248afa69a0a01bf | [
"Apache-2.0"
] | 1 | 2021-08-19T11:22:42.000Z | 2021-08-19T11:22:42.000Z | tornado/test/iostream_test.py | ankitdobhal/tornado | 04268b7a0d96d9100c74534a8248afa69a0a01bf | [
"Apache-2.0"
] | null | null | null | tornado/test/iostream_test.py | ankitdobhal/tornado | 04268b7a0d96d9100c74534a8248afa69a0a01bf | [
"Apache-2.0"
] | null | null | null | from tornado.concurrent import Future
from tornado import gen
from tornado import netutil
from tornado.ioloop import IOLoop
from tornado.iostream import (
IOStream,
SSLIOStream,
PipeIOStream,
StreamClosedError,
_StreamBuffer,
)
from tornado.httputil import HTTPHeaders
from tornado.locks import Condi... | 36.190881 | 87 | 0.604066 |
797a2e508ee72b81ea9114f0318ae8e89a606103 | 1,800 | py | Python | Kiraro/Kiraro_Text/Clear.py | gun4qmm7h/Kiraro-Discord-Bot | c04b83d1d370368e471b727e51e3169428cbe0fb | [
"Apache-2.0"
] | null | null | null | Kiraro/Kiraro_Text/Clear.py | gun4qmm7h/Kiraro-Discord-Bot | c04b83d1d370368e471b727e51e3169428cbe0fb | [
"Apache-2.0"
] | null | null | null | Kiraro/Kiraro_Text/Clear.py | gun4qmm7h/Kiraro-Discord-Bot | c04b83d1d370368e471b727e51e3169428cbe0fb | [
"Apache-2.0"
] | 1 | 2021-01-25T19:06:17.000Z | 2021-01-25T19:06:17.000Z | import discord
from discord.ext import commands
from Kiraro import bot
import asyncio
# Clears the messages
@bot.command(aliases=['delete', 'c'])
@commands.has_permissions(manage_messages=True)
async def clear(ctx, amount):
if amount.lower() == "all":
await ctx.channel.purge(limit=None)
msg = await... | 36.734694 | 108 | 0.656111 |
797a2ed8423248925e21374fb99c4dbab2b9f328 | 598 | py | Python | djangosige/apps/cadastro/migrations/0003_auto_20170714_1703.py | MateusMolina/lunoERP | 0880adb93b3a2d3169c6780efa60a229272f927a | [
"MIT"
] | null | null | null | djangosige/apps/cadastro/migrations/0003_auto_20170714_1703.py | MateusMolina/lunoERP | 0880adb93b3a2d3169c6780efa60a229272f927a | [
"MIT"
] | null | null | null | djangosige/apps/cadastro/migrations/0003_auto_20170714_1703.py | MateusMolina/lunoERP | 0880adb93b3a2d3169c6780efa60a229272f927a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2017-07-14 20:03
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('cadastro', '0002_auto_20170625_1450'),
]
... | 27.181818 | 134 | 0.64214 |
797a30872e4dc025a9007a460758b8dd1b501ae3 | 1,552 | py | Python | setup.py | CDAT/unidata | cb5078676b5050404f5167fbf60c5dab9efa5f82 | [
"BSD-3-Clause"
] | null | null | null | setup.py | CDAT/unidata | cb5078676b5050404f5167fbf60c5dab9efa5f82 | [
"BSD-3-Clause"
] | null | null | null | setup.py | CDAT/unidata | cb5078676b5050404f5167fbf60c5dab9efa5f82 | [
"BSD-3-Clause"
] | null | null | null | from numpy.distutils.core import setup, Extension
import os, sys, cdat_info
try:
sys.path.append(os.environ.get('BUILD_DIR',"build"))
externals = cdat_info.externals
except:
externals = cdat_info.__path__
externals = os.environ.get("EXTERNALS",externals)
target_prefix = sys.prefix
for i in range(l... | 29.846154 | 91 | 0.589562 |
797a313b696d9a88ece265ebe387545af1a85466 | 630 | py | Python | pyhcl/dsl/funcs.py | tootal/PyChip-py-hcl | f0b3d635f4e3fce7d8a1babadcca05dc15bd690f | [
"MIT"
] | 3 | 2021-01-13T03:41:14.000Z | 2021-03-23T11:31:48.000Z | pyhcl/dsl/funcs.py | tootal/PyChip-py-hcl | f0b3d635f4e3fce7d8a1babadcca05dc15bd690f | [
"MIT"
] | 1 | 2021-03-01T09:32:59.000Z | 2021-03-01T09:32:59.000Z | pyhcl/dsl/funcs.py | tootal/PyChip-py-hcl | f0b3d635f4e3fce7d8a1babadcca05dc15bd690f | [
"MIT"
] | 4 | 2021-01-07T03:01:26.000Z | 2021-02-28T02:20:10.000Z | from functools import reduce
def CatBits(*args):
if len(args) == 1:
return args[0]
else:
from pyhcl.core._repr import Cat
half = len(args) >> 1
lf = CatBits(*args[:half])
rt = CatBits(*args[half:])
return Cat(lf, rt)
def CatVecL2H(vec):
return CatBits(*[i ... | 18.529412 | 70 | 0.595238 |
797a326672a94969dbb987bbdb9355d3d8c29e69 | 163 | py | Python | Aula01/teste.py | vnnstar/Python-Faculdade-Impacta | 3e7171f1f090c0774710b43110e06afb196e0ef5 | [
"MIT"
] | null | null | null | Aula01/teste.py | vnnstar/Python-Faculdade-Impacta | 3e7171f1f090c0774710b43110e06afb196e0ef5 | [
"MIT"
] | null | null | null | Aula01/teste.py | vnnstar/Python-Faculdade-Impacta | 3e7171f1f090c0774710b43110e06afb196e0ef5 | [
"MIT"
] | null | null | null | conjunto_a = {1, 1, 3, 4, 5}
conjunto_b = {1, 3, 6}
conjunto_a.add(6)
conjunto_a.remove(1)
resultado = list(conjunto_a.intersection(conjunto_b))
print(resultado)
| 20.375 | 53 | 0.723926 |
797a3306e66ac17ca57bc7eaa6b2c2080032c638 | 1,024 | py | Python | models/network2.py | zhoufengfan/vision-transformers-cifar10 | 1a587fc4ae8b846edae2755b97a2e352b88ba233 | [
"MIT"
] | 1 | 2021-02-04T03:01:44.000Z | 2021-02-04T03:01:44.000Z | models/network2.py | zhoufengfan/vision-transformers-cifar10 | 1a587fc4ae8b846edae2755b97a2e352b88ba233 | [
"MIT"
] | 1 | 2021-04-12T12:44:38.000Z | 2021-04-20T00:35:23.000Z | backbone.py | zhoufengfan/torchvision_resnet | bae0d6664f8c32d96e2166d8f6d6163e274d988e | [
"MIT"
] | null | null | null | import torch.nn as nn
import torchvision
import cv2
import torch
import torchvision.transforms as transforms
class Network2(nn.Module):
def __init__(self):
super().__init__()
self.resnet18 = torchvision.models.resnet18(pretrained=False)
self.fc = nn.Linear(1000, 10)
sel... | 30.117647 | 72 | 0.643555 |
797a33671d8ce4cf725551393652545d268ee6c5 | 11,152 | py | Python | src/MFRC522.py | pstuart2/my-pi-scripts | ff610bc338e5c3374c68f2707ca17abfff8f9ebc | [
"MIT"
] | null | null | null | src/MFRC522.py | pstuart2/my-pi-scripts | ff610bc338e5c3374c68f2707ca17abfff8f9ebc | [
"MIT"
] | null | null | null | src/MFRC522.py | pstuart2/my-pi-scripts | ff610bc338e5c3374c68f2707ca17abfff8f9ebc | [
"MIT"
] | null | null | null | # https://github.com/pimylifeup/MFRC522-python
import RPi.GPIO as GPIO
import spi
import signal
import time
class MFRC522:
NRSTPD = 25
MAX_LEN = 16
PCD_IDLE = 0x00
PCD_AUTHENT = 0x0E
PCD_RECEIVE = 0x08
PCD_TRANSMIT = 0x04
PCD_TRANSCEIVE = 0x0C
PCD_RESETPHASE = 0x0F
PCD_CALCCRC =... | 28.232911 | 102 | 0.558644 |
797a34c70be71901d4fdba9e66d63e42ee96443e | 1,987 | py | Python | utils/archive/post_process.py | heather999/snmachine | d4cecf7d12879d3c01dd8afda585416f031ddf69 | [
"BSD-3-Clause"
] | 1 | 2021-09-15T09:58:37.000Z | 2021-09-15T09:58:37.000Z | utils/archive/post_process.py | heather999/snmachine | d4cecf7d12879d3c01dd8afda585416f031ddf69 | [
"BSD-3-Clause"
] | 12 | 2021-07-15T10:04:15.000Z | 2022-03-18T11:56:48.000Z | utils/archive/post_process.py | heather999/snmachine | d4cecf7d12879d3c01dd8afda585416f031ddf69 | [
"BSD-3-Clause"
] | 1 | 2021-09-15T12:28:55.000Z | 2021-09-15T12:28:55.000Z | """
Simple post-processing code for recombining feature sets after running in parallel.
"""
from astropy.table import Table, vstack
import numpy as np
from collections import Counter
import sys
dataset='lsst_main'
root='/home/mlochner/sn_output/output_%s_no_z/features/' %dataset
features=sys.argv[1]
nruns=18 #How ma... | 28.385714 | 102 | 0.673377 |
797a35e222b53b44d83207ade6d54463b4c0caf2 | 29 | py | Python | notionist/__init__.py | TooTouch/notionist | d3e78e0656301adfbf2a52f7fc8edf36ac2cc596 | [
"Apache-2.0"
] | 5 | 2020-06-06T12:46:00.000Z | 2021-03-20T15:26:49.000Z | notionist/__init__.py | TooTouch/notionist | d3e78e0656301adfbf2a52f7fc8edf36ac2cc596 | [
"Apache-2.0"
] | null | null | null | notionist/__init__.py | TooTouch/notionist | d3e78e0656301adfbf2a52f7fc8edf36ac2cc596 | [
"Apache-2.0"
] | 3 | 2020-09-12T21:05:47.000Z | 2021-05-17T01:58:57.000Z | __all__ = ['collection_api']
| 14.5 | 28 | 0.724138 |
797a36051c63b3e72f0a88fdf817390b2e958919 | 16,527 | py | Python | rowboat/models/user.py | DeJayDev/speedboat | ecce2075b69d8e18de17fac0daa702eb59cfcddd | [
"MIT"
] | 16 | 2021-01-03T14:00:48.000Z | 2022-03-01T21:03:27.000Z | rowboat/models/user.py | DeJayDev/speedboat | ecce2075b69d8e18de17fac0daa702eb59cfcddd | [
"MIT"
] | 14 | 2020-11-20T07:00:09.000Z | 2022-03-12T01:02:08.000Z | rowboat/models/user.py | SethBots/speedboat | e516261e9d34031045c70522955e8babe3d8ec6e | [
"MIT"
] | 9 | 2018-09-12T20:50:44.000Z | 2020-06-20T15:58:52.000Z | from datetime import datetime
from rowboat.plugins.modlog.core import Actions
from disco.api.http import APIException
from disco.types.guild import GuildMember
from holster.enum import Enum
from peewee import BigIntegerField, IntegerField, TextField, BooleanField, DateTimeField
from playhouse.postgres_ext import Binar... | 30.269231 | 109 | 0.562897 |
797a3687915834fae3aae9530aedeeeee112506c | 720 | py | Python | quiz/migrations/0001_initial.py | jstavanja/quiz-biometrics-api | 75e0db348668b14a85f94261aac092ae2d5fa9c6 | [
"MIT"
] | null | null | null | quiz/migrations/0001_initial.py | jstavanja/quiz-biometrics-api | 75e0db348668b14a85f94261aac092ae2d5fa9c6 | [
"MIT"
] | null | null | null | quiz/migrations/0001_initial.py | jstavanja/quiz-biometrics-api | 75e0db348668b14a85f94261aac092ae2d5fa9c6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-08-23 16:47
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('keystroke', '0004_keystroketestcomparison... | 27.692308 | 138 | 0.643056 |
797a36fb417fb76496384beb1c5bdf6c09acee6b | 159 | py | Python | plotly/graph_objs/layout/ternary/aaxis/__init__.py | mprostock/plotly.py | 3471c3dfbf783927c203c676422260586514b341 | [
"MIT"
] | 12 | 2020-04-18T18:10:22.000Z | 2021-12-06T10:11:15.000Z | plotly/graph_objs/layout/ternary/aaxis/__init__.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 27 | 2020-04-28T21:23:12.000Z | 2021-06-25T15:36:38.000Z | plotly/graph_objs/layout/ternary/aaxis/__init__.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 6 | 2020-04-18T23:07:08.000Z | 2021-11-18T07:53:06.000Z | from ._title import Title
from plotly.graph_objs.layout.ternary.aaxis import title
from ._tickformatstop import Tickformatstop
from ._tickfont import Tickfont
| 31.8 | 56 | 0.855346 |
797a37d4dca8d092b95eff176cea69d4ff85c0eb | 4,163 | py | Python | examples/classification/news_title_category_finder.py | mertozen/TextMiningProject | 4ddd2ce39525cc263e64167f68c3e8472a4da231 | [
"Apache-2.0"
] | 1 | 2019-12-02T19:53:06.000Z | 2019-12-02T19:53:06.000Z | examples/classification/news_title_category_finder.py | Nurhak/Zemberek-Python-Examples | 165ab1fcab1bb26e49b79ad9a9d738401f0e7510 | [
"Apache-2.0"
] | null | null | null | examples/classification/news_title_category_finder.py | Nurhak/Zemberek-Python-Examples | 165ab1fcab1bb26e49b79ad9a9d738401f0e7510 | [
"Apache-2.0"
] | 1 | 2019-12-16T05:34:49.000Z | 2019-12-16T05:34:49.000Z | """
Zemberek: News Title Category Finder Example
Documentation: https://bit.ly/2BNKPmP
Original Java Example: https://bit.ly/32TUtQU
fastText Documentation: https://bit.ly/31YVBS8
"""
from collections import Counter
from os.path import isfile, join
from typing import List, Optional
from jpype import JClass, JString, ... | 30.837037 | 77 | 0.597166 |
797a381a9c7298980aa9e429dde443c5dbcecd1c | 1,204 | py | Python | integrations/tensorflow/build_tools/testdata/generate_errors_module.py | kintel/iree | 7dbe1aea471e880327694ffbfc0b536f1e587f2c | [
"Apache-2.0"
] | 1,163 | 2019-09-13T19:10:42.000Z | 2022-03-31T05:44:10.000Z | integrations/tensorflow/build_tools/testdata/generate_errors_module.py | kintel/iree | 7dbe1aea471e880327694ffbfc0b536f1e587f2c | [
"Apache-2.0"
] | 3,346 | 2019-09-23T04:16:36.000Z | 2022-03-31T23:56:57.000Z | integrations/tensorflow/build_tools/testdata/generate_errors_module.py | kintel/iree | 7dbe1aea471e880327694ffbfc0b536f1e587f2c | [
"Apache-2.0"
] | 311 | 2019-09-19T02:34:23.000Z | 2022-03-28T16:06:57.000Z | # Lint as: python3
# Copyright 2021 The IREE Authors
#
# Licensed under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
"""Generates sample models for excercising various function signatures.
Usage:
ge... | 25.083333 | 77 | 0.721761 |
797a385019fbfbb632be135a30fcfb6da6de280d | 9,013 | py | Python | resolwe/flow/models/entity.py | JureZmrzlikar/resolwe | 2c967b5fa06b6b7daeee88b3fca4cd19d10d99c3 | [
"Apache-2.0"
] | null | null | null | resolwe/flow/models/entity.py | JureZmrzlikar/resolwe | 2c967b5fa06b6b7daeee88b3fca4cd19d10d99c3 | [
"Apache-2.0"
] | null | null | null | resolwe/flow/models/entity.py | JureZmrzlikar/resolwe | 2c967b5fa06b6b7daeee88b3fca4cd19d10d99c3 | [
"Apache-2.0"
] | null | null | null | """Resolwe entity model."""
from django.contrib.postgres.fields import CICharField
from django.contrib.postgres.indexes import GinIndex
from django.core.exceptions import ValidationError
from django.db import models, transaction
from django.utils.timezone import now
from resolwe.permissions.shortcuts import get_object... | 35.070039 | 88 | 0.654055 |
797a38ae36983ed4cf187d63ebaf59365c0440ae | 3,532 | py | Python | python/tvm/autotvm/graph_tuner/utils/utils.py | poldni/tvm | 3653e0294c962d400e4fcde536a350fda07ea78c | [
"Apache-2.0"
] | null | null | null | python/tvm/autotvm/graph_tuner/utils/utils.py | poldni/tvm | 3653e0294c962d400e4fcde536a350fda07ea78c | [
"Apache-2.0"
] | null | null | null | python/tvm/autotvm/graph_tuner/utils/utils.py | poldni/tvm | 3653e0294c962d400e4fcde536a350fda07ea78c | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 30.713043 | 77 | 0.66308 |
797a396f8d5e1e067b1792b0c229c788a2829462 | 6,561 | py | Python | inmembrane/__init__.py | pansapiens/inmembrane | 382eee3b2bacc9c567f65d7c48f1ddf9a86c253c | [
"BSD-2-Clause"
] | 4 | 2015-03-09T02:08:34.000Z | 2021-02-06T13:52:21.000Z | inmembrane/__init__.py | pansapiens/inmembrane | 382eee3b2bacc9c567f65d7c48f1ddf9a86c253c | [
"BSD-2-Clause"
] | 5 | 2015-01-29T03:36:04.000Z | 2021-12-08T07:20:42.000Z | inmembrane/__init__.py | pansapiens/inmembrane | 382eee3b2bacc9c567f65d7c48f1ddf9a86c253c | [
"BSD-2-Clause"
] | 6 | 2015-03-09T02:08:43.000Z | 2021-06-07T17:33:16.000Z | __version__ = "0.95.0" # Must be a semantic version number
import helpers
import os, shutil
module_dir = os.path.abspath(os.path.dirname(__file__))
default_params_str = """{
'fasta': '',
'csv': '',
'out_dir': '',
'protocol': 'gram_pos', # 'gram_neg'
#### Signal peptide and transmembrane helix prediction
... | 35.085561 | 79 | 0.66118 |
797a39a1ea2fbe63fd5a0c23d9736c935b44a296 | 6,053 | py | Python | pid-controller/ev3_line_follower.py | mimoralea/kalman-karma | df65bc0c0547d6c52e950cc30f79efc5cd42e5e7 | [
"MIT"
] | 3 | 2018-03-26T13:15:35.000Z | 2021-12-20T15:57:56.000Z | pid-controller/ev3_line_follower.py | mimoralea/kalman-karma | df65bc0c0547d6c52e950cc30f79efc5cd42e5e7 | [
"MIT"
] | null | null | null | pid-controller/ev3_line_follower.py | mimoralea/kalman-karma | df65bc0c0547d6c52e950cc30f79efc5cd42e5e7 | [
"MIT"
] | 3 | 2018-03-26T13:15:37.000Z | 2018-10-01T16:52:19.000Z | #!/usr/bin/python
"""
PID implementation:
P -> proportional
I -> integral
D -> derivative
+----------+--------+---------+--------+-----------+
|Increasing|Rise |Overshoot|Setting |Error at |
|constant |time | |time |equilibrium|
+----------+--------+---------+--------+-----------+
|kp |Decre... | 34.19774 | 113 | 0.581034 |
797a3a9cc283fc4d216358ab4037cb28a126365f | 4,727 | py | Python | src/prediction/aux_functions.py | iurteaga/menstrual_cycle_analysis | 799c7cb59d759e0c3929164bccdc5c7ce80324d0 | [
"MIT"
] | 5 | 2020-03-05T23:30:26.000Z | 2022-02-27T18:16:23.000Z | src/prediction/aux_functions.py | iurteaga/menstrual_cycle_analysis | 799c7cb59d759e0c3929164bccdc5c7ce80324d0 | [
"MIT"
] | null | null | null | src/prediction/aux_functions.py | iurteaga/menstrual_cycle_analysis | 799c7cb59d759e0c3929164bccdc5c7ce80324d0 | [
"MIT"
] | 2 | 2021-03-26T19:56:51.000Z | 2021-12-22T02:26:14.000Z | #!/usr/bin/python
import numpy as np
import torch
import pdb
import sys, os, re, time
import pickle
# Compute variance of MC samples
def mc_variance(samples, mean, weights, max_memory_in_bytes=None):
'''
Input:
samples: I by M matrix of MC samples
mean: I by 1 matrix of samples... | 48.731959 | 155 | 0.604189 |
797a3be8a7091e378f6b8f975dbaa2c0d8deec2f | 12,838 | py | Python | federatedml/param/logistic_regression_param.py | fqiang/FATE | 36a5a41848f78df7be1e520ae804e64bc67d72fb | [
"Apache-2.0"
] | 1 | 2020-02-07T01:27:32.000Z | 2020-02-07T01:27:32.000Z | federatedml/param/logistic_regression_param.py | fqiang/FATE | 36a5a41848f78df7be1e520ae804e64bc67d72fb | [
"Apache-2.0"
] | null | null | null | federatedml/param/logistic_regression_param.py | fqiang/FATE | 36a5a41848f78df7be1e520ae804e64bc67d72fb | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE 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/lic... | 46.179856 | 120 | 0.614114 |
797a3bf5ca6d5032a69a5d60faa09dde658010d0 | 2,735 | py | Python | src/neuralkg/lit_model/CompGCNLitModel.py | zjukg/NeuralKG | 9fe97c29496ed08bc72c76e4dd71e72cbfbe5afa | [
"Apache-2.0"
] | 52 | 2022-01-19T09:08:07.000Z | 2022-03-31T07:02:17.000Z | src/neuralkg/lit_model/CompGCNLitModel.py | zjukg/NeuralKG | 9fe97c29496ed08bc72c76e4dd71e72cbfbe5afa | [
"Apache-2.0"
] | 2 | 2022-03-08T20:47:38.000Z | 2022-03-18T09:52:33.000Z | src/neuralkg/lit_model/CompGCNLitModel.py | zjukg/NeuralKG | 9fe97c29496ed08bc72c76e4dd71e72cbfbe5afa | [
"Apache-2.0"
] | 10 | 2022-02-28T07:54:14.000Z | 2022-03-23T14:06:33.000Z | from logging import debug
import pytorch_lightning as pl
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
import os
import json
from collections import defaultdict as ddict
from IPython import embed
from .BaseLitModel import BaseLitModel
from neuralkg.eval_task import *
from IPython... | 37.465753 | 103 | 0.639854 |
797a3c4ee77bf22217b60e6ce885ea26971491c5 | 8,969 | py | Python | django-openstack/django_openstack/dash/views/networks.py | CiscoSystems/openstack-dashboard | de2dbd8fbce64806caaee9f7aad561dfadce2eb9 | [
"Apache-2.0"
] | 8 | 2015-05-18T13:49:04.000Z | 2021-10-01T12:15:07.000Z | django-openstack/django_openstack/dash/views/networks.py | CiscoSystems/openstack-dashboard | de2dbd8fbce64806caaee9f7aad561dfadce2eb9 | [
"Apache-2.0"
] | null | null | null | django-openstack/django_openstack/dash/views/networks.py | CiscoSystems/openstack-dashboard | de2dbd8fbce64806caaee9f7aad561dfadce2eb9 | [
"Apache-2.0"
] | 4 | 2015-01-22T14:19:44.000Z | 2019-11-11T05:57:21.000Z | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2011 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# no... | 35.733068 | 79 | 0.639313 |
797a3c8fe53c01866d2bfe528bf7c4dd52ac0462 | 1,054 | py | Python | scripts/reprint_gff.py | uio-cees/willibr-TE-pipeline | f769159cf2b08839233aae72c1f972010de45f15 | [
"MIT"
] | null | null | null | scripts/reprint_gff.py | uio-cees/willibr-TE-pipeline | f769159cf2b08839233aae72c1f972010de45f15 | [
"MIT"
] | null | null | null | scripts/reprint_gff.py | uio-cees/willibr-TE-pipeline | f769159cf2b08839233aae72c1f972010de45f15 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
William Brynildsen
"""
from Bio import SeqIO
import sys, argparse
if __name__ == '__main__':
parser = argparse.ArgumentParser(description=
'')
parser.add_argument('-i', '--input', action='store', help='', type=argparse.FileType('r'), default = '-')
parser.add_argument('-t', '--table'... | 27.025641 | 180 | 0.639469 |
797a3cf65680ce73524acfffbffcf5002960a1dd | 827 | py | Python | setup.py | rockie-yang/recommenders | dc291dc520e7776f501f065a8e72a675c4a7d124 | [
"MIT"
] | null | null | null | setup.py | rockie-yang/recommenders | dc291dc520e7776f501f065a8e72a675c4a7d124 | [
"MIT"
] | null | null | null | setup.py | rockie-yang/recommenders | dc291dc520e7776f501f065a8e72a675c4a7d124 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
setup(name="recommenders",
version="0.0.1",
author="ms",
author_email="author@example.com",
# description="A small example package",
# long_description=long_description,
# long_description_content_type="text/markdown",
# url="https:/... | 35.956522 | 85 | 0.607013 |
797a3cfb17de4a7a30cbf3118294975b0056139f | 2,420 | py | Python | common/xrd-ui-tests-python/tests/xroad_ss_client_certification_213/XroadSecurityServerClientKeyDeletion.py | nordic-institute/X-Road-tests | e030661a0ad8ceab74dd8122b751e88025a3474a | [
"MIT"
] | 1 | 2019-02-09T00:16:54.000Z | 2019-02-09T00:16:54.000Z | common/xrd-ui-tests-python/tests/xroad_ss_client_certification_213/XroadSecurityServerClientKeyDeletion.py | nordic-institute/X-Road-tests | e030661a0ad8ceab74dd8122b751e88025a3474a | [
"MIT"
] | 1 | 2018-06-06T08:33:32.000Z | 2018-06-06T08:33:32.000Z | common/xrd-ui-tests-python/tests/xroad_ss_client_certification_213/XroadSecurityServerClientKeyDeletion.py | nordic-institute/X-Road-tests | e030661a0ad8ceab74dd8122b751e88025a3474a | [
"MIT"
] | 3 | 2018-07-09T08:51:00.000Z | 2020-07-23T18:40:24.000Z | from __future__ import absolute_import
import unittest
from helpers import xroad, auditchecker
from main.maincontroller import MainController
from tests.xroad_ss_client_certification_213 import client_certification
class XroadSecurityServerClientKeyDeletion(unittest.TestCase):
"""
SS_36 Delete a Key from a ... | 39.672131 | 118 | 0.68595 |
797a3d0a09cd0bac94e3e3906cfb3978fcf1416a | 1,010 | py | Python | scheduler/admin.py | shusiner/RSC_1 | b9620a25b3037a919df748d8d5935aa37017342d | [
"MIT"
] | null | null | null | scheduler/admin.py | shusiner/RSC_1 | b9620a25b3037a919df748d8d5935aa37017342d | [
"MIT"
] | null | null | null | scheduler/admin.py | shusiner/RSC_1 | b9620a25b3037a919df748d8d5935aa37017342d | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Guard, Manager, Site, Schedule
from django.contrib.auth.admin import UserAdmin
from .models import User
# Register your models here.
#admin.site.register(Guard)
#admin.site.register(Manager)
#admin.site.register(Site)
#admin.site.register(Schedule)
# Define the ad... | 28.055556 | 81 | 0.761386 |
797a403d45e1e2c7e5e20628040717f015ddc496 | 1,809 | py | Python | nipype/interfaces/fsl/tests/test_auto_ErodeImage.py | felixsc1/nipype | e722d6170593583f16ddfcb95473e5d30b5f1d7c | [
"Apache-2.0"
] | 8 | 2019-05-29T09:38:30.000Z | 2021-01-20T03:36:59.000Z | nipype/interfaces/fsl/tests/test_auto_ErodeImage.py | felixsc1/nipype | e722d6170593583f16ddfcb95473e5d30b5f1d7c | [
"Apache-2.0"
] | 12 | 2021-03-09T03:01:16.000Z | 2022-03-11T23:59:36.000Z | nipype/interfaces/fsl/tests/test_auto_ErodeImage.py | felixsc1/nipype | e722d6170593583f16ddfcb95473e5d30b5f1d7c | [
"Apache-2.0"
] | 1 | 2020-07-17T12:49:49.000Z | 2020-07-17T12:49:49.000Z | # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from __future__ import unicode_literals
from ..maths import ErodeImage
def test_ErodeImage_inputs():
input_map = dict(
args=dict(argstr='%s', ),
environ=dict(
nohash=True,
usedefault=True,
),
in_file=dict... | 26.217391 | 67 | 0.501935 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.