hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c53ee6a38e510f5027c1dca7e351f88ae7ec5e09 | 2,074 | py | Python | bot/discord/models.py | meooow25/cp-discord-bot | 4d25b51f9dc4dc44105a6cebeeaea9ef1191c8c1 | [
"MIT"
] | 11 | 2018-09-03T16:50:25.000Z | 2020-07-17T05:27:25.000Z | bot/discord/models.py | meooow25/cp-discord-bot | 4d25b51f9dc4dc44105a6cebeeaea9ef1191c8c1 | [
"MIT"
] | 5 | 2018-10-08T00:18:21.000Z | 2018-11-26T22:01:40.000Z | bot/discord/models.py | meooow25/cp-discord-bot | 4d25b51f9dc4dc44105a6cebeeaea9ef1191c8c1 | [
"MIT"
] | 1 | 2018-10-09T09:30:07.000Z | 2018-10-09T09:30:07.000Z | from enum import IntEnum
class User:
__slots__ = ('id', 'username', 'discriminator', 'bot')
def __init__(self, **kwargs):
self.id = kwargs['id']
self.username = kwargs['username']
self.discriminator = kwargs['discriminator']
self.bot = kwargs.get('bot')
def to_dict(self):... | 28.805556 | 89 | 0.570395 |
ab073040268c3f9c1f83a0a241cfbf04e16a12fe | 2,665 | py | Python | src/metric/monitor_manager/mpstat.py | jonadmark/repd | 5b0dd3e67aeab4316e89a27af37497f6a91c83b3 | [
"MIT"
] | null | null | null | src/metric/monitor_manager/mpstat.py | jonadmark/repd | 5b0dd3e67aeab4316e89a27af37497f6a91c83b3 | [
"MIT"
] | 1 | 2015-08-07T01:36:36.000Z | 2015-08-07T01:36:36.000Z | src/metric/monitor_manager/mpstat.py | jonadmark/repd | 5b0dd3e67aeab4316e89a27af37497f6a91c83b3 | [
"MIT"
] | null | null | null | import threading
import time
import subprocess
class mpstat(threading.Thread):
def __init__(self, callback):
"""Form the monitor and register the monitored metrics."""
super(mpstat, self).__init__()
self.stop_flag = False
self.interval = None
self.callback = callback
... | 32.901235 | 111 | 0.577111 |
aaa6eb946c81abe7d71a61877a106642d9fa9d39 | 2,445 | py | Python | timelink/cli.py | time-link/timelink-py | 60d51bfedb64688aa7603f074d7bbc7432b5e841 | [
"MIT"
] | null | null | null | timelink/cli.py | time-link/timelink-py | 60d51bfedb64688aa7603f074d7bbc7432b5e841 | [
"MIT"
] | 3 | 2021-08-02T13:25:46.000Z | 2022-03-27T11:17:59.000Z | timelink/cli.py | time-link/timelink-py | 60d51bfedb64688aa7603f074d7bbc7432b5e841 | [
"MIT"
] | null | null | null | """Console script for timelink.
Also provides basic mhk manager functionality.
TODO consider typer https://typer.tiangolo.com
"""
import typer
import platform
from timelink.mhk.utilities import get_mhk_env, get_mhk_app_env
import docker
# We use Typer https://typer.tiangolo.com
app = typer.Typer(help="Timelink and... | 28.764706 | 70 | 0.635583 |
fd15976ed5750ee2a5edbc3ecdb0a5ccdf803e2a | 2,198 | py | Python | src/viewer/app/mixins.py | mappin/asxtrade | 2b97ffcdefae642a49ce5bfcc131db17796f1691 | [
"Apache-2.0"
] | null | null | null | src/viewer/app/mixins.py | mappin/asxtrade | 2b97ffcdefae642a49ce5bfcc131db17796f1691 | [
"Apache-2.0"
] | 1 | 2021-04-13T05:00:40.000Z | 2021-04-13T05:00:40.000Z | src/viewer/app/mixins.py | mappin/asxtrade | 2b97ffcdefae642a49ce5bfcc131db17796f1691 | [
"Apache-2.0"
] | null | null | null | from app.models import Quotation, VirtualPurchase
from bson.objectid import ObjectId
class VirtualPurchaseMixin:
"""
Retrieve the object by mongo _id for use by CRUD CBV views for VirtualPurchase's
"""
def get_object(self, queryset=None):
slug = self.kwargs.get("slug")
purchase = Vir... | 37.254237 | 120 | 0.665605 |
c2a16d6cce15f4a81ae0e997cf0db4196d76fe27 | 6,520 | bzl | Python | bazel/python_rules.bzl | fujimoto/grpc | a793d3777af43fdbd2d537d67fcbdd3c1de457bf | [
"Apache-2.0"
] | 1 | 2021-01-14T07:22:27.000Z | 2021-01-14T07:22:27.000Z | bazel/python_rules.bzl | fujimoto/grpc | a793d3777af43fdbd2d537d67fcbdd3c1de457bf | [
"Apache-2.0"
] | null | null | null | bazel/python_rules.bzl | fujimoto/grpc | a793d3777af43fdbd2d537d67fcbdd3c1de457bf | [
"Apache-2.0"
] | 4 | 2020-08-10T06:05:01.000Z | 2021-12-12T09:26:50.000Z | """Generates and compiles Python gRPC stubs from proto_library rules."""
load(
"//bazel:protobuf.bzl",
"get_include_protoc_args",
"get_plugin_args",
"get_proto_root",
"proto_path_to_generated_filename",
"protos_from_context",
"includes_from_deps",
"get_proto_arguments",
"declare_out... | 28.849558 | 80 | 0.611656 |
2c5a30e7dccbbb4af1890db401c376ccf41d3933 | 1,041 | py | Python | timeo/parameters.py | DuanraDlaw/timeo-tice | a1463e0b90cb969d4e2798879bd6af953e3dd41c | [
"MIT"
] | null | null | null | timeo/parameters.py | DuanraDlaw/timeo-tice | a1463e0b90cb969d4e2798879bd6af953e3dd41c | [
"MIT"
] | null | null | null | timeo/parameters.py | DuanraDlaw/timeo-tice | a1463e0b90cb969d4e2798879bd6af953e3dd41c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
BUS_NETWORK_CODE = '910'
def format_url(xml_key, post_params, bus_network=BUS_NETWORK_CODE):
return "http://timeo3.keolis.com/relais/{0}.php?xml={1}&{2}".\
format(bus_network, xml_key, post_params)
def get_url_all_lines():
"""
URL pour toutes les lignes.
http://timeo... | 23.659091 | 91 | 0.661864 |
cd7a9d0780a462854e6196925342bd3e98d6035d | 1,179 | py | Python | weak_disentangle/tensorsketch/modules/shape.py | dtch1997/disentangle-gen | 9c50dcb09063db018aa0090a564f96b798125a2f | [
"Apache-2.0"
] | null | null | null | weak_disentangle/tensorsketch/modules/shape.py | dtch1997/disentangle-gen | 9c50dcb09063db018aa0090a564f96b798125a2f | [
"Apache-2.0"
] | 5 | 2019-11-16T06:04:34.000Z | 2022-02-10T00:33:18.000Z | weak_disentangle/tensorsketch/modules/shape.py | dtch1997/disentangle-gen | 9c50dcb09063db018aa0090a564f96b798125a2f | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2019 The Weak Disentangle 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 applica... | 25.085106 | 74 | 0.721798 |
643116486973b29f0b7f126b1c1dd98396a65ebd | 2,300 | py | Python | day12/day12.py | imrehg/AdventOfCode2020 | 6aa5bf122fdff33f2ff97b1652ecea7f3fbb679c | [
"MIT"
] | null | null | null | day12/day12.py | imrehg/AdventOfCode2020 | 6aa5bf122fdff33f2ff97b1652ecea7f3fbb679c | [
"MIT"
] | null | null | null | day12/day12.py | imrehg/AdventOfCode2020 | 6aa5bf122fdff33f2ff97b1652ecea7f3fbb679c | [
"MIT"
] | null | null | null | import sys
dirs = ["E", "S", "W", "N"]
class Ship:
def __init__(self):
self.loc = [0, 0]
self.facing = "E"
def follow_instruction(self, instruction):
direction = instruction[0]
value = int(instruction[1:])
if direction == "F":
direction = self.facing
... | 27.380952 | 76 | 0.5 |
a70265a9fabf8259f80a0f70f42b9534c29197a5 | 4,475 | py | Python | project 3/src/project3_submission.py | gttm/eth-machine-learning | 68ce17dcf0eff736c56c410a0e77eba58bedfed5 | [
"MIT"
] | null | null | null | project 3/src/project3_submission.py | gttm/eth-machine-learning | 68ce17dcf0eff736c56c410a0e77eba58bedfed5 | [
"MIT"
] | null | null | null | project 3/src/project3_submission.py | gttm/eth-machine-learning | 68ce17dcf0eff736c56c410a0e77eba58bedfed5 | [
"MIT"
] | 1 | 2018-10-12T23:07:33.000Z | 2018-10-12T23:07:33.000Z | import sys
import ast
import numpy as np
from sklearn.feature_selection import SelectKBest
from sklearn.decomposition import PCA
from sklearn.preprocessing import StandardScaler
from sklearn.metrics import hamming_loss, make_scorer
from scipy.stats import expon, uniform, randint
from sklearn.svm import SVC
from sklearn... | 41.055046 | 185 | 0.777654 |
cb9e177cad0f93628456c464ea07f64ddca7fa35 | 1,008 | py | Python | tests/spiders/spider_test.py | SamRozen/cafe-crawl | c310b45a9c9e2be85188c9b3c2b3676be3408501 | [
"MIT"
] | null | null | null | tests/spiders/spider_test.py | SamRozen/cafe-crawl | c310b45a9c9e2be85188c9b3c2b3676be3408501 | [
"MIT"
] | null | null | null | tests/spiders/spider_test.py | SamRozen/cafe-crawl | c310b45a9c9e2be85188c9b3c2b3676be3408501 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import unittest
from tests.responses.file_response import response_from_file
class SpiderTest(unittest.TestCase):
url = ''
spider_name = ''
name = ''
brand = ''
description = ''
image = ''
price = ''
size = ''
spider = None
def _test_item(self, item):
... | 29.647059 | 63 | 0.624008 |
c99419a33808b70db774ee367acc6c7baf181714 | 6,508 | py | Python | pyquil/api/_devices.py | yaoyongxin/pyquil | b77faefab2740b51d538709ae6439a84ddab48b8 | [
"Apache-2.0"
] | 1 | 2020-06-13T10:40:15.000Z | 2020-06-13T10:40:15.000Z | pyquil/api/_devices.py | yaoyongxin/pyquil | b77faefab2740b51d538709ae6439a84ddab48b8 | [
"Apache-2.0"
] | null | null | null | pyquil/api/_devices.py | yaoyongxin/pyquil | b77faefab2740b51d538709ae6439a84ddab48b8 | [
"Apache-2.0"
] | null | null | null | ##############################################################################
# Copyright 2018 Rigetti Computing
#
# 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://ww... | 40.42236 | 100 | 0.657498 |
8c210c62ec8697d5a906b18cea6525658d7d6933 | 4,921 | py | Python | Dependencies/gyp-master/test/defines-escaping/gyptest-defines-escaping.py | knight666/exlibris | b21b46e0c84e5c4f81f8048022cda88e7bb3dca2 | [
"MIT"
] | null | null | null | Dependencies/gyp-master/test/defines-escaping/gyptest-defines-escaping.py | knight666/exlibris | b21b46e0c84e5c4f81f8048022cda88e7bb3dca2 | [
"MIT"
] | null | null | null | Dependencies/gyp-master/test/defines-escaping/gyptest-defines-escaping.py | knight666/exlibris | b21b46e0c84e5c4f81f8048022cda88e7bb3dca2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2010 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies build of an executable with C++ define specified by a gyp define using
various special characters such as quotes, comma... | 26.6 | 81 | 0.601301 |
480888c90a9c108b00eb56be2c34edf4ad7cab0f | 21,851 | py | Python | mapreduce/lib/blobstore/blobstore.py | igeeker/v2ex | 9fa81f7c82aa7d162a924d357494b241eb8a6207 | [
"BSD-3-Clause"
] | 161 | 2019-07-23T06:53:45.000Z | 2022-03-24T01:07:19.000Z | mapreduce/lib/blobstore/blobstore.py | igeeker/v2ex | 9fa81f7c82aa7d162a924d357494b241eb8a6207 | [
"BSD-3-Clause"
] | null | null | null | mapreduce/lib/blobstore/blobstore.py | igeeker/v2ex | 9fa81f7c82aa7d162a924d357494b241eb8a6207 | [
"BSD-3-Clause"
] | 26 | 2019-08-05T06:09:38.000Z | 2021-07-08T02:05:13.000Z | #!/usr/bin/env python
#
# Copyright 2007 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 o... | 31.038352 | 80 | 0.687932 |
78c39b2cc3b176cedaf1da6c71f0ed5fb71a7e89 | 14,439 | py | Python | ja3toMISP.py | eCrimeLabs/ja3toMISP | 41b9ffe0f61fec92859450beeee0942af7c51a16 | [
"MIT"
] | 8 | 2018-12-30T17:02:08.000Z | 2021-10-05T17:26:14.000Z | ja3toMISP.py | eCrimeLabs/ja3toMISP | 41b9ffe0f61fec92859450beeee0942af7c51a16 | [
"MIT"
] | null | null | null | ja3toMISP.py | eCrimeLabs/ja3toMISP | 41b9ffe0f61fec92859450beeee0942af7c51a16 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""Generate JA3 fingerprints from PCAPs using Python3.
and then either add to an existing event or create
new event with the information from the PCAP's
The calculation of the JA3 fingerprint is originally from:
https://github.com/salesforce/ja3/blob/master/python/ja3/ja3.py
MIT... | 37.897638 | 121 | 0.630445 |
6703bd4fdf510cf5b7e1b97c245629980a8e26c6 | 6,434 | py | Python | src/ZServer/Zope2/utilities/zpasswd.py | gogobd/ZServer | d85912680297f67138ebe38409fcb36068b37c3d | [
"ZPL-2.1"
] | 4 | 2017-08-01T15:06:47.000Z | 2020-04-19T05:22:13.000Z | src/ZServer/Zope2/utilities/zpasswd.py | gogobd/ZServer | d85912680297f67138ebe38409fcb36068b37c3d | [
"ZPL-2.1"
] | 12 | 2017-06-21T03:56:04.000Z | 2021-03-29T05:47:10.000Z | src/ZServer/Zope2/utilities/zpasswd.py | gogobd/ZServer | d85912680297f67138ebe38409fcb36068b37c3d | [
"ZPL-2.1"
] | 7 | 2017-05-12T07:30:54.000Z | 2020-10-08T01:51:50.000Z | ##############################################################################
#
# Copyright (c) 2001,2002 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THI... | 27.852814 | 78 | 0.57709 |
3a5fc479e72087570045846b38ea35d29a5bdf29 | 86 | py | Python | 2020/network/network/apps.py | 133794m3r/cs50-web | 1f695cd7fb4ec368ec45e0d3154dd7eebc2c81e2 | [
"MIT"
] | null | null | null | 2020/network/network/apps.py | 133794m3r/cs50-web | 1f695cd7fb4ec368ec45e0d3154dd7eebc2c81e2 | [
"MIT"
] | null | null | null | 2020/network/network/apps.py | 133794m3r/cs50-web | 1f695cd7fb4ec368ec45e0d3154dd7eebc2c81e2 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class NetworkConfig(AppConfig):
name = 'network'
| 14.333333 | 33 | 0.77907 |
7383da232cb654ff4d7a8f7fb2c5799569799c2b | 3,617 | py | Python | tests/gold_tests/tls_hooks/tls_hooks.test.py | heroku-miraheze/trafficserver | b4c9cf1668c5b464064c336800e049c11e659929 | [
"Apache-2.0"
] | 1 | 2020-04-20T14:06:36.000Z | 2020-04-20T14:06:36.000Z | tests/gold_tests/tls_hooks/tls_hooks.test.py | heroku-miraheze/trafficserver | b4c9cf1668c5b464064c336800e049c11e659929 | [
"Apache-2.0"
] | 3 | 2017-09-22T19:18:56.000Z | 2021-06-21T18:07:14.000Z | tests/gold_tests/tls_hooks/tls_hooks.test.py | heroku-miraheze/trafficserver | b4c9cf1668c5b464064c336800e049c11e659929 | [
"Apache-2.0"
] | 1 | 2020-03-13T00:17:20.000Z | 2020-03-13T00:17:20.000Z | '''
Test 1 preaccept callback (without delay)
'''
# 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 Apach... | 47.592105 | 332 | 0.743434 |
e631b9b9205dbfd543b8508ea9281dbb258ee4c0 | 1,430 | py | Python | Coursera/Parte 1/Desafios/Semana 3/bhaskara.py | Digitalen-Brasil/Python | 39bcdfc95596ffe7d40f593faed44a87633e56f5 | [
"MIT"
] | null | null | null | Coursera/Parte 1/Desafios/Semana 3/bhaskara.py | Digitalen-Brasil/Python | 39bcdfc95596ffe7d40f593faed44a87633e56f5 | [
"MIT"
] | null | null | null | Coursera/Parte 1/Desafios/Semana 3/bhaskara.py | Digitalen-Brasil/Python | 39bcdfc95596ffe7d40f593faed44a87633e56f5 | [
"MIT"
] | 1 | 2021-04-09T14:50:13.000Z | 2021-04-09T14:50:13.000Z | # Programa para encontrar raiz quadrada de uma função de segundo grau
import math
print('A forma geral da equação de segundo grau é: \033[1max² + bx - c = 0\033[m'
'\n"a", "b" e "c" são os valores constantes da equação, ou seja, os valores conhecidos.\n')
# Entrada das constantes pelo usuário
a = float(input('Q... | 38.648649 | 104 | 0.633566 |
1d94257dc7ba02feb691251661e7c99dd9551343 | 12,268 | py | Python | pysnmp/CISCO-SWITCH-ENGINE-CAPABILITY.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/CISCO-SWITCH-ENGINE-CAPABILITY.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/CISCO-SWITCH-ENGINE-CAPABILITY.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module CISCO-SWITCH-ENGINE-CAPABILITY (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-SWITCH-ENGINE-CAPABILITY
# Produced by pysmi-0.3.4 at Mon Apr 29 17:56:43 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python ... | 105.758621 | 1,192 | 0.726606 |
d3144bd874464433a57f8a8e41f2b6c6bbc81dd6 | 1,703 | py | Python | output/models/ibm_data/mixed/assertions/test17_xsd/test17.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 1 | 2021-08-14T17:59:21.000Z | 2021-08-14T17:59:21.000Z | output/models/ibm_data/mixed/assertions/test17_xsd/test17.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 4 | 2020-02-12T21:30:44.000Z | 2020-04-15T20:06:46.000Z | output/models/ibm_data/mixed/assertions/test17_xsd/test17.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | null | null | null | from dataclasses import dataclass, field
from typing import Optional
@dataclass
class X:
a: Optional[str] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
}
)
b: Optional[str] = field(
default=None,
metadata={
... | 18.922222 | 40 | 0.413388 |
3d16f68db202a4326087c3fe4fc5eb17887abe17 | 270 | py | Python | python/p215.py | forewing/lc | 314468a1a3bb7d38eccf1f34b0d1b7da04a34784 | [
"CC0-1.0"
] | null | null | null | python/p215.py | forewing/lc | 314468a1a3bb7d38eccf1f34b0d1b7da04a34784 | [
"CC0-1.0"
] | null | null | null | python/p215.py | forewing/lc | 314468a1a3bb7d38eccf1f34b0d1b7da04a34784 | [
"CC0-1.0"
] | null | null | null | import heapq
class Solution:
def findKthLargest(self, nums: List[int], k: int) -> int:
q = [nums[i] for i in range(k)]
heapq.heapify(q)
for i in range(k, len(nums)):
heapq.heappushpop(q, nums[i])
return heapq.heappop(q)
| 24.545455 | 61 | 0.57037 |
acca6ad659a4c2908743f08112b052f8e95483b5 | 5,479 | py | Python | run_classifier.py | mikuh/bert-tf2-keras | e361a0e7dc9fa0d64c48ac41320d302599dba025 | [
"MIT"
] | 4 | 2020-06-21T15:48:40.000Z | 2022-01-24T05:10:59.000Z | run_classifier.py | mikuh/bert-tf2-keras | e361a0e7dc9fa0d64c48ac41320d302599dba025 | [
"MIT"
] | null | null | null | run_classifier.py | mikuh/bert-tf2-keras | e361a0e7dc9fa0d64c48ac41320d302599dba025 | [
"MIT"
] | 3 | 2020-07-20T07:11:27.000Z | 2022-01-24T05:11:21.000Z | import tensorflow as tf
from utils import performance
from utils import optimization
from utils import keras_utils
from utils.data_utils import create_classifier_dataset
from utils import distribution_utils
from models import BertClassifier
from configs import AlbertConfig, BertConfig
import math
import os
import time
... | 39.417266 | 130 | 0.691185 |
9ac88c8e168aca6f563a302886691f74debe2a89 | 113 | py | Python | javalang/__init__.py | fermadeiral/javalang | 1d6ba16f21d5daa5ac663e898437402e6b420763 | [
"MIT"
] | null | null | null | javalang/__init__.py | fermadeiral/javalang | 1d6ba16f21d5daa5ac663e898437402e6b420763 | [
"MIT"
] | 1 | 2018-05-07T10:05:34.000Z | 2018-05-17T23:52:12.000Z | javalang/javalang/__init__.py | DarthPumpkin/github-search | 2dc8489380825b83e2d2773bc32d439bd30e1d00 | [
"MIT"
] | 1 | 2021-12-02T13:15:38.000Z | 2021-12-02T13:15:38.000Z |
from . import parser
from . import parse
from . import tokenizer
from . import javadoc
__version__ = "0.11.0"
| 12.555556 | 23 | 0.725664 |
5e7af1f4aedb1ed406e98438cda5ed7c2952ab02 | 6,431 | py | Python | nacc/uds3/blanks.py | utsw-bicf/nacculator | 1e8eb9b4029c7c52b242c76f941a1572577d300e | [
"BSD-2-Clause"
] | null | null | null | nacc/uds3/blanks.py | utsw-bicf/nacculator | 1e8eb9b4029c7c52b242c76f941a1572577d300e | [
"BSD-2-Clause"
] | 20 | 2020-05-20T16:04:13.000Z | 2020-07-28T16:10:15.000Z | nacc/uds3/blanks.py | utsw-bicf/nacculator | 1e8eb9b4029c7c52b242c76f941a1572577d300e | [
"BSD-2-Clause"
] | null | null | null | ###############################################################################
# Copyright 2015-2016 University of Florida. All rights reserved.
# This file is part of UF CTS-IT's NACCulator project.
# Use of this source code is governed by the license found in the LICENSE file.
#######################################... | 34.207447 | 79 | 0.594309 |
37359f423e388469d10c28e755ee0e0c9e920b13 | 423 | py | Python | local_run.py | kfriedrichs/slurk | c46a4e4b3641ceaf383e2533d2463e8b7ae2c0b3 | [
"BSD-3-Clause"
] | null | null | null | local_run.py | kfriedrichs/slurk | c46a4e4b3641ceaf383e2533d2463e8b7ae2c0b3 | [
"BSD-3-Clause"
] | null | null | null | local_run.py | kfriedrichs/slurk | c46a4e4b3641ceaf383e2533d2463e8b7ae2c0b3 | [
"BSD-3-Clause"
] | 1 | 2021-11-19T18:14:04.000Z | 2021-11-19T18:14:04.000Z | import os
from gevent import monkey
monkey.patch_all(subprocess=True)
os.environ["SECRET_KEY"] = "TEST"
os.environ["DEBUG"] = "True"
from app import app, socketio
if __name__ == '__main__':
host = os.environ.get('HOST', '0.0.0.0')
port = int(os.environ.get('PORT', 5000))
socketio.run(app, host, port,
... | 26.4375 | 104 | 0.654846 |
7347948ec0a7c88998d446436b0a93d3ec9516ab | 7,451 | py | Python | sizes.py | Les-Bell/eipaddress | 52a04483f08d83c6da7894a7c2f677f1075f7097 | [
"MIT"
] | 1 | 2021-03-08T09:39:24.000Z | 2021-03-08T09:39:24.000Z | sizes.py | Les-Bell/eipaddress | 52a04483f08d83c6da7894a7c2f677f1075f7097 | [
"MIT"
] | null | null | null | sizes.py | Les-Bell/eipaddress | 52a04483f08d83c6da7894a7c2f677f1075f7097 | [
"MIT"
] | null | null | null | """Report the size of an object, including the objects it contains.
This is based on a post by Aaron Hall, at the URL
https://stackoverflow.com/questions/449560/how-do-i-determine-the-size-of-an-object-in-python/450034
with many improvements:
* include __slots__ from base classes
* include __dict__ from bas... | 35.650718 | 104 | 0.582472 |
d2f14600c7275f84072a921aa4cbb5e595aa37d4 | 125,462 | py | Python | mrcnn/model.py | tommywu6/Mask_RCNN_Demo | 11b7e343ab5e209234996414a3191c52c9d61634 | [
"MIT"
] | null | null | null | mrcnn/model.py | tommywu6/Mask_RCNN_Demo | 11b7e343ab5e209234996414a3191c52c9d61634 | [
"MIT"
] | null | null | null | mrcnn/model.py | tommywu6/Mask_RCNN_Demo | 11b7e343ab5e209234996414a3191c52c9d61634 | [
"MIT"
] | null | null | null | """
Mask R-CNN
The main Mask R-CNN model implemenetation.
Copyright (c) 2017 Matterport, Inc.
Licensed under the MIT License (see LICENSE for details)
Written by Waleed Abdulla
"""
# change related API to make this file run mark rcnn demo competible
import os
import random
import datetime
import re
import math
impor... | 43.975464 | 115 | 0.610711 |
1b6692405b95e417889a24f63b6359f77f638602 | 37,864 | py | Python | absl/testing/tests/xml_reporter_test.py | em10100/abseil-py | 0f86230d77cd90ea1236f0cbee4df9a9b290ef66 | [
"Apache-2.0"
] | 1 | 2021-12-15T12:06:15.000Z | 2021-12-15T12:06:15.000Z | absl/testing/tests/xml_reporter_test.py | em10100/abseil-py | 0f86230d77cd90ea1236f0cbee4df9a9b290ef66 | [
"Apache-2.0"
] | null | null | null | absl/testing/tests/xml_reporter_test.py | em10100/abseil-py | 0f86230d77cd90ea1236f0cbee4df9a9b290ef66 | [
"Apache-2.0"
] | 1 | 2022-02-06T03:02:19.000Z | 2022-02-06T03:02:19.000Z | # Copyright 2017 The Abseil 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 agreed to in ... | 33.360352 | 173 | 0.630652 |
b9cd338c7357dcf06528eb38e83a7ebc2fe42dcc | 1,657 | py | Python | steamctl/commands/hlmaster/__init__.py | rossengeorgiev/steamctl | c33680cf33ccf4c060e44eb6415a8b8c2cf8c672 | [
"MIT"
] | 138 | 2019-07-19T19:29:10.000Z | 2022-03-28T08:30:55.000Z | steamctl/commands/hlmaster/__init__.py | PixelSymbols/steamctl | 4d6b19a921a4db521ed6e0d05a1dae2458441a9a | [
"MIT"
] | 35 | 2019-06-23T23:10:19.000Z | 2022-03-13T04:28:13.000Z | steamctl/commands/hlmaster/__init__.py | PixelSymbols/steamctl | 4d6b19a921a4db521ed6e0d05a1dae2458441a9a | [
"MIT"
] | 9 | 2019-08-15T13:17:38.000Z | 2022-03-15T23:48:47.000Z |
from steamctl.argparser import register_command
@register_command('hlmaster', help='Query master server and server information')
def setup_arg_parser(cp):
def print_help(*args, **kwargs):
cp.print_help()
cp.set_defaults(_cmd_func=print_help)
sub_cp = cp.add_subparsers(metavar='<subcommand>',
... | 53.451613 | 134 | 0.665057 |
3365d4394ff61c185b993ed45296385dd6cfccf8 | 695 | py | Python | graves_n_civil_registry/deceased.py | victorbrittoferreira/civil_n_graves_registry | 50ad7c72d1d39b9973af69615f85965520a4cb0c | [
"MIT"
] | 2 | 2021-11-10T03:13:56.000Z | 2021-11-21T20:17:37.000Z | graves_n_civil_registry/deceased.py | victorbrittoferreira/civil_n_graves_registry | 50ad7c72d1d39b9973af69615f85965520a4cb0c | [
"MIT"
] | null | null | null | graves_n_civil_registry/deceased.py | victorbrittoferreira/civil_n_graves_registry | 50ad7c72d1d39b9973af69615f85965520a4cb0c | [
"MIT"
] | null | null | null | import datetime
from obituary import Obituary
class Deceased:
def __init__(self , obituary, buried : bool ) -> None:
self.obituary = obituary
self.buried = buried
self.dead_status = []
def dead_status_update(self, updating):
#now = datetime.datetime.today()
updating... | 22.419355 | 62 | 0.640288 |
1c73fc22984d9cc31c7d3a5c14d251bfa694892e | 766 | py | Python | libs/pytorch_geometric/torch_geometric/transforms/remove_training_classes.py | MoritzSchueler96/TUM_ADLCV_Deep_Metric_Learning | 365d1609de044ba8498d3add808274f6f2d02d2b | [
"MIT"
] | null | null | null | libs/pytorch_geometric/torch_geometric/transforms/remove_training_classes.py | MoritzSchueler96/TUM_ADLCV_Deep_Metric_Learning | 365d1609de044ba8498d3add808274f6f2d02d2b | [
"MIT"
] | null | null | null | libs/pytorch_geometric/torch_geometric/transforms/remove_training_classes.py | MoritzSchueler96/TUM_ADLCV_Deep_Metric_Learning | 365d1609de044ba8498d3add808274f6f2d02d2b | [
"MIT"
] | null | null | null | from typing import List
from torch_geometric.data import Data
from torch_geometric.transforms import BaseTransform
class RemoveTrainingClasses(BaseTransform):
r"""Removes classes from the node-level training set as given by
:obj:`data.train_mask`, *e.g.*, in order to get a zero-shot label scenario.
Args... | 30.64 | 79 | 0.671018 |
badabc24b5e6446084e22497cc3a410c18221ce5 | 2,914 | py | Python | demos/power_based_salinet_components_sensetivity_multiprocess.py | AlexanderHoogsteyn/PhaseIdentification | 0ef49456e16dbc5481c324b1ae7340518e1511b6 | [
"MIT"
] | 1 | 2020-11-10T09:18:36.000Z | 2020-11-10T09:18:36.000Z | demos/power_based_salinet_components_sensetivity_multiprocess.py | AlexanderHoogsteyn/PhaseIdentification | 0ef49456e16dbc5481c324b1ae7340518e1511b6 | [
"MIT"
] | null | null | null | demos/power_based_salinet_components_sensetivity_multiprocess.py | AlexanderHoogsteyn/PhaseIdentification | 0ef49456e16dbc5481c324b1ae7340518e1511b6 | [
"MIT"
] | null | null | null | import sys
from os.path import dirname
sys.path.append(dirname("../src/"))
from PhaseIdentification.powerBasedPhaseIdentification import *
from PhaseIdentification.common import *
import matplotlib.pyplot as plt
import multiprocessing
"""
##################################################
DEMO 3
Influence of voltage ... | 35.108434 | 107 | 0.637612 |
794e0b91c7d4e89e92ab1c32d213aca185c2f386 | 142 | py | Python | zeus/api/schemas/token.py | conrad-kronos/zeus | ddb6bc313e51fb22222b30822b82d76f37dbbd35 | [
"Apache-2.0"
] | 221 | 2017-07-03T17:29:21.000Z | 2021-12-07T19:56:59.000Z | zeus/api/schemas/token.py | conrad-kronos/zeus | ddb6bc313e51fb22222b30822b82d76f37dbbd35 | [
"Apache-2.0"
] | 298 | 2017-07-04T18:08:14.000Z | 2022-03-03T22:24:51.000Z | zeus/api/schemas/token.py | conrad-kronos/zeus | ddb6bc313e51fb22222b30822b82d76f37dbbd35 | [
"Apache-2.0"
] | 24 | 2017-07-15T13:46:45.000Z | 2020-08-16T16:14:45.000Z | from marshmallow import Schema, fields
class TokenSchema(Schema):
id = fields.UUID(dump_only=True)
key = fields.Str(dump_only=True)
| 20.285714 | 38 | 0.739437 |
e16370c2119222124777abe3b5eb244d34d375f3 | 147 | py | Python | jarviscli/plugins/gui.py | Ismail8Ahmed/Jarvis | f3f45c5f1b208f3897929a3d366ae73bee09fba5 | [
"MIT"
] | null | null | null | jarviscli/plugins/gui.py | Ismail8Ahmed/Jarvis | f3f45c5f1b208f3897929a3d366ae73bee09fba5 | [
"MIT"
] | null | null | null | jarviscli/plugins/gui.py | Ismail8Ahmed/Jarvis | f3f45c5f1b208f3897929a3d366ae73bee09fba5 | [
"MIT"
] | null | null | null | from guizero import App, Text, PushButton
@plugin("helloworld")
def helloworld(jarvis, s):
"""Repeats what you type"""
jarvis.say(s)
| 18.375 | 41 | 0.666667 |
93838491b43a7a7233d45433e737652e51808830 | 13,612 | py | Python | amptk/process_illumina_raw.py | nextgenusfs/amptk | 067365ed7baae5b0df0d4309680469792db161e3 | [
"BSD-2-Clause"
] | 30 | 2017-02-09T20:43:43.000Z | 2022-02-01T04:28:59.000Z | amptk/process_illumina_raw.py | nextgenusfs/amptk | 067365ed7baae5b0df0d4309680469792db161e3 | [
"BSD-2-Clause"
] | 75 | 2017-02-04T19:12:05.000Z | 2022-03-01T19:56:36.000Z | amptk/process_illumina_raw.py | nextgenusfs/amptk | 067365ed7baae5b0df0d4309680469792db161e3 | [
"BSD-2-Clause"
] | 9 | 2017-05-12T13:39:10.000Z | 2021-11-16T19:09:08.000Z | #!/usr/bin/env python
from __future__ import (absolute_import, division,
print_function, unicode_literals)
import sys
import os
import argparse
import shutil
import multiprocessing
import glob
import itertools
import re
from natsort import natsorted
from amptk import amptklib
class MyFormatter... | 48.269504 | 138 | 0.650088 |
ef182bfe2a233dca5df06b23860b51d66e2f4d06 | 8,167 | bzl | Python | tools/bzl/gwt.bzl | balag91/gerrit | 7c140198e2bc27b220aeb5ea3eecd05d1fee49b6 | [
"Apache-2.0"
] | null | null | null | tools/bzl/gwt.bzl | balag91/gerrit | 7c140198e2bc27b220aeb5ea3eecd05d1fee49b6 | [
"Apache-2.0"
] | null | null | null | tools/bzl/gwt.bzl | balag91/gerrit | 7c140198e2bc27b220aeb5ea3eecd05d1fee49b6 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2016 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 26.777049 | 105 | 0.61271 |
34f9755ce0ef06c4fb11053944eb0622094e7a6f | 4,000 | py | Python | manila/api/v2/share_instances.py | kpawar89/manila | d487c2db728cedf8357b9f4acbc0a45c21c3a83e | [
"Apache-2.0"
] | 159 | 2015-01-02T09:35:15.000Z | 2022-01-04T11:51:34.000Z | manila/api/v2/share_instances.py | kpawar89/manila | d487c2db728cedf8357b9f4acbc0a45c21c3a83e | [
"Apache-2.0"
] | 6 | 2021-02-11T16:09:43.000Z | 2022-03-15T09:56:25.000Z | manila/api/v2/share_instances.py | kpawar89/manila | d487c2db728cedf8357b9f4acbc0a45c21c3a83e | [
"Apache-2.0"
] | 128 | 2015-01-05T22:52:28.000Z | 2021-12-29T14:00:58.000Z | # Copyright 2015 Mirantis Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | 34.782609 | 78 | 0.6885 |
dbbb0ae1c7144a6683ff233b0993886c90b7fe6b | 6,104 | py | Python | auth/scopes.py | anwarchk/quay | 23c5120790c619174e7d36784ca5aab7f4eece5c | [
"Apache-2.0"
] | 1 | 2021-05-30T01:54:21.000Z | 2021-05-30T01:54:21.000Z | auth/scopes.py | anwarchk/quay | 23c5120790c619174e7d36784ca5aab7f4eece5c | [
"Apache-2.0"
] | 20 | 2019-12-26T17:32:34.000Z | 2022-03-21T22:18:06.000Z | auth/scopes.py | anwarchk/quay | 23c5120790c619174e7d36784ca5aab7f4eece5c | [
"Apache-2.0"
] | 1 | 2020-05-31T16:28:40.000Z | 2020-05-31T16:28:40.000Z | from collections import namedtuple
import features
import re
Scope = namedtuple('scope', ['scope', 'icon', 'dangerous', 'title', 'description'])
READ_REPO = Scope(scope='repo:read',
icon='fa-hdd-o',
dangerous=False,
title='View all visible repositories',
... | 41.52381 | 99 | 0.591088 |
c151de5fe443434b44e383c56c6f1575518ac534 | 6,103 | py | Python | main.py | MoeZilla/NSFW-USERBOT | 7e91c99bb86f076d59d501a3888d3c4019ae5729 | [
"MIT"
] | 4 | 2021-07-10T12:46:46.000Z | 2021-12-05T08:33:12.000Z | main.py | MoeZilla/NSFW-USERBOT | 7e91c99bb86f076d59d501a3888d3c4019ae5729 | [
"MIT"
] | null | null | null | main.py | MoeZilla/NSFW-USERBOT | 7e91c99bb86f076d59d501a3888d3c4019ae5729 | [
"MIT"
] | 2 | 2021-12-05T08:33:13.000Z | 2022-02-24T18:27:06.000Z | import os
from pyrogram import Client, filters
import rapidjson as json
import requests
import time
StartTime = time.time()
API_ID = os.environ.get("API_ID", None)
API_HASH = os.environ.get("API_HASH", None)
SESSION = os.environ.get("SESSION", None)
PREFIX = os.environ.get("PREFIX", None)
app = Client(
s... | 32.462766 | 93 | 0.690972 |
f77be3d10e8dd22f6055cf226ece5749f04386d5 | 2,716 | py | Python | tests/unit/test_r.py | xhochy/repo2docker | 67412908b7e5b2cff04789876739e382d1e164ae | [
"BSD-3-Clause"
] | null | null | null | tests/unit/test_r.py | xhochy/repo2docker | 67412908b7e5b2cff04789876739e382d1e164ae | [
"BSD-3-Clause"
] | 2 | 2019-02-13T20:59:41.000Z | 2020-02-12T12:54:15.000Z | tests/unit/test_r.py | xhochy/repo2docker | 67412908b7e5b2cff04789876739e382d1e164ae | [
"BSD-3-Clause"
] | null | null | null | from datetime import date
import pytest
from repo2docker import buildpacks
def test_unsupported_version(tmpdir):
tmpdir.chdir()
with open("runtime.txt", "w") as f:
f.write("r-3.8-2019-01-01")
r = buildpacks.RBuildPack()
with pytest.raises(ValueError) as excinfo:
# access the proper... | 24.690909 | 83 | 0.618189 |
7528c247515242b65b86949407dc37010241f279 | 819 | py | Python | setup.py | codeswhite/stargen | 440721e9d54cb1eb830f7ece1dc6b8df731fbae8 | [
"MIT"
] | null | null | null | setup.py | codeswhite/stargen | 440721e9d54cb1eb830f7ece1dc6b8df731fbae8 | [
"MIT"
] | 2 | 2021-01-14T13:00:41.000Z | 2021-01-14T13:26:15.000Z | setup.py | codeswhite/stargen | 440721e9d54cb1eb830f7ece1dc6b8df731fbae8 | [
"MIT"
] | 1 | 2020-09-28T18:16:21.000Z | 2020-09-28T18:16:21.000Z | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="stargen",
version="0.8.6",
description="Framework for wordlist generation, combination and expansion",
url="https://github.com/codeswhite/stargen",
classifiers=[
"Programming Langu... | 26.419355 | 79 | 0.628816 |
29c72ace7e915ad9601368a1620c242256b76367 | 12,511 | py | Python | packages/python/plotly/plotly/validators/_funnelarea.py | TitouenDCL/plotly.py | 0c98391f575dab0e3f08ede907045cc72b3d40a4 | [
"MIT"
] | 11,750 | 2015-10-12T07:03:39.000Z | 2022-03-31T20:43:15.000Z | packages/python/plotly/plotly/validators/_funnelarea.py | TitouenDCL/plotly.py | 0c98391f575dab0e3f08ede907045cc72b3d40a4 | [
"MIT"
] | 2,951 | 2015-10-12T00:41:25.000Z | 2022-03-31T22:19:26.000Z | packages/python/plotly/plotly/validators/_funnelarea.py | TitouenDCL/plotly.py | 0c98391f575dab0e3f08ede907045cc72b3d40a4 | [
"MIT"
] | 2,623 | 2015-10-15T14:40:27.000Z | 2022-03-28T16:05:50.000Z | import _plotly_utils.basevalidators
class FunnelareaValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="funnelarea", parent_name="", **kwargs):
super(FunnelareaValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | 48.492248 | 75 | 0.546799 |
f38f2b0df1ea0a447150c075643cca82a66e2f1f | 26,177 | py | Python | corehq/apps/app_manager/tests/test_report_config.py | omari-funzone/commcare-hq | 5edb462c891fc08e51c4babd7acdf12c0006a602 | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/app_manager/tests/test_report_config.py | omari-funzone/commcare-hq | 5edb462c891fc08e51c4babd7acdf12c0006a602 | [
"BSD-3-Clause"
] | 34 | 2020-12-11T18:51:17.000Z | 2022-02-21T10:13:26.000Z | corehq/apps/app_manager/tests/test_report_config.py | omari-funzone/commcare-hq | 5edb462c891fc08e51c4babd7acdf12c0006a602 | [
"BSD-3-Clause"
] | null | null | null | import os
from collections import OrderedDict
from xml.etree import cElementTree as ElementTree
from django.test import SimpleTestCase, TestCase
import mock
from casexml.apps.phone.tests.utils import (
call_fixture_generator,
create_restore_user,
)
from corehq.apps.app_manager.const import MOBILE_UCR_VERSIO... | 42.564228 | 465 | 0.609428 |
c4c0099babc89d65a186de6b33dece415e74b6fb | 1,108 | py | Python | RDSV/build_sets.py | JeffT13/rd-diarization | 5fcf70f1a2b3f15de3cc66e3686844c6eacb4f15 | [
"Apache-2.0"
] | 3 | 2021-03-31T03:38:54.000Z | 2021-05-05T05:46:18.000Z | RDSV/build_sets.py | JeffT13/rd-diarization | 5fcf70f1a2b3f15de3cc66e3686844c6eacb4f15 | [
"Apache-2.0"
] | null | null | null | RDSV/build_sets.py | JeffT13/rd-diarization | 5fcf70f1a2b3f15de3cc66e3686844c6eacb4f15 | [
"Apache-2.0"
] | null | null | null | import os, sys, json, random
from math import floor
from param import *
cases = os.listdir(audio_path)
r_set = []
d_set = []
t_set = []
for d in train_dockets:
dock = [a for a in cases if a[:2]==d]
if seed is not None:
random.Random(seed).shuffle(dock)
else:
random.Random().shuffle(dock)
... | 24.086957 | 55 | 0.631769 |
2918a733ab0ad0ecfadfadd2fee94ff41e1dc61e | 11,650 | py | Python | mongo_connector/doc_managers/mongo_doc_manager.py | vurankar/mongo-connector | 202aa28743855643fddd77d3e66bf1a640df3ed6 | [
"Apache-2.0"
] | 2 | 2018-09-20T15:52:48.000Z | 2021-04-25T07:20:38.000Z | mongo_connector/doc_managers/mongo_doc_manager.py | vurankar/mongo-connector | 202aa28743855643fddd77d3e66bf1a640df3ed6 | [
"Apache-2.0"
] | 13 | 2017-08-07T04:36:25.000Z | 2021-02-08T17:37:27.000Z | mongo_connector/doc_managers/mongo_doc_manager.py | vurankar/mongo-connector | 202aa28743855643fddd77d3e66bf1a640df3ed6 | [
"Apache-2.0"
] | 4 | 2018-10-22T17:30:46.000Z | 2020-07-07T21:24:48.000Z | # Copyright 2013-2014 MongoDB, 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 writin... | 38.448845 | 79 | 0.618112 |
6cfe8bda201ab302d00b02de41ebdcb6f2601e62 | 5,675 | py | Python | tests/unit/test_runner.py | magnologan/syntribos | e7da2d1e1e8b0724cff0d5d33e5cdaa01551bad2 | [
"Apache-2.0"
] | 277 | 2015-09-23T22:55:16.000Z | 2020-05-17T18:45:46.000Z | tests/unit/test_runner.py | magnologan/syntribos | e7da2d1e1e8b0724cff0d5d33e5cdaa01551bad2 | [
"Apache-2.0"
] | null | null | null | tests/unit/test_runner.py | magnologan/syntribos | e7da2d1e1e8b0724cff0d5d33e5cdaa01551bad2 | [
"Apache-2.0"
] | 72 | 2016-01-04T18:57:06.000Z | 2020-05-07T14:07:30.000Z | # Copyright 2016 Rackspace
#
# 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, sof... | 42.037037 | 79 | 0.676828 |
21eb59ddc03c8a173779de776d39070d29471168 | 7,412 | py | Python | tests/components/cloud/test_client.py | domwillcode/home-assistant | f170c80bea70c939c098b5c88320a1c789858958 | [
"Apache-2.0"
] | 3 | 2020-05-05T22:12:27.000Z | 2020-11-25T23:55:34.000Z | tests/components/cloud/test_client.py | domwillcode/home-assistant | f170c80bea70c939c098b5c88320a1c789858958 | [
"Apache-2.0"
] | 5 | 2021-02-08T20:46:31.000Z | 2022-03-12T00:35:09.000Z | tests/components/cloud/test_client.py | klauern/home-assistant-core | c18ba6aec0627e6afb6442c678edb5ff2bb17db6 | [
"Apache-2.0"
] | 5 | 2020-03-29T00:29:13.000Z | 2021-09-06T20:58:40.000Z | """Test the cloud.iot module."""
from aiohttp import web
import pytest
from homeassistant.components.cloud import DOMAIN
from homeassistant.components.cloud.client import CloudClient
from homeassistant.components.cloud.const import PREF_ENABLE_ALEXA, PREF_ENABLE_GOOGLE
from homeassistant.core import State
from homeass... | 32.226087 | 87 | 0.636805 |
7cb53e804b08a4942950729372d9387d3efadf54 | 15,779 | py | Python | alipay/aop/api/domain/AlipayUserAgreementPageSignModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayUserAgreementPageSignModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayUserAgreementPageSignModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AccessParams import AccessParams
from alipay.aop.api.domain.DeviceParams import DeviceParams
from alipay.aop.api.domain.IdentityParams import IdentityParams
from alipay.aop.api.doma... | 38.769042 | 109 | 0.654541 |
55359e05d27b5a1b86a8b1eb2dbded8d5d684ef1 | 1,581 | py | Python | tests/test_word_rtd.py | hasibaasma/alfpy | c8c0c1300108015746320cede2207ac57e630d3e | [
"MIT"
] | 19 | 2017-02-20T17:42:02.000Z | 2021-12-16T19:07:17.000Z | tests/test_word_rtd.py | eggleader/alfpy | e0782e9551458ef17ab29df8af13fc0f8925e894 | [
"MIT"
] | 3 | 2018-03-12T23:54:27.000Z | 2020-12-09T21:53:19.000Z | tests/test_word_rtd.py | eggleader/alfpy | e0782e9551458ef17ab29df8af13fc0f8925e894 | [
"MIT"
] | 6 | 2016-12-06T09:12:04.000Z | 2021-09-24T14:40:47.000Z | import unittest
from alfpy import word_pattern
from alfpy import word_rtd
from alfpy.utils import distmatrix
from . import utils
class Test(unittest.TestCase, utils.ModulesCommonTest):
def __init__(self, *args, **kwargs):
super(Test, self).__init__(*args, **kwargs)
utils.ModulesCommonTest.set_t... | 34.369565 | 79 | 0.646426 |
defa6f1e58618068f279f3f97f49bbac41760ade | 13,147 | py | Python | src/model.py | jahrmarkt/TowerGame | 7d15b72a2dd7bdd1bb31795129d1261c021e07e4 | [
"MIT"
] | null | null | null | src/model.py | jahrmarkt/TowerGame | 7d15b72a2dd7bdd1bb31795129d1261c021e07e4 | [
"MIT"
] | null | null | null | src/model.py | jahrmarkt/TowerGame | 7d15b72a2dd7bdd1bb31795129d1261c021e07e4 | [
"MIT"
] | null | null | null | from pygame.sprite import *
from pygame.locals import *
from pygame.mixer import *
from math import *
from random import randint
from enum import Enum
from tower import *
from towerData import *
# definitions
class Ground(Sprite):
def __init__(self, x, y):
Sprite.__init__(self)
self.image = load... | 28.09188 | 102 | 0.610481 |
973dd05c60b3c57005ca4bf508478e6066ae102b | 28,573 | py | Python | ClinicalTransformerNER/src/transformer_ner/model.py | brajagopalcse/SDoH_NLPend2end | 28743f45b3e6880624a48db4eeb6bdf3e3f4e27a | [
"MIT"
] | 5 | 2021-09-03T13:07:36.000Z | 2022-01-06T03:22:09.000Z | ClinicalTransformerNER/src/transformer_ner/model.py | brajagopalcse/SDoH_NLPend2end | 28743f45b3e6880624a48db4eeb6bdf3e3f4e27a | [
"MIT"
] | 4 | 2021-09-03T01:31:04.000Z | 2022-01-13T15:11:09.000Z | ClinicalTransformerNER/src/transformer_ner/model.py | brajagopalcse/SDoH_NLPend2end | 28743f45b3e6880624a48db4eeb6bdf3e3f4e27a | [
"MIT"
] | 1 | 2022-01-06T16:59:46.000Z | 2022-01-06T16:59:46.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
We tried to implement a common class BertLikeNER for BERT, ROBERTA, ALBERT, DISTILBERT
to share the common forward() function;
However, such implementation will dramatically influence the model converge process.
The current implementation has repeated code but will guarante... | 42.33037 | 173 | 0.615476 |
ca6386853500efe64b8aff0fa3e8b15fae1acc55 | 409 | py | Python | roastery/coffee/migrations/0002_bean_description.py | kylehorton33/roastery | be0df40459ab3da7e72a5d52f094e7d1d51e63d0 | [
"MIT"
] | null | null | null | roastery/coffee/migrations/0002_bean_description.py | kylehorton33/roastery | be0df40459ab3da7e72a5d52f094e7d1d51e63d0 | [
"MIT"
] | null | null | null | roastery/coffee/migrations/0002_bean_description.py | kylehorton33/roastery | be0df40459ab3da7e72a5d52f094e7d1d51e63d0 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.13 on 2021-10-26 22:56
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('coffee', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='bean',
name='description',
... | 21.526316 | 83 | 0.603912 |
45329f1467fbc13a4797f7eee2e4410dd5f63d67 | 114 | py | Python | src/bioregistry/align/__main__.py | egonw/bioregistry | 5070e0310a4e9f695d9089b302e0a2421c155d02 | [
"MIT"
] | 2 | 2020-12-23T15:23:51.000Z | 2021-02-13T17:50:34.000Z | src/bioregistry/align/__main__.py | egonw/bioregistry | 5070e0310a4e9f695d9089b302e0a2421c155d02 | [
"MIT"
] | 19 | 2020-12-27T14:12:38.000Z | 2021-03-29T20:20:42.000Z | src/bioregistry/align/__main__.py | egonw/bioregistry | 5070e0310a4e9f695d9089b302e0a2421c155d02 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""CLI for alignment."""
from .cli import align
if __name__ == "__main__":
align()
| 12.666667 | 26 | 0.578947 |
825a7064531e5306f008c3a25c8546bc9324a9c5 | 33,590 | py | Python | veles/backends.py | AkshayJainG/veles | 21106f41a8e7e7e74453cd16a5059a0e6b1c315e | [
"Apache-2.0"
] | 1,007 | 2015-07-20T12:01:41.000Z | 2022-03-30T23:08:35.000Z | veles/backends.py | AkshayJainG/veles | 21106f41a8e7e7e74453cd16a5059a0e6b1c315e | [
"Apache-2.0"
] | 52 | 2015-07-21T10:26:24.000Z | 2019-01-24T05:46:43.000Z | veles/backends.py | AkshayJainG/veles | 21106f41a8e7e7e74453cd16a5059a0e6b1c315e | [
"Apache-2.0"
] | 235 | 2015-07-20T09:42:42.000Z | 2021-12-06T18:12:26.000Z | # -*- coding: utf-8 -*-
"""
.. invisible:
_ _ _____ _ _____ _____
| | | | ___| | | ___/ ___|
| | | | |__ | | | |__ \ `--.
| | | | __|| | | __| `--. \
\ \_/ / |___| |___| |___/\__/ /
\___/\____/\_____|____/\____/
Created on Mar 21, 2013
OpenCL base classes.
█████████████████... | 35.395153 | 105 | 0.577077 |
1a50057aa9de328c43c7ce39610e090b9fc56f4d | 765 | py | Python | EnergyIntensityIndicators/__init__.py | NREL/EnergyIntensityIndicators | 6d5a6d528ecd27b930d82088055224473ba2d63e | [
"BSD-3-Clause"
] | 7 | 2020-07-30T15:02:23.000Z | 2022-01-23T20:02:55.000Z | EnergyIntensityIndicators/__init__.py | NREL/EnergyIntensityIndicators | 6d5a6d528ecd27b930d82088055224473ba2d63e | [
"BSD-3-Clause"
] | 36 | 2020-06-18T15:47:32.000Z | 2021-09-13T21:20:49.000Z | EnergyIntensityIndicators/__init__.py | NREL/EnergyIntensityIndicators | 6d5a6d528ecd27b930d82088055224473ba2d63e | [
"BSD-3-Clause"
] | 2 | 2020-06-18T13:30:43.000Z | 2020-11-17T11:34:10.000Z | """The Energy Intensity Indicators Model
"""
from __future__ import print_function, division, absolute_import
import os
from EnergyIntensityIndicators.Residential import residential_floorspace
from EnergyIntensityIndicators.Industry import (manufacturing,
nonmanufacut... | 42.5 | 90 | 0.686275 |
6897cea8707c16965c2d6219cfc4e79998bc2f3e | 9,372 | py | Python | trezor-crypto/crypto/tests/test_curves.py | Raden-Hor/wallet-core | 3e64de57ab70e2ce8ecd78e43cdaf290bf334821 | [
"MIT"
] | 1,306 | 2019-08-08T13:25:24.000Z | 2022-03-31T23:32:28.000Z | trezor-crypto/crypto/tests/test_curves.py | Raden-Hor/wallet-core | 3e64de57ab70e2ce8ecd78e43cdaf290bf334821 | [
"MIT"
] | 1,179 | 2019-08-08T07:06:10.000Z | 2022-03-31T12:33:47.000Z | trezor-crypto/crypto/tests/test_curves.py | Raden-Hor/wallet-core | 3e64de57ab70e2ce8ecd78e43cdaf290bf334821 | [
"MIT"
] | 811 | 2019-08-08T13:27:44.000Z | 2022-03-31T21:22:53.000Z | #!/usr/bin/py.test
import binascii
import ctypes as c
import hashlib
import os
import random
import curve25519
import ecdsa
import pytest
def bytes2num(s):
res = 0
for i, b in enumerate(reversed(bytearray(s))):
res += b << (i * 8)
return res
curves = {"nist256p1": ecdsa.curves.NIST256p, "secp25... | 26.474576 | 87 | 0.65621 |
33f809fe37eeccbc2fcdb484fd605b3294e35eea | 235 | py | Python | mindhome_alpha/erpnext/patches/v7_1/fix_link_for_customer_from_lead.py | Mindhome/field_service | 3aea428815147903eb9af1d0c1b4b9fc7faed057 | [
"MIT"
] | 1 | 2021-04-29T14:55:29.000Z | 2021-04-29T14:55:29.000Z | mindhome_alpha/erpnext/patches/v7_1/fix_link_for_customer_from_lead.py | Mindhome/field_service | 3aea428815147903eb9af1d0c1b4b9fc7faed057 | [
"MIT"
] | null | null | null | mindhome_alpha/erpnext/patches/v7_1/fix_link_for_customer_from_lead.py | Mindhome/field_service | 3aea428815147903eb9af1d0c1b4b9fc7faed057 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | from __future__ import unicode_literals
import frappe
def execute():
for c in frappe.db.sql('select name from tabCustomer where ifnull(lead_name,"")!=""'):
customer = frappe.get_doc('Customer', c[0])
customer.update_lead_status() | 33.571429 | 87 | 0.753191 |
c1ef9d6ccfaec27853cf1629fd16414d164a0b41 | 200 | py | Python | python/testData/quickFixes/PyRenameElementQuickFixTest/renameAwaitFunctionInPy36.py | alwyn/intellij-community | 22e80b2aa9779d553c44e33929ad49a8a94b8449 | [
"Apache-2.0"
] | null | null | null | python/testData/quickFixes/PyRenameElementQuickFixTest/renameAwaitFunctionInPy36.py | alwyn/intellij-community | 22e80b2aa9779d553c44e33929ad49a8a94b8449 | [
"Apache-2.0"
] | null | null | null | python/testData/quickFixes/PyRenameElementQuickFixTest/renameAwaitFunctionInPy36.py | alwyn/intellij-community | 22e80b2aa9779d553c44e33929ad49a8a94b8449 | [
"Apache-2.0"
] | 1 | 2019-02-06T14:50:03.000Z | 2019-02-06T14:50:03.000Z | def <warning descr="'async' and 'await' are not recommended to be used as variable, class, function or module names. They will become proper keywords in Python 3.7.">a<caret>wait</warning>():
pass | 100 | 191 | 0.74 |
25a00d6705a3db59f23fafc197fd8161a45a7d36 | 4,734 | py | Python | clus/eof_tool.py | jhardenberg/EnsClus | c7591aa39d649fc4321ac4db219f241aabcaf295 | [
"Apache-2.0"
] | null | null | null | clus/eof_tool.py | jhardenberg/EnsClus | c7591aa39d649fc4321ac4db219f241aabcaf295 | [
"Apache-2.0"
] | null | null | null | clus/eof_tool.py | jhardenberg/EnsClus | c7591aa39d649fc4321ac4db219f241aabcaf295 | [
"Apache-2.0"
] | 1 | 2019-02-13T18:00:34.000Z | 2019-02-13T18:00:34.000Z | # Standard packages
import numpy as np
import pickle
import datetime
from eofs.standard import Eof
import matplotlib.pyplot as plt
#from mpl_toolkits.basemap import Basemap
import cartopy.crs as ccrs
import cartopy.feature as cfeature
# Ignore /.../anaconda3/lib/python3.5/site-packages/matplotlib/artist.py:221:
# Matp... | 47.818182 | 129 | 0.599071 |
8bcadabd462ae284b6ae5d6cf234ccd1f984f405 | 1,188 | py | Python | IntroToCS_ex2/quadratic_equation.py | nadavWeisler/IntroToCS | 725fc8822eeb34f6917692846689dee29b24af55 | [
"MIT"
] | null | null | null | IntroToCS_ex2/quadratic_equation.py | nadavWeisler/IntroToCS | 725fc8822eeb34f6917692846689dee29b24af55 | [
"MIT"
] | null | null | null | IntroToCS_ex2/quadratic_equation.py | nadavWeisler/IntroToCS | 725fc8822eeb34f6917692846689dee29b24af55 | [
"MIT"
] | null | null | null | #############################################################
# FILE : quadratic_equation.py
# WRITER : Nadav Weisler , Weisler , 316493758
# EXERCISE : intro2cs ex2 2019
# DESCRIPTION: esulva quadratic equation
#############################################################
import math
def quadratic_equation(num1, n... | 33 | 95 | 0.571549 |
17e7d91b0c194cec5532a8f4dd2cbcf67a2c8f58 | 14,804 | py | Python | src/run_asc.py | dasaep/BERT-for-ABSA | 7a6d5a8250605c68bf29bec315d6ee5ce054dbfc | [
"Apache-2.0"
] | 33 | 2020-10-27T02:03:24.000Z | 2022-03-28T02:29:30.000Z | src/run_asc.py | dasaep/BERT-for-ABSA | 7a6d5a8250605c68bf29bec315d6ee5ce054dbfc | [
"Apache-2.0"
] | null | null | null | src/run_asc.py | dasaep/BERT-for-ABSA | 7a6d5a8250605c68bf29bec315d6ee5ce054dbfc | [
"Apache-2.0"
] | 13 | 2020-11-09T08:47:28.000Z | 2021-12-05T06:50:53.000Z | # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team and authors from University of Illinois at Chicago.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with... | 43.798817 | 134 | 0.62625 |
08f348ce7cda470e3202e7ab52d5395eca2b3b37 | 4,117 | py | Python | bcs-ui/backend/tests/dashboard/workloads/test_pod.py | masanqi/bk-bcs | 70d97b674fbd5beacde21d6ca8be914d7eb56865 | [
"Apache-2.0"
] | 599 | 2019-06-25T03:20:46.000Z | 2022-03-31T12:14:33.000Z | bcs-ui/backend/tests/dashboard/workloads/test_pod.py | masanqi/bk-bcs | 70d97b674fbd5beacde21d6ca8be914d7eb56865 | [
"Apache-2.0"
] | 537 | 2019-06-27T06:03:44.000Z | 2022-03-31T12:10:01.000Z | bcs-ui/backend/tests/dashboard/workloads/test_pod.py | masanqi/bk-bcs | 70d97b674fbd5beacde21d6ca8be914d7eb56865 | [
"Apache-2.0"
] | 214 | 2019-06-25T03:26:05.000Z | 2022-03-31T07:52:03.000Z | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... | 42.010204 | 115 | 0.679864 |
1cd2cad23639e23a7d2242f6b013484e468be573 | 13,122 | py | Python | sdk/python/pulumi_azure_nextgen/apimanagement/v20170301/api.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/apimanagement/v20170301/api.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/apimanagement/v20170301/api.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 48.420664 | 711 | 0.666057 |
d75bf36b7559d6072b02130f9c143eceeea0cf2d | 2,991 | py | Python | cookbook/views/data.py | mhoellmann/recipes | 525aa4e4a4f218a47e1770498fff9fa8b0d7a097 | [
"MIT"
] | null | null | null | cookbook/views/data.py | mhoellmann/recipes | 525aa4e4a4f218a47e1770498fff9fa8b0d7a097 | [
"MIT"
] | 1 | 2020-04-11T09:47:20.000Z | 2020-04-11T09:47:20.000Z | cookbook/views/data.py | mcejp/recipes | 913d858473a1d44b2ced02e09fddfc4d320848b7 | [
"MIT"
] | null | null | null | from datetime import datetime
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.shortcuts import redirect, render
from django.utils.translation import ngettext
from django_tables2 import RequestConfig
from cookbook.forms import SyncForm, BatchEditForm
from cookb... | 30.212121 | 160 | 0.638917 |
06852358b2c9bcaa134b1c5c31a4a7de3d028ae2 | 10,764 | py | Python | flow/scenarios/loop_merge/scenario.py | berkeleyflow/flow | bed5ec959aaf0eaa8dbc7fa03f0c3fd3f0184b80 | [
"MIT"
] | 16 | 2018-05-25T06:30:28.000Z | 2020-08-08T00:03:47.000Z | flow/scenarios/loop_merge/scenario.py | berkeleyflow/flow | bed5ec959aaf0eaa8dbc7fa03f0c3fd3f0184b80 | [
"MIT"
] | 46 | 2018-05-22T21:32:55.000Z | 2019-06-12T13:10:02.000Z | flow/scenarios/loop_merge/scenario.py | berkeleyflow/flow | bed5ec959aaf0eaa8dbc7fa03f0c3fd3f0184b80 | [
"MIT"
] | 6 | 2018-06-22T14:59:14.000Z | 2019-08-29T06:00:34.000Z | from flow.scenarios.base_scenario import Scenario
from flow.core.params import InitialConfig
from flow.core.traffic_lights import TrafficLights
from numpy import pi
import numpy as np
ADDITIONAL_NET_PARAMS = {
# radius of the loops
"ring_radius": 50,
# length of the straight edges connected the outer lo... | 40.314607 | 79 | 0.572092 |
1e1f27d60cbbea2b429057dfbe650b8af133fb26 | 3,359 | py | Python | config/conf.py | mimimimizuki/sabrina-hoppe-everyday-eye-movements-predict-personality | 731599ce8af977a727f2759aee5a54b18746d664 | [
"BSD-3-Clause"
] | 9 | 2020-05-30T16:34:10.000Z | 2022-02-21T05:57:47.000Z | config/conf.py | mimimimizuki/sabrina-hoppe-everyday-eye-movements-predict-personality | 731599ce8af977a727f2759aee5a54b18746d664 | [
"BSD-3-Clause"
] | 1 | 2020-03-17T12:16:15.000Z | 2020-03-18T14:37:10.000Z | config/conf.py | mimimimizuki/sabrina-hoppe-everyday-eye-movements-predict-personality | 731599ce8af977a727f2759aee5a54b18746d664 | [
"BSD-3-Clause"
] | 3 | 2019-04-19T14:04:08.000Z | 2021-10-21T11:17:28.000Z | import numpy as np
# global parameters
n_participants = 42
n_traits = 7
max_n_feat = 207
max_n_iter = 100
all_window_sizes = [5, 15, 30, 45, 60, 75, 90, 105, 120, 135]
all_shop_window_sizes = [5, 15] # at least 3/4 of the people have a time window in these times
# cross validation paramters
n_inner_folds = 3
n_outer... | 34.27551 | 197 | 0.772551 |
59daea138b70578be821b4f97b465557f0cfa947 | 11,548 | py | Python | bokeh/application/application.py | g-parki/bokeh | 664ead5306bba64609e734d4105c8aa8cfb76d81 | [
"BSD-3-Clause"
] | null | null | null | bokeh/application/application.py | g-parki/bokeh | 664ead5306bba64609e734d4105c8aa8cfb76d81 | [
"BSD-3-Clause"
] | null | null | null | bokeh/application/application.py | g-parki/bokeh | 664ead5306bba64609e734d4105c8aa8cfb76d81 | [
"BSD-3-Clause"
] | null | null | null | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | 31.812672 | 102 | 0.542085 |
129a0a2f94c9cf24bd93a10b65e1ab0ec0d2bd9f | 4,310 | py | Python | sandbox/settings/base.py | maerteijn/wagtail-email-subscription | d5420aed0b133f9eced3a59425f63ae6b767d686 | [
"MIT"
] | 2 | 2021-05-03T14:56:07.000Z | 2021-07-22T06:38:22.000Z | sandbox/settings/base.py | maerteijn/wagtail-email-subscription | d5420aed0b133f9eced3a59425f63ae6b767d686 | [
"MIT"
] | 10 | 2021-05-04T10:44:17.000Z | 2022-03-25T14:53:30.000Z | sandbox/settings/base.py | maerteijn/wagtail-email-subscription | d5420aed0b133f9eced3a59425f63ae6b767d686 | [
"MIT"
] | 1 | 2021-05-07T09:42:05.000Z | 2021-05-07T09:42:05.000Z | """
Django settings for sandbox project.
Generated by 'django-admin startproject' using Django 3.2.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from pathlib i... | 25.502959 | 91 | 0.683063 |
29ed476f6c184936e591c9b7ff3ba306a1996f91 | 2,249 | py | Python | baconian/benchmark/run_benchmark.py | yitongx/baconian-public | a67e23c6bc6bfe7019ec9532a3d18f06aed6bbbb | [
"MIT"
] | 69 | 2020-01-31T17:44:43.000Z | 2022-03-28T13:09:11.000Z | baconian/benchmark/run_benchmark.py | yitongx/baconian-project | e84508da60877e387344133a11039edaac35c5bf | [
"MIT"
] | 5 | 2019-04-28T07:24:26.000Z | 2020-01-29T01:49:51.000Z | baconian/benchmark/run_benchmark.py | yitongx/baconian-project | e84508da60877e387344133a11039edaac35c5bf | [
"MIT"
] | 6 | 2019-05-04T02:18:11.000Z | 2019-12-04T22:05:52.000Z | from baconian.benchmark.ddpg_benchmark import mountiancar_task_fn, pendulum_task_fn
from baconian.benchmark.dyna_benchmark import dyna_pendulum_task_fn
from baconian.benchmark.mpc_benchmark import mpc_pendulum_task_fn
from baconian.benchmark.ppo_benchmark import inverted_double_pendulum_bullet_env_task_fn, \
invert... | 38.775862 | 110 | 0.724767 |
e28e1ea9ca89ee5300fb044ff9000ad4d8f4a86b | 25,794 | py | Python | ismore/tubingen/noninvasive_tubingen/eeg_feature_extraction.py | DerekYJC/bmi_python | 7b9cf3f294a33688db24b0863c1035e9cc6999ea | [
"Apache-2.0"
] | null | null | null | ismore/tubingen/noninvasive_tubingen/eeg_feature_extraction.py | DerekYJC/bmi_python | 7b9cf3f294a33688db24b0863c1035e9cc6999ea | [
"Apache-2.0"
] | 12 | 2020-07-31T18:58:31.000Z | 2022-02-10T14:36:00.000Z | ismore/tubingen/noninvasive_tubingen/eeg_feature_extraction.py | DerekYJC/bmi_python | 7b9cf3f294a33688db24b0863c1035e9cc6999ea | [
"Apache-2.0"
] | 4 | 2020-03-06T15:39:00.000Z | 2021-05-26T17:03:21.000Z | '''
Code for feature extraction methods/classes from EEG, to be used with a
decoder (similar to other types of feature extractors in riglib.bmi.extractor)
'''
from collections import OrderedDict
from scipy.signal import butter, lfilter
import numpy as np
import numpy.matlib
import matplotlib.pyplot as plt
import spec... | 39.56135 | 356 | 0.596767 |
d0a812df66614ac1f4f5662eefaa44d1e4659699 | 1,859 | py | Python | research/deep_contextual_bandits/bandits/algorithms/fixed_policy_sampling.py | jdavidagudelo/tensorflow-models | 6f019beec73b01861363bf717706e27f4210b979 | [
"Apache-2.0"
] | 1 | 2021-05-17T01:42:29.000Z | 2021-05-17T01:42:29.000Z | research/deep_contextual_bandits/bandits/algorithms/fixed_policy_sampling.py | jdavidagudelo/tensorflow-models | 6f019beec73b01861363bf717706e27f4210b979 | [
"Apache-2.0"
] | null | null | null | research/deep_contextual_bandits/bandits/algorithms/fixed_policy_sampling.py | jdavidagudelo/tensorflow-models | 6f019beec73b01861363bf717706e27f4210b979 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The TensorFlow 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 applicab... | 35.75 | 90 | 0.697687 |
6b7821385f4dcd6329554fe2b408ee8aafed6296 | 18,702 | py | Python | tools/utilities/pitest/drivetest.py | siddu1998/ELL | 993d5370f0f7a274e8dfd8f43220c792be46f314 | [
"MIT"
] | 1 | 2018-11-08T06:19:31.000Z | 2018-11-08T06:19:31.000Z | tools/utilities/pitest/drivetest.py | vishnoitanuj/ELL | 993d5370f0f7a274e8dfd8f43220c792be46f314 | [
"MIT"
] | null | null | null | tools/utilities/pitest/drivetest.py | vishnoitanuj/ELL | 993d5370f0f7a274e8dfd8f43220c792be46f314 | [
"MIT"
] | 1 | 2019-12-19T10:02:48.000Z | 2019-12-19T10:02:48.000Z | #!/usr/bin/env python3
####################################################################################################
##
## Project: Embedded Learning Library (ELL)
## File: drivetest.py
## Authors: Chris Lovett
##
## Requires: Python 3.x
##
##############################################################... | 44.528571 | 160 | 0.595765 |
b1517cfe6480106fce823cc485813693a5882f7a | 981 | py | Python | mysite/main/migrations/0003_auto_20200117_0237.py | sripadha/AutoINFO | e479620d5c7d2648ea11cab6ae1b8bb628cd1cd4 | [
"BSD-3-Clause"
] | null | null | null | mysite/main/migrations/0003_auto_20200117_0237.py | sripadha/AutoINFO | e479620d5c7d2648ea11cab6ae1b8bb628cd1cd4 | [
"BSD-3-Clause"
] | 9 | 2020-06-05T20:45:14.000Z | 2021-12-13T20:31:47.000Z | mysite/main/migrations/0003_auto_20200117_0237.py | sripadha/AutoINFO | e479620d5c7d2648ea11cab6ae1b8bb628cd1cd4 | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 3.0.2 on 2020-01-16 21:07
import datetime
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('main', '0002_auto_20200117_0055'),
]
operations = [
migrations.AlterField(
... | 31.645161 | 131 | 0.611621 |
e4e1458c8f76485ccb0557bbf97a3130c2c9e5b3 | 4,081 | py | Python | baselines/jft/experiments/vit_be/jft300m_be_vit_small8_32.py | sorennelson/uncertainty-baselines | 2d8102d1df6f413e85becb0d37b468acbf8730e7 | [
"Apache-2.0"
] | 794 | 2020-07-17T06:23:58.000Z | 2022-03-31T08:31:53.000Z | baselines/jft/experiments/vit_be/jft300m_be_vit_small8_32.py | sorennelson/uncertainty-baselines | 2d8102d1df6f413e85becb0d37b468acbf8730e7 | [
"Apache-2.0"
] | 136 | 2020-08-04T22:42:04.000Z | 2022-03-26T21:07:03.000Z | baselines/jft/experiments/vit_be/jft300m_be_vit_small8_32.py | sorennelson/uncertainty-baselines | 2d8102d1df6f413e85becb0d37b468acbf8730e7 | [
"Apache-2.0"
] | 129 | 2020-08-16T12:46:55.000Z | 2022-03-31T23:00:10.000Z | # coding=utf-8
# Copyright 2021 The Uncertainty Baselines 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 ap... | 35.486957 | 125 | 0.718206 |
118e1c460aa9bf35d090242a9d2e4fa95f303ee2 | 15,059 | py | Python | dev/snippets/xxyxyz_org_line_breaking.py | loveencounterflow/hengist | 2d5ab27503eef35919d9c0425b024adb8b66394a | [
"MIT"
] | null | null | null | dev/snippets/xxyxyz_org_line_breaking.py | loveencounterflow/hengist | 2d5ab27503eef35919d9c0425b024adb8b66394a | [
"MIT"
] | 2 | 2021-04-22T17:51:16.000Z | 2022-02-11T22:10:39.000Z | dev/snippets/xxyxyz_org_line_breaking.py | loveencounterflow/hengist | 2d5ab27503eef35919d9c0425b024adb8b66394a | [
"MIT"
] | null | null | null | # thx to https://xxyxyz.org/line-breaking/
# # Line breaking
# Line breaking, also known as word wrapping or paragraph formation, is the problem of dividing a text into
# a sequence of lines so that every line spans at most some fixed width.
# One way of solving the problem is to gradually form the lines word by wor... | 35.349765 | 108 | 0.544923 |
c5863b2bc177adab24494b4cff994e92521650e3 | 1,214 | py | Python | examples/rank_k_correlation_matrix_approximation.py | calincru/pymanopt | 3eb4696ea7fc62e89905409afadc3d905b36ed30 | [
"BSD-3-Clause"
] | 1 | 2020-03-13T12:34:07.000Z | 2020-03-13T12:34:07.000Z | examples/rank_k_correlation_matrix_approximation.py | leonbottou/pymanopt | 7d8c46f4513c3746234ba804604694b11db62d0a | [
"BSD-3-Clause"
] | null | null | null | examples/rank_k_correlation_matrix_approximation.py | leonbottou/pymanopt | 7d8c46f4513c3746234ba804604694b11db62d0a | [
"BSD-3-Clause"
] | 1 | 2018-07-01T07:45:53.000Z | 2018-07-01T07:45:53.000Z | from __future__ import print_function
import numpy as np
import numpy.random as rnd
import numpy.linalg as la
import theano.tensor as T
from pymanopt import Problem
from pymanopt.manifolds import Oblique
from pymanopt.solvers import TrustRegions
def rank_k_correlation_matrix_approximation(A, k):
"""
Returns... | 24.77551 | 78 | 0.649918 |
4b3979b0e7fcb984e3583d6b22ded8294ed3bc83 | 8,870 | py | Python | EvolutionaryAlg.py | Chocbanana/Gent | 4600883e2d5a5d0820691f53003976072fdbc79d | [
"BSD-3-Clause"
] | null | null | null | EvolutionaryAlg.py | Chocbanana/Gent | 4600883e2d5a5d0820691f53003976072fdbc79d | [
"BSD-3-Clause"
] | null | null | null | EvolutionaryAlg.py | Chocbanana/Gent | 4600883e2d5a5d0820691f53003976072fdbc79d | [
"BSD-3-Clause"
] | null | null | null | """
Author: Bhavana Jonnalagadda, 2016
"""
import random
import math
"""
OUTLINE FOR 3RD TERM:
NeuralNetwork:
- NetworkRunner:
- make flexible for assigning activation, regularization, optimizer, metrics all in general
- Hyperparamter training!!
- RecurrentNode:
- Get working!
- N... | 29.177632 | 130 | 0.588162 |
b3a873e1422ed0a820df2452a4b4eb1da042aa36 | 2,151 | py | Python | caffe2/python/operator_test/reduction_ops_test.py | shijieS/Caffe2 | f71695dcc27053e52b78f893344ea2ef2bd2da83 | [
"MIT"
] | 1 | 2019-02-25T15:57:19.000Z | 2019-02-25T15:57:19.000Z | caffe2/python/operator_test/reduction_ops_test.py | shijieS/Caffe2 | f71695dcc27053e52b78f893344ea2ef2bd2da83 | [
"MIT"
] | null | null | null | caffe2/python/operator_test/reduction_ops_test.py | shijieS/Caffe2 | f71695dcc27053e52b78f893344ea2ef2bd2da83 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from caffe2.python import core
from hypothesis import given
import caffe2.python.hypothesis_test_util as hu
import hypothesis.strategies as st
import numpy as np
import ... | 23.129032 | 49 | 0.527662 |
e5ec8a1740dda8f3d2f5820cb35d5e959bf89864 | 2,050 | py | Python | graphgallery/gallery/embedding/randne.py | dongzizhu/GraphGallery | c65eab42daeb52de5019609fe7b368e30863b4ae | [
"MIT"
] | 300 | 2020-08-09T04:27:41.000Z | 2022-03-30T07:43:41.000Z | graphgallery/gallery/embedding/randne.py | dongzizhu/GraphGallery | c65eab42daeb52de5019609fe7b368e30863b4ae | [
"MIT"
] | 5 | 2020-11-05T06:16:50.000Z | 2021-12-11T05:05:22.000Z | graphgallery/gallery/embedding/randne.py | dongzizhu/GraphGallery | c65eab42daeb52de5019609fe7b368e30863b4ae | [
"MIT"
] | 51 | 2020-09-23T15:37:12.000Z | 2022-03-05T01:28:56.000Z | import numpy as np
import scipy.sparse as sp
from sklearn import preprocessing
class RandNE:
r"""An implementation of `"RandNE" <https://zw-zhang.github.io/files/2018_ICDM_RandNE.pdf>`_ from the ICDM '18 paper "Billion-scale Network Embedding with Iterative Random Projection". The procedure uses normalized ... | 36.607143 | 242 | 0.621951 |
b276023f3cb2d2319af64805ae3861c32000edb9 | 4,351 | py | Python | main.py | endorama/switcher | 74ad4f97d9dfc13a547115d6278c529f16bdde5a | [
"MIT"
] | null | null | null | main.py | endorama/switcher | 74ad4f97d9dfc13a547115d6278c529f16bdde5a | [
"MIT"
] | null | null | null | main.py | endorama/switcher | 74ad4f97d9dfc13a547115d6278c529f16bdde5a | [
"MIT"
] | null | null | null | import os
import time
import logging
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Wnck, Gtk
from gi.repository.Gdk import CURRENT_TIME
from ulauncher.api.client.Extension import Extension
from ulauncher.api.client.EventListener import EventListener
from ulauncher.api.shared.event import Keyword... | 35.08871 | 100 | 0.677316 |
33957178332948fda6a1b5cc4209e6f4f7430f3e | 476 | py | Python | myvenv/lib/python3.5/site-packages/telegram/__main__.py | F74046501/chat_bot | d6ddbe9c502ef35a4ef20e50fb367b5fa91e2783 | [
"MIT"
] | 17 | 2017-08-04T15:41:05.000Z | 2020-10-16T18:02:41.000Z | myvenv/lib/python3.5/site-packages/telegram/__main__.py | F74046501/chat_bot | d6ddbe9c502ef35a4ef20e50fb367b5fa91e2783 | [
"MIT"
] | 3 | 2017-08-04T23:37:37.000Z | 2017-08-04T23:38:34.000Z | myvenv/lib/python3.5/site-packages/telegram/__main__.py | F74046501/chat_bot | d6ddbe9c502ef35a4ef20e50fb367b5fa91e2783 | [
"MIT"
] | 3 | 2017-12-07T16:30:59.000Z | 2019-06-16T02:48:28.000Z | import sys
import urllib3
import certifi
import future
from . import __version__ as telegram_ver
def print_ver_info():
print('python-telegram-bot {0}'.format(telegram_ver))
print('urllib3 {0}'.format(urllib3.__version__))
print('certifi {0}'.format(certifi.__version__))
print('future {0}'.format(fut... | 19.833333 | 62 | 0.689076 |
9cb9de638332196aee434cd76644acfec9d35465 | 1,143 | py | Python | intro/matplotlib/examples/pretty_plots/plot_scatter_ext.py | zmoon/scipy-lecture-notes | 75a89ddedeb48930dbdb6fe25a76e9ef0587ae21 | [
"CC-BY-4.0"
] | 2,538 | 2015-01-01T04:58:41.000Z | 2022-03-31T21:06:05.000Z | intro/matplotlib/examples/pretty_plots/plot_scatter_ext.py | zmoon/scipy-lecture-notes | 75a89ddedeb48930dbdb6fe25a76e9ef0587ae21 | [
"CC-BY-4.0"
] | 362 | 2015-01-18T14:16:23.000Z | 2021-11-18T16:24:34.000Z | intro/matplotlib/examples/pretty_plots/plot_scatter_ext.py | zmoon/scipy-lecture-notes | 75a89ddedeb48930dbdb6fe25a76e9ef0587ae21 | [
"CC-BY-4.0"
] | 1,127 | 2015-01-05T14:39:29.000Z | 2022-03-25T08:38:39.000Z | """
Plot scatter decorated
=======================
An example showing the scatter function, with decorations.
"""
import numpy as np
import matplotlib.pyplot as plt
n = 1024
X = np.random.normal(0, 1, n)
Y = np.random.normal(0, 1, n)
T = np.arctan2(Y,X)
plt.scatter(X, Y, s=75, c=T, alpha=.5)
plt.xlim(-1.5, 1.5)
pl... | 24.847826 | 66 | 0.581802 |
9665fc17166222987f99b2e9e935874f0e1e0a8a | 81 | py | Python | metrics/tests.py | tp00012x/bobs_banana_stand | 0ae167b1bb124408770924dcb3660760da2d715c | [
"MIT"
] | null | null | null | metrics/tests.py | tp00012x/bobs_banana_stand | 0ae167b1bb124408770924dcb3660760da2d715c | [
"MIT"
] | 6 | 2021-03-18T22:01:48.000Z | 2022-02-10T07:19:13.000Z | sales/tests.py | tp00012x/bobs_banana_stand | 0ae167b1bb124408770924dcb3660760da2d715c | [
"MIT"
] | null | null | null | from django.test import TestCase
# Create your tests here.
# TODO tests missing
| 16.2 | 32 | 0.777778 |
65a848ea6da98d45a739d2c06e8ef9b3410edcc7 | 159 | py | Python | youtube_sm_parser/__init__.py | shanedabes/youtube_sm_parser | 642663abb9ee12c8478796b7ed7b9a01210d1fad | [
"Apache-2.0"
] | 2 | 2019-05-26T07:50:35.000Z | 2020-07-14T22:23:22.000Z | youtube_sm_parser/__init__.py | shanedabes/youtube_sm_parser | 642663abb9ee12c8478796b7ed7b9a01210d1fad | [
"Apache-2.0"
] | 35 | 2019-05-18T02:09:25.000Z | 2019-12-03T20:52:21.000Z | youtube_sm_parser/__init__.py | shanedabes/youtube_sm_parser | 642663abb9ee12c8478796b7ed7b9a01210d1fad | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""Top-level package for youtube_sm_parser."""
__author__ = """Shane Donohoe"""
__email__ = 'shane@donohoe.cc'
__version__ = '0.1.0'
| 19.875 | 46 | 0.654088 |
6feca04ba064667ade57c9288c4d2c8e49ec06c0 | 13,360 | py | Python | hmd/tests/test_parser.py | fossabot/hmd | dda00daea71449d7338b573e11a24b2db7dbd7c7 | [
"MIT"
] | null | null | null | hmd/tests/test_parser.py | fossabot/hmd | dda00daea71449d7338b573e11a24b2db7dbd7c7 | [
"MIT"
] | null | null | null | hmd/tests/test_parser.py | fossabot/hmd | dda00daea71449d7338b573e11a24b2db7dbd7c7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from src.abstract.automata.automata import AbstractAutomataMachine
from src.abstract.lexer.lexer import AbstractLexer
from src.abstract.lexer.token import AbstractToken
from src.abstract.parser.parser import AbstractParser
from src.mindslab.grammar import HMDGrammar
from src.mindslab.syntax impor... | 32.115385 | 75 | 0.646183 |
6b8ba50052b452c68ea007cc708e5f6db4cf3445 | 570 | py | Python | dear_petition/petition/migrations/0016_auto_20200209_0226.py | robert-w-gries/dear-petition | 35244afc8e967b41ae5265ae31fd13b26e4e835a | [
"MIT"
] | 4 | 2020-04-01T14:42:45.000Z | 2021-12-12T21:11:11.000Z | dear_petition/petition/migrations/0016_auto_20200209_0226.py | robert-w-gries/dear-petition | 35244afc8e967b41ae5265ae31fd13b26e4e835a | [
"MIT"
] | 142 | 2019-08-12T19:08:34.000Z | 2022-03-29T23:05:35.000Z | dear_petition/petition/migrations/0016_auto_20200209_0226.py | robert-w-gries/dear-petition | 35244afc8e967b41ae5265ae31fd13b26e4e835a | [
"MIT"
] | 8 | 2020-02-04T20:37:00.000Z | 2021-03-28T13:28:32.000Z | # Generated by Django 2.2.4 on 2020-02-09 02:26
from django.db import migrations
def add_user(apps, schema_editor):
Batch = apps.get_model("petition", "Batch")
User = apps.get_model("users", "User")
# get first user in DB
user = User.objects.order_by("pk").first()
print(f"Setting all Batch.user t... | 24.782609 | 49 | 0.677193 |
e43752a0e4be33f77f650c631354ca08cd63eb44 | 319 | py | Python | novauniverse/__init__.py | NovaUniverse/NovaUniverse.py | 85e7aea1783ef3e7ca828c86e41fb1d655942656 | [
"MIT"
] | null | null | null | novauniverse/__init__.py | NovaUniverse/NovaUniverse.py | 85e7aea1783ef3e7ca828c86e41fb1d655942656 | [
"MIT"
] | 8 | 2021-12-28T14:45:27.000Z | 2022-02-17T15:38:02.000Z | novauniverse/__init__.py | NovaUniverse/novauniverse.py | 85e7aea1783ef3e7ca828c86e41fb1d655942656 | [
"MIT"
] | null | null | null | """
Nova Universe (Python API Wrapper)
Copyright (c) 2022-present (Dev Goldy)
"""
from . import _find_, info, _server_, _keys_, _license_key_validation_, _mcf_
# Methods
Player = _find_.player
Session = _find_.session
Server = _server_.server
License = _license_key_validation_.license
Mcf = _mcf_.mcf
KEYS = _keys_ | 19.9375 | 77 | 0.76489 |
65169a4518addba9f4ff0d081443754838970ada | 7,988 | py | Python | tomography/workinglib.py | matteoacrossi/adapt_ic-povm | 1c9a0b4b98fafff478aed66686692ec97c0342ae | [
"MIT"
] | null | null | null | tomography/workinglib.py | matteoacrossi/adapt_ic-povm | 1c9a0b4b98fafff478aed66686692ec97c0342ae | [
"MIT"
] | null | null | null | tomography/workinglib.py | matteoacrossi/adapt_ic-povm | 1c9a0b4b98fafff478aed66686692ec97c0342ae | [
"MIT"
] | null | null | null | import numpy as np
from baseconvert import base
import itertools
from qiskit import QuantumRegister, ClassicalRegister, QuantumCircuit
def label(index, s, t):
l = base(index, 10, s, string=True)
return "0" * (t - len(l)) + l
def create_labels_list(s, n):
return [label(i, s, n) for i in range(s ** n)]
... | 27.640138 | 115 | 0.566224 |
c11de30920f37423fa786ddc0e16c6af37ee2c62 | 279 | py | Python | doc/python_study_code/random_time.py | beiliwenxiao/vimrc | eb38fc769f3f5f78000060dac674b5c49d63c24c | [
"MIT"
] | null | null | null | doc/python_study_code/random_time.py | beiliwenxiao/vimrc | eb38fc769f3f5f78000060dac674b5c49d63c24c | [
"MIT"
] | null | null | null | doc/python_study_code/random_time.py | beiliwenxiao/vimrc | eb38fc769f3f5f78000060dac674b5c49d63c24c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
from random import *
from time import *
date1 = (2008, 1, 1, 0, 0, 0, -1, -1, -1)
time1 = mktime(date1)
date2 = (2009, 1, 1, 0, 0, 0, -1, -1, -1)
time2 = mktime(date2)
random_time = uniform(time1, time2)
print asctime(localtime(random_time))
| 25.363636 | 41 | 0.648746 |
6a154477f36903e061e3c23d722f0709370d8fce | 19,234 | py | Python | 20_Raspberry_Pi_project/DStarLiteView.py | robodhhb/Interactive-D-Star-Lite | 9f3b60631e4c468525d17cce3e0c1e072d876dbd | [
"MIT"
] | 5 | 2021-03-26T21:07:32.000Z | 2022-03-02T07:18:36.000Z | 20_Raspberry_Pi_project/DStarLiteView.py | robodhhb/Interactive-D-Star-Lite | 9f3b60631e4c468525d17cce3e0c1e072d876dbd | [
"MIT"
] | null | null | null | 20_Raspberry_Pi_project/DStarLiteView.py | robodhhb/Interactive-D-Star-Lite | 9f3b60631e4c468525d17cce3e0c1e072d876dbd | [
"MIT"
] | null | null | null | #!/usr/bin/python3
############################################################
# Class DStarLiteView
# The class DStarLiteView implements an interactive view
# for the vertexGrid of the D*Lite algorithm. It implements
# the interactive design of the terrain with start-, goalnode
# and obstacles and the pathplann... | 51.290667 | 128 | 0.568317 |
eadfa45f6e3c9b7aa67e8060c948a2ceafd15c9d | 2,620 | py | Python | moztrap/model/core/fixture_gen.py | yifanjiang/moztrap | 2130c7101b7596b19a2697ab5f1c745e93e7c95b | [
"BSD-2-Clause"
] | 1 | 2015-02-10T15:09:42.000Z | 2015-02-10T15:09:42.000Z | moztrap/model/core/fixture_gen.py | yifanjiang/moztrap | 2130c7101b7596b19a2697ab5f1c745e93e7c95b | [
"BSD-2-Clause"
] | null | null | null | moztrap/model/core/fixture_gen.py | yifanjiang/moztrap | 2130c7101b7596b19a2697ab5f1c745e93e7c95b | [
"BSD-2-Clause"
] | null | null | null | """Sample products fixture generator."""
from django.core.management import call_command
from django.contrib.auth.models import User as BaseUser, Group
from .auth import User, Role
from fixture_generator import fixture_generator
from ..environments.models import Profile
from .models import Product, ProductVersion
... | 38.529412 | 78 | 0.730916 |
82d3fc172f7d73c1b868ec7fd408d4729723f4c0 | 33,004 | py | Python | tests/test_dataset_dict.py | aajanki/datasets | 65e224cc11c2c7da09788b903cb028c5629d7f95 | [
"Apache-2.0"
] | 6 | 2021-05-02T17:08:55.000Z | 2022-03-12T14:02:09.000Z | tests/test_dataset_dict.py | albertyumol/datasets | e58ce4b119e08ea1a19873232757ca52f77fc4ac | [
"Apache-2.0"
] | null | null | null | tests/test_dataset_dict.py | albertyumol/datasets | e58ce4b119e08ea1a19873232757ca52f77fc4ac | [
"Apache-2.0"
] | null | null | null | import os
import tempfile
from unittest import TestCase
import numpy as np
import pandas as pd
import pytest
from datasets import load_from_disk
from datasets.arrow_dataset import Dataset
from datasets.dataset_dict import DatasetDict
from datasets.features import ClassLabel, Features, Sequence, Value
from datasets.sp... | 45.966574 | 119 | 0.641528 |
35567d19376495f9f731ab96cf9259a2e4519d64 | 18,757 | py | Python | official/vision/beta/configs/semantic_segmentation.py | e10101/models | 5c3e08b7697f0035b8731607277dc4e47e18317c | [
"Apache-2.0"
] | 2 | 2017-10-26T06:23:51.000Z | 2020-09-11T21:09:41.000Z | official/vision/beta/configs/semantic_segmentation.py | e10101/models | 5c3e08b7697f0035b8731607277dc4e47e18317c | [
"Apache-2.0"
] | 2 | 2018-06-18T17:08:12.000Z | 2021-04-12T05:39:04.000Z | official/vision/beta/configs/semantic_segmentation.py | e10101/models | 5c3e08b7697f0035b8731607277dc4e47e18317c | [
"Apache-2.0"
] | 2 | 2020-04-11T19:31:17.000Z | 2021-04-07T12:53:28.000Z | # Copyright 2021 The TensorFlow 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 applica... | 38.357873 | 112 | 0.602175 |
8492b3dcf65ba96d8a4aa81ba0302dff18f25cef | 4,072 | py | Python | test/tomography/test_state_tomography.py | imaihal/qiskit-ignis | ca97a7482d648e09d6951544565f51c7573e6b72 | [
"Apache-2.0"
] | null | null | null | test/tomography/test_state_tomography.py | imaihal/qiskit-ignis | ca97a7482d648e09d6951544565f51c7573e6b72 | [
"Apache-2.0"
] | null | null | null | test/tomography/test_state_tomography.py | imaihal/qiskit-ignis | ca97a7482d648e09d6951544565f51c7573e6b72 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# This code is part of Qiskit.
#
# (C) Copyright IBM 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modi... | 35.103448 | 77 | 0.638998 |
8669320cb6895c25422a0f00c59ed6cbc58f3ce2 | 2,597 | py | Python | pykinect_azure/k4a/calibration.py | necoxt/pyKinectAzure | 1e1fa845bd8299b7534a647f12ca0b49c5bc57d4 | [
"MIT"
] | null | null | null | pykinect_azure/k4a/calibration.py | necoxt/pyKinectAzure | 1e1fa845bd8299b7534a647f12ca0b49c5bc57d4 | [
"MIT"
] | null | null | null | pykinect_azure/k4a/calibration.py | necoxt/pyKinectAzure | 1e1fa845bd8299b7534a647f12ca0b49c5bc57d4 | [
"MIT"
] | null | null | null | import ctypes
from pykinect_azure.k4a import _k4a
class Calibration:
def __init__(self, calibration_handle):
self._handle = calibration_handle
def __del__(self):
self.reset()
def __str__(self):
params = self._handle.color_camera_calibration.intrinsics.parameters.param
message = (
"Rgb Intrinsic p... | 27.924731 | 173 | 0.747016 |
3807fb7f779c2b300d15bf5d4ca12d9beb9c9c74 | 4,756 | py | Python | tutorials_for_myself/my_learn2learn/learn2learn_cherry_distributed.py | pestun/ultimate-utils | 676002e80422067256c43172a78825ed12954bcb | [
"MIT"
] | 5 | 2021-03-13T16:07:26.000Z | 2021-09-09T17:00:36.000Z | tutorials_for_myself/my_learn2learn/learn2learn_cherry_distributed.py | pestun/ultimate-utils | 676002e80422067256c43172a78825ed12954bcb | [
"MIT"
] | 8 | 2021-03-09T21:52:09.000Z | 2021-12-02T17:23:33.000Z | tutorials_for_myself/my_learn2learn/learn2learn_cherry_distributed.py | pestun/ultimate-utils | 676002e80422067256c43172a78825ed12954bcb | [
"MIT"
] | 5 | 2021-03-24T20:38:43.000Z | 2022-03-17T07:54:12.000Z | #%%
"""
test a basic distributed example for learn2learn
refs:
- l2l:
- https://github.com/learnables/learn2learn/issues/197
- https://pytorch.org/docs/stable/distributed.html#launch-utility
- torchmeta
- https://stackoverflow.com/questions/69730835/how-does-one-create-a-distributed-d... | 36.305344 | 124 | 0.697855 |
da988436bc389cc5e7037b64be850da52ef4f83f | 1,016 | py | Python | ca_on_school_boards_english_public/__init__.py | dogooderapp/scrapers-ca | 5e852eea93f05f3f397eec318d3094a3b1b0b458 | [
"MIT"
] | 19 | 2015-05-26T03:18:50.000Z | 2022-01-31T03:27:41.000Z | ca_on_school_boards_english_public/__init__.py | dogooderapp/scrapers-ca | 5e852eea93f05f3f397eec318d3094a3b1b0b458 | [
"MIT"
] | 119 | 2015-01-09T06:09:35.000Z | 2022-01-20T23:05:05.000Z | ca_on_school_boards_english_public/__init__.py | dogooderapp/scrapers-ca | 5e852eea93f05f3f397eec318d3094a3b1b0b458 | [
"MIT"
] | 17 | 2015-11-23T05:00:10.000Z | 2021-09-15T16:03:33.000Z | from utils import CanadianJurisdiction
from opencivicdata.divisions import Division
from pupa.scrape import Organization
class OntarioEnglishPublicSchoolBoards(CanadianJurisdiction):
classification = 'school' # just to avoid clash
division_id = 'ocd-division/country:ca/province:on'
division_name = 'Ontar... | 44.173913 | 125 | 0.722441 |
7568b64ccf6f876cd7b049a79cce42f18837f97c | 5,149 | py | Python | Python/anim.py | JoshuaSimon/N-Body-Problem | 1eb403f31d2708cf6828a61f8aac9b6fad5c5251 | [
"MIT"
] | 13 | 2019-07-04T11:04:20.000Z | 2022-03-09T11:00:53.000Z | Python/anim.py | JoshuaSimon/N-Body-Problem | 1eb403f31d2708cf6828a61f8aac9b6fad5c5251 | [
"MIT"
] | 1 | 2021-06-28T23:26:34.000Z | 2021-07-19T14:43:00.000Z | Python/anim.py | JoshuaSimon/N-Body-Problem | 1eb403f31d2708cf6828a61f8aac9b6fad5c5251 | [
"MIT"
] | 1 | 2020-10-14T14:40:58.000Z | 2020-10-14T14:40:58.000Z | import mayavi
import numpy as np
import matplotlib.pyplot as plt
from odes import *
from numpy.random import default_rng
from mayavi import mlab
from numba import jit
gravitational_constant = 1.0
num_bodies = 20
radius = 10
angles = np.linspace(0, 2*np.pi, num=num_bodies+1)[:-1]
masses = np.matrix(np.ones(angles.shape... | 34.790541 | 111 | 0.620897 |
59777e2e6bbc3d31348e26e1e9baaaf722599462 | 15,669 | py | Python | tests/test_config_entries.py | dannyqwertz/home-assistant | 688bdc6532e514afbdc8efd1f574a7b5c9e8d280 | [
"Apache-2.0"
] | 4 | 2019-01-10T14:47:54.000Z | 2021-04-22T02:06:27.000Z | tests/test_config_entries.py | au190/home-assistant | e87ecbd5007acad7468d7118d02b21f6d783c8bc | [
"Apache-2.0"
] | 6 | 2021-02-08T21:02:40.000Z | 2022-03-12T00:52:16.000Z | tests/test_config_entries.py | au190/home-assistant | e87ecbd5007acad7468d7118d02b21f6d783c8bc | [
"Apache-2.0"
] | 3 | 2018-08-29T19:26:20.000Z | 2020-01-19T11:58:22.000Z | """Test the config manager."""
import asyncio
from datetime import timedelta
from unittest.mock import MagicMock, patch
import pytest
from homeassistant import config_entries, loader, data_entry_flow
from homeassistant.exceptions import ConfigEntryNotReady
from homeassistant.setup import async_setup_component
from ho... | 33.338298 | 78 | 0.686579 |
bae3b970b78d228ef04b57759af0aa97b14100d4 | 9,605 | py | Python | .history/classes/Menu_20171107224812.py | reecebenson/DADSA-Tennis-PartA | d0763f819b300fcd0ce27041f5bc4ef0519c00bf | [
"MIT"
] | null | null | null | .history/classes/Menu_20171107224812.py | reecebenson/DADSA-Tennis-PartA | d0763f819b300fcd0ce27041f5bc4ef0519c00bf | [
"MIT"
] | null | null | null | .history/classes/Menu_20171107224812.py | reecebenson/DADSA-Tennis-PartA | d0763f819b300fcd0ce27041f5bc4ef0519c00bf | [
"MIT"
] | null | null | null | # DADSA - Assignment 1
# Reece Benson
from functools import partial
from os import system as call
from collections import OrderedDict
class Menu():
# Define the variables we will be using
_app = None
_menu = None
_current = [ "main" ]
_current_menu = "main"
just_called_back = False
def __... | 38.729839 | 262 | 0.554086 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.