hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 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 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ce6a4c03daae6bc47072cddd9cbe2cac05f8e41f | 1,535 | py | Python | lte/gateway/python/magma/pipelined/qos/tc_ops.py | rdefosse/magma | d12ac827d0cdb39f499ce202e9e1196cc50b68d7 | [
"BSD-3-Clause"
] | 1 | 2021-11-03T21:37:26.000Z | 2021-11-03T21:37:26.000Z | lte/gateway/python/magma/pipelined/qos/tc_ops.py | rdefosse/magma | d12ac827d0cdb39f499ce202e9e1196cc50b68d7 | [
"BSD-3-Clause"
] | 143 | 2020-09-08T06:24:23.000Z | 2022-03-29T05:56:53.000Z | lte/gateway/python/magma/pipelined/qos/tc_ops.py | hixio-mh/magma | 2602de5cecd590c1f30a1c798feb2e78b58f5de7 | [
"BSD-3-Clause"
] | 2 | 2021-05-27T18:15:16.000Z | 2021-05-27T18:41:39.000Z | """
Copyright 2021 The Magma Authors.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES O... | 26.016949 | 84 | 0.63127 |
1f14a844461fbfff4f907ba4992117b196bea35c | 3,771 | py | Python | tests/test_threading.py | lotapp/loguru | 19ec234db32a05c46bfe837d71eabaa28bac5577 | [
"MIT"
] | null | null | null | tests/test_threading.py | lotapp/loguru | 19ec234db32a05c46bfe837d71eabaa28bac5577 | [
"MIT"
] | null | null | null | tests/test_threading.py | lotapp/loguru | 19ec234db32a05c46bfe837d71eabaa28bac5577 | [
"MIT"
] | 1 | 2019-04-03T03:06:29.000Z | 2019-04-03T03:06:29.000Z | from threading import Thread, Barrier
import itertools
from loguru import logger
import time
class NonSafeSink:
def __init__(self, sleep_time):
self.sleep_time = sleep_time
self.written = ""
self.stopped = False
def write(self, message):
if self.stopped:
raise Runt... | 22.446429 | 73 | 0.612304 |
d6e53f5295e615030a860afc4b2e9b24fa416d4a | 8,073 | py | Python | SC101_Projects/SC101_Assignment2/breakoutgraphics.py | TobyCCC/MystanCodeProJects | fac747e681875777b5d40bac3bcfebe204ca44f8 | [
"MIT"
] | null | null | null | SC101_Projects/SC101_Assignment2/breakoutgraphics.py | TobyCCC/MystanCodeProJects | fac747e681875777b5d40bac3bcfebe204ca44f8 | [
"MIT"
] | null | null | null | SC101_Projects/SC101_Assignment2/breakoutgraphics.py | TobyCCC/MystanCodeProJects | fac747e681875777b5d40bac3bcfebe204ca44f8 | [
"MIT"
] | null | null | null | """
stanCode Breakout Project
Adapted from Eric Roberts's Breakout by
Sonja Johnson-Yu, Kylie Jue, Nick Bowman,
and Jerry Liao
YOUR DESCRIPTION HERE
"""
from campy.graphics.gwindow import GWindow
from campy.graphics.gobjects import GOval, GRect, GLabel
from campy.gui.events.mouse import onmouseclicked, onmousemoved
i... | 39.18932 | 142 | 0.616871 |
ccd0b7dc72bf45066e97e2a5d6a06d5ba7a0e501 | 1,204 | py | Python | 20201005/homework.py | ObukhovVladislav/python-basics | 268af015fdd3392fd77783b38ef74be2ca6db7da | [
"Apache-2.0"
] | null | null | null | 20201005/homework.py | ObukhovVladislav/python-basics | 268af015fdd3392fd77783b38ef74be2ca6db7da | [
"Apache-2.0"
] | null | null | null | 20201005/homework.py | ObukhovVladislav/python-basics | 268af015fdd3392fd77783b38ef74be2ca6db7da | [
"Apache-2.0"
] | null | null | null | class Student:
def __init__(self):
self.name = None
self.surname = None
self.patronymic = None
self.group_number = None
self.student_card = None
self.gradebook = None
class Teacher:
def __init__(self):
self.name = None
self.surname = None
... | 20.40678 | 38 | 0.584718 |
8ee4ba7a3f42df59cf603e31442f01323788919a | 847 | py | Python | imsearch/repository/__init__.py | x0rzkov/imsearch | d39d08ef77c48435c9f333134cafe41a9ca95da9 | [
"Apache-2.0"
] | 64 | 2019-01-16T10:06:37.000Z | 2022-03-24T03:17:48.000Z | imsearch/repository/__init__.py | x0rzkov/imsearch | d39d08ef77c48435c9f333134cafe41a9ca95da9 | [
"Apache-2.0"
] | 8 | 2020-03-08T18:18:56.000Z | 2020-09-09T03:20:21.000Z | imsearch/repository/__init__.py | x0rzkov/imsearch | d39d08ef77c48435c9f333134cafe41a9ca95da9 | [
"Apache-2.0"
] | 13 | 2020-01-30T09:37:57.000Z | 2022-03-09T08:20:45.000Z | from ..exception import InvalidAttributeError
from .mongo import MongoRepository
def get_repository(index_name, repo_type):
repo = MongoRepository(index_name)
return RepositoryWrapper(repo)
class RepositoryWrapper:
def __init__(self, repo):
self.db = repo
def clean(self):
self.db.c... | 23.527778 | 82 | 0.624557 |
cc0f22d969e0e63a7f63d237edc68a7fbcd15000 | 32,453 | gyp | Python | chrome/test/data/nacl/nacl_test_data.gyp | iplo/Chain | 8bc8943d66285d5258fffc41bed7c840516c4422 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 231 | 2015-01-08T09:04:44.000Z | 2021-12-30T03:03:10.000Z | chrome/test/data/nacl/nacl_test_data.gyp | JasonEric/chromium | c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2017-02-14T21:55:58.000Z | 2017-02-14T21:55:58.000Z | chrome/test/data/nacl/nacl_test_data.gyp | JasonEric/chromium | c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 268 | 2015-01-21T05:53:28.000Z | 2022-03-25T22:09:01.000Z | # Copyright (c) 2012 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.
{
'includes': [
'../../../../ppapi/ppapi_nacl_test_common.gypi',
],
'targets': [
{
'target_name': 'shared_test_files',
'type': ... | 33.630052 | 93 | 0.569901 |
b9aa8ae90cf761411e286acb5db9370e4e2d9254 | 2,419 | py | Python | src/selfdroid/api/v1/APIv1Authenticator.py | vitlabuda/selfdroid-web-app | 9eac9ee2c34038de13e179b6afb3d530a086e7b2 | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2022-03-13T14:57:04.000Z | 2022-03-13T14:57:04.000Z | src/selfdroid/api/v1/APIv1Authenticator.py | vitlabuda/selfdroid-web-app | 9eac9ee2c34038de13e179b6afb3d530a086e7b2 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/selfdroid/api/v1/APIv1Authenticator.py | vitlabuda/selfdroid-web-app | 9eac9ee2c34038de13e179b6afb3d530a086e7b2 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # SPDX-License-Identifier: BSD-3-Clause
#
# Copyright (c) 2021 Vít Labuda. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
# 1. Redistributions of source code must retain the above copyright notice... | 50.395833 | 118 | 0.767259 |
8f6706bb381910caf81378ac6ec0346eec78d7e3 | 857 | py | Python | xlsxwriter/test/comparison/test_hyperlink38.py | dthadi3/XlsxWriter | f1801e82240aa9c746ce14948ef95990b83162cf | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2020-07-01T07:24:37.000Z | 2020-07-01T07:24:37.000Z | xlsxwriter/test/comparison/test_hyperlink38.py | dthadi3/XlsxWriter | f1801e82240aa9c746ce14948ef95990b83162cf | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | xlsxwriter/test/comparison/test_hyperlink38.py | dthadi3/XlsxWriter | f1801e82240aa9c746ce14948ef95990b83162cf | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2020, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparison_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompareXLSXFiles(ExcelComparisonTest):
"""... | 24.485714 | 79 | 0.591599 |
0cecab4059e239235cb28f12c2441abd617659bd | 656,316 | py | Python | template_container_mouse/labels/slice_137.py | lkondratova/Brainplot | 3c8a88c1995dedeaa5cbd88ee71499c7cf9c571d | [
"MIT"
] | null | null | null | template_container_mouse/labels/slice_137.py | lkondratova/Brainplot | 3c8a88c1995dedeaa5cbd88ee71499c7cf9c571d | [
"MIT"
] | null | null | null | template_container_mouse/labels/slice_137.py | lkondratova/Brainplot | 3c8a88c1995dedeaa5cbd88ee71499c7cf9c571d | [
"MIT"
] | null | null | null | coordinates_00FFBF = ((321, 191),
(321, 192), (322, 190), (322, 193), (323, 190), (323, 192), (323, 194), (324, 190), (324, 194), (325, 191), (325, 194), (326, 192), (326, 195), (327, 193), (327, 195), (328, 194), (328, 195), (329, 195), )
coordinates_00FFDF = ((108, 163),
(108, 164), (108, 165), (109, 159), (109,... | 855.692308 | 865 | 0.497151 |
fa6d116271efa6250b06087c7f3e912de4ac7b0b | 1,473 | py | Python | tests/test_firewall.py | haginara/pan-os-python | f6f8a04ddd5a1299d8aea08c38ad2ba1059b69e3 | [
"0BSD"
] | 162 | 2016-04-03T12:00:20.000Z | 2020-07-24T18:46:16.000Z | tests/test_firewall.py | haginara/pan-os-python | f6f8a04ddd5a1299d8aea08c38ad2ba1059b69e3 | [
"0BSD"
] | 242 | 2016-03-18T23:53:00.000Z | 2020-07-24T22:02:05.000Z | tests/test_firewall.py | haginara/pan-os-python | f6f8a04ddd5a1299d8aea08c38ad2ba1059b69e3 | [
"0BSD"
] | 95 | 2016-03-16T13:10:28.000Z | 2020-07-17T01:47:15.000Z | # Copyright (c) 2014, Palo Alto Networks
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS... | 28.326923 | 74 | 0.717583 |
35f84fc32c1a714ef60b7eadf77f3f1e1bdff609 | 1,623 | pyde | Python | mode/examples/Topics/Fractals and L-Systems/Tree/Tree.pyde | timgates42/processing.py | 78a237922c2a928b83f4ad579dbf8d32c0099890 | [
"Apache-2.0"
] | 1,224 | 2015-01-01T22:09:23.000Z | 2022-03-29T19:43:56.000Z | mode/examples/Topics/Fractals and L-Systems/Tree/Tree.pyde | timgates42/processing.py | 78a237922c2a928b83f4ad579dbf8d32c0099890 | [
"Apache-2.0"
] | 253 | 2015-01-14T03:45:51.000Z | 2022-02-08T01:18:19.000Z | mode/examples/Topics/Fractals and L-Systems/Tree/Tree.pyde | timgates42/processing.py | 78a237922c2a928b83f4ad579dbf8d32c0099890 | [
"Apache-2.0"
] | 225 | 2015-01-13T18:38:33.000Z | 2022-03-30T20:27:39.000Z | """
Recursive Tree
by Daniel Shiffman.
Renders a simple tree-like structure via recursion.
The branching angle is calculated as a function of
the horizontal mouse location. Move the mouse left
and right to change the angle.
"""
def setup():
size(640, 360)
def draw():
background(0)
frameRate(30)
... | 31.211538 | 78 | 0.61984 |
9ba0c4a5d260c4a81b2f42f5f4de1f25d02311e4 | 42 | py | Python | Squest/version.py | slarimore02/squest | 369cf7d6a15855d41da36e4689ddfe84c4c5acae | [
"Apache-2.0"
] | null | null | null | Squest/version.py | slarimore02/squest | 369cf7d6a15855d41da36e4689ddfe84c4c5acae | [
"Apache-2.0"
] | null | null | null | Squest/version.py | slarimore02/squest | 369cf7d6a15855d41da36e4689ddfe84c4c5acae | [
"Apache-2.0"
] | null | null | null | __version__ = "1.4"
VERSION = __version__
| 14 | 21 | 0.738095 |
04a7e62cb17767369621cab8167890caca05cf65 | 12,902 | py | Python | libretto/models/individu.py | dezede/dezede | 985ed1b42a2a6bab996e26c1b92444ae04afcc2c | [
"BSD-3-Clause"
] | 15 | 2015-02-10T21:16:31.000Z | 2021-03-25T16:46:20.000Z | libretto/models/individu.py | dezede/dezede | 985ed1b42a2a6bab996e26c1b92444ae04afcc2c | [
"BSD-3-Clause"
] | 4 | 2021-02-10T15:42:08.000Z | 2022-03-11T23:20:38.000Z | libretto/models/individu.py | dezede/dezede | 985ed1b42a2a6bab996e26c1b92444ae04afcc2c | [
"BSD-3-Clause"
] | 6 | 2016-07-10T14:20:48.000Z | 2022-01-19T18:34:02.000Z | from django.core.exceptions import ValidationError
from django.db import connection
from django.db.models import (
CharField, ForeignKey, ManyToManyField, PROTECT, BooleanField)
from django.urls import reverse
from django.utils.html import strip_tags
from django.utils.safestring import mark_safe
from django.utils.t... | 37.725146 | 83 | 0.600605 |
d021caacc345b859b3820976f94fc1111a1c87e4 | 1,507 | py | Python | lecture09/zipcode.py | nd-cse-20289-sp22/cse-20289-sp22-examples | 7ef32af96a7ed7679a01980bc0db83ef22058c31 | [
"MIT"
] | 1 | 2022-02-17T21:31:07.000Z | 2022-02-17T21:31:07.000Z | lecture09/zipcode.py | nd-cse-20289-sp21/cse-20289-sp21-examples | 490b49ea2d49de0daace44fa661c8878b6bdf6a4 | [
"MIT"
] | null | null | null | lecture09/zipcode.py | nd-cse-20289-sp21/cse-20289-sp21-examples | 490b49ea2d49de0daace44fa661c8878b6bdf6a4 | [
"MIT"
] | 8 | 2021-03-05T18:48:21.000Z | 2021-05-23T15:11:56.000Z | #!/usr/bin/env python3
import os
import re
import sys
import requests
# Functions
def usage(status=0):
print(f'''Usage: {os.path.basename(sys.argv[0])} [flags]
-c CITY Which city to search
-s STATE Which state to search (Indiana)''')
sys.exit(status)
def zipcodes(city, state):
ur... | 27.4 | 75 | 0.525547 |
78de1eae4a7e25191ccd8f485396746227b52fae | 3,267 | py | Python | email_queue.py | aroraumang/email-queue-1 | 1770bda5110b12a24cedeef03e083269e9d9ad46 | [
"BSD-3-Clause"
] | null | null | null | email_queue.py | aroraumang/email-queue-1 | 1770bda5110b12a24cedeef03e083269e9d9ad46 | [
"BSD-3-Clause"
] | null | null | null | email_queue.py | aroraumang/email-queue-1 | 1770bda5110b12a24cedeef03e083269e9d9ad46 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
email_queue.py
"""
from email.message import Message
from trytond.model import ModelSQL, ModelView, fields
from trytond.sendmail import get_smtp_server
from trytond.transaction import Transaction
__all__ = ['EmailQueue']
class EmailQueue(ModelSQL, ModelView):
"""
Email Queue... | 29.7 | 79 | 0.544536 |
bfa0b329f95975f21ee545458c656daea12ee0f1 | 4,139 | py | Python | project/settings.py | cspt2-build-week-abr/Backend | 2e349f3ff73db1cbe9bb4f13fceae4847fe47f2f | [
"MIT"
] | null | null | null | project/settings.py | cspt2-build-week-abr/Backend | 2e349f3ff73db1cbe9bb4f13fceae4847fe47f2f | [
"MIT"
] | 8 | 2019-12-04T23:44:37.000Z | 2022-02-10T11:45:47.000Z | project/settings.py | cspt2-build-week-abr/Backend | 2e349f3ff73db1cbe9bb4f13fceae4847fe47f2f | [
"MIT"
] | null | null | null | """
Django settings for project project.
Generated by 'django-admin startproject' using Django 2.2.3.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
#... | 27.052288 | 91 | 0.708867 |
3172f7c8257ac226b61908e6a7ad8809bda81362 | 501 | py | Python | VernamCipher ~ Encoder and Decoder.py | MichaelWiciak/Ciphers | 15cb979448ccc74b148877ae06142666f55187df | [
"MIT"
] | null | null | null | VernamCipher ~ Encoder and Decoder.py | MichaelWiciak/Ciphers | 15cb979448ccc74b148877ae06142666f55187df | [
"MIT"
] | null | null | null | VernamCipher ~ Encoder and Decoder.py | MichaelWiciak/Ciphers | 15cb979448ccc74b148877ae06142666f55187df | [
"MIT"
] | null | null | null | class VernamCipher(object):
def __init__(self):
self.__key = "abcdefghijklmnbodujdjhdabcdefghijklmnbodujdjhd"
def useVernamCipher(self,stringToBeEncrypted):
text = stringToBeEncrypted
encryptedText = ""
pointer = 0
for char in text:
encrypt... | 31.3125 | 71 | 0.576846 |
8abcccffdbd0a766917c2fc6d5e0462a58fceeb3 | 8,464 | py | Python | platform/android/scripts/release.py | kravtsun/mapbox-gl-native | ea8ec38df156c6683c886253dbb1f6bc828686ff | [
"BSL-1.0",
"Apache-2.0"
] | null | null | null | platform/android/scripts/release.py | kravtsun/mapbox-gl-native | ea8ec38df156c6683c886253dbb1f6bc828686ff | [
"BSL-1.0",
"Apache-2.0"
] | null | null | null | platform/android/scripts/release.py | kravtsun/mapbox-gl-native | ea8ec38df156c6683c886253dbb1f6bc828686ff | [
"BSL-1.0",
"Apache-2.0"
] | null | null | null | '''
Utility to schedule SDK builds in Bitrise.
Examples:
- Publish a snapshot from master (release.py uses the current branch)
$ git branch
* master
1234-fix-crash
$ python release.py --stage snapshot
- Publish a snapshot from a feature branch (same as before, just switch branchs with git):
$ git branch
... | 34.688525 | 274 | 0.749055 |
b03962a578373ef3ac798cbf8f27f25faac7340a | 18,157 | py | Python | remindmebot_reply.py | jjmerri/xrpRemindMe-Reddit | 37d833e742e1614dc6454384810a6f69e41cf941 | [
"MIT"
] | null | null | null | remindmebot_reply.py | jjmerri/xrpRemindMe-Reddit | 37d833e742e1614dc6454384810a6f69e41cf941 | [
"MIT"
] | null | null | null | remindmebot_reply.py | jjmerri/xrpRemindMe-Reddit | 37d833e742e1614dc6454384810a6f69e41cf941 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3.6
# =============================================================================
# IMPORTS
# =============================================================================
import praw
import MySQLdb
import traceback
from threading import Thread, Lock
import os
import sys
import configparser
imp... | 41.933025 | 183 | 0.572506 |
9b6b15d81bc8dd6e2805778ad9b2932ae0d7f3d2 | 5,359 | py | Python | init2winit/dataset_lib/datasets.py | google/init2winit | 62ec9fd31bd7b38bb7c220f15d4187bf0706506d | [
"Apache-2.0"
] | 32 | 2021-05-15T01:03:44.000Z | 2022-03-31T10:54:48.000Z | init2winit/dataset_lib/datasets.py | google/init2winit | 62ec9fd31bd7b38bb7c220f15d4187bf0706506d | [
"Apache-2.0"
] | 31 | 2021-05-20T08:03:40.000Z | 2022-03-31T10:27:42.000Z | init2winit/dataset_lib/datasets.py | google/init2winit | 62ec9fd31bd7b38bb7c220f15d4187bf0706506d | [
"Apache-2.0"
] | 6 | 2021-05-20T06:10:04.000Z | 2022-03-31T18:55:04.000Z | # coding=utf-8
# Copyright 2021 The init2winit 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 la... | 39.696296 | 80 | 0.718418 |
92945ac983ee2d3471ddca6d814360139a20e1f0 | 9,462 | py | Python | src/cray/boa/s3client.py | Cray-HPE/boa | 0718b5a1f40134f16b7279a93f545d9f5ca2b664 | [
"MIT"
] | null | null | null | src/cray/boa/s3client.py | Cray-HPE/boa | 0718b5a1f40134f16b7279a93f545d9f5ca2b664 | [
"MIT"
] | 2 | 2022-03-09T18:00:45.000Z | 2022-03-29T18:54:52.000Z | src/cray/boa/s3client.py | Cray-HPE/boa | 0718b5a1f40134f16b7279a93f545d9f5ca2b664 | [
"MIT"
] | null | null | null | #
# MIT License
#
# (C) Copyright 2020-2022 Hewlett Packard Enterprise Development LP
#
# 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... | 30.720779 | 99 | 0.589833 |
8ce3e6c23686524aab069d616d1b93fd501493f1 | 13,106 | py | Python | Source/mainwindow_v3p1.py | DouglasYuen/ProjectBobo | c663e30ee9020b30acfcb142289d9692411d09e5 | [
"MIT"
] | null | null | null | Source/mainwindow_v3p1.py | DouglasYuen/ProjectBobo | c663e30ee9020b30acfcb142289d9692411d09e5 | [
"MIT"
] | null | null | null | Source/mainwindow_v3p1.py | DouglasYuen/ProjectBobo | c663e30ee9020b30acfcb142289d9692411d09e5 | [
"MIT"
] | null | null | null | '''
** RUN THIS FILE **
version 3.1: click print prompts user agreement. Added ui_user_agreement.ui and .py
The window expects Disclaimers.html in the same directory
Version 3:
Main window connecting stuff on the GUI (in ui_mainwindow_3SQ.py) with the program functionality
Uses ColumnView instead of ListViews
Note: ... | 32.60199 | 146 | 0.661834 |
af1bac40c33df1e3c87d21679843b49c59018017 | 518 | py | Python | lib/galaxy/managers/lddas.py | blankenberg/galaxy-data-resource | ca32a1aafd64948f489a4e5cf88096f32391b1d9 | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/managers/lddas.py | blankenberg/galaxy-data-resource | ca32a1aafd64948f489a4e5cf88096f32391b1d9 | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/managers/lddas.py | blankenberg/galaxy-data-resource | ca32a1aafd64948f489a4e5cf88096f32391b1d9 | [
"CC-BY-3.0"
] | null | null | null | from galaxy.managers import base as manager_base
class LDDAManager( manager_base.ModelManager ):
""" A fairly sparse manager for LDDAs.
"""
def __init__( self ):
"""
Set up and initialize other managers needed by lddas.
"""
pass
def get( self, trans, id, check_accessi... | 30.470588 | 98 | 0.635135 |
8ab7f6170399c45432627d17800e2678fc1cc5b2 | 511 | py | Python | linear_regression_readline/code/code_length_1/lr_ds34.py | rodonguyen/vres_code_2021 | cb49d941db4dfc5137e887b195f403fb4262cfd8 | [
"MIT"
] | null | null | null | linear_regression_readline/code/code_length_1/lr_ds34.py | rodonguyen/vres_code_2021 | cb49d941db4dfc5137e887b195f403fb4262cfd8 | [
"MIT"
] | null | null | null | linear_regression_readline/code/code_length_1/lr_ds34.py | rodonguyen/vres_code_2021 | cb49d941db4dfc5137e887b195f403fb4262cfd8 | [
"MIT"
] | null | null | null | from sklearn import linear_model
x_values = []
y_values = []
n = 1
with open('./dataset/dataset_34.csv') as f:
for i in range(0, n):
x,y = f.readline().replace('\n','').split(',')
x, y = float(x), float(y)
x_values.append([x,y])
y_values.append(y)
# Create linear re... | 23.227273 | 55 | 0.62818 |
00e435e0276cc1cb6db7a313e1505aac0f28f281 | 2,080 | py | Python | routes/api_card.py | Officeyutong/HelloJudge2 | e88c0a1198f8531ee0c1121dccfedb51f3f0aa0e | [
"MIT"
] | 21 | 2020-02-24T07:56:55.000Z | 2022-01-22T11:32:28.000Z | routes/api_card.py | Officeyutong/HelloJudge2 | e88c0a1198f8531ee0c1121dccfedb51f3f0aa0e | [
"MIT"
] | 1 | 2021-02-07T13:08:47.000Z | 2021-02-09T04:50:49.000Z | routes/api_card.py | Officeyutong/HelloJudge2 | e88c0a1198f8531ee0c1121dccfedb51f3f0aa0e | [
"MIT"
] | 3 | 2020-06-04T07:56:20.000Z | 2021-06-21T04:04:15.000Z | from models.problem import Problem
from models.submission import Submission
import typing
from main import background_task_queue, db, config, permission_manager
from main import web_app as app
from common.permission import require_permission
from common.utils import unpack_argument
from flask_sqlalchemy import... | 31.515152 | 74 | 0.622115 |
8643bd3ac7910e48726b42598153a8af71ed2992 | 18,135 | py | Python | aiida/backends/sqlalchemy/utils.py | joepvd/aiida_core | 6e9711046753332933f982971db1d7ac7e7ade58 | [
"BSD-2-Clause"
] | null | null | null | aiida/backends/sqlalchemy/utils.py | joepvd/aiida_core | 6e9711046753332933f982971db1d7ac7e7ade58 | [
"BSD-2-Clause"
] | null | null | null | aiida/backends/sqlalchemy/utils.py | joepvd/aiida_core | 6e9711046753332933f982971db1d7ac7e7ade58 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... | 33.153565 | 119 | 0.659994 |
78da4ffb56fd155e227e684d88b8f58a84806283 | 196 | py | Python | experiments/multip.py | huxia001/autokeras | f4503bb3a3be014b452f54d8e2d187bb6419f627 | [
"MIT"
] | 1 | 2018-08-03T05:59:54.000Z | 2018-08-03T05:59:54.000Z | experiments/multip.py | HangJie720/autokeras | 1619d8c398a955559fb6389797716c9a0989cb43 | [
"MIT"
] | null | null | null | experiments/multip.py | HangJie720/autokeras | 1619d8c398a955559fb6389797716c9a0989cb43 | [
"MIT"
] | 1 | 2018-08-31T12:49:57.000Z | 2018-08-31T12:49:57.000Z | import multiprocessing
from time import sleep
def foo(a, b):
return a + b
d = {}
p = multiprocessing.Pool(2)
data = p.map_async(foo, [[3, 4], [5, 6]])
print(data.get())
p.close()
p.join()
| 13.066667 | 41 | 0.622449 |
91ab1a8ff6fe61b1236f737d549b3de42fefef0f | 771 | py | Python | core/admin.py | Hassan-gholipoor/Todo_App_API | 19f9c141868fa0b01a11ed2a20f665d97b877340 | [
"MIT"
] | null | null | null | core/admin.py | Hassan-gholipoor/Todo_App_API | 19f9c141868fa0b01a11ed2a20f665d97b877340 | [
"MIT"
] | null | null | null | core/admin.py | Hassan-gholipoor/Todo_App_API | 19f9c141868fa0b01a11ed2a20f665d97b877340 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from django.utils.translation import gettext_lazy as _
from core import models
class UserAdmin(BaseUserAdmin):
ordering = ['id']
list_display = ['email', 'name']
fieldsets = (
(None, {"fields": ("ema... | 29.653846 | 84 | 0.599222 |
2a46d2b5ab30a87f7025507ff6c6dd84d8a165f5 | 940 | py | Python | woof_nf/workflow/bin/shared.py | umccr/woof-nf | 0d4ac533e67dc2b28252bf50379133184524d1bd | [
"OLDAP-2.2.1"
] | null | null | null | woof_nf/workflow/bin/shared.py | umccr/woof-nf | 0d4ac533e67dc2b28252bf50379133184524d1bd | [
"OLDAP-2.2.1"
] | null | null | null | woof_nf/workflow/bin/shared.py | umccr/woof-nf | 0d4ac533e67dc2b28252bf50379133184524d1bd | [
"OLDAP-2.2.1"
] | null | null | null | import pathlib
import subprocess
import sys
def get_woofr_source_fp() -> pathlib.Path:
return get_lib_path() / 'woofr_compare.R'
def get_lib_path() -> pathlib.Path:
# Currently the nf-amazon plugin only uploads the ./bin/ directory to AWS instances. Any ./lib/
# files accessed during task execution are ... | 30.322581 | 99 | 0.671277 |
45a6b44377355d64a68094ef9bbcc6d15f21c27f | 948 | py | Python | app/DBbase.py | ophioglossum/video | 31b969bddc7f3509d5ebaab1aff9d7e2399365ff | [
"MIT"
] | null | null | null | app/DBbase.py | ophioglossum/video | 31b969bddc7f3509d5ebaab1aff9d7e2399365ff | [
"MIT"
] | null | null | null | app/DBbase.py | ophioglossum/video | 31b969bddc7f3509d5ebaab1aff9d7e2399365ff | [
"MIT"
] | null | null | null | from config import database
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker,scoped_session
from sqlalchemy.pool import QueuePool
#数据库基础类
class DBbase():
def __init__(self):
self.engine = create_engine(
database.DB_HOST,
poolclass=QueuePool,
ma... | 31.6 | 57 | 0.650844 |
ac4a29c0047fff68943b8d600da4f2cd013aeb41 | 677 | py | Python | tests/test_kademlia.py | vtemian/kademlia | 0994f76f314481316bedcfa6b5c3e404e33df53c | [
"MIT"
] | null | null | null | tests/test_kademlia.py | vtemian/kademlia | 0994f76f314481316bedcfa6b5c3e404e33df53c | [
"MIT"
] | null | null | null | tests/test_kademlia.py | vtemian/kademlia | 0994f76f314481316bedcfa6b5c3e404e33df53c | [
"MIT"
] | null | null | null | import time
import pytest
from kademlia import Kademlia
@pytest.fixture
def nodes():
node1 = Kademlia("127.0.0.1", 5001)
node2 = Kademlia("127.0.0.1", 5002, register_to=node1)
return node1, node2
def test_ping(nodes):
node1, node2 = nodes
node1.ping(node2)
assert node1.received_jobs[-1] ... | 18.297297 | 58 | 0.592319 |
498b617eecf768c6216cade6f230739f52bfa19a | 1,857 | py | Python | python/src/nnabla/backward_function/random_choice.py | chunxiaosz/nnabla | 9f4249313129d0fd23d304453830157fee96a2e5 | [
"Apache-2.0"
] | 1 | 2019-09-10T06:51:37.000Z | 2019-09-10T06:51:37.000Z | python/src/nnabla/backward_function/random_choice.py | langbin2014/nnabla | e94bac5bed65337010e2ac07a5937fb862ab2dd8 | [
"Apache-2.0"
] | null | null | null | python/src/nnabla/backward_function/random_choice.py | langbin2014/nnabla | e94bac5bed65337010e2ac07a5937fb862ab2dd8 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2017 Sony Corporation. 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 applicabl... | 37.14 | 84 | 0.681745 |
89fb09ea458052372ec5c573208ade0132c9690b | 4,500 | py | Python | roles/lib_openshift/src/class/oc_group.py | shgriffi/openshift-ansible | 6313f519307cf50055589c3876d8bec398bbc4d4 | [
"Apache-2.0"
] | 1 | 2017-12-13T01:11:57.000Z | 2017-12-13T01:11:57.000Z | roles/lib_openshift/src/class/oc_group.py | shgriffi/openshift-ansible | 6313f519307cf50055589c3876d8bec398bbc4d4 | [
"Apache-2.0"
] | 6 | 2018-02-01T11:13:38.000Z | 2018-02-02T08:01:15.000Z | roles/lib_openshift/src/class/oc_group.py | shgriffi/openshift-ansible | 6313f519307cf50055589c3876d8bec398bbc4d4 | [
"Apache-2.0"
] | 4 | 2018-10-27T00:29:24.000Z | 2022-01-07T07:39:51.000Z | # pylint: skip-file
# flake8: noqa
class OCGroup(OpenShiftCLI):
''' Class to wrap the oc command line tools '''
kind = 'group'
def __init__(self,
config,
verbose=False):
''' Constructor for OCGroup '''
super(OCGroup, self).__init__(config.namespace, confi... | 30.201342 | 106 | 0.512 |
6ccdcb0248ddee32637260f06a1c3bf66c3d9755 | 545 | py | Python | tests/schema/models_cyclic.py | Alirezaja1384/tortoise-orm | e7ecbc81d43860a3b0b6d5d9da27497ed6234049 | [
"Apache-2.0"
] | 33 | 2018-04-07T09:50:22.000Z | 2018-08-24T10:25:29.000Z | tests/schema/models_cyclic.py | Alirezaja1384/tortoise-orm | e7ecbc81d43860a3b0b6d5d9da27497ed6234049 | [
"Apache-2.0"
] | 41 | 2018-03-29T17:09:18.000Z | 2018-08-24T16:37:38.000Z | tests/schema/models_cyclic.py | Alirezaja1384/tortoise-orm | e7ecbc81d43860a3b0b6d5d9da27497ed6234049 | [
"Apache-2.0"
] | 4 | 2018-06-27T08:45:11.000Z | 2018-07-30T18:16:55.000Z | """
This is the testing Models — Cyclic
"""
from tortoise import fields
from tortoise.models import Model
class One(Model):
tournament: fields.ForeignKeyRelation["Two"] = fields.ForeignKeyField(
"models.Two", related_name="events"
)
class Two(Model):
tournament: fields.ForeignKeyRelation["Three"... | 22.708333 | 76 | 0.699083 |
18e617dd29f9f7671dd608cb62fe149a18bc34e2 | 24,257 | py | Python | mvpa2/base/verbosity.py | nno/PyMVPA | a125596bf81b8e9848768852f697bd3cff9674c4 | [
"MIT"
] | 227 | 2015-01-17T20:13:54.000Z | 2022-01-26T21:14:30.000Z | mvpa2/base/verbosity.py | nno/PyMVPA | a125596bf81b8e9848768852f697bd3cff9674c4 | [
"MIT"
] | 364 | 2015-01-05T21:55:09.000Z | 2021-09-09T20:37:55.000Z | mvpa2/base/verbosity.py | nno/PyMVPA | a125596bf81b8e9848768852f697bd3cff9674c4 | [
"MIT"
] | 111 | 2015-01-06T19:26:41.000Z | 2022-01-26T21:14:31.000Z | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the PyMVPA package for the
# copyright and license terms.
#
### ### ### ### ###... | 34.212976 | 109 | 0.531682 |
824b7f371a5990b30dddd5f4fc2643723d5b3406 | 10,562 | py | Python | tasks/summarization/make_datafiles.py | omri123/rotational-unit-of-memory | e796c841e1e837df09497ba77c3bc285db47d02d | [
"MIT"
] | 82 | 2019-04-18T19:32:03.000Z | 2022-03-19T00:50:56.000Z | tasks/summarization/make_datafiles.py | omri123/rotational-unit-of-memory | e796c841e1e837df09497ba77c3bc285db47d02d | [
"MIT"
] | 4 | 2019-04-22T11:58:43.000Z | 2020-05-31T01:43:03.000Z | tasks/summarization/make_datafiles.py | omri123/rotational-unit-of-memory | e796c841e1e837df09497ba77c3bc285db47d02d | [
"MIT"
] | 26 | 2019-04-22T11:21:42.000Z | 2021-11-29T06:01:10.000Z | import sys
import os
import hashlib
import struct
import subprocess
import collections
import tensorflow as tf
from tensorflow.core.example import example_pb2
sd_single_close_quote = u'\u2019' # unicode
sd_double_close_quote = u'\u201d'
END_TOKENS = ['.', '!', '?', '...', "'", "`", '"', sd_single_close_quote, sd_doub... | 43.286885 | 250 | 0.674778 |
07db2bc31830c6edfe71c4b56e2362cfbf9a7a7c | 11,425 | py | Python | script.module.nanscrapers/lib/nanscrapers/modules/js2py/translators/pyjsparserdata.py | TheWardoctor/wardoctors-repo | 893f646d9e27251ffc00ca5f918e4eb859a5c8f0 | [
"Apache-2.0"
] | 1 | 2019-03-05T09:38:10.000Z | 2019-03-05T09:38:10.000Z | script.module.universalscrapers/lib/universalscrapers/modules/js2py/translators/pyjsparserdata.py | Reapercrew666/crypt | e1e0994f5323c6b454ac0f65fb2e579f7bea8e5a | [
"Beerware"
] | null | null | null | script.module.universalscrapers/lib/universalscrapers/modules/js2py/translators/pyjsparserdata.py | Reapercrew666/crypt | e1e0994f5323c6b454ac0f65fb2e579f7bea8e5a | [
"Beerware"
] | 1 | 2021-11-05T20:48:09.000Z | 2021-11-05T20:48:09.000Z | # The MIT License
#
# Copyright 2014, 2015 Piotr Dabkowski
#
# 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, modif... | 37.956811 | 145 | 0.605777 |
0b3b56f7d3d7180ef4d21e4f9a48de524bd857e6 | 156 | py | Python | olympics/string_test.py | ColeWeinstein/cs257 | 18453fd5d556169484c0fc3414f5e1fa07bbb04c | [
"MIT"
] | null | null | null | olympics/string_test.py | ColeWeinstein/cs257 | 18453fd5d556169484c0fc3414f5e1fa07bbb04c | [
"MIT"
] | null | null | null | olympics/string_test.py | ColeWeinstein/cs257 | 18453fd5d556169484c0fc3414f5e1fa07bbb04c | [
"MIT"
] | null | null | null | def main():
string_seq = 'Hello, {name}. How are you?'.format(name='Cole', medal=True)
print(string_seq)
if __name__ == '__main__':
main() | 26 | 79 | 0.608974 |
52ebe634af580c3414104c8f8c2d3ac7d77adf61 | 2,980 | py | Python | MIoU.py | kanekoNK/MaskImg | 142b09484be58737a4e9e1bef18cf6289f8c055b | [
"MIT"
] | null | null | null | MIoU.py | kanekoNK/MaskImg | 142b09484be58737a4e9e1bef18cf6289f8c055b | [
"MIT"
] | null | null | null | MIoU.py | kanekoNK/MaskImg | 142b09484be58737a4e9e1bef18cf6289f8c055b | [
"MIT"
] | null | null | null | import numpy as np
import cv2
from time import sleep
from PIL import Image
import matplotlib.pyplot as plt
import glob
def main():
FClass = sorted(glob.glob("/home/kaneko/models/research/deeplab/IoUtestimg/Class/*"))
Fimg = sorted(glob.glob("/home/kaneko/models/research/deeplab/IoUtestimg/1000/*"))
Sum = 0... | 30.10101 | 89 | 0.651678 |
e5081de3fcf654692c34e4d9255311a84f14e72e | 77,634 | py | Python | sympy/combinatorics/permutations.py | lemmalearning/sympy | 62ad387ed3f7b243c889dd342296afc9a32ad1ea | [
"BSD-3-Clause"
] | 1 | 2015-08-31T06:55:47.000Z | 2015-08-31T06:55:47.000Z | sympy/combinatorics/permutations.py | lemmalearning/sympy | 62ad387ed3f7b243c889dd342296afc9a32ad1ea | [
"BSD-3-Clause"
] | null | null | null | sympy/combinatorics/permutations.py | lemmalearning/sympy | 62ad387ed3f7b243c889dd342296afc9a32ad1ea | [
"BSD-3-Clause"
] | 3 | 2015-04-18T22:33:32.000Z | 2015-09-23T06:45:07.000Z | from __future__ import print_function, division
import random
from collections import defaultdict
from sympy.core import Basic
from sympy.core.compatibility import is_sequence, reduce, xrange
from sympy.utilities.iterables import (flatten, has_variety, minlex,
has_dups, runs)
from sympy.polys.polytools import lcm... | 27.895796 | 91 | 0.511 |
cf1cc6bf6b2894bf6e3e534ab0fd58905c530177 | 3,204 | py | Python | kf_lib_data_ingest/etl/load/load_v2.py | kids-first/kf-lib-data-ingest | 92889efef082c64744a00a9c110d778da7383959 | [
"Apache-2.0"
] | 3 | 2018-10-30T17:56:44.000Z | 2020-05-27T16:18:05.000Z | kf_lib_data_ingest/etl/load/load_v2.py | kids-first/kf-lib-data-ingest | 92889efef082c64744a00a9c110d778da7383959 | [
"Apache-2.0"
] | 344 | 2018-11-01T16:47:56.000Z | 2022-02-23T20:36:21.000Z | kf_lib_data_ingest/etl/load/load_v2.py | kids-first/kf-lib-data-ingest | 92889efef082c64744a00a9c110d778da7383959 | [
"Apache-2.0"
] | 1 | 2020-08-19T21:25:25.000Z | 2020-08-19T21:25:25.000Z | """
For Version 2 Target Service Plugins
"""
from pprint import pformat
from kf_lib_data_ingest.common import constants
from kf_lib_data_ingest.etl.load.load_base import LoadStageBase
class LoadStage(LoadStageBase):
def __init__(self, *args, query_url="", **kwargs):
"""
:param query_url: Alternat... | 33.375 | 85 | 0.566792 |
c762c7264762e2ed42c2e89cf8a5a351659b6407 | 1,336 | py | Python | cnxman/logging.py | patdaburu/cnxman | f0094def9c6a7b77f0c44b8c08638bfba6d8f5d6 | [
"MIT"
] | null | null | null | cnxman/logging.py | patdaburu/cnxman | f0094def9c6a7b77f0c44b8c08638bfba6d8f5d6 | [
"MIT"
] | null | null | null | cnxman/logging.py | patdaburu/cnxman | f0094def9c6a7b77f0c44b8c08638bfba6d8f5d6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
.. currentmodule:: cnxman.logging
.. moduleauthor:: Pat Daburu <pat@daburu.net>
Dear diary...
"""
import logging
# TODO: This module should eventually be broken out so it may be reused in other projects.
def loggable_class(logger_name: str=None):
"""
This i... | 35.157895 | 116 | 0.633234 |
092950238f17d798165075d36f0bf97755aa87c5 | 1,542 | py | Python | Main.py | sunxyq/py-data-clean | 1597aa6ae1aa7a03449315f57fb17404a926b506 | [
"Apache-2.0"
] | 1 | 2019-03-28T09:29:51.000Z | 2019-03-28T09:29:51.000Z | Main.py | sunxyq/py-data-clean | 1597aa6ae1aa7a03449315f57fb17404a926b506 | [
"Apache-2.0"
] | null | null | null | Main.py | sunxyq/py-data-clean | 1597aa6ae1aa7a03449315f57fb17404a926b506 | [
"Apache-2.0"
] | null | null | null | #coding=utf-8
import DBUtil
def main() :
util = DBUtil.DBUtil()
DBUtil.DBUtil.digit_fence(util)
# print(FileUtil.count_lines('/Users/xiangyongqing/Documents/crawler-data-1797910-1522984840544.csv'))
# print(CSVUtil.CSVUtil.get_length(CSVUtil, '/Users/xiangyongqing/Documents/crawler-data-1797910-15229848... | 42.833333 | 122 | 0.780156 |
54701104f5aebd31b7a711d22cbf968db61f0bf8 | 240 | py | Python | scripts/checkpoint.py | tjclement/ukraine-defense-firewall-rules | ed82ab21cd2d055e09480108f83ca8c76bac63dd | [
"CC0-1.0"
] | null | null | null | scripts/checkpoint.py | tjclement/ukraine-defense-firewall-rules | ed82ab21cd2d055e09480108f83ca8c76bac63dd | [
"CC0-1.0"
] | null | null | null | scripts/checkpoint.py | tjclement/ukraine-defense-firewall-rules | ed82ab21cd2d055e09480108f83ca8c76bac63dd | [
"CC0-1.0"
] | 1 | 2022-02-27T22:40:24.000Z | 2022-02-27T22:40:24.000Z | def checkpoint_save(lists):
for name, sublists in lists.items():
for subname, ips in sublists.items():
with open(f"checkpoint/greynoise_{name}_{subname}.txt", "wt") as file:
file.write("\n".join(ips)) | 48 | 82 | 0.6125 |
7ed80fd0298a4c402bfe7153fa14c67a8a66f80d | 8,514 | py | Python | docs/conf.py | stfp/flask-presst | 8d10cc04d390d412c9b949fcd81f696ab87b85ad | [
"MIT"
] | 1 | 2018-07-17T03:56:04.000Z | 2018-07-17T03:56:04.000Z | docs/conf.py | stfp/flask-presst | 8d10cc04d390d412c9b949fcd81f696ab87b85ad | [
"MIT"
] | null | null | null | docs/conf.py | stfp/flask-presst | 8d10cc04d390d412c9b949fcd81f696ab87b85ad | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Flask-Presst documentation build configuration file, created by
# sphinx-quickstart on Fri Mar 28 16:41:50 2014.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
... | 31.533333 | 80 | 0.712004 |
fac20796c0d678f71408549ef1bd98505a863837 | 20,657 | py | Python | soniox/speech_service_pb2_grpc.py | soniox/soniox_python | b0a1e2dc126e11e64b1147939fb4025efe675a3b | [
"MIT"
] | null | null | null | soniox/speech_service_pb2_grpc.py | soniox/soniox_python | b0a1e2dc126e11e64b1147939fb4025efe675a3b | [
"MIT"
] | 1 | 2021-06-01T22:08:28.000Z | 2021-06-01T22:08:28.000Z | soniox/speech_service_pb2_grpc.py | soniox/soniox_python | b0a1e2dc126e11e64b1147939fb4025efe675a3b | [
"MIT"
] | null | null | null | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from soniox import speech_service_pb2 as soniox_dot_speech__service__pb2
class SpeechServiceStub(object):
"""Missing associated documentation comment in .p... | 52.032746 | 129 | 0.700344 |
37ce18bcb95c06316178d52077446df676bb3c0c | 7,511 | py | Python | pyneal_scanner/getSeries.py | jeffmacinnes/pyneal | 750f0ec5a231ccfa77aea960242de9b5019ba493 | [
"MIT"
] | 24 | 2017-03-15T16:53:10.000Z | 2022-02-08T18:43:01.000Z | pyneal_scanner/getSeries.py | jeffmacinnes/pyneal | 750f0ec5a231ccfa77aea960242de9b5019ba493 | [
"MIT"
] | 4 | 2017-03-16T01:36:46.000Z | 2020-02-05T07:37:24.000Z | pyneal_scanner/getSeries.py | jeffmacinnes/pyneal | 750f0ec5a231ccfa77aea960242de9b5019ba493 | [
"MIT"
] | 8 | 2017-03-21T14:38:26.000Z | 2021-11-15T14:01:30.000Z | """ Create a Nifti file from specified series data
Take the data in the specified series directory and convert it to a 4D
nifti image in RAS+ orientation, and then save the new data to disk.
If the series is an anatomical scan, the output Nifti will be 3D. If the series
is a functional scan, the output Nifti will be ... | 36.285024 | 79 | 0.703901 |
444089a72332e12a86790988791f0e7493e7be39 | 139 | py | Python | py/compat/conftest.py | woodrow/pyoac | b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7 | [
"MIT"
] | 1 | 2019-05-27T00:58:46.000Z | 2019-05-27T00:58:46.000Z | py/compat/conftest.py | woodrow/pyoac | b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7 | [
"MIT"
] | null | null | null | py/compat/conftest.py | woodrow/pyoac | b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7 | [
"MIT"
] | null | null | null | import py
class Directory(py.test.collect.Directory):
def collect(self):
py.test.skip("compat tests need to be run manually")
| 23.166667 | 60 | 0.705036 |
8cc2fc222cc9aba4caf79580dcfe1e161e51cff0 | 777 | py | Python | setup.py | nestauk/AFS_analysis_childcare_providers | be2def68aca3c334a0c42c2bb1390e0dcbf2324e | [
"MIT"
] | null | null | null | setup.py | nestauk/AFS_analysis_childcare_providers | be2def68aca3c334a0c42c2bb1390e0dcbf2324e | [
"MIT"
] | 3 | 2021-07-01T14:47:33.000Z | 2021-07-12T09:15:11.000Z | setup.py | nestauk/AFS_analysis_childcare_providers | be2def68aca3c334a0c42c2bb1390e0dcbf2324e | [
"MIT"
] | null | null | null | """afs_analysis_childcare_providers."""
from pathlib import Path
from setuptools import find_packages
from setuptools import setup
def read_lines(path):
"""Read lines of `path`."""
with open(path) as f:
return f.read().splitlines()
BASE_DIR = Path(__file__).parent
setup(
name="afs_analysis_chi... | 28.777778 | 132 | 0.718147 |
f872b81c6f1087d2f5aa97b2b6429848ebf4c7c3 | 15,670 | py | Python | topopy/MorseComplex.py | vishalbelsare/topopy | 73ccc9510bd34be2ead875bc3bc1081ccad26b1f | [
"BSD-3-Clause"
] | 12 | 2018-04-18T00:04:00.000Z | 2021-02-11T13:47:25.000Z | topopy/MorseComplex.py | vishalbelsare/topopy | 73ccc9510bd34be2ead875bc3bc1081ccad26b1f | [
"BSD-3-Clause"
] | 40 | 2018-01-19T21:40:14.000Z | 2021-09-11T12:19:48.000Z | topopy/MorseComplex.py | vishalbelsare/topopy | 73ccc9510bd34be2ead875bc3bc1081ccad26b1f | [
"BSD-3-Clause"
] | 3 | 2019-07-09T04:57:07.000Z | 2021-09-07T10:51:08.000Z | import sys
import time
import collections
import json
import numpy as np
from .topology import MorseComplexFloat, vectorFloat, mapIntSetInt
from .TopologicalObject import TopologicalObject
class MorseComplex(TopologicalObject):
""" A wrapper class for the C++ approximate Morse complex Object
Parameters
... | 33.269639 | 80 | 0.580089 |
63274abe198fbdf0e2a370a5fc2e472b3f3abba2 | 2,989 | py | Python | ijal_interlinear/tests/test_Line.py | davidjamesbeck/IJAL-interlinear | cb5dbb1d6aea98cce76668aa868a9189f31baf3f | [
"BSD-2-Clause"
] | null | null | null | ijal_interlinear/tests/test_Line.py | davidjamesbeck/IJAL-interlinear | cb5dbb1d6aea98cce76668aa868a9189f31baf3f | [
"BSD-2-Clause"
] | null | null | null | ijal_interlinear/tests/test_Line.py | davidjamesbeck/IJAL-interlinear | cb5dbb1d6aea98cce76668aa868a9189f31baf3f | [
"BSD-2-Clause"
] | null | null | null | import re
import sys
sys.path.append("..")
from line import *
import importlib
import os
import pdb
#----------------------------------------------------------------------------------------------------
pd.set_option('display.width', 1000)
#--------------------------------------------------------------------------------... | 35.583333 | 115 | 0.583473 |
4675daefd56742486878081501d692df36033f2d | 35,311 | py | Python | plaso/cli/storage_media_tool.py | pyllyukko/plaso | 7533db2d1035ca71d264d6281ebd5db2d073c587 | [
"Apache-2.0"
] | null | null | null | plaso/cli/storage_media_tool.py | pyllyukko/plaso | 7533db2d1035ca71d264d6281ebd5db2d073c587 | [
"Apache-2.0"
] | null | null | null | plaso/cli/storage_media_tool.py | pyllyukko/plaso | 7533db2d1035ca71d264d6281ebd5db2d073c587 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""The storage media CLI tool."""
import codecs
import getpass
import os
from dfvfs.analyzer import analyzer as dfvfs_analyzer
from dfvfs.analyzer import fvde_analyzer_helper
from dfvfs.credentials import manager as credentials_manager
from dfvfs.helpers import command_line as dfvfs_command_li... | 35.958248 | 80 | 0.701821 |
590cd8fd2841add72e825219d29700e24439ac1d | 4,781 | py | Python | tests/test_single_triangle_camera_fisheye.py | numericalBoy/redner | a68d631b1ac8dca0acf9f253987b7596533d35d5 | [
"MIT"
] | null | null | null | tests/test_single_triangle_camera_fisheye.py | numericalBoy/redner | a68d631b1ac8dca0acf9f253987b7596533d35d5 | [
"MIT"
] | null | null | null | tests/test_single_triangle_camera_fisheye.py | numericalBoy/redner | a68d631b1ac8dca0acf9f253987b7596533d35d5 | [
"MIT"
] | null | null | null | import pyredner
import numpy as np
import torch
# Optimize fisheye camera parameters of a single triangle rendering
# Use GPU if available
pyredner.set_use_gpu(torch.cuda.is_available())
# Set up the scene using Pytorch tensor
position = torch.tensor([0.0, 0.0, -1.0])
look_at = torch.tensor([0.0, 0.0, 0.0])
up = tor... | 40.863248 | 109 | 0.627065 |
527b816b01c6f99ac2b2039ff6def528c2e9ad66 | 836 | py | Python | src/restapi/project/views.py | agbilotia1998/backend | c8e7654fe4cdd2faa8d0c6f7cfe12486a403ad17 | [
"Apache-2.0"
] | null | null | null | src/restapi/project/views.py | agbilotia1998/backend | c8e7654fe4cdd2faa8d0c6f7cfe12486a403ad17 | [
"Apache-2.0"
] | null | null | null | src/restapi/project/views.py | agbilotia1998/backend | c8e7654fe4cdd2faa8d0c6f7cfe12486a403ad17 | [
"Apache-2.0"
] | null | null | null | import uuid
from djoser.views import UserView, UserDeleteView
from djoser import serializers
from rest_framework import views, permissions, status, permissions, generics, filters
from rest_framework.response import Response
from . import models
from . import serializers
from .serializers import ProjectSerializer
from r... | 32.153846 | 85 | 0.754785 |
6f794a8a40528a0568fc07bb6c08a4f81c738229 | 3,351 | py | Python | stubs.min/System/Diagnostics/__init___parts/StackFrame.py | ricardyn/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | 1 | 2021-02-02T13:39:16.000Z | 2021-02-02T13:39:16.000Z | stubs.min/System/Diagnostics/__init___parts/StackFrame.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | stubs.min/System/Diagnostics/__init___parts/StackFrame.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | class StackFrame(object):
"""
Provides information about a System.Diagnostics.StackFrame,which represents a function call on the call stack for the current thread.
StackFrame()
StackFrame(fNeedFileInfo: bool)
StackFrame(skipFrames: int)
StackFrame(skipFrames: int,fNeedFileInfo: bool)
StackFrame(f... | 33.848485 | 136 | 0.697105 |
5fc420cb4f1efbf2153a500e4e1b6552441ee543 | 421 | py | Python | tests/test_optimize.py | LucaCappelletti94/pygifsicle | 4f05d0eead3b002295212d985fdbc9ca8e7f4a8f | [
"MIT"
] | 42 | 2019-10-14T11:30:53.000Z | 2022-03-28T06:55:20.000Z | tests/test_optimize.py | LucaCappelletti94/pygifsicle | 4f05d0eead3b002295212d985fdbc9ca8e7f4a8f | [
"MIT"
] | 8 | 2019-10-13T02:54:19.000Z | 2021-10-02T17:47:40.000Z | tests/test_optimize.py | LucaCappelletti94/pygifsicle | 4f05d0eead3b002295212d985fdbc9ca8e7f4a8f | [
"MIT"
] | 8 | 2019-09-23T18:59:39.000Z | 2022-02-25T22:38:44.000Z | from pygifsicle import optimize
import os
from pathlib import Path
def test_optimize():
optimize("tests/big.gif", "small.gif")
optimize("small.gif")
os.remove("small.gif")
def test_optimize_pathlib():
here = Path(__file__).parent.resolve()
source = here / "big.gif"
destination = here ... | 23.388889 | 42 | 0.68171 |
ca1f4cbb6673de1a9b14525f10bf7fcb6f961fc0 | 3,411 | py | Python | input/control/model_control.py | CUrW-SL/distributed_hechms | 0ae72d55f5b724dd41a5c322ac96804b4bbf1ee2 | [
"MIT"
] | null | null | null | input/control/model_control.py | CUrW-SL/distributed_hechms | 0ae72d55f5b724dd41a5c322ac96804b4bbf1ee2 | [
"MIT"
] | null | null | null | input/control/model_control.py | CUrW-SL/distributed_hechms | 0ae72d55f5b724dd41a5c322ac96804b4bbf1ee2 | [
"MIT"
] | null | null | null | from config import CONTROL_TEMPLATE, HEC_HMS_VERSION, CONTROL_FILE_NAME
from datetime import datetime
import pandas as pd
def create_control_file_by_rain_file(model_name, rain_filename):
rf_data_frame = pd.read_csv(rain_filename, sep=',')
start_datetime = rf_data_frame.iloc[2][0]
end_datetime = rf_data_fr... | 42.111111 | 83 | 0.724421 |
cb1c34b66902c8e18cc96643bdc3b68a0d02235d | 446 | py | Python | python/pyglet/label.py | jeremiedecock/snippets | 4bd4e7f459eee610d5cf19f845299ca942ff4b64 | [
"MIT"
] | 23 | 2015-06-08T13:01:00.000Z | 2021-12-30T08:20:04.000Z | python/pyglet/label.py | jeremiedecock/snippets | 4bd4e7f459eee610d5cf19f845299ca942ff4b64 | [
"MIT"
] | 1 | 2020-10-22T02:36:10.000Z | 2020-10-22T02:36:10.000Z | python/pyglet/label.py | jeremiedecock/snippets | 4bd4e7f459eee610d5cf19f845299ca942ff4b64 | [
"MIT"
] | 7 | 2017-10-31T09:48:14.000Z | 2022-01-04T15:59:45.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import pyglet
window = pyglet.window.Window()
label = pyglet.text.Label('Hello, world',
font_name='Times New Roman',
font_size=36,
x=window.width//2, y=window.height//2,
... | 22.3 | 64 | 0.522422 |
96089c4f8766bc0a9c7adb55e503a4d254135ad7 | 1,907 | py | Python | data/synthia_dataset.py | uta-smile/ASSUDA | e4af3a51846d30529a2b9d6b1d5c383fcd108051 | [
"MIT"
] | 6 | 2021-09-11T19:51:17.000Z | 2022-02-06T17:31:47.000Z | data/synthia_dataset.py | uta-smile/ASSUDA | e4af3a51846d30529a2b9d6b1d5c383fcd108051 | [
"MIT"
] | 2 | 2021-09-09T08:02:09.000Z | 2021-12-13T17:23:57.000Z | data/synthia_dataset.py | uta-smile/ASSUDA | e4af3a51846d30529a2b9d6b1d5c383fcd108051 | [
"MIT"
] | 1 | 2022-02-07T12:54:58.000Z | 2022-02-07T12:54:58.000Z | import os
import os.path as osp
import numpy as np
import random
import collections
import torch
import torchvision
from torch.utils import data
from PIL import Image
class SYNDataSet(data.Dataset):
def __init__(self, root, list_path, max_iters=None, crop_size=(321, 321), mean=(128, 128, 128), ignore_label=255):
... | 35.981132 | 118 | 0.596224 |
f8e946685e7e97a87076bbd68c74a37160b98416 | 1,396 | py | Python | server.py | ryzbaka/BoyOfSilence_v2 | 6975c8bf435c7c56d92d889f51f90b208afe5635 | [
"MIT"
] | null | null | null | server.py | ryzbaka/BoyOfSilence_v2 | 6975c8bf435c7c56d92d889f51f90b208afe5635 | [
"MIT"
] | null | null | null | server.py | ryzbaka/BoyOfSilence_v2 | 6975c8bf435c7c56d92d889f51f90b208afe5635 | [
"MIT"
] | null | null | null | import json
from flask import Flask,render_template
import time
import tweepy
from textblob import TextBlob
import pandas as pd
import numpy as np
import sys
###API AUTHORIZATION###
consumer_key="Ee0lw604kCAuzTbFp3pcn5lck"
consumer_secret="uuedTNbrDhmhsI8QBeOeCcEaOxtoe4nXDPDcRd8XkLF67yzjQ1"
access_token="857652506079... | 27.372549 | 78 | 0.750716 |
c1ffdb325151b98c75c9c1e82d8d44c5198b11fe | 5,709 | py | Python | lib/train.py | SudeepSarkar/equilibrium-propagation | ba6d9ee5426445e9ad91c96c816fa5287ff97258 | [
"MIT"
] | 18 | 2020-01-07T11:25:45.000Z | 2022-01-24T18:25:13.000Z | lib/train.py | SudeepSarkar/equilibrium-propagation | ba6d9ee5426445e9ad91c96c816fa5287ff97258 | [
"MIT"
] | null | null | null | lib/train.py | SudeepSarkar/equilibrium-propagation | ba6d9ee5426445e9ad91c96c816fa5287ff97258 | [
"MIT"
] | 5 | 2020-06-26T23:37:22.000Z | 2021-09-04T12:22:49.000Z | # MIT License
# Copyright (c) 2020 Simon Schug, João Sacramento
# 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, ... | 38.574324 | 95 | 0.683833 |
cb2ebf4ea9fa51ded0a07116a761dc850691bc8f | 1,199 | py | Python | sudden_death/__init__.py | dev-hato/sudden-death | 89fb9827bc67f03822e279704ad6af24f47e8fb0 | [
"MIT"
] | null | null | null | sudden_death/__init__.py | dev-hato/sudden-death | 89fb9827bc67f03822e279704ad6af24f47e8fb0 | [
"MIT"
] | 127 | 2020-07-11T02:25:31.000Z | 2022-03-30T03:04:22.000Z | sudden_death/__init__.py | dev-hato/sudden-death | 89fb9827bc67f03822e279704ad6af24f47e8fb0 | [
"MIT"
] | null | null | null | """
_人人人人人人人_
> 鳩は唐揚げ <
 ̄^Y^Y^Y^Y^Y^Y^Y ̄
を作る
"""
import unicodedata
import click
import pyperclip
def text_len(text: str) -> int:
"""
一行の長さを出す
"""
count = 0
for character in text:
count += 2 if unicodedata.east_asian_width(character) in 'FWA' else 1
return count
def generator(msg:... | 16.652778 | 77 | 0.538782 |
b4e937386d47fd01e7f5c1d6f857ed3155f21153 | 7,926 | py | Python | aibg-ai/brainer_layers.py | BalderOdinson/ai-battleground-environment | b5a0a21ee90df113d34ab0f821ab9722007cc25c | [
"MIT"
] | null | null | null | aibg-ai/brainer_layers.py | BalderOdinson/ai-battleground-environment | b5a0a21ee90df113d34ab0f821ab9722007cc25c | [
"MIT"
] | 1 | 2021-09-02T07:58:16.000Z | 2021-09-02T07:58:16.000Z | aibg-ai/brainer_layers.py | BalderOdinson/ai-battleground-environment | b5a0a21ee90df113d34ab0f821ab9722007cc25c | [
"MIT"
] | null | null | null | import tensorflow as tf
from tensorflow.keras import layers, models, initializers
def identity_block(x, f, filters, stage, block):
"""
Implementation of the identity block as defined in Figure 3
Arguments:
x -- input tensor of shape (m, n_H_prev, n_W_prev, n_C_prev)
f -- integer, specifying the s... | 43.311475 | 114 | 0.633485 |
32eff85ea20f590ad0222dde4f598221822533c1 | 28,315 | py | Python | dcos_test_utils/dcos_api.py | Klarrio/dcos-test-utils | f45f0938582fc166354a96c80ead0ea716adf3f3 | [
"Apache-2.0"
] | 8 | 2018-02-01T20:32:18.000Z | 2020-01-23T17:02:16.000Z | dcos_test_utils/dcos_api.py | Klarrio/dcos-test-utils | f45f0938582fc166354a96c80ead0ea716adf3f3 | [
"Apache-2.0"
] | 52 | 2017-07-27T16:51:07.000Z | 2020-09-28T11:18:52.000Z | dcos_test_utils/dcos_api.py | Klarrio/dcos-test-utils | f45f0938582fc166354a96c80ead0ea716adf3f3 | [
"Apache-2.0"
] | 22 | 2017-07-21T16:07:03.000Z | 2022-03-01T13:43:56.000Z | """ Utilities for interacting with a DC/OS instance via REST API
Most DC/OS deployments will have auth enabled, so this module includes
DcosUser and DcosAuth to be attached to a DcosApiSession. Additionally,
it is sometimes necessary to query specific nodes within a DC/OS cluster,
so there is ARNodeApiClientMixin to a... | 41.155523 | 120 | 0.627689 |
b2fa86b24974f79c03e8b40da42d1bc2de292b02 | 4,258 | py | Python | PhotographyWebsite/settings.py | antonarnaudov/Django-Framework | ada16a0610c8a522c98fae6b6287ae2a3fa55c32 | [
"MIT"
] | null | null | null | PhotographyWebsite/settings.py | antonarnaudov/Django-Framework | ada16a0610c8a522c98fae6b6287ae2a3fa55c32 | [
"MIT"
] | null | null | null | PhotographyWebsite/settings.py | antonarnaudov/Django-Framework | ada16a0610c8a522c98fae6b6287ae2a3fa55c32 | [
"MIT"
] | null | null | null | """
Django settings for PhotographyWebsite project.
Generated by 'django-admin startproject' using Django 3.1.1.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
fr... | 26.949367 | 91 | 0.694223 |
e41e13eb35dd8eea5c791746108165dbd0767621 | 5,053 | py | Python | server/apps/staff/app_specific/shipping/forms.py | iotile/iotile_cloud | 9dc65ac86d3a730bba42108ed7d9bbb963d22ba6 | [
"MIT"
] | null | null | null | server/apps/staff/app_specific/shipping/forms.py | iotile/iotile_cloud | 9dc65ac86d3a730bba42108ed7d9bbb963d22ba6 | [
"MIT"
] | null | null | null | server/apps/staff/app_specific/shipping/forms.py | iotile/iotile_cloud | 9dc65ac86d3a730bba42108ed7d9bbb963d22ba6 | [
"MIT"
] | null | null | null |
from django import forms
from django.contrib.auth import get_user_model
from django.db.models import Q
from django.forms import ModelForm
from django.template.defaultfilters import slugify
from crispy_forms.bootstrap import FieldWithButtons
from crispy_forms.helper import FormHelper
from crispy_forms.layout import HT... | 35.584507 | 137 | 0.612903 |
92d44439aa8a23b8a9b65b42ccac7b949059113c | 1,796 | py | Python | deepthinking/data_analysis/get_names_and_info.py | aks2203/deep-thinking | 089fc5d04a0997ccdbad601b3e025f547a8b6327 | [
"MIT"
] | 19 | 2022-02-11T18:49:46.000Z | 2022-03-13T18:40:18.000Z | deepthinking/data_analysis/get_names_and_info.py | aks2203/deep-thinking | 089fc5d04a0997ccdbad601b3e025f547a8b6327 | [
"MIT"
] | null | null | null | deepthinking/data_analysis/get_names_and_info.py | aks2203/deep-thinking | 089fc5d04a0997ccdbad601b3e025f547a8b6327 | [
"MIT"
] | 1 | 2022-03-13T18:45:41.000Z | 2022-03-13T18:45:41.000Z | import argparse
import glob
import json
import os.path
from omegaconf import OmegaConf
from tabulate import tabulate
def get_trained_checkpoints(filepath, model_list, alpha_list):
checkpoints = []
num_checkpoints = 0
for f_name in glob.iglob(f"{filepath}/**/*training*/", recursive=True):
cfg_name... | 39.043478 | 78 | 0.603007 |
8d1f9b6aaba8701ba4f42867764172ddd58b525d | 910 | py | Python | vmfw.py | whs/OvzCP | 5c672f54f543dc07f234e86fd2b04b675511d362 | [
"Apache-1.1"
] | 1 | 2015-04-21T01:08:17.000Z | 2015-04-21T01:08:17.000Z | vmfw.py | whs/OvzCP | 5c672f54f543dc07f234e86fd2b04b675511d362 | [
"Apache-1.1"
] | null | null | null | vmfw.py | whs/OvzCP | 5c672f54f543dc07f234e86fd2b04b675511d362 | [
"Apache-1.1"
] | null | null | null | import os, sys, ConfigParser
sys.path.insert(0, os.path.join(os.getcwd(), "Jinja2-2.3-py2.5.egg"))
sys.path.append(os.path.join(os.getcwd(), "netifaces-0.5-py2.5-linux-i686.egg"))
import jinja2, netifaces
_config = ConfigParser.SafeConfigParser()
_config.read("config.ini")
# iptables forwarding configuration ... | 31.37931 | 95 | 0.705495 |
95c7cc728e98668cace3379e63b25a9f44e21641 | 6,683 | py | Python | nnuncert/models/_pred_base.py | pjoachims/nnuncert | 45dede54fdb714926926d719be2c9b9b542b2601 | [
"MIT"
] | 2 | 2021-12-30T06:25:43.000Z | 2022-01-25T00:41:22.000Z | nnuncert/models/_pred_base.py | pjoachims/nnuncert | 45dede54fdb714926926d719be2c9b9b542b2601 | [
"MIT"
] | 1 | 2022-01-25T00:35:28.000Z | 2022-03-28T15:23:16.000Z | nnuncert/models/_pred_base.py | pjoachims/nnuncert | 45dede54fdb714926926d719be2c9b9b542b2601 | [
"MIT"
] | null | null | null | from typing import Tuple, Union, Iterable, List, Callable, Dict, Optional
import numpy as np
import pandas as pd
import scipy.stats as spstats
import scipy.integrate as spint
import properscoring as ps
class MCPredictions(np.ndarray):
def __new__(cls, a):
obj = np.asarray(a).view(cls)
return obj
... | 29.702222 | 97 | 0.539279 |
cfc6ff72d9fea6e2b32e8799abd6d9b6ce3eb861 | 139 | py | Python | hypixelio/_async/__init__.py | FoxNerdSaysMoo/HypixelIO | aca8fd6535c0afb2bb733172db2dcbd68590118d | [
"MIT"
] | 16 | 2020-10-28T01:49:31.000Z | 2022-03-13T23:19:31.000Z | hypixelio/_async/__init__.py | FoxNerdSaysMoo/HypixelIO | aca8fd6535c0afb2bb733172db2dcbd68590118d | [
"MIT"
] | 20 | 2021-03-17T07:32:14.000Z | 2022-03-07T02:48:00.000Z | hypixelio/_async/__init__.py | FoxNerdSaysMoo/HypixelIO | aca8fd6535c0afb2bb733172db2dcbd68590118d | [
"MIT"
] | 5 | 2020-10-21T13:53:27.000Z | 2021-09-02T15:47:45.000Z | from .client import AsyncClient
from .converters import AsyncConverters
from .portal import Portal, create_portal
from .utils import Utils
| 27.8 | 41 | 0.841727 |
dc5c16898bcc2aa3acd5f05c841775192a499bd8 | 1,864 | py | Python | toontown/building/PetshopBuildingAI.py | CrankySupertoon01/Toontown-2 | 60893d104528a8e7eb4aced5d0015f22e203466d | [
"MIT"
] | 1 | 2021-02-13T22:40:50.000Z | 2021-02-13T22:40:50.000Z | toontown/building/PetshopBuildingAI.py | CrankySupertoonArchive/Toontown-2 | 60893d104528a8e7eb4aced5d0015f22e203466d | [
"MIT"
] | 1 | 2018-07-28T20:07:04.000Z | 2018-07-30T18:28:34.000Z | toontown/building/PetshopBuildingAI.py | CrankySupertoonArchive/Toontown-2 | 60893d104528a8e7eb4aced5d0015f22e203466d | [
"MIT"
] | 2 | 2019-12-02T01:39:10.000Z | 2021-02-13T22:41:00.000Z | from panda3d.core import *
from direct.directnotify import DirectNotifyGlobal
import DistributedDoorAI
import DistributedPetshopInteriorAI
import FADoorCodes
import DoorTypes
from toontown.toon import NPCToons
from toontown.toonbase import ToontownGlobals
from toontown.quest import Quests
from toontown.hood import Zone... | 34.518519 | 82 | 0.717275 |
06eaaeb542168b5c4435cd6b23a2046d6b2d1139 | 2,122 | py | Python | VizKG/charts/heatmap.py | espinraf/vizkg | b4461a556b69c34580b96922ccb9c0e5c237b34f | [
"MIT"
] | 12 | 2021-07-30T07:20:26.000Z | 2022-03-24T10:11:55.000Z | VizKG/charts/heatmap.py | espinraf/vizkg | b4461a556b69c34580b96922ccb9c0e5c237b34f | [
"MIT"
] | 4 | 2021-06-04T16:09:27.000Z | 2022-03-24T10:11:48.000Z | VizKG/charts/heatmap.py | espinraf/vizkg | b4461a556b69c34580b96922ccb9c0e5c237b34f | [
"MIT"
] | 2 | 2021-09-01T16:46:00.000Z | 2022-01-14T12:28:20.000Z | from .chart import Chart
import matplotlib.pyplot as plt
import seaborn as sns
class HeatMap(Chart):
def __init__(self, dataframe, kwargs):
"""
Constructs all the necessary attributes for the HeatMap object
Parameters:
dataframe (pandas.Dataframe): The dataframe
"""
... | 27.921053 | 105 | 0.558907 |
9801b5f124db72a16a9e4cf08d5888ad3af84442 | 1,486 | py | Python | lib/bes/unix/brew/brew.py | reconstruir/bes | 82ff54b2dadcaef6849d7de424787f1dedace85c | [
"Apache-2.0"
] | null | null | null | lib/bes/unix/brew/brew.py | reconstruir/bes | 82ff54b2dadcaef6849d7de424787f1dedace85c | [
"Apache-2.0"
] | null | null | null | lib/bes/unix/brew/brew.py | reconstruir/bes | 82ff54b2dadcaef6849d7de424787f1dedace85c | [
"Apache-2.0"
] | null | null | null | #-*- coding:utf-8; mode:python; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*-
import re
from bes.common.check import check
from bes.system.execute import execute
from bes.system.host import host
from bes.system.log import logger
from bes.system.which import which
from .brew_error import brew_error
clas... | 26.535714 | 90 | 0.671602 |
038516040b88797161563e3ee489da61681e498f | 17,560 | py | Python | models/recycle_gan_model.py | andrewk1/Recycle-GAN | 390d3b3c2492a27e38d9b3a0b69bb95865dda7ea | [
"MIT"
] | null | null | null | models/recycle_gan_model.py | andrewk1/Recycle-GAN | 390d3b3c2492a27e38d9b3a0b69bb95865dda7ea | [
"MIT"
] | null | null | null | models/recycle_gan_model.py | andrewk1/Recycle-GAN | 390d3b3c2492a27e38d9b3a0b69bb95865dda7ea | [
"MIT"
] | null | null | null | import numpy as np
import torch
import os
from collections import OrderedDict
from torch.autograd import Variable
import itertools
import util.util as util
from util.image_pool import ImagePool
from .base_model import BaseModel
from . import networks
import sys
class RecycleGANModel(BaseModel):
def name(self):
... | 41.611374 | 170 | 0.569989 |
b595abad2e706a3bc3c0b0e1dd5a442975add970 | 5,487 | py | Python | .venv/lib/python3.8/site-packages/sympy/polys/domains/polynomialring.py | RivtLib/replit01 | ce1ae18b446a9c844f40e88a51c71fbc45ab3ad7 | [
"MIT"
] | 603 | 2020-12-23T13:49:32.000Z | 2022-03-31T23:38:03.000Z | .venv/lib/python3.8/site-packages/sympy/polys/domains/polynomialring.py | RivtLib/replit01 | ce1ae18b446a9c844f40e88a51c71fbc45ab3ad7 | [
"MIT"
] | 387 | 2020-12-15T14:54:04.000Z | 2022-03-31T07:00:21.000Z | .venv/lib/python3.8/site-packages/sympy/polys/domains/polynomialring.py | RivtLib/replit01 | ce1ae18b446a9c844f40e88a51c71fbc45ab3ad7 | [
"MIT"
] | 35 | 2021-03-26T03:12:04.000Z | 2022-03-23T10:15:10.000Z | """Implementation of :class:`PolynomialRing` class. """
from sympy.polys.domains.ring import Ring
from sympy.polys.domains.compositedomain import CompositeDomain
from sympy.polys.polyerrors import CoercionFailed, GeneratorsError
from sympy.utilities import public
@public
class PolynomialRing(Ring, CompositeDomain):... | 30.653631 | 90 | 0.587753 |
1b7b0c47afe0e564f7530c99f8c18b8810938072 | 696 | py | Python | converter/converter/__init__.py | pcrane70/thinapp_factory | 5910839b29bf79e6565291bff51a555de0795176 | [
"Apache-2.0"
] | 26 | 2015-01-06T03:28:20.000Z | 2019-11-27T11:55:06.000Z | converter/converter/__init__.py | pcrane70/thinapp_factory | 5910839b29bf79e6565291bff51a555de0795176 | [
"Apache-2.0"
] | 1 | 2021-07-20T16:13:11.000Z | 2021-07-20T16:13:11.000Z | converter/converter/__init__.py | pcrane70/thinapp_factory | 5910839b29bf79e6565291bff51a555de0795176 | [
"Apache-2.0"
] | 15 | 2015-06-30T12:19:24.000Z | 2019-10-15T16:00:47.000Z | # VMware ThinApp Factory
# Copyright (c) 2009-2013 VMware, 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
#
# Unl... | 36.631579 | 74 | 0.771552 |
b2ab368d00c63579afc7ae254815e8b4d42e5489 | 4,251 | py | Python | kombu/tests/transport/test_filesystem.py | mikejohnsonjr/kombu | c32278f327b9fef2c18f42b6eea63703ea93c93f | [
"BSD-3-Clause"
] | 3 | 2016-07-29T16:38:29.000Z | 2021-01-14T21:07:39.000Z | kombu/tests/transport/test_filesystem.py | alanjds/kombu | 3b6aa9b4e5719314ddb6f8df705b1d556a298e66 | [
"BSD-3-Clause"
] | null | null | null | kombu/tests/transport/test_filesystem.py | alanjds/kombu | 3b6aa9b4e5719314ddb6f8df705b1d556a298e66 | [
"BSD-3-Clause"
] | 2 | 2019-05-09T03:17:21.000Z | 2020-03-11T08:02:19.000Z | from __future__ import absolute_import, unicode_literals
import tempfile
from kombu import Connection, Exchange, Queue, Consumer, Producer
from case.skip import SkipTest
from kombu.tests.case import Case, skip
@skip.if_win32()
class test_FilesystemTransport(Case):
def setup(self):
try:
dat... | 34.560976 | 75 | 0.569043 |
3eb75dff5e90b20ebe23fdac4284bc012576a827 | 3,496 | py | Python | test/functional/s3api/test_service.py | JMD110/swift | 58ddca8fa5ccb99447f7dcc0745cc619449a5513 | [
"Apache-2.0"
] | 1 | 2022-03-07T06:11:06.000Z | 2022-03-07T06:11:06.000Z | test/functional/s3api/test_service.py | JMD110/swift | 58ddca8fa5ccb99447f7dcc0745cc619449a5513 | [
"Apache-2.0"
] | null | null | null | test/functional/s3api/test_service.py | JMD110/swift | 58ddca8fa5ccb99447f7dcc0745cc619449a5513 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2015 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | 34.27451 | 75 | 0.687929 |
72c15a37ab0e20c6b5dfc3609fcb8f12c6c5a1cf | 2,586 | py | Python | output/python-flask/openapi_server/controllers/api_mnemonic_controller.py | tys-hiroshi/openapi3-codegen | c411878c4164799bb3f786b3b947cdcaeb810542 | [
"MIT"
] | null | null | null | output/python-flask/openapi_server/controllers/api_mnemonic_controller.py | tys-hiroshi/openapi3-codegen | c411878c4164799bb3f786b3b947cdcaeb810542 | [
"MIT"
] | null | null | null | output/python-flask/openapi_server/controllers/api_mnemonic_controller.py | tys-hiroshi/openapi3-codegen | c411878c4164799bb3f786b3b947cdcaeb810542 | [
"MIT"
] | 1 | 2020-08-06T06:21:36.000Z | 2020-08-06T06:21:36.000Z | import connexion
import six
from openapi_server.models.request_add_address_model import RequestAddAddressModel # noqa: E501
from openapi_server.models.request_mnemonic_model import RequestMnemonicModel # noqa: E501
from openapi_server.models.request_upload_text_model import RequestUploadTextModel # noqa: E501
from ... | 43.1 | 109 | 0.735112 |
06f74122050ea6061651be68b7219829f169ee44 | 54,326 | py | Python | python/pyspark/pandas/window.py | zhaox1n/spark | 1f150b9392706293946278dd35e8f5a5016ed6df | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2021-06-03T09:59:31.000Z | 2021-06-12T14:40:30.000Z | python/pyspark/pandas/window.py | zhaox1n/spark | 1f150b9392706293946278dd35e8f5a5016ed6df | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 26 | 2016-10-27T06:07:00.000Z | 2018-01-26T00:21:32.000Z | python/pyspark/pandas/window.py | zhaox1n/spark | 1f150b9392706293946278dd35e8f5a5016ed6df | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2020-11-04T17:36:17.000Z | 2021-04-16T15:57:07.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 30.727376 | 100 | 0.527758 |
d92d71692e0f7e170a038cd347f7ef6e9151cbb9 | 3,827 | py | Python | ucscentralsdk/mometa/fabric/FabricPooledVlan.py | ragupta-git/ucscentralsdk | 2678008b5fb6b0fafafec388d0874147e95a1086 | [
"Apache-2.0"
] | null | null | null | ucscentralsdk/mometa/fabric/FabricPooledVlan.py | ragupta-git/ucscentralsdk | 2678008b5fb6b0fafafec388d0874147e95a1086 | [
"Apache-2.0"
] | null | null | null | ucscentralsdk/mometa/fabric/FabricPooledVlan.py | ragupta-git/ucscentralsdk | 2678008b5fb6b0fafafec388d0874147e95a1086 | [
"Apache-2.0"
] | null | null | null | """This module contains the general information for FabricPooledVlan ManagedObject."""
from ...ucscentralmo import ManagedObject
from ...ucscentralcoremeta import UcsCentralVersion, MoPropertyMeta, MoMeta
from ...ucscentralmeta import VersionMeta
class FabricPooledVlanConsts():
CONS_CNT_ASSIGNED_TO_SINGLE = "ass... | 57.984848 | 264 | 0.652208 |
80382c45a02787bbdae23f63e7fe2ba18d9fb319 | 88 | py | Python | Python Pattern Programs/Alphabetic Patterns/Pattern 2 Alternative.py | trial1user/Printing-Pattern-Programs | dde29e056b8e067fb3a824edb7ecb7dd9c9a776a | [
"MIT"
] | null | null | null | Python Pattern Programs/Alphabetic Patterns/Pattern 2 Alternative.py | trial1user/Printing-Pattern-Programs | dde29e056b8e067fb3a824edb7ecb7dd9c9a776a | [
"MIT"
] | null | null | null | Python Pattern Programs/Alphabetic Patterns/Pattern 2 Alternative.py | trial1user/Printing-Pattern-Programs | dde29e056b8e067fb3a824edb7ecb7dd9c9a776a | [
"MIT"
] | null | null | null | #Alternative
for x in 'ABCDE':
for y in 'ABCDE':
print(y,end="")
print() | 17.6 | 23 | 0.534091 |
4a86fa4255e4f6058bdbadb7986c9b30c008f086 | 16,978 | py | Python | Geometry/HcalCommonData/python/testGeometry17aXML_cfi.py | eric-moreno/cmssw | 3dc2c26f276632ac8357ac7b52675f04649e3903 | [
"Apache-2.0"
] | null | null | null | Geometry/HcalCommonData/python/testGeometry17aXML_cfi.py | eric-moreno/cmssw | 3dc2c26f276632ac8357ac7b52675f04649e3903 | [
"Apache-2.0"
] | 7 | 2016-07-17T02:34:54.000Z | 2019-08-13T07:58:37.000Z | Geometry/HcalCommonData/python/testGeometry17aXML_cfi.py | eric-moreno/cmssw | 3dc2c26f276632ac8357ac7b52675f04649e3903 | [
"Apache-2.0"
] | 2 | 2019-09-27T08:33:22.000Z | 2019-11-14T10:52:30.000Z | import FWCore.ParameterSet.Config as cms
XMLIdealGeometryESSource = cms.ESSource("XMLIdealGeometryESSource",
geomXMLFiles = cms.vstring('Geometry/CMSCommonData/data/materials.xml',
'Geometry/CMSCommonData/data/rotations.xml',
'Geometry/CMSCommonData/data/extend/cmsextent.xml',
'Geometry/CMS... | 58.544828 | 88 | 0.72482 |
e7a78f2b8ee17762e3b0dc88b35c3e4724709ba3 | 123 | py | Python | udemy_pythonparatodos/mysql_connector.py | soamazyng/cursos-python | 1a9d428597eca10bf0a0c9656625f2d36f67097f | [
"MIT"
] | null | null | null | udemy_pythonparatodos/mysql_connector.py | soamazyng/cursos-python | 1a9d428597eca10bf0a0c9656625f2d36f67097f | [
"MIT"
] | null | null | null | udemy_pythonparatodos/mysql_connector.py | soamazyng/cursos-python | 1a9d428597eca10bf0a0c9656625f2d36f67097f | [
"MIT"
] | null | null | null | import mysql.connector
conexao = mysql.connector.connect(user='root', password='', host='', database='')
conexao.close()
| 20.5 | 81 | 0.715447 |
1c0b1c9931c61e187a68163d88e3dc650f1f14a5 | 7,939 | py | Python | satstac/sentinel/main.py | samsammurphy/sat-stac-sentinel | 2ffbcc8e47cec32809e9661995c6e157b034fb26 | [
"MIT"
] | 1 | 2020-03-02T09:43:32.000Z | 2020-03-02T09:43:32.000Z | satstac/sentinel/main.py | samsammurphy/sat-stac-sentinel | 2ffbcc8e47cec32809e9661995c6e157b034fb26 | [
"MIT"
] | null | null | null | satstac/sentinel/main.py | samsammurphy/sat-stac-sentinel | 2ffbcc8e47cec32809e9661995c6e157b034fb26 | [
"MIT"
] | null | null | null | import boto3
import gzip
import json
import logging
import requests
import sys
import numpy as np
import os.path as op
from shapely.geometry import MultiPoint, Point
from shapely import geometry
from datetime import datetime, timedelta
from dateutil.parser import parse
from pyproj import Proj, transform as reproj
fr... | 36.75463 | 115 | 0.577655 |
b5e6638d2411b9a3e2c298a92f87035f0062c35a | 44,203 | py | Python | nova/virt/libvirt/config.py | osrg/nova | 14b6bc655145c832bd9c822e48f877818e0e53ff | [
"Apache-2.0"
] | null | null | null | nova/virt/libvirt/config.py | osrg/nova | 14b6bc655145c832bd9c822e48f877818e0e53ff | [
"Apache-2.0"
] | null | null | null | nova/virt/libvirt/config.py | osrg/nova | 14b6bc655145c832bd9c822e48f877818e0e53ff | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (C) 2012-2013 Red Hat, 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/LICENS... | 33.43646 | 79 | 0.56797 |
903a0da7895ef46825f1f32f4100e45659bf6738 | 457 | py | Python | EIDEGraphics/EIDEsYSTEM.py | Vicente-Francisco/EIDEGraphics | 8e61bf64f4644a2e80df00946271f8cba4b5e65e | [
"Unlicense"
] | 2 | 2022-02-09T08:06:13.000Z | 2022-03-18T07:30:19.000Z | EIDEGraphics/EIDEsYSTEM.py | Vicente-Francisco/EIDEGraphics | 8e61bf64f4644a2e80df00946271f8cba4b5e65e | [
"Unlicense"
] | null | null | null | EIDEGraphics/EIDEsYSTEM.py | Vicente-Francisco/EIDEGraphics | 8e61bf64f4644a2e80df00946271f8cba4b5e65e | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
"""
"""
class triad1(object):
"""
"""
validCorners = ['TL', 'TR', 'BR', 'BL']
def __init__(self, deltaX, deltaY, corner):
self.deltaX = int(deltaX)
self.deltaY = int(deltaY)
self.corner = corner
def test(self, deltaX, deltaY, corner):
... | 17.576923 | 47 | 0.512035 |
52c59b3ecf45b0abb91f1d1c17cf5c8529693b1c | 1,051 | py | Python | app/core/migrations/0005_recipe.py | redwanc12/Timeline-REST-API | b57ea5c35211238187d2306965f314b18316f2f8 | [
"MIT"
] | 1 | 2019-05-04T10:24:18.000Z | 2019-05-04T10:24:18.000Z | app/core/migrations/0005_recipe.py | redwanc12/recipe-app-api | b57ea5c35211238187d2306965f314b18316f2f8 | [
"MIT"
] | null | null | null | app/core/migrations/0005_recipe.py | redwanc12/recipe-app-api | b57ea5c35211238187d2306965f314b18316f2f8 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.7 on 2019-03-09 04:22
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0004_auto_20190309_0230'),
]
operations = [
migrations.CreateModel... | 36.241379 | 118 | 0.607041 |
60f756aa1c26fb029f999a31c3d13deb278f487d | 35,956 | py | Python | common/utils.py | noanabeshima/seed_rl | 4bf7a4f7a9a7babfb961169b7484f7694ea6c5aa | [
"Apache-2.0"
] | null | null | null | common/utils.py | noanabeshima/seed_rl | 4bf7a4f7a9a7babfb961169b7484f7694ea6c5aa | [
"Apache-2.0"
] | null | null | null | common/utils.py | noanabeshima/seed_rl | 4bf7a4f7a9a7babfb961169b7484f7694ea6c5aa | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2019 The SEED 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 law or agre... | 36.429585 | 80 | 0.686812 |
aa527cd77c1e0e1b4125145fedc35e41e3118179 | 2,307 | py | Python | data/test/datasets/json_dataset.py | qrsforever/torchcv | e2e17f730497fb838237357a1df4bf6ca278f107 | [
"Apache-2.0"
] | 171 | 2019-01-23T12:51:47.000Z | 2019-04-15T03:57:09.000Z | data/test/datasets/json_dataset.py | qrsforever/torchcv | e2e17f730497fb838237357a1df4bf6ca278f107 | [
"Apache-2.0"
] | 6 | 2019-02-14T11:28:35.000Z | 2019-04-15T04:05:47.000Z | data/test/datasets/json_dataset.py | qrsforever/torchcv | e2e17f730497fb838237357a1df4bf6ca278f107 | [
"Apache-2.0"
] | 36 | 2019-01-23T12:51:55.000Z | 2019-04-11T13:50:48.000Z | #!/usr/bin/env python
# -*- coding:utf-8 -*-
# Author: Donny You(youansheng@gmail.com)
# Single Shot Detector data loader
import os
import torch.utils.data as data
from lib.parallel.data_container import DataContainer
from lib.tools.helper.json_helper import JsonHelper
from lib.tools.helper.image_helper import Image... | 35.492308 | 109 | 0.637625 |
769f3c97a2e4244dae9f9a05065e3838fb2b889b | 843 | py | Python | examples/runners/dodo.py | agrantdeakin/surround | bc6f87bb570d93f362ab01647df197af7e549522 | [
"BSD-3-Clause"
] | 1 | 2019-11-18T00:12:48.000Z | 2019-11-18T00:12:48.000Z | examples/runners/dodo.py | agrantdeakin/surround | bc6f87bb570d93f362ab01647df197af7e549522 | [
"BSD-3-Clause"
] | null | null | null | examples/runners/dodo.py | agrantdeakin/surround | bc6f87bb570d93f362ab01647df197af7e549522 | [
"BSD-3-Clause"
] | null | null | null | import os
from surround import Config
CONFIG = Config(os.path.dirname(__file__))
DOIT_CONFIG = {'verbosity':2}
IMAGE = "%s/%s:%s" % (CONFIG["company"], CONFIG["image"], CONFIG["version"])
def task_build():
"""Build the Docker image for the current project"""
return {
'actions': ['docker build --tag=%s... | 26.34375 | 88 | 0.59312 |
51541b70d45cdb3b4ea7e3ede30c27358bad3705 | 4,277 | py | Python | nilearn/reporting/_plot_matrices.py | jnecus/nilearn | e929256b8b0ad9f92a221499d217506b816ec28e | [
"BSD-2-Clause"
] | null | null | null | nilearn/reporting/_plot_matrices.py | jnecus/nilearn | e929256b8b0ad9f92a221499d217506b816ec28e | [
"BSD-2-Clause"
] | null | null | null | nilearn/reporting/_plot_matrices.py | jnecus/nilearn | e929256b8b0ad9f92a221499d217506b816ec28e | [
"BSD-2-Clause"
] | null | null | null | """
This module implements plotting functions useful to report analysis results.
Author: Martin Perez-Guevara, Elvis Dohmatob, 2017
"""
import numpy as np
import matplotlib.pyplot as plt
from nilearn.stats.first_level_model import check_design_matrix
from nilearn.stats.contrasts import expression_to_contrast_vector
... | 31.448529 | 79 | 0.655834 |
f71fd8ed4a60f1f0cb0713800b0c028bb7bc4489 | 16,140 | py | Python | desktop/core/ext-py/pysaml2-4.4.0/src/saml2/cert.py | kokosing/hue | 2307f5379a35aae9be871e836432e6f45138b3d9 | [
"Apache-2.0"
] | 3 | 2018-01-29T14:16:02.000Z | 2019-02-05T21:33:05.000Z | desktop/core/ext-py/pysaml2-4.4.0/src/saml2/cert.py | zks888/hue | 93a8c370713e70b216c428caa2f75185ef809deb | [
"Apache-2.0"
] | 4 | 2021-03-11T04:02:00.000Z | 2022-03-27T08:31:56.000Z | desktop/core/ext-py/pysaml2-4.4.0/src/saml2/cert.py | zks888/hue | 93a8c370713e70b216c428caa2f75185ef809deb | [
"Apache-2.0"
] | 2 | 2019-06-17T11:51:56.000Z | 2020-07-25T08:29:56.000Z | __author__ = 'haho0032'
import base64
import datetime
import dateutil.parser
import pytz
import six
from OpenSSL import crypto
from os.path import join
from os import remove
from Cryptodome.Util import asn1
class WrongInput(Exception):
pass
class CertificateError(Exception):
pass
class PayloadError(Except... | 43.621622 | 98 | 0.495291 |
3b87b2f9148e22e9cba24571e05cf4172e0febab | 2,162 | py | Python | app/config.py | lvyaoo/api-demo | f45c05c154385510572b5200b74dcbbfdb7e234c | [
"MIT"
] | null | null | null | app/config.py | lvyaoo/api-demo | f45c05c154385510572b5200b74dcbbfdb7e234c | [
"MIT"
] | null | null | null | app/config.py | lvyaoo/api-demo | f45c05c154385510572b5200b74dcbbfdb7e234c | [
"MIT"
] | null | null | null | import logging
from logging.handlers import RotatingFileHandler
from os import getenv
from flask import Flask
from .hooks import before_app_request, teardown_app_request
from .misc import CustomJSONEncoder
from .blueprints.admin_api import bp_admin_api
from .blueprints.admin_ext import bp_admin_ext
class _Config:
... | 28.447368 | 114 | 0.671138 |
d675dd878323cd1155c2451d6f3a3c7dc8adcacb | 2,810 | py | Python | source/aws/services/sts.py | a-j-b-uk/aws-control-tower-customizations | 8b75f6408dc9c3a1a26ad5456676cae4185e4d22 | [
"Apache-2.0"
] | 1 | 2020-06-24T13:40:44.000Z | 2020-06-24T13:40:44.000Z | source/aws/services/sts.py | a-j-b-uk/aws-control-tower-customizations | 8b75f6408dc9c3a1a26ad5456676cae4185e4d22 | [
"Apache-2.0"
] | null | null | null | source/aws/services/sts.py | a-j-b-uk/aws-control-tower-customizations | 8b75f6408dc9c3a1a26ad5456676cae4185e4d22 | [
"Apache-2.0"
] | null | null | null | ###############################################################################
# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# #
# Licensed under the Apache License, Version 2.0 (the "License"). #
... | 39.577465 | 79 | 0.529181 |
3521ce3e541160b7a0738f5f3c1d166d8da4c82d | 2,489 | py | Python | src/hostedkafka/confluent_compute_statistics.py | wadkars/python_streaming_utils | eef2c43b65feb075c3753d21b96bcac4ab12a1a7 | [
"Apache-2.0"
] | null | null | null | src/hostedkafka/confluent_compute_statistics.py | wadkars/python_streaming_utils | eef2c43b65feb075c3753d21b96bcac4ab12a1a7 | [
"Apache-2.0"
] | null | null | null | src/hostedkafka/confluent_compute_statistics.py | wadkars/python_streaming_utils | eef2c43b65feb075c3753d21b96bcac4ab12a1a7 | [
"Apache-2.0"
] | 1 | 2021-02-04T20:30:47.000Z | 2021-02-04T20:30:47.000Z | import sys
from json import loads
from confluent_kafka import Consumer
from confluent_kafka.cimpl import KafkaError, KafkaException
from confluent_kafka import TopicPartition
import datetime
import statistics
user = '<USER_NAME>'
pwd = '<PWD>'
bsts = 'pkc-4kgmg.us-west-2.aws.confluent.cloud:9092'
t = <TOPIC_NAME>
con... | 31.506329 | 91 | 0.548011 |
08432c14c76b56f6947a8c253f076a37c8e28cf3 | 920 | py | Python | california_house.py | KyleXus/Advanced-Programming | f00bb2882f7c39c98b9616de36ed681339cd29ac | [
"Unlicense"
] | null | null | null | california_house.py | KyleXus/Advanced-Programming | f00bb2882f7c39c98b9616de36ed681339cd29ac | [
"Unlicense"
] | null | null | null | california_house.py | KyleXus/Advanced-Programming | f00bb2882f7c39c98b9616de36ed681339cd29ac | [
"Unlicense"
] | null | null | null | import sqlite3
from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html')
@app.route('/test')
def test():
# open the connection to the database
conn = sqlite3.connect('california_house_data.db')
conn.row_factory = sqlite3.Row
c... | 28.75 | 65 | 0.696739 |
4364e37969cda11b9d33590505efd86afb32febd | 1,831 | py | Python | python/exampleForm.py | wbrown-web/wdv495 | 546592a2dc8ac82296747e31f6406021c03c377c | [
"MIT"
] | null | null | null | python/exampleForm.py | wbrown-web/wdv495 | 546592a2dc8ac82296747e31f6406021c03c377c | [
"MIT"
] | null | null | null | python/exampleForm.py | wbrown-web/wdv495 | 546592a2dc8ac82296747e31f6406021c03c377c | [
"MIT"
] | null | null | null | #!/usr/local/python-3.5
# # Import modules for CGI handling
# import cgi, cgitb
# # Create instance of FieldStorage
# form = cgi.FieldStorage()
# # Get data from fields
# firstname = form.getvalue('firstname')
# lastname = form.getvalue('lastname')
# school = form.getvalue('school')
print("content-type: text/... | 44.658537 | 228 | 0.682141 |
fa359631c2556091322c9b1ad4d84937ce25b728 | 7,664 | py | Python | core/management/commands/_base.py | klebed/esdc-ce | 2c9e4591f344247d345a83880ba86777bb794460 | [
"Apache-2.0"
] | 97 | 2016-11-15T14:44:23.000Z | 2022-03-13T18:09:15.000Z | core/management/commands/_base.py | klebed/esdc-ce | 2c9e4591f344247d345a83880ba86777bb794460 | [
"Apache-2.0"
] | 334 | 2016-11-17T19:56:57.000Z | 2022-03-18T10:45:53.000Z | core/management/commands/_base.py | klebed/esdc-ce | 2c9e4591f344247d345a83880ba86777bb794460 | [
"Apache-2.0"
] | 33 | 2017-01-02T16:04:13.000Z | 2022-02-07T19:20:24.000Z | from __future__ import absolute_import
from __future__ import print_function
import os
import getpass
from optparse import Option
from subprocess import Popen, PIPE, STDOUT
from contextlib import contextmanager
from django.core.management.base import BaseCommand, CommandError
from django.core.management import call_... | 33.467249 | 112 | 0.609603 |
1b71035800ba386ce48d66fa4055fc9084b8d405 | 6,194 | py | Python | plugin.video.SportsDevil/lib/common.py | akuala/REPO.KUALA | ea9a157025530d2ce8fa0d88431c46c5352e89d4 | [
"Apache-2.0"
] | 2 | 2018-11-02T19:55:30.000Z | 2020-08-14T02:22:20.000Z | plugin.video.SportsDevil/lib/common.py | akuala/REPO.KUALA | ea9a157025530d2ce8fa0d88431c46c5352e89d4 | [
"Apache-2.0"
] | null | null | null | plugin.video.SportsDevil/lib/common.py | akuala/REPO.KUALA | ea9a157025530d2ce8fa0d88431c46c5352e89d4 | [
"Apache-2.0"
] | 3 | 2019-12-17T20:47:00.000Z | 2021-02-11T19:03:59.000Z | # -*- coding: utf-8 -*-
import os, json
#------------------------------------------------------------------------------
# xbmc related
#------------------------------------------------------------------------------
import xbmc, xbmcaddon
__settings__ = xbmcaddon.Addon(id='plugin.video.SportsDevil')
__icon__ = xbmca... | 33.481081 | 104 | 0.602841 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.