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
4a1c44a2ece75af5f3adb234674129a8dbefcc0d
96
py
Python
gyomei_trainer/metrics/__init__.py
KonstantinDob/gyomei_trainer
028628d09205b0bb4c411d39d51a00add58aecc2
[ "MIT" ]
null
null
null
gyomei_trainer/metrics/__init__.py
KonstantinDob/gyomei_trainer
028628d09205b0bb4c411d39d51a00add58aecc2
[ "MIT" ]
null
null
null
gyomei_trainer/metrics/__init__.py
KonstantinDob/gyomei_trainer
028628d09205b0bb4c411d39d51a00add58aecc2
[ "MIT" ]
null
null
null
from gyomei_trainer.metrics.loss import Loss from gyomei_trainer.metrics.metrics import Metrics
32
50
0.875
4a1c44da60a33da5c8e2fa01222b73c47e603799
1,593
py
Python
store_project/urls.py
cristian-rincon/py-drf-crud
4f75dd5aeb99efba9be91af3f00372aa9990c083
[ "MIT" ]
null
null
null
store_project/urls.py
cristian-rincon/py-drf-crud
4f75dd5aeb99efba9be91af3f00372aa9990c083
[ "MIT" ]
null
null
null
store_project/urls.py
cristian-rincon/py-drf-crud
4f75dd5aeb99efba9be91af3f00372aa9990c083
[ "MIT" ]
null
null
null
"""store_project URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class...
38.853659
81
0.731325
4a1c45925f763e04e93ee28e21427a3dbbabac5c
2,358
py
Python
examples/glyphs/choropleth.py
rothnic/bokeh
8da5e16b260a75caa8e7ef4caf215bb93dd784db
[ "BSD-3-Clause" ]
1
2015-07-17T13:57:01.000Z
2015-07-17T13:57:01.000Z
examples/glyphs/choropleth.py
evidation-health/bokeh
2c580d93419033b962d36e3c46d7606cc2f24606
[ "BSD-3-Clause" ]
null
null
null
examples/glyphs/choropleth.py
evidation-health/bokeh
2c580d93419033b962d36e3c46d7606cc2f24606
[ "BSD-3-Clause" ]
1
2016-03-18T03:01:59.000Z
2016-03-18T03:01:59.000Z
from __future__ import print_function from bokeh.browserlib import view from bokeh.document import Document from bokeh.embed import file_html from bokeh.models.glyphs import Patches from bokeh.models import ( Plot, DataRange1d, ColumnDataSource, ResizeTool ) from bokeh.resources import INLINE from bokeh.sampledata...
33.211268
150
0.693384
4a1c45bc049f562e3ec498f8204fb821e6720677
539
py
Python
learn1.py
8055aa/Python3Code
ac832241b87c02a3b3e1b216dbcd3cfbd0293b7c
[ "Apache-2.0" ]
null
null
null
learn1.py
8055aa/Python3Code
ac832241b87c02a3b3e1b216dbcd3cfbd0293b7c
[ "Apache-2.0" ]
null
null
null
learn1.py
8055aa/Python3Code
ac832241b87c02a3b3e1b216dbcd3cfbd0293b7c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import sys countries = ["Denmark","Finland","Norway","Sweden"] list1 = ['spam', 'eggs', 'Apple', 100, 1234] def getInt(msg): while True: try: i = int(input(msg)) return i except ValueError as err: print("please input Int") for x in ...
19.962963
55
0.513915
4a1c45f5fc2f01cebff02c9d13f577a5f3828c78
13,096
py
Python
wikidataQuery.py
nvbln/LT
4ba7ffc6222fa6a8159ff4f0222ee0ea15e098ed
[ "MIT" ]
null
null
null
wikidataQuery.py
nvbln/LT
4ba7ffc6222fa6a8159ff4f0222ee0ea15e098ed
[ "MIT" ]
12
2019-06-08T14:25:52.000Z
2019-06-11T20:56:13.000Z
wikidataQuery.py
nvbln/LT
4ba7ffc6222fa6a8159ff4f0222ee0ea15e098ed
[ "MIT" ]
null
null
null
# Functions needed for making queries for WikiData import requests import settings import traceback import json import simplejson import datefinder from textblob import TextBlob # TODO account for band member occupation properties # A pre-defined dictionary for difficult terms property_dict = {'band members': 'has par...
37.204545
126
0.551924
4a1c46505af14d934f7ad0041c80713f6efc9372
21,576
py
Python
sdk/python/pulumi_azure_native/network/v20181101/express_route_circuit_connection.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20181101/express_route_circuit_connection.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20181101/express_route_circuit_connection.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
57.536
4,005
0.706433
4a1c46e495a995e378e61e588042dc8749b44a4b
560
py
Python
saefportal/analyzer/tests/utils.py
harry-consulting/SAEF
12ef43bbcc3178b8a988e21c1bef035881cf6e6d
[ "BSD-2-Clause" ]
4
2020-12-16T13:14:26.000Z
2022-03-26T08:54:12.000Z
saefportal/analyzer/tests/utils.py
harry-consulting/SAEF
12ef43bbcc3178b8a988e21c1bef035881cf6e6d
[ "BSD-2-Clause" ]
1
2022-03-26T09:09:04.000Z
2022-03-26T09:09:04.000Z
saefportal/analyzer/tests/utils.py
harry-consulting/SAEF
12ef43bbcc3178b8a988e21c1bef035881cf6e6d
[ "BSD-2-Clause" ]
1
2020-12-16T13:20:17.000Z
2020-12-16T13:20:17.000Z
from datetime import datetime def validate_configuration(configuration_dict): missing_configuration = [] for key, value in configuration_dict.items(): if not value: missing_configuration.append(key) if len(missing_configuration) > 0: raise ValueError( f'Missing con...
31.111111
89
0.701786
4a1c4756e96c07ef67eb135e2e99ac897b495b0c
1,099
py
Python
var/spack/repos/builtin/packages/py-lockfile/package.py
MiddelkoopT/spack
4d94c4c4600f42a7a3bb3d06ec879140bc259304
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/py-lockfile/package.py
MiddelkoopT/spack
4d94c4c4600f42a7a3bb3d06ec879140bc259304
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/py-lockfile/package.py
MiddelkoopT/spack
4d94c4c4600f42a7a3bb3d06ec879140bc259304
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyLockfile(PythonPackage): """The lockfile package exports a LockFile class which provides...
42.269231
96
0.734304
4a1c48b3c98799b8559a03a75ce50f134a69ea2f
1,676
py
Python
B2G/gecko/testing/mozbase/mozdevice/tests/sut_mkdir.py
wilebeast/FireFox-OS
43067f28711d78c429a1d6d58c77130f6899135f
[ "Apache-2.0" ]
3
2015-08-31T15:24:31.000Z
2020-04-24T20:31:29.000Z
B2G/gecko/testing/mozbase/mozdevice/tests/sut_mkdir.py
wilebeast/FireFox-OS
43067f28711d78c429a1d6d58c77130f6899135f
[ "Apache-2.0" ]
null
null
null
B2G/gecko/testing/mozbase/mozdevice/tests/sut_mkdir.py
wilebeast/FireFox-OS
43067f28711d78c429a1d6d58c77130f6899135f
[ "Apache-2.0" ]
3
2015-07-29T07:17:15.000Z
2020-11-04T06:55:37.000Z
from sut import MockAgent import mozdevice import unittest class PushTest(unittest.TestCase): def test_mkdirs(self): subTests = [ { 'cmds': [ ("isdir /mnt", "TRUE"), ("isdir /mnt/sdcard", "TRUE"), ("isdir /mnt/sdcard/baz", "FALSE"), ...
41.9
104
0.440334
4a1c4a596e768f241e34bb3af818a607eda8dda5
14,225
py
Python
kmip/core/factories/attribute_values.py
richscze/PyKMIP
8b3643b135341b2b3de419b0b19a19849bbe6fe0
[ "Apache-2.0" ]
179
2015-03-20T06:08:59.000Z
2022-03-14T02:24:38.000Z
kmip/core/factories/attribute_values.py
imharshr/PyKMIP
9403ff3d2aa83de4c786b8eedeb85d169fd4a594
[ "Apache-2.0" ]
600
2015-04-08T14:14:48.000Z
2022-03-28T13:49:47.000Z
kmip/core/factories/attribute_values.py
imharshr/PyKMIP
9403ff3d2aa83de4c786b8eedeb85d169fd4a594
[ "Apache-2.0" ]
131
2015-03-30T12:51:49.000Z
2022-03-23T04:34:34.000Z
# Copyright (c) 2014 The Johns Hopkins University/Applied Physics Laboratory # 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/LICEN...
48.220339
78
0.65884
4a1c4bcf5e6c96cf2d0d45cbf954d7dacb9e09a8
3,103
py
Python
packages/python/plotly/plotly/validators/funnel/hoverlabel/font/__init__.py
sgn/plotly.py
587075c9f5a57a3dd60b03b2d47d925fbbb9b9b6
[ "MIT" ]
3
2020-02-04T21:39:20.000Z
2020-11-17T19:07:07.000Z
packages/python/plotly/plotly/validators/funnel/hoverlabel/font/__init__.py
sgn/plotly.py
587075c9f5a57a3dd60b03b2d47d925fbbb9b9b6
[ "MIT" ]
12
2020-06-06T01:22:26.000Z
2022-03-12T00:13:42.000Z
packages/python/plotly/plotly/validators/funnel/hoverlabel/font/__init__.py
sgn/plotly.py
587075c9f5a57a3dd60b03b2d47d925fbbb9b9b6
[ "MIT" ]
17
2019-11-21T14:11:29.000Z
2019-11-21T15:26:23.000Z
import _plotly_utils.basevalidators class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="funnel.hoverlabel.font", **kwargs ): super(SizesrcValidator, self).__init__( plotly_name=plotly_name, parent_na...
30.722772
85
0.627457
4a1c4bf42f6c4652cea29c42b9c6c1b6d1a141b5
823
py
Python
mayan/apps/document_indexing/admin.py
mdsteveb/mayan-edms
f67856fccdb1041202c179bdb85e24d5ca3d277e
[ "Apache-2.0" ]
null
null
null
mayan/apps/document_indexing/admin.py
mdsteveb/mayan-edms
f67856fccdb1041202c179bdb85e24d5ca3d277e
[ "Apache-2.0" ]
1
2022-03-12T01:03:39.000Z
2022-03-12T01:03:39.000Z
mayan/apps/document_indexing/admin.py
mdsteveb/mayan-edms
f67856fccdb1041202c179bdb85e24d5ca3d277e
[ "Apache-2.0" ]
null
null
null
from __future__ import unicode_literals from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from .models import Index, IndexInstanceNode, IndexTemplateNode class IndexTemplateNodeInline(admin.StackedInline): extra = 0 list_display = ('expression', 'enabled', 'link_docume...
27.433333
121
0.747266
4a1c4c073321d9b072eeda04fbbd221c8c419e00
937
py
Python
GPM/FunctionsPd.py
ChampionApe/GPM_v06
643c8cf6a2dc63475582ae2fb90e76f392ef450c
[ "MIT" ]
null
null
null
GPM/FunctionsPd.py
ChampionApe/GPM_v06
643c8cf6a2dc63475582ae2fb90e76f392ef450c
[ "MIT" ]
null
null
null
GPM/FunctionsPd.py
ChampionApe/GPM_v06
643c8cf6a2dc63475582ae2fb90e76f392ef450c
[ "MIT" ]
null
null
null
from _Equations import * def fPointer(v,**kwargs): if isinstance(v,tuple): return v[0](v[1],**kwargs) elif isinstance(v, dict): return rc_pd(v) elif isinstance(v, (rctree_scalar_types,rctree_admissable_types)): return v def adjustsparsedomains(v, bctype='infer',index = None, CheckDomains = False, **kwargs): ...
36.038462
108
0.684098
4a1c4c662572696a50f5401648cabb21c9e0ecae
3,723
py
Python
test_muffin.py
elunna/muffin
1d5179148ef00ce3c1c63891c06c47efe9a7429e
[ "Apache-2.0" ]
null
null
null
test_muffin.py
elunna/muffin
1d5179148ef00ce3c1c63891c06c47efe9a7429e
[ "Apache-2.0" ]
null
null
null
test_muffin.py
elunna/muffin
1d5179148ef00ce3c1c63891c06c47efe9a7429e
[ "Apache-2.0" ]
null
null
null
""" Tests for the muffin module. """ import os import pytest from .muffin import * from test_configs import * @pytest.yield_fixture(autouse=True) def cleanup(): wipe_dir(TEST_PROJ) yield None wipe_dir(TEST_PROJ) def test_wipedir_created_dir_dne(): testdir = 'some_random_directory_xxx1234' ensure...
28.204545
105
0.715821
4a1c4c8920de42224cca02c1482784f8d2164c83
499
py
Python
utility_scripts/charpartition_generator.py
roblanf/PartitionedAlignments
64f59e313703f0281071d77df95cbd0291eefdc3
[ "CC-BY-3.0" ]
10
2017-05-15T02:50:27.000Z
2021-09-27T06:27:03.000Z
utility_scripts/charpartition_generator.py
roblanf/BenchmarkAlignments
64f59e313703f0281071d77df95cbd0291eefdc3
[ "CC-BY-3.0" ]
20
2018-10-09T03:05:06.000Z
2019-05-01T01:58:35.000Z
utility_scripts/charpartition_generator.py
roblanf/BenchmarkAlignments
64f59e313703f0281071d77df95cbd0291eefdc3
[ "CC-BY-3.0" ]
5
2017-05-15T02:50:46.000Z
2020-06-24T05:43:59.000Z
# a little script to generate charpartitions from files of charsets filename = "/Users/roblanfear/Desktop/sets.txt" charsets = open(filename, 'r').readlines() names = [s.split("=")[0].split("CHARSET")[1].strip() for s in charsets] parts = [] for i, n in enumerate(names): print i, n part = ''.join([str(i+1), ...
26.263158
71
0.663327
4a1c4d38d0ef8737c641174dfc41ee874b155168
1,437
py
Python
code-challanges/401_code_challenges/left_join/test_left_join.py
schoentr/data-structures-and-algorithms
535ac617a2ab32293014946b043bdb40a647d43b
[ "MIT" ]
null
null
null
code-challanges/401_code_challenges/left_join/test_left_join.py
schoentr/data-structures-and-algorithms
535ac617a2ab32293014946b043bdb40a647d43b
[ "MIT" ]
1
2019-03-11T02:13:58.000Z
2019-03-11T02:13:58.000Z
code-challanges/401_code_challenges/left_join/test_left_join.py
schoentr/data-structures-and-algorithms
535ac617a2ab32293014946b043bdb40a647d43b
[ "MIT" ]
null
null
null
from left_join.left_join import left_join from hashtable.hashtable import Hashtable def test_one(): ht1 = Hashtable() ht1.add('chris', 'ball') ht1.add('tim', 'schoen') ht1.add('tony', 'tiger') ht1.add('uncle', 'joe') ht2 = Hashtable() ht2.add('chris','jones') ht2.add('jack','danials') ...
28.74
125
0.568546
4a1c4d8ba101731f0a9a1b0982e7ff956f6c68de
925
py
Python
Notify/urls.py
MichaelNjoroge254/Notify-Alerts
877f820db060f7f631105bca515b8839b3ad4411
[ "MIT" ]
null
null
null
Notify/urls.py
MichaelNjoroge254/Notify-Alerts
877f820db060f7f631105bca515b8839b3ad4411
[ "MIT" ]
null
null
null
Notify/urls.py
MichaelNjoroge254/Notify-Alerts
877f820db060f7f631105bca515b8839b3ad4411
[ "MIT" ]
null
null
null
"""Notify URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based ...
35.576923
77
0.718919
4a1c4dd140ba59b714432b86f0ef95849127f1b5
3,942
py
Python
models.py
hjdw2/GAN_model_parallel
587d80f7647438721393b13c3c282ebe1840e02d
[ "Apache-2.0" ]
1
2020-05-07T05:57:02.000Z
2020-05-07T05:57:02.000Z
models.py
hjdw2/GAN_model_parallel
587d80f7647438721393b13c3c282ebe1840e02d
[ "Apache-2.0" ]
null
null
null
models.py
hjdw2/GAN_model_parallel
587d80f7647438721393b13c3c282ebe1840e02d
[ "Apache-2.0" ]
null
null
null
import numpy as np import ctypes import multiprocessing as mp import torch import torch.nn as nn from torch.autograd import Variable class Generator(nn.Module): def __init__(self, args): super(Generator, self).__init__() self.main = nn.Sequential( # input is Z, going into a convolution ...
38.271845
72
0.529934
4a1c4ec7cdf6a8e40502c4e75291dbd5f7d97d18
9,901
py
Python
jina/clients/mixin.py
kuraakhilesh8230/jina
7cc23944fcdfd9944dc805ce8a116818d45317ee
[ "Apache-2.0" ]
null
null
null
jina/clients/mixin.py
kuraakhilesh8230/jina
7cc23944fcdfd9944dc805ce8a116818d45317ee
[ "Apache-2.0" ]
1
2022-03-08T18:46:28.000Z
2022-03-08T18:47:24.000Z
jina/clients/mixin.py
kuraakhilesh8230/jina
7cc23944fcdfd9944dc805ce8a116818d45317ee
[ "Apache-2.0" ]
null
null
null
from functools import partialmethod, wraps from typing import Optional, Dict, List, AsyncGenerator, TYPE_CHECKING, Union import warnings from inspect import signature from jina.helper import run_async, get_or_reuse_loop from jina.importer import ImportExtensions if TYPE_CHECKING: from jina.clients.base import Cal...
40.08502
137
0.63741
4a1c4ee6b2d9001fb07063832e7eeadf393ae865
8,913
py
Python
salt/states/ssh_auth.py
sunbenxin/salt
b821f6a174e67a3e1def1ba7fa16885cd985bb0c
[ "Apache-2.0" ]
null
null
null
salt/states/ssh_auth.py
sunbenxin/salt
b821f6a174e67a3e1def1ba7fa16885cd985bb0c
[ "Apache-2.0" ]
null
null
null
salt/states/ssh_auth.py
sunbenxin/salt
b821f6a174e67a3e1def1ba7fa16885cd985bb0c
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Control of entries in SSH authorized_key files. =============================================== The information stored in a user's SSH authorized key file can be easily controlled via the ssh_auth state. Defaults can be set by the enc, options, and comment keys. These defaults can be overri...
29.611296
80
0.518232
4a1c4f072f1694db5693711e081d4e96ae05ef98
1,150
py
Python
scripts/glamod-config.py
glamod/glamod-cdm-lite
026d87d499feaf7ee3611cf1c112384f3819e653
[ "BSD-2-Clause" ]
1
2020-06-16T14:29:26.000Z
2020-06-16T14:29:26.000Z
scripts/glamod-config.py
glamod/glamod-cdm-lite
026d87d499feaf7ee3611cf1c112384f3819e653
[ "BSD-2-Clause" ]
75
2020-01-17T12:25:58.000Z
2021-04-29T14:48:52.000Z
scripts/glamod-config.py
glamod/glamod-cdm-lite
026d87d499feaf7ee3611cf1c112384f3819e653
[ "BSD-2-Clause" ]
2
2020-07-03T11:11:04.000Z
2020-08-03T14:19:54.000Z
#!/usr/bin/env python """ glamod-config.py ================ Script to query/access glamod configuration info. """ import os import sys # Work out base directory and add lib to path BASE_DIR = '/'.join(os.path.abspath(__file__).split('/')[:-2]) sys.path.append(f'{BASE_DIR}/lib') import glamod.settings as gs def ...
18.548387
85
0.634783
4a1c51a7e20ff64ec19dab06e7fb28fda892824c
47
py
Python
enthought/traits/ui/qt4/menu.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
3
2016-12-09T06:05:18.000Z
2018-03-01T13:00:29.000Z
enthought/traits/ui/qt4/menu.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
1
2020-12-02T00:51:32.000Z
2020-12-02T08:48:55.000Z
enthought/traits/ui/qt4/menu.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
null
null
null
# proxy module from traitsui.qt4.menu import *
15.666667
31
0.765957
4a1c5392f82600eea607f8364f0c7440dbc0ef8e
4,356
py
Python
python/sqlcommenter-python/tests/sqlalchemy/tests.py
Thiyagu2009/opentelemetry-sqlcommenter
9c9b371c50ecd2956f527377b2663a113a2c47fb
[ "Apache-2.0" ]
null
null
null
python/sqlcommenter-python/tests/sqlalchemy/tests.py
Thiyagu2009/opentelemetry-sqlcommenter
9c9b371c50ecd2956f527377b2663a113a2c47fb
[ "Apache-2.0" ]
null
null
null
python/sqlcommenter-python/tests/sqlalchemy/tests.py
Thiyagu2009/opentelemetry-sqlcommenter
9c9b371c50ecd2956f527377b2663a113a2c47fb
[ "Apache-2.0" ]
1
2021-11-13T13:22:21.000Z
2021-11-13T13:22:21.000Z
#!/usr/bin/python # # Copyright The OpenTelemetry Authors # # 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...
33.767442
104
0.648072
4a1c54c3853a2261d12cde97a67d07505b60e07e
961
py
Python
lookup_inst_nodes.py
DarkStarSword/miasmata-fixes
d320f5e68cd5ebabd14efd7af021afa7e63d161e
[ "MIT" ]
10
2015-06-13T17:27:18.000Z
2021-02-14T13:03:11.000Z
lookup_inst_nodes.py
DarkStarSword/miasmata-fixes
d320f5e68cd5ebabd14efd7af021afa7e63d161e
[ "MIT" ]
2
2020-07-11T18:34:57.000Z
2021-03-07T02:27:46.000Z
lookup_inst_nodes.py
DarkStarSword/miasmata-fixes
d320f5e68cd5ebabd14efd7af021afa7e63d161e
[ "MIT" ]
1
2016-03-23T22:26:23.000Z
2016-03-23T22:26:23.000Z
#!/usr/bin/env python import sys import os import inst_header def main(): (x, y) = map(float, sys.argv[1:3]) # Rotate coord 90 degrees clockwise (transpose then mirror x): (x, y) = (inst_header.width - y, x) print 'Rotated back to inst coordinates: %d x %d' % (x, y) plot_point(x, y, (255, 255, 255), (230, 230,...
26.694444
93
0.579605
4a1c551403406fde8129cec8a4afdf18e2fadba7
1,017
py
Python
centreseq/bin/tree/wrappers.py
bfssi-forest-dussault/centreseq
6e2ba259d21336b6e610ea46be0d2d3414650ddc
[ "MIT" ]
1
2019-07-20T02:00:33.000Z
2019-07-20T02:00:33.000Z
centreseq/bin/tree/wrappers.py
BFSSI-Bioinformatics-Lab/centreseq
6e2ba259d21336b6e610ea46be0d2d3414650ddc
[ "MIT" ]
null
null
null
centreseq/bin/tree/wrappers.py
BFSSI-Bioinformatics-Lab/centreseq
6e2ba259d21336b6e610ea46be0d2d3414650ddc
[ "MIT" ]
null
null
null
from pathlib import Path from centreseq.bin.core.accessories import run_subprocess def call_snp_sites(aligned_multifasta: Path, outdir: Path) -> Path: """ Calls snp-sites on an aligned multiFASTA file and produces a VCF file as output. Will only generate an output file if variants are detected. http...
31.78125
86
0.711898
4a1c5603694030b5bf35c2c781cba3a88443eb91
4,075
py
Python
src/collectors/jolokia/cassandra_jolokia.py
prune998/Diamond-1
fc12f0d9291d90c4cb4ae4367857a2f6d777f687
[ "MIT" ]
null
null
null
src/collectors/jolokia/cassandra_jolokia.py
prune998/Diamond-1
fc12f0d9291d90c4cb4ae4367857a2f6d777f687
[ "MIT" ]
null
null
null
src/collectors/jolokia/cassandra_jolokia.py
prune998/Diamond-1
fc12f0d9291d90c4cb4ae4367857a2f6d777f687
[ "MIT" ]
null
null
null
# coding=utf-8 """ Collects Cassandra JMX metrics from the Jolokia Agent. Extends the JolokiaCollector to interpret Histogram beans with information about the distribution of request latencies. #### Example Configuration CassandraJolokiaCollector uses a regular expression to determine which attributes represent hist...
41.581633
120
0.69546
4a1c5923637e4fcec45e723278650465503813dd
1,953
py
Python
core/minimax_lua.py
GeeksIncorporated/umka
aa1800543f197f882fad912808169f25478815ba
[ "MIT" ]
1
2019-09-25T20:28:23.000Z
2019-09-25T20:28:23.000Z
core/minimax_lua.py
GeeksIncorporated/umka
aa1800543f197f882fad912808169f25478815ba
[ "MIT" ]
1
2019-03-22T11:05:11.000Z
2019-03-22T11:05:11.000Z
core/minimax_lua.py
GeeksIncorporated/umka
aa1800543f197f882fad912808169f25478815ba
[ "MIT" ]
null
null
null
import time import chess from lupa import LuaRuntime class MiniMaxLua: def __init__(self, umka): self.umka = umka self.lua = LuaRuntime(unpack_returned_tuples=True) def run(self, board, depth): self.nodes = 0 self.st = time.time() best_val = float('-inf') beta ...
28.304348
91
0.549923
4a1c595416b40ec2ac83fd04967d681b90d0c49c
4,238
py
Python
service-mgmt-client/sm-client/sm_client/openstack/common/rootwrap/cmd.py
SidneyAn/ha
cdac11bc63e02c70b7bb533e17cf981bb2c71aef
[ "Apache-2.0" ]
null
null
null
service-mgmt-client/sm-client/sm_client/openstack/common/rootwrap/cmd.py
SidneyAn/ha
cdac11bc63e02c70b7bb533e17cf981bb2c71aef
[ "Apache-2.0" ]
null
null
null
service-mgmt-client/sm-client/sm_client/openstack/common/rootwrap/cmd.py
SidneyAn/ha
cdac11bc63e02c70b7bb533e17cf981bb2c71aef
[ "Apache-2.0" ]
null
null
null
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2011 OpenStack Foundation. # 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....
34.455285
78
0.619632
4a1c5a5e74e865e19042296554cb37c0e27035ee
688
py
Python
test/rml-star/RMLSTARTC006b/test_RMLSTARTC006b_CSV.py
ArenasGuerreroJulian/morph-kgc
d14a773ff95922918daf32a447833e012bbde660
[ "Apache-2.0" ]
24
2021-10-07T21:53:22.000Z
2022-01-05T13:19:48.000Z
test/rml-star/RMLSTARTC006b/test_RMLSTARTC006b_CSV.py
ArenasGuerreroJulian/morph-kgc
d14a773ff95922918daf32a447833e012bbde660
[ "Apache-2.0" ]
16
2021-09-30T16:50:25.000Z
2022-01-02T11:20:41.000Z
test/rml-star/RMLSTARTC006b/test_RMLSTARTC006b_CSV.py
ArenasGuerreroJulian/morph-kgc
d14a773ff95922918daf32a447833e012bbde660
[ "Apache-2.0" ]
2
2022-02-02T12:14:45.000Z
2022-03-03T13:05:22.000Z
__author__ = "Julián Arenas-Guerrero" __credits__ = ["Julián Arenas-Guerrero"] __license__ = "Apache-2.0" __maintainer__ = "Julián Arenas-Guerrero" __email__ = "arenas.guerrero.julian@outlook.com" import os import morph_kgc from pyoxigraph import Store def test_RMLSTARTC006b(): g = Store() g.bulk_load(os....
27.52
110
0.739826
4a1c5af24cfdec7cbc0265d2b43ee68ea5dabb8a
6,063
py
Python
sdk/python/pulumi_azure_native/cdn/v20150601/get_origin.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/cdn/v20150601/get_origin.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/cdn/v20150601/get_origin.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __a...
37.196319
226
0.652647
4a1c5b9c7080af9758031f0e4c02fb7608cac079
7,432
py
Python
core/models/event.py
darkismus/kompassi
35dea2c7af2857a69cae5c5982b48f01ba56da1f
[ "CC-BY-3.0" ]
13
2015-11-29T12:19:12.000Z
2021-02-21T15:42:11.000Z
core/models/event.py
darkismus/kompassi
35dea2c7af2857a69cae5c5982b48f01ba56da1f
[ "CC-BY-3.0" ]
23
2015-04-29T19:43:34.000Z
2021-02-10T05:50:17.000Z
core/models/event.py
darkismus/kompassi
35dea2c7af2857a69cae5c5982b48f01ba56da1f
[ "CC-BY-3.0" ]
11
2015-09-20T18:59:00.000Z
2020-02-07T08:47:34.000Z
import logging from datetime import timedelta from django.conf import settings from django.db import models from django.db.models import Q from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from ..utils import ( format_date_range, pick_attrs, SLUG_FIELD_PARAMS, s...
29.03125
137
0.608854
4a1c5cec3f134469672854321e6e0144068750b3
206
py
Python
dota2website/models.py
theLambda/DBH-project1
9b7b1c9bd9f6629724c53872c60b1171e9ba1fa2
[ "MIT" ]
null
null
null
dota2website/models.py
theLambda/DBH-project1
9b7b1c9bd9f6629724c53872c60b1171e9ba1fa2
[ "MIT" ]
null
null
null
dota2website/models.py
theLambda/DBH-project1
9b7b1c9bd9f6629724c53872c60b1171e9ba1fa2
[ "MIT" ]
null
null
null
from django.db import models class Topic(models.Model): text = models.CharField(max_length=200) date_added = models.DateTimeField(auto_now_add=True) def __str__(self): return self.text
25.75
56
0.728155
4a1c5d0e859fda3bc3ec5a73562bb74257ea74d4
4,229
py
Python
analyzer/random-process-name/src/fr_model.py
Foundstone/OpenCNA
ff2ff08b9f6439cd1176bf020ea428cc03710d17
[ "Apache-2.0" ]
7
2017-11-29T23:24:12.000Z
2021-02-01T02:33:51.000Z
analyzer/random-process-name/src/fr_model.py
Foundstone/OpenCNA
ff2ff08b9f6439cd1176bf020ea428cc03710d17
[ "Apache-2.0" ]
null
null
null
analyzer/random-process-name/src/fr_model.py
Foundstone/OpenCNA
ff2ff08b9f6439cd1176bf020ea428cc03710d17
[ "Apache-2.0" ]
4
2017-11-29T16:29:16.000Z
2018-01-19T17:00:29.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- ################################################################################ # Copyright (c) 2017 McAfee Inc. - All Rights Reserved. ################################################################################ __author__ = "Jorge Couchet" import traceback import cPick...
35.537815
90
0.584062
4a1c5de8ac64f8d2cf36a1efaff8678c68403b49
55
py
Python
scripts/show_release.py
mardiros/purgatory
5905619c0f153eae090c46ed5cd7f165c86eafd5
[ "BSD-3-Clause" ]
null
null
null
scripts/show_release.py
mardiros/purgatory
5905619c0f153eae090c46ed5cd7f165c86eafd5
[ "BSD-3-Clause" ]
11
2021-12-29T21:28:50.000Z
2022-01-17T08:09:38.000Z
scripts/show_release.py
mardiros/purgatory
5905619c0f153eae090c46ed5cd7f165c86eafd5
[ "BSD-3-Clause" ]
null
null
null
import purgatory print(purgatory.__version__, end="")
13.75
36
0.781818
4a1c5e663d3a303ffe7d31c4f2fa267a5dd77293
402
py
Python
sdk/python/pulumi_azure/bot/__init__.py
apollo2030/pulumi-azure
034665c61665f4dc7e291b8813747012d34fa044
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure/bot/__init__.py
apollo2030/pulumi-azure
034665c61665f4dc7e291b8813747012d34fa044
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure/bot/__init__.py
apollo2030/pulumi-azure
034665c61665f4dc7e291b8813747012d34fa044
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** # Export this package's modules as members: from .channel_email import * from .channel_teams import * from .channel_slack import * from...
33.5
87
0.741294
4a1c5e866985ea1105348a2f37966dd28dc08c1e
7,396
py
Python
Tools/python/Linux-Like/cp.py
walogo/Pythonista-scripts
760451a0cdbe5dd76008a4e616d74191385bbd8b
[ "MIT" ]
2
2019-04-24T19:25:55.000Z
2019-05-04T11:27:54.000Z
Tools/python/Linux-Like/cp.py
walogo/Tools
760451a0cdbe5dd76008a4e616d74191385bbd8b
[ "MIT" ]
4
2019-04-08T02:02:56.000Z
2019-05-04T10:30:26.000Z
Tools/python/Linux-Like/cp.py
walogo/Tools
760451a0cdbe5dd76008a4e616d74191385bbd8b
[ "MIT" ]
1
2020-10-07T17:49:09.000Z
2020-10-07T17:49:09.000Z
from shutil import make_archive, copy2, copytree, move, rmtree, copyfile from tempfile import mkdtemp from logging import info, basicConfig, INFO from os.path import join from os import mkdir from argparse import ArgumentParser # Check if the wanted archive format can be used also returns it def getFormat(path): ...
37.543147
120
0.570443
4a1c601c2eeaf45c7d495a35c85e7b4271d1fc16
2,344
py
Python
src/model/DiceEnum.py
slavi010/random_dice_bot
68742314dddcc06b03f961b7da66a6cd65e01c2e
[ "MIT" ]
1
2020-05-28T20:31:36.000Z
2020-05-28T20:31:36.000Z
src/model/DiceEnum.py
slavi010/random_dice_bot
68742314dddcc06b03f961b7da66a6cd65e01c2e
[ "MIT" ]
8
2020-05-28T14:15:00.000Z
2022-01-13T02:47:35.000Z
src/model/DiceEnum.py
slavi010/random_dice_bot
68742314dddcc06b03f961b7da66a6cd65e01c2e
[ "MIT" ]
1
2021-10-13T21:47:00.000Z
2021-10-13T21:47:00.000Z
################################################################################# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ...
24.416667
81
0.486348
4a1c6116123dc95e370d80e93ddc5ccb13a4039c
1,558
py
Python
ml-agents-envs/mlagents/envs/side_channel/side_channel.py
robertnoneman/ml-agents
797b0e880f4db61ab36783357bf555621affce2a
[ "Apache-2.0" ]
1
2019-01-20T19:57:46.000Z
2019-01-20T19:57:46.000Z
ml-agents-envs/mlagents/envs/side_channel/side_channel.py
ruairidhcumming/ml-agents
d4205fed06b5ac5c2cac6c594bbd25dfe128103f
[ "Apache-2.0" ]
null
null
null
ml-agents-envs/mlagents/envs/side_channel/side_channel.py
ruairidhcumming/ml-agents
d4205fed06b5ac5c2cac6c594bbd25dfe128103f
[ "Apache-2.0" ]
null
null
null
from abc import ABC, abstractmethod from enum import IntEnum class SideChannelType(IntEnum): FloatProperties = 1 EngineSettings = 2 # Raw bytes channels should start here to avoid conflicting with other # Unity ones. RawBytesChannelStart = 1000 # custom side channels should start here to avoid...
29.961538
78
0.661746
4a1c616f89b39a0f7a8ee3f3e61b3a4fb60eeab2
14,534
py
Python
src/wagtailtrans/models.py
ahwebd/wagtailtrans
00125e7f5118b9730b3d5181b58f041190dbb908
[ "BSD-3-Clause" ]
null
null
null
src/wagtailtrans/models.py
ahwebd/wagtailtrans
00125e7f5118b9730b3d5181b58f041190dbb908
[ "BSD-3-Clause" ]
1
2019-04-02T14:45:04.000Z
2019-04-02T14:45:04.000Z
src/wagtailtrans/models.py
ahwebd/wagtailtrans
00125e7f5118b9730b3d5181b58f041190dbb908
[ "BSD-3-Clause" ]
1
2020-06-16T13:43:41.000Z
2020-06-16T13:43:41.000Z
from operator import itemgetter from django import forms from django.conf import settings from django.core.exceptions import ValidationError from django.db import models from django.db.models import Q from django.http import Http404 from django.shortcuts import redirect from django.utils.encoding import force_text fro...
34.359338
117
0.676483
4a1c623bdccf1958d9facaea8b77fa37f88f2504
147
py
Python
tests/asserts/comprehension.py
liwt31/NPython
1159715bb6d4ff9502e9fa4466ddc6f36a8b63d2
[ "CNRI-Python" ]
18
2019-01-29T16:14:42.000Z
2021-02-11T07:34:11.000Z
tests/asserts/comprehension.py
liwt31/NPython
1159715bb6d4ff9502e9fa4466ddc6f36a8b63d2
[ "CNRI-Python" ]
1
2018-12-28T10:52:17.000Z
2018-12-29T14:21:07.000Z
tests/asserts/comprehension.py
liwt31/NPython
1159715bb6d4ff9502e9fa4466ddc6f36a8b63d2
[ "CNRI-Python" ]
null
null
null
import xfail l = [i for i in range(10)] def foo(): print(i) xfail.xfail(foo, NameError) for i in range(10): assert l[i] == i print("ok")
13.363636
27
0.605442
4a1c628e3a4d34abc18fd6b5ee0313752b58b6a9
385
py
Python
ykdl/extractors/netease/__init__.py
shakenetwork/ykdl
68711756290980b78d63cbd9ff7e3e8a5457d504
[ "MIT" ]
3
2018-09-04T09:33:51.000Z
2021-11-01T09:03:27.000Z
ykdl/extractors/netease/__init__.py
hpuyj/ykdl
7933263435d380b6b12538afc58a42d7a927c8f3
[ "MIT" ]
null
null
null
ykdl/extractors/netease/__init__.py
hpuyj/ykdl
7933263435d380b6b12538afc58a42d7a927c8f3
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import re def get_extractor(url): if re.search("cc.163", url): from . import live as s elif re.search("open.163", url): from . import openc as s elif re.search("music.163", url): from . import music as s return s.get_extractor(u...
22.647059
37
0.581818
4a1c632d754b23558aff4551f357a1024d603ea5
2,686
py
Python
scripts/elnaz/calc_apd_specific_cells/plot_apd_over_a_line.py
ElnazP/MonoAlg3D_C
3e81952771e8747f8fb713c31225b50117c61a2d
[ "MIT" ]
null
null
null
scripts/elnaz/calc_apd_specific_cells/plot_apd_over_a_line.py
ElnazP/MonoAlg3D_C
3e81952771e8747f8fb713c31225b50117c61a2d
[ "MIT" ]
null
null
null
scripts/elnaz/calc_apd_specific_cells/plot_apd_over_a_line.py
ElnazP/MonoAlg3D_C
3e81952771e8747f8fb713c31225b50117c61a2d
[ "MIT" ]
null
null
null
# ================================================================= # Author: Lucas Berg # # Program that plot the APD over a line # This script only works if the grid is a plain tissue # ================================================================= import sys import numpy as np import matplotlib.pyplot as plt fro...
29.195652
121
0.592703
4a1c633a67f9fbcc44a5b71a054f8082c192040e
687
py
Python
examples/python/json-get-plugins.py
alexanderfefelov/bgbilling-http-examples
25b4cce6e8c7f855ecc8a9a697805253c1723ef8
[ "MIT" ]
null
null
null
examples/python/json-get-plugins.py
alexanderfefelov/bgbilling-http-examples
25b4cce6e8c7f855ecc8a9a697805253c1723ef8
[ "MIT" ]
null
null
null
examples/python/json-get-plugins.py
alexanderfefelov/bgbilling-http-examples
25b4cce6e8c7f855ecc8a9a697805253c1723ef8
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import configparser import json import urllib.request config = configparser.ConfigParser(interpolation=configparser.ExtendedInterpolation()) config.read('bgbilling.conf') url = config.get('http.json', 'url_endpoint_plugincfg') request_template = config.get('http.json', 'request_template') m...
28.625
95
0.778748
4a1c6575eec6ea0ab1dff1aca99ad1c037735dbd
1,132
py
Python
src/reward/get_reward.py
yulun-rayn/DGAPN
6d87376fa933a0a5efff180ebe1fe5772a060987
[ "MIT" ]
5
2022-01-21T21:15:59.000Z
2022-01-24T20:02:46.000Z
src/reward/get_reward.py
yulun-rayn/DGAPN
6d87376fa933a0a5efff180ebe1fe5772a060987
[ "MIT" ]
null
null
null
src/reward/get_reward.py
yulun-rayn/DGAPN
6d87376fa933a0a5efff180ebe1fe5772a060987
[ "MIT" ]
null
null
null
from .logp.get_score import get_logp_score, get_penalized_logp from .qed.get_score import get_qed_score from .sa.get_score import get_sa_score from .adtgpu.get_score import get_dock_score def get_reward(states, reward_type, args=None): if reward_type == 'logp': return get_logp_score(states) elif rewa...
28.3
62
0.595406
4a1c65d40590de1f657e5fde52bdf5d1414d0fa0
14,482
py
Python
google/cloud/forseti/scanner/audit/service_account_key_rules_engine.py
Sandesh36/forseti-security
e0a2b92485ab3f57a5034aaee375484c8647db68
[ "Apache-2.0" ]
1
2018-10-06T23:16:59.000Z
2018-10-06T23:16:59.000Z
google/cloud/forseti/scanner/audit/service_account_key_rules_engine.py
Sandesh36/forseti-security
e0a2b92485ab3f57a5034aaee375484c8647db68
[ "Apache-2.0" ]
null
null
null
google/cloud/forseti/scanner/audit/service_account_key_rules_engine.py
Sandesh36/forseti-security
e0a2b92485ab3f57a5034aaee375484c8647db68
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 The Forseti Security 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 ap...
36.386935
80
0.603093
4a1c661e766e6f8c553b6da291d341ca99d1a4aa
2,025
py
Python
sequentia/lib/sequentia/classifiers/hmm/topologies/ergodic.py
eonu/inf4-hons
4b7372272860f19c0f5ea2910f122a62531d7d2e
[ "CC-BY-4.0" ]
null
null
null
sequentia/lib/sequentia/classifiers/hmm/topologies/ergodic.py
eonu/inf4-hons
4b7372272860f19c0f5ea2910f122a62531d7d2e
[ "CC-BY-4.0" ]
null
null
null
sequentia/lib/sequentia/classifiers/hmm/topologies/ergodic.py
eonu/inf4-hons
4b7372272860f19c0f5ea2910f122a62531d7d2e
[ "CC-BY-4.0" ]
null
null
null
import numpy as np from warnings import warn from .topology import _Topology class _ErgodicTopology(_Topology): """Represents the topology for an ergodic HMM, imposing non-zero probabilities in the transition matrix. Parameters ---------- n_states: int Number of states in the HMM. random_...
38.207547
120
0.66963
4a1c6623fa9fd2df5e19cabdca184398aae53d0b
2,004
py
Python
settings/local.py
dcs-dev/sfswitch
b45c6e34d23cb735327d591363e5f321e2f023da
[ "Unlicense" ]
null
null
null
settings/local.py
dcs-dev/sfswitch
b45c6e34d23cb735327d591363e5f321e2f023da
[ "Unlicense" ]
null
null
null
settings/local.py
dcs-dev/sfswitch
b45c6e34d23cb735327d591363e5f321e2f023da
[ "Unlicense" ]
null
null
null
import os from settings.base import * from decouple import config # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! #SECRET_KEY = os.environ.get('SECRET_KEY') SECRET...
27.081081
78
0.718563
4a1c663c444f3c59c2622dc50b138baa975a23c2
75,333
py
Python
test/test_mpls.py
pogobanane/vpp-fork
fccc95ae06e98a1605c4600b1e441811b67abfa8
[ "Apache-2.0" ]
2
2019-04-03T10:09:09.000Z
2020-09-23T08:56:24.000Z
test/test_mpls.py
pogobanane/vpp-fork
fccc95ae06e98a1605c4600b1e441811b67abfa8
[ "Apache-2.0" ]
2
2021-03-20T05:38:00.000Z
2021-06-02T03:49:49.000Z
test/test_mpls.py
AbduSami-bK/vpp
ad3f68b9d8c27206ab5dfbf129352a1c844a7004
[ "Apache-2.0" ]
1
2019-03-12T18:19:23.000Z
2019-03-12T18:19:23.000Z
#!/usr/bin/env python import unittest import socket from framework import VppTestCase, VppTestRunner from vpp_ip import DpoProto from vpp_ip_route import VppIpRoute, VppRoutePath, VppMplsRoute, \ VppMplsIpBind, VppIpMRoute, VppMRoutePath, \ MRouteItfFlags, MRouteEntryFlags, VppIpTable, VppMplsTable, \ Vpp...
36.410343
79
0.501122
4a1c66a85365616ffaf0b7864c775b1a402ab87c
172
py
Python
ccfd/__init__.py
brownc1995/credit-card-fraud-detection
3738aa4933811d544f269964c9f9e1fb0f8a94c5
[ "MIT" ]
1
2020-07-03T08:51:19.000Z
2020-07-03T08:51:19.000Z
ccfd/__init__.py
brownc1995/credit-card-fraud-detection
3738aa4933811d544f269964c9f9e1fb0f8a94c5
[ "MIT" ]
5
2020-01-28T21:53:42.000Z
2022-02-10T00:27:52.000Z
ccfd/__init__.py
brownc1995/credit-card-fraud-detection
3738aa4933811d544f269964c9f9e1fb0f8a94c5
[ "MIT" ]
null
null
null
""" Credit card fraud detection library """ __all__ = ( 'BATCH_SIZE', 'CLASS', 'STEPS_PER_EPOCH', ) BATCH_SIZE = 2048 CLASS = 'class' STEPS_PER_EPOCH = 250
10.75
35
0.639535
4a1c66ab6b338e5a7ede16364ba4e1cc775daf5b
11,330
py
Python
src/uncertainty_forest.py
jdey4/progressive-learning
410b3525ab63e1f7c32e9838460b2c9af7b9d256
[ "Apache-2.0" ]
1
2022-01-03T12:36:28.000Z
2022-01-03T12:36:28.000Z
src/uncertainty_forest.py
jdey4/progressive-learning
410b3525ab63e1f7c32e9838460b2c9af7b9d256
[ "Apache-2.0" ]
null
null
null
src/uncertainty_forest.py
jdey4/progressive-learning
410b3525ab63e1f7c32e9838460b2c9af7b9d256
[ "Apache-2.0" ]
null
null
null
''' Primary Author: Will LeVine Email: levinewill@icloud.com ''' #Model from sklearn.ensemble import BaggingClassifier from sklearn.tree import DecisionTreeClassifier #Infrastructure from sklearn.base import BaseEstimator, ClassifierMixin from sklearn.utils.validation import NotFittedError #Data Handling from sklear...
37.147541
212
0.549515
4a1c66f2efa811f4658113f4fc81412d0a932b9d
337
py
Python
apps/common/utils.py
laashub/OneStack
591046661efd5defbcee3473d2f7ba330f548f33
[ "MIT" ]
null
null
null
apps/common/utils.py
laashub/OneStack
591046661efd5defbcee3473d2f7ba330f548f33
[ "MIT" ]
null
null
null
apps/common/utils.py
laashub/OneStack
591046661efd5defbcee3473d2f7ba330f548f33
[ "MIT" ]
null
null
null
from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator class LoginRequiredMixin(object): @method_decorator(login_required(login_url='/login')) def dispatch(self, request, *args, **kwargs): return super(LoginRequiredMixin, self).dispatch(request, ...
37.444444
81
0.774481
4a1c67cb54e2ba7fe7c15a182c58626d11ca20d8
218
py
Python
lab-513.py
ZaraTam/DAT208x
21b31d640e1f0e03525c3a18b6ef83a73bf2d644
[ "MIT" ]
1
2016-06-09T18:54:16.000Z
2016-06-09T18:54:16.000Z
lab-513.py
ZaraTam/DAT208x
21b31d640e1f0e03525c3a18b6ef83a73bf2d644
[ "MIT" ]
null
null
null
lab-513.py
ZaraTam/DAT208x
21b31d640e1f0e03525c3a18b6ef83a73bf2d644
[ "MIT" ]
null
null
null
# Print the last item of gdp_cap and life_exp print(gdp_cap[-1]) print(life_exp[-1]) # Make a line plot, gdp_cap on the x-axis, life_exp on the y-axis plt.plot(gdp_cap, life_exp) # Display the plot plt.show()
24.222222
66
0.706422
4a1c67dd0b162099208fa8a57b881ca5e7d5b861
441
py
Python
api/migrations/0004_profile_email.py
didoogan/ncube_test_back
7c96ebbe1a3b2a80740a711150d1dca6c3e22126
[ "MIT" ]
null
null
null
api/migrations/0004_profile_email.py
didoogan/ncube_test_back
7c96ebbe1a3b2a80740a711150d1dca6c3e22126
[ "MIT" ]
6
2020-06-05T18:36:33.000Z
2022-01-13T00:49:07.000Z
api/migrations/0004_profile_email.py
didoogan/ncube_test_back
7c96ebbe1a3b2a80740a711150d1dca6c3e22126
[ "MIT" ]
null
null
null
# Generated by Django 2.0.4 on 2018-04-07 20:53 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('api', '0003_profile_role'), ] operations = [ migrations.AddField( model_name='profile', name='email', fi...
22.05
81
0.598639
4a1c696cb75ffb0c7d7d1b8f75d24291f4eed480
48,155
py
Python
tests/python_client/testcases/entity/test_insert.py
NotRyan/milvus
1bd3205dbf84ee7734e9849d1e3be30ded1aa619
[ "Apache-2.0" ]
null
null
null
tests/python_client/testcases/entity/test_insert.py
NotRyan/milvus
1bd3205dbf84ee7734e9849d1e3be30ded1aa619
[ "Apache-2.0" ]
null
null
null
tests/python_client/testcases/entity/test_insert.py
NotRyan/milvus
1bd3205dbf84ee7734e9849d1e3be30ded1aa619
[ "Apache-2.0" ]
null
null
null
import pytest from pymilvus import DataType, ParamError, BaseException from utils.utils import * from common.constants import * from common.common_type import CaseLabel ADD_TIMEOUT = 60 uid = "test_insert" field_name = default_float_vec_field_name binary_field_name = default_binary_vec_field_name default_single_query ...
40.19616
133
0.66803
4a1c6a7365fa145bbf8863a74d9b5c3dab5e75bc
58,766
py
Python
venv/lib/python3.6/site-packages/ansible_collections/fortinet/fortimanager/plugins/modules/fmgr_vpnmgr_node.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
1
2020-01-22T13:11:23.000Z
2020-01-22T13:11:23.000Z
venv/lib/python3.6/site-packages/ansible_collections/fortinet/fortimanager/plugins/modules/fmgr_vpnmgr_node.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
12
2020-02-21T07:24:52.000Z
2020-04-14T09:54:32.000Z
venv/lib/python3.6/site-packages/ansible_collections/fortinet/fortimanager/plugins/modules/fmgr_vpnmgr_node.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
null
null
null
#!/usr/bin/python from __future__ import absolute_import, division, print_function # Copyright 2019-2021 Fortinet, Inc. # # 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 3 of the ...
34.875964
153
0.283497
4a1c6aa5726aba215439d0e1f56f44e33f0fe85f
608
py
Python
repetition/20.py
luan-gomes/python-basic-exercises
213844b421b27ab3e9c09be24d4efb37cc6fce08
[ "MIT" ]
null
null
null
repetition/20.py
luan-gomes/python-basic-exercises
213844b421b27ab3e9c09be24d4efb37cc6fce08
[ "MIT" ]
null
null
null
repetition/20.py
luan-gomes/python-basic-exercises
213844b421b27ab3e9c09be24d4efb37cc6fce08
[ "MIT" ]
null
null
null
""" Altere o programa de cálculo do fatorial, permitindo ao usuário calcular o fatorial várias vezes e limitando o fatorial a números inteiros positivos e menores que 16. """ continuar = "sim" while continuar == "sim": while True: number = int(input("Digite um número: ")) if 0 < number < 16: break else: ...
21.714286
93
0.685855
4a1c6c9806e5eb49ec3017e4a778b8215f33b960
872
py
Python
src/transformers/customs/label_smoothing_loss.py
iambotHQ/transformers
12f066742e8de6f31daee3a8fa7dd56237b361c1
[ "Apache-2.0" ]
null
null
null
src/transformers/customs/label_smoothing_loss.py
iambotHQ/transformers
12f066742e8de6f31daee3a8fa7dd56237b361c1
[ "Apache-2.0" ]
null
null
null
src/transformers/customs/label_smoothing_loss.py
iambotHQ/transformers
12f066742e8de6f31daee3a8fa7dd56237b361c1
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn as nn class LabelSmoothingLoss(nn.Module): def __init__(self, classes, smoothing: float = 0.0, dim: int = -1, weight=None): super(LabelSmoothingLoss, self).__init__() self.confidence = 1.0 - smoothing self.smoothing = smoothing self.cls = classes ...
32.296296
84
0.618119
4a1c6d54a84de0065ab37b517f8c693817aea4c3
494
py
Python
xibbaz/main.py
erik-stephens/xibbaz
5c245ee516dcd7e6dbffac364c6a434bd13a69a4
[ "MIT" ]
1
2018-04-02T17:22:32.000Z
2018-04-02T17:22:32.000Z
xibbaz/main.py
erik-stephens/xibbaz
5c245ee516dcd7e6dbffac364c6a434bd13a69a4
[ "MIT" ]
2
2018-08-22T22:46:48.000Z
2018-08-27T21:03:45.000Z
xibbaz/main.py
erik-stephens/xibbaz
5c245ee516dcd7e6dbffac364c6a434bd13a69a4
[ "MIT" ]
null
null
null
""" A wrapper around scripts to facilitate a single Dockerfile ENTRYPOINT. usage: xibbaz.main <cmd> ... Where <cmd> is one of the following. Use `-h, --help` for cmd specific usage. - cli - group - template - triggers """ import sys import importlib if len(sys.argv) >= 2: if sys.argv[1] not in ('cli'...
21.478261
79
0.637652
4a1c6e76cc0c16104673a81c2eb237a53c810c1d
1,574
py
Python
GearBot/Util/Emoji.py
AEnterprise/GearBot
96873483877c31659423ede73c1f8bc0c0a830c5
[ "MIT" ]
20
2018-08-15T05:05:33.000Z
2019-05-02T16:48:59.000Z
GearBot/Util/Emoji.py
AEnterprise/GearBot
96873483877c31659423ede73c1f8bc0c0a830c5
[ "MIT" ]
137
2018-08-12T10:01:30.000Z
2019-05-03T13:54:47.000Z
GearBot/Util/Emoji.py
AEnterprise/GearBot
96873483877c31659423ede73c1f8bc0c0a830c5
[ "MIT" ]
42
2018-08-23T16:33:35.000Z
2019-04-24T03:18:50.000Z
from discord import utils from Util import Configuration emojis = dict() BACKUPS = { "1": "1⃣", "2": "2⃣", "3": "3⃣", "4": "4⃣", "5": "5⃣", "6": "6⃣", "7": "7⃣", "8": "8⃣", "9": "9⃣", "10": "🔟", "ALTER": "🛠", "BAD_USER": "😶", "BAN": "🚪", "BEAN": "🌱", "...
17.488889
71
0.374841
4a1c6fc65342e637236d8132825eb0387b6070e5
9,170
py
Python
day18/day18.py
w-m/aoc2021
1d74dea32d3ac73261a019fdae9bfa3c63ee6d1a
[ "CC0-1.0" ]
null
null
null
day18/day18.py
w-m/aoc2021
1d74dea32d3ac73261a019fdae9bfa3c63ee6d1a
[ "CC0-1.0" ]
null
null
null
day18/day18.py
w-m/aoc2021
1d74dea32d3ac73261a019fdae9bfa3c63ee6d1a
[ "CC0-1.0" ]
null
null
null
from __future__ import annotations from dataclasses import dataclass from os import replace import pandas as pd from itertools import combinations @dataclass class TreeNode: left: TreeNode right: TreeNode value: int depth: int parent: TreeNode def tolist(self): lst = [] if self...
30.065574
183
0.542094
4a1c7007175552bd40dc1e87d78d128f172267d3
32,841
py
Python
env/lib/python3.7/site-packages/sklearn/preprocessing/label.py
MarcoMancha/BreastCancerDetector
be0dfdcebd1ae66da6d0cf48e2525c24942ae877
[ "Apache-2.0" ]
25
2019-03-08T01:03:03.000Z
2022-02-14T17:38:32.000Z
env/lib/python3.7/site-packages/sklearn/preprocessing/label.py
MarcoMancha/BreastCancerDetector
be0dfdcebd1ae66da6d0cf48e2525c24942ae877
[ "Apache-2.0" ]
9
2020-09-25T22:32:02.000Z
2022-02-09T23:45:10.000Z
env/lib/python3.7/site-packages/sklearn/preprocessing/label.py
MarcoMancha/BreastCancerDetector
be0dfdcebd1ae66da6d0cf48e2525c24942ae877
[ "Apache-2.0" ]
31
2019-01-15T20:16:50.000Z
2022-03-01T05:47:38.000Z
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Mathieu Blondel <mathieu@mblondel.org> # Olivier Grisel <olivier.grisel@ensta.org> # Andreas Mueller <amueller@ais.uni-bonn.de> # Joel Nothman <joel.nothman@gmail.com> # Hamzeh Alsalhi <ha258@cornell.edu> # Licens...
33.072508
79
0.587345
4a1c705da5f50a0d47a32f135e7e7689fc708966
1,125
py
Python
bank_api/api/v1/__init__.py
robinstauntoncollins/bank-api
b19cadf5a65f5e66ca14688af8774f400d4fb0f8
[ "Unlicense" ]
null
null
null
bank_api/api/v1/__init__.py
robinstauntoncollins/bank-api
b19cadf5a65f5e66ca14688af8774f400d4fb0f8
[ "Unlicense" ]
null
null
null
bank_api/api/v1/__init__.py
robinstauntoncollins/bank-api
b19cadf5a65f5e66ca14688af8774f400d4fb0f8
[ "Unlicense" ]
null
null
null
from flask import Blueprint from flask_restful import Api API_VERSION_V1 = 1 api_v1_bp = Blueprint('api', __name__) api = Api(api_v1_bp) from . import accounts, customers, transactions api.add_resource(accounts.AccountListAPI, '/accounts', '/accounts/', endpoint='accounts') api.add_resource(accounts.AccountAPI, '/...
34.090909
109
0.740444
4a1c7060370cc70694d461ed0fc2584ef1de0a48
778
py
Python
DSA/recursion/02_divide_and_Conquer/merge_sort/merge_sort.py
kaka-lin/Notes
c22e1d5ba14b94653c644448edb1d775913b05ec
[ "MIT" ]
null
null
null
DSA/recursion/02_divide_and_Conquer/merge_sort/merge_sort.py
kaka-lin/Notes
c22e1d5ba14b94653c644448edb1d775913b05ec
[ "MIT" ]
6
2020-06-10T02:56:37.000Z
2022-02-27T10:13:12.000Z
DSA/recursion/02_divide_and_Conquer/merge_sort/merge_sort.py
kaka-lin/Notes
c22e1d5ba14b94653c644448edb1d775913b05ec
[ "MIT" ]
null
null
null
def merge_sort(nums): # Base case if len(nums) == 1: return nums # Recursive case ## 1. divide mid = len(nums) // 2 ## 2. Conquer prev_list = merge_sort(nums[:mid]) post_list = merge_sort(nums[mid:]) ## 3. Combine return merge(prev_list, post_list) def merge(prev_list, ...
22.882353
43
0.569409
4a1c708b06e35fd142068082ae299ed999da51d6
4,535
py
Python
prepare_data/gen_RNet_tfrecords.py
JackieLeeTHU11/mtcnn
5a2970e2a18441783cec8c7733685333d1e0ef9c
[ "MIT" ]
null
null
null
prepare_data/gen_RNet_tfrecords.py
JackieLeeTHU11/mtcnn
5a2970e2a18441783cec8c7733685333d1e0ef9c
[ "MIT" ]
null
null
null
prepare_data/gen_RNet_tfrecords.py
JackieLeeTHU11/mtcnn
5a2970e2a18441783cec8c7733685333d1e0ef9c
[ "MIT" ]
null
null
null
#coding:utf-8 import os import random import sys import time import tensorflow as tf from tfrecord_utils import _process_image_withoutcoder, _convert_to_example_simple def _add_to_tfrecord(filename, image_example, tfrecord_writer): """Loads data from image and annotations files and add them to a TFRecord. ...
34.356061
83
0.619184
4a1c70b594fbc387fdde6504ab7b82c9c2c745cf
2,309
py
Python
12. Paint Program/Painting Program.py
Azfarbakht/Python-Games
21b893573f3dc8fb65ef09d782b5b7aaf922a687
[ "MIT" ]
1
2021-08-21T08:12:11.000Z
2021-08-21T08:12:11.000Z
12. Paint Program/Painting Program.py
Azfarbakht/Python-Games
21b893573f3dc8fb65ef09d782b5b7aaf922a687
[ "MIT" ]
null
null
null
12. Paint Program/Painting Program.py
Azfarbakht/Python-Games
21b893573f3dc8fb65ef09d782b5b7aaf922a687
[ "MIT" ]
null
null
null
#Let us import the Turtle library once again. * here means all. from turtle import * #Setting up screen screen = Screen() screenMinX = -screen.window_width()/2 screenMinY = -screen.window_height()/2 screenMaxX = screen.window_width()/2 screenMaxY = screen.window_height()/2 screen.setworldcoordinates(screenMinX,scree...
31.630137
305
0.714595
4a1c70b7a24d4af690c8e4315e52db4f8a63f245
17,759
py
Python
src/generative_playground/codec/hypergraph_grammar.py
ZmeiGorynych/generative_playground
5c336dfbd14235e4fd97b21778842a650e733275
[ "MIT" ]
9
2018-09-23T17:34:23.000Z
2021-07-29T09:48:55.000Z
src/generative_playground/codec/hypergraph_grammar.py
ZmeiGorynych/generative_playground
5c336dfbd14235e4fd97b21778842a650e733275
[ "MIT" ]
2
2020-04-15T17:52:18.000Z
2020-04-15T18:26:27.000Z
src/generative_playground/codec/hypergraph_grammar.py
ZmeiGorynych/generative_playground
5c336dfbd14235e4fd97b21778842a650e733275
[ "MIT" ]
6
2019-04-30T22:01:43.000Z
2021-11-22T02:20:18.000Z
from collections import OrderedDict from generative_playground.molecules.lean_settings import molecules_root_location from generative_playground.codec.parent_codec import GenericCodec from generative_playground.codec.hypergraph import ( HyperGraph, HypergraphTree, replace_nonterminal, to_mol, MolToSmiles, MolFromSm...
41.492991
126
0.621657
4a1c712d58ba1f141aab1a3133f3d901957a07a7
12,366
py
Python
dissect/utils/database_handler.py
adamivora/DiSSECT
73c2e657eab859a78c8a2b13959763b99ed865be
[ "MIT" ]
null
null
null
dissect/utils/database_handler.py
adamivora/DiSSECT
73c2e657eab859a78c8a2b13959763b99ed865be
[ "MIT" ]
null
null
null
dissect/utils/database_handler.py
adamivora/DiSSECT
73c2e657eab859a78c8a2b13959763b99ed865be
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import json from pathlib import Path from typing import Optional, Tuple, Iterable, Dict, Any from pymongo import MongoClient from pymongo.database import Database from pymongo.errors import DuplicateKeyError from sage.all import Integer from dissect.utils.custom_curve import CustomCurve from di...
32.203125
116
0.601084
4a1c72d12fa9ba71c8414ed2ecb2cb278e452845
2,547
py
Python
hasher-matcher-actioner/hmalib/common/models/count.py
mengyangwang/ThreatExchange
0712a6234b81f336367c81ee7c1fdfe70de152d1
[ "BSD-3-Clause" ]
null
null
null
hasher-matcher-actioner/hmalib/common/models/count.py
mengyangwang/ThreatExchange
0712a6234b81f336367c81ee7c1fdfe70de152d1
[ "BSD-3-Clause" ]
null
null
null
hasher-matcher-actioner/hmalib/common/models/count.py
mengyangwang/ThreatExchange
0712a6234b81f336367c81ee7c1fdfe70de152d1
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved """ Refer to hmalib.lambdas.ddb_stream_counter.lambda_handler's doc string to understand how these models are used. """ import typing as t from mypy_boto3_dynamodb.service_resource import Table class BaseCount: """ Defines a single count ...
31.060976
91
0.616019
4a1c73fcf82f5a05844ac9673964c9863041075f
11,532
py
Python
mojo/public/tools/mojom/mojom/generate/generator.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
14,668
2015-01-01T01:57:10.000Z
2022-03-31T23:33:32.000Z
mojo/public/tools/mojom/mojom/generate/generator.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
113
2015-05-04T09:58:14.000Z
2022-01-31T19:35:03.000Z
mojo/public/tools/mojom/mojom/generate/generator.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
5,941
2015-01-02T11:32:21.000Z
2022-03-31T16:35:46.000Z
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Code shared by the various language-specific code generators.""" from __future__ import print_function from functools import partial import os.path impor...
35.158537
80
0.683316
4a1c747f4a5eac79e079a0e24fddb7b0e74d5a07
2,623
py
Python
palo_alto_pan_os/unit_test/test_set.py
killstrelok/insightconnect-plugins
911358925f4233ab273dbd8172e8b7b9188ebc01
[ "MIT" ]
null
null
null
palo_alto_pan_os/unit_test/test_set.py
killstrelok/insightconnect-plugins
911358925f4233ab273dbd8172e8b7b9188ebc01
[ "MIT" ]
1
2021-02-23T23:57:37.000Z
2021-02-23T23:57:37.000Z
palo_alto_pan_os/unit_test/test_set.py
killstrelok/insightconnect-plugins
911358925f4233ab273dbd8172e8b7b9188ebc01
[ "MIT" ]
null
null
null
import sys import os sys.path.append(os.path.abspath('../')) from unittest import TestCase from komand_palo_alto_pan_os.connection.connection import Connection from komand_palo_alto_pan_os.actions.set import Set import json import logging class TestSet(TestCase): def test_integration_set(self): """ ...
36.430556
116
0.661456
4a1c74869a45e92a459a5e6ed5d9235a0957faee
2,684
py
Python
examples/chat_stats.py
w311ang/python-telegram
e1c72167ba63bedef5144c0e8f5fd5918ed00edc
[ "MIT" ]
null
null
null
examples/chat_stats.py
w311ang/python-telegram
e1c72167ba63bedef5144c0e8f5fd5918ed00edc
[ "MIT" ]
null
null
null
examples/chat_stats.py
w311ang/python-telegram
e1c72167ba63bedef5144c0e8f5fd5918ed00edc
[ "MIT" ]
null
null
null
import string import logging import argparse from collections import Counter from utils import setup_logging from telegram.client import Telegram """ Prints most popular words in the chat. Usage: python examples/chat_stats.py api_id api_hash phone chat_id --limit 500 """ def retreive_messages(telegram, chat_i...
27.387755
88
0.630775
4a1c74b455d66bf76e8356708e55d916be2a177d
5,701
py
Python
rpi_camera_code.py
AGarcia-20/Python_practice
805647401970ae90e1e27f28cb489d3a7b0f3f2e
[ "MIT" ]
1
2020-03-04T22:33:48.000Z
2020-03-04T22:33:48.000Z
rpi_camera_code.py
AGarcia-20/Python_practice
805647401970ae90e1e27f28cb489d3a7b0f3f2e
[ "MIT" ]
null
null
null
rpi_camera_code.py
AGarcia-20/Python_practice
805647401970ae90e1e27f28cb489d3a7b0f3f2e
[ "MIT" ]
1
2020-03-04T22:28:32.000Z
2020-03-04T22:28:32.000Z
import time import RPi.GPIO as GPIO from picamera import PiCamera import os from subprocess import check_output from datetime import datetime import numpy as np from PIL import Image GPIO.setwarnings(False) i = 0 ligh...
37.506579
183
0.559376
4a1c74b8627943c72d29c5a68626d9cfa665ed2b
705
py
Python
001 - Exercicios Condicionais.py/010 - Equacao de 2o grau.py
rodrigoviannini/meus_Primeiros_Codigos
828dec1c4ce06889efd491145e631c30a45e858f
[ "MIT" ]
2
2021-07-22T23:26:54.000Z
2021-07-22T23:27:27.000Z
001 - Exercicios Condicionais.py/010 - Equacao de 2o grau.py
rodrigoviannini/meus_Primeiros_Codigos
828dec1c4ce06889efd491145e631c30a45e858f
[ "MIT" ]
null
null
null
001 - Exercicios Condicionais.py/010 - Equacao de 2o grau.py
rodrigoviannini/meus_Primeiros_Codigos
828dec1c4ce06889efd491145e631c30a45e858f
[ "MIT" ]
null
null
null
# IF -> CALCULE UMA EQUAÇÃO DE 2º GRAU a = float(input("Digite o valor de a: ")) #CASO 1 -> não é uma equação do 2o grau if a == 0: print("O valor de a não pode ser ZERO!!!") else: # CASO 2 -> é uma equação do 2o grau b = float(input("Digite o valor de b: ")) c = float(input("Digite o valor de c: "))...
27.115385
81
0.503546
4a1c75be30bb4b805434e3d8e2e98a54c9fc3df2
3,611
py
Python
airflow/sensors/http_sensor.py
shrutimantri/airflow
61eaaacd20ab0f743786df895cf8f232b3b2a48c
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
15
2017-04-06T09:01:50.000Z
2021-10-02T13:54:31.000Z
airflow/sensors/http_sensor.py
shrutimantri/airflow
61eaaacd20ab0f743786df895cf8f232b3b2a48c
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
26
2019-08-05T13:44:11.000Z
2022-03-30T10:06:18.000Z
airflow/sensors/http_sensor.py
shrutimantri/airflow
61eaaacd20ab0f743786df895cf8f232b3b2a48c
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
21
2017-08-20T03:01:05.000Z
2021-09-07T06:47:51.000Z
# -*- coding: utf-8 -*- # # 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 #...
38.827957
79
0.665467
4a1c75fc723e870b529c353f32772aecfd0dc549
3,208
py
Python
src/harrastuspassi/harrastuspassi/tests/test_location_api.py
savilmik/harrastuspassi-backend
885c6903a753c7eea29d23f98275747edcdab892
[ "MIT" ]
2
2019-07-29T09:34:47.000Z
2020-08-24T18:15:06.000Z
src/harrastuspassi/harrastuspassi/tests/test_location_api.py
savilmik/harrastuspassi-backend
885c6903a753c7eea29d23f98275747edcdab892
[ "MIT" ]
72
2019-08-08T10:36:21.000Z
2022-03-11T23:55:56.000Z
src/harrastuspassi/harrastuspassi/tests/test_location_api.py
savilmik/harrastuspassi-backend
885c6903a753c7eea29d23f98275747edcdab892
[ "MIT" ]
6
2019-08-08T13:26:07.000Z
2021-05-03T06:09:10.000Z
import pytest from django.urls import reverse from rest_framework.exceptions import ErrorDetail from harrastuspassi import settings from harrastuspassi.models import Location @pytest.mark.django_db def test_location_list_returns_only_editable_for_authenticated_user(user_api_client, user2_api_client, api_client): ...
43.945205
115
0.74813
4a1c768cf4148e8292f66a0ca57a26fd3ca8d62e
1,579
py
Python
musictaxonomy/spotify/service.py
akurihara/music-taxonomy
53eb2112e67b3ec9591411bc8117463af760adf8
[ "MIT" ]
3
2019-05-06T04:10:47.000Z
2020-02-20T01:26:32.000Z
musictaxonomy/spotify/service.py
akurihara/music-taxonomy
53eb2112e67b3ec9591411bc8117463af760adf8
[ "MIT" ]
3
2020-02-06T01:52:49.000Z
2022-02-12T07:41:24.000Z
musictaxonomy/spotify/service.py
akurihara/musictaxonomy
53eb2112e67b3ec9591411bc8117463af760adf8
[ "MIT" ]
null
null
null
from typing import Any, Dict, List from musictaxonomy.spotify import client as spotify_client from musictaxonomy.spotify.models import SpotifyArtist, SpotifyUser __all__ = ["get_spotify_user", "get_all_top_artists_for_user"] SpotifyArtistDocument = Dict[str, Any] async def get_spotify_user(access_token: str) -> Sp...
29.792453
88
0.743509
4a1c775a93a237cff01565d0980789d493ec62ac
2,601
py
Python
tests/test_visitors/test_ast/test_complexity/test_function/conftest.py
cdhiraj40/wemake-python-styleguide
7cef9be081d594c30045b7a98cae77a9be46e1aa
[ "MIT" ]
1,931
2018-03-17T13:52:45.000Z
2022-03-27T09:39:17.000Z
tests/test_visitors/test_ast/test_complexity/test_function/conftest.py
cdhiraj40/wemake-python-styleguide
7cef9be081d594c30045b7a98cae77a9be46e1aa
[ "MIT" ]
2,231
2018-03-09T21:19:05.000Z
2022-03-31T08:35:37.000Z
tests/test_visitors/test_ast/test_complexity/test_function/conftest.py
cdhiraj40/wemake-python-styleguide
7cef9be081d594c30045b7a98cae77a9be46e1aa
[ "MIT" ]
492
2018-05-18T21:20:28.000Z
2022-03-20T14:11:50.000Z
import pytest from wemake_python_styleguide.compat.constants import PY38 function_with_single_argument = 'def function(arg1): ...' function_with_arguments = 'def function(arg1, arg2): ...' function_with_args_kwargs = 'def function(*args, **kwargs): ...' function_with_kwonly = 'def function(*, kwonly1, kwonly2=True): ...
23.432432
77
0.700884
4a1c77abfd998b4b0c50fb0dcc3c2a960f5cf340
2,683
py
Python
CIM14/CDPSM/Connectivity/IEC61970/Core/ConnectivityNodeContainer.py
MaximeBaudette/PyCIM
d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14
[ "MIT" ]
null
null
null
CIM14/CDPSM/Connectivity/IEC61970/Core/ConnectivityNodeContainer.py
MaximeBaudette/PyCIM
d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14
[ "MIT" ]
null
null
null
CIM14/CDPSM/Connectivity/IEC61970/Core/ConnectivityNodeContainer.py
MaximeBaudette/PyCIM
d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14
[ "MIT" ]
null
null
null
# Copyright (C) 2010-2011 Richard Lincoln # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish...
40.651515
91
0.733135
4a1c77f3e447e9e1c331d1f7b3a419d058217bff
695
py
Python
setup.py
CHC278Cao/template_cv
05e8728bcdc441be8f9cfc4da7f605e2701fe4a7
[ "MIT" ]
null
null
null
setup.py
CHC278Cao/template_cv
05e8728bcdc441be8f9cfc4da7f605e2701fe4a7
[ "MIT" ]
null
null
null
setup.py
CHC278Cao/template_cv
05e8728bcdc441be8f9cfc4da7f605e2701fe4a7
[ "MIT" ]
null
null
null
# encoding: utf-8 """ @author: ccj @contact: """ import setuptools with open('README.md', 'r') as fh: long_description = fh.read() setuptools.setup( name="template_cv", version="0.0.1", author="ccj", author_email='changjian1026@gmail.com', description="A template cv model for kaggle", lo...
23.965517
51
0.656115
4a1c781d2ec2ee5b743eae08117690d429bae568
1,150
py
Python
bitbar/scripts/watcher.py
schrecka/techromancer
406e0861ee9f1c0a50e8e5f0a69f72411923c030
[ "MIT" ]
null
null
null
bitbar/scripts/watcher.py
schrecka/techromancer
406e0861ee9f1c0a50e8e5f0a69f72411923c030
[ "MIT" ]
null
null
null
bitbar/scripts/watcher.py
schrecka/techromancer
406e0861ee9f1c0a50e8e5f0a69f72411923c030
[ "MIT" ]
null
null
null
#!/bin/env python3 import sys import time import logging import os from watchdog.observers import Observer from watchdog.events import LoggingEventHandler if __name__ == "__main__": run() def run(): logging.basicConfig(filename='logger.txt', filemode='a', level=logging.INFO, format...
29.487179
80
0.596522
4a1c783f3be0d7af5ce39410f224a43d53624265
8,020
py
Python
tests/integration/api/v2010/account/incoming_phone_number/test_toll_free.py
ashish-s/twilio-python
5462b05af0906a1464b1e95a56a1f15afddc3b8c
[ "MIT" ]
1
2020-10-29T19:28:25.000Z
2020-10-29T19:28:25.000Z
tests/integration/api/v2010/account/incoming_phone_number/test_toll_free.py
CostantiniMatteo/twilio-python
9eee1ca9e73790b12678e9a5660206ea44948d00
[ "MIT" ]
1
2021-08-21T22:54:01.000Z
2021-08-23T19:39:42.000Z
tests/integration/api/v2010/account/incoming_phone_number/test_toll_free.py
team-telnyx/twexit-python
69e11c5c2b5681f9bc410795dda0cf8942219e6f
[ "MIT" ]
null
null
null
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from tests import IntegrationTestCase from tests.holodeck import Request from twilio.base.exceptions import TwilioException from twilio.http.response import Response class TollFreeTestCase(Integrat...
42.887701
150
0.509726
4a1c7851989fcecdcd5a735ce3bb408157c13eda
1,401
py
Python
examples/configs/algorithm.py
hrayrhar/wilds
099db63bf7323c5c9e42e66893e84202595f8860
[ "MIT" ]
null
null
null
examples/configs/algorithm.py
hrayrhar/wilds
099db63bf7323c5c9e42e66893e84202595f8860
[ "MIT" ]
null
null
null
examples/configs/algorithm.py
hrayrhar/wilds
099db63bf7323c5c9e42e66893e84202595f8860
[ "MIT" ]
null
null
null
algorithm_defaults = { 'ERM': { 'train_loader': 'standard', 'uniform_over_groups': False, 'eval_loader': 'standard', }, 'ERM_HSIC': { 'train_loader': 'standard', 'uniform_over_groups': False, 'eval_loader': 'standard', 'hsic_beta': 1.0, }, 'ERM...
27.470588
40
0.533191
4a1c78cfb0b0b74091d325be6b18ada6fe35aa1c
1,370
py
Python
src/seedsigner/helpers/mnemonic_generation.py
NachE/seedsigner
43abe96f2f2191a3a42c72704a4df8cab5f8e440
[ "MIT" ]
245
2020-12-14T15:26:25.000Z
2022-03-31T19:57:08.000Z
src/seedsigner/helpers/mnemonic_generation.py
btcpuertorico/seedsigner
9750c927bb8a3363d4c607d037a877221a5ffc95
[ "MIT" ]
119
2020-12-15T18:55:28.000Z
2022-03-30T19:28:54.000Z
src/seedsigner/helpers/mnemonic_generation.py
btcpuertorico/seedsigner
9750c927bb8a3363d4c607d037a877221a5ffc95
[ "MIT" ]
69
2020-12-25T17:48:50.000Z
2022-03-31T22:27:03.000Z
from embit import bip39 from embit.bip39 import mnemonic_to_bytes, mnemonic_from_bytes def calculate_checksum(partial_mnemonic: list): # Provide 11- or 23-word mnemonic, returns complete mnemonic w/checksum if len(partial_mnemonic) not in [11, 23]: raise Exception("Pass in a 11- or 23-word mnemonic")...
30.444444
91
0.748175
4a1c79330cc95885ad828e1bf9e14ec32ba53367
46
py
Python
game/__init__.py
MarsRaptor/battleships
81e0a595c05f627de568dad49904be99f0cbf6ac
[ "MIT" ]
null
null
null
game/__init__.py
MarsRaptor/battleships
81e0a595c05f627de568dad49904be99f0cbf6ac
[ "MIT" ]
null
null
null
game/__init__.py
MarsRaptor/battleships
81e0a595c05f627de568dad49904be99f0cbf6ac
[ "MIT" ]
null
null
null
from .components import * from .util import *
15.333333
25
0.73913
4a1c7af62ab2de76de458dfb6bd82c63c27e55b1
1,844
py
Python
regexlib/python_re_test_file/regexlib_2766.py
yetingli/ReDoS-Benchmarks
f5b5094d835649e957bf3fec6b8bd4f6efdb35fc
[ "MIT" ]
1
2022-01-24T14:43:23.000Z
2022-01-24T14:43:23.000Z
regexlib/python_re_test_file/regexlib_2766.py
yetingli/ReDoS-Benchmarks
f5b5094d835649e957bf3fec6b8bd4f6efdb35fc
[ "MIT" ]
null
null
null
regexlib/python_re_test_file/regexlib_2766.py
yetingli/ReDoS-Benchmarks
f5b5094d835649e957bf3fec6b8bd4f6efdb35fc
[ "MIT" ]
null
null
null
# 2766 # (?:@[A-Z]\w*\s+)*(?:(?:public|private|protected)\s+)?(?:(?:(?:abstract|final|native|transient|static|synchronized)\s+)*(?:<(?:\?|[A-Z]\w*)(?:\s+(?:extends|super)\s+[A-Z]\w*)?(?:(?:,\s*(?:\?|[A-Z]\w*))(?:\s+(?:extends|super)\s+[A-Z]\w*)?)*>\s+)?(?:(?:(?:[A-Z]\w*(?:<[A-Z]\w*>)?|int|float|double|char|byte|long|sh...
97.052632
721
0.474512
4a1c7af6d7a450000a21824c631a7b6007964589
2,604
py
Python
zvt/domain/trader_info.py
stone64/zvt
19360b3f29992bc759709adfa90e32843147a807
[ "MIT" ]
2
2020-09-04T03:24:03.000Z
2020-11-27T20:57:55.000Z
zvt/domain/trader_info.py
stone64/zvt
19360b3f29992bc759709adfa90e32843147a807
[ "MIT" ]
null
null
null
zvt/domain/trader_info.py
stone64/zvt
19360b3f29992bc759709adfa90e32843147a807
[ "MIT" ]
1
2021-01-24T15:44:53.000Z
2021-01-24T15:44:53.000Z
# -*- coding: utf-8 -*- from sqlalchemy import Column, String, DateTime, Boolean, Float, Integer, ForeignKey from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationship from zvt.contract import Mixin from zvt.contract.register import register_schema TraderBase = declarative_base() ...
25.038462
84
0.691628
4a1c7ca3df498c76d5bd5a5ca29a955a1d5efaf2
3,451
py
Python
PS1/ps1b.py
HollisHolmes/MIT_6.0002
5978df16f27963d93f0ef99b6b6d2518f3569e37
[ "MIT" ]
null
null
null
PS1/ps1b.py
HollisHolmes/MIT_6.0002
5978df16f27963d93f0ef99b6b6d2518f3569e37
[ "MIT" ]
null
null
null
PS1/ps1b.py
HollisHolmes/MIT_6.0002
5978df16f27963d93f0ef99b6b6d2518f3569e37
[ "MIT" ]
null
null
null
########################### # 6.0002 Problem Set 1b: Space Change # Name: # Collaborators: # Time: # Author: charz, cdenise #================================ # Part B: Golden Eggs # Part B: Golden Eggs #================================ Problem 1 def dp_make_weight(egg_weights, target_weight, memo = {}): ...
38.344444
134
0.625036
4a1c7cb624a1a608384b7d6eb4969c28bd6960d1
668
py
Python
trax/format/__init__.py
dsully/trax
55e16d54f3805f2a5fa3eebe2faf810c45a62088
[ "MIT" ]
1
2018-04-02T14:37:20.000Z
2018-04-02T14:37:20.000Z
trax/format/__init__.py
dsully/trax
55e16d54f3805f2a5fa3eebe2faf810c45a62088
[ "MIT" ]
null
null
null
trax/format/__init__.py
dsully/trax
55e16d54f3805f2a5fa3eebe2faf810c45a62088
[ "MIT" ]
null
null
null
""" Abstraction for audio file formats. """ import logging from trax.format.flac import FLAC from trax.format.mp3 import MP3 from trax.format.mp4 import MP4 log = logging.getLogger(__name__) FORMAT_MAP = { 'flac': FLAC, 'mp3' : MP3, 'mp4' : MP4, 'm4a' : MP4, } EXTENSION_MAP = { 'flac': 'flac', 'alac'...
18.054054
48
0.658683
4a1c7d7c33b780b5b6b1ee840d285097e0ea3603
8,553
py
Python
nitroml/automl/metalearning/metalearner/executor.py
google/nitroml
5eabdbe6de85ff7fdae4fefda7547c0c031f9431
[ "Apache-2.0" ]
43
2020-09-13T18:07:15.000Z
2022-01-05T19:05:28.000Z
nitroml/automl/metalearning/metalearner/executor.py
google/nitroml
5eabdbe6de85ff7fdae4fefda7547c0c031f9431
[ "Apache-2.0" ]
4
2020-09-14T13:15:09.000Z
2021-11-21T11:21:13.000Z
nitroml/automl/metalearning/metalearner/executor.py
google/nitroml
5eabdbe6de85ff7fdae4fefda7547c0c031f9431
[ "Apache-2.0" ]
5
2020-09-14T13:03:04.000Z
2021-10-21T01:55:48.000Z
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
37.678414
84
0.697182
4a1c7e529884f71c6ca1b1cc56b84a3d9d5d6b1a
5,164
py
Python
generate.py
Bhaskers-Blu-Org1/risk-pddl
10708bfa44df69876adea532ce68c4e25770b7f7
[ "MIT" ]
5
2020-05-08T19:07:17.000Z
2021-11-04T11:24:05.000Z
generate.py
IBM/risk-pddl
10708bfa44df69876adea532ce68c4e25770b7f7
[ "MIT" ]
null
null
null
generate.py
IBM/risk-pddl
10708bfa44df69876adea532ce68c4e25770b7f7
[ "MIT" ]
1
2020-06-29T15:23:28.000Z
2020-06-29T15:23:28.000Z
#! /usr/bin/env python import sys import networkx as nx import random def start_cost_function(degree): return degree def random_edge_cost(): if random.random() < 0.8: return 10 return 30 class Task(object): def __init__(self, num_nodes, num_start, num_end, num_poi, discard_cost, start_cost,...
36.366197
131
0.562742
4a1c7f134bcbb1227cbed372a1f507d61c8a6530
2,099
py
Python
generate_questions.py
daveshap/NLCA_Question_Generator
2a2d407df0c1d770193bc7a16f9da8bba3830a6f
[ "MIT" ]
16
2021-08-18T04:07:55.000Z
2022-03-23T03:05:36.000Z
generate_questions.py
daveshap/NLCA_Question_Generator
2a2d407df0c1d770193bc7a16f9da8bba3830a6f
[ "MIT" ]
null
null
null
generate_questions.py
daveshap/NLCA_Question_Generator
2a2d407df0c1d770193bc7a16f9da8bba3830a6f
[ "MIT" ]
6
2021-08-18T04:07:58.000Z
2022-03-23T10:29:04.000Z
import openai from random import seed,sample import os import re with open('openaiapikey.txt', 'r') as infile: open_ai_api_key = infile.read() openai.api_key = open_ai_api_key seed() ctxdir = 'C:/RavenFinetune/contexts/' outdir = 'C:/RavenFinetune/questions/' files = os.listdir(ctxdir) files = [i for i in files...
30.867647
132
0.603144
4a1c806ba652b8af7f19f244248408e30f9c5521
14,856
py
Python
accelbyte_py_sdk/api/platform/operations/payment_dedicated/refund_payment_order_by_309df5.py
AccelByte/accelbyte-python-sdk
dcd311fad111c59da828278975340fb92e0f26f7
[ "MIT" ]
null
null
null
accelbyte_py_sdk/api/platform/operations/payment_dedicated/refund_payment_order_by_309df5.py
AccelByte/accelbyte-python-sdk
dcd311fad111c59da828278975340fb92e0f26f7
[ "MIT" ]
1
2021-10-13T03:46:58.000Z
2021-10-13T03:46:58.000Z
accelbyte_py_sdk/api/platform/operations/payment_dedicated/refund_payment_order_by_309df5.py
AccelByte/accelbyte-python-sdk
dcd311fad111c59da828278975340fb92e0f26f7
[ "MIT" ]
null
null
null
# Copyright (c) 2021 AccelByte Inc. All Rights Reserved. # This is licensed software from AccelByte Inc, for limitations # and restrictions contact your company contract manager. # # Code generated. DO NOT EDIT! # template file: justice_py_sdk_codegen/__main__.py # pylint: disable=duplicate-code # pylint: disable=li...
35.287411
226
0.587574
4a1c817d1cefd9f39f099a0c59586fd8f3c4d1b1
1,585
py
Python
tests/unit/mkeyboard/test_btn_release.py
dwmoffatt/macro-zero
1684415c592c8ea646649ae5dde81ddcc00da7d0
[ "MIT" ]
null
null
null
tests/unit/mkeyboard/test_btn_release.py
dwmoffatt/macro-zero
1684415c592c8ea646649ae5dde81ddcc00da7d0
[ "MIT" ]
43
2021-05-03T04:32:29.000Z
2021-10-01T03:29:32.000Z
tests/unit/mkeyboard/test_btn_release.py
dwmoffatt/macro-zero
1684415c592c8ea646649ae5dde81ddcc00da7d0
[ "MIT" ]
null
null
null
import pytest from src.modules import ( MK_B1_PIN, MK_B2_PIN, MK_B3_PIN, MK_B4_PIN, MK_B5_PIN, MK_B6_PIN, MK_B7_PIN, MK_B8_PIN, RE_SW_PIN, ) from src.modules.mkeyboard import ( MK_COMMAND_MK_B1, MK_COMMAND_MK_B2, MK_COMMAND_MK_B3, MK_COMMAND_MK_B4, MK_COMMAND_MK_B...
24.384615
72
0.623975
4a1c826cbae2520ecb1ea31c47bc9246032265a6
463
py
Python
test_app/utils.py
jamespeacock/django-request-profiler
777543cf8a1f0e3d091636d52a6690b024eb9ca3
[ "MIT" ]
null
null
null
test_app/utils.py
jamespeacock/django-request-profiler
777543cf8a1f0e3d091636d52a6690b024eb9ca3
[ "MIT" ]
null
null
null
test_app/utils.py
jamespeacock/django-request-profiler
777543cf8a1f0e3d091636d52a6690b024eb9ca3
[ "MIT" ]
null
null
null
from unittest import skipIf from django.conf import settings def skipIfDefaultUser(test_func): """ Skip a test if a default user model is in use. """ return skipIf(settings.AUTH_USER_MODEL == 'auth.User', 'Default user model in use')(test_func) def skipIfCustomUser(test_func): """ Skip a te...
25.722222
98
0.697624
4a1c83775585d7153288e240f92db93fd4b95168
18,865
py
Python
examples/cartpole_dqn.py
Alexanders101/TorchSpread
27cb9c6ead97d8b92284f6eff016bd6e406505e9
[ "MIT" ]
1
2019-08-15T11:16:05.000Z
2019-08-15T11:16:05.000Z
examples/cartpole_dqn.py
Alexanders101/TorchSpread
27cb9c6ead97d8b92284f6eff016bd6e406505e9
[ "MIT" ]
null
null
null
examples/cartpole_dqn.py
Alexanders101/TorchSpread
27cb9c6ead97d8b92284f6eff016bd6e406505e9
[ "MIT" ]
null
null
null
from threading import Thread import gym import numpy as np import torch import ctypes from threading import Thread from typing import Tuple, List from torch import nn from torch.nn import functional as F from torch_spread import NetworkClient, NetworkManager, SpreadModule, Buffer, mp_ctx from torch_spread.buffer_q...
36.990196
119
0.623165
4a1c84857d075356fe12a2249f12f7e98192689b
6,839
py
Python
projects/PointRend/point_rend/point_head.py
MargeryLab/BMaskR-CNN
41f63d301d6be7fa30ba281a5a0f727fbca6ad2a
[ "Apache-2.0" ]
null
null
null
projects/PointRend/point_rend/point_head.py
MargeryLab/BMaskR-CNN
41f63d301d6be7fa30ba281a5a0f727fbca6ad2a
[ "Apache-2.0" ]
null
null
null
projects/PointRend/point_rend/point_head.py
MargeryLab/BMaskR-CNN
41f63d301d6be7fa30ba281a5a0f727fbca6ad2a
[ "Apache-2.0" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import fvcore.nn.weight_init as weight_init import torch from torch import nn from torch.nn import functional as F from detectron2.layers import ShapeSpec, cat from detectron2.structures import BitMasks from detectron2.utils.events import g...
43.28481
101
0.64176
4a1c84895f3a052786d61f342c536609442b44a4
349
pyde
Python
Processing Py_!/listing_10/listing_10.pyde
GermogenovAs/2019-fall-polytech-cs
3d02ed149b5d0468e213d96b5a1aa8263880a3e1
[ "MIT" ]
null
null
null
Processing Py_!/listing_10/listing_10.pyde
GermogenovAs/2019-fall-polytech-cs
3d02ed149b5d0468e213d96b5a1aa8263880a3e1
[ "MIT" ]
null
null
null
Processing Py_!/listing_10/listing_10.pyde
GermogenovAs/2019-fall-polytech-cs
3d02ed149b5d0468e213d96b5a1aa8263880a3e1
[ "MIT" ]
null
null
null
def setup(): size(500, 500) smooth() noLoop def draw(): background(100) stroke( 0xFF881DCB) strokeWeight(110) line(100, 150, 400, 150) stroke( 0xFFCB1DA3) strokeWeight(60) line(100, 250, 400, 250) stroke( 0xFFCB1D1D) strokeWeight(110) ...
16.619048
28
0.544413
4a1c84aafd74572c6eda4b91925717d47b8a7fb3
55,654
py
Python
simba/features_scripts/extract_features_16bp.py
KonradDanielewski/simba
d7a448222e33dcb9880b65c14b5b676933cc6fd7
[ "MIT" ]
172
2019-12-18T22:19:42.000Z
2022-03-29T01:58:25.000Z
simba/features_scripts/extract_features_16bp.py
KonradDanielewski/simba
d7a448222e33dcb9880b65c14b5b676933cc6fd7
[ "MIT" ]
165
2020-01-10T19:05:16.000Z
2022-03-31T16:08:36.000Z
simba/features_scripts/extract_features_16bp.py
KonradDanielewski/simba
d7a448222e33dcb9880b65c14b5b676933cc6fd7
[ "MIT" ]
80
2019-12-20T00:01:43.000Z
2022-03-29T16:20:10.000Z
from __future__ import division import os, glob import pandas as pd import math import numpy as np from scipy.spatial import ConvexHull import scipy from configparser import ConfigParser, NoOptionError, NoSectionError from numba import jit from simba.rw_dfs import * from simba.features_scripts.unit_tests impo...
85.097859
285
0.656988
4a1c84c202da0d1a30b8d57c853b37f05b580bf4
24,687
py
Python
miniwdl_aws/batch_job.py
miniwdl-ext/miniwdl-aws
604a1f1f79ba34d138e685eff9f686f57c587c39
[ "MIT" ]
1
2022-03-16T18:42:23.000Z
2022-03-16T18:42:23.000Z
miniwdl_aws/batch_job.py
miniwdl-ext/miniwdl-aws
604a1f1f79ba34d138e685eff9f686f57c587c39
[ "MIT" ]
null
null
null
miniwdl_aws/batch_job.py
miniwdl-ext/miniwdl-aws
604a1f1f79ba34d138e685eff9f686f57c587c39
[ "MIT" ]
2
2021-11-03T14:11:09.000Z
2022-03-09T22:54:06.000Z
""" BatchJob: implements miniwdl TaskContainer by submitting jobs to an AWS Batch queue and polling their status. Assumes a shared filesystem (typically EFS) between the miniwdl host and the Batch workers. """ import os import math import time import json import threading import heapq from contextlib import ExitStack,...
41.842373
171
0.573338
4a1c84ce6d6703eced8b5304bb29ef22d382124e
2,954
py
Python
src/train.py
yuvaphalle/datascience
315e37572110350aff6eab8361d73928a032eb0e
[ "MIT" ]
null
null
null
src/train.py
yuvaphalle/datascience
315e37572110350aff6eab8361d73928a032eb0e
[ "MIT" ]
null
null
null
src/train.py
yuvaphalle/datascience
315e37572110350aff6eab8361d73928a032eb0e
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # ### Installing # In[1]: # !pip install scikit-learn==0.24.0 # !curl https://raw.githubusercontent.com/automl/auto-sklearn/master/requirements.txt | xargs -n 1 -L 1 pip install # In[2]: from google.colab import drive drive.mount('/content/drive') # In[3]: # !pip instal...
15.305699
145
0.706838