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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f89e0741589055cfde1480a6d81582db17132bb7 | 1,348 | py | Python | setup.py | basilfx/lpc_checksum | ab2c6ae5acdc22ba06e7bd8f487a7d78953aafdc | [
"MIT"
] | 9 | 2016-05-03T20:18:24.000Z | 2021-01-23T00:32:54.000Z | setup.py | basilfx/lpc_checksum | ab2c6ae5acdc22ba06e7bd8f487a7d78953aafdc | [
"MIT"
] | 3 | 2018-08-08T22:38:26.000Z | 2020-09-18T15:36:42.000Z | setup.py | basilfx/lpc_checksum | ab2c6ae5acdc22ba06e7bd8f487a7d78953aafdc | [
"MIT"
] | 3 | 2017-10-22T09:24:11.000Z | 2020-09-15T14:19:59.000Z | from setuptools import setup
# Setup definitions.
setup(
name="lpc_checksum",
version="2.2.0",
description="Python script to calculate LPC firmware checksums",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
author="Bas Stottelaar",
author_email="ba... | 32.095238 | 68 | 0.614243 |
470f5bf03a070921fb147cc0e39a3a04018292ce | 2,877 | py | Python | embeddingapi/embedding-api-ios-tests/embeddingapi/xwalkview.py | jiajiax/crosswalk-test-suite | 7606ec383f9c240248cbea071b642691fbffb32f | [
"BSD-3-Clause"
] | null | null | null | embeddingapi/embedding-api-ios-tests/embeddingapi/xwalkview.py | jiajiax/crosswalk-test-suite | 7606ec383f9c240248cbea071b642691fbffb32f | [
"BSD-3-Clause"
] | null | null | null | embeddingapi/embedding-api-ios-tests/embeddingapi/xwalkview.py | jiajiax/crosswalk-test-suite | 7606ec383f9c240248cbea071b642691fbffb32f | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) 2015 Intel Corporation.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of works must retain the original copyright notice, this
# list of conditions and t... | 36.417722 | 124 | 0.675009 |
f331dea865fec8d267633b0f5d4d53c16768b0f5 | 13,543 | py | Python | blocks/monitoring/evaluators.py | Pabrousseau/MILA-UdeM-Blocks | 0e4e2a6a5cfc0345e705cf5721e77a878a97fd83 | [
"BSD-3-Clause"
] | 1 | 2021-01-28T08:32:36.000Z | 2021-01-28T08:32:36.000Z | blocks/monitoring/evaluators.py | loveisbasa/blocks | 7f380deec8f810b390880e6a4de836115e6e478d | [
"BSD-3-Clause"
] | null | null | null | blocks/monitoring/evaluators.py | loveisbasa/blocks | 7f380deec8f810b390880e6a4de836115e6e478d | [
"BSD-3-Clause"
] | null | null | null | from collections import OrderedDict, Counter
import logging
from picklable_itertools.extras import equizip
import theano
from theano import tensor
from blocks.utils import dict_subset
from blocks.monitoring.aggregation import (_DataIndependent, Mean,
TakeLast, MonitoredQuant... | 39.369186 | 78 | 0.635753 |
0480551827f056e712d9fbf519595e3b163fc141 | 1,967 | py | Python | test/test_boot_precision_policy_all_of.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 21 | 2018-03-29T14:20:35.000Z | 2021-10-13T05:11:41.000Z | test/test_boot_precision_policy_all_of.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 14 | 2018-01-30T15:45:46.000Z | 2022-02-23T14:23:21.000Z | test/test_boot_precision_policy_all_of.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 18 | 2018-01-03T15:09:56.000Z | 2021-07-16T02:21:54.000Z | # coding: utf-8
"""
Cisco Intersight
Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environmen... | 51.763158 | 1,052 | 0.785968 |
c6a6b24c5a6de9cfa1f63e7808a60d9669a62417 | 28,182 | py | Python | python/pyspark/rdd.py | jerryshao/spark | 31ec72b243459e0d1d9c89033328e1d79f3aa76f | [
"Apache-2.0"
] | 1 | 2017-11-01T00:36:12.000Z | 2017-11-01T00:36:12.000Z | python/pyspark/rdd.py | jerryshao/spark | 31ec72b243459e0d1d9c89033328e1d79f3aa76f | [
"Apache-2.0"
] | null | null | null | python/pyspark/rdd.py | jerryshao/spark | 31ec72b243459e0d1d9c89033328e1d79f3aa76f | [
"Apache-2.0"
] | null | null | null | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 36.130769 | 87 | 0.579129 |
246ebd6225a62360ecbaf9a49d753809bd872aa8 | 16,075 | py | Python | LocusPocus/LocusPocus/hymbase.py | vpbrendel/AEGeAn | 4b00f0a6aab36a9ab6ea6a62f53c110053aaf96c | [
"0BSD"
] | 21 | 2016-05-19T18:14:41.000Z | 2021-12-21T21:42:33.000Z | LocusPocus/LocusPocus/hymbase.py | BrendelGroup/AEGeAn | 4d59d2f268cf67d1296dd3eea52cf76d7a23c465 | [
"0BSD"
] | 59 | 2016-01-27T20:46:06.000Z | 2021-01-04T14:51:16.000Z | LocusPocus/LocusPocus/hymbase.py | vpbrendel/AEGeAn | 4b00f0a6aab36a9ab6ea6a62f53c110053aaf96c | [
"0BSD"
] | 10 | 2016-01-27T20:41:32.000Z | 2020-01-28T22:45:42.000Z | #!/usr/bin/env python
#
# -----------------------------------------------------------------------------
# Copyright (c) 2017 Regents of the University of California.
#
# This file is part of AEGeAn (http://github.com/BrendelGroup/AEGeAn) and is
# licensed under the ISC license: see LICENSE.
# ------------------------... | 42.526455 | 79 | 0.599813 |
daf6de30e0c80ddb97859a4ba140338f5961fb65 | 734 | py | Python | p421m/find_maximum_xor.py | l33tdaima/l33tdaima | 0a7a9573dc6b79e22dcb54357493ebaaf5e0aa90 | [
"MIT"
] | 1 | 2020-02-20T12:04:46.000Z | 2020-02-20T12:04:46.000Z | p421m/find_maximum_xor.py | l33tdaima/l33tdaima | 0a7a9573dc6b79e22dcb54357493ebaaf5e0aa90 | [
"MIT"
] | null | null | null | p421m/find_maximum_xor.py | l33tdaima/l33tdaima | 0a7a9573dc6b79e22dcb54357493ebaaf5e0aa90 | [
"MIT"
] | null | null | null | from typing import List
class Solution:
def findMaximumXOR(self, nums: List[int]) -> int:
ans, mask = 0, 0
for i in range(32)[::-1]:
mask = mask | (1 << i)
prefix_set = {n & mask for n in nums}
exp = ans | (1 << i)
if any(x ^ exp in prefix_set for x ... | 25.310345 | 66 | 0.498638 |
9c93cffa79e979bd3624f04d51f3642ac03e21b2 | 80 | py | Python | MDSMKV/main.py | ErwanKESSLER/RS232-MDS-MKV-Alec.Co | 5700a7e8089f048ddcba738dd95ef3fe46d70f93 | [
"MIT"
] | null | null | null | MDSMKV/main.py | ErwanKESSLER/RS232-MDS-MKV-Alec.Co | 5700a7e8089f048ddcba738dd95ef3fe46d70f93 | [
"MIT"
] | null | null | null | MDSMKV/main.py | ErwanKESSLER/RS232-MDS-MKV-Alec.Co | 5700a7e8089f048ddcba738dd95ef3fe46d70f93 | [
"MIT"
] | null | null | null | from gui import ShowMainWindow
if __name__ == '__main__':
ShowMainWindow()
| 16 | 30 | 0.7375 |
5c68c96b298f2d6284d52b5f03d7b7af13cd7511 | 86 | py | Python | Python/#2557 Hello World.py | blueLibertas/BOJ | 63dcf1a464818edbffbd0b5ca1026279f7530808 | [
"BSD-3-Clause"
] | null | null | null | Python/#2557 Hello World.py | blueLibertas/BOJ | 63dcf1a464818edbffbd0b5ca1026279f7530808 | [
"BSD-3-Clause"
] | null | null | null | Python/#2557 Hello World.py | blueLibertas/BOJ | 63dcf1a464818edbffbd0b5ca1026279f7530808 | [
"BSD-3-Clause"
] | null | null | null | # 문제 출처: https://www.acmicpc.net/problem/2557
# 풀이: 2021.01.15
print("Hello World!")
| 17.2 | 45 | 0.674419 |
4ea0ff9a8bb6aa4be710520a8977060f583749b1 | 6,345 | py | Python | alameda_api/v1alpha1/datahub/applications/applications_pb2.py | YungTsun/api | 26fdeebdb1f757ca005351df8a7616b8e47790fe | [
"Apache-2.0"
] | null | null | null | alameda_api/v1alpha1/datahub/applications/applications_pb2.py | YungTsun/api | 26fdeebdb1f757ca005351df8a7616b8e47790fe | [
"Apache-2.0"
] | null | null | null | alameda_api/v1alpha1/datahub/applications/applications_pb2.py | YungTsun/api | 26fdeebdb1f757ca005351df8a7616b8e47790fe | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: alameda_api/v1alpha1/datahub/applications/applications.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf impo... | 48.068182 | 882 | 0.810717 |
8136a5104dd78b5da191f630007519c0defee645 | 2,555 | py | Python | Systems.py | jpinsonault/creature_sim | 8b61f917f8506b1bd174019a18eab9a92e2f0f48 | [
"MIT"
] | null | null | null | Systems.py | jpinsonault/creature_sim | 8b61f917f8506b1bd174019a18eab9a92e2f0f48 | [
"MIT"
] | null | null | null | Systems.py | jpinsonault/creature_sim | 8b61f917f8506b1bd174019a18eab9a92e2f0f48 | [
"MIT"
] | null | null | null | from ebs import Applicator
from ebs import System
from Components import PolygonShape
from Components import Position
from Components import Orientation
from Components import Color
from Components import MoveSpeed
from Components import TurnSpeed
from Components import Health
from Components import FoodSeen
from Compo... | 34.066667 | 107 | 0.606262 |
495f426c8406abdb784864e7d86c8c89d630763d | 1,955 | py | Python | insights/tests/test_vulnerable_kernel.py | mglantz/insights-core | 6f20bbbe03f53ee786f483b2a28d256ff1ad0fd4 | [
"Apache-2.0"
] | 1 | 2020-02-19T06:36:22.000Z | 2020-02-19T06:36:22.000Z | insights/tests/test_vulnerable_kernel.py | mglantz/insights-core | 6f20bbbe03f53ee786f483b2a28d256ff1ad0fd4 | [
"Apache-2.0"
] | 10 | 2018-04-16T15:38:04.000Z | 2018-05-15T18:43:02.000Z | insights/tests/test_vulnerable_kernel.py | mglantz/insights-core | 6f20bbbe03f53ee786f483b2a28d256ff1ad0fd4 | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
from insights.parsers.uname import Uname
from insights.core.plugins import make_response
from insights.tests import context_wrap, InputData, run_test
from insights.specs import Specs
from insights.plugins import vulnerable_kernel
ERROR_KEY = 'VULNERABLE_KERNEL'
UNAME_TEMPLATE = ... | 29.179104 | 104 | 0.663939 |
bbb12ae9f8ac8f171e0bb31b0f24656fcedd3f92 | 4,748 | py | Python | wlm/management/commands/updateallphotos.py | wikimedia-ru/wikilovesmonuments.ru | 5a144fd15b9d0420ce86f09abeca3391215abca6 | [
"Unlicense",
"MIT"
] | null | null | null | wlm/management/commands/updateallphotos.py | wikimedia-ru/wikilovesmonuments.ru | 5a144fd15b9d0420ce86f09abeca3391215abca6 | [
"Unlicense",
"MIT"
] | null | null | null | wlm/management/commands/updateallphotos.py | wikimedia-ru/wikilovesmonuments.ru | 5a144fd15b9d0420ce86f09abeca3391215abca6 | [
"Unlicense",
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
import urllib
import json
import re
from datetime import datetime
from dateutil.parser import parse
from django.core.management.base import BaseCommand, CommandError
from django.core.exceptions import ObjectDoesNotExist
from wlm.models import Monument, MonumentPhoto
class Command(BaseComma... | 36.244275 | 106 | 0.473463 |
ad8f0ee3aa369b929f3117f0bd6d5fcfe7244c7d | 6,548 | py | Python | src/stars/tests/tests/gui_tests/test_gui.py | kevintmcdonnell/stars | ce0df570c546a8490ef4f9ceeb84c8e1132b2791 | [
"MIT"
] | 9 | 2020-11-05T21:26:09.000Z | 2022-03-04T15:24:40.000Z | src/stars/tests/tests/gui_tests/test_gui.py | kevintmcdonnell/stars | ce0df570c546a8490ef4f9ceeb84c8e1132b2791 | [
"MIT"
] | 7 | 2020-11-06T15:59:40.000Z | 2021-08-31T16:36:43.000Z | src/stars/tests/tests/gui_tests/test_gui.py | kevintmcdonnell/stars | ce0df570c546a8490ef4f9ceeb84c8e1132b2791 | [
"MIT"
] | 1 | 2021-07-13T21:55:02.000Z | 2021-07-13T21:55:02.000Z | import sys
import unittest
from PySide2.QtCore import Qt
from PySide2.QtTest import QTest
from PySide2.QtWidgets import *
from gui.mainwindow import MainWindow
from gui.textedit import TextEdit
from constants import *
from threading import Thread
app = QApplication(sys.argv)
class GuiTest(unittest.TestCase):
def... | 31.63285 | 119 | 0.623091 |
a0ba31a529ce14bb97e7acf67982e105c4c1b2c0 | 8,263 | py | Python | buildscripts/resmokelib/testing/fixtures/replicaset.py | ibm-linux-on-z/mongo | 4d6a2ca26b54958b90aa05801891e8f70f1040a3 | [
"Apache-2.0"
] | 3 | 2015-10-20T18:40:10.000Z | 2016-01-12T00:32:45.000Z | buildscripts/resmokelib/testing/fixtures/replicaset.py | ibm-linux-on-z/mongo | 4d6a2ca26b54958b90aa05801891e8f70f1040a3 | [
"Apache-2.0"
] | null | null | null | buildscripts/resmokelib/testing/fixtures/replicaset.py | ibm-linux-on-z/mongo | 4d6a2ca26b54958b90aa05801891e8f70f1040a3 | [
"Apache-2.0"
] | null | null | null | """
Replica set fixture for executing JSTests against.
"""
from __future__ import absolute_import
import os.path
import time
import pymongo
from . import interface
from . import standalone
from ... import config
from ... import logging
from ... import utils
class ReplicaSetFixture(interface.ReplFixture):
"""
... | 39.725962 | 100 | 0.604744 |
85995cfaf78d7031ff57f300ef7167f75e66b095 | 24,169 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_08_01/operations/_network_profiles_operations.py | praveenkuttappan/azure-sdk-for-python | 4b79413667b7539750a6c7dde15737013a3d4bd5 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_08_01/operations/_network_profiles_operations.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_08_01/operations/_network_profiles_operations.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.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 may ... | 48.43487 | 190 | 0.662046 |
f5af5c8507f001bec9c2008af887b4906d35f38e | 2,482 | py | Python | tests/shakemap/coremods/kml_test.py | uofuseismo/shakemap | 3c0d2d0e84c642491946c8819c71644d3b24d4de | [
"CC0-1.0"
] | 98 | 2016-05-02T11:00:10.000Z | 2022-03-18T02:05:58.000Z | tests/shakemap/coremods/kml_test.py | oylb126/shakemap | cbad8622bd520e1936447620edfb3a4feea1a8d9 | [
"CC0-1.0"
] | 939 | 2016-07-19T23:10:02.000Z | 2022-03-26T13:49:13.000Z | tests/shakemap/coremods/kml_test.py | oylb126/shakemap | cbad8622bd520e1936447620edfb3a4feea1a8d9 | [
"CC0-1.0"
] | 52 | 2016-01-25T17:16:01.000Z | 2022-02-17T00:58:01.000Z | #!/usr/bin/env python
import os.path
import tempfile
import shutil
import zipfile
import logging
from xml.dom import minidom
from shakemap.coremods.base import Contents
from shakemap.utils.config import (get_config_paths)
from shakemap.coremods.kml import (create_kmz)
from impactutils.io.smcontainers import ShakeMapO... | 37.606061 | 73 | 0.576551 |
8b3d383e07a1e157bbe70cdac12100065f3471f5 | 4,549 | py | Python | test_project/test_project/settings.py | neonua/django-maven | c8d89a4cb935faf8d31ac1784772d5c151e51319 | [
"ISC"
] | null | null | null | test_project/test_project/settings.py | neonua/django-maven | c8d89a4cb935faf8d31ac1784772d5c151e51319 | [
"ISC"
] | null | null | null | test_project/test_project/settings.py | neonua/django-maven | c8d89a4cb935faf8d31ac1784772d5c151e51319 | [
"ISC"
] | null | null | null | # Django settings for test_project project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 's... | 35.263566 | 127 | 0.717301 |
c59e63ead666f945539e85f5e079dea6c197eec0 | 20,506 | py | Python | exporter/exp/gltf2_blender_gather_nodes.py | rhammond17/Blender2MSFS2 | 51ed5e6624e6e072ee03bb7123013ccce4159fbd | [
"Apache-2.0"
] | 25 | 2021-07-01T04:48:08.000Z | 2022-03-15T00:20:55.000Z | exporter/exp/gltf2_blender_gather_nodes.py | rhammond17/Blender2MSFS2 | 51ed5e6624e6e072ee03bb7123013ccce4159fbd | [
"Apache-2.0"
] | 9 | 2021-10-14T12:58:11.000Z | 2022-03-22T05:10:05.000Z | exporter/exp/gltf2_blender_gather_nodes.py | rhammond17/Blender2MSFS2 | 51ed5e6624e6e072ee03bb7123013ccce4159fbd | [
"Apache-2.0"
] | 4 | 2021-12-18T22:26:00.000Z | 2022-03-16T14:00:27.000Z | # Copyright 2018-2019 The glTF-Blender-IO 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 ... | 44.675381 | 134 | 0.673169 |
4a15288480ffb9f4e0a1631adaba406655be8970 | 2,775 | py | Python | tests/molecular/functional_groups/functional_group_factory/generic_functional_group_factory/test_get_functional_groups.py | stevenbennett96/stk | 6e5af87625b83e0bfc7243bc42d8c7a860cbeb76 | [
"MIT"
] | null | null | null | tests/molecular/functional_groups/functional_group_factory/generic_functional_group_factory/test_get_functional_groups.py | stevenbennett96/stk | 6e5af87625b83e0bfc7243bc42d8c7a860cbeb76 | [
"MIT"
] | null | null | null | tests/molecular/functional_groups/functional_group_factory/generic_functional_group_factory/test_get_functional_groups.py | stevenbennett96/stk | 6e5af87625b83e0bfc7243bc42d8c7a860cbeb76 | [
"MIT"
] | null | null | null | import itertools as it
from ..utilities import (
are_clone_sequences,
are_same_id_sequences,
atom_id,
)
def test_get_functional_groups(case_data):
"""
Test :meth:`.GenericFunctionalGroupFactory.get_functional_groups`.
Parameters
----------
case_data : :class:`.CaseData`
The t... | 26.428571 | 70 | 0.686126 |
e5707e24020b40f91b7be8ba72c1d0fb7a48b9f6 | 447 | py | Python | clients/socket.py | dexterx17/nodoSocket | 102ca1e5584b3b4317f984c6b69e360b50a73f3f | [
"MIT"
] | null | null | null | clients/socket.py | dexterx17/nodoSocket | 102ca1e5584b3b4317f984c6b69e360b50a73f3f | [
"MIT"
] | null | null | null | clients/socket.py | dexterx17/nodoSocket | 102ca1e5584b3b4317f984c6b69e360b50a73f3f | [
"MIT"
] | null | null | null | #!/usr/bin/python
import websocket
import thread
import time
import random
import json
num = random.randint(0,100)
print num
dato={'ok':random.randint(0,100),
'valorx':random.randint(0,100),
'valory':random.randint(0,100),
'teta':random.randint(0,100),
'q1':random.randint(0,100),
'q2':random.randint(0,100),
'q3':ra... | 17.192308 | 33 | 0.715884 |
7570177cebc4bbe470fdea52a5922c07eef39c7c | 181 | py | Python | CCAgT_utils/errors.py | johnnv1/CCAgT_dataset_utils | 362ac5f664d73c0cfa1b1a21c62f03318dcc4c32 | [
"Apache-2.0"
] | 1 | 2022-02-23T20:29:16.000Z | 2022-02-23T20:29:16.000Z | CCAgT_utils/errors.py | johnnv1/CCAgT_dataset_utils | 362ac5f664d73c0cfa1b1a21c62f03318dcc4c32 | [
"Apache-2.0"
] | 32 | 2022-02-18T23:38:00.000Z | 2022-03-31T22:42:00.000Z | CCAgT_utils/errors.py | johnnv1/CCAgT-utils | 2a12fcb2cd3a770aa81a9e75ed6ad68077b72bfb | [
"Apache-2.0"
] | null | null | null | from __future__ import annotations
class ShapeError(RuntimeError):
pass
class FileTypeError(RuntimeError):
pass
class MoreThanOneIDbyItemError(RuntimeError):
pass
| 12.928571 | 45 | 0.779006 |
97602d549e812a4e7ce3d12da787ec9c15ef42e0 | 3,026 | py | Python | recipes/protobuf/3.5.2/conanfile.py | SolarFramework/conan-solar | cdb6253556c056baacaf3e5f28b595869adddb88 | [
"Apache-2.0"
] | null | null | null | recipes/protobuf/3.5.2/conanfile.py | SolarFramework/conan-solar | cdb6253556c056baacaf3e5f28b595869adddb88 | [
"Apache-2.0"
] | 3 | 2021-02-15T08:48:16.000Z | 2021-02-24T16:35:54.000Z | recipes/protobuf/3.5.2/conanfile.py | SolarFramework/conan-solar | cdb6253556c056baacaf3e5f28b595869adddb88 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from conans import ConanFile, CMake, tools
class ProtobufConan(ConanFile):
name = "protobuf"
version = "3.5.2"
url = "https://github.com/Solar-Framework/conan-solar/recipes/protobuf/3.5.2"
homepage = "https://github.com/protocolbuffers/protobuf"... | 37.358025 | 102 | 0.627561 |
c082300e8189ec4ac6cf6513307717ee7dc5ba74 | 37,150 | py | Python | gui/kivy/main_window.py | glemercier/electrum-smart | 884bb3eecbba593144b0c77192f2eb7211f97e38 | [
"MIT"
] | 10 | 2018-01-05T16:05:21.000Z | 2020-09-16T15:19:29.000Z | gui/kivy/main_window.py | glemercier/electrum-smart | 884bb3eecbba593144b0c77192f2eb7211f97e38 | [
"MIT"
] | 37 | 2018-06-05T17:01:53.000Z | 2022-02-11T10:15:00.000Z | gui/kivy/main_window.py | glemercier/electrum-smart | 884bb3eecbba593144b0c77192f2eb7211f97e38 | [
"MIT"
] | 9 | 2018-05-24T05:47:02.000Z | 2021-09-13T11:17:08.000Z | import re
import os
import sys
import time
import datetime
import traceback
from decimal import Decimal
import threading
import electrum_smart as electrum
from electrum_smart.bitcoin import TYPE_ADDRESS
from electrum_smart import WalletStorage, Wallet
from electrum_smart_gui.kivy.i18n import _
from electrum_smart.paym... | 38.141684 | 127 | 0.618816 |
3aae6c8b21ff037acfb669ffdaa53430e6ae4c82 | 3,118 | py | Python | transmission_influxdb/influxdb.py | cheeseandcereal/transmission_influxdb_exporter | 9d815648bdaeb7d73e4635a1e652bf669bce62fe | [
"Unlicense"
] | 7 | 2021-01-29T07:01:41.000Z | 2022-01-06T23:52:09.000Z | transmission_influxdb/influxdb.py | cheeseandcereal/transmission_influxdb_exporter | 9d815648bdaeb7d73e4635a1e652bf669bce62fe | [
"Unlicense"
] | 5 | 2021-01-29T18:27:02.000Z | 2022-03-08T18:29:36.000Z | transmission_influxdb/influxdb.py | cheeseandcereal/transmission_influxdb_exporter | 9d815648bdaeb7d73e4635a1e652bf669bce62fe | [
"Unlicense"
] | 1 | 2022-01-25T22:53:25.000Z | 2022-01-25T22:53:25.000Z | from typing import List, Dict, Any, cast
import logging
import influxdb
from transmission_influxdb import config
log = logging.getLogger("influxdb")
key_value_cache: Dict[str, Any] = {}
# Will get created when a method using the client is called
client = cast(influxdb.InfluxDBClient, None)
def _connect_if_necess... | 39.468354 | 140 | 0.712957 |
40c15865786942e25a10e4e6811d6f6c82cad536 | 5,253 | py | Python | trio/tests/test_exports.py | timgates42/trio | 5933a9a02b2cdea12e7a6c711252f63bc49e8904 | [
"Apache-2.0",
"MIT"
] | null | null | null | trio/tests/test_exports.py | timgates42/trio | 5933a9a02b2cdea12e7a6c711252f63bc49e8904 | [
"Apache-2.0",
"MIT"
] | null | null | null | trio/tests/test_exports.py | timgates42/trio | 5933a9a02b2cdea12e7a6c711252f63bc49e8904 | [
"Apache-2.0",
"MIT"
] | null | null | null | import sys
import importlib
import types
import inspect
import enum
import pytest
import trio
import trio.testing
from .. import _core
from .. import _util
def test_core_is_properly_reexported():
# Each export from _core should be re-exported by exactly one of these
# three modules:
sources = [trio, tr... | 35.734694 | 79 | 0.645726 |
7f46a1c8f6a7c5f61c75d5dcb403b2232ec90960 | 21,132 | py | Python | dev/merge_spark_pr.py | TV4Fun/spark | 79e06faa4ef6596c9e2d4be09c74b935064021bb | [
"Apache-2.0"
] | 25 | 2020-02-21T20:53:38.000Z | 2022-03-03T03:16:31.000Z | dev/merge_spark_pr.py | TV4Fun/spark | 79e06faa4ef6596c9e2d4be09c74b935064021bb | [
"Apache-2.0"
] | 7 | 2021-01-21T01:36:00.000Z | 2021-04-26T21:01:16.000Z | dev/merge_spark_pr.py | TV4Fun/spark | 79e06faa4ef6596c9e2d4be09c74b935064021bb | [
"Apache-2.0"
] | 5 | 2020-03-25T15:55:10.000Z | 2021-06-22T01:20:15.000Z | #!/usr/bin/env python
#
# 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 "Li... | 40.638462 | 100 | 0.645135 |
110f74a8acbeee4fb45b1f2877862b633ce9ae24 | 1,049 | py | Python | src/blockchain/data/smart_contract.py | ParisNeo/blockchain | 8bc2768a3e89088e202ea89e5f301576f6f9d95c | [
"MIT"
] | null | null | null | src/blockchain/data/smart_contract.py | ParisNeo/blockchain | 8bc2768a3e89088e202ea89e5f301576f6f9d95c | [
"MIT"
] | null | null | null | src/blockchain/data/smart_contract.py | ParisNeo/blockchain | 8bc2768a3e89088e202ea89e5f301576f6f9d95c | [
"MIT"
] | null | null | null | """
File : smart_contract.py
Author : ParisNeo
Description :
A smart contract to be implemented and registered to the block chain with a register_smart_contract transaction
"""
import pickle
import time
from base58 import scrub_input
from blockchain.crypto_tools import hash, sign, generateKeys, b58encode, b58de... | 29.138889 | 123 | 0.702574 |
7052b448816787a4c9ed513b87c0bcd30aa37cca | 998 | py | Python | platzigram/urls.py | DanielColman/Framework-en-el-tiempo | 59bbc8d1655702f0fdc6a58d8a7982b6b101e3bf | [
"Apache-2.0"
] | null | null | null | platzigram/urls.py | DanielColman/Framework-en-el-tiempo | 59bbc8d1655702f0fdc6a58d8a7982b6b101e3bf | [
"Apache-2.0"
] | null | null | null | platzigram/urls.py | DanielColman/Framework-en-el-tiempo | 59bbc8d1655702f0fdc6a58d8a7982b6b101e3bf | [
"Apache-2.0"
] | null | null | null | """platzigram URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-ba... | 33.266667 | 77 | 0.715431 |
c19dde8243406673df0c5d80421196f2b457144f | 471 | py | Python | mofa/assistants/migrations/0004_auto_20200113_1333.py | BoxInABoxICT/BoxPlugin | ad351978faa37ab867a86d2f4023a2b3e5a2ce19 | [
"Apache-2.0"
] | null | null | null | mofa/assistants/migrations/0004_auto_20200113_1333.py | BoxInABoxICT/BoxPlugin | ad351978faa37ab867a86d2f4023a2b3e5a2ce19 | [
"Apache-2.0"
] | 5 | 2020-06-06T01:07:51.000Z | 2021-06-09T18:52:55.000Z | mofa/assistants/migrations/0004_auto_20200113_1333.py | BoxInABoxICT/BoxPlugin | ad351978faa37ab867a86d2f4023a2b3e5a2ce19 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.2.6 on 2020-01-13 12:33
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('assistants', '0003_auto_20191219_1217'),
]
operations = [
migrations.RemoveField(
model_name='newactivitycreated',
name='des... | 21.409091 | 50 | 0.596603 |
70acbe584f39b94ed02722902530f93bf5c6b6ae | 1,761 | py | Python | src/train_mnist.py | zhihanyang2022/pytorch-vae | b804c986180d5d7f887b7ec291bdb752f832f4b1 | [
"MIT"
] | null | null | null | src/train_mnist.py | zhihanyang2022/pytorch-vae | b804c986180d5d7f887b7ec291bdb752f832f4b1 | [
"MIT"
] | null | null | null | src/train_mnist.py | zhihanyang2022/pytorch-vae | b804c986180d5d7f887b7ec291bdb752f832f4b1 | [
"MIT"
] | null | null | null | import numpy as np
from keras.datasets.mnist import load_data
import torch
from torch.utils.data import TensorDataset, DataLoader
from torch.utils.tensorboard import SummaryWriter
import tensorflow as tf
import tensorboard as tb
tf.io.gfile = tb.compat.tensorflow_stub.io.gfile
import torchvision
from model import Imag... | 30.362069 | 98 | 0.689381 |
05338642d1087d010c5a3d4c89e21397f73fd213 | 6,118 | py | Python | Question generator.py | robwolf13/Question-Generator | e00964ef425d53dde70bcbabcc087b2be7f68a93 | [
"MIT"
] | null | null | null | Question generator.py | robwolf13/Question-Generator | e00964ef425d53dde70bcbabcc087b2be7f68a93 | [
"MIT"
] | null | null | null | Question generator.py | robwolf13/Question-Generator | e00964ef425d53dde70bcbabcc087b2be7f68a93 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-#
___author___='robert woolley'
''' To make; variable control, gui, output control, diagram questions,
loop for multiple questions
Example question formats(seperate ans no)
A+B
[A*B]/B
A + B * C
(A - B) / C
A**3
(seperate ans yes)
q;Ax+Bx a;[A+B]x
q;x**2 - [B*C]x + [B*C] = 0 a;B,C... | 30.437811 | 121 | 0.498039 |
1193e722ec7c1a451e9b0105b0d60e1288b23e81 | 2,723 | py | Python | aula07102019/ArvoreBinariaBusca.py | mariosiqueira/aedpython | 27276aba5555a02b5a162b3a3d2807669ade8a8e | [
"CNRI-Python"
] | null | null | null | aula07102019/ArvoreBinariaBusca.py | mariosiqueira/aedpython | 27276aba5555a02b5a162b3a3d2807669ade8a8e | [
"CNRI-Python"
] | null | null | null | aula07102019/ArvoreBinariaBusca.py | mariosiqueira/aedpython | 27276aba5555a02b5a162b3a3d2807669ade8a8e | [
"CNRI-Python"
] | null | null | null | from aula07102019.No import No
class ArvoreBinariaBusca:
def __init__(self):
self.raiz = None
def inserir(self, chave, noAtual):
novoNo = No(chave)
if(self.estaVazio()):
self.raiz = novoNo
else:
if(chave <= noAtual.chave):
if(noAtual... | 31.662791 | 72 | 0.527727 |
16b1cdb11edb1c25457ffc87301b5c97cfdd3e49 | 5,400 | py | Python | Phonopy-Importer/PhonopyImporter/CASTEP.py | skelton-group/Phono3py-Power-Tools | 5fb1c0881fca32011d7718e9bd0bf5127ee56f3d | [
"MIT"
] | 14 | 2020-08-14T10:19:16.000Z | 2022-02-16T11:45:45.000Z | Phonopy-Importer/PhonopyImporter/CASTEP.py | LuoYR/Phono3py-Power-Tools | 9534e9670290cae6a0cf865fb0303a32acac63aa | [
"MIT"
] | 1 | 2021-07-03T03:01:56.000Z | 2021-07-06T17:02:29.000Z | Phonopy-Importer/PhonopyImporter/CASTEP.py | LuoYR/Phono3py-Power-Tools | 9534e9670290cae6a0cf865fb0303a32acac63aa | [
"MIT"
] | 6 | 2020-05-30T07:42:46.000Z | 2022-02-17T18:17:37.000Z | # PhonopyImporter/CASTEP.py
# ----------------
# Module Docstring
# ----------------
""" Contains routines for working with the CASTEP code. """
# -------
# Imports
# -------
import numpy as np
# ---------
# Functions
# ---------
def ReadPhonon(file_path):
"""
Parse the CASTEP .phonon file at file_path... | 29.032258 | 141 | 0.533704 |
928d8caccf17298641734ef7f7f73a4bb43f33af | 925 | py | Python | 2015/Day 5/Day5.py | MBarrows20/AdventofCode | 511febf56bade68bfe2181fc5b65a666fa6f9a37 | [
"MIT"
] | null | null | null | 2015/Day 5/Day5.py | MBarrows20/AdventofCode | 511febf56bade68bfe2181fc5b65a666fa6f9a37 | [
"MIT"
] | null | null | null | 2015/Day 5/Day5.py | MBarrows20/AdventofCode | 511febf56bade68bfe2181fc5b65a666fa6f9a37 | [
"MIT"
] | null | null | null | import csv
import string
import re
# Read input data
words = open('2015/Day 5/input.csv').read().splitlines()
# Define functions
def vowelCount(word):
count = 0
count += word.count('a')
count += word.count('e')
count += word.count('i')
count += word.count('o')
count += word.coun... | 20.555556 | 97 | 0.583784 |
76bf9b7ca5d9e5b9115da6bc8169ca4d425364cc | 1,294 | py | Python | formatter.py | ancho85/shpconverter | 43d00e49b3376950444d5e2bf9d27b248efa7c25 | [
"MIT"
] | null | null | null | formatter.py | ancho85/shpconverter | 43d00e49b3376950444d5e2bf9d27b248efa7c25 | [
"MIT"
] | null | null | null | formatter.py | ancho85/shpconverter | 43d00e49b3376950444d5e2bf9d27b248efa7c25 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
import os
import os.path
import sys
import re
dirSep = "/"
outDir = "./out" #linux
if sys.platform.startswith("win"):
outDir = ".\out"
dirSep = "\\"
for root,d,files in os.walk(outDir):
if root.startswith(outDir + dirSep + "_fixed"): continue
for fn in files:
if fn[-3:] ==... | 46.214286 | 95 | 0.431221 |
564b96edbdedc3a98d6eeac793727d8096508cc6 | 1,133 | py | Python | jjson5.py | JideBakare/Gitclass | 11e7aa48281774e3f7e9e46668f7de0511fb5f5c | [
"Apache-2.0"
] | null | null | null | jjson5.py | JideBakare/Gitclass | 11e7aa48281774e3f7e9e46668f7de0511fb5f5c | [
"Apache-2.0"
] | null | null | null | jjson5.py | JideBakare/Gitclass | 11e7aa48281774e3f7e9e46668f7de0511fb5f5c | [
"Apache-2.0"
] | null | null | null | import json,ssl
import urllib.request,urllib.parse, urllib.error
# Ignore SSL certificate errors
ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE
#Stroring the given parameters
api_key = 42
serviceurl = "http://py4e-data.dr-chuck.net/json?"
# sample_addr... | 27.634146 | 77 | 0.699912 |
b50e6bdda983f0d651d6ee27a57708ccc16e1042 | 633 | py | Python | sync.py | arocks/async-await-examples | 23e645e00c8bcbaa040d6bffddeb8c61b0b85799 | [
"MIT"
] | 3 | 2018-12-04T15:55:12.000Z | 2021-02-27T06:22:10.000Z | sync.py | arocks/async-await-examples | 23e645e00c8bcbaa040d6bffddeb8c61b0b85799 | [
"MIT"
] | null | null | null | sync.py | arocks/async-await-examples | 23e645e00c8bcbaa040d6bffddeb8c61b0b85799 | [
"MIT"
] | 3 | 2019-09-09T07:44:15.000Z | 2020-09-23T02:23:01.000Z | # sync.py
"""Synchronously download a list of webpages and time it"""
from urllib.request import Request, urlopen
from time import time
sites = [
"https://news.ycombinator.com/",
"https://www.yahoo.com/",
"https://github.com/",
]
def find_size(url):
req = Request(url)
with urlopen(req) as respons... | 21.1 | 60 | 0.616114 |
2b9e7cb20ca65289e563ea07b651080ca37ea947 | 1,023 | py | Python | SocketOperation.py | Mr4x3/acn | a5a11ea97cf9cb0b1984554452574e7eabfbcb68 | [
"MIT-0"
] | null | null | null | SocketOperation.py | Mr4x3/acn | a5a11ea97cf9cb0b1984554452574e7eabfbcb68 | [
"MIT-0"
] | null | null | null | SocketOperation.py | Mr4x3/acn | a5a11ea97cf9cb0b1984554452574e7eabfbcb68 | [
"MIT-0"
] | null | null | null | """ Module Created By Vivek Sharma (http://doyl.in)For Simplified TCP Operations"""
#!/usr/bin/python
import socket
class SocketOperation:
def __init__(self,address):
self.s=socket.socket()
self.s.bind(address)
self.s.listen(2)
def mirror(self,s):
if s[-1]!='\n':
s+... | 35.275862 | 89 | 0.55523 |
6862264545116840e1fe2091fb53233017fbe2a3 | 5,486 | py | Python | viennagrid-python/viennagrid/io.py | jonancm/viennagrid-python | a56f23ab65cf82b2f06ff546d45c056bb9d326b2 | [
"MIT"
] | null | null | null | viennagrid-python/viennagrid/io.py | jonancm/viennagrid-python | a56f23ab65cf82b2f06ff546d45c056bb9d326b2 | [
"MIT"
] | 1 | 2015-05-13T08:28:52.000Z | 2015-05-13T08:28:52.000Z | viennagrid-python/viennagrid/io.py | jonancm/viennagrid-python | a56f23ab65cf82b2f06ff546d45c056bb9d326b2 | [
"MIT"
] | null | null | null | #-*- coding: utf-8 -*-
import viennagrid
class BadFileFormatError(Exception):
"""Exception raised when the mesh file is not well-formatted and hence cannot be read."""
pass
def read_netgen(filepath, domain, segmentation=None):
"""
Read mesh data from a Netgen file and save the read domain data into the given dom... | 36.573333 | 98 | 0.743711 |
2c94d6251db013ac6e11e0f90e81733f787686f0 | 58,799 | py | Python | methylpy/DMRfind.py | shellytrigg/methylpy | d354ef50e8e603ee79d0356cdfd262f2e8e4bfe7 | [
"Apache-2.0"
] | 2 | 2019-11-10T04:19:42.000Z | 2019-11-12T02:23:12.000Z | methylpy/DMRfind.py | shellytrigg/methylpy | d354ef50e8e603ee79d0356cdfd262f2e8e4bfe7 | [
"Apache-2.0"
] | null | null | null | methylpy/DMRfind.py | shellytrigg/methylpy | d354ef50e8e603ee79d0356cdfd262f2e8e4bfe7 | [
"Apache-2.0"
] | null | null | null | from sys import exc_info, exit
from pdb import set_trace
from subprocess import check_call,check_output
from shlex import split
from glob import glob
from math import ceil, log10
from multiprocessing import Pool
from methylpy.utilities import print_checkpoint,expand_nucleotide_code
from methylpy.utilities import open_a... | 49.163043 | 218 | 0.578802 |
fa0a7867860d543290e929e49d011202ee55ccde | 6,554 | py | Python | filter_plugins/oc_output/interfaces/interface/routed_vlan/ipv4/proxy_arp/state/__init__.py | lnde/ansible-ncyang | 214d001564a4c2a27d25a20f4f095b5a0b69b378 | [
"MIT"
] | null | null | null | filter_plugins/oc_output/interfaces/interface/routed_vlan/ipv4/proxy_arp/state/__init__.py | lnde/ansible-ncyang | 214d001564a4c2a27d25a20f4f095b5a0b69b378 | [
"MIT"
] | null | null | null | filter_plugins/oc_output/interfaces/interface/routed_vlan/ipv4/proxy_arp/state/__init__.py | lnde/ansible-ncyang | 214d001564a4c2a27d25a20f4f095b5a0b69b378 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from operator import attrgetter
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType
from pyangbind.lib.yangtypes import RestrictedClassType
from pyangbind.lib.yangtypes import TypedListType
from pyangbind.lib.yangtypes import YANGBool
from pyangbind.lib.yangtypes import YANGListTy... | 50.806202 | 555 | 0.70293 |
69f34a7145ec1571fc35fb140a70a140d11d61f3 | 11,285 | py | Python | util.py | HKUST-KnowComp/PathPredictionForTextClassification | 2e4e5ae478c2eda2845b832c85855046edde4944 | [
"MIT"
] | 10 | 2019-03-11T08:40:15.000Z | 2021-07-11T13:53:44.000Z | util.py | HKUST-KnowComp/PathPredictionForTextClassification | 2e4e5ae478c2eda2845b832c85855046edde4944 | [
"MIT"
] | 3 | 2019-03-10T18:06:32.000Z | 2019-05-25T06:53:09.000Z | util.py | HKUST-KnowComp/PathPredictionForTextClassification | 2e4e5ae478c2eda2845b832c85855046edde4944 | [
"MIT"
] | 5 | 2019-03-10T17:54:16.000Z | 2021-11-11T14:30:57.000Z | import tools
import settings
import os
import numpy as np
from sklearn.preprocessing import normalize as sklearn_normalize
from sklearn.metrics import precision_recall_fscore_support
def generate_hier_info(deltas, classes, output_dir):
max_depth = len(deltas)
hierarchy_file = os.path.join(output_dir, settings... | 36.286174 | 115 | 0.58467 |
eb58891a9eb0416e49cfc332dabfe25548e8a9da | 7,371 | py | Python | tf3d/instance_segmentation/model.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 2 | 2021-02-06T12:31:50.000Z | 2021-02-06T12:37:11.000Z | tf3d/instance_segmentation/model.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 1 | 2022-02-10T06:34:18.000Z | 2022-02-10T06:34:18.000Z | tf3d/instance_segmentation/model.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 1 | 2021-07-30T22:42:46.000Z | 2021-07-30T22:42:46.000Z | # coding=utf-8
# Copyright 2021 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... | 44.137725 | 80 | 0.734771 |
21c360d8a244be5adb6aab55855c0f2e07e1c39f | 3,235 | py | Python | drl/utils/test_checkpointing.py | lucaslingle/pytorch_drl | 6b2c1142a36553ce5dcb0a5768767579676d5791 | [
"MIT"
] | null | null | null | drl/utils/test_checkpointing.py | lucaslingle/pytorch_drl | 6b2c1142a36553ce5dcb0a5768767579676d5791 | [
"MIT"
] | null | null | null | drl/utils/test_checkpointing.py | lucaslingle/pytorch_drl | 6b2c1142a36553ce5dcb0a5768767579676d5791 | [
"MIT"
] | null | null | null | import tempfile
import os
import torch as tc
from drl.utils.checkpointing import (
format_name, parse_name, save_checkpoints, maybe_load_checkpoints)
CHECKPOINT_DIR = os.path.join(
tempfile.gettempdir(), 'pytorch_drl_testing/checkpoints')
STEPS = 7357
def make_checkpointables():
model = tc.nn.Linear(10... | 35.163043 | 80 | 0.66677 |
b6881130436aa834a2081cf12190121561067649 | 126 | py | Python | dnacurve/__main__.py | cgohlke/dnacurve | ee750330c40db62effaf4e57f40409d4c9366b73 | [
"BSD-3-Clause"
] | 2 | 2020-02-23T20:17:23.000Z | 2021-06-26T00:39:06.000Z | dnacurve/__main__.py | cgohlke/dnacurve | ee750330c40db62effaf4e57f40409d4c9366b73 | [
"BSD-3-Clause"
] | null | null | null | dnacurve/__main__.py | cgohlke/dnacurve | ee750330c40db62effaf4e57f40409d4c9366b73 | [
"BSD-3-Clause"
] | 1 | 2021-06-26T00:39:09.000Z | 2021-06-26T00:39:09.000Z | # dnacurve/__main__.py
"""Dnacurve package command line script."""
import sys
from .dnacurve import main
sys.exit(main())
| 12.6 | 43 | 0.730159 |
3f67975042c55771f4fba7bdb32f33e8f817c95d | 11,650 | py | Python | src/sims4communitylib/dialogs/option_dialogs/common_choose_sim_option_dialog.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | 118 | 2019-08-31T04:33:18.000Z | 2022-03-28T21:12:14.000Z | src/sims4communitylib/dialogs/option_dialogs/common_choose_sim_option_dialog.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | 15 | 2019-12-05T01:29:46.000Z | 2022-02-18T17:13:46.000Z | src/sims4communitylib/dialogs/option_dialogs/common_choose_sim_option_dialog.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | 28 | 2019-09-07T04:11:05.000Z | 2022-02-07T18:31:40.000Z | """
The Sims 4 Community Library is licensed under the Creative Commons Attribution 4.0 International public license (CC BY 4.0).
https://creativecommons.org/licenses/by/4.0/
https://creativecommons.org/licenses/by/4.0/legalcode
Copyright (c) COLONOLNUTTY
"""
import random
import sims4.commands
from typing import Any,... | 42.057762 | 158 | 0.684893 |
3361a8dafe1d1e2e8c22b9c59b8a12efd3fd06f3 | 2,539 | py | Python | docs/examples/video/video_example.py | rotorliu/DALI | 4ea3529fc9b35cbdf09b260ec95197cfd52c0395 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | docs/examples/video/video_example.py | rotorliu/DALI | 4ea3529fc9b35cbdf09b260ec95197cfd52c0395 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | docs/examples/video/video_example.py | rotorliu/DALI | 4ea3529fc9b35cbdf09b260ec95197cfd52c0395 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | #!/bin/env python
import os
import numpy as np
from nvidia.dali.pipeline import Pipeline
import nvidia.dali.ops as ops
import nvidia.dali.types as types
try:
from matplotlib import pyplot as plt
has_matplotlib = True
except ImportError:
has_matplotlib = False
try:
from PIL import Image
has_PIL =... | 32.139241 | 103 | 0.63332 |
85673501c042c96665bd1172bad61daaf810409e | 14,117 | py | Python | recipes/Python/578611_Bag_class/recipe-578611.py | tdiprima/code | 61a74f5f93da087d27c70b2efe779ac6bd2a3b4f | [
"MIT"
] | 2,023 | 2017-07-29T09:34:46.000Z | 2022-03-24T08:00:45.000Z | recipes/Python/578611_Bag_class/recipe-578611.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 32 | 2017-09-02T17:20:08.000Z | 2022-02-11T17:49:37.000Z | recipes/Python/578611_Bag_class/recipe-578611.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 780 | 2017-07-28T19:23:28.000Z | 2022-03-25T20:39:41.000Z | #!/usr/bin/env python
# licensed under the CreativeCommons, Share-Alike, Attribution (CC-BY-SA from creativecommons.com)
# email: dreamingforward@gmail.com
"""Bag types: a set-like container that counts the number of same items rather than consuming memory for storage."""
import random #pick()
_DEBUG = True
clas... | 32.830233 | 135 | 0.514911 |
70047cb4804805359809b1a83321af671a50d6ba | 3,109 | py | Python | Scripts/extract_metadata.py | al-alamin/SO-Error-Finder | d1e534b5a65934a9cad10a1007cf3c7417722909 | [
"BSD-Source-Code"
] | null | null | null | Scripts/extract_metadata.py | al-alamin/SO-Error-Finder | d1e534b5a65934a9cad10a1007cf3c7417722909 | [
"BSD-Source-Code"
] | null | null | null | Scripts/extract_metadata.py | al-alamin/SO-Error-Finder | d1e534b5a65934a9cad10a1007cf3c7417722909 | [
"BSD-Source-Code"
] | null | null | null | import warnings
warnings.filterwarnings('always')
warnings.simplefilter('always')
import warnings
warnings.simplefilter(action='ignore', category=FutureWarning)
warnings.simplefilter(action='ignore', category=DeprecationWarning)
warnings.filterwarnings("ignore", category=DeprecationWarning)
warnings.filterwarnings("ign... | 34.932584 | 158 | 0.715021 |
dd284a7c13a2dd80968324dd55dbb25809ba45ed | 10,864 | py | Python | cisreg.py | yifeng-li/DECRES | 40c3b9dadfe2f6bdbb6fa6c7f79ccb60de0f8a2c | [
"BSD-3-Clause"
] | 42 | 2015-10-27T17:06:23.000Z | 2022-02-10T16:19:09.000Z | cisreg.py | yifeng-li/DECRES | 40c3b9dadfe2f6bdbb6fa6c7f79ccb60de0f8a2c | [
"BSD-3-Clause"
] | 5 | 2016-02-29T16:32:50.000Z | 2019-12-01T11:57:14.000Z | cisreg.py | yifeng-li/DECRES | 40c3b9dadfe2f6bdbb6fa6c7f79ccb60de0f8a2c | [
"BSD-3-Clause"
] | 18 | 2016-03-09T18:31:54.000Z | 2021-04-09T09:45:19.000Z | """
A module for cis-regulatory elements processing.
Funtionality include:
Yifeng Li
CMMT, UBC, Vancouver
Dec 11, 2014
Contact: yifeng.li.cn@gmail.com
"""
from __future__ import division
import numpy as np
import math
import os
def write_bed(path,filename,regionnames,regionsocres,rgb_codes,regions,merge=True,backgro... | 38.119298 | 267 | 0.639543 |
cf2f0905a7d260f939622a5bfb35a5aa502bd95b | 305 | py | Python | 2016/01/mental-health-stigma-20160126/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 14 | 2015-05-08T13:41:51.000Z | 2021-02-24T12:34:55.000Z | 2016/01/mental-health-stigma-20160126/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | null | null | null | 2016/01/mental-health-stigma-20160126/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 7 | 2015-04-04T04:45:54.000Z | 2021-02-18T11:12:48.000Z | #!/usr/bin/env python
import base_filters
COPY_GOOGLE_DOC_KEY = '18yBte2NiJDZdAJtUrKO0s-2B-Q1uJhmJOweX8umoiWg'
USE_ASSETS = False
# Use these variables to override the default cache timeouts for this graphic
# DEFAULT_MAX_AGE = 20
# ASSETS_MAX_AGE = 300
JINJA_FILTER_FUNCTIONS = base_filters.FILTERS
| 21.785714 | 77 | 0.813115 |
6e07df45dfd17d128a96c9f629d9087a2c86627c | 10,662 | py | Python | nescient/packer.py | airilyan/nescient | a32e671e92a378a194c4ca010bcab37aa75d2096 | [
"MIT"
] | 4 | 2018-01-23T05:30:15.000Z | 2020-07-23T13:08:24.000Z | nescient/packer.py | airilyan/nescient | a32e671e92a378a194c4ca010bcab37aa75d2096 | [
"MIT"
] | 4 | 2018-01-16T18:56:17.000Z | 2018-03-13T06:48:24.000Z | nescient/packer.py | airilyan/nescient | a32e671e92a378a194c4ca010bcab37aa75d2096 | [
"MIT"
] | 1 | 2020-07-23T13:08:27.000Z | 2020-07-23T13:08:27.000Z | # Nescient: A Python program for packing/unpacking encrypted, salted, and authenticated file containers.
# Copyright (C) 2018 Ariel Antonitis. Licensed under the MIT license.
#
# nescient/packer.py
""" The Packer class, used to pack and unpack Nescient containers, as well as packer-specific exceptions. """
# TODO: Docu... | 47.176991 | 130 | 0.635059 |
30213c49db6263d5a18c60169feddae60a2ef9ed | 1,131 | py | Python | migrations/versions/b79bdba8b229_users_table.py | Fimasik/microblog | eaf0b4de01f4d8b9b90a3a0346c538e0ffb7e1f1 | [
"MIT"
] | null | null | null | migrations/versions/b79bdba8b229_users_table.py | Fimasik/microblog | eaf0b4de01f4d8b9b90a3a0346c538e0ffb7e1f1 | [
"MIT"
] | null | null | null | migrations/versions/b79bdba8b229_users_table.py | Fimasik/microblog | eaf0b4de01f4d8b9b90a3a0346c538e0ffb7e1f1 | [
"MIT"
] | null | null | null | """users table
Revision ID: b79bdba8b229
Revises:
Create Date: 2018-04-27 13:33:37.238140
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'b79bdba8b229'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto genera... | 29 | 80 | 0.678161 |
d44e24bc8ee0d41decb20334f036f80e817be001 | 1,583 | py | Python | tests/core/helpers.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | 5 | 2018-09-28T20:01:42.000Z | 2022-02-22T19:54:46.000Z | tests/core/helpers.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | null | null | null | tests/core/helpers.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | 1 | 2018-07-03T22:17:54.000Z | 2018-07-03T22:17:54.000Z | from cytoolz import curry
import pytest
from eth_utils import (
decode_hex,
ValidationError,
)
from eth.chains.base import MiningChain
from eth.utils.spoof import (
SpoofTransaction,
)
@curry
def new_transaction(
vm,
from_,
to,
amount=0,
private_key=None,
... | 25.126984 | 95 | 0.64561 |
f7354fcf962cbde596ca7cc862b065cdde1659ef | 47,255 | py | Python | src/olympia/addons/serializers.py | mozilla/addons-server | 42abcfa61032555c6d9ad76a0298134bc7f3b5c1 | [
"BSD-3-Clause"
] | 843 | 2016-02-09T13:00:37.000Z | 2022-03-20T19:17:06.000Z | src/olympia/addons/serializers.py | mozilla/addons-server | 42abcfa61032555c6d9ad76a0298134bc7f3b5c1 | [
"BSD-3-Clause"
] | 10,187 | 2016-02-05T23:51:05.000Z | 2022-03-31T15:24:44.000Z | src/olympia/addons/serializers.py | mozilla/addons-server | 42abcfa61032555c6d9ad76a0298134bc7f3b5c1 | [
"BSD-3-Clause"
] | 551 | 2016-02-08T20:32:16.000Z | 2022-03-15T16:49:24.000Z | import re
from urllib.parse import urlsplit, urlunsplit
from django.http.request import QueryDict
from django.urls import reverse
from rest_framework import exceptions, serializers
import olympia.core.logger
from olympia import activity, amo
from olympia.accounts.serializers import (
BaseUserSerializer,
User... | 37.033699 | 88 | 0.623257 |
8aa1dc739225e9fa9d2b1340fc28f99c2496c14e | 9,227 | py | Python | src/models/quantized_modules.py | snudatalab/SensiMix | e5d790f48a96806e9ae01449bb4a66e8f09c4d3a | [
"Apache-2.0"
] | null | null | null | src/models/quantized_modules.py | snudatalab/SensiMix | e5d790f48a96806e9ae01449bb4a66e8f09c4d3a | [
"Apache-2.0"
] | null | null | null | src/models/quantized_modules.py | snudatalab/SensiMix | e5d790f48a96806e9ae01449bb4a66e8f09c4d3a | [
"Apache-2.0"
] | null | null | null | """
SensiMix: Sensitivity-Aware 8-bit Index & 1-bit Value Mixed Precision Quantization for BERT Compression
Authors:
- Tairen Piao (piaotairen@snu.ac.kr), Seoul National University
- Ikhyun Cho (ikhyuncho@snu.ac.kr), Seoul National University
- U Kang (ukang@snu.ac.kr), Seoul National University
This software may be us... | 36.470356 | 164 | 0.633575 |
b4c5c40671d017160886fdae1f55f2e1e9ab52b5 | 270 | py | Python | tests/artificial/transf_Integration/trend_ConstantTrend/cycle_7/ar_/test_artificial_1024_Integration_ConstantTrend_7__0.py | shaido987/pyaf | b9afd089557bed6b90b246d3712c481ae26a1957 | [
"BSD-3-Clause"
] | 377 | 2016-10-13T20:52:44.000Z | 2022-03-29T18:04:14.000Z | tests/artificial/transf_Integration/trend_ConstantTrend/cycle_7/ar_/test_artificial_1024_Integration_ConstantTrend_7__0.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 160 | 2016-10-13T16:11:53.000Z | 2022-03-28T04:21:34.000Z | tests/artificial/transf_Integration/trend_ConstantTrend/cycle_7/ar_/test_artificial_1024_Integration_ConstantTrend_7__0.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 63 | 2017-03-09T14:51:18.000Z | 2022-03-27T20:52:57.000Z | import pyaf.Bench.TS_datasets as tsds
import tests.artificial.process_artificial_dataset as art
art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "ConstantTrend", cycle_length = 7, transform = "Integration", sigma = 0.0, exog_count = 0, ar_order = 0); | 38.571429 | 170 | 0.737037 |
a0594e037a13424f2ef5db511ce3cd69fa6eb6e2 | 2,298 | py | Python | test_op.py | wms2537/DALI-jpeg2dct | 9df670a82deb8e1617a45e68e3a66558fe5b662a | [
"MIT"
] | 1 | 2021-04-27T15:05:23.000Z | 2021-04-27T15:05:23.000Z | test_op.py | wms2537/DALI-jpeg2dct | 9df670a82deb8e1617a45e68e3a66558fe5b662a | [
"MIT"
] | null | null | null | test_op.py | wms2537/DALI-jpeg2dct | 9df670a82deb8e1617a45e68e3a66558fe5b662a | [
"MIT"
] | null | null | null | from nvidia.dali import pipeline_def, Pipeline
import nvidia.dali.fn as fn
import nvidia.dali.types as types
from nvidia.dali.plugin.mxnet import DALIGenericIterator
import numpy as np
import nvidia.dali.plugin_manager as plugin_manager
plugin_manager.load_library('./build/libjpeg2dct.so')
def common_pipeline(jpegs... | 31.916667 | 105 | 0.632724 |
6784fac2d54c5a17d04c11b7cdfc565e91cf04a8 | 10,354 | py | Python | infra/build/functions/update_build_status_test.py | darkma773r/oss-fuzz | 3b4dfa5add28aff750729700d59a20eea8d6cb8f | [
"Apache-2.0"
] | 3 | 2018-02-21T20:17:08.000Z | 2021-03-13T01:34:20.000Z | infra/build/functions/update_build_status_test.py | darkma773r/oss-fuzz | 3b4dfa5add28aff750729700d59a20eea8d6cb8f | [
"Apache-2.0"
] | 10 | 2020-08-06T11:48:16.000Z | 2021-06-28T10:17:12.000Z | infra/build/functions/update_build_status_test.py | darkma773r/oss-fuzz | 3b4dfa5add28aff750729700d59a20eea8d6cb8f | [
"Apache-2.0"
] | 1 | 2018-01-12T03:50:33.000Z | 2018-01-12T03:50:33.000Z | # Copyright 2020 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | 33.836601 | 80 | 0.604404 |
4368415c09cbb1a7ade4afaf67d5ec9d312ffbd8 | 60 | py | Python | retrolab/__main__.py | krassowski/retrolab | c2daaae20e6a0e8bbd2c140e3ca3151a9b81be5b | [
"BSD-3-Clause"
] | 143 | 2021-05-26T17:16:07.000Z | 2022-03-30T06:30:55.000Z | retrolab/__main__.py | krassowski/retrolab | c2daaae20e6a0e8bbd2c140e3ca3151a9b81be5b | [
"BSD-3-Clause"
] | 218 | 2021-05-26T17:25:23.000Z | 2022-03-31T12:07:07.000Z | retrolab/__main__.py | admariner/retrolab | 540a45ae553364386111991a4e6559c93914937b | [
"BSD-3-Clause"
] | 31 | 2021-05-26T17:13:28.000Z | 2022-02-27T01:15:45.000Z | import sys
from retrolab.app import main
sys.exit(main())
| 10 | 29 | 0.75 |
faeec801d3efeb26cc236d33dbec860877969a42 | 1,924 | py | Python | Entertainment_Lane/urls.py | ksarthak4ever/Django-Entertainment_Lane | f3492ad191a376ad39bd1a71cf33ce355ea44604 | [
"MIT"
] | null | null | null | Entertainment_Lane/urls.py | ksarthak4ever/Django-Entertainment_Lane | f3492ad191a376ad39bd1a71cf33ce355ea44604 | [
"MIT"
] | 8 | 2019-12-04T22:58:23.000Z | 2021-06-10T18:03:50.000Z | Entertainment_Lane/urls.py | ksarthak4ever/Django-Entertainment_Lane | f3492ad191a376ad39bd1a71cf33ce355ea44604 | [
"MIT"
] | null | null | null | """Entertainment_Lane URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
... | 46.926829 | 103 | 0.726091 |
40e8337c156504d432e4b6de173c8efcd1bd640b | 370 | py | Python | lztools/pytools/class_tools.py | Zanzes/lztools | 4091416464cbb441f5af26ade6a03ff18ae1bf01 | [
"MIT"
] | null | null | null | lztools/pytools/class_tools.py | Zanzes/lztools | 4091416464cbb441f5af26ade6a03ff18ae1bf01 | [
"MIT"
] | null | null | null | lztools/pytools/class_tools.py | Zanzes/lztools | 4091416464cbb441f5af26ade6a03ff18ae1bf01 | [
"MIT"
] | null | null | null | import inspect
from types import FunctionType
def get_method_names(klass):
return [method[0] for method in inspect.getmembers(klass) if not method[0].startswith("_") and (type(method[1]) == FunctionType and method[1].__module__ == klass.__name__)]
def get_methods(klass):
return [method for method in inspect.g... | 46.25 | 176 | 0.754054 |
3d8839f3636cb3b1bd1aeaff0c848ca8d1cd2805 | 3,465 | py | Python | tests/test_explainer.py | ml-libs/mldissect | 8f3cdd0f9408968b40db58283fb47168c2158983 | [
"Apache-2.0"
] | 2 | 2018-09-09T20:54:01.000Z | 2018-09-12T15:55:12.000Z | tests/test_explainer.py | ml-libs/mldissect | 8f3cdd0f9408968b40db58283fb47168c2158983 | [
"Apache-2.0"
] | 4 | 2018-09-20T21:20:21.000Z | 2018-09-25T21:14:43.000Z | tests/test_explainer.py | ml-libs/mldissect | 8f3cdd0f9408968b40db58283fb47168c2158983 | [
"Apache-2.0"
] | null | null | null | import pytest
import numpy as np
import pandas as pd
from sklearn.datasets import load_boston
from sklearn.datasets import load_iris
from sklearn.ensemble import RandomForestClassifier
from sklearn.linear_model import LassoCV
from sklearn.model_selection import train_test_split
from mldissect import ClassificationExpl... | 28.170732 | 68 | 0.688023 |
cf6b67f56f23c782efe483bff43d8f33862d5bfe | 10,078 | py | Python | great_expectations/expectations/core/expect_column_pair_values_a_to_be_greater_than_b.py | Lee-W/great_expectations | bd9cb27d1caa752364d298f5057e85b6b604b622 | [
"Apache-2.0"
] | 1 | 2021-01-20T18:29:52.000Z | 2021-01-20T18:29:52.000Z | great_expectations/expectations/core/expect_column_pair_values_a_to_be_greater_than_b.py | Lee-W/great_expectations | bd9cb27d1caa752364d298f5057e85b6b604b622 | [
"Apache-2.0"
] | null | null | null | great_expectations/expectations/core/expect_column_pair_values_a_to_be_greater_than_b.py | Lee-W/great_expectations | bd9cb27d1caa752364d298f5057e85b6b604b622 | [
"Apache-2.0"
] | null | null | null | from typing import Dict, List, Optional, Union
import numpy as np
import pandas as pd
from dateutil.parser import parse
from great_expectations.core.batch import Batch
from great_expectations.core.expectation_configuration import ExpectationConfiguration
from great_expectations.execution_engine import (
Execution... | 36.382671 | 141 | 0.625918 |
4df32531961b90b93e38b3996571c69b052e2b3e | 12,298 | py | Python | salt/states/test.py | yuriks/salt | d2a5bd8adddb98ec1718d79384aa13b4f37e8028 | [
"Apache-2.0",
"MIT"
] | 1 | 2020-03-31T22:51:16.000Z | 2020-03-31T22:51:16.000Z | salt/states/test.py | yuriks/salt | d2a5bd8adddb98ec1718d79384aa13b4f37e8028 | [
"Apache-2.0",
"MIT"
] | null | null | null | salt/states/test.py | yuriks/salt | d2a5bd8adddb98ec1718d79384aa13b4f37e8028 | [
"Apache-2.0",
"MIT"
] | 1 | 2021-09-30T07:00:01.000Z | 2021-09-30T07:00:01.000Z | # -*- coding: utf-8 -*-
'''
Test States
===========
Provide test case states that enable easy testing of things to do with state
calls, e.g. running, calling, logging, output filtering etc.
.. code-block:: yaml
always-passes-with-any-kwarg:
test.nop:
- name: foo
- something: else
- ... | 26.110403 | 88 | 0.574077 |
7b74402a794c522202da06a0f16039372e03d0b5 | 3,935 | py | Python | src/disjoint_set.py | kisliakovsky/structures | 19969470a7e9b150b077082cc8ca0c2fc9be279e | [
"MIT"
] | null | null | null | src/disjoint_set.py | kisliakovsky/structures | 19969470a7e9b150b077082cc8ca0c2fc9be279e | [
"MIT"
] | null | null | null | src/disjoint_set.py | kisliakovsky/structures | 19969470a7e9b150b077082cc8ca0c2fc9be279e | [
"MIT"
] | null | null | null | """This module contains implementations of 'disjoint set' data structure"""
from abc import ABC, abstractmethod
from typing import List, Optional, TypeVar, Generic, Tuple
Value = TypeVar('Value')
class AbstractDisjointSet(ABC, Generic[Value]):
@abstractmethod
def make_set(self, i: int, value: Value) -> Non... | 33.347458 | 79 | 0.588818 |
065d77a4b61a02de08c47467868ee62beffa4c3c | 14,152 | py | Python | rpisim.py | shynline/rpisim | df8d8879939a9d726b11b19ba8870782d6cd7789 | [
"MIT"
] | null | null | null | rpisim.py | shynline/rpisim | df8d8879939a9d726b11b19ba8870782d6cd7789 | [
"MIT"
] | null | null | null | rpisim.py | shynline/rpisim | df8d8879939a9d726b11b19ba8870782d6cd7789 | [
"MIT"
] | null | null | null | from serial import Serial
import RPi.GPIO as IO
import atexit
import logging
import sys
from time import sleep
from enum import IntEnum
from datetime import datetime
PORT = "/dev/serial0"
BAUD = 9600
GSM_ON = 11
GSM_RESET = 12
BALANCE_USSD = "*124#"
SMS_NUMBER = "01821081270"
MESSAGE_TEXT = "Sample message text"
cla... | 32.090703 | 130 | 0.575537 |
bcadf5265dbd82c1d599f18f6a072497e19e4193 | 4,020 | py | Python | train.py | dbsheta/Udacity-Image-Classifier | 8bf69f767af4848969a8d88686b25c5e53c52bfa | [
"MIT"
] | null | null | null | train.py | dbsheta/Udacity-Image-Classifier | 8bf69f767af4848969a8d88686b25c5e53c52bfa | [
"MIT"
] | null | null | null | train.py | dbsheta/Udacity-Image-Classifier | 8bf69f767af4848969a8d88686b25c5e53c52bfa | [
"MIT"
] | 2 | 2019-12-03T14:09:42.000Z | 2020-01-27T20:57:23.000Z | import argparse
import data_utils
import network_utils
import torch
def get_args():
parser = argparse.ArgumentParser(description="Train Deep Learning Model for Flower Classification")
parser.add_argument('data_dir', type=str, help="data directory(required)")
parser.add_argument('--save_dir', default='', t... | 39.029126 | 113 | 0.650498 |
e891505d2f3b4a01ef132077758bd253735dac0d | 5,277 | py | Python | lang/Python/natural-sorting.py | ethansaxenian/RosettaDecode | 8ea1a42a5f792280b50193ad47545d14ee371fb7 | [
"MIT"
] | null | null | null | lang/Python/natural-sorting.py | ethansaxenian/RosettaDecode | 8ea1a42a5f792280b50193ad47545d14ee371fb7 | [
"MIT"
] | null | null | null | lang/Python/natural-sorting.py | ethansaxenian/RosettaDecode | 8ea1a42a5f792280b50193ad47545d14ee371fb7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Not Python 3.x (Can't compare str and int)
from itertools import groupby
from unicodedata import decomposition, name
from pprint import pprint as pp
commonleaders = ['the'] # lowercase leading words to ignore
replacements = {'ß': 'ss', # Map single char to replacement string
... | 33.826923 | 82 | 0.571916 |
418dc6aa55861c6dc9d8a6d527c8d3a7379f1e33 | 11,967 | py | Python | lista4/main.py | desty2k/Lab-Systemy-Operacyjne | 38b633fe7175383597049160c1d6fda3a71aaef8 | [
"MIT"
] | null | null | null | lista4/main.py | desty2k/Lab-Systemy-Operacyjne | 38b633fe7175383597049160c1d6fda3a71aaef8 | [
"MIT"
] | null | null | null | lista4/main.py | desty2k/Lab-Systemy-Operacyjne | 38b633fe7175383597049160c1d6fda3a71aaef8 | [
"MIT"
] | null | null | null | import copy
import pickle
import random
import logging
from utils import Logger
from process import Process
from request import Request
LOGGING_LEVEL = logging.DEBUG
PICKLED_FILENAME = "processes.dump"
PROCESS_COUNT = 10
# min and max amount of used pages
MIN_PAGE_COUNT = 10
MAX_PAGE_COUNT = 30
THRASHING_MIN_LENGT... | 41.696864 | 120 | 0.516002 |
bb62928ea142e2616925b4af7567a94335887e9b | 1,881 | py | Python | ludwig/datasets/santander_customer_transaction/__init__.py | dantreiman/ludwig | daeffd21f9eef524afb2037763abd07a93228c2a | [
"Apache-2.0"
] | 7,739 | 2019-02-11T14:06:31.000Z | 2020-12-16T18:30:29.000Z | ludwig/datasets/santander_customer_transaction/__init__.py | dantreiman/ludwig | daeffd21f9eef524afb2037763abd07a93228c2a | [
"Apache-2.0"
] | 769 | 2019-02-11T16:13:20.000Z | 2020-12-16T17:26:11.000Z | ludwig/datasets/santander_customer_transaction/__init__.py | dantreiman/ludwig | daeffd21f9eef524afb2037763abd07a93228c2a | [
"Apache-2.0"
] | 975 | 2019-02-11T15:55:54.000Z | 2020-12-14T21:45:39.000Z | #! /usr/bin/env python
# Copyright (c) 2021 Uber Technologies, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | 47.025 | 119 | 0.763424 |
ac531e170f0428a3f97586f096eb652400fa7250 | 8,392 | py | Python | news/info/models.py | soulmatewhat/flask_xjnews | 016693183d27c9ec376085054280abbdc8a2fe37 | [
"MIT"
] | null | null | null | news/info/models.py | soulmatewhat/flask_xjnews | 016693183d27c9ec376085054280abbdc8a2fe37 | [
"MIT"
] | null | null | null | news/info/models.py | soulmatewhat/flask_xjnews | 016693183d27c9ec376085054280abbdc8a2fe37 | [
"MIT"
] | null | null | null | from datetime import datetime
from werkzeug.security import generate_password_hash, check_password_hash
from info import constants
from . import db
class BaseModel(object):
"""模型基类,为每个模型补充创建时间与更新时间"""
create_time = db.Column(db.DateTime, default=datetime.now) # 记录的创建时间
update_time = db.Column(db.DateTim... | 36.807018 | 112 | 0.611654 |
d1753822bb4e2f8b4da19dc375fa20b6a4d9d018 | 14,596 | py | Python | python/ccxt/async_support/__init__.py | red-eagle-eye/ccxt | 56260c9f00d8eadbb23c9505c224d7f82a0d4f35 | [
"MIT"
] | null | null | null | python/ccxt/async_support/__init__.py | red-eagle-eye/ccxt | 56260c9f00d8eadbb23c9505c224d7f82a0d4f35 | [
"MIT"
] | null | null | null | python/ccxt/async_support/__init__.py | red-eagle-eye/ccxt | 56260c9f00d8eadbb23c9505c224d7f82a0d4f35 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""CCXT: CryptoCurrency eXchange Trading Library (Async)"""
# -----------------------------------------------------------------------------
__version__ = '1.60.90'
# -----------------------------------------------------------------------------
from ccxt.async_support.base.exchange import Ex... | 50.857143 | 86 | 0.558578 |
558ca0eb60649ffb203c683baf908b8c49760592 | 418 | py | Python | Python/py-module/package/__init__.py | egustafson/sandbox | 9804e966347b33558b0497a04edb1a591d2d7773 | [
"Apache-2.0"
] | 2 | 2019-09-27T21:25:26.000Z | 2019-12-29T11:26:54.000Z | Python/py-module/package/__init__.py | egustafson/sandbox | 9804e966347b33558b0497a04edb1a591d2d7773 | [
"Apache-2.0"
] | 7 | 2020-08-11T17:32:14.000Z | 2020-08-11T17:32:39.000Z | Python/py-module/package/__init__.py | egustafson/sandbox | 9804e966347b33558b0497a04edb1a591d2d7773 | [
"Apache-2.0"
] | 2 | 2016-07-18T10:55:50.000Z | 2020-08-19T01:46:08.000Z | # Package initializer
#
# In order for a directory to be evaluated as a package, (nested module),
# it must have a file named __init__.py located in it.
#
# ######################################################################
from PkgModule import MetaPublicClass
def pkgFunction():
print "I am a package functio... | 29.857143 | 73 | 0.624402 |
245fc6c3d53ac0ea83f978ad7395a8495a91e476 | 299 | py | Python | knlp/seq_generation/poem_gen/__init__.py | ERICMIAO0817/knlp | 56052e49be87d604839d8f81a7295c73a5ac62cf | [
"MIT"
] | 19 | 2021-03-17T02:15:18.000Z | 2021-12-14T04:46:21.000Z | knlp/seq_generation/poem_gen/__init__.py | ERICMIAO0817/knlp | 56052e49be87d604839d8f81a7295c73a5ac62cf | [
"MIT"
] | 4 | 2022-03-08T16:28:18.000Z | 2022-03-28T15:11:11.000Z | knlp/seq_generation/poem_gen/__init__.py | ERICMIAO0817/knlp | 56052e49be87d604839d8f81a7295c73a5ac62cf | [
"MIT"
] | 7 | 2021-03-17T02:15:23.000Z | 2022-03-17T15:41:04.000Z | # !/usr/bin/python
# -*- coding:UTF-8 -*-
# -----------------------------------------------------------------------#
# File Name: __init__.py
# Author: Junyi Li
# Mail: 4ljy@163.com
# Created Time: 2021-09-04
# Description:
# -----------------------------------------------------------------------#
| 29.9 | 74 | 0.324415 |
3eadc4f9912abb4d4993cff98e03188712f9aec1 | 270 | py | Python | gvapi.py | FNut/GVKITRB | 262598993cba999b0dd08256135be82ddfcc8754 | [
"MIT"
] | null | null | null | gvapi.py | FNut/GVKITRB | 262598993cba999b0dd08256135be82ddfcc8754 | [
"MIT"
] | null | null | null | gvapi.py | FNut/GVKITRB | 262598993cba999b0dd08256135be82ddfcc8754 | [
"MIT"
] | null | null | null | import time
import requests
from bs4 import BeautifulSoup
while True:
url = 'https://godville.net/gods/api/<godname>/<token>'
response = requests.get(url)
soup = BeautifulSoup(response.text, 'lxml')
print(soup)
print('')
time.sleep(60)
| 24.545455 | 60 | 0.655556 |
8541b0c7191c70186d7f5a3179cd5b8676e34647 | 601 | py | Python | web/interceptors/AuthWWW.py | apanly/python_learn_master | 93a214241812f77a006cc8350a7bad6c4eec6c89 | [
"BSD-3-Clause"
] | 5 | 2020-11-29T14:21:18.000Z | 2021-10-07T04:11:29.000Z | web/interceptors/AuthWWW.py | apanly/python_learn_master | 93a214241812f77a006cc8350a7bad6c4eec6c89 | [
"BSD-3-Clause"
] | null | null | null | web/interceptors/AuthWWW.py | apanly/python_learn_master | 93a214241812f77a006cc8350a7bad6c4eec6c89 | [
"BSD-3-Clause"
] | 2 | 2020-11-30T09:55:53.000Z | 2022-03-19T12:49:40.000Z | # -*- coding: utf-8 -*-
from application import app
from flask import request,redirect,g,make_response
import re
from common.components.helper.UtilHelper import UtilHelper
from common.services.AppLogService import AppLogService
from common.services.CommonConstant import CommonConstant
from common.services.GlobalUrlSe... | 21.464286 | 61 | 0.768719 |
7ce6b040334974271517c6df5162f31957d749be | 1,580 | py | Python | tests/forte/data/readers/deserialize_reader_test.py | swapnull7/forte | 737a72afd440d40c3826c3a7c5e4e44235c0f701 | [
"Apache-2.0"
] | 2 | 2021-01-01T12:07:27.000Z | 2021-09-10T03:57:18.000Z | tests/forte/data/readers/deserialize_reader_test.py | swapnull7/forte | 737a72afd440d40c3826c3a7c5e4e44235c0f701 | [
"Apache-2.0"
] | null | null | null | tests/forte/data/readers/deserialize_reader_test.py | swapnull7/forte | 737a72afd440d40c3826c3a7c5e4e44235c0f701 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The Forte 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 applicable ... | 33.617021 | 74 | 0.71962 |
3d0c3c42f89453929ffc1dd88f136db04cc2a7c4 | 6,624 | py | Python | tests/test_restriction.py | dmcgee/exchangelib | b2f7006835393132bdf2cfb416ba44f847c8bbf2 | [
"BSD-2-Clause"
] | null | null | null | tests/test_restriction.py | dmcgee/exchangelib | b2f7006835393132bdf2cfb416ba44f847c8bbf2 | [
"BSD-2-Clause"
] | null | null | null | tests/test_restriction.py | dmcgee/exchangelib | b2f7006835393132bdf2cfb416ba44f847c8bbf2 | [
"BSD-2-Clause"
] | null | null | null | # coding=utf-8
from exchangelib import EWSDateTime, EWSTimeZone, Q, Build
from exchangelib.folders import Calendar, Root
from exchangelib.restriction import Restriction
from exchangelib.util import xml_to_str
from exchangelib.version import Version, EXCHANGE_2007
from .common import TimedTestCase, mock_account, mock_p... | 47.654676 | 124 | 0.598581 |
697948aeba1c19f6fa97b802b4ae9d0e9375c27c | 26,632 | py | Python | openprocurement/tender/competitivedialogue/tests/stage2/award_blanks.py | raccoongang/openprocurement.tender.competitivedialogue | 0cc7fdf8aff1ecd82ba404318d6d88efc9a97d78 | [
"Apache-2.0"
] | null | null | null | openprocurement/tender/competitivedialogue/tests/stage2/award_blanks.py | raccoongang/openprocurement.tender.competitivedialogue | 0cc7fdf8aff1ecd82ba404318d6d88efc9a97d78 | [
"Apache-2.0"
] | 150 | 2016-06-07T15:09:50.000Z | 2018-03-19T16:17:53.000Z | openprocurement/tender/competitivedialogue/tests/stage2/award_blanks.py | raccoongang/openprocurement.tender.competitivedialogue | 0cc7fdf8aff1ecd82ba404318d6d88efc9a97d78 | [
"Apache-2.0"
] | 17 | 2016-05-27T13:17:52.000Z | 2018-06-15T14:39:03.000Z | # -*- coding: utf-8 -*-
from openprocurement.tender.belowthreshold.tests.base import (
test_organization
)
from openprocurement.tender.competitivedialogue.tests.base import (
author
)
# TenderAwardCompaintDocument EU
def create_tender_award_complaint_document(self):
response = self.app.post('/tenders/{}... | 53.80202 | 295 | 0.654025 |
1e6df4fa361faead64bb8b847182bca73c049364 | 2,628 | py | Python | poetry/console/application.py | vanyakosmos/poetry | b218969107e49dc57e65dbc0d349e83cbe1f44a8 | [
"MIT"
] | 1 | 2020-03-30T07:43:05.000Z | 2020-03-30T07:43:05.000Z | poetry/console/application.py | vanyakosmos/poetry | b218969107e49dc57e65dbc0d349e83cbe1f44a8 | [
"MIT"
] | 18 | 2020-01-15T04:11:31.000Z | 2020-06-30T13:24:27.000Z | poetry/console/application.py | vanyakosmos/poetry | b218969107e49dc57e65dbc0d349e83cbe1f44a8 | [
"MIT"
] | 1 | 2022-03-26T12:08:52.000Z | 2022-03-26T12:08:52.000Z | from cleo import Application as BaseApplication
from poetry import __version__
from .commands.about import AboutCommand
from .commands.add import AddCommand
from .commands.build import BuildCommand
from .commands.cache.cache import CacheCommand
from .commands.check import CheckCommand
from .commands.config import Con... | 27.663158 | 82 | 0.659437 |
3d7e0b3a1b67b0905b2053ebf3cb508971540419 | 7,482 | py | Python | mobilenetv3.py | naviocean/mobilenetv3.pytorch | 3e6938cedcbbc5ee5bc50780ea18e644702d85fc | [
"MIT"
] | 410 | 2019-05-08T17:44:17.000Z | 2022-03-26T03:15:46.000Z | mobilenetv3.py | naviocean/mobilenetv3.pytorch | 3e6938cedcbbc5ee5bc50780ea18e644702d85fc | [
"MIT"
] | 27 | 2019-05-18T08:08:48.000Z | 2021-07-10T05:05:30.000Z | mobilenetv3.py | naviocean/mobilenetv3.pytorch | 3e6938cedcbbc5ee5bc50780ea18e644702d85fc | [
"MIT"
] | 125 | 2019-05-09T07:00:04.000Z | 2022-03-30T08:46:09.000Z | """
Creates a MobileNetV3 Model as defined in:
Andrew Howard, Mark Sandler, Grace Chu, Liang-Chieh Chen, Bo Chen, Mingxing Tan, Weijun Wang, Yukun Zhu, Ruoming Pang, Vijay Vasudevan, Quoc V. Le, Hartwig Adam. (2019).
Searching for MobileNetV3
arXiv preprint arXiv:1905.02244.
"""
import torch.nn as nn
import math
__a... | 32.38961 | 169 | 0.539161 |
940c415a88764813be6ba5b492314a77af042fa0 | 2,206 | py | Python | tests/integration_tests/tests/agentless_tests/test_operation_mapping.py | cloudify-cosmo/cloudify-manager | 4a3f44ceb49d449bc5ebc8766b1c7b9c174ff972 | [
"Apache-2.0"
] | 124 | 2015-01-22T22:28:37.000Z | 2022-02-26T23:12:06.000Z | tests/integration_tests/tests/agentless_tests/test_operation_mapping.py | cloudify-cosmo/cloudify-manager | 4a3f44ceb49d449bc5ebc8766b1c7b9c174ff972 | [
"Apache-2.0"
] | 345 | 2015-01-08T15:49:40.000Z | 2022-03-29T08:33:00.000Z | tests/integration_tests/tests/agentless_tests/test_operation_mapping.py | cloudify-cosmo/cloudify-manager | 4a3f44ceb49d449bc5ebc8766b1c7b9c174ff972 | [
"Apache-2.0"
] | 77 | 2015-01-07T14:04:35.000Z | 2022-03-07T22:46:00.000Z | ########
# Copyright (c) 2013 GigaSpaces Technologies Ltd. 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... | 43.254902 | 79 | 0.707616 |
dcbe60822451928e8402dc764b72d7c46c1a6830 | 6,602 | py | Python | tests/list.py | mk990/pkgfile | 18729d176af8fb6365487459bc3e74bb44ae96d6 | [
"MIT"
] | 61 | 2015-03-13T18:20:23.000Z | 2022-01-20T21:18:47.000Z | tests/list.py | mk990/pkgfile | 18729d176af8fb6365487459bc3e74bb44ae96d6 | [
"MIT"
] | 33 | 2015-10-07T00:54:44.000Z | 2021-12-24T03:15:10.000Z | tests/list.py | mk990/pkgfile | 18729d176af8fb6365487459bc3e74bb44ae96d6 | [
"MIT"
] | 23 | 2015-03-13T18:20:48.000Z | 2022-02-27T19:41:21.000Z | #!/usr/bin/env python
import pkgfile_test
import textwrap
class TestUpdate(pkgfile_test.TestCase):
def testListExact(self):
r = self.Pkgfile(['-l', 'dhcpcd'])
self.assertEqual(r.returncode, 0)
self.assertEqual(r.stdout.decode(), textwrap.dedent('''
testing/dhcpcd /etc/
... | 41.78481 | 82 | 0.607846 |
0366489f3033b0b9bbcbf6c31e88586225a7d795 | 4,428 | py | Python | game/tiles.py | DevsInTheShed/pyGameJam2021 | 0ed15d66ffa287f48ceef508ac587786afb3f2e5 | [
"MIT"
] | null | null | null | game/tiles.py | DevsInTheShed/pyGameJam2021 | 0ed15d66ffa287f48ceef508ac587786afb3f2e5 | [
"MIT"
] | null | null | null | game/tiles.py | DevsInTheShed/pyGameJam2021 | 0ed15d66ffa287f48ceef508ac587786afb3f2e5 | [
"MIT"
] | null | null | null | from game import enums
from game.globals import TileSize, TimeMachineList
import pygame
class Tile(pygame.sprite.Sprite):
def __init__(self, img, x ,y):
pygame.sprite.Sprite.__init__(self)
self.image = img
self.rect = self.image.get_rect()
self.rect.midtop = (x + TileSize//2, y + (... | 35.709677 | 135 | 0.61879 |
b65ccb71591da5a1874f493456581ce254766777 | 131,413 | py | Python | mac/v3.6.4/lib/python3.6/test/test_os.py | evanmoran/python3-bazel | e6c5238e7c2bf290ae469ee1287de7af1dc4509a | [
"MIT"
] | 7 | 2018-09-10T05:42:46.000Z | 2021-05-01T12:48:30.000Z | mac/v3.6.4/lib/python3.6/test/test_os.py | evanmoran/python3-bazel | e6c5238e7c2bf290ae469ee1287de7af1dc4509a | [
"MIT"
] | null | null | null | mac/v3.6.4/lib/python3.6/test/test_os.py | evanmoran/python3-bazel | e6c5238e7c2bf290ae469ee1287de7af1dc4509a | [
"MIT"
] | 1 | 2021-06-09T16:44:57.000Z | 2021-06-09T16:44:57.000Z | # As a test suite for the os module, this is woefully inadequate, but this
# does add tests for a few functions which have been determined to be more
# portable than they had been thought to be.
import asynchat
import asyncore
import codecs
import contextlib
import decimal
import errno
import fractions
import getpass
... | 37.028177 | 101 | 0.595793 |
1ddc30bb6eee565cb1b6a8c694ce4fec3fa19902 | 946 | py | Python | jisho_scraper/anki_exporter.py | m4tx/jisho-scraper | 19d1233e4d183f36133af3fc68a5ff83bf2e1dbe | [
"MIT"
] | null | null | null | jisho_scraper/anki_exporter.py | m4tx/jisho-scraper | 19d1233e4d183f36133af3fc68a5ff83bf2e1dbe | [
"MIT"
] | 1 | 2022-02-28T19:42:21.000Z | 2022-02-28T19:42:21.000Z | jisho_scraper/anki_exporter.py | m4tx/jisho-scraper | 19d1233e4d183f36133af3fc68a5ff83bf2e1dbe | [
"MIT"
] | null | null | null | from typing import List
from jisho_scraper.anki_connect_client import AnkiConnectClient, Note
from jisho_scraper.output_prepare import OutputWord
MODEL_NAME_KANJI = 'jisho-scraper (kanji + kana + meaning)'
MODEL_NAME_NO_KANJI = 'jisho-scraper (kana + meaning)'
KANJI_FIELD_NAME = 'Kanji'
KANA_FIELD_NAME = 'Kana'
MEANI... | 32.62069 | 73 | 0.747357 |
a68249c4b4c4ac856485d306fc7e9c906a6c30eb | 3,819 | py | Python | scripts/Closure/bin/build/depstree_test.py | blq/mochikit | fed25bebe75b7bbebdd152ea7832c7b973cdbe58 | [
"AFL-2.1"
] | null | null | null | scripts/Closure/bin/build/depstree_test.py | blq/mochikit | fed25bebe75b7bbebdd152ea7832c7b973cdbe58 | [
"AFL-2.1"
] | 1 | 2018-09-09T19:59:02.000Z | 2018-09-20T17:45:37.000Z | scripts/Closure/bin/build/depstree_test.py | blq/mochikit | fed25bebe75b7bbebdd152ea7832c7b973cdbe58 | [
"AFL-2.1"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2009 The Closure Library 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/LICE... | 29.835938 | 77 | 0.634721 |
6d09022e7d8baa99aebf16a96164aaa46e12c303 | 592 | py | Python | ws/RLAgents/E_SelfPlay/play/greedy_player_mgt.py | dattaray-basab/RLGames | b12263fe7a4a246be02fc20ed20cfb9fda40d29b | [
"MIT"
] | null | null | null | ws/RLAgents/E_SelfPlay/play/greedy_player_mgt.py | dattaray-basab/RLGames | b12263fe7a4a246be02fc20ed20cfb9fda40d29b | [
"MIT"
] | null | null | null | ws/RLAgents/E_SelfPlay/play/greedy_player_mgt.py | dattaray-basab/RLGames | b12263fe7a4a246be02fc20ed20cfb9fda40d29b | [
"MIT"
] | null | null | null |
def greedy_player_mgt(game_mgr):
game_mgr = game_mgr
def fn_get_action(pieces):
valid_moves = game_mgr.fn_get_valid_moves(pieces, 1)
if valid_moves is None:
return None
candidates = []
for a in range(game_mgr.fn_get_action_size()):
if valid_moves[a]==0:... | 29.6 | 65 | 0.599662 |
d96d6864ba3e7a3ad8fabf4b2d3f092a30fd80d8 | 12,506 | py | Python | tests/integration/test_dictionaries_ddl/test.py | tianyiYoung/ClickHouse | 41012b5ba49df807af52fc17ab475a21fadda9b3 | [
"Apache-2.0"
] | 5 | 2021-05-14T02:46:44.000Z | 2021-11-23T04:58:20.000Z | tests/integration/test_dictionaries_ddl/test.py | tianyiYoung/ClickHouse | 41012b5ba49df807af52fc17ab475a21fadda9b3 | [
"Apache-2.0"
] | 5 | 2021-05-21T06:26:01.000Z | 2021-08-04T04:57:36.000Z | tests/integration/test_dictionaries_ddl/test.py | tianyiYoung/ClickHouse | 41012b5ba49df807af52fc17ab475a21fadda9b3 | [
"Apache-2.0"
] | 8 | 2021-05-12T01:38:18.000Z | 2022-02-10T06:08:41.000Z | import os
import warnings
import time
import pymysql
import pytest
from helpers.client import QueryRuntimeException
from helpers.cluster import ClickHouseCluster
SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
cluster = ClickHouseCluster(__file__)
node1 = cluster.add_instance('node1', with_mysql=True, dicti... | 38.959502 | 161 | 0.606749 |
33c76cb31583a42dd6208c619b665b385a998854 | 2,136 | py | Python | src/bo4e/com/tagesvektor.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | src/bo4e/com/tagesvektor.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | src/bo4e/com/tagesvektor.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | """
Contains Tagesvektor class and corresponding marshmallow schema for de-/serialization
"""
import datetime
from typing import List
import attr
from marshmallow import fields
from bo4e.com.com import COM, COMSchema
from bo4e.com.zeitreihenwertkompakt import Zeitreihenwertkompakt, ZeitreihenwertkompaktSchema
# pyli... | 35.016393 | 177 | 0.733614 |
18a6318bd8c258ea6a27e58e1b44f681dc85ec4c | 525 | py | Python | mortimer/src/database/models/post_mortem.py | roch1990/mortimer | 8d8ec3e369643068f6f06a9ae0785ce6372afe7a | [
"MIT"
] | null | null | null | mortimer/src/database/models/post_mortem.py | roch1990/mortimer | 8d8ec3e369643068f6f06a9ae0785ce6372afe7a | [
"MIT"
] | null | null | null | mortimer/src/database/models/post_mortem.py | roch1990/mortimer | 8d8ec3e369643068f6f06a9ae0785ce6372afe7a | [
"MIT"
] | null | null | null | from sqlalchemy import Column, Integer, String, DateTime, JSON
from sqlalchemy.orm import relationship
from src.database import Base
class PostMortem(Base):
__tablename__ = 'post_mortems'
id = Column(Integer, primary_key=True)
title = Column(String)
start_timestamp = Column(DateTime)
end_timesta... | 25 | 67 | 0.714286 |
01e8337452853fbcfb19e9421db76a46bb1c5a14 | 671 | py | Python | user_management/manage.py | abdulwahed-dev/django | f104c90fc3dd94e868a841234d5585b9ce5a61d7 | [
"MIT"
] | 1 | 2022-03-23T15:15:33.000Z | 2022-03-23T15:15:33.000Z | user_management/manage.py | abdulwahed-dev/django | f104c90fc3dd94e868a841234d5585b9ce5a61d7 | [
"MIT"
] | null | null | null | user_management/manage.py | abdulwahed-dev/django | f104c90fc3dd94e868a841234d5585b9ce5a61d7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'user_management.settings')
try:
from django.core.management import execute_from_command_line
exc... | 29.173913 | 79 | 0.682563 |
a679845248ede4c29c781cfeb7512b8486509c64 | 9,889 | py | Python | raiden/tests/integration/test_events.py | ConsenSysMesh/raiden | 76510e5535fa0a1ceb26107b560f805f3d7d26d9 | [
"MIT"
] | 3 | 2017-04-24T01:09:28.000Z | 2017-05-26T18:32:34.000Z | raiden/tests/integration/test_events.py | ConsenSysMesh/raiden | 76510e5535fa0a1ceb26107b560f805f3d7d26d9 | [
"MIT"
] | 1 | 2021-10-31T12:41:15.000Z | 2021-10-31T12:41:15.000Z | raiden/tests/integration/test_events.py | isabella232/raiden | 76510e5535fa0a1ceb26107b560f805f3d7d26d9 | [
"MIT"
] | 1 | 2021-10-31T12:05:52.000Z | 2021-10-31T12:05:52.000Z | # -*- coding: utf-8 -*-
import gevent
import pytest
from ethereum.utils import sha3
from pyethapp.jsonrpc import address_encoder
from raiden.tests.utils.transfer import (
assert_synched_channels,
channel,
pending_mediated_transfer,
)
from raiden.tests.utils.blockchain import wait_until_block
from raiden.t... | 35.571942 | 95 | 0.72434 |
81f3a47b67c33113c0f094d23bd904461ab4890c | 10,680 | py | Python | src/cool/utils/print_cil.py | matcom-compilers-2019/cool-compiler-rodrigo-alejandro-jorge | 3647846cd4c8ad83c2698cbd941efde4fdb3ac85 | [
"MIT"
] | null | null | null | src/cool/utils/print_cil.py | matcom-compilers-2019/cool-compiler-rodrigo-alejandro-jorge | 3647846cd4c8ad83c2698cbd941efde4fdb3ac85 | [
"MIT"
] | null | null | null | src/cool/utils/print_cil.py | matcom-compilers-2019/cool-compiler-rodrigo-alejandro-jorge | 3647846cd4c8ad83c2698cbd941efde4fdb3ac85 | [
"MIT"
] | null | null | null | import cool.structs.cil_ast_hierarchy as cil
from cool.utils import visitor
from cool.structs.environment import *
class CILWriterVisitor(object):
def __init__(self):
self.output = []
def emit(self, msg):
self.output.append(msg)
def black(self):
self.output.append('')
def get... | 33.271028 | 89 | 0.617884 |
0f02a470359ab2d1be3ffa2a43de78c6993f3a5d | 2,696 | py | Python | demos/compact_models.py | jacobfeder/MPh | b2828754835f5feeaad075e4b6b81c33150b77ed | [
"MIT"
] | null | null | null | demos/compact_models.py | jacobfeder/MPh | b2828754835f5feeaad075e4b6b81c33150b77ed | [
"MIT"
] | null | null | null | demos/compact_models.py | jacobfeder/MPh | b2828754835f5feeaad075e4b6b81c33150b77ed | [
"MIT"
] | null | null | null | """
Compacts Comsol models in the current folder.
Removes solution and mesh data and resets the modeling history.
Then saves the model file under its original name, effectively
compacting its size.
Processes all models it finds in the current folder. Optionally,
includes subfolders as well, if the user enter... | 27.232323 | 78 | 0.546365 |
b0c6087638924e543315caea192a38e5ec6f1c87 | 2,163 | py | Python | cnocr/consts.py | breezedeus/cnocr | 752340db8bc85c3d454452bf5d50791e5efeb032 | [
"Apache-2.0"
] | 1,562 | 2019-03-28T04:50:21.000Z | 2022-03-31T06:14:36.000Z | cnocr/consts.py | breezedeus/cnocr | 752340db8bc85c3d454452bf5d50791e5efeb032 | [
"Apache-2.0"
] | 138 | 2019-04-05T01:58:24.000Z | 2022-03-13T23:09:34.000Z | cnocr/consts.py | breezedeus/cnocr | 752340db8bc85c3d454452bf5d50791e5efeb032 | [
"Apache-2.0"
] | 349 | 2019-03-31T01:16:28.000Z | 2022-03-30T02:44:13.000Z | # coding: utf-8
# Copyright (C) 2021, [Breezedeus](https://github.com/breezedeus).
# 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 f... | 30.9 | 71 | 0.673601 |
5989c8d46187f97b666c4d111ca68a04ea5c2887 | 755 | py | Python | test/unit/test_sap_rfc_strust_exceptions.py | jakub-vaclavik-sap/sapcli | a0f40c3b2363bba0d34f705d92dd420d9adf3987 | [
"Apache-2.0"
] | 42 | 2019-01-16T13:16:09.000Z | 2022-03-23T20:13:00.000Z | test/unit/test_sap_rfc_strust_exceptions.py | jakub-vaclavik-sap/sapcli | a0f40c3b2363bba0d34f705d92dd420d9adf3987 | [
"Apache-2.0"
] | 59 | 2019-02-23T07:16:56.000Z | 2022-02-28T09:34:47.000Z | test/unit/test_sap_rfc_strust_exceptions.py | jakub-vaclavik-sap/sapcli | a0f40c3b2363bba0d34f705d92dd420d9adf3987 | [
"Apache-2.0"
] | 22 | 2019-03-12T08:15:44.000Z | 2022-01-10T03:56:47.000Z | import unittest
from sap.rfc.strust import UploadCertError, InvalidSSLStorage, PutCertificateError
class TestUploadException(unittest.TestCase):
def test_ctor_with_message(self):
ex = UploadCertError('Something has failed')
self.assertEqual(str(ex), 'Something has failed')
class TestInvalidSSL... | 26.034483 | 82 | 0.735099 |
87c814012428cb7363e0a72d7aaa4842a8dfa541 | 129 | py | Python | 10. Old Project/Projects/Sampling/wiseml/data_preparation/__init__.py | Collapse24/Work-projects | 9b84273a88eb529fd7dcca1a103b938972a36c2b | [
"MIT"
] | null | null | null | 10. Old Project/Projects/Sampling/wiseml/data_preparation/__init__.py | Collapse24/Work-projects | 9b84273a88eb529fd7dcca1a103b938972a36c2b | [
"MIT"
] | null | null | null | 10. Old Project/Projects/Sampling/wiseml/data_preparation/__init__.py | Collapse24/Work-projects | 9b84273a88eb529fd7dcca1a103b938972a36c2b | [
"MIT"
] | null | null | null | from .labeling import add_fthm_label
from .labeling import add_tbm_label
__all__ = [
'add_fthm_label',
'add_tbm_label'
] | 18.428571 | 36 | 0.751938 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.