hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0354afedd203d1c04f701b7c9d2f06c7ff236634 | 1,085 | py | Python | biotransformers/utils/logger.py | moeaba/bio-transformers | ef141720d1f55faf4e6d67351e16f55e2458678a | [
"Apache-2.0"
] | 66 | 2021-04-26T14:08:35.000Z | 2022-03-31T07:00:25.000Z | biotransformers/utils/logger.py | moeaba/bio-transformers | ef141720d1f55faf4e6d67351e16f55e2458678a | [
"Apache-2.0"
] | 23 | 2021-04-26T15:20:08.000Z | 2022-01-12T03:01:09.000Z | biotransformers/utils/logger.py | moeaba/bio-transformers | ef141720d1f55faf4e6d67351e16f55e2458678a | [
"Apache-2.0"
] | 11 | 2021-05-02T09:33:21.000Z | 2022-03-01T14:28:17.000Z | """This module build a general logger module"""
import logging
import os
def logger(module_name: str) -> logging.Logger:
"""Configure the logger with formatter and handlers.
The log level depends on the environment variable `BIO_LOG_LEVEL`.
- 0: NOTSET, will be set to DEBUG
- 1: DEBUG
- 2: INFO ... | 26.463415 | 70 | 0.675576 |
0354b884069a768e433eb2e008e705b901b9796f | 340 | py | Python | bootcamp/multimedia/admin.py | basiltiger/easy_bootcamp | 875b9ed287f1a7824bb38f142dbe2f3b1ce54389 | [
"MIT"
] | null | null | null | bootcamp/multimedia/admin.py | basiltiger/easy_bootcamp | 875b9ed287f1a7824bb38f142dbe2f3b1ce54389 | [
"MIT"
] | null | null | null | bootcamp/multimedia/admin.py | basiltiger/easy_bootcamp | 875b9ed287f1a7824bb38f142dbe2f3b1ce54389 | [
"MIT"
] | null | null | null | from django.contrib import admin
from embed_video.admin import AdminVideoMixin
from .models import *
class MultimediaAdminMixin(AdminVideoMixin, admin.ModelAdmin):
pass
class CategorieMediaAdmin(admin.ModelAdmin):
pass
admin.site.register(CategorieMedia, CategorieMediaAdmin)
admin.site.register(Multimedia, Multi... | 18.888889 | 62 | 0.835294 |
03550902254c59ba642c86248dd02a879636d083 | 4,538 | py | Python | src/bloombox/schema/commerce/Customer_pb2.py | Bloombox/Python | 1b125fbdf54efb390afe12aaa966f093218c4387 | [
"Apache-2.0"
] | 4 | 2018-01-23T20:13:11.000Z | 2018-07-28T22:36:09.000Z | src/bloombox/schema/commerce/Customer_pb2.py | Bloombox/Python | 1b125fbdf54efb390afe12aaa966f093218c4387 | [
"Apache-2.0"
] | 159 | 2018-02-02T09:55:52.000Z | 2021-07-21T23:41:59.000Z | src/bloombox/schema/commerce/Customer_pb2.py | Bloombox/Python | 1b125fbdf54efb390afe12aaa966f093218c4387 | [
"Apache-2.0"
] | 3 | 2018-01-23T20:13:15.000Z | 2020-01-17T01:07:53.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: commerce/Customer.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection... | 47.270833 | 544 | 0.773468 |
035538f200d19ce1dfcca91d4058ec3eb45d8d78 | 2,483 | py | Python | descriptor-packages/vnfd/OSM-release-FOUR/telemetry_vnfd/charms/ansible-charm-v2/reactive/ansible_charm_v2.py | beckrian/mano | a03088ab9a35fe4ab65a30587a6f0e0d72491434 | [
"Apache-2.0"
] | 1 | 2019-05-01T08:40:09.000Z | 2019-05-01T08:40:09.000Z | descriptor-packages/vnfd/OSM-release-FOUR/telemetry_vnfd/charms/ansible-charm-v2/reactive/ansible_charm_v2.py | beckrian/mano | a03088ab9a35fe4ab65a30587a6f0e0d72491434 | [
"Apache-2.0"
] | null | null | null | descriptor-packages/vnfd/OSM-release-FOUR/telemetry_vnfd/charms/ansible-charm-v2/reactive/ansible_charm_v2.py | beckrian/mano | a03088ab9a35fe4ab65a30587a6f0e0d72491434 | [
"Apache-2.0"
] | 5 | 2018-05-25T18:08:15.000Z | 2020-01-03T14:15:46.000Z | from charmhelpers.core.hookenv import (
action_get,
action_fail,
action_set,
config,
status_set,
)
from charms.reactive import (
remove_state as remove_flag,
set_state as set_flag,
when,
when_not,
)
import charms.sshproxy
import os, fnmatch
import subprocess
@when('sshproxy.configu... | 33.106667 | 193 | 0.656061 |
03555cf4808eff22e579847da7a72b727809ebdc | 11,488 | py | Python | mmpose/datasets/datasets/top_down/topdown_posetrack18_dataset.py | irvingzhang0512/mmpose | 17557522ce3e41f830973079c5b4321935c41439 | [
"Apache-2.0"
] | null | null | null | mmpose/datasets/datasets/top_down/topdown_posetrack18_dataset.py | irvingzhang0512/mmpose | 17557522ce3e41f830973079c5b4321935c41439 | [
"Apache-2.0"
] | null | null | null | mmpose/datasets/datasets/top_down/topdown_posetrack18_dataset.py | irvingzhang0512/mmpose | 17557522ce3e41f830973079c5b4321935c41439 | [
"Apache-2.0"
] | null | null | null | import os
import os.path as osp
import warnings
from collections import OrderedDict, defaultdict
import json_tricks as json
import numpy as np
from poseval import eval_helpers
from poseval.evaluateAP import evaluateAP
from xtcocotools.coco import COCO
from ....core.post_processing import oks_nms, soft_oks_nms
from ..... | 37.298701 | 78 | 0.540303 |
0355898979ce91fa710a3b97c1eff1428d67e7d2 | 590 | py | Python | venv/Lib/site-packages/tests/test_050_AutocommitStatus.py | shehzadulislam/Assignment4 | a9cced70be6ae5d2685027d68032d5849f638301 | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/tests/test_050_AutocommitStatus.py | shehzadulislam/Assignment4 | a9cced70be6ae5d2685027d68032d5849f638301 | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/tests/test_050_AutocommitStatus.py | shehzadulislam/Assignment4 | a9cced70be6ae5d2685027d68032d5849f638301 | [
"Apache-2.0"
] | null | null | null | #
# Licensed Materials - Property of IBM
#
# (c) Copyright IBM Corp. 2007-2008
#
import unittest, sys
import ibm_db
import config
from testfunctions import IbmDbTestFunctions
class IbmDbTestCase(unittest.TestCase):
def test_050_AutocommitStatus(self):
obj = IbmDbTestFunctions()
obj.assert_expect(self.ru... | 17.352941 | 72 | 0.742373 |
03559c40bf15ce66266392d6ebf95cbe4afc0062 | 2,014 | py | Python | wechat_django/migrations/0004_templatemessage.py | UltraVacuum/wechat-django | 0ea243067f5bc5e69cab6c4585d5e46d9399a583 | [
"MIT"
] | 166 | 2019-02-23T10:19:33.000Z | 2022-02-03T06:50:15.000Z | wechat_django/migrations/0004_templatemessage.py | UltraVacuum/wechat-django | 0ea243067f5bc5e69cab6c4585d5e46d9399a583 | [
"MIT"
] | 19 | 2019-05-07T07:28:32.000Z | 2021-06-02T06:56:03.000Z | wechat_django/migrations/0004_templatemessage.py | UltraVacuum/wechat-django | 0ea243067f5bc5e69cab6c4585d5e46d9399a583 | [
"MIT"
] | 54 | 2019-02-27T07:55:57.000Z | 2021-09-02T06:47:51.000Z | # -*- coding: utf-8 -*-
# Generated by Django 2.1.7 on 2019-05-16 07:34
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
from ..models.permission import upgrade_perms, downgrade_perms
class Migration(migrations.Migration):
dependencies = [
... | 41.958333 | 144 | 0.622145 |
0355b577dc2f265c8bf4ab3eeed4fa67af2c34e8 | 5,412 | py | Python | openpnm/io/CSV.py | Eravalord/OpenPNM | 505bc37318a3ba40d8343f89cd347d0073dd9d14 | [
"MIT"
] | 1 | 2021-07-20T13:56:57.000Z | 2021-07-20T13:56:57.000Z | openpnm/io/CSV.py | yushun9897/OpenPNM | 031894a53650c3193d767b0460c8ea2e66799825 | [
"MIT"
] | null | null | null | openpnm/io/CSV.py | yushun9897/OpenPNM | 031894a53650c3193d767b0460c8ea2e66799825 | [
"MIT"
] | null | null | null | import re
import numpy as np
import scipy as sp
from openpnm.io.Pandas import Pandas
from openpnm.io import GenericIO, Dict
from openpnm.utils import logging, Workspace
logger = logging.getLogger(__name__)
ws = Workspace()
class CSV(GenericIO):
r"""
Reads and writes CSV (comma-separated-value files) containin... | 36.322148 | 79 | 0.588137 |
0355c2d65d13109fb518715ce1503ab7e9caea9e | 7,025 | py | Python | baselines/pois2/run.py | T3p/baselines | 5623c9160d1e86ebca3e673f142fe6b14a1db06c | [
"MIT"
] | 2 | 2020-08-01T18:19:05.000Z | 2021-06-30T06:37:23.000Z | baselines/pois2/run.py | T3p/baselines | 5623c9160d1e86ebca3e673f142fe6b14a1db06c | [
"MIT"
] | null | null | null | baselines/pois2/run.py | T3p/baselines | 5623c9160d1e86ebca3e673f142fe6b14a1db06c | [
"MIT"
] | 5 | 2018-11-24T16:29:39.000Z | 2021-12-10T03:07:07.000Z | #!/usr/bin/env python3
'''
This script runs rllab or gym environments. To run RLLAB, use the format
rllab.<env_name> as env name, otherwise gym will be used.
'''
# Common imports
import sys, re, os, time, logging
from collections import defaultdict
# Framework imports
import gym
import tensorflow as tf
# Self... | 40.843023 | 140 | 0.651388 |
0356278be4b039fd3ab10bed3ebe65b30b9520a4 | 710 | py | Python | cal.py | rayjustinhuang/BitesofPy | 03b694c5259ff607621419d9677c5caff90a6057 | [
"MIT"
] | null | null | null | cal.py | rayjustinhuang/BitesofPy | 03b694c5259ff607621419d9677c5caff90a6057 | [
"MIT"
] | null | null | null | cal.py | rayjustinhuang/BitesofPy | 03b694c5259ff607621419d9677c5caff90a6057 | [
"MIT"
] | null | null | null | from collections import defaultdict
def get_weekdays(calendar_output):
"""Receives a multiline Unix cal output and returns a mapping (dict) where
keys are int days and values are the 2 letter weekdays (Su Mo Tu ...)"""
cal_list = []
for line in calendar_output.splitlines():
cal_... | 29.583333 | 79 | 0.571831 |
03565784f2b985715d7ec8229425811eeb03188c | 9,577 | py | Python | pkgcore/ebuild/inspect_profile.py | pombreda/pkgcore | b438fc573af1a031d7ce12adbbf299bab5338451 | [
"BSD-3-Clause"
] | null | null | null | pkgcore/ebuild/inspect_profile.py | pombreda/pkgcore | b438fc573af1a031d7ce12adbbf299bab5338451 | [
"BSD-3-Clause"
] | 8 | 2015-03-24T14:21:44.000Z | 2015-03-24T14:21:44.000Z | pkgcore/ebuild/inspect_profile.py | pombreda/pkgcore | b438fc573af1a031d7ce12adbbf299bab5338451 | [
"BSD-3-Clause"
] | null | null | null | # Copyright: 2011 Brian Harring <ferringb@gmail.com>
# License: GPL2/BSD 3 clause
from snakeoil.demandload import demandload
from pkgcore.util import commandline
demandload(
'collections:defaultdict',
'itertools:chain',
'operator',
'pkgcore.ebuild:atom,profiles',
)
commands = []
# changelog, once a ... | 27.679191 | 103 | 0.629216 |
03566647c760e1ff8dbc10a853121e3bc1ec3137 | 5,866 | py | Python | blag/models.py | thusoy/blag | 183f5c5c6be16d8f22b269e574396d957d5f1895 | [
"MIT"
] | null | null | null | blag/models.py | thusoy/blag | 183f5c5c6be16d8f22b269e574396d957d5f1895 | [
"MIT"
] | 10 | 2015-02-23T22:55:15.000Z | 2022-01-07T19:48:42.000Z | blag/models.py | thusoy/blag | 183f5c5c6be16d8f22b269e574396d957d5f1895 | [
"MIT"
] | null | null | null | from . import db
from .blocks import render_blocks
from flask import Markup, url_for
from flask_wtf import Form
from geoalchemy2 import Geometry
from sqlalchemy_defaults import Column
from sqlalchemy_utils import ChoiceType
from sqlalchemy import func, CheckConstraint
from wtforms_alchemy import model_form_factory, Mo... | 27.669811 | 134 | 0.584726 |
035679adc413a91d95909836603e8dd8d1c31bf9 | 291 | py | Python | python_challenge/python-challenge01.py | nebiutadele/2022-02-28-Alta3-Python | 9c065540bfdf432103bfffac6eae4972c9f9061a | [
"MIT"
] | null | null | null | python_challenge/python-challenge01.py | nebiutadele/2022-02-28-Alta3-Python | 9c065540bfdf432103bfffac6eae4972c9f9061a | [
"MIT"
] | null | null | null | python_challenge/python-challenge01.py | nebiutadele/2022-02-28-Alta3-Python | 9c065540bfdf432103bfffac6eae4972c9f9061a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#Defining challenge function
def challenge():
#user provides input
user_input = input("How are you feeling today?\n")
# display the input back to the user.
print("You are " + user_input )
# this calls the newly created function
challenge()
| 22.384615 | 54 | 0.676976 |
0356f08e72e0ccd9b369cf56739b732044c08d88 | 615 | py | Python | democracy_club/apps/everyelection/urls.py | chris48s/Website | efabd478d617a40d58304b3e9cce9da343cfaa78 | [
"BSD-3-Clause"
] | null | null | null | democracy_club/apps/everyelection/urls.py | chris48s/Website | efabd478d617a40d58304b3e9cce9da343cfaa78 | [
"BSD-3-Clause"
] | null | null | null | democracy_club/apps/everyelection/urls.py | chris48s/Website | efabd478d617a40d58304b3e9cce9da343cfaa78 | [
"BSD-3-Clause"
] | null | null | null | from django.conf.urls import patterns, url, include
from django.views.generic import TemplateView
from .views import (HomeView, AuthorityEdit, RandomAuthority,
SkippedAuthoritiesView, DataView)
urlpatterns = [
url(r'^$',
HomeView.as_view(),
name="home"),
url(r'random_elec... | 27.954545 | 79 | 0.647154 |
03576a7088f660622b1cd044be93a3b4787c4cd0 | 1,129 | py | Python | fabfile/text.py | nprapps/idp-georgia | 316eba6195b7f410567a7e11eb4811ff7cba54cc | [
"Unlicense"
] | 1 | 2017-04-15T01:48:27.000Z | 2017-04-15T01:48:27.000Z | fabfile/text.py | nprapps/idp-georgia | 316eba6195b7f410567a7e11eb4811ff7cba54cc | [
"Unlicense"
] | 153 | 2017-04-14T18:06:26.000Z | 2017-06-02T13:08:09.000Z | fabfile/text.py | nprapps/idp-georgia | 316eba6195b7f410567a7e11eb4811ff7cba54cc | [
"Unlicense"
] | 1 | 2021-02-18T11:15:52.000Z | 2021-02-18T11:15:52.000Z | #!/usr/bin/env python
# _*_ coding:utf-8 _*_
"""
Commands related to syncing copytext from Google Docs.
"""
import app_config
import logging
from fabric.api import task
from oauth import get_document, get_credentials, get_doc, get_doc_as_text
logging.basicConfig(format=app_config.LOG_FORMAT)
logger = logging.getLogg... | 31.361111 | 166 | 0.729849 |
03576e6f7805f2bf2ac3c946cc6a78fa7944fb4a | 84,159 | py | Python | API/src/main/resources/Lib/xlwt/antlr.py | TagExpress/SikuliX1 | de9da11794dd94b3821eddc5c01b534d3f2fe828 | [
"MIT"
] | null | null | null | API/src/main/resources/Lib/xlwt/antlr.py | TagExpress/SikuliX1 | de9da11794dd94b3821eddc5c01b534d3f2fe828 | [
"MIT"
] | null | null | null | API/src/main/resources/Lib/xlwt/antlr.py | TagExpress/SikuliX1 | de9da11794dd94b3821eddc5c01b534d3f2fe828 | [
"MIT"
] | null | null | null | # Copyright (c) 2010-2020, sikuli.org, sikulix.com - MIT license
## This file is part of PyANTLR. See LICENSE.txt for license
## This file was copied for use with xlwt from the 2.7.7 ANTLR distribution. Yes, it
## says 2.7.5 below. The 2.7.5 distribution version didn't have a
## version in it.
## Here is the content... | 29.272696 | 108 | 0.570004 |
0357816f25c8c66547b3985667cbf459940ee91f | 90,299 | py | Python | sympy/assumptions/tests/test_query.py | lemmalearning/sympy | 62ad387ed3f7b243c889dd342296afc9a32ad1ea | [
"BSD-3-Clause"
] | 1 | 2015-08-31T06:55:47.000Z | 2015-08-31T06:55:47.000Z | sympy/assumptions/tests/test_query.py | lemmalearning/sympy | 62ad387ed3f7b243c889dd342296afc9a32ad1ea | [
"BSD-3-Clause"
] | null | null | null | sympy/assumptions/tests/test_query.py | lemmalearning/sympy | 62ad387ed3f7b243c889dd342296afc9a32ad1ea | [
"BSD-3-Clause"
] | 3 | 2015-04-18T22:33:32.000Z | 2015-09-23T06:45:07.000Z | from sympy.abc import t, w, x, y, z, n, k, m, p, i
from sympy.assumptions import (ask, AssumptionsContext, Q, register_handler,
remove_handler)
from sympy.assumptions.assume import global_assumptions
from sympy.assumptions.ask import (compute_known_facts, known_facts_cnf,
know... | 42.694563 | 111 | 0.623041 |
03578abc5fc4f89f88e5932afd2174eadb5ff286 | 1,483 | py | Python | grip/exporter.py | slitayem/grip | 351e32501d0a84c4841ef7b0eaf50e799f161bfe | [
"MIT"
] | 1 | 2016-12-22T07:04:04.000Z | 2016-12-22T07:04:04.000Z | grip/exporter.py | slitayem/grip | 351e32501d0a84c4841ef7b0eaf50e799f161bfe | [
"MIT"
] | null | null | null | grip/exporter.py | slitayem/grip | 351e32501d0a84c4841ef7b0eaf50e799f161bfe | [
"MIT"
] | null | null | null | from __future__ import print_function
import io
import os
import errno
from .server import create_app, resolve_readme
from .renderer import render_app
def render_page(path=None, gfm=False, context=None,
username=None, password=None,
render_offline=False, render_wide=False, render_inli... | 32.23913 | 77 | 0.632502 |
0357aa103b9d6ab8e2256e8839febc0b61d00649 | 2,661 | py | Python | tools/ngram_entropy.py | masihsultani/infotheory-research | 11167cbaaa79d49f094f938ed0918aa53752b441 | [
"MIT"
] | null | null | null | tools/ngram_entropy.py | masihsultani/infotheory-research | 11167cbaaa79d49f094f938ed0918aa53752b441 | [
"MIT"
] | null | null | null | tools/ngram_entropy.py | masihsultani/infotheory-research | 11167cbaaa79d49f094f938ed0918aa53752b441 | [
"MIT"
] | null | null | null | import csv
import sys
from ast import literal_eval
from collections import defaultdict
import numpy as np
import pandas as pd
from tools.helper import get_context, file_locations, get_gram_count, gram_conv
def compute_entropy(corpus, gram, stop_words=None):
"""
:param gram:
:param corpus: str
th... | 34.115385 | 119 | 0.629838 |
0357b344fd76ac54b26e3c667e459071b7c5a6bc | 974 | py | Python | lepoop/download.py | alvinwan/lepoop | a611a4334941527077b1f772d1ac0ae008daedc0 | [
"MIT"
] | null | null | null | lepoop/download.py | alvinwan/lepoop | a611a4334941527077b1f772d1ac0ae008daedc0 | [
"MIT"
] | null | null | null | lepoop/download.py | alvinwan/lepoop | a611a4334941527077b1f772d1ac0ae008daedc0 | [
"MIT"
] | null | null | null | """Utilities for reversing download."""
from .utils import get_valid_pip_history
from .utils import get_pip_command_action
from subprocess import Popen
from subprocess import PIPE
from subprocess import STDOUT
def get_file_candidates(prefix='File was already downloaded'):
"""Find all files likely to be related t... | 37.461538 | 77 | 0.693018 |
0357c2a7dfa8fa956cbf9e5b0b5894bff9236d6a | 9,582 | py | Python | pycatia/product_structure_interfaces/publications.py | Tian-Jionglu/pycatia | b315aeb3a74846f134ff6b67b3a6334b9d3905fa | [
"MIT"
] | 1 | 2020-04-27T13:59:10.000Z | 2020-04-27T13:59:10.000Z | pycatia/product_structure_interfaces/publications.py | Luanee/pycatia | ea5eef8178f73de12404561c00baf7a7ca30da59 | [
"MIT"
] | null | null | null | pycatia/product_structure_interfaces/publications.py | Luanee/pycatia | ea5eef8178f73de12404561c00baf7a7ca30da59 | [
"MIT"
] | null | null | null | #! usr/bin/python3.6
"""
Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-06-11 12:40:47.360445
.. warning::
The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only.
They are there as a guide as to how the visual basic / catscript function... | 38.95122 | 116 | 0.510749 |
0357f39d53aa64eb9f85ceadfde9e133cfd010f4 | 1,461 | py | Python | python/setup.py | XiangyiZhao/heterocl | fe69d532e7f64ee8b76419f4ff05b0cc27c77e8a | [
"Apache-2.0"
] | null | null | null | python/setup.py | XiangyiZhao/heterocl | fe69d532e7f64ee8b76419f4ff05b0cc27c77e8a | [
"Apache-2.0"
] | 1 | 2020-06-01T01:41:29.000Z | 2020-06-01T01:41:29.000Z | python/setup.py | XiangyiZhao/heterocl | fe69d532e7f64ee8b76419f4ff05b0cc27c77e8a | [
"Apache-2.0"
] | null | null | null | from setuptools import setup, find_packages
import os
import sys
CURRENT_DIR = os.path.dirname(__file__)
def get_lib_path():
"""Get library path, name and version"""
# We can not import `libinfo.py` in setup.py directly since __init__.py
# Will be invoked which introduces dependences
libinfo_py = os.p... | 28.096154 | 86 | 0.629706 |
0357ffebb2a989457c66d4015f5e442875977031 | 2,490 | py | Python | gym_minigrid/window.py | jesbu1/gym-minigrid | fd799f90bcd88d5418dcb074140e65862d44f064 | [
"Apache-2.0"
] | null | null | null | gym_minigrid/window.py | jesbu1/gym-minigrid | fd799f90bcd88d5418dcb074140e65862d44f064 | [
"Apache-2.0"
] | null | null | null | gym_minigrid/window.py | jesbu1/gym-minigrid | fd799f90bcd88d5418dcb074140e65862d44f064 | [
"Apache-2.0"
] | null | null | null | import sys
import numpy as np
# Only ask users to install matplotlib if they actually need it
try:
import matplotlib.pyplot as plt
except:
print('To display the environment in a window, please install matplotlib, eg:')
print('pip3 install --user matplotlib')
sys.exit(-1)
class Window:
"""
Wind... | 25.408163 | 83 | 0.601205 |
03580cef414b30521a33d9f5a12eeb6f7a5e4e6d | 44,741 | py | Python | src/fortrace/utility/scenarioHelper.py | dasec/ForTrace | b8187522a2c83fb661e5a1a5f403da8f40a31ead | [
"MIT"
] | 1 | 2022-03-31T14:01:51.000Z | 2022-03-31T14:01:51.000Z | src/fortrace/utility/scenarioHelper.py | dasec/ForTrace | b8187522a2c83fb661e5a1a5f403da8f40a31ead | [
"MIT"
] | null | null | null | src/fortrace/utility/scenarioHelper.py | dasec/ForTrace | b8187522a2c83fb661e5a1a5f403da8f40a31ead | [
"MIT"
] | 1 | 2022-03-31T14:02:30.000Z | 2022-03-31T14:02:30.000Z | import time
import logging
import hashlib
import subprocess
import random
import os
from datetime import date
try:
from fortrace.core.vmm import Vmm
from fortrace.utility.logger_helper import create_logger
from fortrace.core.vmm import GuestListener
from fortrace.core.reporter import Reporter
except I... | 51.544931 | 172 | 0.609061 |
03585ec37f41cc10b1fe8943d5596f0aab7f98bd | 8,012 | py | Python | igibson/utils/data_utils/ext_object/scripts_wip/get_obj_stable_rotations.py | suresh-guttikonda/iGibson | a69e623058180146466cd52d4bb3c00d1facdacf | [
"MIT"
] | 360 | 2020-04-02T11:12:09.000Z | 2022-03-24T21:46:58.000Z | igibson/utils/data_utils/ext_object/scripts_wip/get_obj_stable_rotations.py | suresh-guttikonda/iGibson | a69e623058180146466cd52d4bb3c00d1facdacf | [
"MIT"
] | 169 | 2020-04-07T21:01:05.000Z | 2022-03-31T10:07:39.000Z | igibson/utils/data_utils/ext_object/scripts_wip/get_obj_stable_rotations.py | suresh-guttikonda/iGibson | a69e623058180146466cd52d4bb3c00d1facdacf | [
"MIT"
] | 94 | 2020-04-09T23:22:17.000Z | 2022-03-17T21:49:03.000Z | """
Credit: Andrey Kurenkov
"""
import argparse
import json
import math
import os
import signal
import xml.etree.ElementTree as ET
import numpy as np
import pybullet as p
import trimesh
from pyquaternion import Quaternion
"""
Analyzes a model for possible ways to place it flat on a surface.
Use by running without --... | 39.27451 | 118 | 0.538692 |
0358fc76455b1b79d356e8e50e47ecea02b658b5 | 1,130 | py | Python | matlab_proxy/mwi_embedded_connector.py | chimmy-changa/dummy-mp-npm-test | 0737c988ea569bf05b109721f56b0c3f3a150718 | [
"BSD-2-Clause"
] | null | null | null | matlab_proxy/mwi_embedded_connector.py | chimmy-changa/dummy-mp-npm-test | 0737c988ea569bf05b109721f56b0c3f3a150718 | [
"BSD-2-Clause"
] | null | null | null | matlab_proxy/mwi_embedded_connector.py | chimmy-changa/dummy-mp-npm-test | 0737c988ea569bf05b109721f56b0c3f3a150718 | [
"BSD-2-Clause"
] | null | null | null | # Copyright 2020-2021 The MathWorks, Inc.
"""Functions to related to embedded connector access and configuration"""
from matlab_proxy import mwi_environment_variables as mwi_env
from matlab_proxy import settings as mwi_settings
from pathlib import Path
# TODO Write tests
def get_matlab_ready_file(connector_port):
... | 38.965517 | 100 | 0.79646 |
035910a3b54e8e63dbf7c45064c2b9b84557a159 | 982 | py | Python | leetcode/medium/1396-Design_underground.py | shubhamoli/practice | 5a24fdeb6e5f43b821ef0510fe3b343ddda18f22 | [
"MIT"
] | 1 | 2020-02-25T10:32:27.000Z | 2020-02-25T10:32:27.000Z | leetcode/medium/1396-Design_underground.py | shubhamoli/practice | 5a24fdeb6e5f43b821ef0510fe3b343ddda18f22 | [
"MIT"
] | null | null | null | leetcode/medium/1396-Design_underground.py | shubhamoli/practice | 5a24fdeb6e5f43b821ef0510fe3b343ddda18f22 | [
"MIT"
] | null | null | null | """
Leetcode #1396
"""
from collections import defaultdict
class UndergroundSystem:
def __init__(self):
self.transit = defaultdict(list)
self.dest = defaultdict(list)
def checkIn(self, id: int, stationName: str, t: int) -> None:
self.transit[id] = [stationName, t]
def check... | 25.842105 | 76 | 0.639511 |
03591768ad1a4744e45dd82115f51facd14487d5 | 23,781 | py | Python | Tests/test_SearchIO_hmmer2_text_index.py | mikepm35/biopython | 9f2d4d8d70ec7223df35fdc3d9c4a3c018756327 | [
"BSD-3-Clause"
] | 1 | 2020-02-13T14:32:44.000Z | 2020-02-13T14:32:44.000Z | Tests/test_SearchIO_hmmer2_text_index.py | EsamTolba/biopython | 120616cf0d28cb8e581898afd6604e5a2065a137 | [
"BSD-3-Clause"
] | null | null | null | Tests/test_SearchIO_hmmer2_text_index.py | EsamTolba/biopython | 120616cf0d28cb8e581898afd6604e5a2065a137 | [
"BSD-3-Clause"
] | 1 | 2019-03-14T18:59:30.000Z | 2019-03-14T18:59:30.000Z | # Copyright 2012 by Wibowo Arindrarto. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Tests for SearchIO hmmer2-text indexing."""
import os
import unittest
from search_tes... | 46.356725 | 88 | 0.518271 |
035925a732028022d8bc8744883af345490d6007 | 321 | py | Python | mantistablex/process/utils/singleton.py | TvvH05ozL6/table-summarisation | 2549ec29844a6e2b7350a9ba37c0b45d1c76a5ba | [
"MIT"
] | 1 | 2021-12-06T10:35:14.000Z | 2021-12-06T10:35:14.000Z | mantistablex/process/utils/singleton.py | TvvH05ozL6/table-summarisation | 2549ec29844a6e2b7350a9ba37c0b45d1c76a5ba | [
"MIT"
] | null | null | null | mantistablex/process/utils/singleton.py | TvvH05ozL6/table-summarisation | 2549ec29844a6e2b7350a9ba37c0b45d1c76a5ba | [
"MIT"
] | null | null | null | class Singleton(type):
"""
Utility class that implement the Singleton pattern.
Use with care
"""
_objects = {}
def __call__(cls, *args, **kwargs):
if cls not in cls._objects:
cls._objects[cls] = super(Singleton, cls).__call__(*args, **kwargs)
return cls._objects[cls... | 26.75 | 79 | 0.607477 |
035928983ad667855657ce7ff86f629c3e6e10c7 | 38,512 | py | Python | bots/hangouts/hangups_folder/build/lib/hangups/conversation.py | bobbzorzen/IRIS | 05b31edfa8745923242df01ecba3ab9e7ce50c95 | [
"MIT"
] | 1 | 2017-09-22T22:14:35.000Z | 2017-09-22T22:14:35.000Z | bots/hangouts/hangups_folder/build/lib/hangups/conversation.py | bobbzorzen/IRIS | 05b31edfa8745923242df01ecba3ab9e7ce50c95 | [
"MIT"
] | null | null | null | bots/hangouts/hangups_folder/build/lib/hangups/conversation.py | bobbzorzen/IRIS | 05b31edfa8745923242df01ecba3ab9e7ce50c95 | [
"MIT"
] | null | null | null | """Conversation objects."""
import asyncio
import datetime
import logging
from hangups import (parsers, event, user, conversation_event, exceptions,
hangouts_pb2)
logger = logging.getLogger(__name__)
CONVERSATIONS_PER_REQUEST = 100
MAX_CONVERSATION_PAGES = 100
@asyncio.coroutine
def build_use... | 38.861756 | 79 | 0.60389 |
035937d0edcf408556397f6949d18d086bd5deab | 35,095 | py | Python | sysinv/sysinv/sysinv/sysinv/api/controllers/v1/pv.py | starlingx-staging/stx-config | ccbf0392d1941e7cad6673f6351bd905a5a5d419 | [
"Apache-2.0"
] | null | null | null | sysinv/sysinv/sysinv/sysinv/api/controllers/v1/pv.py | starlingx-staging/stx-config | ccbf0392d1941e7cad6673f6351bd905a5a5d419 | [
"Apache-2.0"
] | null | null | null | sysinv/sysinv/sysinv/sysinv/api/controllers/v1/pv.py | starlingx-staging/stx-config | ccbf0392d1941e7cad6673f6351bd905a5a5d419 | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2013 UnitedStack Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.... | 38.779006 | 98 | 0.585867 |
03596bae02a5b6d7283ff9fcbabe6bbee45f13a4 | 6,516 | py | Python | hubward/generate_config_from_schema.py | daler/hubward | 533cc9279cfdf6cab3a79c0179a8287e9f8055ed | [
"BSD-3-Clause"
] | 10 | 2015-08-06T18:53:28.000Z | 2017-03-21T17:35:32.000Z | hubward/generate_config_from_schema.py | daler/hubmasonry | 533cc9279cfdf6cab3a79c0179a8287e9f8055ed | [
"BSD-3-Clause"
] | 2 | 2015-11-03T21:13:43.000Z | 2020-10-26T18:11:02.000Z | hubward/generate_config_from_schema.py | daler/hubmasonry | 533cc9279cfdf6cab3a79c0179a8287e9f8055ed | [
"BSD-3-Clause"
] | 4 | 2015-10-27T13:29:29.000Z | 2018-07-04T17:40:36.000Z | from jsonschema import Draft4Validator, validators
import yaml
from collections import OrderedDict
from textwrap import wrap as _wrap
def ordered_load(stream, Loader=yaml.Loader, object_pairs_hook=OrderedDict):
"""
Load YAML into an ordered dictionary to maintain key sorting.
"""
class OrderedLoader(L... | 29.753425 | 98 | 0.557397 |
0359980968d4a711a3c2483b1ca135a50d3049b4 | 304 | py | Python | reduce_mech.py | gywukun09/GPS | ce474f4afbcb64d46e85f04675e63343d5b65b47 | [
"MIT"
] | null | null | null | reduce_mech.py | gywukun09/GPS | ce474f4afbcb64d46e85f04675e63343d5b65b47 | [
"MIT"
] | null | null | null | reduce_mech.py | gywukun09/GPS | ce474f4afbcb64d46e85f04675e63343d5b65b47 | [
"MIT"
] | null | null | null | import os
from src.ck.def_cheminp import skeletal
detailed_folder = os.path.join('ignored','usc ii')
sk_folder = os.path.join('ignored','usc ii 14')
species_kept = ['CH4', 'CH3', 'CH2O', 'HCO', 'CO', 'H', 'O', 'O2', 'OH', 'H2O', 'CO2', 'H2O2', 'HO2']
skeletal(detailed_folder, sk_folder, species_kept)
| 33.777778 | 101 | 0.664474 |
035a01448b990956a3f6bc14dd847d726ec62a4d | 89 | py | Python | djangocms_navigation/__init__.py | marktsavage/djangocms-navigation | d15db1c4dd09162b8034b583e9630e7b97dfea86 | [
"BSD-3-Clause"
] | null | null | null | djangocms_navigation/__init__.py | marktsavage/djangocms-navigation | d15db1c4dd09162b8034b583e9630e7b97dfea86 | [
"BSD-3-Clause"
] | null | null | null | djangocms_navigation/__init__.py | marktsavage/djangocms-navigation | d15db1c4dd09162b8034b583e9630e7b97dfea86 | [
"BSD-3-Clause"
] | null | null | null | __version__ = "1.0.5"
default_app_config = "djangocms_navigation.apps.NavigationConfig"
| 22.25 | 65 | 0.808989 |
035a0fa14d1068eb36ecb9dacd1b5ad5481ec99d | 3,835 | py | Python | tests/adaptors/atomadaptortestcase.py | tlb-lab/credoscript | 32bdf08d84703dc2062dae4df1a95587d36c3cf7 | [
"MIT"
] | null | null | null | tests/adaptors/atomadaptortestcase.py | tlb-lab/credoscript | 32bdf08d84703dc2062dae4df1a95587d36c3cf7 | [
"MIT"
] | null | null | null | tests/adaptors/atomadaptortestcase.py | tlb-lab/credoscript | 32bdf08d84703dc2062dae4df1a95587d36c3cf7 | [
"MIT"
] | null | null | null | from credoscript import adaptors, models
from tests import CredoAdaptorTestCase
class AtomAdaptorTestCase(CredoAdaptorTestCase):
def setUp(self):
self.adaptor = adaptors.AtomAdaptor()
self.expected_entity = models.Atom
def test_fetch_by_atom_id(self):
"""Fetch a single Atom by atom_id"... | 54.014085 | 100 | 0.683703 |
035a252a95e8e44d0ab614634b4fb18728d34230 | 16,196 | py | Python | mesos_master/datadog_checks/mesos_master/mesos_master.py | gaffneyd4/integrations-core | 4c7725c9f1be4985381aad9740e7186f16a87976 | [
"BSD-3-Clause"
] | null | null | null | mesos_master/datadog_checks/mesos_master/mesos_master.py | gaffneyd4/integrations-core | 4c7725c9f1be4985381aad9740e7186f16a87976 | [
"BSD-3-Clause"
] | null | null | null | mesos_master/datadog_checks/mesos_master/mesos_master.py | gaffneyd4/integrations-core | 4c7725c9f1be4985381aad9740e7186f16a87976 | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2015-present
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
"""Mesos Master check
Collects metrics from mesos master node, only the leader is sending metrics.
"""
import requests
from six import iteritems
from six.moves.urllib.parse import urlparse
from datadog_checks... | 47.495601 | 117 | 0.628982 |
035a6f0af12e333f3d89c9e572ae13cf22bf23a4 | 5,352 | py | Python | Basics/E02_Elements/E13_AlignFloatElements.py | freder/PageBotExamples | eb4ced53a673b9376e8357afa9ea0795b022b13c | [
"Ruby",
"MIT"
] | 5 | 2020-06-20T22:01:23.000Z | 2021-08-06T04:39:50.000Z | Basics/E02_Elements/E13_AlignFloatElements.py | freder/PageBotExamples | eb4ced53a673b9376e8357afa9ea0795b022b13c | [
"Ruby",
"MIT"
] | 5 | 2020-05-17T09:32:27.000Z | 2021-03-15T19:45:52.000Z | Basics/E02_Elements/E13_AlignFloatElements.py | freder/PageBotExamples | eb4ced53a673b9376e8357afa9ea0795b022b13c | [
"Ruby",
"MIT"
] | 2 | 2021-02-25T19:07:45.000Z | 2022-01-09T21:14:06.000Z | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
# -----------------------------------------------------------------------------
#
# P A G E B O T E X A M P L E S
#
# www.pagebot.io
# Licensed under MIT conditions
#
# -----------------------------------------------------------------------------
#
# E13_A... | 39.644444 | 92 | 0.633034 |
035a7963d079c6e22231fc301975867ac69b1744 | 4,568 | py | Python | hayes/ext/word_gatherer.py | andersinno/hayes | f0843960ee71e78d3c7360ea8a77ae8b681be1be | [
"MIT"
] | 2 | 2016-02-16T07:43:56.000Z | 2018-05-13T17:31:46.000Z | hayes/ext/word_gatherer.py | andersinno/hayes | f0843960ee71e78d3c7360ea8a77ae8b681be1be | [
"MIT"
] | 9 | 2017-08-17T11:34:39.000Z | 2021-12-13T19:48:50.000Z | hayes/ext/word_gatherer.py | andersinno/hayes | f0843960ee71e78d3c7360ea8a77ae8b681be1be | [
"MIT"
] | 3 | 2015-10-29T15:10:19.000Z | 2017-01-14T18:00:45.000Z | # -*- coding: utf-8 -*-
import hashlib
import unicodedata
from collections import Counter, defaultdict
from six import text_type
from hayes.analysis import builtin_simple_analyzer
from hayes.ext.stopwords import (
english_stopwords, finnish_stopwords, russian_stopwords, swedish_stopwords,
unicode_punctuation_... | 35.6875 | 79 | 0.625876 |
035aa7d991acd607badec19f1202f6e76a2c96ca | 14,220 | py | Python | tests/test_datasync/test_datasync.py | pgajdos/moto | 9ec0ab45721bbc2f3770c38654d65faa6f562f77 | [
"Apache-2.0"
] | null | null | null | tests/test_datasync/test_datasync.py | pgajdos/moto | 9ec0ab45721bbc2f3770c38654d65faa6f562f77 | [
"Apache-2.0"
] | null | null | null | tests/test_datasync/test_datasync.py | pgajdos/moto | 9ec0ab45721bbc2f3770c38654d65faa6f562f77 | [
"Apache-2.0"
] | null | null | null | import logging
import boto
import boto3
from botocore.exceptions import ClientError
from moto import mock_datasync
import pytest
def create_locations(client, create_smb=False, create_s3=False):
"""
Convenience function for creating locations.
Locations must exist before tasks can be created.
"""
... | 33.380282 | 84 | 0.701266 |
035ab1640bbc70918862f8781ad602a5879f05ee | 2,518 | py | Python | tests/test_patch_data.py | hasgeek/wtforms3-json | 8df950724c43c7717c8be8fbd832def4bee8a08a | [
"BSD-3-Clause"
] | null | null | null | tests/test_patch_data.py | hasgeek/wtforms3-json | 8df950724c43c7717c8be8fbd832def4bee8a08a | [
"BSD-3-Clause"
] | null | null | null | tests/test_patch_data.py | hasgeek/wtforms3-json | 8df950724c43c7717c8be8fbd832def4bee8a08a | [
"BSD-3-Clause"
] | null | null | null | from pytest import raises
from wtforms import BooleanField, FieldList, Form, FormField, IntegerField, StringField
from wtforms.validators import DataRequired, Optional
from wtforms_json import InvalidData, MultiDict
class BooleanTestForm(Form):
is_active = BooleanField(default=False, validators=[Optional()])
... | 33.131579 | 87 | 0.684273 |
035ac2a10a865ec3fd8686fe61d93ad1073e0aa7 | 1,823 | py | Python | consensus/poet/families/setup.py | trust-tech/sawtooth-core | fcd66ff2f13dba51d7642049e0c0306dbee3b07d | [
"Apache-2.0"
] | 1 | 2017-08-04T10:31:00.000Z | 2017-08-04T10:31:00.000Z | consensus/poet/families/setup.py | trust-tech/sawtooth-core | fcd66ff2f13dba51d7642049e0c0306dbee3b07d | [
"Apache-2.0"
] | null | null | null | consensus/poet/families/setup.py | trust-tech/sawtooth-core | fcd66ff2f13dba51d7642049e0c0306dbee3b07d | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 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 wri... | 33.759259 | 106 | 0.654964 |
035acd09e8efab9c8bd81c8d4408f4f2d51ed7d6 | 34 | py | Python | maps/tree_stump/__init__.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | maps/tree_stump/__init__.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | maps/tree_stump/__init__.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | from .tree_stump import TreeStump
| 17 | 33 | 0.852941 |
035ae360d0eef5fad4c2600ecc3674de2e81d742 | 349 | py | Python | piperider/exceptions.py | zinkosuke/piperider | 1157862b8eeaabb075d04753202074a5f8ee6d24 | [
"MIT"
] | null | null | null | piperider/exceptions.py | zinkosuke/piperider | 1157862b8eeaabb075d04753202074a5f8ee6d24 | [
"MIT"
] | 3 | 2021-04-03T15:00:02.000Z | 2021-04-08T12:17:15.000Z | piperider/exceptions.py | zinkosuke/piperider | 1157862b8eeaabb075d04753202074a5f8ee6d24 | [
"MIT"
] | 1 | 2021-04-03T14:57:25.000Z | 2021-04-03T14:57:25.000Z | class PiperiderException(Exception):
"""
Base class for all piperider's errors.
"""
class DuplicateInvocation(PiperiderException):
"""
Raise when the output is present at the start of the task.
"""
class TaskNotReady(PiperiderException):
"""
Raise when there is insufficient input at ... | 20.529412 | 66 | 0.676218 |
035ae5132a4c6abfe53e41c4ed4c4a22cfb5c531 | 571 | py | Python | tests/test_pydent/test_models/models/test_wire.py | aquariumbio/trident | d1712cae544103fb145e3171894e4b35141f6813 | [
"MIT"
] | 5 | 2019-01-21T11:12:05.000Z | 2020-03-05T20:52:14.000Z | tests/test_pydent/test_models/models/test_wire.py | aquariumbio/pydent | d1712cae544103fb145e3171894e4b35141f6813 | [
"MIT"
] | 28 | 2020-11-18T02:07:09.000Z | 2021-06-08T15:49:41.000Z | tests/test_pydent/test_models/models/test_wire.py | aquariumbio/trident | d1712cae544103fb145e3171894e4b35141f6813 | [
"MIT"
] | 2 | 2021-02-27T19:23:45.000Z | 2021-09-14T10:29:07.000Z | def test_constructor(fake_session):
fvout = fake_session.FieldValue(
name="input", parent_class="Operation", role="input"
)
fvin = fake_session.FieldValue(
name="output", parent_class="Operation", role="output"
)
w = fake_session.Wire(source=fvin, destination=fvout)
w.print()
... | 25.954545 | 62 | 0.579685 |
035b0de3d07e07e6da37ca5995af036713e65c7d | 5,569 | py | Python | tests/test_esys_auto_session_flags.py | dgptha/tpm2-pytss | 2f9ebdf5c3db233107cb0fa69137e70d38b8887e | [
"BSD-2-Clause"
] | null | null | null | tests/test_esys_auto_session_flags.py | dgptha/tpm2-pytss | 2f9ebdf5c3db233107cb0fa69137e70d38b8887e | [
"BSD-2-Clause"
] | null | null | null | tests/test_esys_auto_session_flags.py | dgptha/tpm2-pytss | 2f9ebdf5c3db233107cb0fa69137e70d38b8887e | [
"BSD-2-Clause"
] | null | null | null | from contextlib import ExitStack
from tpm2_pytss.binding import *
from tpm2_pytss.util.testing import BaseTestESYS
class TestAutoSessionFlags(BaseTestESYS):
def test_auto_session_flags(self):
with ExitStack() as stack:
symmetric = TPMT_SYM_DEF(
algorithm=TPM2_ALG_AES,
... | 30.767956 | 88 | 0.419465 |
035b19f012dc75b101eb248ba66342402cb5f830 | 97 | py | Python | src/rolca/backup/protocol.py | dblenkus/rolca | 033492d9b573b1dc65cb836579dff27c6e06c7a7 | [
"Apache-2.0"
] | null | null | null | src/rolca/backup/protocol.py | dblenkus/rolca | 033492d9b573b1dc65cb836579dff27c6e06c7a7 | [
"Apache-2.0"
] | 12 | 2016-11-27T18:38:23.000Z | 2017-09-09T16:18:17.000Z | src/rolca/backup/protocol.py | dblenkus/rolca | 033492d9b573b1dc65cb836579dff27c6e06c7a7 | [
"Apache-2.0"
] | null | null | null | CHANNEL_BACKUP = 'rolca.backup'
# Message type for triggering backup.
TYPE_FILE = 'backup.file'
| 19.4 | 37 | 0.762887 |
035b1a564711c9dd9d4f98600c55c9199a85d39b | 714 | py | Python | app/core/migrations/0012_alter_event_event_date_alter_event_event_time.py | Misiaty-Mat/Event-schedule | 15ab5ec3d49b1f16e43a8d90709df5d143401c7a | [
"MIT"
] | null | null | null | app/core/migrations/0012_alter_event_event_date_alter_event_event_time.py | Misiaty-Mat/Event-schedule | 15ab5ec3d49b1f16e43a8d90709df5d143401c7a | [
"MIT"
] | null | null | null | app/core/migrations/0012_alter_event_event_date_alter_event_event_time.py | Misiaty-Mat/Event-schedule | 15ab5ec3d49b1f16e43a8d90709df5d143401c7a | [
"MIT"
] | null | null | null | # Generated by Django 4.0.1 on 2022-01-28 10:44
import datetime
from django.db import migrations, models
from django.utils.timezone import utc
class Migration(migrations.Migration):
dependencies = [
('core', '0011_alter_event_event_time'),
]
operations = [
migrations.AlterField(
... | 27.461538 | 107 | 0.616246 |
035b332f82bb273a01f3c52942795831c2c6b484 | 5,278 | py | Python | client_code/Demo/__init__.py | jshaffstall/anvil-extras | 521eec32a98cc038fea27379ff6c0ab024f31c7f | [
"MIT"
] | null | null | null | client_code/Demo/__init__.py | jshaffstall/anvil-extras | 521eec32a98cc038fea27379ff6c0ab024f31c7f | [
"MIT"
] | null | null | null | client_code/Demo/__init__.py | jshaffstall/anvil-extras | 521eec32a98cc038fea27379ff6c0ab024f31c7f | [
"MIT"
] | null | null | null | # SPDX-License-Identifier: MIT
#
# Copyright (c) 2021 The Anvil Extras project team members listed at
# https://github.com/anvilistas/anvil-extras/graphs/contributors
#
# This software is published at https://github.com/anvilistas/anvil-extras
import anvil.http
from ..utils import auto_refreshing
from ._anvil_designer... | 36.4 | 126 | 0.635657 |
035b3767eaf2d716c8c3899690fa9e187e0bffce | 13,038 | py | Python | mi/dataset/parser/test/test_issmcnsm_dostad.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | mi/dataset/parser/test/test_issmcnsm_dostad.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | mi/dataset/parser/test/test_issmcnsm_dostad.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
"""
@package mi.dataset.parser.test.test_issmcnsm_dostad
@file marine-integrations/mi/dataset/parser/test/test_issmcnsm_dostad.py
@author Emily Hahn
@brief Test code for a Issmcnsm_dostad data parser
"""
from nose.plugins.attrib import attr
from StringIO import StringIO
from mi.core.log import g... | 55.012658 | 123 | 0.727259 |
035b3c993eec3a94d96bc661ae525185e8aea2a7 | 9,974 | py | Python | punnsilm/__init__.py | hadara/punnsilm | 71e267ca64b1f3a6c7d5bc304652534e458c49d0 | [
"MIT"
] | 1 | 2021-11-11T17:12:28.000Z | 2021-11-11T17:12:28.000Z | punnsilm/__init__.py | hadara/punnsilm | 71e267ca64b1f3a6c7d5bc304652534e458c49d0 | [
"MIT"
] | null | null | null | punnsilm/__init__.py | hadara/punnsilm | 71e267ca64b1f3a6c7d5bc304652534e458c49d0 | [
"MIT"
] | null | null | null | import os
import imp
import sys
import glob
import inspect
import logging
import importlib
import threading
import multiprocessing
import os.path
from .core import PunnsilmNode, Output
DEFAULT_CONFIG_FILE = "conf.py"
DEFAULT_MODULEDIR = "modules"
DEFAULT_CONCURRENCY_METHOD = "threads"
# holds name to node class ma... | 35.243816 | 175 | 0.640766 |
035b793b35d7ab471a79a0e110a1aed4759aaac3 | 1,463 | py | Python | pymbolic/imperative/analysis.py | thomasgibson/pymbolic | a4a873f10bfc4c17dec92fe047a4638298cd63fc | [
"MIT"
] | 70 | 2015-08-10T20:24:24.000Z | 2022-03-31T04:08:35.000Z | pymbolic/imperative/analysis.py | thomasgibson/pymbolic | a4a873f10bfc4c17dec92fe047a4638298cd63fc | [
"MIT"
] | 48 | 2015-04-22T16:13:07.000Z | 2022-03-25T04:27:13.000Z | pymbolic/imperative/analysis.py | thomasgibson/pymbolic | a4a873f10bfc4c17dec92fe047a4638298cd63fc | [
"MIT"
] | 20 | 2015-11-20T18:47:11.000Z | 2021-09-28T23:44:21.000Z | """Fusion and other user-facing code transforms"""
__copyright__ = "Copyright (C) 2015 Matt Wala, Andreas Kloeckner"
__license__ = """
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without rest... | 39.540541 | 77 | 0.779221 |
035b90675863572da2a0a0422b2407806898dfa3 | 2,768 | py | Python | snm/specialities/migrations/0001_initial.py | sparesnmechs/sparesnmechs | 44a7178fcfd0c89004d9f31734405c8d0fd5cd97 | [
"MIT"
] | null | null | null | snm/specialities/migrations/0001_initial.py | sparesnmechs/sparesnmechs | 44a7178fcfd0c89004d9f31734405c8d0fd5cd97 | [
"MIT"
] | 9 | 2021-02-27T13:13:38.000Z | 2021-06-04T11:57:12.000Z | snm/specialities/migrations/0001_initial.py | sparesnmechs/sparesnmechs | 44a7178fcfd0c89004d9f31734405c8d0fd5cd97 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.7 on 2021-05-23 08:16
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import uuid
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(... | 42.584615 | 126 | 0.58815 |
035ba2ae33491064196c82b535dff0aa5cc159c9 | 1,986 | py | Python | igibson/render/cpp/tinyobjloader/sample.py | suresh-guttikonda/iGibson | a69e623058180146466cd52d4bb3c00d1facdacf | [
"MIT"
] | 360 | 2020-04-02T11:12:09.000Z | 2022-03-24T21:46:58.000Z | igibson/render/cpp/tinyobjloader/sample.py | suresh-guttikonda/iGibson | a69e623058180146466cd52d4bb3c00d1facdacf | [
"MIT"
] | 169 | 2020-04-07T21:01:05.000Z | 2022-03-31T10:07:39.000Z | igibson/render/cpp/tinyobjloader/sample.py | suresh-guttikonda/iGibson | a69e623058180146466cd52d4bb3c00d1facdacf | [
"MIT"
] | 94 | 2020-04-09T23:22:17.000Z | 2022-03-17T21:49:03.000Z | import sys
import tinyobjloader
filename = "../models/cornell_box.obj";
reader = tinyobjloader.ObjReader()
# Load .obj(and .mtl) using default configuration
ret = reader.ParseFromFile(filename)
# Optionally you can set custom `config`
# config = tinyobj.ObjReaderConfig()
# config.triangulate = False
# ret = reader... | 26.837838 | 61 | 0.654582 |
035bd2650df1abb4c4ccef3f5977fcc83c30454c | 3,742 | py | Python | dataset_to_feature.py | skbly7/usefulness | ed11cd55080d553cf62873999a5e00b154057fbc | [
"MIT"
] | null | null | null | dataset_to_feature.py | skbly7/usefulness | ed11cd55080d553cf62873999a5e00b154057fbc | [
"MIT"
] | null | null | null | dataset_to_feature.py | skbly7/usefulness | ed11cd55080d553cf62873999a5e00b154057fbc | [
"MIT"
] | null | null | null | import csv
import markdown
import bs4
import os
import cPickle as pickle
from textpreprocess import textpreprocess
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
tool_name_to_number_mapping = {
'Bitbucket': 1,
'Github': 2,
'CodeBrag': 3,
'Phabricater': 4,
'GamifiedSD': 5
}
if not os.path.i... | 28.135338 | 96 | 0.682523 |
035bdc176bd8dd25965932a9f837c3f78cf8a24c | 6,259 | py | Python | code/cbfperf-v2-fpr0.1.py | DenulApp/data | 85e56848669bdede7dba5f02a9acc01d19f86760 | [
"CC0-1.0"
] | null | null | null | code/cbfperf-v2-fpr0.1.py | DenulApp/data | 85e56848669bdede7dba5f02a9acc01d19f86760 | [
"CC0-1.0"
] | null | null | null | code/cbfperf-v2-fpr0.1.py | DenulApp/data | 85e56848669bdede7dba5f02a9acc01d19f86760 | [
"CC0-1.0"
] | null | null | null | from scipy.special import binom
from multiprocessing import Pool
from vicbf.vicbf import VICBF
from progressbar import ProgressBar
import zlib
def calculate_fpr(n, m, l, k):
"""Calculate the FPR for given parameters."""
return pow(1.0 - pow(1.0 - 1.0 / m, n * k) - ((l - 1.0) / l) *
n * k * (1.0... | 42.578231 | 221 | 0.571337 |
035be32925573a069933dbc3d6bc9f9599691e4a | 10,321 | py | Python | piChain/messages.py | themoodymann/piChain | 4de9e8da3994901371713b68bc05295fe6676571 | [
"MIT"
] | 8 | 2018-02-22T08:52:26.000Z | 2022-02-01T01:28:29.000Z | piChain/messages.py | themoodymann/piChain | 4de9e8da3994901371713b68bc05295fe6676571 | [
"MIT"
] | 3 | 2018-03-07T18:13:53.000Z | 2019-12-03T23:42:42.000Z | piChain/messages.py | florianmorath/piChain | df498021cb7c2df26a7980fb85b795f4a0105faf | [
"MIT"
] | 7 | 2018-02-26T12:28:34.000Z | 2021-01-01T11:33:59.000Z | """This module defines the representation of all objects that need to be sent over the network and thus need to be
serialized and unserialized."""
import cbor
class PaxosMessage:
""" A paxos message used to commit a block.
Args:
msg_type (str): TRY, TRY_OK, PROPOSE, PROPOSE_ACK or COMMIT.
re... | 30.090379 | 120 | 0.604689 |
035c1c5c4fefc8531dc6133771f89972f30dd4ad | 1,028 | py | Python | binary_search/69_sqrtx.py | shawlu95/Algorithm-Toolbox | b6c7b2228d8e70e0842e0bad607533a2c8322cf0 | [
"MIT"
] | null | null | null | binary_search/69_sqrtx.py | shawlu95/Algorithm-Toolbox | b6c7b2228d8e70e0842e0bad607533a2c8322cf0 | [
"MIT"
] | null | null | null | binary_search/69_sqrtx.py | shawlu95/Algorithm-Toolbox | b6c7b2228d8e70e0842e0bad607533a2c8322cf0 | [
"MIT"
] | 2 | 2020-02-07T20:49:02.000Z | 2020-02-11T06:01:55.000Z | class Solution(object):
def mySqrt(self, x):
"""
Take floor of largest number s.t. num ** 2 <= x
九章算法模版
"""
if x == 0: return 0
l, r = 0, x
while l + 1 < r:
m = (r - l) // 2 + l
if m ** 2 == x:
return m
el... | 20.156863 | 58 | 0.327821 |
035c35daaaa302b3c7b65bb6d38160a065d78044 | 1,003 | py | Python | Code/lsd/migrations/0008_AlterModelTable_location_of_Tool.py | praktianerJones/LSD | 8ca07bfcf53347dc466be0cae260387c90f0c2ed | [
"BSD-3-Clause"
] | 2 | 2021-12-15T21:58:43.000Z | 2021-12-15T22:17:26.000Z | Code/lsd/migrations/0008_AlterModelTable_location_of_Tool.py | praktianerJones/LSD | 8ca07bfcf53347dc466be0cae260387c90f0c2ed | [
"BSD-3-Clause"
] | null | null | null | Code/lsd/migrations/0008_AlterModelTable_location_of_Tool.py | praktianerJones/LSD | 8ca07bfcf53347dc466be0cae260387c90f0c2ed | [
"BSD-3-Clause"
] | 1 | 2021-12-19T17:02:02.000Z | 2021-12-19T17:02:02.000Z | # Generated by Django 2.1.7 on 2020-07-28 09:48
# modified by J. Luelsdorf
from django.db import migrations, models
from django.conf import settings
import django.db.models.deletion
class Migration(migrations.Migration):
atomic = False
dependencies = [
migrations.swappable_dependency(settings.AUTH_... | 27.108108 | 76 | 0.539382 |
035c4e6ba82447d69e25a22263b0347aaa2ce0a9 | 7,696 | py | Python | src/spring/azext_spring/_deployment_source_factory.py | LGDoor/azure-cli-extensions | 570a7c181999c1dd160d48f8454aab6cea057a20 | [
"MIT"
] | null | null | null | src/spring/azext_spring/_deployment_source_factory.py | LGDoor/azure-cli-extensions | 570a7c181999c1dd160d48f8454aab6cea057a20 | [
"MIT"
] | null | null | null | src/spring/azext_spring/_deployment_source_factory.py | LGDoor/azure-cli-extensions | 570a7c181999c1dd160d48f8454aab6cea057a20 | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 46.361446 | 139 | 0.641892 |
035c5928fb01038c5946179ae9370e40de07c37d | 2,397 | py | Python | hourglass/settings_utils.py | connectthefuture/calc | 7f0dc01d9265f26a36c2b9b5ee779fe876e4a494 | [
"CC0-1.0"
] | null | null | null | hourglass/settings_utils.py | connectthefuture/calc | 7f0dc01d9265f26a36c2b9b5ee779fe876e4a494 | [
"CC0-1.0"
] | 1 | 2021-06-10T23:13:04.000Z | 2021-06-10T23:13:04.000Z | hourglass/settings_utils.py | connectthefuture/calc | 7f0dc01d9265f26a36c2b9b5ee779fe876e4a494 | [
"CC0-1.0"
] | null | null | null | import os
import sys
import json
from typing import List, Optional
Environ = os._Environ
def load_cups_from_vcap_services(name: str='calc-env',
env: Environ=os.environ) -> None:
'''
Detects if VCAP_SERVICES exists in the environment; if so, parses
it and imports all the c... | 28.535714 | 78 | 0.607843 |
035cdc04791e02c98cc2da739c175f2b33347df4 | 8,550 | py | Python | xlit_s2s_nmt/utils/iterator_utils.py | vsoch/NETransliteration-COLING2018 | 5d5f59e561ecea45a6d3602121e1049baa7a76c3 | [
"MIT"
] | 52 | 2018-06-12T17:08:17.000Z | 2022-02-20T11:35:30.000Z | xlit_s2s_nmt/utils/iterator_utils.py | vsoch/NETransliteration-COLING2018 | 5d5f59e561ecea45a6d3602121e1049baa7a76c3 | [
"MIT"
] | 2 | 2018-08-18T20:00:29.000Z | 2019-10-03T10:12:26.000Z | xlit_s2s_nmt/utils/iterator_utils.py | vsoch/NETransliteration-COLING2018 | 5d5f59e561ecea45a6d3602121e1049baa7a76c3 | [
"MIT"
] | 10 | 2018-06-12T18:04:37.000Z | 2021-04-15T17:32:57.000Z | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 40.140845 | 89 | 0.657661 |
035cdea1786d39f3d21bb63be5c8ccffe1608bdf | 5,227 | py | Python | tensorflow/compiler/tests/categorical_op_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/compiler/tests/categorical_op_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/compiler/tests/categorical_op_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 36.298611 | 80 | 0.6652 |
035cee8a11dd3443d8b10b91acf065d9f1f53e77 | 12,368 | py | Python | bonneville/renderers/pydsl.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | null | null | null | bonneville/renderers/pydsl.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | null | null | null | bonneville/renderers/pydsl.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | 3 | 2020-05-10T02:08:44.000Z | 2020-11-06T11:01:57.000Z | # -*- coding: utf-8 -*-
'''
A Python-based DSL
:maintainer: Jack Kuan <kjkuan@gmail.com>
:maturity: new
:platform: all
The `pydsl` renderer allows one to author salt formulas(.sls files) in pure
Python using a DSL that's easy to write and easy to read. Here's an example:
.. code-block:: python
:linenos:
#!py... | 34.547486 | 161 | 0.689117 |
035d0f03dc0835e561debbc01c093350d1e63f5c | 1,797 | py | Python | apps/sad/templatetags/user_menu.py | tiposaurio/venton | 23660aba99c520e6da55982b92a6d3a3a9a6855e | [
"BSD-3-Clause"
] | null | null | null | apps/sad/templatetags/user_menu.py | tiposaurio/venton | 23660aba99c520e6da55982b92a6d3a3a9a6855e | [
"BSD-3-Clause"
] | null | null | null | apps/sad/templatetags/user_menu.py | tiposaurio/venton | 23660aba99c520e6da55982b92a6d3a3a9a6855e | [
"BSD-3-Clause"
] | 1 | 2021-07-13T22:11:42.000Z | 2021-07-13T22:11:42.000Z | # -*- coding: utf-8 -*-
"""
@copyright Copyright (c) 2014 Submit Consulting
@author Angel Sullon (@asullom)
@package sad
Descripcion: Tags para mostrar los menús dinámicos
"""
from django import template
from django.template import resolve_variable, Context
import datetime
from django.template.loader import... | 21.392857 | 86 | 0.66778 |
035d4d755e42b271942d491aad337f4e2ba3f1c2 | 542 | py | Python | tests/lowlevel/test_lfsr.py | sgherbst/msdsl | e38d5ecdb88b3574bda62f22a4f91ce3e4173d12 | [
"MIT"
] | 15 | 2019-05-14T10:12:23.000Z | 2022-03-29T15:29:52.000Z | tests/lowlevel/test_lfsr.py | sgherbst/msdsl | e38d5ecdb88b3574bda62f22a4f91ce3e4173d12 | [
"MIT"
] | 19 | 2020-01-22T21:44:33.000Z | 2021-06-05T02:10:41.000Z | tests/lowlevel/test_lfsr.py | sgherbst/msdsl | e38d5ecdb88b3574bda62f22a4f91ce3e4173d12 | [
"MIT"
] | 5 | 2019-10-21T09:53:17.000Z | 2021-08-10T17:32:20.000Z | import pytest
from msdsl.lfsr import LFSR
@pytest.mark.parametrize('n', list(range(3, 19)))
def test_lsfr(n):
lfsr = LFSR(n)
state = 0
passes = []
for i in range(2):
passes.append([])
for _ in range((1<<n)-1):
passes[-1].append(state)
state = lfsr.next_state(sta... | 25.809524 | 67 | 0.605166 |
035db2ea7b3b6bb71c1b0fdd93efe32db623042e | 962 | py | Python | components/gcp/container/component_sdk/python/kfp_component/launcher/__init__.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 2,860 | 2018-05-24T04:55:01.000Z | 2022-03-31T13:49:56.000Z | components/gcp/container/component_sdk/python/kfp_component/launcher/__init__.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 7,331 | 2018-05-16T09:03:26.000Z | 2022-03-31T23:22:04.000Z | components/gcp/container/component_sdk/python/kfp_component/launcher/__init__.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 1,359 | 2018-05-15T11:05:41.000Z | 2022-03-31T09:42:09.000Z | # Copyright 2018 The Kubeflow Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 40.083333 | 74 | 0.775468 |
035db5cd3c23f6d3232a6b13d30bfa7e6981e9d6 | 2,167 | py | Python | tests/template/srw_generate_test.py | yeeon/sirepo | 081595df256d40fbc7959614689d64ad2bc745d4 | [
"Apache-2.0"
] | 1 | 2019-06-06T08:08:11.000Z | 2019-06-06T08:08:11.000Z | tests/template/srw_generate_test.py | yeeon/sirepo | 081595df256d40fbc7959614689d64ad2bc745d4 | [
"Apache-2.0"
] | null | null | null | tests/template/srw_generate_test.py | yeeon/sirepo | 081595df256d40fbc7959614689d64ad2bc745d4 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
u"""PyTest for :mod:`sirepo.template.srw`
:copyright: Copyright (c) 2017 RadiaSoft LLC. All Rights Reserved.
:license: http://www.apache.org/licenses/LICENSE-2.0.html
"""
from __future__ import absolute_import, division, print_function
from pykern import pkio
from pykern import pkunit
from pyk... | 32.833333 | 287 | 0.654361 |
035dcc8c8c9a66c54ad6e4aea55522bd660713e1 | 352 | py | Python | toontown/ai/ToontownAIMsgTypes.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | toontown/ai/ToontownAIMsgTypes.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/ai/ToontownAIMsgTypes.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | from otp.ai.AIMsgTypes import *
TTAIMsgName2Id = {'DBSERVER_GET_ESTATE': 1040,
'DBSERVER_GET_ESTATE_RESP': 1041,
'PARTY_MANAGER_UD_TO_ALL_AI': 1042,
'IN_GAME_NEWS_MANAGER_UD_TO_ALL_AI': 1043,
'WHITELIST_MANAGER_UD_TO_ALL_AI': 1044}
TTAIMsgId2Names = invertDictLossless(TTAIMsgName2Id)
globals().update(TTAIMsgName2Id... | 32 | 52 | 0.823864 |
035dd9abfde56941f0f79bb1fd18c243c1501941 | 2,575 | py | Python | Executor/lib/junos_cli_trigger.py | DPham-Xyk/CoreNet | 4d36529ae6e51d5fa8cf95be58704ddab10a54c0 | [
"MIT"
] | null | null | null | Executor/lib/junos_cli_trigger.py | DPham-Xyk/CoreNet | 4d36529ae6e51d5fa8cf95be58704ddab10a54c0 | [
"MIT"
] | null | null | null | Executor/lib/junos_cli_trigger.py | DPham-Xyk/CoreNet | 4d36529ae6e51d5fa8cf95be58704ddab10a54c0 | [
"MIT"
] | null | null | null | import logging
import re
import warnings
import cryptography
from jnpr.junos.utils.start_shell import StartShell
from jnpr.junos.exception import ConnectError
from .conn_device import ConnDevice
with warnings.catch_warnings():
warnings.simplefilter('ignore', cryptography.utils)
import cryptography.hazmat.prim... | 32.1875 | 84 | 0.624466 |
035e39a9788d5c394f5e72f18b7e40a8ca2a8fd4 | 153 | py | Python | rlkit/torch/vae/biva/layers/__init__.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 63 | 2019-10-24T10:11:44.000Z | 2022-02-17T20:54:41.000Z | rlkit/torch/vae/biva/layers/__init__.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 6 | 2020-04-30T11:47:23.000Z | 2021-06-08T20:31:58.000Z | rlkit/torch/vae/biva/layers/__init__.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 8 | 2019-11-23T22:26:59.000Z | 2021-04-15T11:54:22.000Z | from .block import GatedResNet, ResMLP
from .convolution import PaddedNormedConv, PaddedConv
from .linear import NormedLinear, NormedDense, AsFeatureMap
| 38.25 | 59 | 0.849673 |
035ea9b79e7ebb39e655fe438c1b57c97ebd2432 | 2,594 | py | Python | scripts/get_train_dataset.py | chris4540/DT2119-Final-Project | a9e665d2fcc91442bcd80171fe557b09fcd71d00 | [
"MIT"
] | 1 | 2020-08-19T17:29:53.000Z | 2020-08-19T17:29:53.000Z | scripts/get_train_dataset.py | chris4540/DT2119-Final-Project | a9e665d2fcc91442bcd80171fe557b09fcd71d00 | [
"MIT"
] | null | null | null | scripts/get_train_dataset.py | chris4540/DT2119-Final-Project | a9e665d2fcc91442bcd80171fe557b09fcd71d00 | [
"MIT"
] | null | null | null | """
Generate the training dataset.
The number of phone should be 48 after using this script.
Read data:
>>> data = np.load('data/raw/full_traindata.npz')
>>> data['phone_to_idx'].item() # the mapping
>>> traindata = data['data'] # training features
Prerequisite:
data/raw/phone_to_idx.json
Generate by:
ipyt... | 28.505495 | 70 | 0.577101 |
035eb559996aaaaa985687e46fa59ee6d8b927c7 | 3,390 | py | Python | tools/i18n/chart_config_extractor.py | chejennifer/website | b7589f1fa288e0e4e12cd97a6bbbcb9f3fd3d833 | [
"Apache-2.0"
] | null | null | null | tools/i18n/chart_config_extractor.py | chejennifer/website | b7589f1fa288e0e4e12cd97a6bbbcb9f3fd3d833 | [
"Apache-2.0"
] | null | null | null | tools/i18n/chart_config_extractor.py | chejennifer/website | b7589f1fa288e0e4e12cd97a6bbbcb9f3fd3d833 | [
"Apache-2.0"
] | null | null | null | # 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 or agreed to in writing, ... | 32.285714 | 79 | 0.632153 |
035ed385f43c04dd32651e86eafd48e999926b22 | 5,655 | py | Python | influxdb_client/domain/dashboard.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | 1 | 2021-06-06T10:39:47.000Z | 2021-06-06T10:39:47.000Z | influxdb_client/domain/dashboard.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | null | null | null | influxdb_client/domain/dashboard.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Influx API Service
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: 0.1.0
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from influxd... | 25.133333 | 136 | 0.543767 |
035edf07a57a36d70e7b5c588ae0fbb7639a24d9 | 1,037 | py | Python | scripts/cifar_viz_tf.py | GSxiongkun/pyprobml | 71b2ce90632b80206760f93ab2a1926ce6c8c490 | [
"MIT"
] | 1 | 2020-03-01T09:01:37.000Z | 2020-03-01T09:01:37.000Z | scripts/cifar_viz_tf.py | etarakci-hvl/pyprobml | a3fe8086844ae0885e3f21d30be5f2e6448cdeba | [
"MIT"
] | null | null | null | scripts/cifar_viz_tf.py | etarakci-hvl/pyprobml | a3fe8086844ae0885e3f21d30be5f2e6448cdeba | [
"MIT"
] | null | null | null | # Based on
# https://github.com/tensorflow/docs/blob/master/site/en/tutorials/keras/basic_classification.ipynb
# (MIT License)
from __future__ import absolute_import, division, print_function
import numpy as np
import matplotlib.pyplot as plt
import os
figdir = "../figures"
def save_fig(fname): plt.savefig(os.path.j... | 20.74 | 99 | 0.690453 |
035f24b1b5c34b1d12a32b21e58023af2e54b832 | 9,603 | py | Python | nninv1d/nninv1d.py | narusehajime/nninv1d | 697743346c7e24a8f06d676e2e9f3330aee93afe | [
"MIT"
] | null | null | null | nninv1d/nninv1d.py | narusehajime/nninv1d | 697743346c7e24a8f06d676e2e9f3330aee93afe | [
"MIT"
] | null | null | null | nninv1d/nninv1d.py | narusehajime/nninv1d | 697743346c7e24a8f06d676e2e9f3330aee93afe | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Mar 7 15:43:18 2017
@author: hanar
"""
import time
import numpy as np
import os
# from keras.utils import np_utils
gpu_id = 1
import tensorflow as tf
print(tf.__version__)
if tf.__version__ >= "2.1.0":
physical_devices = tf.config.list_physical_devices('GPU')
tf.con... | 34.793478 | 84 | 0.568364 |
035f3c4aea74eb55a5163007d444ea4246e34b7b | 4,963 | py | Python | experiments/ashvin/icml2020/point/offpolicy/sac_noisy_expert1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/icml2020/point/offpolicy/sac_noisy_expert1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/icml2020/point/offpolicy/sac_noisy_expert1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | """
AWR + SAC from demo experiment
"""
from rlkit.demos.source.dict_to_mdp_path_loader import DictToMDPPathLoader
from rlkit.launchers.experiments.awac.awac_rl import experiment, process_args
import rlkit.misc.hyperparameter as hyp
from rlkit.launchers.arglauncher import run_variants
from rlkit.torch.sac.policies im... | 31.411392 | 91 | 0.531533 |
035f65d9a91f770f3e2a6693e70f0e1d4e4932d6 | 1,071 | py | Python | src/video2npz/stat_mix.py | yxt7979/video-bgm-generation | 40ebecc0a75fa03e824c846cbb99cd42a4799fe8 | [
"MIT"
] | 90 | 2021-10-21T09:52:47.000Z | 2022-03-30T14:12:05.000Z | src/video2npz/stat_mix.py | WuKaiYi/video-bgm-generation | 3b706735b84a332aaba5523981370346bdaac006 | [
"MIT"
] | 7 | 2021-11-08T05:53:12.000Z | 2022-02-28T12:39:02.000Z | src/video2npz/stat_mix.py | WuKaiYi/video-bgm-generation | 3b706735b84a332aaba5523981370346bdaac006 | [
"MIT"
] | 14 | 2021-11-17T05:43:28.000Z | 2022-03-22T14:47:40.000Z | def _cal_density(flow_magnitude):
for i, percentile in enumerate(fmpb_percentile):
if flow_magnitude < percentile:
return i
return len(fmpb_percentile)
def _cal_strength(weight):
for i, percentile in enumerate(vbeat_weight_percentile):
if weight < percentile:
return... | 46.565217 | 118 | 0.704015 |
03602b5a9e42c6a836e595fb86212124b2db7f82 | 2,064 | py | Python | thingflow/filters/__init__.py | kesking82/thingflow-python | 4c00deafd1bf425ec90ef2159fc5f3ea2553ade8 | [
"Apache-2.0"
] | 38 | 2017-04-25T12:24:56.000Z | 2021-01-12T17:01:43.000Z | thingflow/filters/__init__.py | kesking82/thingflow-python | 4c00deafd1bf425ec90ef2159fc5f3ea2553ade8 | [
"Apache-2.0"
] | 4 | 2017-08-04T22:39:15.000Z | 2017-08-07T17:36:21.000Z | thingflow/filters/__init__.py | kesking82/thingflow-python | 4c00deafd1bf425ec90ef2159fc5f3ea2553ade8 | [
"Apache-2.0"
] | 14 | 2017-07-31T21:25:29.000Z | 2022-02-06T08:09:07.000Z | # Copyright 2016,2017 by MPI-SWS and Data-ken Research.
# Licensed under the Apache 2.0 License.
"""
This sub-module provides a collection of filters for providing linq-style
programming (inspired by RxPy).
Each function appears as a method on the OutputThing base class, allowing for
easy chaining of calls. For exampl... | 34.983051 | 79 | 0.741279 |
036037ceaf479af4bed01e23fa8d17fcc720c977 | 1,271 | py | Python | tests/test_mantle/arith/test_arith.py | splhack/loam | 10b08bd622b7cfd63eabaec4729f6238e4521b30 | [
"MIT"
] | 14 | 2017-10-08T09:16:10.000Z | 2021-11-27T19:12:24.000Z | tests/test_mantle/arith/test_arith.py | splhack/loam | 10b08bd622b7cfd63eabaec4729f6238e4521b30 | [
"MIT"
] | 7 | 2018-04-12T21:33:49.000Z | 2018-08-21T22:14:20.000Z | tests/test_mantle/arith/test_arith.py | splhack/loam | 10b08bd622b7cfd63eabaec4729f6238e4521b30 | [
"MIT"
] | 3 | 2018-07-24T04:55:02.000Z | 2019-12-30T08:12:39.000Z | import pytest
import mantle
from ..harness import unary, binary, shift
def com(name, main):
import magma
from magma.testing import check_files_equal
name += '_' + magma.mantle_target
build = 'build/' + name
gold = 'gold/' + name
magma.compile(build, main)
assert check_files_equal(__file__,... | 26.479167 | 69 | 0.63572 |
03607da59592570d5aef6d86bd42a9f9740e1123 | 18,143 | py | Python | geosoft/gxpy/segy_reader.py | fearaschiarrai/gxpy | 4c5e7594b24e530a8cd94df1eef562c5c6ce3e92 | [
"BSD-2-Clause"
] | 25 | 2017-07-14T06:39:37.000Z | 2022-03-09T21:39:51.000Z | geosoft/gxpy/segy_reader.py | fearaschiarrai/gxpy | 4c5e7594b24e530a8cd94df1eef562c5c6ce3e92 | [
"BSD-2-Clause"
] | 100 | 2016-12-13T17:30:41.000Z | 2021-08-01T20:21:13.000Z | geosoft/gxpy/segy_reader.py | fearaschiarrai/gxpy | 4c5e7594b24e530a8cd94df1eef562c5c6ce3e92 | [
"BSD-2-Clause"
] | 28 | 2016-12-12T17:34:40.000Z | 2022-03-16T15:39:39.000Z | """
Read SEG-Y files into geosoft databases, grids and voxels.
:Classes:
:class:`SegyReader` Reads SEG-Y files and creates Geosoft grids or voxels
.. versionadded:: 9.9.1
"""
import geosoft
import geosoft.gxapi as gxapi
from . import coordinate_system as coordinate_system
from . import vv as gxvv
__version__ = g... | 36.95112 | 90 | 0.624869 |
03608b95afcb2666fe9f96f4a6b6a992d5d7930b | 34,855 | py | Python | tracopt/versioncontrol/git/git_fs.py | mikiec84/trac | d51a7119b9fcb9061d7fe135c7d648fa671555dd | [
"BSD-3-Clause"
] | null | null | null | tracopt/versioncontrol/git/git_fs.py | mikiec84/trac | d51a7119b9fcb9061d7fe135c7d648fa671555dd | [
"BSD-3-Clause"
] | null | null | null | tracopt/versioncontrol/git/git_fs.py | mikiec84/trac | d51a7119b9fcb9061d7fe135c7d648fa671555dd | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2020 Edgewall Software
# Copyright (C) 2006-2011, Herbert Valerio Riedel <hvr@gnu.org>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at ht... | 35.385787 | 79 | 0.541414 |
0360928509ffa497b2f81f19b79dd6cf4fd4c522 | 9,353 | py | Python | lib/python2.7/matplotlib/backends/backend_cocoaagg.py | ashley8jain/IITD-complaint-system-web | 21a94601cba710f558d1689b87cfc391a1541c9f | [
"BSD-3-Clause"
] | 1 | 2017-01-25T00:38:48.000Z | 2017-01-25T00:38:48.000Z | lib/python2.7/matplotlib/backends/backend_cocoaagg.py | ashley8jain/IITD-complaint-system-web | 21a94601cba710f558d1689b87cfc391a1541c9f | [
"BSD-3-Clause"
] | null | null | null | lib/python2.7/matplotlib/backends/backend_cocoaagg.py | ashley8jain/IITD-complaint-system-web | 21a94601cba710f558d1689b87cfc391a1541c9f | [
"BSD-3-Clause"
] | null | null | null | from __future__ import division
"""
backend_cocoaagg.py
A native Cocoa backend via PyObjC in OSX.
Author: Charles Moad (cmoad@users.sourceforge.net)
Notes:
- Requires PyObjC (currently testing v1.3.7)
- The Tk backend works nicely on OSX. This code
primarily serves as an example of embedding a
matpl... | 32.702797 | 176 | 0.670694 |
0360943404b0c92c6feb6a051a588646596c3c9e | 32 | py | Python | btd6_memory_info/generated/UnityEngine/Analytics/AnalyticsSessionInfo/analytics_session_info.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/UnityEngine/Analytics/AnalyticsSessionInfo/analytics_session_info.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/UnityEngine/Analytics/AnalyticsSessionInfo/analytics_session_info.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class AnalyticsSessionInfo: pass | 32 | 32 | 0.90625 |
0360a6f57b4c5b3f8a42360c3794b1c23acc56a9 | 739 | py | Python | pyosmo/end_conditions/length.py | OPpuolitaival/pyosmo | d95b46bccde44d5d214558ff580da033fd66feaf | [
"MIT"
] | 7 | 2018-08-13T06:01:23.000Z | 2021-12-11T18:18:14.000Z | pyosmo/end_conditions/length.py | OPpuolitaival/pyosmo | d95b46bccde44d5d214558ff580da033fd66feaf | [
"MIT"
] | 4 | 2018-07-18T05:14:05.000Z | 2021-12-11T18:17:47.000Z | pyosmo/end_conditions/length.py | OPpuolitaival/pyosmo | d95b46bccde44d5d214558ff580da033fd66feaf | [
"MIT"
] | 4 | 2018-03-19T11:24:00.000Z | 2021-12-11T18:16:15.000Z | from pyosmo.end_conditions.base import OsmoEndCondition
from pyosmo.history.history import OsmoHistory
from pyosmo.model import OsmoModelCollector
class Length(OsmoEndCondition):
"""
Stops testing when count is filled
"""
def __init__(self, count):
self.count = count
def end_test(self, h... | 35.190476 | 81 | 0.721245 |
0360aa043fbb9f92b0b2bd9ceef2c20d90105727 | 4,570 | py | Python | tests/django_property_filter/filters/test_property_choice_filter.py | ericziethen/django-filter-property | d7433db657877049d008fa5ad381992ae7904b77 | [
"MIT"
] | 17 | 2020-07-21T10:54:20.000Z | 2021-11-28T12:02:59.000Z | tests/django_property_filter/filters/test_property_choice_filter.py | ericziethen/django-property-filter | 164e31e189eda7ca0fdedb832edc436cfe50de47 | [
"MIT"
] | 210 | 2020-05-28T04:51:23.000Z | 2022-03-25T10:43:53.000Z | tests/django_property_filter/filters/test_property_choice_filter.py | ericziethen/django-filter-property | d7433db657877049d008fa5ad381992ae7904b77 | [
"MIT"
] | 3 | 2020-11-25T11:21:20.000Z | 2022-02-17T11:55:49.000Z |
import pytest
from django_filters import FilterSet, ChoiceFilter
from django_property_filter import PropertyFilterSet, PropertyChoiceFilter
from property_filter.models import ChoiceFilterModel
@pytest.mark.parametrize('lookup', PropertyChoiceFilter.supported_lookups)
def test_supported_lookups(lookup):
# Test ... | 37.154472 | 121 | 0.671116 |
0360ab5b53a350afcff82f335c37d74d9c74d1cb | 2,517 | py | Python | sdk/eventgrid/azure-eventgrid/setup.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/eventgrid/azure-eventgrid/setup.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/eventgrid/azure-eventgrid/setup.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#----------------------------------------------------------------... | 34.479452 | 91 | 0.608661 |
0360ac42a1b87b854bf23723b91757f0a0f8bff0 | 18,344 | py | Python | scalpel/pycg/processing/base.py | StarWatch27/Scalpel | 8853e6e84f318f3cfeda0e03d274748b2fbe30fa | [
"Apache-2.0"
] | 1 | 2022-01-12T06:00:32.000Z | 2022-01-12T06:00:32.000Z | scalpel/pycg/processing/base.py | StarWatch27/Scalpel | 8853e6e84f318f3cfeda0e03d274748b2fbe30fa | [
"Apache-2.0"
] | null | null | null | scalpel/pycg/processing/base.py | StarWatch27/Scalpel | 8853e6e84f318f3cfeda0e03d274748b2fbe30fa | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2020 Vitalis Salis.
#
# 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, Vers... | 37.590164 | 97 | 0.581607 |
0360b1ae8e98b41bc226fc0c3b1044de4b612474 | 20 | py | Python | src/test/tinc/tinctest/test/dryrun/__init__.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | 9 | 2018-04-20T03:31:01.000Z | 2020-05-13T14:10:53.000Z | src/test/tinc/tinctest/test/dryrun/__init__.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | 36 | 2017-09-21T09:12:27.000Z | 2020-06-17T16:40:48.000Z | src/test/tinc/tinctest/test/dryrun/__init__.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | 32 | 2017-08-31T12:50:52.000Z | 2022-03-01T07:34:53.000Z | tests_run_count = 0
| 10 | 19 | 0.8 |
0360be02f33682f1ec8fc30f60ba1fc701902665 | 8,205 | py | Python | cogs/feature/analytics.py | Davidbeltran99/maffin | d4a80ff5e2a3623f04e871a8d08a0b12e764cf9d | [
"MIT"
] | 1 | 2019-12-30T04:49:02.000Z | 2019-12-30T04:49:02.000Z | cogs/feature/analytics.py | Davidbeltran99/maffin | d4a80ff5e2a3623f04e871a8d08a0b12e764cf9d | [
"MIT"
] | null | null | null | cogs/feature/analytics.py | Davidbeltran99/maffin | d4a80ff5e2a3623f04e871a8d08a0b12e764cf9d | [
"MIT"
] | 1 | 2021-01-09T20:12:04.000Z | 2021-01-09T20:12:04.000Z | from discord.ext import commands
import discord
# import asyncio
# import timeago
import datetime
import timedelta
import utils.db
from utils.checks import dev
import seaborn as sns
from matplotlib import pyplot as plt
import pandas as pd
import timeago
class analytics(commands.Cog):
def __init__(self, bot):
self... | 23.713873 | 147 | 0.665814 |
0360f627467769041cc26d32d82dfd3bb4ad4084 | 8,053 | py | Python | tests/database_api_tests.py | visshaljagtap/incubator-superset | c9c18011f3cbee144ef8f76568449a4b83325773 | [
"Apache-2.0"
] | 11 | 2018-01-16T16:52:12.000Z | 2020-06-12T12:17:03.000Z | tests/database_api_tests.py | visshaljagtap/incubator-superset | c9c18011f3cbee144ef8f76568449a4b83325773 | [
"Apache-2.0"
] | 67 | 2017-11-06T21:31:14.000Z | 2020-11-19T03:52:18.000Z | tests/database_api_tests.py | visshaljagtap/incubator-superset | c9c18011f3cbee144ef8f76568449a4b83325773 | [
"Apache-2.0"
] | 4 | 2018-01-31T00:11:50.000Z | 2019-12-26T04:11:52.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 u... | 36.771689 | 86 | 0.633056 |
0360fc5bde07eb87066dce91edd1577f481f0942 | 1,177 | py | Python | ii_irods/session.py | UtrechtUniversity/ii | 7d3899b4d6bbbf5a14be1d85296b3ea99ffe135b | [
"MIT"
] | null | null | null | ii_irods/session.py | UtrechtUniversity/ii | 7d3899b4d6bbbf5a14be1d85296b3ea99ffe135b | [
"MIT"
] | null | null | null | ii_irods/session.py | UtrechtUniversity/ii | 7d3899b4d6bbbf5a14be1d85296b3ea99ffe135b | [
"MIT"
] | null | null | null | import json
import os
import sys
from getpass import getpass
import irods.password_obfuscation
from irods.session import iRODSSession
from ii_irods.environment import get_config_filename, get_irodsA_filename
from ii_irods.utils import print_warning
def setup_session():
"""Use irods environment files to configure ... | 29.425 | 80 | 0.68819 |
03610ea49a08e91b69f11da65f44e6b4c69e6830 | 3,400 | py | Python | More/E00_Publications/Magazines/BuildOne.py | freder/PageBotExamples | eb4ced53a673b9376e8357afa9ea0795b022b13c | [
"Ruby",
"MIT"
] | 5 | 2020-06-20T22:01:23.000Z | 2021-08-06T04:39:50.000Z | More/E00_Publications/Magazines/BuildOne.py | freder/PageBotExamples | eb4ced53a673b9376e8357afa9ea0795b022b13c | [
"Ruby",
"MIT"
] | 5 | 2020-05-17T09:32:27.000Z | 2021-03-15T19:45:52.000Z | More/E00_Publications/Magazines/BuildOne.py | freder/PageBotExamples | eb4ced53a673b9376e8357afa9ea0795b022b13c | [
"Ruby",
"MIT"
] | 2 | 2021-02-25T19:07:45.000Z | 2022-01-09T21:14:06.000Z | # -----------------------------------------------------------------------------
#
# P A G E B O T E X A M P L E S
#
# Copyright (c) 2016+ Buro Petr van Blokland + Claudia Mens
# www.pagebot.io
# Licensed under MIT conditions
#
# Supporting DrawBot, www.drawbot.com
# Supporting Flat, xxyxyz.org/... | 33.009709 | 113 | 0.692353 |
0361184cffd817a068ac2cf615134402c5a32667 | 1,904 | py | Python | foe_control.py | QwerTech/foe-automation | 9978cd365097a2c9ebec9039642c4e5f6c361018 | [
"MIT"
] | null | null | null | foe_control.py | QwerTech/foe-automation | 9978cd365097a2c9ebec9039642c4e5f6c361018 | [
"MIT"
] | 3 | 2021-09-08T02:13:20.000Z | 2022-03-12T00:36:40.000Z | foe_control.py | QwerTech/foe-automation | 9978cd365097a2c9ebec9039642c4e5f6c361018 | [
"MIT"
] | null | null | null | import logging
from random import randint
from time import sleep
import pyautogui
from foe_utils import checkIfPaused, randDur, lock, randSleepMs
# One might need to change these based on screen resolution
ydiff1 = 60
ydiff2 = -25
def pressEsc():
checkIfPaused()
randSleepMs()
pyautogui.typewrite(['esc'... | 22.939759 | 69 | 0.643908 |
03612d403c89248f56341da9f920a0f15fbd24d1 | 3,877 | py | Python | moto/config/responses.py | harveywi/moto | 3a5d857a60c3a2d140ed2c8adfe8dcaf71a4cac8 | [
"Apache-2.0"
] | null | null | null | moto/config/responses.py | harveywi/moto | 3a5d857a60c3a2d140ed2c8adfe8dcaf71a4cac8 | [
"Apache-2.0"
] | null | null | null | moto/config/responses.py | harveywi/moto | 3a5d857a60c3a2d140ed2c8adfe8dcaf71a4cac8 | [
"Apache-2.0"
] | null | null | null | import json
from moto.core.responses import BaseResponse
from .models import config_backends
class ConfigResponse(BaseResponse):
@property
def config_backend(self):
return config_backends[self.region]
def put_configuration_recorder(self):
self.config_backend.put_configuration_recorder(se... | 44.563218 | 140 | 0.687387 |
03613e13ce7e940f16566d96f989163bbb876760 | 730 | py | Python | services/echo/service.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | 3 | 2017-10-28T11:28:38.000Z | 2018-09-12T09:47:00.000Z | services/echo/service.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | null | null | null | services/echo/service.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | null | null | null | class EchoService(object):
def __init__(self, game):
self.game = game
self.messages = []
def _echo(self, message, context=None):
if context:
self.messages.append(message.do(context) + "\n")
else:
self.messages.append(message + "\n")
def see(self, act... | 28.076923 | 60 | 0.593151 |
03614b5967e7cfeca0fc6343f243896d85b651cf | 751 | py | Python | pypipet/cli/init.py | pypipet/pypipet | 8c489e4a7992281fbb68b12e2627decf24f2facb | [
"MIT"
] | null | null | null | pypipet/cli/init.py | pypipet/pypipet | 8c489e4a7992281fbb68b12e2627decf24f2facb | [
"MIT"
] | null | null | null | pypipet/cli/init.py | pypipet/pypipet | 8c489e4a7992281fbb68b12e2627decf24f2facb | [
"MIT"
] | 1 | 2021-12-10T22:36:34.000Z | 2021-12-10T22:36:34.000Z | import click
from .cli import cli
@cli.command()
@click.argument("project_name")
@click.pass_context
def new(ctx,project_name):
"""
create new project
"""
click.echo('initialize project: {}'.format(project_name))
res = ctx.obj['project'].start_project(project_name)
if not res:
click.s... | 22.757576 | 62 | 0.640479 |
03614ed60cb20156b50a1f9e9d50deb7d9a6709d | 4,798 | py | Python | backend/register/forms.py | StichtingIAPC/swipe | d1ea35a40813d2d5e9cf9edde33148c0a825efc4 | [
"BSD-3-Clause-Clear"
] | null | null | null | backend/register/forms.py | StichtingIAPC/swipe | d1ea35a40813d2d5e9cf9edde33148c0a825efc4 | [
"BSD-3-Clause-Clear"
] | null | null | null | backend/register/forms.py | StichtingIAPC/swipe | d1ea35a40813d2d5e9cf9edde33148c0a825efc4 | [
"BSD-3-Clause-Clear"
] | null | null | null | from django import forms
from django.forms import Form, BoundField
from register.models import Register
class DenominationCountBoundField(BoundField):
def __init__(self, form, field, name):
super(DenominationCountBoundField, self).__init__(form, field, name)
self.currency = field.currency
... | 40.661017 | 111 | 0.59629 |
0361702e7af778176daed941d64e61198090daf2 | 4,365 | py | Python | tensorflow/compiler/tests/extract_image_patches_op_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/compiler/tests/extract_image_patches_op_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/compiler/tests/extract_image_patches_op_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.000Z | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 32.333333 | 80 | 0.590836 |
0361888fe5f748a74786eff36ec0fcb91f4a66f6 | 2,502 | py | Python | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01/models/file_task_step_update_parameters_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01/models/file_task_step_update_parameters_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01/models/file_task_step_update_parameters_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"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 ... | 42.40678 | 167 | 0.657074 |
036205c353da36fc4d8a3f264fadd0defca5931b | 748 | py | Python | scripts/codegov_compute_hours.py | GRG2/nist-software-scraper | 632134956921657c3238f6afc9bc1c6c0a2fc76e | [
"MIT"
] | 38 | 2016-12-08T12:47:52.000Z | 2022-03-18T20:01:13.000Z | scripts/codegov_compute_hours.py | GRG2/nist-software-scraper | 632134956921657c3238f6afc9bc1c6c0a2fc76e | [
"MIT"
] | 39 | 2017-10-19T20:41:08.000Z | 2021-06-28T19:04:39.000Z | scripts/codegov_compute_hours.py | GRG2/nist-software-scraper | 632134956921657c3238f6afc9bc1c6c0a2fc76e | [
"MIT"
] | 17 | 2017-11-22T10:58:16.000Z | 2021-09-29T17:41:09.000Z | #! /usr/bin/env python3
import argparse
import json
from scraper.util import compute_labor_hours, git_repo_to_sloc
parser = argparse.ArgumentParser(
description="Scrape code repositories for Code.gov / DOECode"
)
parser.add_argument(
"filename", type=str, help="Path to locally stored `code.json` file"
)
arg... | 22 | 72 | 0.692513 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.