hexsha
stringlengths
40
40
size
int64
4
1.02M
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
209
max_stars_repo_name
stringlengths
5
121
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
209
max_issues_repo_name
stringlengths
5
121
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
209
max_forks_repo_name
stringlengths
5
121
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
4
1.02M
avg_line_length
float64
1.07
66.1k
max_line_length
int64
4
266k
alphanum_fraction
float64
0.01
1
de053b5fccf94bb8c41631f4dd956d7844b777ca
2,456
py
Python
cron.py
adithyabsk/roambot
6616d5848bc6a485cf1a86caccfe47b6e38fe063
[ "MIT" ]
4
2022-01-06T21:59:53.000Z
2022-03-11T20:04:11.000Z
cron.py
adithyabsk/tftbot
842e14baf7818b9d0026e6b452f536bec2a326d2
[ "MIT" ]
null
null
null
cron.py
adithyabsk/tftbot
842e14baf7818b9d0026e6b452f536bec2a326d2
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Cron job for tweeting""" import os from apscheduler.schedulers.blocking import BlockingScheduler from dotenv import load_dotenv from tzlocal import get_localzone from tftbot import ObsidianTwitterBot, RoamTwitterBot RANDOM_SEED = 108 # If a `.env` file exists, load in those environment vari...
33.643836
112
0.759365
4e5f1ece969224492ff66016366668368d112c27
302
py
Python
Lesson06/listFunctions.py
PacktPublishing/Python-Fundamentals
f24569826b1b7f97e3d54630a34ae61110ca12da
[ "MIT" ]
1
2021-04-23T14:01:56.000Z
2021-04-23T14:01:56.000Z
Lesson06/listFunctions.py
PacktPublishing/Python-Fundamentals
f24569826b1b7f97e3d54630a34ae61110ca12da
[ "MIT" ]
null
null
null
Lesson06/listFunctions.py
PacktPublishing/Python-Fundamentals
f24569826b1b7f97e3d54630a34ae61110ca12da
[ "MIT" ]
4
2021-06-29T05:57:44.000Z
2021-09-02T10:14:55.000Z
numbers = [1, 2, 3, 4, 5, 6, 7, 8] letters = ['a', 'b', 'c', 'd'] ''' list.append(item) list.extend(iterable) list.insert(index, item) list.remove(item) list.pop([index]) list.clear() list.index(item [, start [, end]]) list.count(item) list.sort(key=None, reverse=False) list.reverse() list.copy() '''
18.875
34
0.635762
0f5dd439712d63c9c6da53871263936d513df715
17,076
py
Python
fatf/fairness/models/measures.py
So-Cool/fat-forensics
6fa252a1d90fe543242ef030a5f8a3f9c9f692fe
[ "BSD-3-Clause" ]
48
2019-09-12T04:54:48.000Z
2022-02-27T01:49:55.000Z
fatf/fairness/models/measures.py
So-Cool/fat-forensics
6fa252a1d90fe543242ef030a5f8a3f9c9f692fe
[ "BSD-3-Clause" ]
4
2018-09-20T10:37:53.000Z
2018-09-26T23:57:48.000Z
fatf/fairness/models/measures.py
So-Cool/fat-forensics
6fa252a1d90fe543242ef030a5f8a3f9c9f692fe
[ "BSD-3-Clause" ]
11
2019-09-17T13:39:43.000Z
2021-07-27T11:04:33.000Z
""" The :mod:`fatf.fairness.models.measures` module holds models fairness measures. """ # Author: Kacper Sokol <k.sokol@bristol.ac.uk> # Rafael Poyiadzi <rp13102@bristol.ac.uk> # License: BSD 3 clause from numbers import Number from typing import List, Optional, Tuple, Union import numpy as np import fatf.ut...
36.025316
79
0.658058
2efe9f856fb9611d3124912055940128df2687a9
12,016
py
Python
build/android/gyp/lint.py
TwistedCore/external_v8
c6725dab9be251fbfc6fd7d53c3513a23e78c36c
[ "BSD-3-Clause" ]
1
2020-09-15T08:43:34.000Z
2020-09-15T08:43:34.000Z
build/android/gyp/lint.py
TwistedCore/external_v8
c6725dab9be251fbfc6fd7d53c3513a23e78c36c
[ "BSD-3-Clause" ]
null
null
null
build/android/gyp/lint.py
TwistedCore/external_v8
c6725dab9be251fbfc6fd7d53c3513a23e78c36c
[ "BSD-3-Clause" ]
4
2016-09-01T22:40:40.000Z
2017-06-03T21:49:47.000Z
#!/usr/bin/env python # # Copyright (c) 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. """Runs Android's lint tool.""" import argparse import os import re import sys import traceback from xml.dom import minidom fr...
37.31677
131
0.622753
d72999ed72e48fdf4f4d423df75421e47807e13b
6,411
py
Python
python3/lib/python3.6/site-packages/tensorflow/contrib/kinesis/python/ops/gen_dataset_ops.py
TruongThuyLiem/keras2tensorflow
726f2370160701081cb43fbd8b56154c10d7ad63
[ "MIT" ]
3
2020-10-12T15:47:01.000Z
2022-01-14T19:51:26.000Z
python3/lib/python3.6/site-packages/tensorflow/contrib/kinesis/python/ops/gen_dataset_ops.py
TruongThuyLiem/keras2tensorflow
726f2370160701081cb43fbd8b56154c10d7ad63
[ "MIT" ]
null
null
null
python3/lib/python3.6/site-packages/tensorflow/contrib/kinesis/python/ops/gen_dataset_ops.py
TruongThuyLiem/keras2tensorflow
726f2370160701081cb43fbd8b56154c10d7ad63
[ "MIT" ]
2
2020-08-03T13:02:06.000Z
2020-11-04T03:15:44.000Z
"""Python wrappers around TensorFlow ops. This file is MACHINE GENERATED! Do not edit. Original C++ source file: gen_dataset_ops.cc """ import collections as _collections import six as _six from tensorflow.python import pywrap_tensorflow as _pywrap_tensorflow from tensorflow.python.eager import context as _context f...
39.574074
213
0.727188
d100aad5de3f818c17c55d71189a2a037c003b9a
59,645
py
Python
src/dirbs/importer/operator_data_importer.py
fossabot/DIRBS-Core-1
70bf72e2e6dda6e0d7a20cf744300930d88ee70c
[ "PostgreSQL", "Unlicense" ]
null
null
null
src/dirbs/importer/operator_data_importer.py
fossabot/DIRBS-Core-1
70bf72e2e6dda6e0d7a20cf744300930d88ee70c
[ "PostgreSQL", "Unlicense" ]
null
null
null
src/dirbs/importer/operator_data_importer.py
fossabot/DIRBS-Core-1
70bf72e2e6dda6e0d7a20cf744300930d88ee70c
[ "PostgreSQL", "Unlicense" ]
3
2019-10-24T11:40:06.000Z
2022-02-24T07:34:00.000Z
""" Code for importing MNO data sets into DIRBS Core. Copyright (c) 2018-2019 Qualcomm Technologies, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are...
57.350962
120
0.602146
054e668574e991dd886e88b3310bd7c1395cbb4c
13,551
py
Python
ciw/import_params.py
vvbv/Ciw
94b0a192a1dc50ee07b20c55e8522f1f136ca310
[ "MIT" ]
null
null
null
ciw/import_params.py
vvbv/Ciw
94b0a192a1dc50ee07b20c55e8522f1f136ca310
[ "MIT" ]
null
null
null
ciw/import_params.py
vvbv/Ciw
94b0a192a1dc50ee07b20c55e8522f1f136ca310
[ "MIT" ]
null
null
null
import os import yaml import copy import types import ciw.dists from .network import * def get_distribution(dist): """ For use when parameters are read in from a .yml file. Returns instances of the distribution classes that correspond to the indicator string in the .yml file. """ if dist[0] == ...
43.156051
140
0.619216
9261a7143e603d398f8ff1ed2710aacd123761d6
2,206
py
Python
ipython_auto_connect/connector.py
busbud/ipython-auto-connect
d6b3c77bc3f126aa65b18b24f5197218fc273c39
[ "MIT" ]
null
null
null
ipython_auto_connect/connector.py
busbud/ipython-auto-connect
d6b3c77bc3f126aa65b18b24f5197218fc273c39
[ "MIT" ]
null
null
null
ipython_auto_connect/connector.py
busbud/ipython-auto-connect
d6b3c77bc3f126aa65b18b24f5197218fc273c39
[ "MIT" ]
null
null
null
""" Module that looks for database and bigquery connection info in the env vars, creates connections to those databases and loads them into the IPython environment. DATABASE CONNECTIONS This module uses sqlalchemy to create the connections so it has support for all the database types that sqlalchemy supports. It looks...
29.810811
106
0.686763
97b5aa76b450b7dac8f8f832a69d2aa978b02e84
1,878
py
Python
coaches/migrations/0001_initial.py
keeks-mtl/go-tennis
af3f325a9cfb2faba4d935824492f4aea6d10309
[ "W3C", "PostgreSQL" ]
null
null
null
coaches/migrations/0001_initial.py
keeks-mtl/go-tennis
af3f325a9cfb2faba4d935824492f4aea6d10309
[ "W3C", "PostgreSQL" ]
null
null
null
coaches/migrations/0001_initial.py
keeks-mtl/go-tennis
af3f325a9cfb2faba4d935824492f4aea6d10309
[ "W3C", "PostgreSQL" ]
null
null
null
# Generated by Django 3.2.3 on 2021-07-04 18:22 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
40.826087
135
0.588924
7c06b11022fdb1326627d1dd63c04049199d8fad
3,950
py
Python
tests/testlib.py
normoes/py-lmdb
e39616620410c979daf29f666cc4aed2b53cc59f
[ "OLDAP-2.8" ]
null
null
null
tests/testlib.py
normoes/py-lmdb
e39616620410c979daf29f666cc4aed2b53cc59f
[ "OLDAP-2.8" ]
null
null
null
tests/testlib.py
normoes/py-lmdb
e39616620410c979daf29f666cc4aed2b53cc59f
[ "OLDAP-2.8" ]
null
null
null
# # Copyright 2013 The py-lmdb authors, all rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted only as authorized by the OpenLDAP # Public License. # # A copy of this license is available in the file LICENSE in the # top-level directory of the distribut...
25
78
0.643291
dad586adcf8d5064c95e61c58d0132f934036ba9
1,710
py
Python
pyspextools/data/response.py
spex-xray/pyspex
e83e4d8ef8934942859e58cd46468d8da80c63b3
[ "Apache-2.0" ]
4
2018-03-29T13:28:55.000Z
2018-07-04T08:44:48.000Z
pyspextools/data/response.py
spex-xray/pyspex
e83e4d8ef8934942859e58cd46468d8da80c63b3
[ "Apache-2.0" ]
4
2019-11-20T12:09:09.000Z
2021-07-26T12:14:26.000Z
pyspextools/data/response.py
spex-xray/pyspex
e83e4d8ef8934942859e58cd46468d8da80c63b3
[ "Apache-2.0" ]
1
2020-04-25T10:49:15.000Z
2020-04-25T10:49:15.000Z
#!/usr/bin/env python from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import pyspextools.messages as message import math # Stuff to import for compatibility between python 2 and 3 from builtins import int from futu...
32.264151
112
0.696491
7323f3e39441e48c27e20608f5be286347242aeb
1,348
py
Python
translate/google/cloud/translate_v3beta1/__init__.py
q-logic/google-cloud-python
a65065c89c059bc564bbdd79288a48970907c399
[ "Apache-2.0" ]
null
null
null
translate/google/cloud/translate_v3beta1/__init__.py
q-logic/google-cloud-python
a65065c89c059bc564bbdd79288a48970907c399
[ "Apache-2.0" ]
40
2019-07-16T10:04:48.000Z
2020-01-20T09:04:59.000Z
translate/google/cloud/translate_v3beta1/__init__.py
q-logic/google-cloud-python
a65065c89c059bc564bbdd79288a48970907c399
[ "Apache-2.0" ]
2
2019-07-18T00:05:31.000Z
2019-11-27T14:17:22.000Z
# -*- coding: utf-8 -*- # # 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...
33.7
84
0.762611
f645c85d963bb80338b00bbffe0e27fe46a7b7a0
1,374
py
Python
azure-servicefabric/azure/servicefabric/models/paged_application_type_info_list.py
SUSE/azure-sdk-for-python
324f99d26dd6f4ee9793b9bf1d4d5f928e4b6c2f
[ "MIT" ]
2
2020-07-29T14:22:17.000Z
2020-11-06T18:47:40.000Z
azure-servicefabric/azure/servicefabric/models/paged_application_type_info_list.py
SUSE/azure-sdk-for-python
324f99d26dd6f4ee9793b9bf1d4d5f928e4b6c2f
[ "MIT" ]
1
2016-08-01T07:37:04.000Z
2016-08-01T07:37:04.000Z
azure-servicefabric/azure/servicefabric/models/paged_application_type_info_list.py
SUSE/azure-sdk-for-python
324f99d26dd6f4ee9793b9bf1d4d5f928e4b6c2f
[ "MIT" ]
1
2020-12-12T21:04:41.000Z
2020-12-12T21:04:41.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
38.166667
81
0.641194
d08813b620093a1ecd625fcca64435dbf3d2a6a9
113,525
py
Python
discord/client.py
karcc/TeaBot
31f0a7809a6f0bab270ebff3b6466272f66cb1c5
[ "MIT" ]
null
null
null
discord/client.py
karcc/TeaBot
31f0a7809a6f0bab270ebff3b6466272f66cb1c5
[ "MIT" ]
null
null
null
discord/client.py
karcc/TeaBot
31f0a7809a6f0bab270ebff3b6466272f66cb1c5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ The MIT License (MIT) Copyright (c) 2015-2016 Rapptz 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 r...
34.276872
141
0.573239
96d324f52d449d74ffaa2eb43a4f4bed63e258df
4,094
py
Python
games/snake/snake.py
prtvi/mini-projects
df11a2a8845f099ab24364884f2def5b33a10eef
[ "MIT" ]
null
null
null
games/snake/snake.py
prtvi/mini-projects
df11a2a8845f099ab24364884f2def5b33a10eef
[ "MIT" ]
null
null
null
games/snake/snake.py
prtvi/mini-projects
df11a2a8845f099ab24364884f2def5b33a10eef
[ "MIT" ]
null
null
null
import turtle import time import random delay = 0.1 # score score = 0 high_score = 0 # set up the screen wn = turtle.Screen() wn.title('Snake Game') wn.bgcolor("black") wn.setup(width=600, height=600) wn.tracer(0) # snake head head = turtle.Turtle() head.speed(0) head.shape('square') head.color...
21.776596
91
0.526624
0dcdd325d7d9997df0b6b60d87cab0bd5bcd0ab7
989
py
Python
sliders/models.py
marie0901/portfolio-django-api
eeacc4f75ae7d0ecfe573d5098cc97dbc822b565
[ "MIT" ]
null
null
null
sliders/models.py
marie0901/portfolio-django-api
eeacc4f75ae7d0ecfe573d5098cc97dbc822b565
[ "MIT" ]
null
null
null
sliders/models.py
marie0901/portfolio-django-api
eeacc4f75ae7d0ecfe573d5098cc97dbc822b565
[ "MIT" ]
null
null
null
from django.db import models class SlideManager(models.Manager): def get_queryset(self): return super(SlideManager, self).get_queryset().filter(published=True) class Slide(models.Model): image = models.ImageField(upload_to='sliders', blank=True) title = models.CharField(max_length=24) subtit...
32.966667
78
0.704752
c6d3cf1e9bffbe2ec9588ba7a9e32cce35b60fa3
2,751
py
Python
pynetwork.py
Code1Tech/PyNetwork
bce8170e229db20d2839d2166b60f15c421a7191
[ "MIT" ]
2
2021-04-02T20:31:30.000Z
2021-09-06T03:56:18.000Z
pynetwork.py
Code1Tech/PyNetwork
bce8170e229db20d2839d2166b60f15c421a7191
[ "MIT" ]
null
null
null
pynetwork.py
Code1Tech/PyNetwork
bce8170e229db20d2839d2166b60f15c421a7191
[ "MIT" ]
null
null
null
# Code1Tech (©) 2021. Do not remove this. import socket class ClientConnection: def __init__(self, host, port): self.host = host self.port = port self.client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.addr = (self.host, self.port) def connect(self)...
33.962963
94
0.544166
d8531cb196bcbdd9354e9745fe9df7ad7fa8437f
614
py
Python
epab/utils/_timeit.py
132nd-etcher/epab
5226d3a36580f8cc50cf5dcac426adb1350a2c9b
[ "MIT" ]
2
2018-12-13T06:49:10.000Z
2018-12-13T07:37:49.000Z
epab/utils/_timeit.py
etcher-be/epab
5226d3a36580f8cc50cf5dcac426adb1350a2c9b
[ "MIT" ]
109
2018-08-22T04:25:56.000Z
2019-10-17T05:10:21.000Z
epab/utils/_timeit.py
etcher-be/epab
5226d3a36580f8cc50cf5dcac426adb1350a2c9b
[ "MIT" ]
1
2018-02-25T05:53:18.000Z
2018-02-25T05:53:18.000Z
# coding=utf-8 """ Simple decorator to time functions """ import time from functools import wraps from epab._logging import LOGGER def timeit(func): """ Simple decorator to time functions :param func: function to decorate :type func: callable :return: wrapped function :rtype: callable "...
18.606061
87
0.63355
f3601ab40ea904e70aa58beb3b6ce377733e9ad4
305
py
Python
regexmate/launcher.py
semk/RegexMate
65782334f6c9120c167ef02bc17e4f31f03144a6
[ "MIT" ]
3
2016-11-22T16:24:12.000Z
2021-09-06T17:31:45.000Z
regexmate/launcher.py
semk/RegexMate
65782334f6c9120c167ef02bc17e4f31f03144a6
[ "MIT" ]
null
null
null
regexmate/launcher.py
semk/RegexMate
65782334f6c9120c167ef02bc17e4f31f03144a6
[ "MIT" ]
1
2015-08-07T00:16:22.000Z
2015-08-07T00:16:22.000Z
#! /usr/bin/env python # -*- coding: utf-8 -*- # # RegexMate: A Visual Regular Expression Test/Evaluation tool # # @author: Sreejith K <sreejithemk@gmail.com> # Created on 29th June 2013 # # Licensed under MIT license. Refer COPYING for more info. import app if __name__ == '__main__': app.start()
19.0625
61
0.695082
9e2e4b24602fd5d4888815a3552d0b859132dc64
1,440
py
Python
0845 Enclosed Islands.py
ansabgillani/binarysearchcomproblems
12fe8632f8cbb5058c91a55bae53afa813a3247e
[ "MIT" ]
1
2020-12-29T21:17:26.000Z
2020-12-29T21:17:26.000Z
0845 Enclosed Islands.py
ansabgillani/binarysearchcomproblems
12fe8632f8cbb5058c91a55bae53afa813a3247e
[ "MIT" ]
null
null
null
0845 Enclosed Islands.py
ansabgillani/binarysearchcomproblems
12fe8632f8cbb5058c91a55bae53afa813a3247e
[ "MIT" ]
4
2021-09-09T17:42:43.000Z
2022-03-18T04:54:03.000Z
class Solution: def solve(self, matrix): total = sum(sum(row) for row in matrix) escapable = 0 seen = set() for r in range(len(matrix)): for c in [0,len(matrix[0])-1]: if (r,c) in seen or matrix[r][c] != 1: continue se...
34.285714
118
0.375
39738973e625e9ae1d327a5b1b3f2dafcfc831b3
256
py
Python
manage.py
qiqipipioioi/django-radius-my
f92682fb0d41a4c04878fb5d19e1f01e3dfecea0
[ "MIT" ]
1
2019-08-31T12:49:06.000Z
2019-08-31T12:49:06.000Z
manage.py
qiqipipioioi/django-radius-my
f92682fb0d41a4c04878fb5d19e1f01e3dfecea0
[ "MIT" ]
null
null
null
manage.py
qiqipipioioi/django-radius-my
f92682fb0d41a4c04878fb5d19e1f01e3dfecea0
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "vpnWebProject.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
23.272727
77
0.777344
089dcf5703fef98682bac14eab445531ccd2a959
1,789
py
Python
tests/chainermn_tests/extensions_tests/test_allreduce_persistent.py
zaltoprofen/chainer
3b03f9afc80fd67f65d5e0395ef199e9506b6ee1
[ "MIT" ]
2
2019-08-12T21:48:04.000Z
2020-08-27T18:04:20.000Z
tests/chainermn_tests/extensions_tests/test_allreduce_persistent.py
hitsgub/chainer
20d4d70f5cdacc1f24f243443f5bebc2055c8f8e
[ "MIT" ]
1
2019-10-17T09:56:18.000Z
2019-10-17T09:56:18.000Z
tests/chainermn_tests/extensions_tests/test_allreduce_persistent.py
hitsgub/chainer
20d4d70f5cdacc1f24f243443f5bebc2055c8f8e
[ "MIT" ]
2
2019-07-16T00:24:47.000Z
2021-02-26T10:27:27.000Z
import chainer import chainer.testing import chainer.testing.attr import unittest import chainermn class ExampleModel(chainer.Chain): def __init__(self, n_in=3, n_units=5, n_out=2): super(ExampleModel, self).__init__() with self.init_scope(): self.l1 = chainer.links.Linear(n_in, n_uni...
34.403846
73
0.672443
06cf7572625b1253c1e0604da60c6ff3e6e4eb64
329
py
Python
azure-de10nano-document/sensor-aggregation-reference-design-for-azure/sw/software-code/modules/RfsModule/package/utility.py
Leo-Lee-L/terasic-de10-nano-kit
a7777d713c557691e566b0db6d9522de1e672034
[ "MIT" ]
81
2017-05-05T17:47:12.000Z
2022-03-25T23:17:24.000Z
azure-de10nano-document/sensor-aggregation-reference-design-for-azure/sw/software-code/modules/RfsModule/package/utility.py
Leo-Lee-L/terasic-de10-nano-kit
a7777d713c557691e566b0db6d9522de1e672034
[ "MIT" ]
5
2018-12-16T02:36:04.000Z
2022-03-16T01:40:38.000Z
azure-de10nano-document/sensor-aggregation-reference-design-for-azure/sw/software-code/modules/RfsModule/package/utility.py
Leo-Lee-L/terasic-de10-nano-kit
a7777d713c557691e566b0db6d9522de1e672034
[ "MIT" ]
40
2017-03-30T20:23:55.000Z
2022-03-27T06:53:21.000Z
from logging import getLogger, StreamHandler, DEBUG ''' ---------------------------------------------- General Definitions ---------------------------------------------- ''' logger = getLogger(__name__) handler = StreamHandler() handler.setLevel(DEBUG) logger.setLevel(DEBUG) logger.addHandler(handler) logger.propagate...
23.5
51
0.568389
10dc65c208eb388a34f223f89d6dd9781980f6ae
726
py
Python
zamiaai/skills/dt/__init__.py
0zAND1z/zamia-ai
d9e9c6123fdadca3fae55e87ea2b2b32d82bc210
[ "Apache-2.0" ]
129
2017-03-23T14:20:33.000Z
2022-01-03T01:52:22.000Z
zamiaai/skills/dt/__init__.py
0zAND1z/zamia-ai
d9e9c6123fdadca3fae55e87ea2b2b32d82bc210
[ "Apache-2.0" ]
6
2017-03-09T22:32:55.000Z
2021-05-13T19:07:48.000Z
zamiaai/skills/dt/__init__.py
gooofy/voxforge
da21be38e976aae67214537a27a30541afd3b5aa
[ "Apache-2.0" ]
22
2017-04-07T15:44:05.000Z
2022-03-13T02:41:08.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2016, 2017, 2018 Guenter Bartsch # # 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...
27.923077
74
0.721763
187cb3748c6efec2c834c010013ecf292bddeb4b
5,869
py
Python
fjord/base/middleware.py
DESHRAJ/fjord
8899b6286b23347c9b024334e61c33fe133e836d
[ "BSD-3-Clause" ]
null
null
null
fjord/base/middleware.py
DESHRAJ/fjord
8899b6286b23347c9b024334e61c33fe133e836d
[ "BSD-3-Clause" ]
null
null
null
fjord/base/middleware.py
DESHRAJ/fjord
8899b6286b23347c9b024334e61c33fe133e836d
[ "BSD-3-Clause" ]
null
null
null
import urllib from warnings import warn from django.conf import settings from django.http import HttpResponsePermanentRedirect from django.utils.encoding import smart_str import tower from fjord.base import urlresolvers from fjord.base.browsers import parse_ua from fjord.base.helpers import urlparams """ The middl...
35.143713
79
0.658715
ec9515528ecb723ba1640b9869b10ccb2e44993d
15,182
py
Python
qa/rpc-tests/rest.py
DeVxex/RBC
8e3b02fa89b49bbce25be34908c219b392deaf49
[ "Apache-2.0" ]
12
2017-07-07T15:05:12.000Z
2019-10-12T11:19:59.000Z
qa/rpc-tests/rest.py
DeVxex/RBC
8e3b02fa89b49bbce25be34908c219b392deaf49
[ "Apache-2.0" ]
2
2019-05-22T11:32:46.000Z
2020-06-10T11:32:47.000Z
qa/rpc-tests/rest.py
DeVxex/RBC
8e3b02fa89b49bbce25be34908c219b392deaf49
[ "Apache-2.0" ]
9
2017-06-07T04:47:52.000Z
2021-03-25T08:59:28.000Z
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test REST interface # from test_framework.test_framework import BitcoinTestFramework from test_fram...
45.319403
132
0.643328
957c9ee1755669693822de14ad196f28400932a6
7,831
py
Python
tests/test_cli.py
takana-v/nb-clean
60d82c2e2e2638a97f07287b837fe9129394179a
[ "ISC" ]
47
2017-12-18T10:33:03.000Z
2022-03-30T14:25:43.000Z
tests/test_cli.py
takana-v/nb-clean
60d82c2e2e2638a97f07287b837fe9129394179a
[ "ISC" ]
67
2018-01-24T11:17:03.000Z
2022-03-01T14:03:10.000Z
tests/test_cli.py
takana-v/nb-clean
60d82c2e2e2638a97f07287b837fe9129394179a
[ "ISC" ]
13
2019-01-21T13:20:33.000Z
2022-02-14T18:59:27.000Z
"""Tests for nb_clean.cli.""" import argparse import io import pathlib import sys from typing import Iterable import nbformat import pytest from pytest_mock import MockerFixture import nb_clean def test_exit_with_error(capsys, mocker: MockerFixture) -> None: """Test nb_clean.cli.exit_with_error.""" mock_ex...
29.889313
77
0.670796
1ad7f982d975045dcd1d7de358954c13902b652d
7,024
py
Python
BlenderExporterAddon/lavy.py
bachelor-whc/Valkyrie
9254d100191f8c892a5cbc1ee68dc81470761c33
[ "MIT" ]
6
2016-12-28T05:23:25.000Z
2018-10-23T14:04:38.000Z
BlenderExporterAddon/lavy.py
bachelor-whc/Valkyrie
9254d100191f8c892a5cbc1ee68dc81470761c33
[ "MIT" ]
14
2016-12-17T08:23:02.000Z
2017-01-12T13:29:32.000Z
BlenderExporterAddon/lavy.py
bachelorwhc/Valkyrie
9254d100191f8c892a5cbc1ee68dc81470761c33
[ "MIT" ]
null
null
null
bl_info = { "name": ".lavy exporter", "category": "Import-Export", } import os import bpy import json import bmesh import ctypes from mathutils import Vector from bpy.props import StringProperty, BoolProperty from bpy_extras.io_utils import ExportHelper from shutil import copyfile class Vertex: __slots__ ...
35.12
114
0.50541
23912f0034ac49417a4b97b84a9a677392ba8395
1,187
py
Python
Engine/8/Engine/Logic/Logger.py
eze1376/AICup2021
2d8703e9f44e234f5a00fc4a3e5a3847155b380b
[ "Apache-2.0" ]
null
null
null
Engine/8/Engine/Logic/Logger.py
eze1376/AICup2021
2d8703e9f44e234f5a00fc4a3e5a3847155b380b
[ "Apache-2.0" ]
null
null
null
Engine/8/Engine/Logic/Logger.py
eze1376/AICup2021
2d8703e9f44e234f5a00fc4a3e5a3847155b380b
[ "Apache-2.0" ]
null
null
null
import logging from .settings import * import sys formatter = logging.Formatter('%(asctime)s %(levelname)s: %(message)s', '%m-%d-%Y %H:%M:%S') stderr_logger = logging.getLogger('toStderr') stderr_handler = logging.StreamHandler(sys.stderr) stderr_handler.setFormatter(formatter) stderr_lo...
34.911765
100
0.773378
90effe888ae609f3803ea2d548d4c72649e54bb3
11,989
py
Python
detectron/utils/py_cpu_nms.py
994374821/maskrcnn_body25
338bca8420341d690e143a4b9d84f51d305c7463
[ "Apache-2.0" ]
null
null
null
detectron/utils/py_cpu_nms.py
994374821/maskrcnn_body25
338bca8420341d690e143a4b9d84f51d305c7463
[ "Apache-2.0" ]
2
2021-03-25T22:51:25.000Z
2021-10-12T22:58:13.000Z
detectron/utils/py_cpu_nms.py
994374821/maskrcnn_body25
338bca8420341d690e143a4b9d84f51d305c7463
[ "Apache-2.0" ]
null
null
null
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- import numpy as np from matplotlib.patches import Rectangle import matp...
33.395543
114
0.452331
6cc7fed6173d5b81bb0fda53f17a5fad7819bcfd
182
py
Python
26-parameters.py
MKen212/pymosh
6db31f181081baf3e4cc3d7228a3480b16bd3cda
[ "MIT" ]
null
null
null
26-parameters.py
MKen212/pymosh
6db31f181081baf3e4cc3d7228a3480b16bd3cda
[ "MIT" ]
null
null
null
26-parameters.py
MKen212/pymosh
6db31f181081baf3e4cc3d7228a3480b16bd3cda
[ "MIT" ]
null
null
null
def greet_user(first_name, last_name): print(f"Hi there, {first_name} {last_name}!") print("Welcome aboard") print("<Start>") greet_user("John", "Smith") print("<Finish>")
20.222222
49
0.67033
2217b905787fdb78ddcdfff9e434b163f51099d7
5,139
py
Python
gmtmodernize/cli.py
GenericMappingTools/gmtmodernize
8b7a77323498bb3ef8c2137099849f0651f941bb
[ "BSD-3-Clause" ]
4
2017-07-01T01:03:12.000Z
2018-11-18T05:48:28.000Z
gmtmodernize/cli.py
GenericMappingTools/gmtmodernize
8b7a77323498bb3ef8c2137099849f0651f941bb
[ "BSD-3-Clause" ]
7
2017-04-12T05:35:30.000Z
2017-06-30T00:52:28.000Z
gmtmodernize/cli.py
GenericMappingTools/gmtmodernize
8b7a77323498bb3ef8c2137099849f0651f941bb
[ "BSD-3-Clause" ]
null
null
null
"""Convert GMT shell scripts from classic to modern mode. Prints the converted modern mode script to standard output (STDOUT) when converting a single script. Usage: gmtmodernize [--debug] SCRIPT gmtmodernize --recursive [--debug] [--quiet] FOLDER_CLASSIC FOLDER_MODERN gmtmodernize --help gmtmodernize...
34.033113
79
0.637089
7c0d601bddc9499742648079061d9576fb5b3a29
468
py
Python
tutorials/migrations/0006_auto_20171114_1230.py
bipoza/unikastaroak
4044d3ff3eaa4172275a8f46d9765a3840a51d7b
[ "Apache-2.0" ]
null
null
null
tutorials/migrations/0006_auto_20171114_1230.py
bipoza/unikastaroak
4044d3ff3eaa4172275a8f46d9765a3840a51d7b
[ "Apache-2.0" ]
null
null
null
tutorials/migrations/0006_auto_20171114_1230.py
bipoza/unikastaroak
4044d3ff3eaa4172275a8f46d9765a3840a51d7b
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2017-11-14 11:30 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('tutorials', '0005_article_files'), ] operations = [ migrations.AlterField( ...
22.285714
70
0.617521
3f9cda589df732daba92aa8a55ea43b5e12b3d8f
61,715
py
Python
assets/py/fonts/myfont.py
hkdickyko/hkdickyko.github.io
bbee50cc1002071c100e9109952fa58966f78a6c
[ "MIT" ]
1
2021-01-07T14:48:03.000Z
2021-01-07T14:48:03.000Z
assets/py/fonts/myfont.py
hkdickyko/hkdickyko.github.io
bbee50cc1002071c100e9109952fa58966f78a6c
[ "MIT" ]
null
null
null
assets/py/fonts/myfont.py
hkdickyko/hkdickyko.github.io
bbee50cc1002071c100e9109952fa58966f78a6c
[ "MIT" ]
null
null
null
# Code generated by font_to_py.py. # Font: orange.ttf # Cmd: ./font_to_py.py -x orange.ttf 50 myfont.py version = '0.33' def height(): return 50 def baseline(): return 39 def max_width(): return 42 def hmap(): return True def reverse(): return False def monospaced(): return False def min_...
66.217811
68
0.708709
95b8710e62bc9358e7baefa5f620c62fe07cfea5
600
py
Python
Python/numerical-integration/trapezoidalRule.py
bradencarlson/numerical-analysis
036fdc216444e16ad416389855f4b1803a1a20f6
[ "MIT" ]
null
null
null
Python/numerical-integration/trapezoidalRule.py
bradencarlson/numerical-analysis
036fdc216444e16ad416389855f4b1803a1a20f6
[ "MIT" ]
null
null
null
Python/numerical-integration/trapezoidalRule.py
bradencarlson/numerical-analysis
036fdc216444e16ad416389855f4b1803a1a20f6
[ "MIT" ]
null
null
null
# This implements the trapezoidal rule for integration. # This method has an error term with an order of # magnitude O(h^2). import math # define the function that is to be integrated here def f(x): return math.sin(x) # define the bounds of integration here a = 0 b = 5 # define the number of subintervals to b...
19.354839
57
0.685
a76aca3411517bcd8693dde11847c631fdc72275
640
py
Python
HierLower.py
andryuha77/Emerging-Technologies-problem-Sheet1
036a132032a4dc3110e5ea78702e2c7a921b071d
[ "MIT" ]
null
null
null
HierLower.py
andryuha77/Emerging-Technologies-problem-Sheet1
036a132032a4dc3110e5ea78702e2c7a921b071d
[ "MIT" ]
null
null
null
HierLower.py
andryuha77/Emerging-Technologies-problem-Sheet1
036a132032a4dc3110e5ea78702e2c7a921b071d
[ "MIT" ]
null
null
null
from random import randint print("Guess a number between 1 and 50.") #generete random num secretNum = randint(0,50) # Take num from user userGuess = int(input("Your guess: ")) count = [] while userGuess != secretNum: if userGuess < secretNum: print("Too low, try again.") userGuess = int(input())...
24.615385
64
0.635938
03a33a601b42adf643f32d951aabeb75f8b99346
23
py
Python
msgpackrpc/_version.py
hvishwanath/msgpack-rpc-python
ff9eff5f1b2576593bd077cb164d170b4bea6d97
[ "Apache-1.1" ]
1
2015-04-18T08:00:28.000Z
2015-04-18T08:00:28.000Z
msgpackrpc/_version.py
hvishwanath/msgpack-rpc-python
ff9eff5f1b2576593bd077cb164d170b4bea6d97
[ "Apache-1.1" ]
null
null
null
msgpackrpc/_version.py
hvishwanath/msgpack-rpc-python
ff9eff5f1b2576593bd077cb164d170b4bea6d97
[ "Apache-1.1" ]
null
null
null
__version__ = '0.4dev'
11.5
22
0.695652
01de3583145ca9811413fb0d7989391f944a4197
71
py
Python
python/surfer/surfer.py
ScriptIdiot/pantry
4cdda7bb8747f7b2eb00d85e929b9d797b1bcf85
[ "MIT" ]
4
2021-09-13T08:08:05.000Z
2022-03-27T20:08:34.000Z
python/surfer/surfer.py
ScriptIdiot/pantry
4cdda7bb8747f7b2eb00d85e929b9d797b1bcf85
[ "MIT" ]
null
null
null
python/surfer/surfer.py
ScriptIdiot/pantry
4cdda7bb8747f7b2eb00d85e929b9d797b1bcf85
[ "MIT" ]
2
2021-06-27T23:03:27.000Z
2021-08-01T08:47:52.000Z
#!/usr/bin/python3 from core import manager, arguments manager.start()
17.75
35
0.774648
1c5f9bbb611d3425f33aaccd07a290c0f670e8e9
13,721
py
Python
resources/lib/listtv.py
bradyemerson/plugin.video.starzplay
bfce40a99881562c41918744ce9fa20964bf7121
[ "Apache-2.0" ]
null
null
null
resources/lib/listtv.py
bradyemerson/plugin.video.starzplay
bfce40a99881562c41918744ce9fa20964bf7121
[ "Apache-2.0" ]
null
null
null
resources/lib/listtv.py
bradyemerson/plugin.video.starzplay
bfce40a99881562c41918744ce9fa20964bf7121
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import urllib import xbmcplugin import xbmc import xbmcgui import common import database_tv as tv_db import database_common pluginhandle = common.pluginHandle # 501-POSTER WRAP 503-MLIST3 504=MLIST2 508-FANARTPOSTER confluence_views = [500, 501, 502, 503, 50...
35.918848
118
0.651848
9f999c764bffbe747f914018522af823903b84f5
903
py
Python
creationals_patterns/factory_method/creators.py
ZaslavkyDi/gof-patterns
c84e99196b8181468d01cd760dc0b9dc5b4a0c98
[ "Apache-2.0" ]
null
null
null
creationals_patterns/factory_method/creators.py
ZaslavkyDi/gof-patterns
c84e99196b8181468d01cd760dc0b9dc5b4a0c98
[ "Apache-2.0" ]
null
null
null
creationals_patterns/factory_method/creators.py
ZaslavkyDi/gof-patterns
c84e99196b8181468d01cd760dc0b9dc5b4a0c98
[ "Apache-2.0" ]
null
null
null
from abc import ABC, abstractmethod from creationals_patterns.factory_method.models.products import IBaseButton, WindowsButton, WebButton class IBaseDialog(ABC): """Superclass/Interface 'Creator'.""" def render(self) -> None: button = self.create_button() button.render_button() butto...
25.8
101
0.669989
0b7daa6237056130b41632fa3ca07e16ed12e3a0
19,430
py
Python
CPAC/easy_thresh/easy_thresh.py
FCP-INDI/C-PAC
07d59f63ad716485ab0cf96e84f5d9a531312e9e
[ "BSD-3-Clause" ]
125
2015-03-04T09:14:46.000Z
2022-03-29T07:46:12.000Z
CPAC/easy_thresh/easy_thresh.py
FCP-INDI/C-PAC
07d59f63ad716485ab0cf96e84f5d9a531312e9e
[ "BSD-3-Clause" ]
1,018
2015-01-04T16:01:29.000Z
2022-03-31T19:23:09.000Z
CPAC/easy_thresh/easy_thresh.py
shnizzedy/C-PAC
f33bbe64ea796a0e6f586d09cc90cf4a0a432b17
[ "BSD-3-Clause" ]
117
2015-01-10T08:05:52.000Z
2022-01-18T05:16:51.000Z
from CPAC.pipeline import nipype_pipeline_engine as pe import nipype.interfaces.fsl as fsl import nipype.interfaces.utility as util def easy_thresh(wf_name): """ Workflow for carrying out cluster-based thresholding and colour activation overlaying Parameters ---------- wf_name : string ...
39.734151
160
0.5807
a95496cf465446805114ffc43f3338ae5b003b4f
666
py
Python
src/uefi/BaseTools/Source/Python/UPT/Object/Parser/__init__.py
kkennett/oscore.dev
59e786f12f9af969211c95a9d2863b1767528341
[ "BSD-3-Clause" ]
null
null
null
src/uefi/BaseTools/Source/Python/UPT/Object/Parser/__init__.py
kkennett/oscore.dev
59e786f12f9af969211c95a9d2863b1767528341
[ "BSD-3-Clause" ]
null
null
null
src/uefi/BaseTools/Source/Python/UPT/Object/Parser/__init__.py
kkennett/oscore.dev
59e786f12f9af969211c95a9d2863b1767528341
[ "BSD-3-Clause" ]
null
null
null
## @file # Python 'Object' package initialization file. # # This file is required to make Python interpreter treat the directory # as containing package. # # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials are licensed and made available # under the...
31.714286
79
0.761261
1b6b0995b401e9f5968c40050b874b8824d95e18
8,405
py
Python
salt/states/postgres_user.py
jkur/salt
3e62675550f9869d550d7787800270e632955d2f
[ "Apache-2.0" ]
3
2015-04-16T18:42:35.000Z
2017-10-30T16:57:49.000Z
salt/states/postgres_user.py
jkur/salt
3e62675550f9869d550d7787800270e632955d2f
[ "Apache-2.0" ]
16
2015-11-18T00:44:03.000Z
2018-10-29T20:48:27.000Z
salt/states/postgres_user.py
jkur/salt
3e62675550f9869d550d7787800270e632955d2f
[ "Apache-2.0" ]
1
2020-10-19T11:49:50.000Z
2020-10-19T11:49:50.000Z
# -*- coding: utf-8 -*- ''' Management of PostgreSQL users (roles) ====================================== The postgres_users module is used to create and manage Postgres users. .. code-block:: yaml frank: postgres_user.present ''' from __future__ import absolute_import # Import Python libs # Import salt ...
28.39527
92
0.57442
bab6da64f72ebd2fa9dd4e8d633dc5c2879d1abd
1,986
py
Python
src/practice_thread.py
xinzheshen/tf_practice
56e978f4391c0bfd9db278acec93405f849b64b5
[ "MIT" ]
null
null
null
src/practice_thread.py
xinzheshen/tf_practice
56e978f4391c0bfd9db278acec93405f849b64b5
[ "MIT" ]
null
null
null
src/practice_thread.py
xinzheshen/tf_practice
56e978f4391c0bfd9db278acec93405f849b64b5
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- import tensorflow as tf import numpy as np # 样本个数 sample_num=5 # 设置迭代次数 epoch_num = 2 # 设置一个批次中包含样本个数 batch_size = 3 # 计算每一轮epoch中含有的batch个数 batch_total = int(sample_num/batch_size)+1 # 生成5个数据和标签 def generate_data(sample_num=sample_num): labels = np.asarray(range(0, sample_num)) image...
30.090909
101
0.690332
988790b3a593e3eb8f6fd4215ef616e09eb60e82
18,702
py
Python
Lib/test/test_code.py
samety/cpython
4823d9a51281ebbc8e8d82a0dd3edc7d13ea8ac7
[ "0BSD" ]
null
null
null
Lib/test/test_code.py
samety/cpython
4823d9a51281ebbc8e8d82a0dd3edc7d13ea8ac7
[ "0BSD" ]
null
null
null
Lib/test/test_code.py
samety/cpython
4823d9a51281ebbc8e8d82a0dd3edc7d13ea8ac7
[ "0BSD" ]
null
null
null
"""This module includes tests of the code object representation. >>> def f(x): ... def g(y): ... return x + y ... return g ... >>> dump(f.__code__) name: f argcount: 1 posonlyargcount: 0 kwonlyargcount: 0 names: () varnames: ('x', 'g') cellvars: ('x',) freevars: () nlocals: 2 flags: 3 consts: ('None',...
30.608838
86
0.570581
8a66410a0469f608849d17b51f3b9bdfd6c1ddd1
13,875
bzl
Python
tools/android/android_sdk_repository_template.bzl
mikethebro/bazel
238e3444dcf771dc353f9e24f34d1518bde62809
[ "Apache-2.0" ]
1
2019-04-14T20:17:02.000Z
2019-04-14T20:17:02.000Z
tools/android/android_sdk_repository_template.bzl
mikethebro/bazel
238e3444dcf771dc353f9e24f34d1518bde62809
[ "Apache-2.0" ]
null
null
null
tools/android/android_sdk_repository_template.bzl
mikethebro/bazel
238e3444dcf771dc353f9e24f34d1518bde62809
[ "Apache-2.0" ]
null
null
null
"""Template for the build file used in android_sdk_repository.""" # Copyright 2016 The Bazel Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.ap...
37.298387
96
0.564613
8f3c161df856c0a231831af6ef04e61b3b641ec3
10,825
py
Python
colour/io/luts/sequence.py
aurelienpierre/colour
3ac45c12fbc0493e49ba4d4b2cb253df9fe14c47
[ "BSD-3-Clause" ]
null
null
null
colour/io/luts/sequence.py
aurelienpierre/colour
3ac45c12fbc0493e49ba4d4b2cb253df9fe14c47
[ "BSD-3-Clause" ]
null
null
null
colour/io/luts/sequence.py
aurelienpierre/colour
3ac45c12fbc0493e49ba4d4b2cb253df9fe14c47
[ "BSD-3-Clause" ]
null
null
null
""" LUT Operator ============ Defines the *LUT* sequence class: - :class:`colour.LUTSequence` """ from __future__ import annotations import re from collections.abc import MutableSequence from copy import deepcopy from colour.hints import ( Any, ArrayLike, Integer, List, NDArray, Sequence,...
27.405063
79
0.526651
aa165d78a4e9cbe7ce8d3e953f6f25ac02091c06
1,386
py
Python
mlalv/evaluation.py
CodeWithAlvin/mlalv
5143deb108ce164dc57897c17d09523eb7fd65e5
[ "MIT" ]
null
null
null
mlalv/evaluation.py
CodeWithAlvin/mlalv
5143deb108ce164dc57897c17d09523eb7fd65e5
[ "MIT" ]
1
2021-06-19T07:11:42.000Z
2021-09-04T14:57:50.000Z
mlalv/evaluation.py
CodeWithAlvin/mlalv
5143deb108ce164dc57897c17d09523eb7fd65e5
[ "MIT" ]
null
null
null
# necessary imports from sklearn.metrics import f1_score,precision_score,recall_score,accuracy_score from sklearn.metrics import mean_squared_error from math import sqrt def prepare_report(y_true,y_pred,type,log=True,avg="micro"): """ type ==> classification / regression analyze the classification model o...
38.5
104
0.655844
3eb8c52f7dde8e113816a4e77fec498c8751c7ad
1,132
py
Python
timesketch/lib/aggregators_old_test.py
macdaliot/timesketch
f6a4984208f4c39f01efd72e36ddf21f630b6699
[ "Apache-2.0" ]
1,810
2015-01-03T22:34:45.000Z
2022-03-30T10:23:18.000Z
timesketch/lib/aggregators_old_test.py
macdaliot/timesketch
f6a4984208f4c39f01efd72e36ddf21f630b6699
[ "Apache-2.0" ]
1,291
2015-01-08T00:00:12.000Z
2022-03-29T03:26:58.000Z
timesketch/lib/aggregators_old_test.py
macdaliot/timesketch
f6a4984208f4c39f01efd72e36ddf21f630b6699
[ "Apache-2.0" ]
519
2015-01-20T09:26:06.000Z
2022-03-29T11:02:10.000Z
# Copyright 2015 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
36.516129
74
0.734982
3687f8d1c0e851c54473e6b992f8c6da0eddf13e
15,804
py
Python
lightseq/training/ops/pytorch/transformer_decoder_layer.py
OzzyXu/lightseq
fd80ae011c76759dafebee608def6248b6d8d353
[ "Apache-2.0" ]
1
2021-07-19T22:06:29.000Z
2021-07-19T22:06:29.000Z
lightseq/training/ops/pytorch/transformer_decoder_layer.py
OzzyXu/lightseq
fd80ae011c76759dafebee608def6248b6d8d353
[ "Apache-2.0" ]
null
null
null
lightseq/training/ops/pytorch/transformer_decoder_layer.py
OzzyXu/lightseq
fd80ae011c76759dafebee608def6248b6d8d353
[ "Apache-2.0" ]
null
null
null
import math from dataclasses import dataclass import torch from torch import nn from torch.autograd import Function from lightseq.training.ops.pytorch.builder import TransformerBuilder from lightseq.training.ops.pytorch.util import copy_para, MODEL_ARCH transformer_cuda_module = None _all_layer_grads = dict() _share...
37.450237
122
0.595229
012cc6771959b6d7fc7658b347671a5d9941e2a7
1,152
py
Python
SqlmapCelery/sqlmap/tamper/greatest.py
tt9133github/hunter
7a1be4ae1fbbadff291742f513d47f0921159648
[ "Apache-2.0" ]
322
2020-01-10T09:08:31.000Z
2022-01-21T06:43:24.000Z
SqlmapCelery/sqlmap/tamper/greatest.py
tt9133github/hunter
7a1be4ae1fbbadff291742f513d47f0921159648
[ "Apache-2.0" ]
27
2020-01-10T10:12:21.000Z
2022-03-08T23:38:23.000Z
SqlmapCelery/sqlmap/tamper/greatest.py
tt9133github/hunter
7a1be4ae1fbbadff291742f513d47f0921159648
[ "Apache-2.0" ]
128
2020-01-10T09:08:14.000Z
2022-03-18T06:56:01.000Z
#!/usr/bin/env python """ Copyright (c) 2006-2017 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ import re from lib.core.enums import PRIORITY __priority__ = PRIORITY.HIGHEST def dependencies(): pass def tamper(payload, **kwargs): """ Replaces greater than...
25.043478
107
0.600694
0e5c53a12e3d4dbf1cceba237b192871afc51b68
24,553
py
Python
Simon/dev/main_transfer_to_datalake_stat_geo.py
uncharted-distil/simon
26e4e54e6de455bde8ee1a24634d060e1ec7babb
[ "MIT" ]
null
null
null
Simon/dev/main_transfer_to_datalake_stat_geo.py
uncharted-distil/simon
26e4e54e6de455bde8ee1a24634d060e1ec7babb
[ "MIT" ]
2
2021-01-27T14:57:26.000Z
2021-10-07T19:34:09.000Z
Simon/dev/main_transfer_to_datalake_stat_geo.py
uncharted-distil/simon
26e4e54e6de455bde8ee1a24634d060e1ec7babb
[ "MIT" ]
1
2021-03-18T19:13:05.000Z
2021-03-18T19:13:05.000Z
from Encoder import * import pandas as pd from keras.models import Model from keras.layers import Dense, Activation, Flatten, Input, Dropout, MaxPooling1D, Convolution1D from keras.layers import LSTM, Lambda, merge, Masking from keras.layers import Embedding, TimeDistributed from keras.layers.normalization import Batch...
38.484326
165
0.65715
5406f9772c530f91448c218090a2f04349dcee15
1,851
py
Python
apps/openduty/event_log.py
seanlefevre/openduty
34ab21117f114ccc808d8b0aa2cb801c819bdb86
[ "MIT" ]
145
2016-04-11T06:53:13.000Z
2022-03-22T05:15:49.000Z
apps/openduty/event_log.py
seanlefevre/openduty
34ab21117f114ccc808d8b0aa2cb801c819bdb86
[ "MIT" ]
78
2017-09-24T10:59:49.000Z
2022-02-12T07:36:27.000Z
apps/openduty/event_log.py
seanlefevre/openduty
34ab21117f114ccc808d8b0aa2cb801c819bdb86
[ "MIT" ]
30
2016-04-11T06:53:16.000Z
2021-12-29T11:39:26.000Z
from django.template.response import TemplateResponse from django.contrib.auth.decorators import login_required from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage from django.contrib import messages from django.conf import settings from apps.events.models import EventLog from apps.services.models ...
33.053571
94
0.692058
3b47d2478141e5b87af224ab47ad8448e5cfb741
11,501
py
Python
picoCTF-web/api/apps/v1/problems.py
minhnq1618/picoCTF
f634f0e55be6b1a8552a33e4f94e7487142e8bce
[ "MIT" ]
280
2016-03-23T05:16:07.000Z
2022-03-25T10:45:33.000Z
picoCTF-web/api/apps/v1/problems.py
minhnq1618/picoCTF
f634f0e55be6b1a8552a33e4f94e7487142e8bce
[ "MIT" ]
384
2016-03-22T05:14:47.000Z
2021-09-13T23:46:14.000Z
picoCTF-web/api/apps/v1/problems.py
minhnq1618/picoCTF
f634f0e55be6b1a8552a33e4f94e7487142e8bce
[ "MIT" ]
142
2016-03-15T16:27:21.000Z
2022-02-23T23:41:28.000Z
""" Problem related endpoints. Problems and bundles are not treated as usual CRUD resources because the source of truth for problem and bundle state is the shell server(s). So bundles and problems are essentially treated as read-only, with the exception of the PATCH /problems endpoint, which takes a shell server's ou...
39.25256
87
0.620207
44b33b827946f4f1ad4805fa3d597ddeecba29b4
866
py
Python
2017/02/solve.py
lamperi/aoc
1781dcbac0be18a086c10a9b76fb6a2d3595523c
[ "MIT" ]
null
null
null
2017/02/solve.py
lamperi/aoc
1781dcbac0be18a086c10a9b76fb6a2d3595523c
[ "MIT" ]
null
null
null
2017/02/solve.py
lamperi/aoc
1781dcbac0be18a086c10a9b76fb6a2d3595523c
[ "MIT" ]
null
null
null
import os.path INPUT=os.path.join(os.path.dirname(__file__), "input.txt") with open(INPUT) as f: data = f.read().strip() def checksum(data): csum = 0 for line in data.splitlines(): numbers = [int(s) for s in line.split()] check = max(numbers) - min(numbers) csum += check return ...
21.121951
58
0.539261
c5979926e0017dbd3fa36a25316db67293b506b7
660
py
Python
templates/pgm_template.py
warp5tw/openbmc-test-automation
9c85c2df6cbacbd48c7c4962aef39e03814932cc
[ "Apache-2.0" ]
null
null
null
templates/pgm_template.py
warp5tw/openbmc-test-automation
9c85c2df6cbacbd48c7c4962aef39e03814932cc
[ "Apache-2.0" ]
1
2021-11-10T00:55:49.000Z
2021-11-10T00:55:49.000Z
templates/pgm_template.py
warp5tw/openbmc-test-automation
9c85c2df6cbacbd48c7c4962aef39e03814932cc
[ "Apache-2.0" ]
4
2019-11-01T01:10:23.000Z
2020-01-10T01:46:36.000Z
#!/usr/bin/env python r""" This module is the python counterpart to pgm_template.py. """ import gen_print as gp import gen_robot_valid as grv def suite_setup(): r""" Do test suite setup tasks. """ gp.qprintn() validate_suite_parms() gp.qprint_pgm_header() def test_setup(): r""" ...
13.469388
57
0.628788
f386115bed754ffd94f7d3299cc844664d20b9ca
3,852
py
Python
mule/platforms/10_travis_job/JobPlatform.py
valentinaschueller/sweet
27e99c7a110c99deeadee70688c186d82b39ac90
[ "MIT" ]
6
2017-11-20T08:12:46.000Z
2021-03-11T15:32:36.000Z
mule/platforms/10_travis_job/JobPlatform.py
valentinaschueller/sweet
27e99c7a110c99deeadee70688c186d82b39ac90
[ "MIT" ]
4
2018-02-02T21:46:33.000Z
2022-01-11T11:10:27.000Z
mule/platforms/10_travis_job/JobPlatform.py
valentinaschueller/sweet
27e99c7a110c99deeadee70688c186d82b39ac90
[ "MIT" ]
12
2016-03-01T18:33:34.000Z
2022-02-08T22:20:31.000Z
import platform import socket import sys from mule_local.JobGeneration import * from mule.JobPlatformResources import * from . import JobPlatformAutodetect import multiprocessing # Underscore defines symbols to be private _job_id = None def _whoami(depth=1): """ String of function name to recycle code ...
16.820961
103
0.635514
0900747515319284edd8c1f6c925650255922676
3,966
py
Python
qiskit/compiler/scheduler.py
Elliot-Coupe/qiskit-terra
8a604e156ba4c2fa099b1c24cd941f59b9408398
[ "Apache-2.0" ]
1
2021-07-06T09:07:47.000Z
2021-07-06T09:07:47.000Z
qiskit/compiler/scheduler.py
Elliot-Coupe/qiskit-terra
8a604e156ba4c2fa099b1c24cd941f59b9408398
[ "Apache-2.0" ]
1
2019-10-03T12:22:41.000Z
2019-10-03T12:22:41.000Z
qiskit/compiler/scheduler.py
Elliot-Coupe/qiskit-terra
8a604e156ba4c2fa099b1c24cd941f59b9408398
[ "Apache-2.0" ]
null
null
null
# This code is part of Qiskit. # # (C) Copyright IBM 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
42.191489
98
0.708775
29031f53cdf6a1b0e9a4d3899f30d590b66997c8
1,438
py
Python
probe/modules/antivirus/fsecure/plugin.py
krisshol/bach-kmno
f40d85b3397bb340e26a671c54d4a753dbbb0d43
[ "Apache-2.0" ]
248
2015-01-08T09:36:44.000Z
2022-01-12T10:29:21.000Z
probe/modules/antivirus/fsecure/plugin.py
krisshol/bach-kmno
f40d85b3397bb340e26a671c54d4a753dbbb0d43
[ "Apache-2.0" ]
50
2015-01-09T08:31:57.000Z
2022-03-30T10:41:13.000Z
probe/modules/antivirus/fsecure/plugin.py
krisshol/bach-kmno
f40d85b3397bb340e26a671c54d4a753dbbb0d43
[ "Apache-2.0" ]
74
2015-01-05T09:11:21.000Z
2022-03-29T02:16:54.000Z
# # Copyright (c) 2013-2018 Quarkslab. # This file is part of IRMA project. # # 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 in the top-level directory # of this distribution and at: # # http:...
29.346939
73
0.67872
fb2349348b0671437724fe3fad1233a15699abf2
6,623
py
Python
urbanairship/core.py
urbanairship/python-library
f59d7140c16db7aec48e8ebbaf26f31e7f02ab26
[ "Apache-2.0" ]
26
2015-01-05T21:08:07.000Z
2021-05-13T07:27:19.000Z
urbanairship/core.py
urbanairship/python-library
f59d7140c16db7aec48e8ebbaf26f31e7f02ab26
[ "Apache-2.0" ]
32
2015-01-08T23:46:36.000Z
2022-02-02T18:17:58.000Z
urbanairship/core.py
urbanairship/python-library
f59d7140c16db7aec48e8ebbaf26f31e7f02ab26
[ "Apache-2.0" ]
33
2015-01-21T08:02:40.000Z
2022-03-25T06:02:04.000Z
import logging import re import sys import warnings import requests from . import __about__, common from .push import Push, ScheduledPush, TemplatePush logger = logging.getLogger("urbanairship") VALID_KEY = re.compile(r"^[\w-]{22}$") VALID_LOCATIONS = ["eu", "us", None] class Urls(object): def __init__(self, ...
31.688995
88
0.60607
7c6707d2893f9c62acdd5c69eb52f66a404b13f3
383
py
Python
setup.py
realazthat/python-order-maintenance
6c21399f417dd9bc6e711f4194dac67f80aa64c4
[ "MIT" ]
2
2016-04-15T18:53:59.000Z
2016-04-15T19:02:44.000Z
setup.py
realazthat/python-order-maintenance
6c21399f417dd9bc6e711f4194dac67f80aa64c4
[ "MIT" ]
null
null
null
setup.py
realazthat/python-order-maintenance
6c21399f417dd9bc6e711f4194dac67f80aa64c4
[ "MIT" ]
null
null
null
#!/usr/bin/env python from distutils.core import setup setup(name='order-maintenance', version='1.0', description='Order Maintenance Library', author='Mikola Lysenko, Azriel Fasten', author_email='mikolalysenko@gmail.com, realazthat@gmail.com', url='https://github.com/realazthat/python-o...
31.916667
67
0.697128
940a3b2e74de7a0a04fb536455765aedc74aaf27
47,684
py
Python
systemvm/debian/opt/cloud/bin/configure.py
deargopinath/cloudstack
afc819e5c8ebfd065ad130e82b218a560df5122a
[ "Apache-2.0" ]
1
2020-03-22T14:55:12.000Z
2020-03-22T14:55:12.000Z
systemvm/debian/opt/cloud/bin/configure.py
deargopinath/cloudstack
afc819e5c8ebfd065ad130e82b218a560df5122a
[ "Apache-2.0" ]
null
null
null
systemvm/debian/opt/cloud/bin/configure.py
deargopinath/cloudstack
afc819e5c8ebfd065ad130e82b218a560df5122a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -- 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, Vers...
42.461264
172
0.526655
7b1c915551383e45da03a446e4b2ca32189821fe
4,369
py
Python
lib/wrappers.py
aisutd/god-pong
2f84f6e276e68a8c7c4d90a046f35cbddb8a7720
[ "MIT" ]
1
2020-02-11T04:51:50.000Z
2020-02-11T04:51:50.000Z
lib/wrappers.py
aisutd/god-pong
2f84f6e276e68a8c7c4d90a046f35cbddb8a7720
[ "MIT" ]
null
null
null
lib/wrappers.py
aisutd/god-pong
2f84f6e276e68a8c7c4d90a046f35cbddb8a7720
[ "MIT" ]
null
null
null
import cv2 import gym import gym.spaces import numpy as np import collections # Taken from OpenAI baseline wrappers # https://github.com/openai/baselines/blob/master/baselines/common/atari_wrappers.py class FireResetEnv(gym.Wrapper): def __init__(self, env=None): """Take action on reset for environments t...
33.351145
117
0.618448
6b0a279b251a0817d7b2a85115ef76645a61a419
1,725
py
Python
vimfiles/bundle/vim-python/submodules/pylama/tests/test_linters.py
ciskoinch8/vimrc
5bf77a7e7bc70fac5173ab2e9ea05d7dda3e52b8
[ "MIT" ]
463
2015-01-15T08:17:42.000Z
2022-03-28T15:10:20.000Z
vimfiles/bundle/vim-python/submodules/pylama/tests/test_linters.py
ciskoinch8/vimrc
5bf77a7e7bc70fac5173ab2e9ea05d7dda3e52b8
[ "MIT" ]
52
2015-01-06T02:43:59.000Z
2022-03-14T11:15:21.000Z
vimfiles/bundle/vim-python/submodules/pylama/tests/test_linters.py
ciskoinch8/vimrc
5bf77a7e7bc70fac5173ab2e9ea05d7dda3e52b8
[ "MIT" ]
249
2015-01-07T22:49:49.000Z
2022-03-18T02:32:06.000Z
import sys from pylama.config import parse_options from pylama.core import run from pylama.lint.extensions import LINTERS def test_mccabe(): mccabe = LINTERS.get('mccabe') errors = mccabe.run('dummy.py', '', params={}) assert errors == [] def test_eradicate(): eradicate = LINTERS.get('eradicate') ...
26.538462
68
0.622029
c0ce1f38d1426e598f64fbab90ce8439e2fa5000
859
py
Python
users/admin.py
sudomann/django-users
9baefcc6e5b401cb781209c97ca54175360aab6b
[ "Apache-2.0" ]
null
null
null
users/admin.py
sudomann/django-users
9baefcc6e5b401cb781209c97ca54175360aab6b
[ "Apache-2.0" ]
null
null
null
users/admin.py
sudomann/django-users
9baefcc6e5b401cb781209c97ca54175360aab6b
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin from django.contrib.auth.admin import UserAdmin from .forms import CustomUserCreationForm, CustomUserChangeForm from .models import CustomUser class CustomUserAdmin(UserAdmin): add_form = CustomUserCreationForm form = CustomUserChangeForm model = CustomUser list_displ...
30.678571
83
0.630966
930430c18b9065bc199a58caa2b3f31fdd104d8a
364
py
Python
inbm-vision/vision-agent/vision/tests/unit/test_query.py
ahameedx/intel-inb-manageability
aca445fa4cef0b608e6e88e74476547e10c06073
[ "Apache-2.0" ]
5
2021-12-13T21:19:31.000Z
2022-01-18T18:29:43.000Z
inbm-vision/vision-agent/vision/tests/unit/test_query.py
ahameedx/intel-inb-manageability
aca445fa4cef0b608e6e88e74476547e10c06073
[ "Apache-2.0" ]
45
2021-12-30T17:21:09.000Z
2022-03-29T22:47:32.000Z
inbm-vision/vision-agent/vision/tests/unit/test_query.py
ahameedx/intel-inb-manageability
aca445fa4cef0b608e6e88e74476547e10c06073
[ "Apache-2.0" ]
4
2022-01-26T17:42:54.000Z
2022-03-30T04:48:04.000Z
from unittest import TestCase from mock import Mock from vision.data_handler.query import _create_query_response from vision.constant import HEARTBEAT_ACTIVE_STATE, VisionException class TestQuery(TestCase): def test_raises_unsupported_query_type(self): with self.assertRaises(VisionException): ...
30.333333
67
0.799451
dde5b0e856084e380e4b2a1f742e53a00ff257ef
7,664
py
Python
gemfire/Region.py
fhalloumi/py-gemfire-rest
bf085174ca94412130c1c672da8b1964f28ffe7f
[ "Apache-2.0" ]
null
null
null
gemfire/Region.py
fhalloumi/py-gemfire-rest
bf085174ca94412130c1c672da8b1964f28ffe7f
[ "Apache-2.0" ]
null
null
null
gemfire/Region.py
fhalloumi/py-gemfire-rest
bf085174ca94412130c1c672da8b1964f28ffe7f
[ "Apache-2.0" ]
null
null
null
''' Copyright (c) 2014 Pivotal Software, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or ...
43.05618
117
0.592249
69b1f8c1d41f7211b492417ba08f10a5aa9226ba
7,012
py
Python
sdk/identity/azure-identity/tests/test_cli_credential_async.py
JianpingChen/azure-sdk-for-python
3072fc8c0366287fbaea1b02493a50259c3248a2
[ "MIT" ]
3
2020-06-23T02:25:27.000Z
2021-09-07T18:48:11.000Z
sdk/identity/azure-identity/tests/test_cli_credential_async.py
JianpingChen/azure-sdk-for-python
3072fc8c0366287fbaea1b02493a50259c3248a2
[ "MIT" ]
510
2019-07-17T16:11:19.000Z
2021-08-02T08:38:32.000Z
sdk/identity/azure-identity/tests/test_cli_credential_async.py
JianpingChen/azure-sdk-for-python
3072fc8c0366287fbaea1b02493a50259c3248a2
[ "MIT" ]
5
2019-09-04T12:51:37.000Z
2020-09-16T07:28:40.000Z
# ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ import asyncio from datetime import datetime import json import sys from unittest import mock from azure.identity import CredentialUnavailableError from azure.identity....
38.108696
116
0.721477
df5e0cc5ba82b02093877cd225b06644ef1f258e
1,566
py
Python
config.py
tianmaxingkonggrant/tianmaflaskblog
aa7e0bcdec4207455456858783f89acec8e3c34e
[ "MIT" ]
1
2016-07-10T02:36:58.000Z
2016-07-10T02:36:58.000Z
config.py
tianmaxingkonggrant/tianmaflaskblog
aa7e0bcdec4207455456858783f89acec8e3c34e
[ "MIT" ]
10
2020-03-24T15:35:38.000Z
2022-03-11T23:16:34.000Z
config.py
tianmaxingkonggrant/tianmaflaskblog
aa7e0bcdec4207455456858783f89acec8e3c34e
[ "MIT" ]
null
null
null
# coding=utf-8 import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config(object): SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard guess' SQLALCHEMY_COMMIT_ON_TEARDOWN = True MAIL_SERVER = 'smtp.qq.com' MAIL_PORT = '587' MAIL_USE_TLS = True MAIL_USERNAME = os.environ.get('MAIL_USERNAME') MA...
26.542373
67
0.743934
b6c5d79cf98231a695907c67bdf20ec201545683
11,848
py
Python
code/miscc/utils.py
smallflyingpig/AttnGAN
7fd2f970b643fba69a8b3a650c7fde0aa564e41d
[ "MIT" ]
null
null
null
code/miscc/utils.py
smallflyingpig/AttnGAN
7fd2f970b643fba69a8b3a650c7fde0aa564e41d
[ "MIT" ]
null
null
null
code/miscc/utils.py
smallflyingpig/AttnGAN
7fd2f970b643fba69a8b3a650c7fde0aa564e41d
[ "MIT" ]
null
null
null
import os import sys import errno import numpy as np from torch.nn import init import torch import torch.nn as nn from PIL import Image, ImageDraw, ImageFont from copy import deepcopy import skimage.transform import logging from miscc.config import cfg # For visualization ###########################################...
35.57958
100
0.531989
4597698d7b8358827cff51eb7e6637e986fcdcda
158
py
Python
aiocloudflare/api/zones/logs/control/retention/flag/flag.py
Stewart86/aioCloudflare
341c0941f8f888a8b7e696e64550bce5da4949e6
[ "MIT" ]
2
2021-09-14T13:20:55.000Z
2022-02-24T14:18:24.000Z
aiocloudflare/api/zones/logs/control/retention/flag/flag.py
Stewart86/aioCloudflare
341c0941f8f888a8b7e696e64550bce5da4949e6
[ "MIT" ]
46
2021-09-08T08:39:45.000Z
2022-03-29T12:31:05.000Z
aiocloudflare/api/zones/logs/control/retention/flag/flag.py
Stewart86/aioCloudflare
341c0941f8f888a8b7e696e64550bce5da4949e6
[ "MIT" ]
1
2021-12-30T23:02:23.000Z
2021-12-30T23:02:23.000Z
from aiocloudflare.commons.auth import Auth class Flag(Auth): _endpoint1 = "zones" _endpoint2 = "logs/control/retention/flag" _endpoint3 = None
19.75
46
0.721519
84c43bc5c3deb043d27b8303ad09eedadc36545e
37,478
py
Python
prysm/interferogram.py
muepf1/prysm_mpf
be4c114de22193b36dbf87375a3ebf1300df21e6
[ "MIT" ]
null
null
null
prysm/interferogram.py
muepf1/prysm_mpf
be4c114de22193b36dbf87375a3ebf1300df21e6
[ "MIT" ]
1
2019-05-24T13:02:12.000Z
2019-05-24T13:02:12.000Z
prysm/interferogram.py
muepf1/prysm_mpf
be4c114de22193b36dbf87375a3ebf1300df21e6
[ "MIT" ]
null
null
null
"""tools to analyze interferometric data.""" import warnings import inspect from scipy import signal, optimize from .conf import config from .mathops import engine as e from ._phase import OpticalPhase from .zernike import defocus, zernikefit, FringeZernike from .io import read_zygo_dat, read_zygo_datx, write_zygo_as...
30.947977
116
0.555846
d394948f974d68aae157870bdf928c5a77a5ab8a
7,968
py
Python
lib/GWAS/fixAllele.py
shengqh/ngsperl
f81d5bf30171950583bb1ab656f51eabc1e9caf6
[ "Apache-2.0" ]
6
2016-03-25T17:05:39.000Z
2019-05-13T07:03:55.000Z
lib/GWAS/fixAllele.py
shengqh/ngsperl
f81d5bf30171950583bb1ab656f51eabc1e9caf6
[ "Apache-2.0" ]
null
null
null
lib/GWAS/fixAllele.py
shengqh/ngsperl
f81d5bf30171950583bb1ab656f51eabc1e9caf6
[ "Apache-2.0" ]
9
2015-04-02T16:41:57.000Z
2022-02-22T07:25:33.000Z
import argparse import sys import logging import os from Bio import SeqIO import subprocess DEBUG=False NotDEBUG=not DEBUG parser = argparse.ArgumentParser(description="Fix allele in plink bim file", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argu...
37.233645
205
0.593499
734a9f0be394b7edfc2f67cb8b81592b7cfc5c98
116,859
py
Python
experiment code/GPU Experiments Code/random_raw2.py
qore-dl/qore-dl-code
dc60df8fd072df5c641005992630f43892b7f78e
[ "Apache-2.0" ]
null
null
null
experiment code/GPU Experiments Code/random_raw2.py
qore-dl/qore-dl-code
dc60df8fd072df5c641005992630f43892b7f78e
[ "Apache-2.0" ]
null
null
null
experiment code/GPU Experiments Code/random_raw2.py
qore-dl/qore-dl-code
dc60df8fd072df5c641005992630f43892b7f78e
[ "Apache-2.0" ]
null
null
null
# 1584927559 import task_submit # import task_submit_optimus import task_submit_raw from task_submit_raw import VGGTask,RESTask,RETask,DENTask,XCETask import random import kubernetes import influxdb import kubernetes import signal from TimeoutException import TimeoutError,Myhandler import yaml import requests from mult...
51.052425
876
0.496222
ed94d15c0e2da4812954f621b616b9b62b301659
104,897
py
Python
Lib/doctest.py
ErikBjare/cpython
b68431fadb3150134ac6ccbf501cdfeaf4c75678
[ "0BSD" ]
2
2022-03-27T14:52:48.000Z
2022-03-27T17:35:22.000Z
Lib/doctest.py
dalakatt/cpython
2f49b97cc5426087b46515254b9a97a22ee8c807
[ "0BSD" ]
8
2022-01-07T11:31:11.000Z
2022-03-04T00:07:16.000Z
Lib/doctest.py
dalakatt/cpython
2f49b97cc5426087b46515254b9a97a22ee8c807
[ "0BSD" ]
1
2022-03-27T18:34:54.000Z
2022-03-27T18:34:54.000Z
# Module doctest. # Released to the public domain 16-Jan-2001, by Tim Peters (tim@python.org). # Major enhancements and refactoring by: # Jim Fulton # Edward Loper # Provided as-is; use at your own risk; no warranty; no promises; enjoy! r"""Module doctest -- a framework for running examples in docstrings. In...
37.36979
79
0.582305
27cbac418b5edda5e9b4169265721056bf34c906
35,545
py
Python
src/pyrobot/core.py
stuart-fb/pyrobot
2f06f337f84e2c0b172dcf5ee0cd8c7de73a50e1
[ "MIT" ]
6
2020-03-08T00:56:25.000Z
2021-05-21T03:32:37.000Z
src/pyrobot/core.py
stuart-fb/pyrobot
2f06f337f84e2c0b172dcf5ee0cd8c7de73a50e1
[ "MIT" ]
null
null
null
src/pyrobot/core.py
stuart-fb/pyrobot
2f06f337f84e2c0b172dcf5ee0cd8c7de73a50e1
[ "MIT" ]
2
2022-02-15T21:28:53.000Z
2022-03-21T21:45:55.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from __future__ import print_function import copy import importlib import os import sys import threading import time from abc import ABCMeta, ...
36.64433
79
0.567534
930f3518d12396d750d126c817a9053b9ae92e73
18,445
py
Python
src/collector.py
deaddawg/xb7_collector
3d59eb8d0a9f311cf919a98650ca03441bb72cf5
[ "Apache-2.0" ]
null
null
null
src/collector.py
deaddawg/xb7_collector
3d59eb8d0a9f311cf919a98650ca03441bb72cf5
[ "Apache-2.0" ]
null
null
null
src/collector.py
deaddawg/xb7_collector
3d59eb8d0a9f311cf919a98650ca03441bb72cf5
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 # TODO: think about what to do about string results in future - enum? ignore? import bs4 import click import itertools import logging import requests import time from prometheus_client.core import CounterMetricFamily, GaugeMetricFamily, REGISTRY from prometheus_client import start_http_server DEFA...
36.816367
154
0.601193
0c69aa193f71c8283dfbb3af655b131ab5188bf8
1,592
py
Python
xlsxwriter/test/comparison/test_chart_blank02.py
totdiao/XlsxWriter
3d65858d8933bddb8262d500bcc2005f28fde645
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
xlsxwriter/test/comparison/test_chart_blank02.py
totdiao/XlsxWriter
3d65858d8933bddb8262d500bcc2005f28fde645
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
xlsxwriter/test/comparison/test_chart_blank02.py
totdiao/XlsxWriter
3d65858d8933bddb8262d500bcc2005f28fde645
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2016, John McNamara, jmcnamara@cpan.org # from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
25.677419
79
0.565955
2b4c03c4c9caf77fe74f915f63b8d9038f89246e
22,419
py
Python
tests/test_common.py
LucaZampieri/pyvista
ae2a7a0559961839c5aa2979228fcdef1f4b188e
[ "MIT" ]
null
null
null
tests/test_common.py
LucaZampieri/pyvista
ae2a7a0559961839c5aa2979228fcdef1f4b188e
[ "MIT" ]
null
null
null
tests/test_common.py
LucaZampieri/pyvista
ae2a7a0559961839c5aa2979228fcdef1f4b188e
[ "MIT" ]
null
null
null
from hypothesis import assume, given from hypothesis.extra.numpy import arrays, array_shapes from hypothesis.strategies import composite, integers, floats, one_of import numpy as np import pytest import vtk from vtk.util.numpy_support import vtk_to_numpy import pyvista from pyvista import examples @pytest.fixture() ...
29.498684
92
0.684821
fe20488bf3aa3b31b79ca157db5838f31071acba
3,059
py
Python
gamestonk_terminal/common/prediction_techniques/mc_view.py
b17z/GamestonkTerminal
135eedb8d995fd10baff6283de525e8a4d124cae
[ "MIT" ]
null
null
null
gamestonk_terminal/common/prediction_techniques/mc_view.py
b17z/GamestonkTerminal
135eedb8d995fd10baff6283de525e8a4d124cae
[ "MIT" ]
null
null
null
gamestonk_terminal/common/prediction_techniques/mc_view.py
b17z/GamestonkTerminal
135eedb8d995fd10baff6283de525e8a4d124cae
[ "MIT" ]
null
null
null
"""Monte Carlo View""" __docformat__ = "numpy" import logging import os from typing import List, Optional, Union import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns from gamestonk_terminal.config_terminal import theme from gamestonk_terminal.common.prediction_techniques impor...
31.864583
109
0.691402
4d233924f0addd087d6a5aa9117c279f3b355ed3
2,496
py
Python
myenv/lib/python3.5/site-packages/pre_commit/staged_files_only.py
rupeshparab/techscan
ce2558602ddad31873d7129f25b1cc61895b9939
[ "MIT" ]
1
2019-11-01T11:45:22.000Z
2019-11-01T11:45:22.000Z
myenv/lib/python3.5/site-packages/pre_commit/staged_files_only.py
rupeshparab/techscan
ce2558602ddad31873d7129f25b1cc61895b9939
[ "MIT" ]
3
2020-02-11T23:03:45.000Z
2021-06-10T18:05:11.000Z
myenv/lib/python3.5/site-packages/pre_commit/staged_files_only.py
rupeshparab/techscan
ce2558602ddad31873d7129f25b1cc61895b9939
[ "MIT" ]
1
2019-11-01T11:38:54.000Z
2019-11-01T11:38:54.000Z
from __future__ import unicode_literals import contextlib import io import logging import time from pre_commit.util import CalledProcessError logger = logging.getLogger('pre_commit') def _git_apply(cmd_runner, patch): args = ('apply', '--whitespace=nowarn', patch) try: cmd_runner.run(('git',) + ar...
33.28
76
0.590946
443e684c185213ab0b74b6702893063fb2da1531
13,685
py
Python
openstack_dashboard/test/unit/api/test_base.py
swapnil2725/tcprobranding-safedx
ff4cd1ff1ea7c34ddb923530e215f6abcc3bd4a6
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/test/unit/api/test_base.py
swapnil2725/tcprobranding-safedx
ff4cd1ff1ea7c34ddb923530e215f6abcc3bd4a6
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/test/unit/api/test_base.py
swapnil2725/tcprobranding-safedx
ff4cd1ff1ea7c34ddb923530e215f6abcc3bd4a6
[ "Apache-2.0" ]
null
null
null
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
37.596154
79
0.643844
93724ee6a4a420476bfffeb971f0f6486e160deb
4,539
py
Python
flink-python/pyflink/table/tests/test_table_config.py
sbairos/flink
0799b5c20a127110e47439668cf8f8db2e4ecbf3
[ "Apache-2.0" ]
16
2019-09-24T02:28:08.000Z
2021-06-22T09:16:05.000Z
flink-python/pyflink/table/tests/test_table_config.py
sbairos/flink
0799b5c20a127110e47439668cf8f8db2e4ecbf3
[ "Apache-2.0" ]
37
2020-06-25T08:23:56.000Z
2020-12-28T02:18:37.000Z
flink-python/pyflink/table/tests/test_table_config.py
sbairos/flink
0799b5c20a127110e47439668cf8f8db2e4ecbf3
[ "Apache-2.0" ]
7
2020-04-13T02:24:44.000Z
2021-08-06T10:06:26.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...
42.027778
96
0.705001
576552672298a38d9a6c860902832802e1c304fa
20
py
Python
__init__.py
aziis98/pyke
cde87f143497002a7f7f5ba87cfba467cd228699
[ "MIT" ]
2
2021-11-19T10:32:11.000Z
2021-11-24T08:59:48.000Z
__init__.py
aziis98/pyke
cde87f143497002a7f7f5ba87cfba467cd228699
[ "MIT" ]
1
2021-12-27T18:29:16.000Z
2021-12-27T18:29:16.000Z
__init__.py
aziis98/pyke
cde87f143497002a7f7f5ba87cfba467cd228699
[ "MIT" ]
null
null
null
from pyke import *
6.666667
18
0.7
7feaa21279e7daba397933601623d44d2a6943e7
3,745
py
Python
testproject/django_file_form_example/forms.py
nklsw/django-file-form
c941da77505e259cbfc59b89f3a107aad41033c6
[ "Apache-2.0" ]
null
null
null
testproject/django_file_form_example/forms.py
nklsw/django-file-form
c941da77505e259cbfc59b89f3a107aad41033c6
[ "Apache-2.0" ]
null
null
null
testproject/django_file_form_example/forms.py
nklsw/django-file-form
c941da77505e259cbfc59b89f3a107aad41033c6
[ "Apache-2.0" ]
null
null
null
import os from django.core.exceptions import ValidationError from django.forms import formset_factory, BaseFormSet, Form, CharField, ModelForm from django_file_form.forms import ( UploadedFileField, MultipleUploadedFileField, FileFormMixin, ) from .models import Example, Example2, ExampleFile class Bas...
26.188811
82
0.641121
dc10967f1586d7323de3f7820aafeafe60e00b21
3,422
py
Python
test/test_p008_largest_product_in_a_series.py
FranzDiebold/project-euler-solutions
37633803b194eaf65d4bb242142dea835f5efd0d
[ "MIT" ]
1
2019-09-27T07:05:29.000Z
2019-09-27T07:05:29.000Z
test/test_p008_largest_product_in_a_series.py
FranzDiebold/project-euler-solutions
37633803b194eaf65d4bb242142dea835f5efd0d
[ "MIT" ]
null
null
null
test/test_p008_largest_product_in_a_series.py
FranzDiebold/project-euler-solutions
37633803b194eaf65d4bb242142dea835f5efd0d
[ "MIT" ]
null
null
null
""" Problem 8: Largest product in a series https://projecteuler.net/problem=8 The four adjacent digits in the 1000-digit number that have the greatest product are 9 × 9 × 8 × 9 = 5832. 73167176531330624919225119674426574742355349194934 96983520312774506326239578318016984801869478851843 8586156078911294949545950173795...
39.333333
90
0.834307
961115462afb489898f2eb113dda0b1bef565e08
1,413
py
Python
httprider/tests/exporters/test_openapi_v3.py
iSWORD/http-rider
5d9e5cc8c5166ab58f81d30d21b3ce2497bf09b9
[ "MIT" ]
27
2019-12-20T00:10:28.000Z
2022-03-09T18:04:23.000Z
httprider/tests/exporters/test_openapi_v3.py
iSWORD/http-rider
5d9e5cc8c5166ab58f81d30d21b3ce2497bf09b9
[ "MIT" ]
6
2019-10-13T08:50:21.000Z
2020-06-05T12:23:08.000Z
httprider/tests/exporters/test_openapi_v3.py
iSWORD/http-rider
5d9e5cc8c5166ab58f81d30d21b3ce2497bf09b9
[ "MIT" ]
7
2019-08-10T01:38:31.000Z
2021-08-23T05:28:46.000Z
import yaml from httprider.exporters.exporter_openapi_v3 import OpenApiv3Exporter from httprider.tests.presenters.object_builder import * def test_export_single_open_api_v3_document(): # given api_call = mock_api_call() api_calls = [api_call] mock_app_settings = mock_core_settings() # when e...
32.860465
78
0.658174
0293d6640e368298f45a170f93bdd36a3d6948d2
2,435
py
Python
eeg_modelling/eeg_viewer/lookup_test.py
shaun95/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
1
2022-03-19T04:26:12.000Z
2022-03-19T04:26:12.000Z
eeg_modelling/eeg_viewer/lookup_test.py
shaun95/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
null
null
null
eeg_modelling/eeg_viewer/lookup_test.py
shaun95/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
1
2022-03-30T07:20:29.000Z
2022-03-30T07:20:29.000Z
# coding=utf-8 # Copyright 2022 The Google Research 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 applicab...
34.785714
75
0.735524
773a04584224f57474f56361124de7eceeca614a
2,765
py
Python
examples/federatedml-1.x-examples/hetero_nn/test_build_from_keras.py
fqiang/FATE
36a5a41848f78df7be1e520ae804e64bc67d72fb
[ "Apache-2.0" ]
3,787
2019-08-30T04:55:10.000Z
2022-03-31T23:30:07.000Z
examples/federatedml-1.x-examples/hetero_nn/test_build_from_keras.py
ErikSun2020/FATE
bdda535c7d8a974fc2c43102837964b7da199730
[ "Apache-2.0" ]
1,439
2019-08-29T16:35:52.000Z
2022-03-31T11:55:31.000Z
examples/federatedml-1.x-examples/hetero_nn/test_build_from_keras.py
ErikSun2020/FATE
bdda535c7d8a974fc2c43102837964b7da199730
[ "Apache-2.0" ]
1,179
2019-08-29T16:18:32.000Z
2022-03-31T12:55:38.000Z
# # 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/licenses/LICENSE-2.0 # # Unless required by appli...
40.072464
127
0.720796
753d2e2a54c08eb56ac3c3ed16697cfffc634a8b
534
py
Python
tests/plugins/test_foxtr.py
hymer-up/streamlink
f09bf6e04cddc78eceb9ded655f716ef3ee4b84f
[ "BSD-2-Clause" ]
5
2017-03-21T19:43:17.000Z
2018-10-03T14:04:29.000Z
tests/plugins/test_foxtr.py
hymer-up/streamlink
f09bf6e04cddc78eceb9ded655f716ef3ee4b84f
[ "BSD-2-Clause" ]
7
2016-10-13T23:29:31.000Z
2018-06-28T14:04:32.000Z
tests/plugins/test_foxtr.py
bumplzz69/streamlink
34abc43875d7663ebafa241573dece272e93d88b
[ "BSD-2-Clause" ]
2
2016-11-24T18:37:33.000Z
2017-03-21T19:43:49.000Z
import unittest from streamlink.plugins.foxtr import FoxTR class TestPluginFoxTR(unittest.TestCase): def test_can_handle_url(self): should_match = [ 'http://www.fox.com.tr/canli-yayin', ] for url in should_match: self.assertTrue(FoxTR.can_handle_url(url)) def ...
26.7
55
0.640449
06f80eb38158442968dd7b35387e9629de825fe3
7,963
py
Python
CSV-files/2_csv_reader.py
AlPus108/Python_lessons
0e96117d9a8b76fd651e137fc126ddedaa6accd9
[ "MIT" ]
null
null
null
CSV-files/2_csv_reader.py
AlPus108/Python_lessons
0e96117d9a8b76fd651e137fc126ddedaa6accd9
[ "MIT" ]
null
null
null
CSV-files/2_csv_reader.py
AlPus108/Python_lessons
0e96117d9a8b76fd651e137fc126ddedaa6accd9
[ "MIT" ]
null
null
null
import csv # Основные ф-и и классы этого пакета: # ф-я csv.reader # ф-я csv.writer # Производят чтение и записть из листа в лист # класс csv.DictWriter # класс csv.DictReader # Более мощные по функционалу. Это чтение и запись в объект типа Словарь/Dict # -------------------------- Открытие и чтение ------------------...
58.985185
285
0.647118
3a4cf1cfca6a55014913246e1f3ec87a8c859941
483
py
Python
Pygame/Bee Invaders/projectile.py
kasztp/python-lessons
2a159ad5e1186c749b96c5d0ede45b7142c6bbb5
[ "MIT" ]
35
2015-05-18T08:08:41.000Z
2022-03-07T09:38:02.000Z
Pygame/Bee Invaders/projectile.py
kasztp/python-lessons
2a159ad5e1186c749b96c5d0ede45b7142c6bbb5
[ "MIT" ]
1
2021-09-29T02:08:26.000Z
2021-09-29T02:08:26.000Z
Pygame/Bee Invaders/projectile.py
kasztp/python-lessons
2a159ad5e1186c749b96c5d0ede45b7142c6bbb5
[ "MIT" ]
40
2015-04-28T00:38:54.000Z
2022-02-13T14:18:34.000Z
import pygame from util import loadImage class Projectile(pygame.sprite.Sprite): def __init__(self, x, y): pygame.sprite.Sprite.__init__(self) self.image = loadImage('projectile.png') self.rect = self.image.get_rect() self.x = x self.y = y def update(self): img...
25.421053
48
0.587992
f60d307172a2df914baaaadfdd7e2e20392aa969
3,730
py
Python
autorelease/git_repo_checks.py
dwhswenson/autorelease
a507dc80965d261c05dee297dfea03fe090292ac
[ "MIT" ]
3
2019-12-01T21:36:55.000Z
2020-02-12T18:19:36.000Z
autorelease/git_repo_checks.py
dwhswenson/autorelease
a507dc80965d261c05dee297dfea03fe090292ac
[ "MIT" ]
14
2017-10-27T15:50:50.000Z
2021-02-24T10:53:12.000Z
autorelease/git_repo_checks.py
dwhswenson/autorelease
a507dc80965d261c05dee297dfea03fe090292ac
[ "MIT" ]
null
null
null
import git # GitPython import packaging.version as vers def skipped_version(old_version, new_version, allow_patch_skip=False): old_major, old_minor, old_patch = old_version new_major, new_minor, new_patch = new_version bad_update = False if new_major == old_major: if new_minor == old_minor: ...
33.00885
76
0.573458
22efe10b23e2d797c51df9bb61a5176ce57e3bc5
5,187
py
Python
lib/pycoin/tests/key_test.py
AYCHDO/Dominus
d7065816febafb6cf0fb1142ff7dc7e454c835ad
[ "MIT" ]
68
2015-08-30T13:23:12.000Z
2022-02-26T06:59:15.000Z
lib/pycoin/tests/key_test.py
AYCHDO/Dominus
d7065816febafb6cf0fb1142ff7dc7e454c835ad
[ "MIT" ]
44
2016-02-14T02:08:00.000Z
2020-11-11T09:03:55.000Z
lib/pycoin/tests/key_test.py
AYCHDO/Dominus
d7065816febafb6cf0fb1142ff7dc7e454c835ad
[ "MIT" ]
56
2015-08-26T12:49:20.000Z
2022-02-17T19:06:36.000Z
#!/usr/bin/env python import unittest from pycoin.key import Key from pycoin.serialize import h2b class KeyTest(unittest.TestCase): def test_translation(self): def do_test(exp_hex, wif, c_wif, public_pair_sec, c_public_pair_sec, address_b58, c_address_b58): secret_exponent = int(exp_hex, 16...
49.875
105
0.663968
20887a1bcf88557861e39787f80bd5fbd1d8e137
5,623
py
Python
scripts/repo_manager.py
StanfordAHA/CGRAFlow
65467419f33613cb7c24381cff725ea432fd9e2e
[ "BSD-3-Clause" ]
12
2017-04-13T17:55:21.000Z
2021-01-16T01:34:09.000Z
scripts/repo_manager.py
StanfordAHA/CGRAFlow
65467419f33613cb7c24381cff725ea432fd9e2e
[ "BSD-3-Clause" ]
67
2017-04-04T18:15:58.000Z
2019-06-06T19:20:08.000Z
scripts/repo_manager.py
StanfordAHA/CGRAFlow
65467419f33613cb7c24381cff725ea432fd9e2e
[ "BSD-3-Clause" ]
2
2017-05-08T21:44:24.000Z
2021-03-28T07:58:33.000Z
import argparse import os import delegator import glob import shutil tab = " " def run(command, *args, cwd=".", **kwargs): print(tab + "./" + cwd) print(tab + "+ " + command) result = delegator.run(command, *args, cwd=cwd, **kwargs) print((tab * 2) + ("\n" + (tab * 2)).join(result.out.splitlines()))...
34.709877
143
0.647519
02cc0764cc174c843b047d7dff074c6811e65f55
1,193
py
Python
setup.py
JustRedTTG/REDdyOS-core
e976017cdab3b1bfd99d8c7d3b6354ab6a343608
[ "CC0-1.0" ]
1
2021-07-12T13:40:28.000Z
2021-07-12T13:40:28.000Z
setup.py
JustRedTTG/REDdyOS-core
e976017cdab3b1bfd99d8c7d3b6354ab6a343608
[ "CC0-1.0" ]
1
2021-07-11T16:42:19.000Z
2021-07-11T16:42:19.000Z
setup.py
JustRedTTG/REDdyOS-core
e976017cdab3b1bfd99d8c7d3b6354ab6a343608
[ "CC0-1.0" ]
null
null
null
from setuptools import setup, find_packages import codecs import os VERSION = '1.0.332' short = 'Core runner for REDdyOS scripts.' long = 'Downloads or Updates an Internal REDdyOS with and forces it to run your REDdyOS compatible script.' # Setting up setup( name="reddyoscore", version=VERSION, author="Re...
34.085714
140
0.644593
23544694e913207e0dd45d6c1c4e0339fc6a7878
39,091
py
Python
packages/syft/src/syft/core/node/common/node_service/infra_manager/infra_manager_messages.py
vishalbelsare/PySyft
fb04404fcfbef82fad1fb47407b35a24e9afb599
[ "Apache-1.1" ]
8,428
2017-08-10T09:17:49.000Z
2022-03-31T08:20:14.000Z
packages/syft/src/syft/core/node/common/node_service/infra_manager/infra_manager_messages.py
vishalbelsare/PySyft
fb04404fcfbef82fad1fb47407b35a24e9afb599
[ "Apache-1.1" ]
4,779
2017-08-09T23:19:00.000Z
2022-03-29T11:49:36.000Z
packages/syft/src/syft/core/node/common/node_service/infra_manager/infra_manager_messages.py
vishalbelsare/PySyft
fb04404fcfbef82fad1fb47407b35a24e9afb599
[ "Apache-1.1" ]
2,307
2017-08-10T08:52:12.000Z
2022-03-30T05:36:07.000Z
# # stdlib # import json # from typing import Dict # from typing import Optional # # # third party # from google.protobuf.reflection import GeneratedProtocolMessageType # from typing_extensions import final # # # syft absolute # from syft import serialize # from syft.core.common.message import ImmediateSyftMessageWithR...
42.862939
94
0.647617
63955838bbb77c25aa871acdd7306aec34c0fae3
10,537
py
Python
muranodashboard/environments/topology.py
NeCTAR-RC/murano-dashboard
ad87d04e30d11ec04ad5e9caef900b280ab25945
[ "Apache-2.0" ]
null
null
null
muranodashboard/environments/topology.py
NeCTAR-RC/murano-dashboard
ad87d04e30d11ec04ad5e9caef900b280ab25945
[ "Apache-2.0" ]
null
null
null
muranodashboard/environments/topology.py
NeCTAR-RC/murano-dashboard
ad87d04e30d11ec04ad5e9caef900b280ab25945
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2014 Mirantis, 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...
33.772436
78
0.588213
9f43ca6c77e220fe57626f5f00f4a76b6ac838ef
1,738
py
Python
src/scoring.py
countofkrakow/Sequence-Alignment
30ac6e7ae359ca20a6318b6e99004eeb4b91a8f2
[ "MIT" ]
null
null
null
src/scoring.py
countofkrakow/Sequence-Alignment
30ac6e7ae359ca20a6318b6e99004eeb4b91a8f2
[ "MIT" ]
null
null
null
src/scoring.py
countofkrakow/Sequence-Alignment
30ac6e7ae359ca20a6318b6e99004eeb4b91a8f2
[ "MIT" ]
null
null
null
base_to_index = { "A": 0, "R": 1, "N": 2, "D": 3, "C": 4, "Q": 5, "E": 6, "G": 7, "H": 8, "I": 9, "L": 10, "K": 11, "M": 12, "F": 13, "P": 14, "S": 15, "T": 16, "W": 17, "Y": 18, "V": 19 } NUM_BASE_PAIRS = 20 class ScoreFunction: def ...
30.491228
139
0.616801
e1644b8a4a8b510df15f736f575a0e10eb96d30e
2,241
py
Python
Control.py
jackkolb/ThreeCups
5209961edbaef16f0265440e1032d0a6b57c2a7b
[ "Apache-2.0" ]
1
2018-08-24T01:32:22.000Z
2018-08-24T01:32:22.000Z
Control.py
jackkolb/ThreeCups
5209961edbaef16f0265440e1032d0a6b57c2a7b
[ "Apache-2.0" ]
null
null
null
Control.py
jackkolb/ThreeCups
5209961edbaef16f0265440e1032d0a6b57c2a7b
[ "Apache-2.0" ]
null
null
null
from Arduino import Arduino from Tracking import tracking from time import sleep def alloff(): board.digitalWrite(LEDpin0, "LOW") board.digitalWrite(LEDpin1, "LOW") board.digitalWrite(LEDpin2, "LOW") return def allon(): board.digitalWrite(LEDpin0, "HIGH") board.digitalWrite(LEDpin1...
24.358696
52
0.541276