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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e39eb6ae0d025245423d32fca17a12c02cfa81ab | 2,348 | py | Python | tests/run_test.py | That-Cool-Coder/yacpm | e5bf7626e9188c2bab55df775cfb59ef086cfe77 | [
"MIT"
] | 15 | 2021-09-26T13:44:40.000Z | 2022-01-13T08:31:05.000Z | tests/run_test.py | That-Cool-Coder/yacpm | e5bf7626e9188c2bab55df775cfb59ef086cfe77 | [
"MIT"
] | 3 | 2021-09-29T12:33:06.000Z | 2021-11-29T22:41:14.000Z | tests/run_test.py | That-Cool-Coder/yacpm | e5bf7626e9188c2bab55df775cfb59ef086cfe77 | [
"MIT"
] | 3 | 2021-10-20T21:54:38.000Z | 2021-11-27T08:01:16.000Z | #!/usr/bin/env python3
#
# Run tests (specfied by cli arguments), or all if unspecified, with a
# directory from this directory. This script will symlink the script files in the
# current working tree so the latest changes will be tested.
#
import multiprocessing
import os
import sys
from argparse import ArgumentPars... | 29.721519 | 93 | 0.646082 |
88f7133193be6bc10d2c0aa6e7052e764c3070e3 | 3,372 | py | Python | main.py | zquaa/LCU-Stats | 02f2b793a285e1c42345f33f329a8e46e02396bc | [
"MIT"
] | null | null | null | main.py | zquaa/LCU-Stats | 02f2b793a285e1c42345f33f329a8e46e02396bc | [
"MIT"
] | null | null | null | main.py | zquaa/LCU-Stats | 02f2b793a285e1c42345f33f329a8e46e02396bc | [
"MIT"
] | null | null | null | from colorama.ansi import Fore
from lcu_driver import Connector
import requests
import re, json
import webbrowser
import colorama
import pyautogui
import sys
from time import sleep
from os import system
titlea = "LCU API ABUSER"
system("title "+titlea)
init = True
colorama.init()
CURRENT_SUMMONER = ... | 31.514019 | 322 | 0.658363 |
1502f3790f610ed56bfa00b56c99519051044639 | 1,860 | py | Python | ext/extensionmanager.py | ahnaf-zamil/zenora-bot | 66f1dcde6264985a262628e35e8a0b0996f4fd30 | [
"MIT"
] | null | null | null | ext/extensionmanager.py | ahnaf-zamil/zenora-bot | 66f1dcde6264985a262628e35e8a0b0996f4fd30 | [
"MIT"
] | null | null | null | ext/extensionmanager.py | ahnaf-zamil/zenora-bot | 66f1dcde6264985a262628e35e8a0b0996f4fd30 | [
"MIT"
] | null | null | null | import discord
from discord.ext import commands
class ExtensionManager(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.command()
@commands.is_owner()
async def loadext(self, ctx, *, extension):
"""
Loads the specified error if possible
Otherwise return... | 30 | 65 | 0.603226 |
c464ffbbf7c0424d5e18eefc877df853cf0db600 | 9,335 | py | Python | S4/S4 Library/simulation/telemetry_helper.py | NeonOcean/Environment | ca658cf66e8fd6866c22a4a0136d415705b36d26 | [
"CC-BY-4.0"
] | 1 | 2021-05-20T19:33:37.000Z | 2021-05-20T19:33:37.000Z | S4/S4 Library/simulation/telemetry_helper.py | NeonOcean/Environment | ca658cf66e8fd6866c22a4a0136d415705b36d26 | [
"CC-BY-4.0"
] | null | null | null | S4/S4 Library/simulation/telemetry_helper.py | NeonOcean/Environment | ca658cf66e8fd6866c22a4a0136d415705b36d26 | [
"CC-BY-4.0"
] | null | null | null | import collections
from date_and_time import create_time_span
from objects import ALL_HIDDEN_REASONS
from sims4.telemetry import RuleAction
from sims4.tuning.tunable import Tunable, TunableRange, TunableList, TunableTuple, TunableEnumEntry
import alarms
import enum
import objects.components
import services
import sims4... | 61.013072 | 2,198 | 0.678093 |
55d3f7475be0df4cd6577d32ac614434fd4efc59 | 377 | py | Python | app_folder/controllers/api.py | Nuznhy/day-f-hack | 9f3dbcd73e73ea4e7807e5197bf0b0ded76bc9f3 | [
"MIT"
] | null | null | null | app_folder/controllers/api.py | Nuznhy/day-f-hack | 9f3dbcd73e73ea4e7807e5197bf0b0ded76bc9f3 | [
"MIT"
] | null | null | null | app_folder/controllers/api.py | Nuznhy/day-f-hack | 9f3dbcd73e73ea4e7807e5197bf0b0ded76bc9f3 | [
"MIT"
] | null | null | null | import logging
from fastapi import APIRouter
from app_folder.schemas.api import ReadyResponse
ready_route = APIRouter()
log = logging.getLogger(__name__)
@ready_route.get(
'/ready',
tags=['ready'],
response_model=ReadyResponse,
summary="Simple health check."
)
def readiness_check():
log.info("St... | 19.842105 | 48 | 0.729443 |
57d5f2268fad4437d35216f13fc4efdb5b62ea81 | 77,577 | py | Python | mne/cov.py | nicproulx/mne-python | 4b0f362df04b21249faf6c9a2495c71c337a14a8 | [
"BSD-3-Clause"
] | null | null | null | mne/cov.py | nicproulx/mne-python | 4b0f362df04b21249faf6c9a2495c71c337a14a8 | [
"BSD-3-Clause"
] | null | null | null | mne/cov.py | nicproulx/mne-python | 4b0f362df04b21249faf6c9a2495c71c337a14a8 | [
"BSD-3-Clause"
] | 1 | 2020-12-15T09:16:29.000Z | 2020-12-15T09:16:29.000Z | # Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Matti Hamalainen <msh@nmr.mgh.harvard.edu>
# Denis A. Engemann <denis.engemann@gmail.com>
#
# License: BSD (3-clause)
from copy import deepcopy
from distutils.version import LooseVersion
import itertools as itt
from math import... | 38.691771 | 113 | 0.588693 |
b48ab3b9b7f2ec4fd67ddb7f0b22943a9db5f83c | 9,231 | py | Python | cameo/spiderForCRUNCHBASE.py | muchu1983/104_cameo | 8c7f78de198a5bd8d870589402e3b7e8b59f520a | [
"BSD-3-Clause"
] | null | null | null | cameo/spiderForCRUNCHBASE.py | muchu1983/104_cameo | 8c7f78de198a5bd8d870589402e3b7e8b59f520a | [
"BSD-3-Clause"
] | null | null | null | cameo/spiderForCRUNCHBASE.py | muchu1983/104_cameo | 8c7f78de198a5bd8d870589402e3b7e8b59f520a | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Copyright (C) 2015, MuChu Hsu
Contributed by Muchu Hsu (muchu1983@gmail.com)
This file is part of BSD license
<https://opensource.org/licenses/BSD-3-Clause>
"""
import os
from subprocess import call
from cameo.localdb import LocalDbForCRUNCHBASE
from cameo.utility import Utility
"""
以 shell... | 37.221774 | 124 | 0.490088 |
0447f92b75f8f19c19ebb5b046a98d8e2cf51677 | 1,169 | py | Python | kws_doa.py | swm1718/mic_array | 9de54bf2f2351d8d14379dca2f7da53c736652f2 | [
"Apache-2.0"
] | 246 | 2017-06-13T04:14:22.000Z | 2022-03-26T06:23:48.000Z | kws_doa.py | wangszuhung/mic_array | 2fbbe51f4243de0329fa5d8d63c9fca7638f45ff | [
"Apache-2.0"
] | 48 | 2017-06-07T20:50:02.000Z | 2022-03-01T18:07:54.000Z | kws_doa.py | luvianmoon/Wanting | 6f14b4f3e9ee53cb95ed3bba0df458630af025eb | [
"Apache-2.0"
] | 75 | 2017-06-20T14:30:45.000Z | 2022-03-17T08:42:40.000Z |
import sys
import numpy as np
import collections
from mic_array import MicArray
from pixel_ring import pixel_ring
from snowboydetect import SnowboyDetect
RATE = 16000
CHANNELS = 4
KWS_FRAMES = 10 # ms
DOA_FRAMES = 800 # ms
detector = SnowboyDetect('snowboy/resources/common.res', 'snowboy/reso... | 25.977778 | 104 | 0.609923 |
787ce88f3a7c710fd7e4219d57524908a01db2ed | 2,951 | py | Python | salt/serializers/configparser.py | jubrad/salt | 7960334fb726cfde45e6409da79a65535c626685 | [
"Apache-2.0"
] | 1 | 2020-01-02T09:03:21.000Z | 2020-01-02T09:03:21.000Z | salt/serializers/configparser.py | jubrad/salt | 7960334fb726cfde45e6409da79a65535c626685 | [
"Apache-2.0"
] | 3 | 2015-03-31T14:44:05.000Z | 2015-06-18T19:02:24.000Z | salt/serializers/configparser.py | jubrad/salt | 7960334fb726cfde45e6409da79a65535c626685 | [
"Apache-2.0"
] | 1 | 2020-01-02T09:03:24.000Z | 2020-01-02T09:03:24.000Z | # -*- coding: utf-8 -*-
'''
salt.serializers.configparser
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. versionadded:: 2016.3.0
Implements a configparser serializer.
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Libs
from salt.ext import six
import salt.ext.six.moves.configparser ... | 29.51 | 102 | 0.613351 |
3ad013d52100e7ea2f6c191d2c9560c5b992a4cf | 1,573 | py | Python | Examples/Legacy/CustomHamiltonian/custom_hamiltonian.py | gpescia/MyNetKet | 958510966a5870d9d491de0628903cf1fc210921 | [
"Apache-2.0"
] | 352 | 2018-04-24T16:45:10.000Z | 2022-03-31T01:15:34.000Z | Examples/Legacy/CustomHamiltonian/custom_hamiltonian.py | gpescia/MyNetKet | 958510966a5870d9d491de0628903cf1fc210921 | [
"Apache-2.0"
] | 947 | 2018-04-24T20:16:17.000Z | 2022-03-31T17:33:52.000Z | Examples/Legacy/CustomHamiltonian/custom_hamiltonian.py | gpescia/MyNetKet | 958510966a5870d9d491de0628903cf1fc210921 | [
"Apache-2.0"
] | 148 | 2018-04-25T02:44:20.000Z | 2022-03-11T11:42:34.000Z | # Copyright 2020 The Netket 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... | 28.6 | 76 | 0.722823 |
80d3c0868bb23118bb75eddd87069d0191cf40f3 | 5,602 | py | Python | jasper.py | MathieuGalant/jasper | 0394e9ca00cc1f9b6ed8ba97d182528d11ee2ed0 | [
"MIT"
] | 1 | 2019-05-29T15:44:32.000Z | 2019-05-29T15:44:32.000Z | jasper.py | MathieuGalant/jasper | 0394e9ca00cc1f9b6ed8ba97d182528d11ee2ed0 | [
"MIT"
] | 1 | 2019-05-29T15:46:38.000Z | 2019-05-29T15:46:38.000Z | jasper.py | MathieuGalant/jasper | 0394e9ca00cc1f9b6ed8ba97d182528d11ee2ed0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# -*- coding: utf-8-*-
import os
import sys
import shutil
import logging
import yaml
import argparse
from client import tts
from client import stt
from client import jasperpath
from client import diagnose
from client.conversation import Conversation
# Add jasperpath.LIB_PATH to sys.path
sys.p... | 36.855263 | 79 | 0.576937 |
45d6ffe7360b661f76e8f962e79b93c99b312c01 | 2,536 | py | Python | tests/test_serializer.py | petertriho/prestans | e262e542518fcb765df03ae9aa246de296c044ff | [
"BSD-3-Clause"
] | 12 | 2015-05-20T13:37:48.000Z | 2020-10-07T09:46:46.000Z | tests/test_serializer.py | petertriho/prestans | e262e542518fcb765df03ae9aa246de296c044ff | [
"BSD-3-Clause"
] | 113 | 2015-01-08T01:08:11.000Z | 2018-11-22T03:57:28.000Z | tests/test_serializer.py | petertriho/prestans | e262e542518fcb765df03ae9aa246de296c044ff | [
"BSD-3-Clause"
] | 2 | 2016-03-14T04:19:47.000Z | 2019-02-04T05:59:54.000Z | import json
import plistlib
import sys
import unittest
from prestans import exception
from prestans.serializer import Base
from prestans.serializer import JSON
from prestans.serializer import XMLPlist
from prestans.types import DataCollection
class SerializerBaseUnitTest(unittest.TestCase):
def test_dumps(self)... | 33.813333 | 107 | 0.707808 |
c258cf5c68970d49697bc50b7236f991f1827c0d | 340 | py | Python | feedback_app/urls.py | Jcuperus/code_assessment | 3bb2e7342f61400da80a70a6c71fad7938ad073c | [
"MIT"
] | null | null | null | feedback_app/urls.py | Jcuperus/code_assessment | 3bb2e7342f61400da80a70a6c71fad7938ad073c | [
"MIT"
] | null | null | null | feedback_app/urls.py | Jcuperus/code_assessment | 3bb2e7342f61400da80a70a6c71fad7938ad073c | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
app_name = 'feedback'
urlpatterns = [
path('', views.index, name='index'),
path('result', views.result, name='result'),
path('assessments', views.assessments, name='assessments'),
path('assessments/<int:assessment_id>', views.assessment_detail, name='a... | 28.333333 | 94 | 0.705882 |
889f54d5ee055a19c3762482dad65f0e142ab24d | 5,030 | py | Python | docs/source/best_practice/ddpg/parse.demo.py | HansBug/argsloader | 7737758de804ec81150382b1c76de9cf5f48c99d | [
"Apache-2.0"
] | null | null | null | docs/source/best_practice/ddpg/parse.demo.py | HansBug/argsloader | 7737758de804ec81150382b1c76de9cf5f48c99d | [
"Apache-2.0"
] | null | null | null | docs/source/best_practice/ddpg/parse.demo.py | HansBug/argsloader | 7737758de804ec81150382b1c76de9cf5f48c99d | [
"Apache-2.0"
] | null | null | null | from enum import Enum, unique
from pprint import pprint
from argsloader.units import cdict, cvalue, number, enum, yesno, onoff, positive, interval
@unique
class PolicyType(Enum):
DDPG = 1
@unique
class ActionSpaceType(Enum):
CONTINUOUS = 1
HYBRID = 2
config_loader = cdict(dict(
# (str) RL policy ... | 44.122807 | 113 | 0.645129 |
e7757e6ae88efff3ef5f894d30a6df6edf69c293 | 19,593 | py | Python | pydupes.py | erikreed/pydupes | b66be09dba6b9e1f0ebf0997eac6585d0c41b07c | [
"MIT"
] | null | null | null | pydupes.py | erikreed/pydupes | b66be09dba6b9e1f0ebf0997eac6585d0c41b07c | [
"MIT"
] | null | null | null | pydupes.py | erikreed/pydupes | b66be09dba6b9e1f0ebf0997eac6585d0c41b07c | [
"MIT"
] | null | null | null | import collections
import datetime
import functools
import gzip
import hashlib
import itertools
import json
import logging
import os.path
import pathlib
import queue
import stat
import threading
import typing
from collections import defaultdict
import click
from tqdm import tqdm
# size of buffer to use when reading f... | 37.824324 | 118 | 0.614505 |
c811c0ec9c4c988c108ebdb46f6fdd856c20c12a | 3,359 | py | Python | test/azure/version-tolerant/Expected/AcceptanceTests/AzureParameterGroupingVersionTolerant/azureparametergroupingversiontolerant/_auto_rest_parameter_grouping_test_service.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/azure/version-tolerant/Expected/AcceptanceTests/AzureParameterGroupingVersionTolerant/azureparametergroupingversiontolerant/_auto_rest_parameter_grouping_test_service.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/azure/version-tolerant/Expected/AcceptanceTests/AzureParameterGroupingVersionTolerant/azureparametergroupingversiontolerant/_auto_rest_parameter_grouping_test_service.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | # 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 ... | 37.741573 | 99 | 0.662102 |
b92cd4eca4725a9d59cf5883dfee518adc4ab889 | 3,824 | py | Python | oo/carro.py | HenriqueCCdA/pythonbirds | 528e1f18d3aac8d381557d43f230cbb8fa624a20 | [
"MIT"
] | null | null | null | oo/carro.py | HenriqueCCdA/pythonbirds | 528e1f18d3aac8d381557d43f230cbb8fa624a20 | [
"MIT"
] | null | null | null | oo/carro.py | HenriqueCCdA/pythonbirds | 528e1f18d3aac8d381557d43f230cbb8fa624a20 | [
"MIT"
] | null | null | null | '''
Voce vai criar um classe carro que vai possuir dois atributos compostos por
outras duas classes:
1) Motor
2) Direcao
O moto terá a responsabilidade de controlar a velocidade.
Ele oferece as sequintes atributos:
1) Atributos dado velocidade
2) Método acelerar, que deverá incrementar a velocidade em uma uniddde
3) ... | 23.460123 | 75 | 0.588389 |
1945d4820f7103f0bdf1aa49526fc2cfd320e80c | 3,092 | py | Python | tests/src/WHICH/prediction/smote.py | bellwethers-in-se/issueCloseTime | e5e00c9625da0793dc8e7985fd88b0ca0b35f7d3 | [
"MIT"
] | 9 | 2017-07-27T10:32:48.000Z | 2021-07-01T11:51:51.000Z | tests/src/WHICH/prediction/smote.py | bellwethers-in-se/issueCloseTime | e5e00c9625da0793dc8e7985fd88b0ca0b35f7d3 | [
"MIT"
] | 11 | 2016-03-15T16:27:47.000Z | 2019-09-05T02:25:08.000Z | tests/src/WHICH/prediction/smote.py | bellwethers-in-se/issueCloseTime | e5e00c9625da0793dc8e7985fd88b0ca0b35f7d3 | [
"MIT"
] | 5 | 2017-01-28T22:45:34.000Z | 2019-12-04T13:15:10.000Z | from collections import Counter
from pdb import set_trace
from random import choice, uniform as rand
import numpy as np
import pandas as pd
from scipy.spatial.distance import euclidean
from sklearn.neighbors import BallTree
import warnings
with warnings.catch_warnings():
# Shut those god damn warnings up!
wa... | 28.897196 | 99 | 0.534282 |
56168477e086ed3ff8fdd2a05b8632333df386b5 | 131 | py | Python | apps/app9_basic_model/admin.py | ProfesseurGibaud/TestSite | 53d2dda4ab8135104be28c57decfb244d5e2e72a | [
"MIT"
] | 304 | 2015-01-06T18:02:49.000Z | 2021-12-11T18:08:37.000Z | apps/app9_basic_model/admin.py | ProfesseurGibaud/TestSite | 53d2dda4ab8135104be28c57decfb244d5e2e72a | [
"MIT"
] | 9 | 2015-04-11T19:38:23.000Z | 2019-11-16T19:38:07.000Z | apps/app9_basic_model/admin.py | ProfesseurGibaud/TestSite | 53d2dda4ab8135104be28c57decfb244d5e2e72a | [
"MIT"
] | 41 | 2015-04-11T14:58:02.000Z | 2021-11-13T20:47:58.000Z | # -*- coding: utf-8 -*-
from django.contrib import admin
from app9_basic_model.models import Person
admin.site.register(Person)
| 16.375 | 42 | 0.755725 |
ae64cf5125475e5787ef5aaccc7b0691dd314bc7 | 829 | py | Python | tests/example/nspkg/pkg_resources/__init__.py | renovate-bot/sphinx-docfx-yaml | c34de067712633f2400788db6e88067a760ca6d5 | [
"Apache-2.0"
] | 4 | 2021-03-22T18:24:36.000Z | 2022-03-26T15:06:43.000Z | tests/example/nspkg/pkg_resources/__init__.py | renovate-bot/sphinx-docfx-yaml | c34de067712633f2400788db6e88067a760ca6d5 | [
"Apache-2.0"
] | 119 | 2021-03-24T22:27:19.000Z | 2022-03-18T14:37:40.000Z | tests/example/nspkg/pkg_resources/__init__.py | renovate-bot/sphinx-docfx-yaml | c34de067712633f2400788db6e88067a760ca6d5 | [
"Apache-2.0"
] | 2 | 2021-03-24T23:15:15.000Z | 2021-04-14T09:30:13.000Z | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 41.45 | 117 | 0.772014 |
861f56ad40b87f284e63f9b45196fa24b10e0669 | 4,919 | py | Python | isi_sdk_8_1_1/isi_sdk_8_1_1/models/upgrade_cluster_upgrade_settings.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_1_1/isi_sdk_8_1_1/models/upgrade_cluster_upgrade_settings.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_1_1/isi_sdk_8_1_1/models/upgrade_cluster_upgrade_settings.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 6
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class UpgradeClusterUpgradeSetti... | 34.398601 | 247 | 0.631632 |
a40aa476d89675b428d3104e8243b25b3b9775f5 | 1,754 | py | Python | duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/numtrees_25/rule_7.py | apcarrik/kaggle | 6e2d4db58017323e7ba5510bcc2598e01a4ee7bf | [
"MIT"
] | null | null | null | duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/numtrees_25/rule_7.py | apcarrik/kaggle | 6e2d4db58017323e7ba5510bcc2598e01a4ee7bf | [
"MIT"
] | null | null | null | duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/numtrees_25/rule_7.py | apcarrik/kaggle | 6e2d4db58017323e7ba5510bcc2598e01a4ee7bf | [
"MIT"
] | null | null | null | def findDecision(obj): #obj[0]: Driving_to, obj[1]: Passanger, obj[2]: Weather, obj[3]: Temperature, obj[4]: Time, obj[5]: Coupon, obj[6]: Coupon_validity, obj[7]: Gender, obj[8]: Age, obj[9]: Maritalstatus, obj[10]: Children, obj[11]: Education, obj[12]: Occupation, obj[13]: Income, obj[14]: Bar, obj[15]: Coffeehouse,... | 40.790698 | 441 | 0.595211 |
ee2b3c9fe78e3858195ae0f0b83fd8ef124e65a1 | 670 | py | Python | manage.py | DvaMishkiLapa/github_link_collector | 253e2815756f3a8d356ebbe0fcbde2ffea77b1f5 | [
"Apache-2.0"
] | null | null | null | manage.py | DvaMishkiLapa/github_link_collector | 253e2815756f3a8d356ebbe0fcbde2ffea77b1f5 | [
"Apache-2.0"
] | null | null | null | manage.py | DvaMishkiLapa/github_link_collector | 253e2815756f3a8d356ebbe0fcbde2ffea77b1f5 | [
"Apache-2.0"
] | 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', 'link_collector.settings')
try:
from django.core.management import execute_from_command_line
exce... | 29.130435 | 78 | 0.68209 |
2e165ad53f6e16209d063f66d518c2c61e231179 | 11,697 | py | Python | test_utils/utils/twill_runner.py | mthornhill/django-test-utils | 53909d8df47a3f73e84501271b25e2097ed6adaa | [
"MIT"
] | 1 | 2015-11-08T11:35:49.000Z | 2015-11-08T11:35:49.000Z | test_utils/utils/twill_runner.py | mthornhill/django-test-utils | 53909d8df47a3f73e84501271b25e2097ed6adaa | [
"MIT"
] | null | null | null | test_utils/utils/twill_runner.py | mthornhill/django-test-utils | 53909d8df47a3f73e84501271b25e2097ed6adaa | [
"MIT"
] | null | null | null | """
This code is originally by miracle2k:
http://bitbucket.org/miracle2k/djutils/src/97f92c32c621/djutils/test/twill.py
Integrates the twill web browsing scripting language with Django.
Provides too main functions, ``setup()`` and ``teardown``, that hook
(and unhook) a certain host name to the WSGI interfa... | 35.231928 | 91 | 0.633667 |
4e0f4bac97e8e8765927c18630703981e0641a20 | 4,246 | py | Python | alphadraughts/draughts/game.py | TTitcombe/AlphaDraughts | 0a5f91e4f657a25da3877965cd943fb57b7cd509 | [
"MIT"
] | 4 | 2019-09-03T02:59:13.000Z | 2022-01-23T09:34:50.000Z | alphadraughts/draughts/game.py | TTitcombe/AlphaDraughts | 0a5f91e4f657a25da3877965cd943fb57b7cd509 | [
"MIT"
] | 16 | 2019-08-24T09:12:09.000Z | 2020-01-03T16:52:22.000Z | alphadraughts/draughts/game.py | TTitcombe/AlphaDraughts | 0a5f91e4f657a25da3877965cd943fb57b7cd509 | [
"MIT"
] | 1 | 2019-09-03T02:59:16.000Z | 2019-09-03T02:59:16.000Z | from typing import List, Tuple
from .board import Board
from .players import BasePlayer, HumanPlayer
class Game:
def __init__(self, white=HumanPlayer("white"), black=HumanPlayer("black")):
"""
Create a game object. The default is human vs human.
"""
self.white = white
self... | 27.751634 | 79 | 0.517664 |
1e2400a9de02e2f555149bc902d3c233a25dfab7 | 31,802 | py | Python | final_project/scripts/fda_win.py | edward556/Math-Exam | 557fa04fa83cf6f009dba6fe9eb762dfc154efc7 | [
"Apache-2.0"
] | null | null | null | final_project/scripts/fda_win.py | edward556/Math-Exam | 557fa04fa83cf6f009dba6fe9eb762dfc154efc7 | [
"Apache-2.0"
] | null | null | null | final_project/scripts/fda_win.py | edward556/Math-Exam | 557fa04fa83cf6f009dba6fe9eb762dfc154efc7 | [
"Apache-2.0"
] | null | null | null | from tkinter import *
import tkinter.messagebox as msb
import os
import sys
import numpy as np
from mpmath import sec, tan, sqrt
import math
from functions_list import functions_list_window
def window_for_fda():
# FDA Window's Setup.
fda_win = Tk()
fda_win.resizable(height = False, width = Fals... | 67.092827 | 297 | 0.491573 |
d09a65ad37e717c826c1275fbc92b8575e54dd4a | 2,139 | py | Python | engine/integrations/rmq.py | meddler-io/secoflex | 3a61b46ab03a25f6436d8e004a1d8ead46093272 | [
"MIT"
] | null | null | null | engine/integrations/rmq.py | meddler-io/secoflex | 3a61b46ab03a25f6436d8e004a1d8ead46093272 | [
"MIT"
] | null | null | null | engine/integrations/rmq.py | meddler-io/secoflex | 3a61b46ab03a25f6436d8e004a1d8ead46093272 | [
"MIT"
] | null | null | null |
import asyncio
from time import sleep
import aio_pika
import logging
from aio_pika import connect, Message, DeliveryMode, ExchangeType
from fastapi.logger import logger as fastapi_logger
from app.core.config import RABBITMQ_HOST
Connection = None
class Rmq:
async def InitLoop(self, loop: asyncio.AbstractEventL... | 28.144737 | 82 | 0.567087 |
f27009266aead126c7e9eb6f862efe9bfde6cfb3 | 16,307 | py | Python | tests/pruning/test_model_pruning_analysis.py | wei1tang/nncf | dcf966e5ffbdababb0e1b39942c9e10193487cbf | [
"Apache-2.0"
] | null | null | null | tests/pruning/test_model_pruning_analysis.py | wei1tang/nncf | dcf966e5ffbdababb0e1b39942c9e10193487cbf | [
"Apache-2.0"
] | null | null | null | tests/pruning/test_model_pruning_analysis.py | wei1tang/nncf | dcf966e5ffbdababb0e1b39942c9e10193487cbf | [
"Apache-2.0"
] | null | null | null | """
Copyright (c) 2020 Intel Corporation
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... | 46.064972 | 120 | 0.655976 |
5239dc8659f253f30755b73f5e9f354969ced199 | 704 | py | Python | quantecon/game_theory/__init__.py | Smit-create/QuantEcon.py | 5be42da065c198e84a468d5e0e38056168a6b0e3 | [
"BSD-3-Clause"
] | 1,462 | 2015-01-08T18:58:13.000Z | 2022-03-29T05:24:28.000Z | quantecon/game_theory/__init__.py | Smit-create/QuantEcon.py | 5be42da065c198e84a468d5e0e38056168a6b0e3 | [
"BSD-3-Clause"
] | 505 | 2015-01-06T08:52:16.000Z | 2022-03-31T13:52:58.000Z | quantecon/game_theory/__init__.py | Smit-create/QuantEcon.py | 5be42da065c198e84a468d5e0e38056168a6b0e3 | [
"BSD-3-Clause"
] | 1,987 | 2015-01-08T06:08:39.000Z | 2022-03-29T08:02:45.000Z | # flake8: noqa
"""
Game Theory SubPackage
"""
from .normal_form_game import Player, NormalFormGame
from .normal_form_game import pure2mixed, best_response_2p
from .random import (
random_game, covariance_game, random_pure_actions, random_mixed_actions
)
from .pure_nash import pure_nash_brute, pure_nash_brute_gen
f... | 35.2 | 77 | 0.848011 |
a99760979bd9f72253a49a87f484cebeb73f1899 | 2,535 | py | Python | src/sentry/filters/base.py | NickPresta/sentry | ed3e6034ef560e18f392ba30071de860557b7b43 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/filters/base.py | NickPresta/sentry | ed3e6034ef560e18f392ba30071de860557b7b43 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/filters/base.py | NickPresta/sentry | ed3e6034ef560e18f392ba30071de860557b7b43 | [
"BSD-3-Clause"
] | null | null | null | """
sentry.filters.base
~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
# Widget api is pretty ugly
from __future__ import absolute_import
__all__ = ('Filter',)
import hashlib
from django.utils.datastructures import So... | 26.684211 | 87 | 0.62288 |
8cd17393720d5734b2b45b501f254377a431cf86 | 2,828 | py | Python | tests/test_program.py | aforren1/moderngl | 32fe79927e02b0fa893b3603d677bdae39771e14 | [
"MIT"
] | 916 | 2019-03-11T19:15:20.000Z | 2022-03-31T19:22:16.000Z | tests/test_program.py | aforren1/moderngl | 32fe79927e02b0fa893b3603d677bdae39771e14 | [
"MIT"
] | 218 | 2019-03-11T06:05:52.000Z | 2022-03-30T16:59:22.000Z | tests/test_program.py | aforren1/moderngl | 32fe79927e02b0fa893b3603d677bdae39771e14 | [
"MIT"
] | 110 | 2019-04-06T18:32:24.000Z | 2022-03-21T20:30:47.000Z | import unittest
from common import get_context
import moderngl
class TestCase(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.ctx = get_context()
def test_program(self):
program = self.ctx.program(
vertex_shader='''
#version 330
uni... | 31.076923 | 106 | 0.473833 |
3f585995a52d6ea4f37d58cd11aaec08a44891f4 | 15,621 | py | Python | tests/test_models/test_forward.py | jiangrongatrobo/mmdetection | 76ccf891f98f5df526146560773f1fedf5607bdd | [
"Apache-2.0"
] | 44 | 2021-08-18T02:15:10.000Z | 2022-03-28T03:15:06.000Z | tests/test_models/test_forward.py | jiangrongatrobo/mmdetection | 76ccf891f98f5df526146560773f1fedf5607bdd | [
"Apache-2.0"
] | 3 | 2021-10-10T06:38:17.000Z | 2022-03-17T09:22:59.000Z | tests/test_models/test_forward.py | jiangrongatrobo/mmdetection | 76ccf891f98f5df526146560773f1fedf5607bdd | [
"Apache-2.0"
] | 6 | 2021-08-24T03:10:20.000Z | 2022-03-28T07:24:53.000Z | """pytest tests/test_forward.py."""
import copy
from os.path import dirname, exists, join
import numpy as np
import pytest
import torch
def _get_config_directory():
"""Find the predefined detector config directory."""
try:
# Assume we are running in the source mmdetection repo
repo_dpath = di... | 31.493952 | 79 | 0.637667 |
834cfc0df112e7f9bcf6b5ab32e7df6039a98603 | 524 | py | Python | lbng/disk.py | adrian15/live-wrapper | 4c908cd1682f5d15912810a33c71c35a54fc7115 | [
"BSD-2-Clause"
] | 1 | 2016-01-05T17:29:13.000Z | 2016-01-05T17:29:13.000Z | lbng/disk.py | adrian15/live-wrapper | 4c908cd1682f5d15912810a33c71c35a54fc7115 | [
"BSD-2-Clause"
] | null | null | null | lbng/disk.py | adrian15/live-wrapper | 4c908cd1682f5d15912810a33c71c35a54fc7115 | [
"BSD-2-Clause"
] | null | null | null | # live-build-ng - Live-Build NG
# (C) Iain R. Learmonth 2015 <irl@debian.org>
# See COPYING for terms of usage, modification and redistribution.
#
# lbng/disk.py - .disk folder helpers
"""
This module provides helpers for generating the metadata stored in .disk/ on
the cdroot.
"""
import os
def install_disk_info():
... | 22.782609 | 76 | 0.671756 |
769a6e6966757bc554ac1aa98cbf4133276909ba | 2,434 | py | Python | quara/objects/state_ensemble.py | tknrsgym/quara | 8f3337af83cdd02bb85632bb1e297902b1fff8fb | [
"Apache-2.0"
] | 3 | 2021-05-19T11:44:30.000Z | 2022-03-30T07:13:49.000Z | quara/objects/state_ensemble.py | tknrsgym/quara | 8f3337af83cdd02bb85632bb1e297902b1fff8fb | [
"Apache-2.0"
] | 2 | 2021-06-02T01:24:59.000Z | 2021-06-02T12:20:31.000Z | quara/objects/state_ensemble.py | tknrsgym/quara | 8f3337af83cdd02bb85632bb1e297902b1fff8fb | [
"Apache-2.0"
] | 1 | 2021-10-14T13:21:27.000Z | 2021-10-14T13:21:27.000Z | from typing import List, Tuple, Union
import numpy as np
from quara.objects.qoperation import QOperation
from quara.objects.state import State
from quara.objects.multinomial_distribution import MultinomialDistribution
from quara.utils.index_util import index_serial_from_index_multi_dimensional
class StateEnsemble(QOp... | 33.342466 | 104 | 0.622432 |
7bdfb731763d1715540665f7741d5cd6a8cb4834 | 29,811 | py | Python | proyectoprincipal/mainapp/views.py | diegofdoruiz/proyectowww | 9020b60a81e901d9f43daa16bc7e3c3de77c7ae9 | [
"MIT"
] | null | null | null | proyectoprincipal/mainapp/views.py | diegofdoruiz/proyectowww | 9020b60a81e901d9f43daa16bc7e3c3de77c7ae9 | [
"MIT"
] | null | null | null | proyectoprincipal/mainapp/views.py | diegofdoruiz/proyectowww | 9020b60a81e901d9f43daa16bc7e3c3de77c7ae9 | [
"MIT"
] | null | null | null | from django.shortcuts import redirect
from django.http import HttpResponse
from django.utils.html import escape
from django.contrib.auth.models import User, Permission, Group as Rol
from django.shortcuts import render, get_object_or_404
from django.views.generic import CreateView
from django.contrib.auth.views import L... | 42.225212 | 143 | 0.615109 |
375992ff9fcd4d36e4a1c29abc406a156de5ae56 | 1,803 | py | Python | Projetos/tools/scripts/writeROM.py | RaphaelAzev/Z01-GrupoH-2- | 1a0077f53beb4a57c5e509fe22c4a9bb0ecaa905 | [
"Unlicense"
] | 2 | 2018-03-21T01:20:58.000Z | 2018-04-16T14:35:51.000Z | Projetos/tools/scripts/writeROM.py | RaphaelAzev/Z01-GrupoH-2- | 1a0077f53beb4a57c5e509fe22c4a9bb0ecaa905 | [
"Unlicense"
] | 77 | 2018-03-09T12:33:31.000Z | 2018-05-18T10:42:22.000Z | Projetos/tools/scripts/writeROM.py | TeraByte900/Z01-Ingenheiros | db9dbf899d3cdc72e247ba4a9d15ae205cf8757f | [
"Unlicense"
] | 3 | 2018-03-07T01:27:37.000Z | 2018-03-23T19:35:14.000Z | # Rafael Corsi @ insper.edu.br
# /2018
# Disciplina Elementos de Sistemas
#
# Abril/2018
import os
import argparse
import fileinput
import subprocess
import string
TAB = " "
END = "\n"
TCL_FILE = "atualizaMemoria.tcl"
def setMifFile(mif, tclFile):
for line in fileinput.input(tclFile, inplace = 1):
... | 24.04 | 86 | 0.575153 |
ce96cf2bd962f74043548ecaaaa5051ca93966b7 | 12,417 | py | Python | sympy/printing/mathematica.py | shilpiprd/sympy | 556e9c61b31d0d5f101cd56b43e843fbf3bcf121 | [
"BSD-3-Clause"
] | 8,323 | 2015-01-02T15:51:43.000Z | 2022-03-31T13:13:19.000Z | sympy/printing/mathematica.py | shilpiprd/sympy | 556e9c61b31d0d5f101cd56b43e843fbf3bcf121 | [
"BSD-3-Clause"
] | 15,102 | 2015-01-01T01:33:17.000Z | 2022-03-31T22:53:13.000Z | sympy/printing/mathematica.py | shilpiprd/sympy | 556e9c61b31d0d5f101cd56b43e843fbf3bcf121 | [
"BSD-3-Clause"
] | 4,490 | 2015-01-01T17:48:07.000Z | 2022-03-31T17:24:05.000Z | """
Mathematica code printer
"""
from typing import Any, Dict, Set, Tuple
from sympy.core import Basic, Expr, Float
from sympy.printing.codeprinter import CodePrinter
from sympy.printing.precedence import precedence
# Used in MCodePrinter._print_Function(self)
known_functions = {
"exp": [(lambda x: True, "Exp")... | 35.681034 | 93 | 0.571716 |
5c8b8d6aefe50096bb612cea8e1c468a868043fb | 3,869 | py | Python | tests/unit/stream_alert_cli/terraform/test_athena.py | tuapuikia/streamalert | b1f733259aa051f8d533e7881018280fe77d7bda | [
"Apache-2.0"
] | null | null | null | tests/unit/stream_alert_cli/terraform/test_athena.py | tuapuikia/streamalert | b1f733259aa051f8d533e7881018280fe77d7bda | [
"Apache-2.0"
] | null | null | null | tests/unit/stream_alert_cli/terraform/test_athena.py | tuapuikia/streamalert | b1f733259aa051f8d533e7881018280fe77d7bda | [
"Apache-2.0"
] | null | null | null | """
Copyright 2017-present, Airbnb 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, sof... | 42.054348 | 93 | 0.632463 |
38d6376565ce574167c06530f6dab017e70b0358 | 758 | py | Python | solutions/0872.leaf-similar-trees/leaf-similar-trees.py | cocobear/LeetCode-in-Python | b4ecd5cb7122467ee479f38497faaabb17e6025e | [
"MIT"
] | null | null | null | solutions/0872.leaf-similar-trees/leaf-similar-trees.py | cocobear/LeetCode-in-Python | b4ecd5cb7122467ee479f38497faaabb17e6025e | [
"MIT"
] | null | null | null | solutions/0872.leaf-similar-trees/leaf-similar-trees.py | cocobear/LeetCode-in-Python | b4ecd5cb7122467ee479f38497faaabb17e6025e | [
"MIT"
] | null | null | null | #
# @lc app=leetcode id=872 lang=python3
#
# [872] Leaf-Similar Trees
#
# @lc code=start
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def leafSimilar(self, root1: TreeNode, root2: T... | 22.969697 | 68 | 0.505277 |
03868e98e22476eafc16f1ca0d31be3270f8b4bb | 3,811 | py | Python | python/tests/_test_utils.py | Marcuse7/brotli | 225de4c9255ac6801058085a239eda0f1683f497 | [
"MIT"
] | 11,699 | 2015-01-04T09:57:38.000Z | 2022-03-30T21:26:55.000Z | python/tests/_test_utils.py | Marcuse7/brotli | 225de4c9255ac6801058085a239eda0f1683f497 | [
"MIT"
] | 604 | 2015-01-24T10:04:27.000Z | 2022-03-25T08:55:40.000Z | python/tests/_test_utils.py | Marcuse7/brotli | 225de4c9255ac6801058085a239eda0f1683f497 | [
"MIT"
] | 1,362 | 2015-01-24T09:50:39.000Z | 2022-03-31T17:17:00.000Z | from __future__ import print_function
import filecmp
import glob
import itertools
import os
import sys
import sysconfig
import tempfile
import unittest
project_dir = os.path.abspath(os.path.join(__file__, '..', '..', '..'))
test_dir = os.getenv("BROTLI_TESTS_PATH")
BRO_ARGS = [os.getenv("BROTLI_WRAPPER")]
# Fallback... | 32.57265 | 80 | 0.652322 |
f9c41ab97f10c06528b877350db21a7a0c9777f2 | 4,790 | py | Python | toughradius/manage/customer/customer_forms.py | geosson/GSRadius | 5870e3d055e8366f98b8e65220a1520b5da22f6d | [
"Apache-2.0"
] | 1 | 2019-05-12T15:06:58.000Z | 2019-05-12T15:06:58.000Z | toughradius/manage/customer/customer_forms.py | geosson/GSRadius | 5870e3d055e8366f98b8e65220a1520b5da22f6d | [
"Apache-2.0"
] | null | null | null | toughradius/manage/customer/customer_forms.py | geosson/GSRadius | 5870e3d055e8366f98b8e65220a1520b5da22f6d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#coding=utf-8
from toughlib import btforms
from toughlib.btforms import dataform
from toughlib.btforms import rules
from toughlib.btforms.rules import button_style, input_style
boolean = {0: u"否", 1: u"是"}
user_state = {1: u"正常", 2: u"停机", 3: u"销户", 4: u"到期"}
bind_state = {0: u"不绑定", 1: u"绑定"}
_... | 59.135802 | 122 | 0.681002 |
349971441de2b9f406ae152bce1e53847ccbf115 | 3,577 | py | Python | createlib/create_serial.py | DrR0b0tN1ck/Create2_Library | ee19bb3b9d07c97d722c5f2366deae215b7f062c | [
"MIT"
] | null | null | null | createlib/create_serial.py | DrR0b0tN1ck/Create2_Library | ee19bb3b9d07c97d722c5f2366deae215b7f062c | [
"MIT"
] | null | null | null | createlib/create_serial.py | DrR0b0tN1ck/Create2_Library | ee19bb3b9d07c97d722c5f2366deae215b7f062c | [
"MIT"
] | 1 | 2022-03-20T03:45:53.000Z | 2022-03-20T03:45:53.000Z | ##############################################
# The MIT License (MIT)
# Copyright (c) 2021 Nick Stiffler
#############################################
# The following draws from:
# Copyright (c) 2020 iRobot Corporation
# Copyright (c) 2017 Kevin Walchko
##############################################
# The followin... | 29.561983 | 86 | 0.541515 |
129737479217b9801a1ebfc25f52883b7c5a9b9d | 185 | py | Python | python/date-list.py | tbedford/code-snippets | 9afe36c2726829f14fa5ec11acb8214bed704938 | [
"MIT"
] | null | null | null | python/date-list.py | tbedford/code-snippets | 9afe36c2726829f14fa5ec11acb8214bed704938 | [
"MIT"
] | null | null | null | python/date-list.py | tbedford/code-snippets | 9afe36c2726829f14fa5ec11acb8214bed704938 | [
"MIT"
] | 1 | 2018-10-09T02:03:12.000Z | 2018-10-09T02:03:12.000Z | date_list = ['2019-06-11T12:21:42Z', '2017-06-11T12:21:42Z', '2017-06-11T11:21:42Z', '2018-06-11T12:21:42Z', '2003-03-11T12:21:42Z']
date_list.sort()
for d in date_list:
print(d)
| 26.428571 | 132 | 0.664865 |
17e7a22a8ab923da2403eb8c0fb4d8f3ce419ca8 | 7,433 | py | Python | python/ccxt/mixcoins.py | FullStackHan/ccxt | 1efa15e162e23bae91215aa5d1e5199ebb7fe39e | [
"MIT"
] | null | null | null | python/ccxt/mixcoins.py | FullStackHan/ccxt | 1efa15e162e23bae91215aa5d1e5199ebb7fe39e | [
"MIT"
] | null | null | null | python/ccxt/mixcoins.py | FullStackHan/ccxt | 1efa15e162e23bae91215aa5d1e5199ebb7fe39e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.base.exchange import Exchange
import hashlib
from ccxt.base.errors import ExchangeError
class mixcoins (Exchange):
def des... | 39.748663 | 166 | 0.495089 |
c32edb1d98c47c45a6cf6c21c243ca58e9f4ee3e | 3,060 | py | Python | pygears/typing/saturate.py | bogdanvuk/pygears | a0b21d445e1d5c89ad66751447b8253536b835ee | [
"MIT"
] | 120 | 2018-04-23T08:29:04.000Z | 2022-03-30T14:41:52.000Z | pygears/typing/saturate.py | FZP1607152286/pygears | a0b21d445e1d5c89ad66751447b8253536b835ee | [
"MIT"
] | 12 | 2019-07-09T17:12:58.000Z | 2022-03-18T09:05:10.000Z | pygears/typing/saturate.py | FZP1607152286/pygears | a0b21d445e1d5c89ad66751447b8253536b835ee | [
"MIT"
] | 12 | 2019-05-10T19:42:08.000Z | 2022-03-28T18:26:44.000Z | from functools import singledispatch
from pygears.typing import typeof, Int, Fixp, Uint, Ufixp, is_type, Integer, Fixpnumber, Integral, trunc
from pygears.typing.uint import IntegerType, IntegralType
from pygears.typing.fixp import FixpnumberType
from .cast import cast
from . import code
@singledispatch
def type_satu... | 34.382022 | 104 | 0.633333 |
affdf8a5c190da336a49369ba8d25730f317adca | 776 | py | Python | packages/Mock/DeckEditor/Deck2DPreview.py | tommo/gii | 03624a57cf74a07e38bfdc7f53c50bd926b7b5a7 | [
"MIT"
] | 7 | 2016-02-13T18:47:23.000Z | 2020-07-03T13:47:49.000Z | packages/Mock/DeckEditor/Deck2DPreview.py | tommo/gii | 03624a57cf74a07e38bfdc7f53c50bd926b7b5a7 | [
"MIT"
] | 1 | 2018-06-13T04:55:27.000Z | 2021-11-05T05:52:51.000Z | packages/Mock/DeckEditor/Deck2DPreview.py | tommo/gii | 03624a57cf74a07e38bfdc7f53c50bd926b7b5a7 | [
"MIT"
] | 4 | 2016-02-15T13:32:46.000Z | 2019-12-12T17:22:31.000Z | from gii.AssetEditor import AssetPreviewer
from gii.moai.MOAIEditCanvas import MOAIEditCanvas
def _getModulePath( path ):
import os.path
return os.path.dirname( __file__ ) + '/' + path
class Deck2DPreviewer(AssetPreviewer):
def createWidget(self, container):
self.canvas = MOAIEditCanvas( container )
se... | 25.032258 | 63 | 0.719072 |
4d04f08d8f3e2ffcbd73c050a4a115630e6f42e7 | 21,722 | py | Python | monk/tf_keras_1/finetune/level_13_updates_main.py | Sanskar329/monk_v1 | 51a497a925ec1fb2c8fef1d51245ea7040a5a65a | [
"Apache-2.0"
] | 7 | 2020-07-26T08:37:29.000Z | 2020-10-30T10:23:11.000Z | monk/tf_keras_1/finetune/level_13_updates_main.py | mursalfk/monk_v1 | 62f34a52f242772186ffff7e56764e958fbcd920 | [
"Apache-2.0"
] | null | null | null | monk/tf_keras_1/finetune/level_13_updates_main.py | mursalfk/monk_v1 | 62f34a52f242772186ffff7e56764e958fbcd920 | [
"Apache-2.0"
] | null | null | null | from tf_keras_1.finetune.imports import *
from system.imports import *
from tf_keras_1.finetune.level_12_losses_main import prototype_losses
class prototype_updates(prototype_losses):
'''
Main class for all parametric update functions
Args:
verbose (int): Set verbosity levels
... | 45.730526 | 166 | 0.482736 |
9c58e581385db97d64b0e7c30a64be80a5a9a3d3 | 406 | py | Python | services/migrations/0002_service_slug.py | samshultz/techbitsdata | 753309cbfee7bfa9a08804786f29b37f2b058436 | [
"BSD-3-Clause"
] | null | null | null | services/migrations/0002_service_slug.py | samshultz/techbitsdata | 753309cbfee7bfa9a08804786f29b37f2b058436 | [
"BSD-3-Clause"
] | null | null | null | services/migrations/0002_service_slug.py | samshultz/techbitsdata | 753309cbfee7bfa9a08804786f29b37f2b058436 | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 3.2.2 on 2021-05-09 08:11
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('services', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='service',
name='slug',
fie... | 20.3 | 47 | 0.576355 |
3a55c8b29b1f1092f27a8d664f26f254a69a0f06 | 4,449 | py | Python | benchmark/startQiskit_QC2672.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit_QC2672.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit_QC2672.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=4
# total number=40
import cirq
import qiskit
from qiskit import IBMQ
from qiskit.providers.ibmq import least_busy
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import FakeVigo
from ma... | 35.879032 | 165 | 0.658125 |
6129f0dd2594d05874fc9f7e0c651d878f487bd6 | 14,494 | py | Python | biosteam/plots/sankey.py | sarangbhagwat/biosteam | fc2d227d3fce9d5f4ccb873a6d41edb535347412 | [
"MIT"
] | null | null | null | biosteam/plots/sankey.py | sarangbhagwat/biosteam | fc2d227d3fce9d5f4ccb873a6d41edb535347412 | [
"MIT"
] | null | null | null | biosteam/plots/sankey.py | sarangbhagwat/biosteam | fc2d227d3fce9d5f4ccb873a6d41edb535347412 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# BioSTEAM: The Biorefinery Simulation and Techno-Economic Analysis Modules
# Copyright (C) 2020, Yoel Cortes-Pena <yoelcortes@gmail.com>
#
# This module is under the UIUC open-source license. See
# github.com/BioSTEAMDevelopmentGroup/biosteam/blob/master/LICENSE.txt
# for license details.
"""... | 37.646753 | 111 | 0.623085 |
97c9570a7f187ddb74036b8db676cf142735def7 | 3,641 | py | Python | examples/interactive.py | cwerner/stantic | 8a2da2045b34577695bd2594d0e167bb09a51a61 | [
"MIT"
] | null | null | null | examples/interactive.py | cwerner/stantic | 8a2da2045b34577695bd2594d0e167bb09a51a61 | [
"MIT"
] | 2 | 2022-02-22T09:30:20.000Z | 2022-03-25T11:13:45.000Z | examples/interactive.py | cwerner/stantic | 8a2da2045b34577695bd2594d0e167bb09a51a61 | [
"MIT"
] | null | null | null | import datetime
import os
import pandas as pd
from dotenv import load_dotenv
from pydantic import EmailStr
from stantic import Server
from stantic.models import *
from stantic.tools import pretty_print
load_dotenv()
FROST_URL = os.environ.get("FROST_URL", "http://localhost:8093")
# some people
p1 = Person(
na... | 23.953947 | 95 | 0.601483 |
677b1345239d04fdaecfb51d84c7005bd0a552fe | 426 | py | Python | byusingsuper()fnc.py | naveenroyy/Python | d75e007b86b33798e9aceea9ff988f90279e62d9 | [
"MIT"
] | 1 | 2019-08-04T17:38:13.000Z | 2019-08-04T17:38:13.000Z | byusingsuper()fnc.py | naveenroyy/Python | d75e007b86b33798e9aceea9ff988f90279e62d9 | [
"MIT"
] | null | null | null | byusingsuper()fnc.py | naveenroyy/Python | d75e007b86b33798e9aceea9ff988f90279e62d9 | [
"MIT"
] | 1 | 2019-08-04T17:38:15.000Z | 2019-08-04T17:38:15.000Z | class parent:
def __init__(self,name):
print("this first init",name)
class parent2:
def __init__(self,name1):
print("this first init",name1)
class child(parent,parent2):
def __init__(self):
print("this my second init")
super().__init__('naveen')
super().__in... | 35.5 | 105 | 0.629108 |
4d913c2f12fc26daaf0c47f7727b832b7686bd68 | 1,583 | py | Python | testingUtils/pssh.py | njohnsoncpe/neurosurgeon | 94805ea40016ebeae43a841b63c987069c33f89f | [
"MIT"
] | 4 | 2018-12-06T08:15:34.000Z | 2021-02-10T17:52:53.000Z | testingUtils/pssh.py | njcpe/neurosurgeon | 94805ea40016ebeae43a841b63c987069c33f89f | [
"MIT"
] | null | null | null | testingUtils/pssh.py | njcpe/neurosurgeon | 94805ea40016ebeae43a841b63c987069c33f89f | [
"MIT"
] | 3 | 2021-11-04T01:32:30.000Z | 2021-12-15T10:49:33.000Z | import paramiko
class ssh:
shell = None
client = None
transport = None
def __init__(self, address, port, username, password):
print("Connecting to server on ip", str(address) + ".")
self.client = paramiko.client.SSHClient()
self.client.set_missing_host_key_policy(paramiko.Auto... | 33.680851 | 105 | 0.572331 |
9109af01b75d406c726ca60fbd26a94a9e80f374 | 21,257 | py | Python | tests/tests_complexity.py | LRydin/NeuroKit | 3e2ee72900c3fc85a0b338ad9a3adea0f4f4c169 | [
"MIT"
] | 1 | 2021-06-10T03:27:15.000Z | 2021-06-10T03:27:15.000Z | tests/tests_complexity.py | yywangvr/NeuroKit | 883bbb3461d1e40dc5f16a1f6eb2a7babb9f0758 | [
"MIT"
] | null | null | null | tests/tests_complexity.py | yywangvr/NeuroKit | 883bbb3461d1e40dc5f16a1f6eb2a7babb9f0758 | [
"MIT"
] | null | null | null | import nolds
import numpy as np
import pandas as pd
from pyentrp import entropy as pyentrp
import neurokit2 as nk
"""
For the testing of complexity, we test our implementations against existing and established ones.
However, some of these other implementations are not really packaged in a way
SO THAT we can easily im... | 35.135537 | 188 | 0.562638 |
1975ff4d9b2a8945cd1f4705a7b0d45249da60ef | 35,161 | py | Python | metadata-ingestion/src/datahub/ingestion/source/looker.py | LucaBassanesecuebiq/datahub | f659cc89388cc6322795c7ba7758d65775a7dedf | [
"Apache-2.0"
] | null | null | null | metadata-ingestion/src/datahub/ingestion/source/looker.py | LucaBassanesecuebiq/datahub | f659cc89388cc6322795c7ba7758d65775a7dedf | [
"Apache-2.0"
] | 1 | 2022-02-02T17:26:16.000Z | 2022-02-02T17:26:16.000Z | metadata-ingestion/src/datahub/ingestion/source/looker.py | liftoffio/datahub | ff163059587a137a22fa0c655f568a40eda44236 | [
"Apache-2.0"
] | 1 | 2022-01-27T04:44:22.000Z | 2022-01-27T04:44:22.000Z | import concurrent.futures
import datetime
import json
import logging
import os
import re
from dataclasses import dataclass
from dataclasses import field as dataclass_field
from typing import (
Any,
Dict,
Iterable,
List,
MutableMapping,
Optional,
Sequence,
Set,
Tuple,
Union,
)
im... | 39.286034 | 171 | 0.618156 |
66191a4a2e95ea64a6d86217d95f1c90bc322cc2 | 1,030 | py | Python | validating_fmri/preparation/extract_ts.py | jokedurnez/RandomNotes | 12b5c95a2f038e80159dd97e84e863e6a5b11541 | [
"MIT"
] | null | null | null | validating_fmri/preparation/extract_ts.py | jokedurnez/RandomNotes | 12b5c95a2f038e80159dd97e84e863e6a5b11541 | [
"MIT"
] | null | null | null | validating_fmri/preparation/extract_ts.py | jokedurnez/RandomNotes | 12b5c95a2f038e80159dd97e84e863e6a5b11541 | [
"MIT"
] | null | null | null | from nilearn.input_data import NiftiMapsMasker
from nilearn import datasets
import pandas as pd
import os
prepdir = "/oak/stanford/groups/russpold/data/ds000030/1.0.3/derivatives/fmriprep_0.4.4"
subs = [x for x in os.listdir(prepdir) if x.startswith('sub-') and not x.endswith(".html")]
atlas = datasets.fetch_atlas_ms... | 36.785714 | 112 | 0.730097 |
1426c756432fd61e9a8331f8f542da1015650d8f | 12,860 | py | Python | slr_parser/slr_parser.py | atmay/slr-parser | 842908154fda7a0b605abce937e8e84118ddff0d | [
"MIT"
] | 21 | 2020-09-28T21:11:06.000Z | 2022-03-13T01:50:03.000Z | slr_parser/slr_parser.py | atmay/slr-parser | 842908154fda7a0b605abce937e8e84118ddff0d | [
"MIT"
] | null | null | null | slr_parser/slr_parser.py | atmay/slr-parser | 842908154fda7a0b605abce937e8e84118ddff0d | [
"MIT"
] | 15 | 2020-08-03T05:08:14.000Z | 2022-01-09T08:08:06.000Z | #!/usr/bin/env python3
from graphviz import Digraph
from slr_parser.grammar import Grammar
import argparse
def first_follow(G):
def union(set_1, set_2):
set_1_len = len(set_1)
set_1 |= set_2
return set_1_len != len(set_1)
first = {symbol: set() for symbol in G.symbols}
first.upd... | 36.123596 | 116 | 0.48196 |
e571521ccde7fbfec2729412c87b534a41749828 | 956 | py | Python | busbot_data_manager/data_manager/reader.py | David-Lor/Telegram-BusBot-DataManager | 2d1230024c0dc8844edd4cc79fd006702da97185 | [
"Apache-2.0"
] | 1 | 2022-01-12T20:18:06.000Z | 2022-01-12T20:18:06.000Z | busbot_data_manager/data_manager/reader.py | David-Lor/Telegram-BusBot-DataManager | 2d1230024c0dc8844edd4cc79fd006702da97185 | [
"Apache-2.0"
] | null | null | null | busbot_data_manager/data_manager/reader.py | David-Lor/Telegram-BusBot-DataManager | 2d1230024c0dc8844edd4cc79fd006702da97185 | [
"Apache-2.0"
] | null | null | null | """READER
Read data from MongoDB
"""
# # Native # #
import asyncio
# # Project # #
from busbot_data_manager.data_manager.mongo_client import get_collection
from busbot_data_manager.entities import *
__all__ = ("get_user_stops", "is_stop_saved")
async def get_user_stops(user_id) -> SavedStopList:
"""Get all the... | 29.875 | 98 | 0.709205 |
1b1b849c37abd7f83c1dd78b7ff9ec50fa4ca0eb | 3,195 | py | Python | Python/django-project/mysite/mysite/settings.py | InnoFang/misc-code | 561d0c5b02f81ad4978a97f7897b6c4c7b3b56ce | [
"MIT"
] | 4 | 2018-01-02T07:06:49.000Z | 2018-11-22T13:45:39.000Z | Python/django-project/mysite/mysite/settings.py | InnoFang/playground | 2998c024a5834be3712734f43fe945f83c64f989 | [
"Apache-2.0"
] | 1 | 2020-02-20T10:08:58.000Z | 2020-02-20T10:08:58.000Z | Python/django-project/mysite/mysite/settings.py | InnoFang/playground | 2998c024a5834be3712734f43fe945f83c64f989 | [
"Apache-2.0"
] | null | null | null | """
Django settings for mysite project.
Generated by 'django-admin startproject' using Django 2.1.1.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import os
# ... | 25.357143 | 91 | 0.683568 |
1a69cbf02a42859dc51ea942424a33f7615a4ffc | 857 | py | Python | src/python/pants/backend/codegen/ragel/java/register.py | tdyas/pants | c60024498ed4615d01d78b19ee1ffab7656d34ff | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/codegen/ragel/java/register.py | tdyas/pants | c60024498ed4615d01d78b19ee1ffab7656d34ff | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/codegen/ragel/java/register.py | tdyas/pants | c60024498ed4615d01d78b19ee1ffab7656d34ff | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
"""Generate Java targets from Ragel finite state machines.
See http://www.colm.net/open-source/ragel/.
"""
from pants.backend.codegen.ragel.java.java_ragel_library import (
JavaRagel... | 30.607143 | 79 | 0.796966 |
5638ae1590b3ea8e13908b8feba2038854d5b440 | 10,122 | py | Python | icxcli/icx/wallet/__init__.py | boyeon555/icon_cli_tool | fea8af26fcc1cc4034426600908530e7d46c9f46 | [
"Apache-2.0"
] | null | null | null | icxcli/icx/wallet/__init__.py | boyeon555/icon_cli_tool | fea8af26fcc1cc4034426600908530e7d46c9f46 | [
"Apache-2.0"
] | null | null | null | icxcli/icx/wallet/__init__.py | boyeon555/icon_cli_tool | fea8af26fcc1cc4034426600908530e7d46c9f46 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2018 theloop 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 requ... | 33.74 | 112 | 0.714483 |
1cfcff6787cf2e99bd16b2aec0caca85ff65ba36 | 5,236 | py | Python | gwosc/urls.py | martinberoiz/gwosc | 6ae371c6bf2d12cdefe1560631c671ae2b9985bc | [
"MIT"
] | 16 | 2018-07-08T09:41:43.000Z | 2021-09-09T18:32:00.000Z | gwosc/urls.py | martinberoiz/gwosc | 6ae371c6bf2d12cdefe1560631c671ae2b9985bc | [
"MIT"
] | 55 | 2018-07-06T09:06:49.000Z | 2022-01-03T22:32:53.000Z | gwosc/urls.py | duncanmmacleod/gwopensci | 3410d6f55702e816e048c2052b7eda769a6e1804 | [
"MIT"
] | 11 | 2018-07-06T08:17:12.000Z | 2022-01-03T22:00:21.000Z | # -*- coding: utf-8 -*-
# Copyright (C) Cardiff University (2018-2021)
# SPDX-License-Identifier: MIT
"""Utilities for URL handling
"""
import re
from os.path import (basename, splitext)
from .utils import segments_overlap
# GWOSC filename re
URL_REGEX = re.compile(
r"\A((.*/)*(?P<obs>[^/]+)-"
r"(?P<ifo>[A-... | 25.052632 | 79 | 0.539534 |
1ba1d44a2ec7c36322f8a2007f13af7fb66c19c9 | 627 | py | Python | bell_gui/setup.py | FabianBell/Packages | bded479d22bb7cf3243d99b0df1401714b9507f6 | [
"MIT"
] | null | null | null | bell_gui/setup.py | FabianBell/Packages | bded479d22bb7cf3243d99b0df1401714b9507f6 | [
"MIT"
] | null | null | null | bell_gui/setup.py | FabianBell/Packages | bded479d22bb7cf3243d99b0df1401714b9507f6 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(name='bell_gui',
version='0.0.1',
description='Simple gui collection',
long_description=long_description,
long_description_content_type="text/markdown",
author='Fabian Bell',
... | 27.26087 | 50 | 0.663477 |
84b8c75fcb0bef43075078deef2ed6948bf2e4bf | 1,854 | py | Python | scripts/build_pyodide.py | hyperfraise/LaBot | 1150067a28aa0f2d4465270b1f84248facc09e91 | [
"MIT"
] | 47 | 2018-04-10T12:03:48.000Z | 2022-02-09T14:55:08.000Z | scripts/build_pyodide.py | hyperfraise/LaBot | 1150067a28aa0f2d4465270b1f84248facc09e91 | [
"MIT"
] | 23 | 2018-05-12T21:55:26.000Z | 2021-12-30T09:03:48.000Z | scripts/build_pyodide.py | hyperfraise/LaBot | 1150067a28aa0f2d4465270b1f84248facc09e91 | [
"MIT"
] | 31 | 2018-05-01T18:33:42.000Z | 2022-02-04T03:55:34.000Z | #!/usr/bin/env python3
from pathlib import Path
import pickle
import json
root_path = Path(__file__).absolute().parents[1]
labot_path = root_path / "labot"
docs_path = root_path / "docs"
out_path = docs_path / "main.py"
with (labot_path / "protocol.pk").open("rb") as f:
types = pickle.load(f)
msg_from_id =... | 24.394737 | 82 | 0.631068 |
dd7f8e8e83e6f88386e5513120c47c7957dba0ef | 748 | py | Python | bili_reminder/main.py | HoBeedzc/BiliReminder | bf9f2bde7e41cb3c0816b39159d5a916b01609fa | [
"MIT"
] | 2 | 2021-02-22T15:01:36.000Z | 2021-12-17T03:15:02.000Z | bili_reminder/main.py | HoBeedzc/BiliReminder | bf9f2bde7e41cb3c0816b39159d5a916b01609fa | [
"MIT"
] | null | null | null | bili_reminder/main.py | HoBeedzc/BiliReminder | bf9f2bde7e41cb3c0816b39159d5a916b01609fa | [
"MIT"
] | null | null | null | import time
from .user.loaduser import parse_response_to_audience
from .config import BILIBILI_UID, SLEEP_TIME
from .reminder.mail import BiliNoticeMail
class BiliReminder:
def __init__(self):
pass
def create_origin_user(self):
self.ouser = parse_response_to_audience(BILIBILI_UID)
def ge... | 26.714286 | 61 | 0.715241 |
ea28828a71a09eb907d9509ac0beee4d0baf6cc0 | 840 | py | Python | lfs/supplier/migrations/0001_initial.py | michael-hahn/django-lfs | 26c3471a8f8d88269c84f714f507b952dfdb6397 | [
"BSD-3-Clause"
] | 345 | 2015-01-03T19:19:27.000Z | 2022-03-20T11:00:50.000Z | lfs/supplier/migrations/0001_initial.py | michael-hahn/django-lfs | 26c3471a8f8d88269c84f714f507b952dfdb6397 | [
"BSD-3-Clause"
] | 73 | 2015-01-06T14:54:02.000Z | 2022-03-11T23:11:34.000Z | lfs/supplier/migrations/0001_initial.py | michael-hahn/django-lfs | 26c3471a8f8d88269c84f714f507b952dfdb6397 | [
"BSD-3-Clause"
] | 148 | 2015-01-07T16:30:08.000Z | 2022-03-25T21:20:58.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.Create... | 32.307692 | 114 | 0.621429 |
91c389f8e5ce6796799c6ef587a923ea3d4cb445 | 652 | py | Python | build/lib/interactive/templatetags/subview.py | icanberk/django-interactive | 7dd51660daf57adc3c02f84a71c4c78aba293205 | [
"MIT"
] | 1 | 2015-02-13T09:51:01.000Z | 2015-02-13T09:51:01.000Z | interactive/templatetags/subview.py | icanberk/django-interactive | 7dd51660daf57adc3c02f84a71c4c78aba293205 | [
"MIT"
] | null | null | null | interactive/templatetags/subview.py | icanberk/django-interactive | 7dd51660daf57adc3c02f84a71c4c78aba293205 | [
"MIT"
] | null | null | null | from django import template
from interactive.base import subviews
register = template.Library()
def tuple_without(original_tuple, ind_remove):
new_tuple = []
for i, s in enumerate(list(original_tuple)):
if not i == ind_remove:
new_tuple.append(s)
return tuple(new_tuple)
@register.si... | 22.482759 | 52 | 0.722393 |
65d4fedfd382e9530b6f53f46b91602ecfce1c91 | 15,965 | py | Python | holidays/countries/singapore.py | trauty-is-me/python-holidays | 9fc73e8cdd75814abe45c2e3568e95bcb4d679e3 | [
"MIT"
] | null | null | null | holidays/countries/singapore.py | trauty-is-me/python-holidays | 9fc73e8cdd75814abe45c2e3568e95bcb4d679e3 | [
"MIT"
] | 2 | 2021-06-18T11:50:15.000Z | 2021-07-13T14:29:46.000Z | holidays/countries/singapore.py | trauty-is-me/python-holidays | 9fc73e8cdd75814abe45c2e3568e95bcb4d679e3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# python-holidays
# ---------------
# A fast, efficient Python library for generating country, province and state
# specific sets of holidays on the fly. It aims to make determining whether a
# specific date is a holiday as fast and flexible as possible.
#
# Author: ryanss <ryanssdev@icl... | 28.306738 | 98 | 0.503226 |
4571265334f064046feb4d6f8e1042727155a50c | 590 | py | Python | common.py | HaJaeKwon/yield-curve-generator | 3a076d245a154fdcba58ce1c8c9fdffde79bfd46 | [
"MIT"
] | null | null | null | common.py | HaJaeKwon/yield-curve-generator | 3a076d245a154fdcba58ce1c8c9fdffde79bfd46 | [
"MIT"
] | 4 | 2019-09-16T14:06:30.000Z | 2019-09-22T08:23:46.000Z | common.py | JaekwonHa/yield-curve-generator | 3a076d245a154fdcba58ce1c8c9fdffde79bfd46 | [
"MIT"
] | null | null | null | YIELD_STEPS = ['3개월', '6개월', '1년', '2년', '3년', '5년', '10년']
YIELD_GAP_INFO = ['Yield Gap (10 yr - 3mo)', 'GDP wighted Yield Gap']
GDP = ['GDP', 'GDP Ratio']
COUNTRIES = [
"캐나다",
"미국",
"오스트리아",
"벨기에",
"덴마크",
"핀란드",
"독일",
"아일랜드",
"이스라엘",
"이태리",
"네덜란드",
"노르웨이",
"포르투갈",
... | 15.128205 | 69 | 0.425424 |
e18072e03179f65b9d67df6b289c49e8e3ea6ec1 | 2,012 | py | Python | test/test_ezsigntemplateformfieldgroup_create_object_v1_response.py | ezmaxinc/eZmax-SDK-python | 6794b8001abfb7d9ae18a3b87aba164839b925a0 | [
"MIT"
] | null | null | null | test/test_ezsigntemplateformfieldgroup_create_object_v1_response.py | ezmaxinc/eZmax-SDK-python | 6794b8001abfb7d9ae18a3b87aba164839b925a0 | [
"MIT"
] | null | null | null | test/test_ezsigntemplateformfieldgroup_create_object_v1_response.py | ezmaxinc/eZmax-SDK-python | 6794b8001abfb7d9ae18a3b87aba164839b925a0 | [
"MIT"
] | null | null | null | """
eZmax API Definition (Full)
This API expose all the functionnalities for the eZmax and eZsign applications. # noqa: E501
The version of the OpenAPI document: 1.1.7
Contact: support-api@ezmax.ca
Generated by: https://openapi-generator.tech
"""
import sys
import unittest
import eZmaxApi
from... | 42.808511 | 150 | 0.835487 |
2bcdb650af7100c593acd0a9ac8e6ba1a610986c | 6,944 | py | Python | datasets/lemon_dataset_alb.py | kkkkkevin/MetaPseudoLabels | cf452e8d72868090bf1f3f1fbf9fc0218941696a | [
"MIT"
] | 1 | 2022-03-09T04:21:16.000Z | 2022-03-09T04:21:16.000Z | datasets/lemon_dataset_alb.py | kkkkkevin/MetaPseudoLabels | cf452e8d72868090bf1f3f1fbf9fc0218941696a | [
"MIT"
] | null | null | null | datasets/lemon_dataset_alb.py | kkkkkevin/MetaPseudoLabels | cf452e8d72868090bf1f3f1fbf9fc0218941696a | [
"MIT"
] | null | null | null | import math
from albumentations.augmentations.transforms import VerticalFlip
import numpy as np
import pandas as pd
import cv2
from sklearn.model_selection import train_test_split
from torch.utils.data import Dataset
# Albumenatations
import albumentations as A
from albumentations.pytorch.transforms import ToTensorV2... | 26.503817 | 78 | 0.538162 |
8fce1ba929d9091b5ad4e9d1af3ccc44e835caf1 | 319 | py | Python | acmilanweb/migrations_/0002_rename_clubs_club.py | olek22/acmilan_project | a8c058dec153b2c7ed158fa80af4b3e5a5f3cae1 | [
"MIT"
] | null | null | null | acmilanweb/migrations_/0002_rename_clubs_club.py | olek22/acmilan_project | a8c058dec153b2c7ed158fa80af4b3e5a5f3cae1 | [
"MIT"
] | null | null | null | acmilanweb/migrations_/0002_rename_clubs_club.py | olek22/acmilan_project | a8c058dec153b2c7ed158fa80af4b3e5a5f3cae1 | [
"MIT"
] | null | null | null | # Generated by Django 4.0.2 on 2022-02-17 17:16
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('acmilanweb', '0001_initial'),
]
operations = [
migrations.RenameModel(
old_name='Clubs',
new_name='Club',
),
]
| 17.722222 | 47 | 0.579937 |
3b22d89c8fb7cf3797c593a5f4576289bea5701d | 14,464 | py | Python | pyNastran/gui/menus/dev/painter.py | jtran10/pyNastran | 4aed8e05b91576c2b50ee835f0497a9aad1d2cb0 | [
"BSD-3-Clause"
] | null | null | null | pyNastran/gui/menus/dev/painter.py | jtran10/pyNastran | 4aed8e05b91576c2b50ee835f0497a9aad1d2cb0 | [
"BSD-3-Clause"
] | null | null | null | pyNastran/gui/menus/dev/painter.py | jtran10/pyNastran | 4aed8e05b91576c2b50ee835f0497a9aad1d2cb0 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import print_function
from pyNastran.gui.menus.manage_actors import SingleChoiceQTableView
from PyQt4 import QtCore, QtGui
from QtGui import QColorDialog
from pyNastran.gui.utils.qt.pydialog import check_float
class EditBoundaryConditions(QtGui.QDialog):
def __init__(self, data, win_parent=None):
... | 35.890819 | 99 | 0.601424 |
5f5ed510fd4300c472244ff293897e711c1a604e | 1,373 | py | Python | kikit/fab_ui.py | vagnum08/KiKit | 2af36984a8a08e0bbc28b290afbe2ef78fcce51e | [
"MIT"
] | null | null | null | kikit/fab_ui.py | vagnum08/KiKit | 2af36984a8a08e0bbc28b290afbe2ef78fcce51e | [
"MIT"
] | null | null | null | kikit/fab_ui.py | vagnum08/KiKit | 2af36984a8a08e0bbc28b290afbe2ef78fcce51e | [
"MIT"
] | null | null | null | import click
@click.command()
@click.argument("board", type=click.Path(dir_okay=False))
@click.argument("outputdir", type=click.Path(file_okay=False))
@click.option("--assembly/--no-assembly", help="Generate files for SMT assembly (schematics is required)")
@click.option("--schematic", type=click.Path(dir_okay=False),... | 45.766667 | 120 | 0.7378 |
05c64f383c2942f6e69efd1137cc595c800a5524 | 1,334 | py | Python | tests/catalyst/runners/test_profiler.py | tadejsv/catalyst | 2553ce8fd7cecc025ad88819aea73faf8abb229b | [
"Apache-2.0"
] | 206 | 2018-10-05T19:16:47.000Z | 2019-01-19T21:10:41.000Z | tests/catalyst/runners/test_profiler.py | tadejsv/catalyst | 2553ce8fd7cecc025ad88819aea73faf8abb229b | [
"Apache-2.0"
] | 20 | 2018-10-07T06:30:49.000Z | 2019-01-17T17:26:15.000Z | tests/catalyst/runners/test_profiler.py | tadejsv/catalyst | 2553ce8fd7cecc025ad88819aea73faf8abb229b | [
"Apache-2.0"
] | 22 | 2018-10-06T12:34:08.000Z | 2019-01-10T16:00:48.000Z | # flake8: noqa
import os
from pytest import mark
import torch
from torch import nn
from torch.utils.data import DataLoader
from catalyst import dl
from catalyst.contrib.datasets import MNIST
from tests import DATA_ROOT
def _is_profile_available():
try:
from torch import profiler # noqa: F401
... | 22.233333 | 83 | 0.618441 |
28c318b1a1d61ebdadfcd33eeb3e4619f358d3a9 | 2,144 | py | Python | sandbox/hdb_config/archive_device_sensors.py | ska-sa/mkat-tango | baa932dc0d62dee54cd8a2cbb186f8910bad5b25 | [
"BSD-3-Clause"
] | null | null | null | sandbox/hdb_config/archive_device_sensors.py | ska-sa/mkat-tango | baa932dc0d62dee54cd8a2cbb186f8910bad5b25 | [
"BSD-3-Clause"
] | 2 | 2021-08-30T11:48:46.000Z | 2021-09-01T12:57:12.000Z | sandbox/hdb_config/archive_device_sensors.py | ska-sa/mkat-tango | baa932dc0d62dee54cd8a2cbb186f8910bad5b25 | [
"BSD-3-Clause"
] | null | null | null | # archive_device_sensors.py
# -*- coding: utf8 -*-
# vim:fileencoding=utf8 ai ts=4 sts=4 et sw=4
# Copyright 2016 National Research Foundation (South African Radio Astronomy Observatory)
# BSD license - see LICENSE for details
from __future__ import absolute_import, division, print_function
from future import standard... | 36.338983 | 89 | 0.697761 |
d166cfb27e1eb812767c91002e95c64269a7b125 | 840 | py | Python | pages/page/HomePage.py | nu1silva/PythonSelenium | 58c3659c707a80e680eea2f4ad0e38326ed07a0b | [
"Apache-2.0"
] | null | null | null | pages/page/HomePage.py | nu1silva/PythonSelenium | 58c3659c707a80e680eea2f4ad0e38326ed07a0b | [
"Apache-2.0"
] | 1 | 2019-01-10T06:16:22.000Z | 2019-01-10T06:16:22.000Z | pages/page/HomePage.py | nu1silva/PythonSelenium | 58c3659c707a80e680eea2f4ad0e38326ed07a0b | [
"Apache-2.0"
] | 2 | 2018-12-20T13:58:46.000Z | 2019-01-09T11:30:29.000Z | from selenium.webdriver.common.by import By
from pages.Locator import ElementLocator
class HomPage(object):
def __init__(self, driver):
self.home_page_title = driver.find_element(By.XPATH, ElementLocator.home_page_title)
self.home_page_txt_search = driver.find_element(By.XPATH, ElementLoc... | 35 | 102 | 0.758333 |
b2a0c53993dade23e2e94492264f11d5518ccfa5 | 679 | py | Python | apps/oauth/admin.py | xuyongkun/izone | f1b3bd0051b1572410513d139723286d897cd648 | [
"MIT"
] | null | null | null | apps/oauth/admin.py | xuyongkun/izone | f1b3bd0051b1572410513d139723286d897cd648 | [
"MIT"
] | null | null | null | apps/oauth/admin.py | xuyongkun/izone | f1b3bd0051b1572410513d139723286d897cd648 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Ouser
@admin.register(Ouser)
class OuserAdmin(admin.ModelAdmin):
list_display = ('username', 'email', 'is_staff', 'tickets', 'is_active', 'date_joined')
fieldsets = (
('基础信息', {'fields': (('username', 'email'), ('link',))}),
('权限信息', {'field... | 39.941176 | 91 | 0.59352 |
dc438577ca28ebc86e77a8a28fa695a09b15ba65 | 7,078 | py | Python | main.py | Je-Ba/Wind-farm-wake-control-using-convolutional-neural-networks | 4b1accaa262961d78bc82fc28ed9273f6f5a5a63 | [
"MIT"
] | 2 | 2021-12-09T11:28:12.000Z | 2021-12-13T22:08:43.000Z | main.py | Je-Ba/Wind-farm-wake-control-using-convolutional-neural-networks | 4b1accaa262961d78bc82fc28ed9273f6f5a5a63 | [
"MIT"
] | null | null | null | main.py | Je-Ba/Wind-farm-wake-control-using-convolutional-neural-networks | 4b1accaa262961d78bc82fc28ed9273f6f5a5a63 | [
"MIT"
] | 1 | 2021-12-15T11:48:24.000Z | 2021-12-15T11:48:24.000Z | import torch
import floris.tools as wfct
import CNNWake # import CNNwake package
''' CNNwake yaw angle optimisation
To perform a yaw angle optimisation using CNNwake 4 steps are needed:
1. Ensure that you have pip installed all required external packages
2. Select to run Neural networks on either CPU or... | 39.988701 | 79 | 0.742441 |
a278ed7be36a5983cf2fccba281a9a0cc667f6f0 | 3,530 | py | Python | problems/234week.py | mengshun/Leetcode | 8bb676f2fff093e1417a4bed13d9ad708149be78 | [
"MIT"
] | null | null | null | problems/234week.py | mengshun/Leetcode | 8bb676f2fff093e1417a4bed13d9ad708149be78 | [
"MIT"
] | null | null | null | problems/234week.py | mengshun/Leetcode | 8bb676f2fff093e1417a4bed13d9ad708149be78 | [
"MIT"
] | null | null | null | """
234 周赛
"""
print("5713. 字符串中不同整数的数目")
def numDifferentIntegers(word):
if not word:
return None
dpset = set()
left = right = 0
n = len(word)
for i in range(n):
cur = word[i]
if cur <= "z" and cur >= "a":
if right - left > 0:
dpset.add(int(word[... | 22.0625 | 97 | 0.516714 |
6e9f100cd0d6d3e7bd77f46b88d69e72fabda948 | 3,533 | py | Python | bin/gftools-update-nameids.py | moontypespace/gftools | 9ff6932eb887e4c1e05dd94107aa0c3438ae26a9 | [
"Apache-2.0"
] | 150 | 2018-07-04T12:53:34.000Z | 2022-03-31T21:16:10.000Z | bin/gftools-update-nameids.py | moontypespace/gftools | 9ff6932eb887e4c1e05dd94107aa0c3438ae26a9 | [
"Apache-2.0"
] | 365 | 2018-06-28T19:35:22.000Z | 2022-03-30T17:07:56.000Z | bin/gftools-update-nameids.py | m4rc1e/tools | e97eb8348f7082d8efe7c147e3e3d754007137bc | [
"Apache-2.0"
] | 53 | 2018-07-20T01:47:44.000Z | 2022-01-31T16:43:25.000Z | #!/usr/bin/env python3
# Copyright 2016 The Font Bakery Authors.
# Copyright 2017 The Google Font Tools 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/l... | 33.647619 | 78 | 0.666572 |
fa75865b7d4d8e5e139579d80424309e6a583010 | 118 | py | Python | tools/props2json/__init__.py | estepanov-lvk/runos | 9b856b8a829539bb667156178d283ffc4ef3cf32 | [
"Apache-2.0"
] | 41 | 2015-02-09T10:04:35.000Z | 2021-11-21T06:34:38.000Z | tools/props2json/__init__.py | estepanov-lvk/runos | 9b856b8a829539bb667156178d283ffc4ef3cf32 | [
"Apache-2.0"
] | 31 | 2015-03-04T14:02:36.000Z | 2020-12-11T09:23:16.000Z | tools/props2json/__init__.py | estepanov-lvk/runos | 9b856b8a829539bb667156178d283ffc4ef3cf32 | [
"Apache-2.0"
] | 42 | 2015-02-13T14:24:00.000Z | 2021-11-09T12:04:38.000Z | '''
Copyright 2019 Applied Research Center for Computer Networks
'''
from .grammar import *
from .to_json import *
| 13.111111 | 60 | 0.737288 |
aa9215c0cf4527bcbc10a1a1f4de2781a518f178 | 262 | py | Python | constants.py | Lemonjing/MachineLearningNote | 8a81cd2e3c01f652cae5db19ef4baff57ef50c10 | [
"Apache-2.0"
] | null | null | null | constants.py | Lemonjing/MachineLearningNote | 8a81cd2e3c01f652cae5db19ef4baff57ef50c10 | [
"Apache-2.0"
] | null | null | null | constants.py | Lemonjing/MachineLearningNote | 8a81cd2e3c01f652cae5db19ef4baff57ef50c10 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
import os
PROJECT_ROOT = os.path.dirname(os.path.realpath(__file__)) # 获取项目根目录
RESOURCES_ROOT = os.path.join(PROJECT_ROOT, "src/main/resources")
RESOURCES_TEST_ROOT = os.path.join(PROJECT_ROOT, "src/test/resources")
| 26.2 | 70 | 0.736641 |
0c2c09967653888c47ebfc1191906d968289a878 | 8,463 | py | Python | botorch-modes/rf/modes-b/pure-gp-ei.py | tu-dortmund-ls12-rt/MODES-public | 65fce061de6713bee6343c6514afa3760fe1c1d4 | [
"MIT"
] | null | null | null | botorch-modes/rf/modes-b/pure-gp-ei.py | tu-dortmund-ls12-rt/MODES-public | 65fce061de6713bee6343c6514afa3760fe1c1d4 | [
"MIT"
] | null | null | null | botorch-modes/rf/modes-b/pure-gp-ei.py | tu-dortmund-ls12-rt/MODES-public | 65fce061de6713bee6343c6514afa3760fe1c1d4 | [
"MIT"
] | 1 | 2022-02-11T12:21:01.000Z | 2022-02-11T12:21:01.000Z | import torch
import os
import csv
import sys
from botorch import fit_gpytorch_model
from botorch.acquisition.monte_carlo import qExpectedImprovement, qNoisyExpectedImprovement
from botorch.acquisition.analytic import ExpectedImprovement, NoisyExpectedImprovement
from botorch.sampling.samplers import SobolQMCNormalSampl... | 33.717131 | 159 | 0.6311 |
91fdda438beb943cb4672e30f96ed10a72a2a5a3 | 11,271 | py | Python | cirq/google/op_serializer_test.py | muneerqu/Cirq | 729d993312467d8ea9127103f9e15ae2391e7d85 | [
"Apache-2.0"
] | 1 | 2019-09-04T16:55:30.000Z | 2019-09-04T16:55:30.000Z | cirq/google/op_serializer_test.py | 1eedaegon/Cirq | de0c5e855069bba71e55b070fc9b06f58c07a861 | [
"Apache-2.0"
] | null | null | null | cirq/google/op_serializer_test.py | 1eedaegon/Cirq | de0c5e855069bba71e55b070fc9b06f58c07a861 | [
"Apache-2.0"
] | 1 | 2018-10-25T19:36:50.000Z | 2018-10-25T19:36:50.000Z | # Copyright 2019 The Cirq Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 33.644776 | 80 | 0.479017 |
4990049d3cadce2306e7b89b355f5c00b3a29807 | 5,669 | py | Python | src/models.py | ilucasgoncalves/AuxFormer | e9a9e0ce3ef649541da4d2a77823ab6797616eb1 | [
"MIT"
] | null | null | null | src/models.py | ilucasgoncalves/AuxFormer | e9a9e0ce3ef649541da4d2a77823ab6797616eb1 | [
"MIT"
] | null | null | null | src/models.py | ilucasgoncalves/AuxFormer | e9a9e0ce3ef649541da4d2a77823ab6797616eb1 | [
"MIT"
] | null | null | null | import torch
from torch import nn
import torch.nn.functional as F
from modules.transformer import TransformerEncoder
class AUXFORMER(nn.Module):
def __init__(self, model_args):
"""
"""
super(AUXFORMER, self).__init__()
# Model Hyperparameters
self.num_heads = mode... | 40.205674 | 212 | 0.615982 |
314f9d2f6fad40a1f8a3e82fbdfe936634e8634b | 2,352 | py | Python | travian4api/travparse/spieler.py | ihoromi4/travian4api | 1fa9023d62d8dfca00f5276eff13868ddc057811 | [
"BSD-3-Clause"
] | 2 | 2022-03-08T20:50:08.000Z | 2022-03-08T20:50:13.000Z | travian4api/travparse/spieler.py | ihoromi4/travian4api | 1fa9023d62d8dfca00f5276eff13868ddc057811 | [
"BSD-3-Clause"
] | null | null | null | travian4api/travparse/spieler.py | ihoromi4/travian4api | 1fa9023d62d8dfca00f5276eff13868ddc057811 | [
"BSD-3-Clause"
] | 2 | 2021-03-10T18:43:53.000Z | 2021-12-18T13:31:22.000Z | import re
import bs4
def parse_rank(soup: bs4.BeautifulSoup) -> int:
table_details = soup.find('table', {'id': 'details'})
tr_rank = table_details.find_all('tr')[0]
rank = int(tr_rank.find('td').text)
return rank
def parse_alliance(soup: bs4.BeautifulSoup) -> int:
table_details = soup.find('tab... | 34.086957 | 83 | 0.62415 |
ae7b492d5d1305c0de54edbd7151204a8fef101c | 9,398 | py | Python | adaptiveleak/energy_systems/conversion.py | tejaskannan/adaptive-sensor-security | 4c6dd1eb55eb30a8330c4bf3537e06c7d7802c0b | [
"Apache-2.0"
] | null | null | null | adaptiveleak/energy_systems/conversion.py | tejaskannan/adaptive-sensor-security | 4c6dd1eb55eb30a8330c4bf3537e06c7d7802c0b | [
"Apache-2.0"
] | null | null | null | adaptiveleak/energy_systems/conversion.py | tejaskannan/adaptive-sensor-security | 4c6dd1eb55eb30a8330c4bf3537e06c7d7802c0b | [
"Apache-2.0"
] | null | null | null | import os.path
import math
import numpy as np
from typing import Tuple
from adaptiveleak.utils.constants import PERIOD, BT_FRAME_SIZE, BIG_NUMBER, LENGTH_SIZE
from adaptiveleak.utils.encryption import AES_BLOCK_SIZE, CHACHA_NONCE_LEN
from adaptiveleak.utils.data_utils import calculate_bytes, truncate_to_block
from ada... | 43.711628 | 168 | 0.613428 |
4e1e3c3ca3d8c3d5fad03f5a1fb1c27556af30e6 | 3,727 | py | Python | experiments/vitchyr/nips2018/old/pusher2d_state/td3.py | Asap7772/rail-rl-franka-eval | 4bf99072376828193d05b53cf83c7e8f4efbd3ba | [
"MIT"
] | null | null | null | experiments/vitchyr/nips2018/old/pusher2d_state/td3.py | Asap7772/rail-rl-franka-eval | 4bf99072376828193d05b53cf83c7e8f4efbd3ba | [
"MIT"
] | null | null | null | experiments/vitchyr/nips2018/old/pusher2d_state/td3.py | Asap7772/rail-rl-franka-eval | 4bf99072376828193d05b53cf83c7e8f4efbd3ba | [
"MIT"
] | null | null | null | from railrl.envs.multitask.multitask_env import MultitaskToFlatEnv
from railrl.envs.multitask.pusher2d import CylinderXYPusher2DEnv
from railrl.envs.mujoco.pusher2d import Pusher2DEnv
from railrl.envs.wrappers import NormalizedBoxEnv
from railrl.exploration_strategies.base import (
PolicyWrappedWithExplorationStrat... | 30.300813 | 76 | 0.64234 |
74864fc865002257252d0eea7a5b0afe38f51056 | 17,277 | py | Python | EstimationPF_20181120.py | sebalander/trabajo-final-IACI-Adan-Mavar | a899b011d033ebc6e79e58c5078b3c7db4a8beb5 | [
"MIT"
] | null | null | null | EstimationPF_20181120.py | sebalander/trabajo-final-IACI-Adan-Mavar | a899b011d033ebc6e79e58c5078b3c7db4a8beb5 | [
"MIT"
] | null | null | null | EstimationPF_20181120.py | sebalander/trabajo-final-IACI-Adan-Mavar | a899b011d033ebc6e79e58c5078b3c7db4a8beb5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
__author__ = "Claudio Adán, Esteban Mavar, Ulises Bussi and Sebastián Arroyo"
__license__ = "MIT"
__email__ = "sebastian.arroyo@unq.edu.ar"
Este código acompaña al Trabajo Final de Ingeniería en Automatización y Control Industrial de *Claudio Adán* y *Esteban Mavar*, ... | 31.073741 | 254 | 0.606413 |
3816eb73bc3cc1c3a1e779d0ffc07a6d93a21f6e | 1,449 | py | Python | encode.py | QuMuLab/drde | 9be4d376a60986ee461b55adc7ca893b5d161f08 | [
"MIT"
] | null | null | null | encode.py | QuMuLab/drde | 9be4d376a60986ee461b55adc7ca893b5d161f08 | [
"MIT"
] | null | null | null | encode.py | QuMuLab/drde | 9be4d376a60986ee461b55adc7ca893b5d161f08 | [
"MIT"
] | null | null | null |
from krrt.sat.CNF import Formula, Not as neg
from krrt.planning.strips.representation import parse_problem
USAGE_STRING = "\n Usage: python encode.py [action|fluent] domain.pddl problem.pddl output.cnf\n"
def encode(mode, dfile, pfile, ofile):
print "Parsing ground pddl..."
# Load and set up the problem
... | 25.875 | 98 | 0.590752 |
0a4c985949ebdfcd631ed40916ca9739cd104d1d | 809 | py | Python | lib/recipetool/shift_oelint_adv/rule_base/rule_vars_native_filename.py | shift-left-test/meta-shift | effce9bea894f990703cc047157e3f30d53d9365 | [
"MIT"
] | 2 | 2022-01-19T02:39:43.000Z | 2022-02-07T01:58:17.000Z | lib/recipetool/shift_oelint_adv/rule_base/rule_vars_native_filename.py | shift-left-test/meta-shift | effce9bea894f990703cc047157e3f30d53d9365 | [
"MIT"
] | null | null | null | lib/recipetool/shift_oelint_adv/rule_base/rule_vars_native_filename.py | shift-left-test/meta-shift | effce9bea894f990703cc047157e3f30d53d9365 | [
"MIT"
] | null | null | null | from shift_oelint_parser.cls_item import Variable
from shift_oelint_adv.cls_rule import Rule
class VarNativeFilename(Rule):
def __init__(self):
super(VarNativeFilename, self).__init__(id='oelint.var.nativefilename',
severity='warning',
message='native-reci... | 38.52381 | 95 | 0.584672 |
6e74156eb0c07eef56270833acea86921fc776ff | 75,032 | py | Python | build_package.py | zkanda/scalyr-agent-2 | 81bde110337b5e7dc5045f26097b721e1ff4ebae | [
"Apache-2.0"
] | null | null | null | build_package.py | zkanda/scalyr-agent-2 | 81bde110337b5e7dc5045f26097b721e1ff4ebae | [
"Apache-2.0"
] | null | null | null | build_package.py | zkanda/scalyr-agent-2 | 81bde110337b5e7dc5045f26097b721e1ff4ebae | [
"Apache-2.0"
] | 1 | 2015-07-29T00:00:10.000Z | 2015-07-29T00:00:10.000Z | #!/usr/bin/env python
#
# Copyright 2014 Scalyr 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 ... | 39.889421 | 143 | 0.64927 |
6d0a001a36956e00f436b15c4076fc3f203189ff | 519 | py | Python | src/events/migrations/0017_proposedtutorialevent_registration_link.py | kaka-lin/pycon.tw | 67809a5e43b03273ac8d8f5a1b6b3d3f73474be7 | [
"MIT"
] | 47 | 2015-12-19T10:23:11.000Z | 2018-06-13T08:07:33.000Z | src/events/migrations/0017_proposedtutorialevent_registration_link.py | kaka-lin/pycon.tw | 67809a5e43b03273ac8d8f5a1b6b3d3f73474be7 | [
"MIT"
] | 473 | 2018-12-01T13:01:48.000Z | 2022-03-30T07:10:42.000Z | src/events/migrations/0017_proposedtutorialevent_registration_link.py | kaka-lin/pycon.tw | 67809a5e43b03273ac8d8f5a1b6b3d3f73474be7 | [
"MIT"
] | 91 | 2018-07-26T02:38:59.000Z | 2022-01-16T02:38:31.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2019-07-15 09:47
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('events', '0016_proposedtutorialevent'),
]
operations = [
migrations.AddFiel... | 24.714286 | 92 | 0.645472 |
3e8a3be907e327d5abf0a02aac5ea9684bfba0ab | 41,458 | py | Python | native/jni/external/selinux/python/sepolicy/sepolicy/manpage.py | Joyoe/Magisk-nosbin_magisk-nohide | 449441921740bf85926c14f41b3532822ca0eb65 | [
"MIT"
] | 2 | 2022-01-16T00:59:54.000Z | 2022-02-09T12:00:48.000Z | native/jni/external/selinux/python/sepolicy/sepolicy/manpage.py | Joyoe/Magisk-nosbin_magisk-nohide | 449441921740bf85926c14f41b3532822ca0eb65 | [
"MIT"
] | null | null | null | native/jni/external/selinux/python/sepolicy/sepolicy/manpage.py | Joyoe/Magisk-nosbin_magisk-nohide | 449441921740bf85926c14f41b3532822ca0eb65 | [
"MIT"
] | 2 | 2022-02-09T12:00:39.000Z | 2022-02-21T18:34:46.000Z | # Copyright (C) 2012-2013 Red Hat
# AUTHOR: Dan Walsh <dwalsh@redhat.com>
# AUTHOR: Miroslav Grepl <mgrepl@redhat.com>
# see file 'COPYING' for use and warranty information
#
# semanage is a tool for managing SELinux configuration files
#
# This program is free software; you can redistribute it and/or
# modify it... | 31.526996 | 361 | 0.613006 |
6ae1474119ef585009b6f76682978681ff5ac739 | 792 | py | Python | oelint_adv/rule_base/rule_vars_nativesdk_filename.py | skycaptain/oelint-adv | ff67d3149cf8b1de2b0b2d158a68f4e2cf5e9e46 | [
"BSD-2-Clause"
] | null | null | null | oelint_adv/rule_base/rule_vars_nativesdk_filename.py | skycaptain/oelint-adv | ff67d3149cf8b1de2b0b2d158a68f4e2cf5e9e46 | [
"BSD-2-Clause"
] | null | null | null | oelint_adv/rule_base/rule_vars_nativesdk_filename.py | skycaptain/oelint-adv | ff67d3149cf8b1de2b0b2d158a68f4e2cf5e9e46 | [
"BSD-2-Clause"
] | null | null | null | from oelint_parser.cls_item import Variable
from oelint_adv.cls_rule import Rule
class VarNativeSDKFilename(Rule):
def __init__(self):
super().__init__(id='oelint.var.nativesdkfilename',
severity='warning',
message='nativesdk-recipe-files should include \'... | 37.714286 | 101 | 0.578283 |
bd880863c18ceb23b1e7a7db0f13a04ef9b281b8 | 240 | py | Python | src/lib_mask.py | sistemasnegros/fortigen | 749d59f30953b1cffd2e7c2df3ab45a22074af5d | [
"MIT"
] | null | null | null | src/lib_mask.py | sistemasnegros/fortigen | 749d59f30953b1cffd2e7c2df3ab45a22074af5d | [
"MIT"
] | null | null | null | src/lib_mask.py | sistemasnegros/fortigen | 749d59f30953b1cffd2e7c2df3ab45a22074af5d | [
"MIT"
] | null | null | null | import socket
import struct
def cidr_to_netmask(cidr):
network, net_bits = cidr.split('/')
host_bits = 32 - int(net_bits)
netmask = socket.inet_ntoa(struct.pack('!I', (1 << 32) - (1 << host_bits)))
return network, netmask
| 24 | 79 | 0.658333 |
e3f4c1dfd5c594e3e413b76631b855fd2547cea8 | 1,565 | py | Python | example/saleBoletoSimple.py | naripok/API-3.0-Python | 3bdd27d321a03f4c761876f7907588a0f4726c70 | [
"MIT"
] | 37 | 2017-01-19T12:25:14.000Z | 2022-02-22T12:43:39.000Z | example/saleBoletoSimple.py | naripok/API-3.0-Python | 3bdd27d321a03f4c761876f7907588a0f4726c70 | [
"MIT"
] | 2 | 2017-03-14T14:45:28.000Z | 2019-11-03T12:32:29.000Z | example/saleBoletoSimple.py | naripok/API-3.0-Python | 3bdd27d321a03f4c761876f7907588a0f4726c70 | [
"MIT"
] | 46 | 2017-02-07T16:35:54.000Z | 2022-02-03T19:06:06.000Z | #-*- coding: utf-8 -*-s
import sys
sys.path.insert(0, "./")
from cieloApi3 import *
import json
# Configure o ambiente
environment = Environment(sandbox=True)
# Configure seu merchant, para gerar acesse: https://cadastrosandbox.cieloecommerce.cielo.com.br/
merchant = Merchant('MerchantId', 'MerchantKey')
# Crie u... | 32.604167 | 97 | 0.697764 |
8214e318b9b193f854560d17fa241b650263691a | 690 | py | Python | sdas/core/LoadSdasData.py | arcozelo/python4isttokoper | c17b0dc8c33ca37aaa3c4095a046aa4f22abae40 | [
"MIT"
] | null | null | null | sdas/core/LoadSdasData.py | arcozelo/python4isttokoper | c17b0dc8c33ca37aaa3c4095a046aa4f22abae40 | [
"MIT"
] | null | null | null | sdas/core/LoadSdasData.py | arcozelo/python4isttokoper | c17b0dc8c33ca37aaa3c4095a046aa4f22abae40 | [
"MIT"
] | null | null | null | from sdas.core.client.SDASClient import SDASClient
from sdas.core.SDAStime import Date, Time, TimeStamp
import numpy as np
def LoadSdasData(client, channelID, shotnr):
dataStruct=client.getData(channelID,'0x0000', shotnr);
dataArray=dataStruct.getData();
len_d=len(dataArray);
tstart = dataStruct.getTSt... | 40.588235 | 71 | 0.723188 |
fdb705e5521da24131e2e8039b2a04e97ba887e6 | 47,284 | py | Python | code/pyorg/scripts/nsome/uni_1st_analysis.py | anmartinezs/pyseg_system | 5bb07c7901062452a34b73f376057cabc15a13c3 | [
"Apache-2.0"
] | 12 | 2020-01-08T01:33:02.000Z | 2022-03-16T00:25:34.000Z | code/pyorg/scripts/nsome/uni_1st_analysis.py | anmartinezs/pyseg_system | 5bb07c7901062452a34b73f376057cabc15a13c3 | [
"Apache-2.0"
] | 8 | 2019-12-19T19:34:56.000Z | 2022-03-10T10:11:28.000Z | code/pyorg/scripts/nsome/uni_1st_analysis.py | anmartinezs/pyseg_system | 5bb07c7901062452a34b73f376057cabc15a13c3 | [
"Apache-2.0"
] | 2 | 2022-03-30T13:12:22.000Z | 2022-03-30T18:12:10.000Z | """
Performs Univariate 1st order analysis to a SetListTomograms object by tomograms
Input: - A STAR file with a set of ListTomoParticles pickles (SetListTomograms object input)
Output: - Plots by tomograms:
+ Plots by list:
* Univariate 1st order analysis against ran... | 48.446721 | 178 | 0.604285 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.