hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | 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 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7961c2e17e73717e5316aa0c8c8f4c4d85592428 | 39,382 | py | Python | src/sage/interfaces/maxima.py | qedhandle/sage | 8453ffb849b047893b6c61dd09176a84c9133342 | [
"BSL-1.0"
] | null | null | null | src/sage/interfaces/maxima.py | qedhandle/sage | 8453ffb849b047893b6c61dd09176a84c9133342 | [
"BSL-1.0"
] | null | null | null | src/sage/interfaces/maxima.py | qedhandle/sage | 8453ffb849b047893b6c61dd09176a84c9133342 | [
"BSL-1.0"
] | null | null | null | r"""
Pexpect interface to Maxima
Maxima is a free GPL'd general purpose computer algebra system
whose development started in 1968 at MIT. It contains symbolic
manipulation algorithms, as well as implementations of special
functions, including elliptic functions and generalized
hypergeometric functions. Moreover, Maxim... | 30.67134 | 335 | 0.543192 |
7961c31935778ef5c89029135cbdd24e9497351d | 423 | py | Python | examples/gcharttestapp/TestGChart00.py | allbuttonspressed/pyjs | c726fdead530eb63ee4763ae15daaa58d84cd58f | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2018-09-19T09:14:16.000Z | 2018-09-19T09:14:16.000Z | examples/gcharttestapp/TestGChart00.py | andreyvit/pyjamas | 1154abe3340a84dba7530b8174aaddecfc1a0944 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | examples/gcharttestapp/TestGChart00.py | andreyvit/pyjamas | 1154abe3340a84dba7530b8174aaddecfc1a0944 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2019-11-18T14:17:59.000Z | 2019-11-18T14:17:59.000Z |
import GChartTestAppUtil
from pyjamas.chart.GChart import GChart
"""* Empty chart without anything on it except a title and footnotes """
class TestGChart00 (GChart):
def __init__(self):
GChart.__init__(self, XChartSize=150, YChartSize=150)
self.setChartTitle(GChartTestAppUtil.getTitle(self))
... | 28.2 | 98 | 0.723404 |
7961c45713cc3fefcd4b4b2c997e650c78b6b6da | 413 | py | Python | solutions/1679_max_number_of_k_sum_pairs.py | YiqunPeng/leetcode_pro | 7e6376984f9baec49a5e827d98330fe3d1b656f0 | [
"MIT"
] | null | null | null | solutions/1679_max_number_of_k_sum_pairs.py | YiqunPeng/leetcode_pro | 7e6376984f9baec49a5e827d98330fe3d1b656f0 | [
"MIT"
] | null | null | null | solutions/1679_max_number_of_k_sum_pairs.py | YiqunPeng/leetcode_pro | 7e6376984f9baec49a5e827d98330fe3d1b656f0 | [
"MIT"
] | null | null | null | class Solution:
def maxOperations(self, nums: List[int], k: int) -> int:
"""Hash table.
Running time: O(n) where n == len(nums).
"""
c = Counter(nums)
res = 0
for key, v in c.items():
if key * 2 == k:
res += v // 2
elif k - key... | 25.8125 | 60 | 0.401937 |
7961c503dd5febb9d29b42c69804a97cc9f6fa57 | 6,899 | py | Python | src/sardana/macroserver/scan/test/test_recorddata.py | tacaswell/sardana | be8d64d34234b35a37b4cd8233e86fcda13f64b8 | [
"CC-BY-3.0"
] | null | null | null | src/sardana/macroserver/scan/test/test_recorddata.py | tacaswell/sardana | be8d64d34234b35a37b4cd8233e86fcda13f64b8 | [
"CC-BY-3.0"
] | null | null | null | src/sardana/macroserver/scan/test/test_recorddata.py | tacaswell/sardana | be8d64d34234b35a37b4cd8233e86fcda13f64b8 | [
"CC-BY-3.0"
] | null | null | null | #!/usr/bin/env python
##############################################################################
##
# This file is part of Sardana
##
# http://www.tango-controls.org/static/sardana/latest/doc/html/index.html
##
# Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain
##
# Sardana is free software: you can redi... | 40.582353 | 79 | 0.569503 |
7961c52206690ac50be57a2bcbcb745b3d89ef89 | 416 | py | Python | virtual/lib/python3.6/site-packages/pylint/test/functional/raising_non_exception_py3.py | drewheathens/The-Moringa-Tribune | 98ee4d63c9df6f1f7497fc6876960a822d914500 | [
"MIT"
] | 463 | 2015-01-15T08:17:42.000Z | 2022-03-28T15:10:20.000Z | virtual/lib/python3.6/site-packages/pylint/test/functional/raising_non_exception_py3.py | drewheathens/The-Moringa-Tribune | 98ee4d63c9df6f1f7497fc6876960a822d914500 | [
"MIT"
] | 52 | 2015-01-06T02:43:59.000Z | 2022-03-14T11:15:21.000Z | virtual/lib/python3.6/site-packages/pylint/test/functional/raising_non_exception_py3.py | drewheathens/The-Moringa-Tribune | 98ee4d63c9df6f1f7497fc6876960a822d914500 | [
"MIT"
] | 249 | 2015-01-07T22:49:49.000Z | 2022-03-18T02:32:06.000Z | """The following code should emit a raising-non-exception.
Previously, it didn't, due to a bug in the check for bad-exception-context,
which prevented further checking on the Raise node.
"""
# pylint: disable=import-error, too-few-public-methods, useless-object-inheritance
from missing_module import missing
class Ex... | 29.714286 | 82 | 0.762019 |
7961c6152cab129aaa23abefd303e079dc34f70d | 22,226 | py | Python | data_steward/cdr_cleaner/cleaning_rules/domain_alignment.py | jp3477/curation | 41f98d57c8273d9963ad6d466a237c99b63c74be | [
"MIT"
] | null | null | null | data_steward/cdr_cleaner/cleaning_rules/domain_alignment.py | jp3477/curation | 41f98d57c8273d9963ad6d466a237c99b63c74be | [
"MIT"
] | null | null | null | data_steward/cdr_cleaner/cleaning_rules/domain_alignment.py | jp3477/curation | 41f98d57c8273d9963ad6d466a237c99b63c74be | [
"MIT"
] | null | null | null | """
COMBINED_SNAPSHOT should be set to create a new snapshot dataset while running this cleaning rule.
"""
# Python imports
import logging
# Project imports
import constants.bq_utils as bq_consts
import constants.cdr_cleaner.clean_cdr as cdr_consts
from cdr_cleaner.cleaning_rules import domain_mapping, field_mapping
i... | 37.79932 | 116 | 0.67358 |
7961c7475437713c44a05f8c0687411e013bd789 | 6,891 | py | Python | examples/synth02_simulfit.py | mdeceglie/pvpro | 5c1f2c9be8e4e7a9399eab991f7e29bb2e240f03 | [
"BSD-3-Clause"
] | null | null | null | examples/synth02_simulfit.py | mdeceglie/pvpro | 5c1f2c9be8e4e7a9399eab991f7e29bb2e240f03 | [
"BSD-3-Clause"
] | null | null | null | examples/synth02_simulfit.py | mdeceglie/pvpro | 5c1f2c9be8e4e7a9399eab991f7e29bb2e240f03 | [
"BSD-3-Clause"
] | null | null | null | """
Example full run of pv-pro analysis using synthetic data.
@author: toddkarin
"""
import numpy as np
import pandas as pd
from pandas.plotting import register_matplotlib_converters
register_matplotlib_converters()
import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
# import seaborn as sns
... | 31.322727 | 81 | 0.561892 |
7961c792cc45e9d88a6126cda2b08417a07168cb | 512 | py | Python | examples/simple_extract_splits_to_pandas.py | aslehigh/piecash | 797aca5abd08b686e5d47f077b00a095fb4804ed | [
"MIT"
] | 223 | 2015-01-12T22:02:53.000Z | 2022-03-03T22:05:42.000Z | examples/simple_extract_splits_to_pandas.py | aslehigh/piecash | 797aca5abd08b686e5d47f077b00a095fb4804ed | [
"MIT"
] | 158 | 2015-03-16T19:57:29.000Z | 2022-01-31T23:22:57.000Z | examples/simple_extract_splits_to_pandas.py | aslehigh/piecash | 797aca5abd08b686e5d47f077b00a095fb4804ed | [
"MIT"
] | 84 | 2015-02-06T14:17:17.000Z | 2022-03-14T02:13:50.000Z | from piecash import open_book
# open a book
with open_book("../gnucash_books/simple_sample.gnucash", open_if_lock=True) as mybook:
# print all splits in account "Asset"
asset = mybook.accounts(fullname="Asset")
for split in asset.splits:
print(split)
# extract all split information to a pandas... | 34.133333 | 88 | 0.703125 |
7961c875b260b85a7d9716c040b417f7021ee636 | 6,393 | py | Python | IOMC/Input/test/testWriter_cfg.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | IOMC/Input/test/testWriter_cfg.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | IOMC/Input/test/testWriter_cfg.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
process = cms.Process("TEST")
process.load("FWCore.Framework.test.cmsExceptionsFatal_cff")
process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
#process.load("SimGeneral.HepPDTESSource.pdt_cfi")
process.RandomNumberGeneratorService = cms.Service("RandomNumberGeneratorServic... | 51.556452 | 274 | 0.571719 |
7961cd23cb81149f979279699b89941e403c2d2f | 348 | py | Python | yozuch/loaders/document.py | akrylysov/yozuch | 0eb6206c8c2fff806a8901456cfc4cc338052a95 | [
"BSD-3-Clause"
] | 32 | 2015-02-01T16:35:21.000Z | 2022-03-14T00:50:32.000Z | yozuch/loaders/document.py | akrylysov/yozuch | 0eb6206c8c2fff806a8901456cfc4cc338052a95 | [
"BSD-3-Clause"
] | 6 | 2015-06-19T10:58:35.000Z | 2019-04-07T16:38:01.000Z | yozuch/loaders/document.py | akrylysov/yozuch | 0eb6206c8c2fff806a8901456cfc4cc338052a95 | [
"BSD-3-Clause"
] | 1 | 2017-01-21T18:51:11.000Z | 2017-01-21T18:51:11.000Z | from yozuch.loaders import RstDocumentLoader
from yozuch.loaders.rstloader import RstLoader
class DocumentLoader(RstDocumentLoader):
name = 'documents'
def load(self, context, path):
for doc in RstLoader(context.config['RST_OPTIONS']).load_documents(path):
self._set_document_id(self.name,... | 29 | 81 | 0.718391 |
7961ce250263b6548960c3669c48d1600a826cc2 | 24,211 | py | Python | tests/components/homeassistant/triggers/test_time.py | dlangerm/core | 643acbf9484fd05161d7e9f2228c9c92a5ce7d0b | [
"Apache-2.0"
] | 2 | 2020-11-01T08:33:04.000Z | 2021-05-17T21:12:33.000Z | tests/components/homeassistant/triggers/test_time.py | dlangerm/core | 643acbf9484fd05161d7e9f2228c9c92a5ce7d0b | [
"Apache-2.0"
] | 67 | 2020-07-23T07:13:50.000Z | 2022-03-31T06:25:59.000Z | tests/components/homeassistant/triggers/test_time.py | dlangerm/core | 643acbf9484fd05161d7e9f2228c9c92a5ce7d0b | [
"Apache-2.0"
] | 2 | 2020-06-27T09:35:56.000Z | 2021-10-30T20:38:15.000Z | """The tests for the time automation."""
from datetime import timedelta
from unittest.mock import Mock, patch
import pytest
import voluptuous as vol
from homeassistant.components import automation, sensor
from homeassistant.components.homeassistant.triggers import time
from homeassistant.const import ATTR_DEVICE_CLAS... | 31.320828 | 157 | 0.575895 |
7961ce6c1fedd1a9aecce770efffe5839ca7eceb | 16,607 | py | Python | externals/mpir-3.0.0/build.vc/g2y.py | JaminChan/eos_win | c03e57151cfe152d0d3120abb13226f4df74f37e | [
"MIT"
] | 12 | 2021-09-29T14:50:06.000Z | 2022-03-31T15:01:21.000Z | externals/mpir-3.0.0/build.vc/g2y.py | JaminChan/eos_win | c03e57151cfe152d0d3120abb13226f4df74f37e | [
"MIT"
] | 15 | 2021-12-24T22:53:49.000Z | 2021-12-25T10:03:13.000Z | LibSource/mpir/msvc/g2y.py | ekzyis/CrypTool-2 | 1af234b4f74486fbfeb3b3c49228cc36533a8c89 | [
"Apache-2.0"
] | 10 | 2021-10-17T19:46:51.000Z | 2022-03-18T02:57:57.000Z | '''
---------------------------------------------------------------------------
Copyright (c) 1998-2008, Brian Gladman, Worcester, UK. All rights reserved.
LICENSE TERMS
The redistribution and use of this software (with or without changes)
is allowed without the payment of fees or royalties provided that:
1. source... | 28.052365 | 93 | 0.485879 |
7961cedb6df862cb8dc57d88799254f10775e25e | 13,952 | py | Python | networkx/algorithms/lowest_common_ancestors.py | jebogaert/networkx | 8563c3313223a53c548530f39c8cfb6e433539d3 | [
"BSD-3-Clause"
] | 76 | 2020-07-06T14:44:05.000Z | 2022-02-14T15:30:21.000Z | networkx/algorithms/lowest_common_ancestors.py | jebogaert/networkx | 8563c3313223a53c548530f39c8cfb6e433539d3 | [
"BSD-3-Clause"
] | 25 | 2020-11-16T15:36:41.000Z | 2021-06-01T05:15:31.000Z | networkx/algorithms/lowest_common_ancestors.py | jebogaert/networkx | 8563c3313223a53c548530f39c8cfb6e433539d3 | [
"BSD-3-Clause"
] | 11 | 2020-07-12T16:18:07.000Z | 2022-02-05T16:48:35.000Z | """Algorithms for finding the lowest common ancestor of trees and DAGs."""
from collections import defaultdict
from collections.abc import Mapping, Set
from itertools import chain, count
import networkx as nx
from networkx.utils import (
arbitrary_element,
not_implemented_for,
UnionFind,
generate_uniqu... | 38.120219 | 87 | 0.618191 |
7961d0fbc5b73129e3b08b879e20d63ac6df63a3 | 551 | py | Python | TWLight/applications/migrations/0007_application_editor.py | jajodiaraghav/TWLight | 22359ab0b95ee3653e8ffa0eb698acd7bb8ebf70 | [
"MIT"
] | 1 | 2019-10-24T04:49:52.000Z | 2019-10-24T04:49:52.000Z | TWLight/applications/migrations/0007_application_editor.py | jajodiaraghav/TWLight | 22359ab0b95ee3653e8ffa0eb698acd7bb8ebf70 | [
"MIT"
] | 1 | 2019-03-29T15:29:45.000Z | 2019-03-29T15:57:20.000Z | TWLight/applications/migrations/0007_application_editor.py | jajodiaraghav/TWLight | 22359ab0b95ee3653e8ffa0eb698acd7bb8ebf70 | [
"MIT"
] | 1 | 2019-09-26T14:40:27.000Z | 2019-09-26T14:40:27.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('users', '0007_auto_20160511_1454'),
('applications', '0006_application_days_open'),
]
operations = [
migrations.AddF... | 25.045455 | 107 | 0.626134 |
7961d1af5a2c494ba659aefe30c177aba0152b99 | 3,895 | py | Python | ranking/train_LM.py | yzhhome/JDQA | 68e1d0259d316b3577a1f2fafa773b50f1885762 | [
"MIT"
] | 1 | 2021-12-21T10:50:21.000Z | 2021-12-21T10:50:21.000Z | ranking/train_LM.py | kalanile/JDQA | 68e1d0259d316b3577a1f2fafa773b50f1885762 | [
"MIT"
] | null | null | null | ranking/train_LM.py | kalanile/JDQA | 68e1d0259d316b3577a1f2fafa773b50f1885762 | [
"MIT"
] | 1 | 2021-12-21T10:50:20.000Z | 2021-12-21T10:50:20.000Z | '''
@Author: dengzaiyong
@Date: 2021-08-21 15:16:08
@LastEditTime: 2021-08-27 19:37:08
@LastEditors: dengzaiyong
@Desciption: 训练tfidf, word2vec, fasttext语言模型
@FilePath: /JDQA/ranking/train_LM.py
'''
import os
from collections import defaultdict
from gensim import models, corpora
import config
import pandas as pd
impo... | 32.458333 | 95 | 0.537869 |
7961d213ec6117696bd39d167024b3b312ba4aa4 | 10,173 | py | Python | resistics/project.py | resistics/resistics | cba60747803b6c582eaaf1a670a7f455f5724ebd | [
"MIT"
] | 38 | 2019-03-18T09:06:02.000Z | 2022-02-18T15:38:54.000Z | resistics/project.py | resistics/resistics | cba60747803b6c582eaaf1a670a7f455f5724ebd | [
"MIT"
] | 19 | 2019-08-23T03:57:37.000Z | 2022-03-12T01:07:09.000Z | resistics/project.py | resistics/resistics | cba60747803b6c582eaaf1a670a7f455f5724ebd | [
"MIT"
] | 8 | 2019-09-26T00:31:57.000Z | 2021-09-04T09:28:15.000Z | """
Classes and methods to enable a resistics project
A project is an essential element of a resistics environment together with a
configuration.
In particular, this module includes the core Project, Site and Measurement
clasess and some supporting functions.
"""
from typing import Iterator, Optional, List, Dict
from... | 30.641566 | 87 | 0.629411 |
7961d2b1c3129db69d397e4e8f971065c9b51393 | 2,027 | py | Python | telegram_bot/telegram_message_handlers/all_messages_handler.py | GinTR1k/what-am-i-listening-to-telegram | d9987f81d34fe64c0dc03d6449434b63784f6c81 | [
"MIT"
] | null | null | null | telegram_bot/telegram_message_handlers/all_messages_handler.py | GinTR1k/what-am-i-listening-to-telegram | d9987f81d34fe64c0dc03d6449434b63784f6c81 | [
"MIT"
] | null | null | null | telegram_bot/telegram_message_handlers/all_messages_handler.py | GinTR1k/what-am-i-listening-to-telegram | d9987f81d34fe64c0dc03d6449434b63784f6c81 | [
"MIT"
] | null | null | null | from aiogram.types import (
ContentType,
Message,
)
from sqlalchemy import and_
from telegram_bot.models import (
FriendModel,
TemplateModel,
TemplatesList,
UserModel,
)
from telegram_bot.telegram_message_handlers import start_handler
async def all_messages_handler(message: Message):
"""H... | 32.174603 | 119 | 0.72817 |
7961d2e192a36f3963e5ffa2ffa67501bb6a6b04 | 641 | py | Python | runtests.py | willcodefortea/wagtail | 2723b85ed8f356bde89d9541105b8cea4812d6a1 | [
"BSD-3-Clause"
] | null | null | null | runtests.py | willcodefortea/wagtail | 2723b85ed8f356bde89d9541105b8cea4812d6a1 | [
"BSD-3-Clause"
] | null | null | null | runtests.py | willcodefortea/wagtail | 2723b85ed8f356bde89d9541105b8cea4812d6a1 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import sys
import os
import shutil
import warnings
from django.core.management import execute_from_command_line
from wagtail.tests.settings import STATIC_ROOT, MEDIA_ROOT
os.environ['DJANGO_SETTINGS_MODULE'] = 'wagtail.tests.settings'
def runtests():
# Don't ignore DeprecationWarnings
... | 22.103448 | 63 | 0.730109 |
7961d3a18fbac01aff98cf1d5d915b61c2fffdbf | 589 | py | Python | apps/celery.py | rubmu/QuestBot | 34c42a25e8400060a80e1a234ca7bc7a265769ae | [
"MIT"
] | 16 | 2017-12-01T04:45:50.000Z | 2021-08-28T17:25:11.000Z | apps/celery.py | daniilzinevich/QuestBot | 927b9f35aa4a4c88bf3825b965387d358c98f413 | [
"MIT"
] | 2 | 2018-08-18T16:42:49.000Z | 2021-02-25T21:16:06.000Z | apps/celery.py | daniilzinevich/QuestBot | 927b9f35aa4a4c88bf3825b965387d358c98f413 | [
"MIT"
] | 13 | 2018-01-26T14:35:51.000Z | 2020-05-10T20:48:36.000Z | from __future__ import absolute_import
import os
from django.conf import settings
from celery import Celery
# set the default Django settings module for the 'celery' program.
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'apps.config.settings')
app = Celery('quest_bot')
# Using a string here means the worker do... | 24.541667 | 71 | 0.78438 |
7961d461405fd1757c8544b6d8f13cf2e7fc169f | 11,442 | py | Python | trove/tests/api/mgmt/instances.py | sapcc/trove | c03ec0827687fba202f72f4d264ab70158604857 | [
"Apache-2.0"
] | 1 | 2017-11-24T10:28:48.000Z | 2017-11-24T10:28:48.000Z | trove/tests/api/mgmt/instances.py | sapcc/trove | c03ec0827687fba202f72f4d264ab70158604857 | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | trove/tests/api/mgmt/instances.py | sapcc/trove | c03ec0827687fba202f72f4d264ab70158604857 | [
"Apache-2.0"
] | 2 | 2020-03-15T01:24:15.000Z | 2020-07-22T20:34:26.000Z | # Copyright 2011 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 41.607273 | 79 | 0.653207 |
7961d51b7d07f9e212c0ba1beeadc1e5ca9d4db4 | 914 | py | Python | rating/models/result.py | bomzheg/equestrian-rating | d880dcb40500b3b78d4c10f387b15ac4a60428ce | [
"MIT"
] | null | null | null | rating/models/result.py | bomzheg/equestrian-rating | d880dcb40500b3b78d4c10f387b15ac4a60428ce | [
"MIT"
] | null | null | null | rating/models/result.py | bomzheg/equestrian-rating | d880dcb40500b3b78d4c10f387b15ac4a60428ce | [
"MIT"
] | null | null | null | from django.db import models
class Result(models.Model):
"""Данные о конкретном случае выполненного норматива."""
fulfilled_standard = models.ForeignKey(
"Standard",
on_delete=models.PROTECT,
related_name="results",
verbose_name="Норматив",
)
date = models.DateField(ver... | 32.642857 | 79 | 0.657549 |
7961d930dbb76777dd5ee37cbe180fbd1a453313 | 3,866 | py | Python | internal/notes/builtin-SAVE/packages/hwloc/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | 1 | 2019-01-17T20:07:19.000Z | 2019-01-17T20:07:19.000Z | internal/notes/builtin-SAVE/packages/hwloc/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | null | null | null | internal/notes/builtin-SAVE/packages/hwloc/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | 2 | 2019-08-06T18:13:57.000Z | 2021-11-05T18:19:49.000Z | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | 47.146341 | 115 | 0.67434 |
7961da35248ea8fccb2bea230e14635fd13de68b | 1,729 | py | Python | 1041 Robot Bounded In Circle.py | krishna13052001/LeetCode | cd6ec626bea61f0bd9e8493622074f9e69a7a1c3 | [
"MIT"
] | 872 | 2015-06-15T12:02:41.000Z | 2022-03-30T08:44:35.000Z | 1041 Robot Bounded In Circle.py | nadeemshaikh-github/LeetCode | 3fb14aeea62a960442e47dfde9f964c7ffce32be | [
"MIT"
] | 8 | 2015-06-21T15:11:59.000Z | 2022-02-01T11:22:34.000Z | 1041 Robot Bounded In Circle.py | nadeemshaikh-github/LeetCode | 3fb14aeea62a960442e47dfde9f964c7ffce32be | [
"MIT"
] | 328 | 2015-06-28T03:10:35.000Z | 2022-03-29T11:05:28.000Z | #!/usr/bin/python3
"""
On an infinite plane, a robot initially stands at (0, 0) and faces north. The robot can receive one of three instructions:
"G": go straight 1 unit;
"L": turn 90 degrees to the left;
"R": turn 90 degress to the right.
The robot performs the instructions given in order, and repeats them forever.
... | 23.684932 | 123 | 0.547715 |
7961dc1c3f165664236bac96f554f5d501289d59 | 4,259 | py | Python | veros/cli/veros_run.py | nutrik/veros | 21fcd3a2dea8c7d516c7623ed2d85b1254310f64 | [
"MIT"
] | 115 | 2019-11-23T02:31:30.000Z | 2022-03-29T12:58:30.000Z | veros/cli/veros_run.py | nutrik/veros | 21fcd3a2dea8c7d516c7623ed2d85b1254310f64 | [
"MIT"
] | 207 | 2019-11-21T13:21:22.000Z | 2022-03-31T23:36:09.000Z | veros/cli/veros_run.py | nutrik/veros | 21fcd3a2dea8c7d516c7623ed2d85b1254310f64 | [
"MIT"
] | 21 | 2020-01-28T13:13:39.000Z | 2022-02-02T13:46:33.000Z | import functools
import inspect
import os
import sys
import importlib
import click
from veros import runtime_settings, VerosSetup, __version__ as veros_version
from veros.settings import SETTINGS
from veros.backend import BACKENDS
from veros.runtime import LOGLEVELS, DEVICES, FLOAT_TYPES
class VerosSetting(click.Pa... | 28.019737 | 112 | 0.661423 |
7961dd8404ca9253f2b2d9e1d835d713ecf1aff3 | 2,921 | py | Python | tests/test_logger.py | A-Gray-Cat/socless_python | 5b8e4512c1366fbbcef6f2de556bdf89237fe384 | [
"Apache-2.0"
] | 4 | 2019-10-27T13:21:51.000Z | 2021-05-13T15:44:48.000Z | tests/test_logger.py | A-Gray-Cat/socless_python | 5b8e4512c1366fbbcef6f2de556bdf89237fe384 | [
"Apache-2.0"
] | 7 | 2019-10-28T23:20:23.000Z | 2021-08-05T20:44:35.000Z | tests/test_logger.py | A-Gray-Cat/socless_python | 5b8e4512c1366fbbcef6f2de556bdf89237fe384 | [
"Apache-2.0"
] | 11 | 2019-10-02T17:06:55.000Z | 2021-10-11T23:12:55.000Z | # Copyright 2018 Twilio, 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,... | 30.747368 | 74 | 0.718247 |
7961df323787e2338dc1436a73c84adbf8d63dae | 1,319 | py | Python | doctor_tests/installer/common/set_congress.py | opnfv/doctor | 72a1f8c92f1692f1ea8dcb5bc706ec9939c30e0a | [
"Apache-2.0"
] | 3 | 2017-04-05T19:09:36.000Z | 2019-02-28T05:27:21.000Z | doctor_tests/installer/common/set_congress.py | opnfv/doctor | 72a1f8c92f1692f1ea8dcb5bc706ec9939c30e0a | [
"Apache-2.0"
] | 2 | 2017-09-20T07:31:39.000Z | 2018-04-09T09:38:45.000Z | doctor_tests/installer/common/set_congress.py | opnfv/doctor | 72a1f8c92f1692f1ea8dcb5bc706ec9939c30e0a | [
"Apache-2.0"
] | 7 | 2017-05-24T02:21:08.000Z | 2019-12-09T16:54:02.000Z | ##############################################################################
# Copyright (c) 2018 ZTE Corporation and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is avail... | 32.975 | 78 | 0.623958 |
7961e09b108b04c9c7de2d50beab8ac83ee4b661 | 614 | py | Python | resdata/MatInf/matminer/elasticDataAPI/exportToMongoDB202004262308.py | yuwenxianglong/zhxsh.github.io | 427d14b787e55df26e03a069288815b14ab6b534 | [
"MIT"
] | null | null | null | resdata/MatInf/matminer/elasticDataAPI/exportToMongoDB202004262308.py | yuwenxianglong/zhxsh.github.io | 427d14b787e55df26e03a069288815b14ab6b534 | [
"MIT"
] | 1 | 2021-03-30T04:35:57.000Z | 2021-03-30T04:35:57.000Z | resdata/MatInf/matminer/elasticDataAPI/exportToMongoDB202004262308.py | yuwenxianglong/yuwenxianglong.github.io | 196e32d2775ef3a3863603cb5c30023450a1944c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@Project : elasticDataAPI
@Author : Xu-Shan Zhao
@Filename: elasticDataAPI202004262110.py
@IDE : PyCharm
@Time1 : 2020-04-26 21:10:40
@Time2 : 2020/4/26 21:10
@Month1 : 4月
@Month2 : 四月
"""
import pymongo
import pandas as pd
client = pymongo.MongoClient(host='localhost',
... | 24.56 | 61 | 0.653094 |
7961e1bc33eda1b16ba5fb163cfc03c77c52b239 | 1,801 | py | Python | sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/git_hub_access_token_request_py3.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/git_hub_access_token_request_py3.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/git_hub_access_token_request_py3.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 40.022222 | 135 | 0.661855 |
7961e4131353ceb46179c60fd5e7ac01536ef341 | 6,057 | py | Python | tests/components/co2signal/test_config_flow.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 30,023 | 2016-04-13T10:17:53.000Z | 2020-03-02T12:56:31.000Z | tests/components/co2signal/test_config_flow.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 31,101 | 2020-03-02T13:00:16.000Z | 2022-03-31T23:57:36.000Z | tests/components/co2signal/test_config_flow.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 11,956 | 2016-04-13T18:42:31.000Z | 2020-03-02T09:32:12.000Z | """Test the CO2 Signal config flow."""
from unittest.mock import patch
import pytest
from homeassistant import config_entries
from homeassistant.components.co2signal import DOMAIN, config_flow
from homeassistant.core import HomeAssistant
from homeassistant.data_entry_flow import RESULT_TYPE_CREATE_ENTRY, RESULT_TYPE_... | 30.903061 | 84 | 0.622255 |
7961e44a7c52354a542b5a4c4bf6b6de6bd93034 | 3,852 | py | Python | TWLight/urls.py | amire80/TWLight | 063a385ea46c61a4889ba88e3fded4183c3a6bd3 | [
"MIT"
] | null | null | null | TWLight/urls.py | amire80/TWLight | 063a385ea46c61a4889ba88e3fded4183c3a6bd3 | [
"MIT"
] | 56 | 2021-07-03T12:34:47.000Z | 2022-03-29T12:20:08.000Z | TWLight/urls.py | amire80/TWLight | 063a385ea46c61a4889ba88e3fded4183c3a6bd3 | [
"MIT"
] | null | null | null | """
TWLight URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.0/ref/urls/
"""
from django.conf.urls import include, url
from django.contrib import admin
from django.contrib.admindocs import urls as admindocs
from django.contrib.auth ... | 40.547368 | 87 | 0.654465 |
7961e470c16aeb1f31bf03c4981fb2a15e7b1331 | 341 | py | Python | python-template/{{cookiecutter.placeholder_repo_name}}/test_utils/__init__.py | ghassanmas/edx-cookiecutters | b186021f7322d9c493f1875fff797ebae33157b0 | [
"Apache-2.0"
] | 8 | 2020-05-26T13:02:30.000Z | 2021-02-20T16:53:52.000Z | python-template/{{cookiecutter.placeholder_repo_name}}/test_utils/__init__.py | ghassanmas/edx-cookiecutters | b186021f7322d9c493f1875fff797ebae33157b0 | [
"Apache-2.0"
] | 40 | 2020-05-11T16:50:12.000Z | 2021-12-20T02:19:23.000Z | python-template/{{cookiecutter.placeholder_repo_name}}/test_utils/__init__.py | ghassanmas/edx-cookiecutters | b186021f7322d9c493f1875fff797ebae33157b0 | [
"Apache-2.0"
] | 6 | 2020-05-18T17:03:32.000Z | 2021-12-01T10:23:34.000Z | """
Test utilities.
Since pytest discourages putting __init__.py into testdirectory
(i.e. making tests a package) one cannot import from anywhere
under tests folder. However, some utility classes/methods might be useful
in multiple test modules (i.e. factoryboy factories, base test classes).
So this package is the pl... | 31 | 73 | 0.782991 |
7961e4da4fd567aebf508b0f6cf7fdc248dfea19 | 1,429 | py | Python | userbot/modules/__init__.py | Rewtio/Mikoo-Userbot | 418f0017241fa65bdf7f99c84381317cb4dbeb55 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 4 | 2022-03-03T01:31:48.000Z | 2022-03-26T00:15:41.000Z | userbot/modules/__init__.py | Rewtio/Mikoo-Userbot | 418f0017241fa65bdf7f99c84381317cb4dbeb55 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2022-03-16T02:54:27.000Z | 2022-03-17T09:17:12.000Z | userbot/modules/__init__.py | Rewtio/Mikoo-Userbot | 418f0017241fa65bdf7f99c84381317cb4dbeb55 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2022-03-16T02:41:38.000Z | 2022-03-16T02:41:38.000Z | # Copyright (C) 2019 The Raphielscape Company LLC.
#
# Licensed under the Raphielscape Public License, Version 1.d (the "License");
# you may not use this file except in compliance with the License.
#
# Recode by @divarvian
# FROM Mikoo-Userbot <https://github.com/divarvian/Mikoo-Userbot>
# t.me/MikooUserbot & t.me/Mik... | 29.163265 | 78 | 0.63191 |
7961e4daaa45ad16276030c9ff42c9f98efa8581 | 3,879 | py | Python | plaso/storage/fake/writer.py | roshanmaskey/plaso | 637856f578eb4bc81f62b97d7f483f69314e7f47 | [
"Apache-2.0"
] | 1 | 2021-07-23T07:14:30.000Z | 2021-07-23T07:14:30.000Z | plaso/storage/fake/writer.py | roshanmaskey/plaso | 637856f578eb4bc81f62b97d7f483f69314e7f47 | [
"Apache-2.0"
] | null | null | null | plaso/storage/fake/writer.py | roshanmaskey/plaso | 637856f578eb4bc81f62b97d7f483f69314e7f47 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""Fake (in-memory only) storage writer for testing."""
from plaso.lib import definitions
from plaso.storage import writer
from plaso.storage.fake import fake_store
class FakeStorageWriter(writer.StorageWriter):
"""Fake (in-memory only) storage writer object.
Attributes:
task_complet... | 31.536585 | 76 | 0.714359 |
7961e59606f88e850e8e0ec121918e54ef38880a | 1,079 | py | Python | tests/surftrace_test.py | zhongwuq/surftrace | e77f5430d75b6bca1474081566493a891527a65e | [
"MIT"
] | null | null | null | tests/surftrace_test.py | zhongwuq/surftrace | e77f5430d75b6bca1474081566493a891527a65e | [
"MIT"
] | null | null | null | tests/surftrace_test.py | zhongwuq/surftrace | e77f5430d75b6bca1474081566493a891527a65e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
-------------------------------------------------
File Name: surftrace_test.py
Description :
Author : liaozhaoyan
date: 2022/2/27
-------------------------------------------------
Change Activity:
2022/2/27:
-------------------------------... | 23.456522 | 71 | 0.543095 |
7961e74669e5b428c3ff2d3dca9638233b0c3273 | 3,265 | py | Python | A3C/model/model_manager.py | Francesco-Sovrano/Generic-Hierarchical-Deep-Reinforcement-Learning-for-Sentiment-Analysis | f6845b682176b76c97cbfc4e0d2dc8576e9883cb | [
"MIT"
] | 13 | 2018-11-04T16:51:41.000Z | 2022-01-31T17:41:15.000Z | A3C/model/model_manager.py | Francesco-Sovrano/Generic-Hierarchical-Deep-Reinforcement-Learning-for-Sentiment-Analysis | f6845b682176b76c97cbfc4e0d2dc8576e9883cb | [
"MIT"
] | null | null | null | A3C/model/model_manager.py | Francesco-Sovrano/Generic-Hierarchical-Deep-Reinforcement-Learning-for-Sentiment-Analysis | f6845b682176b76c97cbfc4e0d2dc8576e9883cb | [
"MIT"
] | 2 | 2018-12-12T08:45:30.000Z | 2021-06-27T21:47:18.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
from model.a3c_model import A3CModel
import options
flags=options.get()
class ModelManager(object):
def __init__( self, id, environment, learning_rate_input, device... | 35.48913 | 227 | 0.754977 |
7961e857793c75d1152e531a837a811f1847d932 | 5,391 | py | Python | merfishdecoder/apps/run_extract_pixel_traces.py | r3fang/MERlin | 2ee81a4e18c3fe406d91ee6ce65ca38b69ee9d68 | [
"MIT"
] | null | null | null | merfishdecoder/apps/run_extract_pixel_traces.py | r3fang/MERlin | 2ee81a4e18c3fe406d91ee6ce65ca38b69ee9d68 | [
"MIT"
] | null | null | null | merfishdecoder/apps/run_extract_pixel_traces.py | r3fang/MERlin | 2ee81a4e18c3fe406d91ee6ce65ca38b69ee9d68 | [
"MIT"
] | null | null | null | import os
import pickle
import pandas as pd
import numpy as np
from merfishdecoder.core import zplane
from merfishdecoder.util import utilities
from merfishdecoder.util import barcoder
from merfishdecoder.util import decoder
def run_job_old(dataSetName: str = None,
fov: int = None,
zpos: float... | 32.871951 | 82 | 0.625858 |
7961ea3f212a125d3662c018aeae5214c8754bfb | 13,501 | py | Python | ontobio/io/gpadparser.py | valearna/ontobio | 460915df0beb0d4fbcd414cf4157769b08954857 | [
"BSD-3-Clause"
] | 1 | 2019-08-03T23:48:04.000Z | 2019-08-03T23:48:04.000Z | ontobio/io/gpadparser.py | valearna/ontobio | 460915df0beb0d4fbcd414cf4157769b08954857 | [
"BSD-3-Clause"
] | null | null | null | ontobio/io/gpadparser.py | valearna/ontobio | 460915df0beb0d4fbcd414cf4157769b08954857 | [
"BSD-3-Clause"
] | null | null | null | from ontobio.io import assocparser
from ontobio.io import entityparser
from ontobio.io import entitywriter
from ontobio.io.assocparser import ENTITY, EXTENSION, ANNOTATION, Report
from ontobio.io import qc
from ontobio.model import association
from ontobio.rdfgen import relations
from prefixcommons import curie_util
... | 39.020231 | 148 | 0.605214 |
7961eb1815b1c2bb280c13c95124d0bbd0bf87ab | 95 | py | Python | FOR/NUMBER4.py | MakarFadeev/PythonTasks | 2ae18c3c6a50808f985966d3304a6af6824ce686 | [
"Apache-2.0"
] | 2 | 2020-11-13T05:59:45.000Z | 2020-11-29T09:26:20.000Z | FOR/NUMBER4.py | MakarFadeev/PythonTasks | 2ae18c3c6a50808f985966d3304a6af6824ce686 | [
"Apache-2.0"
] | 1 | 2020-10-29T18:14:10.000Z | 2020-10-29T18:14:10.000Z | FOR/NUMBER4.py | MakarFadeev/PythonTasks | 2ae18c3c6a50808f985966d3304a6af6824ce686 | [
"Apache-2.0"
] | null | null | null | timeleft = 10
while(timeleft > -1):
print(timeleft)
timeleft -= 1
print('ПОЛЕТЕЛИ!!!')
| 15.833333 | 21 | 0.621053 |
7961eb19f8b8be8e230e08f3fd948035963a567e | 14,803 | py | Python | torch/onnx/symbolic_opset10.py | sanchitintel/pytorch | 416f59308023b5d98f6ea4ecdd0bcd3829edb7a7 | [
"Intel"
] | 60,067 | 2017-01-18T17:21:31.000Z | 2022-03-31T21:37:45.000Z | torch/onnx/symbolic_opset10.py | sanchitintel/pytorch | 416f59308023b5d98f6ea4ecdd0bcd3829edb7a7 | [
"Intel"
] | 66,955 | 2017-01-18T17:21:38.000Z | 2022-03-31T23:56:11.000Z | torch/onnx/symbolic_opset10.py | sanchitintel/pytorch | 416f59308023b5d98f6ea4ecdd0bcd3829edb7a7 | [
"Intel"
] | 19,210 | 2017-01-18T17:45:04.000Z | 2022-03-31T23:51:56.000Z |
import torch
from torch.nn.modules.utils import _single, _pair, _triple
import torch.onnx
# This import monkey-patches graph manipulation methods on Graph, used for the
# ONNX symbolics
import torch.onnx.utils
import torch.onnx.symbolic_helper as sym_help
from torch.onnx.symbolic_helper import parse_args, _unimplemen... | 46.115265 | 120 | 0.633047 |
7961eceeba046356669267d607b6ce57c9df5317 | 4,075 | py | Python | add-comment.py | GregSharpe1/chuck-norris-action | 35a3c96806e917747d549ea54a242fe68fa370ba | [
"MIT"
] | null | null | null | add-comment.py | GregSharpe1/chuck-norris-action | 35a3c96806e917747d549ea54a242fe68fa370ba | [
"MIT"
] | null | null | null | add-comment.py | GregSharpe1/chuck-norris-action | 35a3c96806e917747d549ea54a242fe68fa370ba | [
"MIT"
] | null | null | null | #!/usr/bin/env python2.7
import requests
import json
import time
import sys
# Used with the ENV vars set within the Github Action.
import os
GITHUB_REPO=os.environ["GITHUB_REPOSITORY"]
GITHUB_TOKEN=os.environ["GITHUB_TOKEN"]
GITHUB_SHA=os.environ["GITHUB_SHA"]
with open(os.environ["GITHUB_EVENT_PATH"]) as json_file:... | 32.862903 | 124 | 0.65816 |
7961ecf7cb4960808e0ea44b83b1938840ae4454 | 6,595 | py | Python | psd_tools/psd/patterns.py | mrstephenneal/psd-tools2 | fde1c9768b8d2a232e5afd5f1b58983ec675b960 | [
"MIT"
] | 1 | 2019-05-31T21:15:59.000Z | 2019-05-31T21:15:59.000Z | psd_tools/psd/patterns.py | mrstephenneal/psd-tools2 | fde1c9768b8d2a232e5afd5f1b58983ec675b960 | [
"MIT"
] | 1 | 2018-10-01T13:30:21.000Z | 2018-10-01T13:30:21.000Z | psd_tools/psd/patterns.py | mrstephenneal/psd-tools2 | fde1c9768b8d2a232e5afd5f1b58983ec675b960 | [
"MIT"
] | null | null | null | """
Patterns structure.
"""
from __future__ import absolute_import, unicode_literals
import io
import logging
import attr
from psd_tools.compression import compress, decompress
from psd_tools.constants import ColorMode, Compression
from psd_tools.psd.base import BaseElement, ListElement
from psd_tools.utils import (... | 32.014563 | 101 | 0.622896 |
7961ef31df00bf8ac12fff0e447b03c9424630a0 | 31,587 | py | Python | openstack/image/v2/_proxy.py | NeCTAR-RC/openstacksdk | 60a24f6c4717a1f9a0e545c9a07e68afaedc5a27 | [
"Apache-2.0"
] | null | null | null | openstack/image/v2/_proxy.py | NeCTAR-RC/openstacksdk | 60a24f6c4717a1f9a0e545c9a07e68afaedc5a27 | [
"Apache-2.0"
] | null | null | null | openstack/image/v2/_proxy.py | NeCTAR-RC/openstacksdk | 60a24f6c4717a1f9a0e545c9a07e68afaedc5a27 | [
"Apache-2.0"
] | 1 | 2020-07-21T02:18:23.000Z | 2020-07-21T02:18:23.000Z | # 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, software
# distributed under t... | 41.561842 | 79 | 0.590876 |
7961f008ca0c715d2f99cb20606ad8cd8f37be06 | 2,185 | py | Python | ambari-common/src/main/python/resource_management/libraries/functions/check_process_status.py | panfeiyy/ambari | 24077510723ede93d3024784f0b04422adaf56d6 | [
"Apache-2.0"
] | 16 | 2018-05-24T10:28:24.000Z | 2021-08-05T03:13:26.000Z | ambari-common/src/main/python/resource_management/libraries/functions/check_process_status.py | panfeiyy/ambari | 24077510723ede93d3024784f0b04422adaf56d6 | [
"Apache-2.0"
] | 3 | 2021-05-09T12:37:16.000Z | 2022-03-02T10:13:24.000Z | ambari-common/src/main/python/resource_management/libraries/functions/check_process_status.py | panfeiyy/ambari | 24077510723ede93d3024784f0b04422adaf56d6 | [
"Apache-2.0"
] | 17 | 2018-07-06T08:57:00.000Z | 2021-11-04T11:00:36.000Z | #!/usr/bin/env python
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License");... | 35.241935 | 103 | 0.752403 |
7961f312d64c5a5498b462245a4509f2a11ce4a6 | 11,979 | py | Python | apps/MixMaster/KineticsFrame.py | VishalKandala/Cantera-1.7 | 750786f9b845a56fc177a9f1d5a9c5bb6ebd87cc | [
"BSD-3-Clause"
] | null | null | null | apps/MixMaster/KineticsFrame.py | VishalKandala/Cantera-1.7 | 750786f9b845a56fc177a9f1d5a9c5bb6ebd87cc | [
"BSD-3-Clause"
] | null | null | null | apps/MixMaster/KineticsFrame.py | VishalKandala/Cantera-1.7 | 750786f9b845a56fc177a9f1d5a9c5bb6ebd87cc | [
"BSD-3-Clause"
] | null | null | null | import os, math
from Tkinter import *
from Cantera import *
from SpeciesInfo import SpeciesInfo
from Cantera import rxnpath
import webbrowser
_CUTOFF = 1.e-15
_ATOL = 1.e-15
_RTOL = 1.e-7
def showsvg():
f = open('_rp_svg.html','w')
f.write('<embed src="rxnpath.svg" name="rxnpath" height=500\n')
f.w... | 28.589499 | 91 | 0.618666 |
7961f5ae651880e41cf3a9be220445441b52798d | 166 | py | Python | AlgoritmosCC/List4Ex3.py | namelew/PythonExercices | e6701dddf163b616987fc9edd8b9ef8e9a207e84 | [
"MIT"
] | null | null | null | AlgoritmosCC/List4Ex3.py | namelew/PythonExercices | e6701dddf163b616987fc9edd8b9ef8e9a207e84 | [
"MIT"
] | 1 | 2020-11-09T17:20:58.000Z | 2020-11-09T17:21:10.000Z | AlgoritmosCC/List4Ex3.py | namelew/PythonExercices | e6701dddf163b616987fc9edd8b9ef8e9a207e84 | [
"MIT"
] | null | null | null | va = 60
vb = 52
h = 1
while True:
df = 45 + (vb * h) - (va * h)
if df <= 0:
break
h += 1
print(f"O veículo A alcançará o veículo B em {h} horas!") | 18.444444 | 57 | 0.493976 |
7961f5d590894da21e6ac56745f609ef61340cb7 | 4,290 | py | Python | lasaft/source_separation/conditioned/cunet/dcun_gpocm.py | alswhdgus10/Conditioned-Source-Separation-LaSAFT | f8d8de82391fa04622bbe93e232bb627a9367feb | [
"MIT"
] | 3 | 2021-01-07T11:53:29.000Z | 2021-04-29T23:43:46.000Z | lasaft/source_separation/conditioned/cunet/dcun_gpocm.py | alswhdgus10/Conditioned-Source-Separation-LaSAFT | f8d8de82391fa04622bbe93e232bb627a9367feb | [
"MIT"
] | null | null | null | lasaft/source_separation/conditioned/cunet/dcun_gpocm.py | alswhdgus10/Conditioned-Source-Separation-LaSAFT | f8d8de82391fa04622bbe93e232bb627a9367feb | [
"MIT"
] | null | null | null | from argparse import ArgumentParser
import torch
from lasaft.source_separation.conditioned.cunet.dcun_base import Dense_CUNet, Dense_CUNet_Framework
from lasaft.source_separation.sub_modules.control_models import pocm_control_model, dense_control_block
from lasaft.utils.PoCM_utils import Pocm_Matmul, Pocm_naive
cla... | 36.982759 | 103 | 0.629138 |
7961f73412b50c61d937022fb5568e1ab93b22e9 | 13,441 | py | Python | jwql/jwql_monitors/monitor_filesystem.py | laurenmarietta/jwql | 0edc027778da4232d8ca82abf3a8bf85fafd7e4e | [
"BSD-3-Clause"
] | null | null | null | jwql/jwql_monitors/monitor_filesystem.py | laurenmarietta/jwql | 0edc027778da4232d8ca82abf3a8bf85fafd7e4e | [
"BSD-3-Clause"
] | null | null | null | jwql/jwql_monitors/monitor_filesystem.py | laurenmarietta/jwql | 0edc027778da4232d8ca82abf3a8bf85fafd7e4e | [
"BSD-3-Clause"
] | null | null | null | #! /usr/bin/env python
"""
This module monitors and gather statistics of the filesystem that hosts
data for the ``jwql`` application. This will answer questions such as
the total number of files, how much disk space is being used, and then
plot these values over time.
Authors
-------
- Misty Cracraft
- Sara ... | 33.518703 | 116 | 0.678223 |
7961f762549cd4c699c4c794ed281897c7169801 | 4,648 | py | Python | src/standardizeNumNs.py | dentearl/assemblAnalysis | c8524456dff720d37356c55d7640687415bc1df6 | [
"MIT"
] | 1 | 2020-11-12T06:32:26.000Z | 2020-11-12T06:32:26.000Z | src/standardizeNumNs.py | dentearl/assemblAnalysis | c8524456dff720d37356c55d7640687415bc1df6 | [
"MIT"
] | null | null | null | src/standardizeNumNs.py | dentearl/assemblAnalysis | c8524456dff720d37356c55d7640687415bc1df6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
standardizeNumNs.py
dent earl, dearl (a) soe ucsc edu
20 March 2011
standardize the number of Ns based on
--expandAt. --expandAt is treated as a
greater than or equal to, up to 25.
For example if --expandAt is
at 3, then
ACGTACGTNNNNNNNNNNACGTACGT
becomes
ACGTACGTNNNNNNNNNNNNNNNNNNNNNNNNNA... | 34.176471 | 107 | 0.636188 |
7961f7a9336ea97854cc944a4496d70bb6eeaa52 | 1,014 | py | Python | src/model.py | neptune-ai/project-time-series-forecasting | 84af0e7e0ab934c0a89e6e793adc94a66ff98eae | [
"MIT"
] | 1 | 2022-01-17T07:43:01.000Z | 2022-01-17T07:43:01.000Z | src/model.py | neptune-ai/project-time-series-forecasting | 84af0e7e0ab934c0a89e6e793adc94a66ff98eae | [
"MIT"
] | null | null | null | src/model.py | neptune-ai/project-time-series-forecasting | 84af0e7e0ab934c0a89e6e793adc94a66ff98eae | [
"MIT"
] | null | null | null | from keras.layers import Dropout
from tensorflow.keras.layers import Dense
from tensorflow.keras.layers import LSTM
from tensorflow.keras.metrics import RootMeanSquaredError, MeanAbsoluteError
from tensorflow.keras.models import Sequential
def get_model(params, input_shape):
model = Sequential()
model.add(LST... | 34.965517 | 100 | 0.725838 |
7961f7af4a451d23939a2cf6cc7ec6704be64ecb | 2,838 | py | Python | StoredLinkItem.py | alan1world/yt-db-link-cleaner | bbfc12ebb178b4a82b14b9625be5afd5b59752a4 | [
"MIT"
] | null | null | null | StoredLinkItem.py | alan1world/yt-db-link-cleaner | bbfc12ebb178b4a82b14b9625be5afd5b59752a4 | [
"MIT"
] | null | null | null | StoredLinkItem.py | alan1world/yt-db-link-cleaner | bbfc12ebb178b4a82b14b9625be5afd5b59752a4 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# -*- code: utf-8 -*-
from datetime import datetime
class StoredLinkItem:
'''Class for storing link data'''
link_id: int
raw_link: str
title: str
link: str
source: str
import_date: str
real_date: datetime
original_title: str
flag_bad_source: bool = False
... | 31.533333 | 88 | 0.586328 |
7961f8535e1558876260ae39f8a35a0a20bcd9f8 | 5,177 | py | Python | tasks/R2R/eval_speaker.py | cacosandon/speaker_follower_with_objects | f3d454fdbd1c8129887cf4ecc4743d231c7b9555 | [
"BSD-2-Clause",
"MIT"
] | null | null | null | tasks/R2R/eval_speaker.py | cacosandon/speaker_follower_with_objects | f3d454fdbd1c8129887cf4ecc4743d231c7b9555 | [
"BSD-2-Clause",
"MIT"
] | null | null | null | tasks/R2R/eval_speaker.py | cacosandon/speaker_follower_with_objects | f3d454fdbd1c8129887cf4ecc4743d231c7b9555 | [
"BSD-2-Clause",
"MIT"
] | null | null | null | ''' Evaluation of agent trajectories '''
import json
import pprint; pp = pprint.PrettyPrinter(indent=4) # NoQA
from utils import load_datasets, Tokenizer
import numpy as np
from bleu import multi_bleu
class SpeakerEvaluation(object):
''' Results submission format:
[{'instr_id': string,
'traje... | 35.703448 | 88 | 0.581997 |
7961f85d34a28f0ca50cdb7ee6a1b38de36a5232 | 452 | py | Python | ingestion/src/metadata/generated/schema/api/tags/createTagCategory.py | dec0deit/OpenMetadata | d393b90bc457aafbe1220a9ecb108b272dfafd0e | [
"Apache-2.0"
] | null | null | null | ingestion/src/metadata/generated/schema/api/tags/createTagCategory.py | dec0deit/OpenMetadata | d393b90bc457aafbe1220a9ecb108b272dfafd0e | [
"Apache-2.0"
] | null | null | null | ingestion/src/metadata/generated/schema/api/tags/createTagCategory.py | dec0deit/OpenMetadata | d393b90bc457aafbe1220a9ecb108b272dfafd0e | [
"Apache-2.0"
] | null | null | null | # generated by datamodel-codegen:
# filename: schema/api/tags/createTagCategory.json
# timestamp: 2021-10-31T08:53:25+00:00
from __future__ import annotations
from pydantic import BaseModel, Field
from ...entity.tags import tagCategory
class CreateTagCategoryEntityRequest(BaseModel):
name: tagCategory.Tag... | 28.25 | 80 | 0.778761 |
7961f92cdb236ab468ae5e64e8f8775edcd6e80b | 20,223 | py | Python | rllib/rollout.py | 77loopin/ray | 9322f6aab53f4ca5baf5a3573e1ffde12feae519 | [
"Apache-2.0"
] | 3 | 2021-07-22T17:03:33.000Z | 2021-09-20T15:46:25.000Z | rllib/rollout.py | 77loopin/ray | 9322f6aab53f4ca5baf5a3573e1ffde12feae519 | [
"Apache-2.0"
] | 64 | 2021-06-05T07:05:15.000Z | 2022-03-26T07:12:01.000Z | rllib/rollout.py | 77loopin/ray | 9322f6aab53f4ca5baf5a3573e1ffde12feae519 | [
"Apache-2.0"
] | 1 | 2022-03-31T20:18:58.000Z | 2022-03-31T20:18:58.000Z | #!/usr/bin/env python
import argparse
import collections
import copy
import gym
from gym import wrappers as gym_wrappers
import json
import os
from pathlib import Path
import shelve
import ray
import ray.cloudpickle as cloudpickle
from ray.rllib.agents.registry import get_trainer_class
from ray.rllib.env import Multi... | 38.228733 | 79 | 0.613163 |
7961f965cdbf838388849a4cd7ac5b0304469124 | 2,077 | py | Python | flake8_raise.py | jdufresne/flake8-raise | 22415a4ae85a9dbb859cc92252ad5f7252b8fc98 | [
"MIT"
] | 21 | 2020-01-19T17:33:07.000Z | 2021-10-02T16:53:40.000Z | flake8_raise.py | jdufresne/flake8-raise | 22415a4ae85a9dbb859cc92252ad5f7252b8fc98 | [
"MIT"
] | 3 | 2020-01-20T08:47:49.000Z | 2020-01-30T16:39:50.000Z | flake8_raise.py | jdufresne/flake8-raise | 22415a4ae85a9dbb859cc92252ad5f7252b8fc98 | [
"MIT"
] | null | null | null | import ast
try:
from importlib.metadata import version
except ImportError:
from importlib_metadata import version
class RaiseStatementChecker:
name = "flake8-raise"
version = version("flake8-raise")
text = {
"R100": "R100 raise in except handler without from",
"R101": "R101 use ba... | 33.5 | 85 | 0.505055 |
7961f9a6bb249f9923de71e383964068a2ab8ec6 | 651 | py | Python | poetry/puzzle/operations/install.py | paralax/poetry | 16d49d10f9e333fdb2833b31f012d68c6d5ac0a6 | [
"MIT"
] | null | null | null | poetry/puzzle/operations/install.py | paralax/poetry | 16d49d10f9e333fdb2833b31f012d68c6d5ac0a6 | [
"MIT"
] | null | null | null | poetry/puzzle/operations/install.py | paralax/poetry | 16d49d10f9e333fdb2833b31f012d68c6d5ac0a6 | [
"MIT"
] | null | null | null | from .operation import Operation
class Install(Operation):
def __init__(self, package, reason: str = None) -> None:
super().__init__(reason)
self._package = package
@property
def package(self):
return self._package
@property
def job_type(self):
return 'install'
... | 21.7 | 60 | 0.579109 |
7961fa249d711be27d8421e6a847eaf4c81eb6ff | 378 | py | Python | netmiko/hp/__init__.py | gininfra/netmiko | dff97822b4e7393b601b54cd08e826d5f0363936 | [
"MIT"
] | null | null | null | netmiko/hp/__init__.py | gininfra/netmiko | dff97822b4e7393b601b54cd08e826d5f0363936 | [
"MIT"
] | null | null | null | netmiko/hp/__init__.py | gininfra/netmiko | dff97822b4e7393b601b54cd08e826d5f0363936 | [
"MIT"
] | null | null | null | __init__.py
from __future__ import unicode_literals
from netmiko.hp.hp_procurve_ssh import HPProcurveSSH
from netmiko.hp.hp_procurvejinhua_ssh import HPProcurveJinhuaSSH
from netmiko.hp.hp_procurve512900_ssh import HPProcurve512900SSH
from netmiko.hp.hp_comware_ssh import HPComwareSSH
__all__ = ['HPProcurveSSH', 'HPC... | 42 | 89 | 0.862434 |
7961fbc9ed4ccb3c07c9b7063cbf310c32c4efbc | 2,549 | py | Python | scripts/gripper.py | osrf/baxter_demos | 1678291de6addb7c3d5ac0391ccd5917398ab195 | [
"Apache-2.0"
] | 29 | 2015-03-05T19:03:00.000Z | 2021-08-11T05:48:51.000Z | scripts/gripper.py | rethink-imcmahon/baxter_demos | 1678291de6addb7c3d5ac0391ccd5917398ab195 | [
"Apache-2.0"
] | 1 | 2016-01-30T21:22:07.000Z | 2016-02-04T19:33:24.000Z | scripts/gripper.py | rethink-imcmahon/baxter_demos | 1678291de6addb7c3d5ac0391ccd5917398ab195 | [
"Apache-2.0"
] | 12 | 2015-01-30T17:14:15.000Z | 2021-01-27T07:54:54.000Z | #!/usr/bin/env python
"""Grip the object, move somewhere, and let go of the object
This is pretty dumb at the moment
"""
import argparse
import rospy
import baxter_interface
import common
from std_msgs.msg import Bool
class GripMover():
def __init__(self, limb):
self.limb = limb
self.limb_if = bax... | 33.103896 | 159 | 0.638682 |
7961fc6ae98569a04473a4a7309ed6cee6faba8e | 1,639 | py | Python | layer47/python/ChangeChassisIpAddress.py | xenadevel/xenascriptlibs | 31d6d7a4abd1ec732337a611edeac25446ae538b | [
"MIT"
] | 7 | 2016-03-09T09:30:33.000Z | 2021-12-01T08:36:26.000Z | layer47/python/ChangeChassisIpAddress.py | xenadevel/xenascriptlibs | 31d6d7a4abd1ec732337a611edeac25446ae538b | [
"MIT"
] | 2 | 2019-11-04T13:07:58.000Z | 2020-02-19T20:19:27.000Z | layer47/python/ChangeChassisIpAddress.py | xenadevel/xenascriptlibs | 31d6d7a4abd1ec732337a611edeac25446ae538b | [
"MIT"
] | 9 | 2017-07-21T14:01:36.000Z | 2020-06-25T01:41:10.000Z | #!/usr/bin/python
import os, sys, time, getopt
lib_path = os.path.abspath('testutils')
sys.path.append(lib_path)
from TestUtilsL47 import XenaScriptTools
def helptext():
print
print "Usage: %s ipaddr new_ipaddr new_mask new_gateway " % (sys.argv[0])
print
print "Change Chassis IP address and reboot."
... | 21.012821 | 88 | 0.557657 |
7961ff2e7de4493516b94258287e5da07cf3da29 | 1,085 | py | Python | Chapter 6/Residues_Hbonds_Distances/HB_STAT_all_filenames.py | wittler-github/A_MD_Analysis_of_Insulin | 952436ecae9f5f58ec95293ed4af860489787466 | [
"BSD-3-Clause"
] | 1 | 2019-11-07T16:38:43.000Z | 2019-11-07T16:38:43.000Z | Chapter 6/Residues_Hbonds_Distances/HB_STAT_all_filenames.py | wittler-github/A_MD_Analysis_of_Insulin | 952436ecae9f5f58ec95293ed4af860489787466 | [
"BSD-3-Clause"
] | null | null | null | Chapter 6/Residues_Hbonds_Distances/HB_STAT_all_filenames.py | wittler-github/A_MD_Analysis_of_Insulin | 952436ecae9f5f58ec95293ed4af860489787466 | [
"BSD-3-Clause"
] | 1 | 2022-01-27T03:38:39.000Z | 2022-01-27T03:38:39.000Z |
import numpy as np
QFC = np.genfromtxt('Results/datToPlotHB/HB_all_filenames.dat',dtype='U50',delimiter="\n");
eqt = 9.0
meanQFCarray = np.zeros((5,len(QFC)))
sdQFCarray = np.zeros((5,len(QFC)))
ab = np.zeros(len(QFC),dtype=[('var1','U50'),('var2',float),('var3',float),('var4',float),('var5',float)])
ab['var1'] =... | 28.552632 | 107 | 0.630415 |
796200da1d4ce8822c7b5fd21964550d197aa7dc | 38,342 | py | Python | tests/models/test_dagbag.py | GonzaloUlla/airflow | 2a3cbabbf8a21123e0b9c35866226087c3cebc4c | [
"Apache-2.0"
] | 2 | 2021-06-15T16:35:11.000Z | 2021-12-01T08:21:11.000Z | tests/models/test_dagbag.py | GonzaloUlla/airflow | 2a3cbabbf8a21123e0b9c35866226087c3cebc4c | [
"Apache-2.0"
] | null | null | null | tests/models/test_dagbag.py | GonzaloUlla/airflow | 2a3cbabbf8a21123e0b9c35866226087c3cebc4c | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 41.227957 | 106 | 0.630692 |
7962012a9b9251b189679c1036624e9245603de3 | 9,955 | py | Python | chatbot/model.py | mulki214/chatbot_demo | d0f11c40157c175170a06067900183a3f71b10ad | [
"Apache-2.0"
] | null | null | null | chatbot/model.py | mulki214/chatbot_demo | d0f11c40157c175170a06067900183a3f71b10ad | [
"Apache-2.0"
] | null | null | null | chatbot/model.py | mulki214/chatbot_demo | d0f11c40157c175170a06067900183a3f71b10ad | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Conchylicultor. All Rights Reserved.
# Modifications copyright (C) 2016 Carlos Segura
#
# 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/L... | 40.303644 | 182 | 0.593069 |
79620167649ba7fdae714637dfbb17721f1492dd | 6,079 | py | Python | Code/Model/cropNet_model.py | MLPA-DKU/Gait-Analysis | 2c288561be65e76bebd894df8293d856c4078e2c | [
"MIT"
] | 5 | 2020-07-23T05:55:54.000Z | 2021-07-09T22:15:33.000Z | Code/Model/cropNet_model.py | MLPA-DKU/Gait-Analysis | 2c288561be65e76bebd894df8293d856c4078e2c | [
"MIT"
] | null | null | null | Code/Model/cropNet_model.py | MLPA-DKU/Gait-Analysis | 2c288561be65e76bebd894df8293d856c4078e2c | [
"MIT"
] | 2 | 2020-07-23T06:05:54.000Z | 2021-04-13T05:55:24.000Z | import tensorflow as tf
import tensorflow.keras as keras
from tensorflow.keras.models import Model
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Activation
from tensorflow.keras.layers import Dropout
from tensorflow.keras.layers import Dense
from tensorflow.keras.layers import Input... | 34.539773 | 133 | 0.661951 |
79620295eaa0af497dfa70111fbe2fe5601e2a37 | 21,685 | py | Python | eval/model.py | JobQiu/AttnGAN | cf4eb54de04d840278b9feeb19e9e17cad22afeb | [
"MIT"
] | null | null | null | eval/model.py | JobQiu/AttnGAN | cf4eb54de04d840278b9feeb19e9e17cad22afeb | [
"MIT"
] | null | null | null | eval/model.py | JobQiu/AttnGAN | cf4eb54de04d840278b9feeb19e9e17cad22afeb | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.parallel
from torch.autograd import Variable
from torchvision import models
import torch.utils.model_zoo as model_zoo
import torch.nn.functional as F
from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence
from miscc.config import cfg
from GlobalAtte... | 33.777259 | 84 | 0.587595 |
796203c4a4e3699aace24f7c46f2b0f75e203180 | 159 | py | Python | src/statue/cli/config/config_cli.py | EddLabs/eddington-static | cdd1d9514c4eea1bd06c24894b3922e6cc3fb1f5 | [
"Apache-2.0"
] | null | null | null | src/statue/cli/config/config_cli.py | EddLabs/eddington-static | cdd1d9514c4eea1bd06c24894b3922e6cc3fb1f5 | [
"Apache-2.0"
] | null | null | null | src/statue/cli/config/config_cli.py | EddLabs/eddington-static | cdd1d9514c4eea1bd06c24894b3922e6cc3fb1f5 | [
"Apache-2.0"
] | null | null | null | """Configuration main CLI."""
from statue.cli.cli import statue_cli
@statue_cli.group("config")
def config_cli():
"""Configuration related actions."""
| 15.9 | 40 | 0.710692 |
796204164ac4edf71625ececeda11e0299142646 | 136 | py | Python | a.10.7.py | AmanMishra148/python-repo | 5b07fe19f2058fc2c909b96ae173f4346ac8d3da | [
"bzip2-1.0.6"
] | null | null | null | a.10.7.py | AmanMishra148/python-repo | 5b07fe19f2058fc2c909b96ae173f4346ac8d3da | [
"bzip2-1.0.6"
] | 1 | 2021-10-18T09:59:45.000Z | 2021-10-18T09:59:45.000Z | a.10.7.py | AmanMishra148/python-repo | 5b07fe19f2058fc2c909b96ae173f4346ac8d3da | [
"bzip2-1.0.6"
] | 4 | 2021-10-18T09:40:54.000Z | 2021-10-19T14:14:28.000Z | #script to print squares of first N natural no.s
print("enter the value of n")
n=int(input())
i=1
while(i<=n):
print(i**2)
i+=1
| 17 | 48 | 0.632353 |
79620644454feaa901f35aed43980ba971a8233d | 965 | py | Python | webcampicture/forms.py | rnetonet/django-webcampicture | 1b9d07a2bd40038c3827f28ed60e4c22c5f03b32 | [
"MIT"
] | 2 | 2021-09-06T03:20:35.000Z | 2021-09-30T19:29:42.000Z | webcampicture/forms.py | rnetonet/django-webcampicture | 1b9d07a2bd40038c3827f28ed60e4c22c5f03b32 | [
"MIT"
] | 2 | 2021-09-06T13:52:02.000Z | 2021-09-11T14:51:01.000Z | webcampicture/forms.py | rnetonet/django-webcampicture | 1b9d07a2bd40038c3827f28ed60e4c22c5f03b32 | [
"MIT"
] | 1 | 2021-09-30T19:32:02.000Z | 2021-09-30T19:32:02.000Z | import base64
import uuid
from django.core.files.uploadedfile import SimpleUploadedFile
from django.forms import ImageField
from . import constants, widgets
class WebcamPictureFormField(ImageField):
widget = widgets.WebcamPictureWidget
def __init__(self, width=320, height=240, *args, **kwargs):
sel... | 30.15625 | 82 | 0.662176 |
7962065dd793e47ec2aaf58eb669adbed030be55 | 1,744 | py | Python | code/straightlineExample_ML.py | mahehu/SGN-41007 | c8ed169a0a5f70fb87b99448e39a573c0df584b2 | [
"MIT"
] | 61 | 2017-01-09T07:48:08.000Z | 2021-12-15T15:13:49.000Z | code/straightlineExample_ML.py | mahehu/SGN-41007 | c8ed169a0a5f70fb87b99448e39a573c0df584b2 | [
"MIT"
] | null | null | null | code/straightlineExample_ML.py | mahehu/SGN-41007 | c8ed169a0a5f70fb87b99448e39a573c0df584b2 | [
"MIT"
] | 46 | 2017-01-10T19:32:04.000Z | 2020-11-20T08:29:20.000Z | # -*- coding: utf-8 -*-
"""
Created on Tue Nov 10 15:58:23 2015
@author: hehu
"""
import matplotlib.pyplot as plt
import numpy as np
if __name__ == "__main__":
np.random.seed(2016)
x = np.linspace(-10,10,100)
y = 1 / (1 + np.exp(-x))
x = x + 0.1 * np.random.randn(x.size)
y = y + 0... | 25.647059 | 124 | 0.493119 |
796206713d0e141487f02a486d78aafac4f4f594 | 6,437 | py | Python | built-in/PyTorch/Official/cv/image_object_detection/Faster_Mask_RCNN_for_PyTorch_Dynamic_Shape/detectron2/export/caffe2_inference.py | Ascend/modelzoo | f018cfed33dbb1cc2110b9ea2e233333f71cc509 | [
"Apache-2.0"
] | 12 | 2020-12-13T08:34:24.000Z | 2022-03-20T15:17:17.000Z | built-in/PyTorch/Official/cv/image_object_detection/Faster_Mask_RCNN_for_PyTorch_Dynamic_Shape/detectron2/export/caffe2_inference.py | Ascend/modelzoo | f018cfed33dbb1cc2110b9ea2e233333f71cc509 | [
"Apache-2.0"
] | 1 | 2022-01-20T03:11:05.000Z | 2022-01-20T06:53:39.000Z | built-in/PyTorch/Official/cv/image_object_detection/Faster_Mask_RCNN_for_PyTorch/detectron2/export/caffe2_inference.py | Ascend/modelzoo | f018cfed33dbb1cc2110b9ea2e233333f71cc509 | [
"Apache-2.0"
] | 2 | 2021-07-10T12:40:46.000Z | 2021-12-17T07:55:15.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
# Copyright 2020 Huawei Technologies Co., Ltd
#
# 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.... | 42.913333 | 100 | 0.666926 |
79620692526d1288952836010dc3b7ced202d021 | 811 | py | Python | check_encode.py | scartill/shorty | e1952aba5d0f4282acdd5cd046a613b69f13c73a | [
"MIT"
] | null | null | null | check_encode.py | scartill/shorty | e1952aba5d0f4282acdd5cd046a613b69f13c73a | [
"MIT"
] | null | null | null | check_encode.py | scartill/shorty | e1952aba5d0f4282acdd5cd046a613b69f13c73a | [
"MIT"
] | null | null | null | from urllib.parse import urlparse
import random
import string
import traceback
def random_token(size=6):
"""
Generates a random string of 6 chars, use size argument
to change the size of token.
Returns a valid token of desired size,
*default is 6 chars
"""
BASE_LIST = string.digits + strin... | 23.171429 | 71 | 0.641184 |
796206977d0f177315536925a6bcd116933ace3b | 1,050 | py | Python | app/utils/constants.py | ArboreumDev/algo-loan-logger | b14e18fec479d03a6ecd1050b0dc8e8af1dc6a83 | [
"MIT"
] | null | null | null | app/utils/constants.py | ArboreumDev/algo-loan-logger | b14e18fec479d03a6ecd1050b0dc8e8af1dc6a83 | [
"MIT"
] | null | null | null | app/utils/constants.py | ArboreumDev/algo-loan-logger | b14e18fec479d03a6ecd1050b0dc8e8af1dc6a83 | [
"MIT"
] | null | null | null | import os
from dotenv import load_dotenv
load_dotenv()
LOG_TOKEN_DESCRIPTION = """
This token is used to track all transactions related to a given loan.
Basic terms are in the token metadata.
Repayments for this loan will be logged in the note field of future transactions of this.
"""
# While intende... | 26.25 | 112 | 0.691429 |
79620725e75279b7d33237028eed27f20f93c23f | 8,735 | py | Python | docs/conf.py | baccuslab/pyret | eae8980d3efd36e15432f0a5ca18b0986d79cf93 | [
"MIT"
] | 35 | 2015-01-07T19:45:04.000Z | 2021-04-16T20:53:18.000Z | docs/conf.py | baccuslab/pyret | eae8980d3efd36e15432f0a5ca18b0986d79cf93 | [
"MIT"
] | 59 | 2015-01-07T19:39:56.000Z | 2018-03-27T00:22:34.000Z | docs/conf.py | baccuslab/pyret | eae8980d3efd36e15432f0a5ca18b0986d79cf93 | [
"MIT"
] | 8 | 2016-12-19T17:26:20.000Z | 2020-01-02T06:00:45.000Z | # -*- coding: utf-8 -*-
#
# pyret documentation build configuration file, created by
# sphinx-quickstart on Wed Jan 7 11:32:20 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All... | 31.763636 | 91 | 0.720778 |
796207b7ab9e4d56a82a08fda529d24f02cc6612 | 5,116 | py | Python | aviatrix.py | rranjan568/aviatrix-gateway-rest-api | 792b763594b36b41b119d84f8092efe187a45aa0 | [
"Xnet",
"X11"
] | null | null | null | aviatrix.py | rranjan568/aviatrix-gateway-rest-api | 792b763594b36b41b119d84f8092efe187a45aa0 | [
"Xnet",
"X11"
] | null | null | null | aviatrix.py | rranjan568/aviatrix-gateway-rest-api | 792b763594b36b41b119d84f8092efe187a45aa0 | [
"Xnet",
"X11"
] | null | null | null | import requests
import sys
import os
import requests
import time
import re
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
class aviatrixController:
def __init__(self, cfg):
self.cfg=cfg
self.cidr_list = []
... | 39.96875 | 353 | 0.620797 |
7962082f97323330916826aaffc773e3e353dba6 | 5,228 | py | Python | enhterm/provider/parser/argparser/commands.py | pyl1b/enhterm | b4eacc25ef1bdfecab9a662b5269d016070d4e6b | [
"MIT"
] | null | null | null | enhterm/provider/parser/argparser/commands.py | pyl1b/enhterm | b4eacc25ef1bdfecab9a662b5269d016070d4e6b | [
"MIT"
] | null | null | null | enhterm/provider/parser/argparser/commands.py | pyl1b/enhterm | b4eacc25ef1bdfecab9a662b5269d016070d4e6b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Predefined commands.
"""
import logging
import os
import re
from enhterm.provider.queue_provider import QueueProvider
from enhterm.errors import QuitError
logger = logging.getLogger('et.argparser')
def do_quit(command):
raise QuitError
def do_prefix(command, modifiers, show=False)... | 31.684848 | 99 | 0.622418 |
796208743289dd96760cb0903b921bbe13bc1cfc | 4,034 | py | Python | templates/python/auth/openid.py | ivan-valkov/seldon-deploy-sdk | 09a0eae97379fbaf85b08a8ea03a8cfc80129cbd | [
"Apache-2.0"
] | 6 | 2021-02-18T14:37:54.000Z | 2022-01-13T13:27:43.000Z | templates/python/auth/openid.py | ivan-valkov/seldon-deploy-sdk | 09a0eae97379fbaf85b08a8ea03a8cfc80129cbd | [
"Apache-2.0"
] | 14 | 2021-01-04T16:32:03.000Z | 2021-12-13T17:53:59.000Z | templates/python/auth/openid.py | ivan-valkov/seldon-deploy-sdk | 09a0eae97379fbaf85b08a8ea03a8cfc80129cbd | [
"Apache-2.0"
] | 7 | 2021-03-17T09:05:55.000Z | 2022-01-05T10:39:56.000Z | from urllib.parse import urlencode
import logging
from authlib.integrations.base_client import FrameworkIntegration, RemoteApp
from authlib.integrations.requests_client import OAuth2Session
from seldon_deploy_sdk.configuration import Configuration
from .base import (
Authenticator,
AuthMethod,
_raise_aut... | 35.699115 | 87 | 0.672286 |
796209a64c0a82f9c5d95cccd7b7a7509a8ded1f | 11,473 | py | Python | gui/main_window.py | FrCln/password-manager | 7e5aca609846e38db634de754be4e7c35a5f21a2 | [
"MIT"
] | null | null | null | gui/main_window.py | FrCln/password-manager | 7e5aca609846e38db634de754be4e7c35a5f21a2 | [
"MIT"
] | null | null | null | gui/main_window.py | FrCln/password-manager | 7e5aca609846e38db634de754be4e7c35a5f21a2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import base64
import os
import random
from PyQt5 import Qt, QtCore, QtGui, QtWidgets
from base_file import BaseFile
class Ui_MainWindow(QtWidgets.QMainWindow):
base: BaseFile
def __init__(self, parent, *args):
super().__init__(*args)
self.parent = parent
sel... | 43.29434 | 121 | 0.678724 |
79620a06ac9141547a38d278391a921274cc37b2 | 4,619 | py | Python | examples/virsim/job_submission_corona_IL_fab.py | wedeling/FabUQCampaign | f89ee1a7b72ec1c41d6bf662f1b42acd8065cb32 | [
"BSD-3-Clause"
] | 1 | 2020-06-26T10:37:56.000Z | 2020-06-26T10:37:56.000Z | examples/virsim/job_submission_corona_IL_fab.py | wedeling/FabUQCampaign | f89ee1a7b72ec1c41d6bf662f1b42acd8065cb32 | [
"BSD-3-Clause"
] | null | null | null | examples/virsim/job_submission_corona_IL_fab.py | wedeling/FabUQCampaign | f89ee1a7b72ec1c41d6bf662f1b42acd8065cb32 | [
"BSD-3-Clause"
] | 2 | 2020-04-20T12:50:11.000Z | 2020-04-24T10:35:13.000Z | """
@author: Federica Gugole
__license__ = "LGPL"
"""
import chaospy as cp
import easyvvuq as uq
import os, subprocess
import fabsim3_cmd_api as fab
config = 'virsim_IL'
script = 'virsim_IL'
machine = 'eagle_vecma'
workdir = '/export/scratch1/federica/VirsimCampaigns'
#home dir of this file
HOME = os.path.abspa... | 26.244318 | 82 | 0.58714 |
79620bc3f2a59703e692ad1082d4b99bcdb4412f | 498 | py | Python | models/TDHNN.py | shaandesai1/PortHNN | dc5e2088382c1db72bc2ea64d9f0c8e00ae038d6 | [
"MIT"
] | 1 | 2021-11-08T21:31:16.000Z | 2021-11-08T21:31:16.000Z | models/TDHNN.py | shaandesai1/PortHNN | dc5e2088382c1db72bc2ea64d9f0c8e00ae038d6 | [
"MIT"
] | null | null | null | models/TDHNN.py | shaandesai1/PortHNN | dc5e2088382c1db72bc2ea64d9f0c8e00ae038d6 | [
"MIT"
] | null | null | null | import torch.nn as nn
import torch
from .baseline import *
class TDHNN(base_model):
def __init__(self, input_dim, hidden_dim, output_size, deltat):
super(TDHNN, self).__init__(input_dim,hidden_dim,output_size,deltat)
self.input_dim = input_dim - 1
def time_deriv(self, x, t):
input_vec =... | 19.153846 | 76 | 0.646586 |
79620bce9585dc5112e25e0dd46ea3588e6dcc40 | 223 | py | Python | tests/test_templates/test_property_templates/test_date_property/required_not_null.py | dongfangtianyu/openapi-python-client | af09640a470a13de6ea50148fdceada3a6c54f02 | [
"MIT"
] | 2 | 2020-10-15T07:25:50.000Z | 2021-09-14T21:29:08.000Z | tests/test_templates/test_property_templates/test_date_property/required_not_null.py | dongfangtianyu/openapi-python-client | af09640a470a13de6ea50148fdceada3a6c54f02 | [
"MIT"
] | 79 | 2020-09-10T00:47:21.000Z | 2022-03-25T02:07:31.000Z | tests/test_templates/test_property_templates/test_date_property/required_not_null.py | dongfangtianyu/openapi-python-client | af09640a470a13de6ea50148fdceada3a6c54f02 | [
"MIT"
] | null | null | null | from datetime import date
from typing import cast, Union
from dateutil.parser import isoparse
some_source = date(2020, 10, 12)
some_destination = some_source.isoformat()
a_prop = isoparse(some_destination).date()
| 13.9375 | 43 | 0.7713 |
79620cd6d1f4586c6cc18f2913e8570fd927208b | 7,750 | py | Python | src/utils/node_recorder.py | Cho0joy/botty | ed9c22b78a527443b46fdc3070cb128f32501e2e | [
"MIT"
] | 1 | 2022-02-09T03:19:59.000Z | 2022-02-09T03:19:59.000Z | src/utils/node_recorder.py | Cho0joy/botty | ed9c22b78a527443b46fdc3070cb128f32501e2e | [
"MIT"
] | null | null | null | src/utils/node_recorder.py | Cho0joy/botty | ed9c22b78a527443b46fdc3070cb128f32501e2e | [
"MIT"
] | 2 | 2022-01-10T12:46:31.000Z | 2022-02-12T20:26:16.000Z | from screen import Screen
import cv2
from config import Config
from template_finder import TemplateFinder
from utils.misc import load_template, cut_roi
import mouse
import keyboard
import os
import shutil
from pathlib import Path
from typing import Tuple
import math
class NodeRecorder:
def __init__(self, screen: ... | 47.839506 | 152 | 0.551742 |
79620e3dce25a6f33cda6802e175b9ce98565780 | 28,082 | py | Python | src/zombiedice/__init__.py | nateeee/zombiedice | c04586bbae2543bd4d8ee0496897dd299f4751f5 | [
"BSD-3-Clause"
] | 1 | 2018-10-25T21:51:27.000Z | 2018-10-25T21:51:27.000Z | src/zombiedice/__init__.py | nateeee/zombiedice | c04586bbae2543bd4d8ee0496897dd299f4751f5 | [
"BSD-3-Clause"
] | null | null | null | src/zombiedice/__init__.py | nateeee/zombiedice | c04586bbae2543bd4d8ee0496897dd299f4751f5 | [
"BSD-3-Clause"
] | null | null | null | """
Zombie Dice is by Steve Jackson Games
http://zombiedice.sjgames.com/
Zombie Dice simulator by Al Sweigart (al@inventwithpython.com)
(I'm not affiliated with SJ Games. This is a hobby project.)
Note: A "turn" is a single player's turn. A "round" is every player having one turn.
Note: Since all variables are publi... | 44.9312 | 491 | 0.619187 |
79620e52b0adf9904e574435af3a582a072f35f2 | 147 | py | Python | HER2/Practice Testing/Dropout Experiment/9_confusion_matrix_9_3.py | raktim-mondol/DeepLearningCamelyon | 443fc5d17f577b99fc3b17cc1adc7000ccab642e | [
"CC0-1.0"
] | 70 | 2018-12-14T07:16:41.000Z | 2022-02-03T07:40:23.000Z | HER2/Practice Testing/Dropout Experiment/9_confusion_matrix_9_3.py | raktim-mondol/DeepLearningCamelyon | 443fc5d17f577b99fc3b17cc1adc7000ccab642e | [
"CC0-1.0"
] | null | null | null | HER2/Practice Testing/Dropout Experiment/9_confusion_matrix_9_3.py | raktim-mondol/DeepLearningCamelyon | 443fc5d17f577b99fc3b17cc1adc7000ccab642e | [
"CC0-1.0"
] | 24 | 2019-02-18T16:21:25.000Z | 2022-03-06T15:39:45.000Z | from sklearn.metrics import confusion_matrix
print(confusion_matrix(y_test, np.rint(y_pred)))
cf_9_3 = confusion_matrix(y_test, np.rint(y_pred))
| 24.5 | 50 | 0.809524 |
79620e6ed584c7ab60540306d6248972e930a8a3 | 1,496 | py | Python | utils/observations_conversion.py | tynguyen/sound-spaces | b196f3a36b4076752400cbf186e9cf2e160cc3c2 | [
"CC-BY-4.0"
] | null | null | null | utils/observations_conversion.py | tynguyen/sound-spaces | b196f3a36b4076752400cbf186e9cf2e160cc3c2 | [
"CC-BY-4.0"
] | null | null | null | utils/observations_conversion.py | tynguyen/sound-spaces | b196f3a36b4076752400cbf186e9cf2e160cc3c2 | [
"CC-BY-4.0"
] | null | null | null | import numpy as np
from typing import Dict, Any, List, Optional
def convert_observation_to_frame(
observation: Dict, is_depth_normalized=False
) -> np.ndarray:
r"""Generate image of single frame from observation
Args:
observation: observation returned from an environment step().
Returns:
... | 30.530612 | 85 | 0.655749 |
79620ee6a1c2fa4223aa0ad8c6f94f1a9cc7d977 | 967 | py | Python | progue/ai/actions/misc.py | BradyKieffer/progue | d003ca6edb3d407e29bc6675cb156e8715ae0861 | [
"MIT"
] | null | null | null | progue/ai/actions/misc.py | BradyKieffer/progue | d003ca6edb3d407e29bc6675cb156e8715ae0861 | [
"MIT"
] | null | null | null | progue/ai/actions/misc.py | BradyKieffer/progue | d003ca6edb3d407e29bc6675cb156e8715ae0861 | [
"MIT"
] | null | null | null | """ Misc / Weird actions can go here """
import random
from action import Action
from progue.utils.actor_constants import ATTRIBUTE_IDLE, ATTR_VALUE, MAX_TURNS, CURRENT_TURN, RANGE
class ActionIdle(Action):
""" Used for lazy monsters """
def __init__(self, actor):
Action.__init__(self, actor=actor, u... | 37.192308 | 99 | 0.681489 |
79620f0ba7ddf451e1b7cc4144b51e1c0a8948aa | 20,272 | py | Python | L1Trigger/L1TCalorimeter/python/caloStage2Params_2017_v1_8_4_ppRef_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | L1Trigger/L1TCalorimeter/python/caloStage2Params_2017_v1_8_4_ppRef_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | L1Trigger/L1TCalorimeter/python/caloStage2Params_2017_v1_8_4_ppRef_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | #
# caloStage2Params_2017_v1_8_4_ppRef_cfi
# change w.r.t. v1_8_4: pp reference run config changes to EG
#
import FWCore.ParameterSet.Config as cms
from L1Trigger.L1TCalorimeter.caloParams_cfi import caloParamsSource
import L1Trigger.L1TCalorimeter.caloParams_cfi
caloStage2Params = L1Trigger.L1TCalorimeter.caloParams_... | 87.004292 | 259 | 0.71547 |
79620f5a926b585ab54eb7bc573f09f2a106e2ff | 15,078 | py | Python | google/cloud/gaming_v1/types/game_server_deployments.py | vam-google/python-game-servers | bdadd8e6afa749a776ee9018b5cd64e543c69f53 | [
"Apache-2.0"
] | null | null | null | google/cloud/gaming_v1/types/game_server_deployments.py | vam-google/python-game-servers | bdadd8e6afa749a776ee9018b5cd64e543c69f53 | [
"Apache-2.0"
] | null | null | null | google/cloud/gaming_v1/types/game_server_deployments.py | vam-google/python-game-servers | bdadd8e6afa749a776ee9018b5cd64e543c69f53 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 36.865526 | 115 | 0.684905 |
796211082fe7ec5e2514edb1bf5211c90ee07889 | 1,603 | py | Python | core/utils.py | pg83/mix | 1aa964214a239bb80b3a2fa408551929b6b77acc | [
"MIT"
] | 12 | 2021-12-04T09:38:50.000Z | 2022-03-22T16:27:30.000Z | core/utils.py | pg83/mix | 1aa964214a239bb80b3a2fa408551929b6b77acc | [
"MIT"
] | 1 | 2022-02-15T23:16:32.000Z | 2022-02-15T23:16:32.000Z | core/utils.py | pg83/mix | 1aa964214a239bb80b3a2fa408551929b6b77acc | [
"MIT"
] | 1 | 2022-02-08T18:57:50.000Z | 2022-02-08T18:57:50.000Z | import os
import time
import json
import string
import hashlib
import functools
import itertools
def copy_dict(d):
return json.loads(json.dumps(d))
def iter_dir(w):
for a, b, c in os.walk(w):
for x in c:
yield os.path.join(a[len(w) + 1:], x)
B62 = string.digits + string.ascii_letters +... | 16.191919 | 73 | 0.563943 |
79621149d57792f71d920afec87dc5ae34969e6b | 15,778 | py | Python | tests/unit/states/test_zpool.py | casselt/salt | d8a2ef4e0cd544656489d23d161928879b1fc1c0 | [
"Apache-2.0"
] | 12 | 2015-01-21T00:18:25.000Z | 2021-07-11T07:35:26.000Z | tests/unit/states/test_zpool.py | casselt/salt | d8a2ef4e0cd544656489d23d161928879b1fc1c0 | [
"Apache-2.0"
] | 86 | 2017-01-27T11:54:46.000Z | 2020-05-20T06:25:26.000Z | tests/unit/states/test_zpool.py | casselt/salt | d8a2ef4e0cd544656489d23d161928879b1fc1c0 | [
"Apache-2.0"
] | 12 | 2015-01-05T09:50:42.000Z | 2019-08-19T01:43:40.000Z | # -*- coding: utf-8 -*-
'''
Tests for salt.states.zpool
:codeauthor: Jorge Schrauwen <sjorge@blackdot.be>
:maintainer: Jorge Schrauwen <sjorge@blackdot.be>
:maturity: new
:depends: salt.utils.zfs, salt.modules.zpool
:platform: illumos,freebsd,linux
'''
# Import Python libs
from __future__ import ... | 34.984479 | 108 | 0.508366 |
79621180748cb8201b800d48889eea895013ffb6 | 4,971 | py | Python | kcsd/basis_functions.py | mczerwinski/kCSD-python | fb7bae11dabd0709b2a6a36de45b3eae329f2791 | [
"BSD-3-Clause"
] | null | null | null | kcsd/basis_functions.py | mczerwinski/kCSD-python | fb7bae11dabd0709b2a6a36de45b3eae329f2791 | [
"BSD-3-Clause"
] | null | null | null | kcsd/basis_functions.py | mczerwinski/kCSD-python | fb7bae11dabd0709b2a6a36de45b3eae329f2791 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
"""
This script is used to generate basis sources for the
kCSD method Jan et.al (2012) for 1D,2D and 3D cases.
Two 'types' are described here, gaussian and step source,
These can be easily extended.
These scripts are based on Grzegorz Parka's,
Google Summer of Code 2014, INFC/pykCSD
This was writt... | 23.784689 | 73 | 0.604305 |
796211c27383e5fb49e43ed184561a24dfe168fc | 7,348 | py | Python | where/apriori/gravity.py | mfkiwl/where | b0e7cbfc198ee0276d544b5a94765ff8a2e6d0f2 | [
"MIT"
] | null | null | null | where/apriori/gravity.py | mfkiwl/where | b0e7cbfc198ee0276d544b5a94765ff8a2e6d0f2 | [
"MIT"
] | null | null | null | where/apriori/gravity.py | mfkiwl/where | b0e7cbfc198ee0276d544b5a94765ff8a2e6d0f2 | [
"MIT"
] | null | null | null | """Get gravity coefficients for a given gravity field
Description:
Reads data from gravity files. The gravity field to read is found in the configuration file. Files are assumed to be in
the ICGEM format [1] as available from the International Centre for Global Earth Models (ICGEM) website [2].
Usage of the gravity ... | 37.682051 | 119 | 0.580974 |
796212939806d7316c5d12bb7ab333227055a16e | 3,108 | py | Python | formation energy.py | jingslaw/self-consist_concentration_calculation | f024e0782bee4ffd39a38740af523061dd667bbe | [
"MIT"
] | 1 | 2021-09-27T19:44:59.000Z | 2021-09-27T19:44:59.000Z | formation energy.py | jingslaw/self-consist_concentration_calculation | f024e0782bee4ffd39a38740af523061dd667bbe | [
"MIT"
] | null | null | null | formation energy.py | jingslaw/self-consist_concentration_calculation | f024e0782bee4ffd39a38740af523061dd667bbe | [
"MIT"
] | null | null | null | #!/usr/bin/env python3.5
# -*- coding: utf-8 -*-
import re
import numpy as np
__author__ = 'Weiguo Jing'
kb = 8.617e-5 # unit eV / K
class ReadInput(object):
def __init__(self, filename='formation energy input.txt'):
with open(filename, 'r') as fp:
lines = fp.readlines()
... | 38.85 | 114 | 0.522844 |
7962135a1339b3a0aee99f3d12447da96f3cde3c | 1,559 | py | Python | quickstart_complete.py | SamitBaghla/python_qs | 4f48269bf68e3bec55c4547fc6aad71796050a38 | [
"Apache-2.0"
] | 3 | 2020-06-26T12:41:49.000Z | 2020-12-03T18:24:38.000Z | quickstart_complete.py | SamitBaghla/python_qs | 4f48269bf68e3bec55c4547fc6aad71796050a38 | [
"Apache-2.0"
] | 1 | 2020-06-16T14:30:23.000Z | 2020-06-16T14:37:26.000Z | quickstart_complete.py | SamitBaghla/python_qs | 4f48269bf68e3bec55c4547fc6aad71796050a38 | [
"Apache-2.0"
] | 2 | 2020-07-23T04:35:49.000Z | 2020-09-25T15:57:47.000Z | from cassandra.cluster import Cluster
def create_connection():
# TO DO: Fill in your own contact point
cluster = Cluster(['127.0.0.1'])
return cluster.connect('demo')
def set_user(session, lastname, age, city, email, firstname):
# TO DO: execute SimpleStatement that inserts one user into the table
... | 31.816327 | 145 | 0.695318 |
79621441276932505c0065c64707a7594a35b1a9 | 705 | py | Python | manage.py | JaredAhaza/Pitch- | 35b8dd871810287fb2f82dc942b2730040b0d626 | [
"MIT"
] | null | null | null | manage.py | JaredAhaza/Pitch- | 35b8dd871810287fb2f82dc942b2730040b0d626 | [
"MIT"
] | null | null | null | manage.py | JaredAhaza/Pitch- | 35b8dd871810287fb2f82dc942b2730040b0d626 | [
"MIT"
] | null | null | null | from flask_script import Manager, Server
from flask_migrate import Migrate, MigrateCommand
from app import create_app, db
from app.models import User, Pitch, Comment
#creating app instance
app = create_app('development')
manage = Manager(app)
Migrate = Migrate(app, db)
manage.add_command('server', Server)
manage.ad... | 21.363636 | 72 | 0.731915 |
796215d5d3b0553be488d0400d1ef99a9ade5f19 | 1,751 | py | Python | d3m/primitive_interfaces/unsupervised_learning.py | tods-doc/tamu_d3m | a6a05f022ea60ab9787cbd89659ea8e0062ca22b | [
"Apache-2.0"
] | null | null | null | d3m/primitive_interfaces/unsupervised_learning.py | tods-doc/tamu_d3m | a6a05f022ea60ab9787cbd89659ea8e0062ca22b | [
"Apache-2.0"
] | null | null | null | d3m/primitive_interfaces/unsupervised_learning.py | tods-doc/tamu_d3m | a6a05f022ea60ab9787cbd89659ea8e0062ca22b | [
"Apache-2.0"
] | null | null | null | import abc
import typing
from d3m.primitive_interfaces.base import *
__all__ = ('UnsupervisedLearnerPrimitiveBase',)
class UnsupervisedLearnerPrimitiveBase(PrimitiveBase[Inputs, Outputs, Params, Hyperparams]):
"""
A base class for primitives which have to be fitted before they can start
producing (usefu... | 35.734694 | 172 | 0.653912 |
796216578bc1496094e37ba90e45fd707c208167 | 34,657 | py | Python | cirq/google/engine/engine_client.py | matpompili/Cirq | b9ce387a7fc1f571b3d6e903c46543c3578677cb | [
"Apache-2.0"
] | 1 | 2020-07-16T07:09:10.000Z | 2020-07-16T07:09:10.000Z | cirq/google/engine/engine_client.py | matpompili/Cirq | b9ce387a7fc1f571b3d6e903c46543c3578677cb | [
"Apache-2.0"
] | 1 | 2020-08-11T15:45:17.000Z | 2020-08-11T15:45:17.000Z | cirq/google/engine/engine_client.py | matpompili/Cirq | b9ce387a7fc1f571b3d6e903c46543c3578677cb | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 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 ... | 43.213217 | 80 | 0.608997 |
79621709a46819db1de1c76891aaf2487307797f | 14,238 | py | Python | CoolLED_control.py | philglock/CoolLED_control | 2016b9f83e9459088b31a790e14e2e95dd4d3322 | [
"MIT"
] | null | null | null | CoolLED_control.py | philglock/CoolLED_control | 2016b9f83e9459088b31a790e14e2e95dd4d3322 | [
"MIT"
] | null | null | null | CoolLED_control.py | philglock/CoolLED_control | 2016b9f83e9459088b31a790e14e2e95dd4d3322 | [
"MIT"
] | null | null | null | import sys
import serial
import time
from PyQt4 import QtGui, QtCore
import pyqtgraph as pg
from queue import Queue
import os.path
from statistics import mean
app = QtGui.QApplication([])
class WorkingThread(QtCore.QThread):
def __init__(self, port, boxtext, frametime, queue):
QtCore.... | 39.882353 | 229 | 0.545161 |
7962172cd92e6426c14344aeefb5c4275b55b0c4 | 50,111 | py | Python | tests/jobs/test_backfill_job.py | daemon-demon/airflow | 6f96e81f0123b30750fb68ec496246023bf63f35 | [
"Apache-2.0"
] | 1 | 2019-05-07T06:46:55.000Z | 2019-05-07T06:46:55.000Z | tests/jobs/test_backfill_job.py | daemon-demon/airflow | 6f96e81f0123b30750fb68ec496246023bf63f35 | [
"Apache-2.0"
] | 20 | 2021-01-23T12:33:08.000Z | 2021-12-07T22:30:37.000Z | tests/jobs/test_backfill_job.py | daemon-demon/airflow | 6f96e81f0123b30750fb68ec496246023bf63f35 | [
"Apache-2.0"
] | 2 | 2020-03-08T14:12:55.000Z | 2020-06-10T10:17:32.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 34.702909 | 107 | 0.586618 |
7962179062733c308c5c21eacaa09d44d5f0a9c2 | 1,231 | py | Python | krawler/python/imagesearch.py | sagarmanchanda/krawler | 7b2bdff79afb63ba3da603ae848f6322010b3146 | [
"MIT"
] | null | null | null | krawler/python/imagesearch.py | sagarmanchanda/krawler | 7b2bdff79afb63ba3da603ae848f6322010b3146 | [
"MIT"
] | null | null | null | krawler/python/imagesearch.py | sagarmanchanda/krawler | 7b2bdff79afb63ba3da603ae848f6322010b3146 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from whoosh import index
from whoosh import qparser
import urllib2
from bs4 import BeautifulSoup
import sys
import json
cmdargs = sys.argv
ix = index.open_dir("/opt/lampp/htdocs/web/python/indexdir")
searcher = ix.searcher()
result_dict = {}
serach_term = ""
dump = 0
for arg in cmdargs:
if ... | 22.796296 | 76 | 0.69537 |
796218d6730536f823cb596d775bca45da9aae30 | 3,599 | py | Python | tests/sentry/rules/conditions/test_event_frequency.py | faulkner/sentry | f9dd4d0d7c683632cf02810c03bd42d7051ad010 | [
"BSD-3-Clause"
] | 1 | 2021-08-10T06:07:13.000Z | 2021-08-10T06:07:13.000Z | tests/sentry/rules/conditions/test_event_frequency.py | faulkner/sentry | f9dd4d0d7c683632cf02810c03bd42d7051ad010 | [
"BSD-3-Clause"
] | 5 | 2019-12-28T18:13:59.000Z | 2022-03-02T04:32:45.000Z | tests/sentry/rules/conditions/test_event_frequency.py | ccdlvc/report.iupdate.io | 0ab451850c34af40b86eb517e39124e5b894b44b | [
"BSD-3-Clause"
] | 1 | 2017-04-08T04:09:18.000Z | 2017-04-08T04:09:18.000Z | from __future__ import absolute_import
import itertools
import pytz
from datetime import datetime, timedelta
import mock
import six
from sentry.app import tsdb
from sentry.rules.conditions.event_frequency import (
EventFrequencyCondition, EventUniqueUserFrequencyCondition
)
from sentry.testutils.cases import Rul... | 27.265152 | 87 | 0.61656 |
796219279c4783ffeb75753b661053e55a380283 | 16,222 | py | Python | lale/lib/sklearn/gradient_boosting_classifier.py | gbdrt/lale | 291f824a6b96f088e787979ca768f50d7758424e | [
"Apache-2.0"
] | null | null | null | lale/lib/sklearn/gradient_boosting_classifier.py | gbdrt/lale | 291f824a6b96f088e787979ca768f50d7758424e | [
"Apache-2.0"
] | null | null | null | lale/lib/sklearn/gradient_boosting_classifier.py | gbdrt/lale | 291f824a6b96f088e787979ca768f50d7758424e | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 IBM 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 writing, ... | 39.955665 | 230 | 0.484959 |
796219c036c469b14296427842b463ab36fdc4c4 | 25,972 | py | Python | scripts/detector_eval/manual/plot_precision_vs_calls.py | RichardLitt/Vesper | 5360844f42a06942e7684121c650b08cf8616285 | [
"MIT"
] | 29 | 2017-07-10T14:49:15.000Z | 2022-02-02T23:14:38.000Z | scripts/detector_eval/manual/plot_precision_vs_calls.py | Tubbz-alt/Vesper | 76e5931ca0c7fbe070c53b1362ec246ec9007beb | [
"MIT"
] | 167 | 2015-03-17T14:45:22.000Z | 2022-03-30T21:00:05.000Z | scripts/detector_eval/manual/plot_precision_vs_calls.py | Tubbz-alt/Vesper | 76e5931ca0c7fbe070c53b1362ec246ec9007beb | [
"MIT"
] | 4 | 2015-02-06T03:30:27.000Z | 2020-12-27T08:38:52.000Z | """
Script that plots precision vs. number of calls for several detectors.
The plots are made for the archive of the current working directory
using the "Classification" and "Detector Score" annotations created
by the detectors.
"""
from pathlib import Path
import itertools
import sqlite3
from bokeh.models import R... | 31.711844 | 79 | 0.658093 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.