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
4a0f91d65c4b102529c8a16845cd237a93da7ad2
925
py
Python
var/spack/repos/builtin/packages/r-mitml/package.py
HaochengLIU/spack
26e51ff1705a4d6234e2a0cf734f93f7f95df5cb
[ "ECL-2.0", "Apache-2.0", "MIT" ]
2
2018-11-27T03:39:44.000Z
2021-09-06T15:50:35.000Z
var/spack/repos/builtin/packages/r-mitml/package.py
HaochengLIU/spack
26e51ff1705a4d6234e2a0cf734f93f7f95df5cb
[ "ECL-2.0", "Apache-2.0", "MIT" ]
1
2019-01-11T20:11:52.000Z
2019-01-11T20:11:52.000Z
var/spack/repos/builtin/packages/r-mitml/package.py
HaochengLIU/spack
26e51ff1705a4d6234e2a0cf734f93f7f95df5cb
[ "ECL-2.0", "Apache-2.0", "MIT" ]
1
2020-10-14T14:20:17.000Z
2020-10-14T14:20:17.000Z
# Copyright 2013-2018 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RMitml(RPackage): """Provides tools for multiple imputation of missing data in multilevel ...
40.217391
76
0.709189
4a0f9240bf41e271ca534b89930ae31aa0b29b06
332
py
Python
devilery/delivery/ext/auth/models.py
Fernandes01/curso-flask
f5275d7217dd3cccdfef1eb3f873d4537cb0690d
[ "Unlicense" ]
null
null
null
devilery/delivery/ext/auth/models.py
Fernandes01/curso-flask
f5275d7217dd3cccdfef1eb3f873d4537cb0690d
[ "Unlicense" ]
null
null
null
devilery/delivery/ext/auth/models.py
Fernandes01/curso-flask
f5275d7217dd3cccdfef1eb3f873d4537cb0690d
[ "Unlicense" ]
null
null
null
from delivery.ext.db import db class User(db.Model): __tablename__ = "user" id = db.Column("id", db.Integer, primary_key=True) email = db.Column("email", db.Unicode, unique=True) passwd = db.Column("passwd", db.Unicode) admin = db.Column("admin", db.Boolean) def __repr__(self): retur...
25.538462
55
0.653614
4a0f95b37a7918f03fb6fa03235b78e0432871d6
17,572
py
Python
workflow.py
ken11/ML-Workflow-with-SageMaker-and-StepFunctions
83bf1671d2d4b3a5bec5b075fd9870e8ebea1402
[ "MIT" ]
2
2021-07-28T11:06:24.000Z
2021-09-22T02:07:32.000Z
workflow.py
ken11/ML-Workflow-with-SageMaker-and-StepFunctions
83bf1671d2d4b3a5bec5b075fd9870e8ebea1402
[ "MIT" ]
null
null
null
workflow.py
ken11/ML-Workflow-with-SageMaker-and-StepFunctions
83bf1671d2d4b3a5bec5b075fd9870e8ebea1402
[ "MIT" ]
null
null
null
from datetime import datetime, timedelta, timezone import argparse import boto3 import sagemaker import stepfunctions import yaml import time from sagemaker.processing import (ProcessingInput, ProcessingOutput, ScriptProcessor) from sagemaker.tensorflow.estimator import TensorFlow fro...
43.711443
163
0.619964
4a0f95e8594ee0e291e79ec9288e307bdef0fcf2
2,992
py
Python
plugins/filter/sudo_policy_for_unix_host_filters.py
llnagy76/ansible-privilege-manager
ca4fb68b58b1817a051c12ef06d759b2c4c1d63d
[ "Apache-2.0" ]
1
2020-10-26T19:34:04.000Z
2020-10-26T19:34:04.000Z
plugins/filter/sudo_policy_for_unix_host_filters.py
llnagy76/ansible-privilege-manager
ca4fb68b58b1817a051c12ef06d759b2c4c1d63d
[ "Apache-2.0" ]
1
2022-02-08T16:15:56.000Z
2022-02-13T19:52:43.000Z
plugins/filter/sudo_policy_for_unix_host_filters.py
llnagy76/ansible-privilege-manager
ca4fb68b58b1817a051c12ef06d759b2c4c1d63d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # Copyright (c) 2021, One Identity LLC # File: sudo_policy_for_unix_host_filters.py # Desc: Ansible filters for sudo_policy_for_unix_host role # Auth: Laszlo Nagy # Note: # -----------------------...
39.893333
105
0.492981
4a0f96ddce4a147355883206521618efe24538a0
1,323
py
Python
day3_orig/snmp_ex2.py
tgnelson/pynet-ons-feb19
c789e14812b90342f640f690e2717d36152487bc
[ "Apache-2.0" ]
null
null
null
day3_orig/snmp_ex2.py
tgnelson/pynet-ons-feb19
c789e14812b90342f640f690e2717d36152487bc
[ "Apache-2.0" ]
null
null
null
day3_orig/snmp_ex2.py
tgnelson/pynet-ons-feb19
c789e14812b90342f640f690e2717d36152487bc
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """ SNMP query all of the interfaces on the pynet-rtr1 using SNMPv3. Get the interface description and the in_octets/out_octets """ from __future__ import print_function, unicode_literals from getpass import getpass from snmp_helper import snmp_get_oid_v3, snmp_extract IFDESCR = '1.3.6.1.2.1.2.2....
30.767442
80
0.656841
4a0f9792641654235b049732b3e625e2dc2bed7f
3,243
py
Python
src/python/txtai/api/routers/embeddings.py
personx000/txtai
fa342a4f6a69fb1e2cea0e85e39915f055ee8503
[ "Apache-2.0" ]
1
2020-09-18T14:11:34.000Z
2020-09-18T14:11:34.000Z
src/python/txtai/api/routers/embeddings.py
aria1991/txtai
fa342a4f6a69fb1e2cea0e85e39915f055ee8503
[ "Apache-2.0" ]
null
null
null
src/python/txtai/api/routers/embeddings.py
aria1991/txtai
fa342a4f6a69fb1e2cea0e85e39915f055ee8503
[ "Apache-2.0" ]
null
null
null
""" Defines API paths for embeddings endpoints. """ from typing import List from fastapi import APIRouter, Body, HTTPException, Request from .. import application from ...app import ReadOnlyError router = APIRouter() @router.get("/search") def search(query: str, request: Request): """ Finds documents in t...
21.476821
86
0.63799
4a0f98e008cde55e46efac4e0d06ae778f49b5c8
3,950
py
Python
sdk/python/lib/pulumi/x/automation/_server.py
ynden/pulumi
f374b8a953817365e829da7142386f06229e5302
[ "Apache-2.0" ]
null
null
null
sdk/python/lib/pulumi/x/automation/_server.py
ynden/pulumi
f374b8a953817365e829da7142386f06229e5302
[ "Apache-2.0" ]
null
null
null
sdk/python/lib/pulumi/x/automation/_server.py
ynden/pulumi
f374b8a953817365e829da7142386f06229e5302
[ "Apache-2.0" ]
null
null
null
# Copyright 2016-2021, Pulumi 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 t...
37.980769
120
0.650633
4a0f9991e841855c8b9dfac856396d4eae89a828
825
py
Python
scripts/remove_bad_ttr_fits.py
davmre/sigvisa
91a1f163b8f3a258dfb78d88a07f2a11da41bd04
[ "BSD-3-Clause" ]
null
null
null
scripts/remove_bad_ttr_fits.py
davmre/sigvisa
91a1f163b8f3a258dfb78d88a07f2a11da41bd04
[ "BSD-3-Clause" ]
null
null
null
scripts/remove_bad_ttr_fits.py
davmre/sigvisa
91a1f163b8f3a258dfb78d88a07f2a11da41bd04
[ "BSD-3-Clause" ]
null
null
null
from sigvisa import Sigvisa from sigvisa.source.event import get_event from sigvisa.models.ttime import tt_predict import numpy as np runid=14 s = Sigvisa() query = "select f.evid, f.sta, f.fitid, fp.fpid, fp.phase, fp.arrival_time from sigvisa_coda_fit f, sigvisa_coda_fit_phase fp where f.fitid=fp.fitid and f.runid=...
31.730769
172
0.710303
4a0f99c86aacbda386f7cf475008f374d01467b1
1,075
py
Python
trac/upgrades/db35.py
DanVerh/trac_az
24ac877f9f43ad08372cb1d15a838d764d9e7df4
[ "BSD-3-Clause" ]
324
2015-01-07T05:30:52.000Z
2022-03-22T07:20:56.000Z
trac/upgrades/db35.py
DanVerh/trac_az
24ac877f9f43ad08372cb1d15a838d764d9e7df4
[ "BSD-3-Clause" ]
12
2017-03-24T23:24:55.000Z
2019-08-10T05:13:20.000Z
trac/upgrades/db35.py
DanVerh/trac_az
24ac877f9f43ad08372cb1d15a838d764d9e7df4
[ "BSD-3-Clause" ]
142
2015-01-12T09:30:28.000Z
2022-02-21T00:39:38.000Z
# -*- coding: utf-8 -*- # # Copyright (C) 2014-2021 Edgewall Software # 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 https://trac.edgewall.org/wiki/TracLicense. # # This software cons...
35.833333
67
0.634419
4a0f99d6d28dd32467a498d1b3a5dbbd5c495068
576
py
Python
ssig_site/base/migrations/0007_auto_20180322_1147.py
LeoMcA/103P_2018_team51
cca9e022456b1e2653f0b69420ea914661c39b27
[ "MIT" ]
null
null
null
ssig_site/base/migrations/0007_auto_20180322_1147.py
LeoMcA/103P_2018_team51
cca9e022456b1e2653f0b69420ea914661c39b27
[ "MIT" ]
61
2018-02-22T11:10:48.000Z
2022-03-11T23:20:25.000Z
ssig_site/base/migrations/0007_auto_20180322_1147.py
LeoMcA/103P_2018_team51
cca9e022456b1e2653f0b69420ea914661c39b27
[ "MIT" ]
2
2018-02-10T11:26:52.000Z
2018-02-21T12:14:36.000Z
# Generated by Django 2.0.2 on 2018-03-22 11:47 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('base', '0006_auto_20180315_1654'), ] operations = [ migrations.RenameField( model_name='event', old_name='descriptio...
23.04
47
0.574653
4a0f99eeb65e1d1a546ce030ae9f553675add5df
1,085
py
Python
etl/cleaner.py
FAST-PROJ/professor-virtual
f5c6d2db9ba0f5f00d7b6fdfa712c4d2c3b09020
[ "MIT" ]
null
null
null
etl/cleaner.py
FAST-PROJ/professor-virtual
f5c6d2db9ba0f5f00d7b6fdfa712c4d2c3b09020
[ "MIT" ]
null
null
null
etl/cleaner.py
FAST-PROJ/professor-virtual
f5c6d2db9ba0f5f00d7b6fdfa712c4d2c3b09020
[ "MIT" ]
null
null
null
#!/usr/bin/env python __author__ = "Mateus Ferreira" __copyright__ = "Copyright 2020, The FAST-PROJ Group" __credits__ = ["Mateus Ferreira"] __license__ = "MIT" __version__ = "1.0.0" __maintainer__ = "FAST-PROJ" __email__ = "#" __status__ = "Development" import re class Cleaner: def __init__(...
27.125
77
0.589862
4a0f9a333f3e471106544698ec90ec2026f97dcc
1,181
py
Python
examples/plot_shift_evoked.py
Anevar/mne-python
15b19ed6b9364ae4787f0df2fd7e689b3c0a30bb
[ "BSD-3-Clause" ]
2
2015-09-27T20:33:49.000Z
2020-04-22T19:10:56.000Z
examples/plot_shift_evoked.py
Anevar/mne-python
15b19ed6b9364ae4787f0df2fd7e689b3c0a30bb
[ "BSD-3-Clause" ]
null
null
null
examples/plot_shift_evoked.py
Anevar/mne-python
15b19ed6b9364ae4787f0df2fd7e689b3c0a30bb
[ "BSD-3-Clause" ]
1
2018-09-15T09:45:38.000Z
2018-09-15T09:45:38.000Z
""" ================================== Shifting time-scale in evoked data ================================== """ # Author: Mainak Jas <mainak@neuro.hut.fi> # # License: BSD (3-clause) print(__doc__) import matplotlib.pyplot as plt import mne from mne import fiff from mne.datasets import sample data_path = sample.da...
25.12766
61
0.638442
4a0f9adca0413414adcd3021dd15031703266db2
7,496
py
Python
tests/test_compile.py
rahulbahal7/restricted-python
c39cffe71dfc30630e946977735303d3a65b0383
[ "ZPL-2.1" ]
null
null
null
tests/test_compile.py
rahulbahal7/restricted-python
c39cffe71dfc30630e946977735303d3a65b0383
[ "ZPL-2.1" ]
null
null
null
tests/test_compile.py
rahulbahal7/restricted-python
c39cffe71dfc30630e946977735303d3a65b0383
[ "ZPL-2.1" ]
null
null
null
from RestrictedPython import compile_restricted from RestrictedPython import compile_restricted_eval from RestrictedPython import compile_restricted_exec from RestrictedPython import compile_restricted_single from RestrictedPython import CompileResult from RestrictedPython._compat import IS_PY2 from RestrictedPython._c...
32.310345
79
0.685699
4a0f9af70581dd969bb377340ab2b7ab1d85b8cc
18,043
py
Python
trax/data/tf_inputs_test.py
stjordanis/trax
517dc78174ff87c0b753b97247afc1408f8822fc
[ "Apache-2.0" ]
2
2020-12-01T08:40:17.000Z
2021-08-10T05:33:21.000Z
trax/data/tf_inputs_test.py
stjordanis/trax
517dc78174ff87c0b753b97247afc1408f8822fc
[ "Apache-2.0" ]
null
null
null
trax/data/tf_inputs_test.py
stjordanis/trax
517dc78174ff87c0b753b97247afc1408f8822fc
[ "Apache-2.0" ]
1
2020-11-01T11:22:54.000Z
2020-11-01T11:22:54.000Z
# coding=utf-8 # Copyright 2020 The Trax 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 a...
37.049281
97
0.679155
4a0f9ba2ef1190141c6cafa4dffaf435784457ea
5,669
py
Python
tests/changelog_extractor/test_md.py
sebix/packaging-utils
8e2b21220c18bbd396ffb84c80844cba0c954282
[ "0BSD" ]
4
2018-07-27T21:13:38.000Z
2022-03-31T14:31:59.000Z
tests/changelog_extractor/test_md.py
sebix/packaging-utils
8e2b21220c18bbd396ffb84c80844cba0c954282
[ "0BSD" ]
10
2019-07-06T15:46:46.000Z
2021-08-08T14:04:06.000Z
tests/changelog_extractor/test_md.py
sebix/packaging-utils
8e2b21220c18bbd396ffb84c80844cba0c954282
[ "0BSD" ]
1
2019-09-04T05:06:36.000Z
2019-09-04T05:06:36.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Jul 21 13:11:15 2019 @author: ele """ import unittest from packaging_utils.changelog_extractor.changelog_extractor import convert_base, convert_base_after, convert_markdown shodan_original = """ CHANGELOG ========= 1.14.0 ---------- * New command **s...
28.487437
118
0.663786
4a0f9c379e9021ebb17368f67fd0bf7f4a0ca296
6,038
py
Python
tests/test_logging.py
wakandan/pytorch-lightning
0228fba45a543ec7ebb5d74465c9b516b728e897
[ "Apache-2.0" ]
1
2019-12-29T18:55:12.000Z
2019-12-29T18:55:12.000Z
tests/test_logging.py
huntzhan/pytorch-lightning
db0587f15823a7ef49f953642abf35f3d73e8324
[ "Apache-2.0" ]
null
null
null
tests/test_logging.py
huntzhan/pytorch-lightning
db0587f15823a7ef49f953642abf35f3d73e8324
[ "Apache-2.0" ]
null
null
null
import os import pickle import numpy as np import torch from pytorch_lightning import Trainer from pytorch_lightning.testing import LightningTestModel from pytorch_lightning.logging import LightningLoggerBase, rank_zero_only import tests.utils as tutils def test_testtube_logger(): """ verify that basic func...
23.585938
73
0.661477
4a0f9c3fedd16990e11fe36e819f9e77c3f8f398
6,669
py
Python
results/migrations/0016_add_results_14_data.py
kinaklub/next.filmfest.by
b537c0d2dac4195e9e7b460c569007d20a5954e7
[ "Unlicense" ]
7
2016-07-18T07:37:37.000Z
2022-03-23T08:12:04.000Z
results/migrations/0016_add_results_14_data.py
kinaklub/next.filmfest.by
b537c0d2dac4195e9e7b460c569007d20a5954e7
[ "Unlicense" ]
119
2015-11-08T07:16:44.000Z
2022-03-11T23:25:53.000Z
results/migrations/0016_add_results_14_data.py
kinaklub/next.filmfest.by
b537c0d2dac4195e9e7b460c569007d20a5954e7
[ "Unlicense" ]
3
2016-07-21T17:22:31.000Z
2016-10-04T08:38:48.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os import json from itertools import chain from django.core.files import File from django.db import migrations from django.utils.text import slugify from cpm_generic.migration_utils import (add_subpage, get_content_type, ...
30.040541
78
0.62948
4a0f9d2958c0b867262f9493f3be9115fe98f4d3
7,871
py
Python
CHECLabPy/utils/resolutions.py
sstcam/CHECLabPy
c67bf0b190ba4b799d4da150591d602e16b1d6b0
[ "BSD-3-Clause" ]
4
2018-04-23T09:14:21.000Z
2019-05-02T22:12:47.000Z
CHECLabPy/utils/resolutions.py
watsonjj/CHECLabPy
c67bf0b190ba4b799d4da150591d602e16b1d6b0
[ "BSD-3-Clause" ]
28
2018-03-29T21:50:45.000Z
2019-11-12T07:51:01.000Z
CHECLabPy/utils/resolutions.py
watsonjj/CHECLabPy
c67bf0b190ba4b799d4da150591d602e16b1d6b0
[ "BSD-3-Clause" ]
16
2018-03-23T15:29:38.000Z
2019-07-24T12:19:51.000Z
import numpy as np import pandas as pd class ChargeResolution: def __init__(self, mc_true): """ Calculates the charge resolution with an efficient, low-memory, interative approach, allowing the contribution of data/events without reading the entire dataset into memory. Uti...
33.351695
79
0.590522
4a0f9df83bb819ae5fdcd244f785a5ab6ceb9beb
4,394
py
Python
src/main/python/rlbot/agents/executable_with_socket_agent.py
Arik/RLBot
80bed2af67a4979b25abba012ef84924e74bfbe1
[ "MIT" ]
3
2019-08-04T20:21:30.000Z
2019-09-23T14:06:14.000Z
src/main/python/rlbot/agents/executable_with_socket_agent.py
Arik/RLBot
80bed2af67a4979b25abba012ef84924e74bfbe1
[ "MIT" ]
null
null
null
src/main/python/rlbot/agents/executable_with_socket_agent.py
Arik/RLBot
80bed2af67a4979b25abba012ef84924e74bfbe1
[ "MIT" ]
1
2019-09-02T06:48:33.000Z
2019-09-02T06:48:33.000Z
import os import socket import time import psutil from rlbot.agents.base_independent_agent import BaseIndependentAgent from rlbot.botmanager.helper_process_request import HelperProcessRequest from rlbot.utils.logging_utils import get_logger from rlbot.utils.structures import game_interface from rlbot.utils.structures....
41.847619
115
0.645198
4a0f9f79e017dc658686c8cfad5e5f37268291ac
22,454
py
Python
kumex/marke_data/market_data.py
grape-cola/kumex-python-sdk-1
d43b15ff1c002d65fc68ea12d21ec32b49cf18fd
[ "MIT" ]
14
2019-10-12T08:01:11.000Z
2021-11-16T23:48:52.000Z
kumex/marke_data/market_data.py
grape-cola/kumex-python-sdk-1
d43b15ff1c002d65fc68ea12d21ec32b49cf18fd
[ "MIT" ]
2
2020-03-23T18:14:20.000Z
2021-08-28T05:28:55.000Z
kumex/marke_data/market_data.py
grape-cola/kumex-python-sdk-1
d43b15ff1c002d65fc68ea12d21ec32b49cf18fd
[ "MIT" ]
6
2019-10-12T07:09:51.000Z
2021-07-13T16:16:13.000Z
from kumex.base_request.base_request import KumexBaseRestApi class MarketData(KumexBaseRestApi): def get_server_timestamp(self): """ https://docs.kumex.com/#server-time get server timestamp :return: 1570609496404 """ return self._request('GET', '/api/v1/timestamp'...
41.428044
227
0.515632
4a0fa08d8c09fbb77843ecdc1bb2906eab66a045
314
py
Python
packages/micropython-official/v1.9.4/esp32/stubs/websocket_helper.py
TheVinhLuong102/micropy-stubs
55ff1773008f7c4dfc3d70a403986486226eb6b3
[ "MIT" ]
18
2019-07-11T13:31:09.000Z
2022-01-27T06:38:40.000Z
packages/micropython-official/v1.9.4/esp32/stubs/websocket_helper.py
TheVinhLuong102/micropy-stubs
55ff1773008f7c4dfc3d70a403986486226eb6b3
[ "MIT" ]
9
2019-09-01T21:44:49.000Z
2022-02-04T20:55:08.000Z
packages/micropython-official/v1.9.4/esp32/stubs/websocket_helper.py
TheVinhLuong102/micropy-stubs
55ff1773008f7c4dfc3d70a403986486226eb6b3
[ "MIT" ]
6
2019-10-08T05:31:21.000Z
2021-04-22T10:21:01.000Z
""" Module: 'websocket_helper' on esp32 1.9.4 """ # MCU: (sysname='esp32', nodename='esp32', release='1.9.4', version='v1.9.4 on 2018-05-11', machine='ESP32 module with ESP32') # Stubber: 1.2.0 DEBUG = 0 binascii = None def client_handshake(): pass hashlib = None def server_handshake(): pass sys = None
19.625
126
0.66879
4a0fa13dac1d762f4ba974acfab969df08dfe692
4,378
py
Python
rocketsled/asset.py
luhn/rocketsled
73924aa0c409787cbfb0ce1d3a335a99a07d3311
[ "MIT" ]
null
null
null
rocketsled/asset.py
luhn/rocketsled
73924aa0c409787cbfb0ce1d3a335a99a07d3311
[ "MIT" ]
null
null
null
rocketsled/asset.py
luhn/rocketsled
73924aa0c409787cbfb0ce1d3a335a99a07d3311
[ "MIT" ]
null
null
null
import sys import re import os.path from io import BytesIO from gzip import GzipFile import mimetypes import hashlib from base64 import urlsafe_b64encode as b64encode # Python 2/3 imports if sys.version_info[0] < 3: from urllib import unquote from urlparse import urlsplit else: from urllib.parse import unq...
26.059524
76
0.554363
4a0fa1a0c3c15cf05e82c41a695c2a84f1710ab5
3,785
py
Python
src/core/settings.py
pzandre/django-blog
8d37071a4c2eae91066c29713407fc5b929edb96
[ "MIT" ]
null
null
null
src/core/settings.py
pzandre/django-blog
8d37071a4c2eae91066c29713407fc5b929edb96
[ "MIT" ]
null
null
null
src/core/settings.py
pzandre/django-blog
8d37071a4c2eae91066c29713407fc5b929edb96
[ "MIT" ]
null
null
null
""" Django settings for core project. Generated by 'django-admin startproject' using Django 3.1.7. For more information on this file, see https://docs.djangoproject.com/en/3.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.1/ref/settings/ """ import os from ...
25.066225
91
0.683223
4a0fa1f389cf2c015715b5d6fe7837c3b24a4992
513
py
Python
cmsplugin_image_rollover/cms_plugins.py
divio/cmsplugin-image-rollover
5434297c25facac81247f2ccc865b83b2f202d0e
[ "BSD-3-Clause" ]
null
null
null
cmsplugin_image_rollover/cms_plugins.py
divio/cmsplugin-image-rollover
5434297c25facac81247f2ccc865b83b2f202d0e
[ "BSD-3-Clause" ]
null
null
null
cmsplugin_image_rollover/cms_plugins.py
divio/cmsplugin-image-rollover
5434297c25facac81247f2ccc865b83b2f202d0e
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.utils.translation import ugettext as _ from cms.plugin_base import CMSPluginBase from cms.plugin_pool import plugin_pool from cms.models import CMSPlugin class RolloverPlugin(CMSPluginBase): model = CMSPlugin name = _("Image rollo...
24.428571
66
0.783626
4a0fa28f7effa12830316b8cac4f84ffc4e59d52
1,406
py
Python
burrolib/processes/hawkes_process.py
kosmitive/burro
cc6662bef8693a1c160e80d9482371620deb5304
[ "MIT" ]
5
2020-06-25T23:00:26.000Z
2020-08-28T02:51:28.000Z
burrolib/processes/hawkes_process.py
kosmitive/burrolib
2b1d690ec9c9371f5b455dd98439dce51d270909
[ "MIT" ]
5
2020-11-09T11:43:42.000Z
2021-01-09T13:15:09.000Z
burrolib/processes/hawkes_process.py
kosmitive/burrolib
2b1d690ec9c9371f5b455dd98439dce51d270909
[ "MIT" ]
null
null
null
import numpy as np from burrolib.processes.discrete_point_process import DiscretePointProcess from burrolib.util.type_checking import is_lambda class HawkesProcess(DiscretePointProcess): """Types of hawkes processes.""" HOMOGENEOUS = 1 INHOMOGENEOUS = 2 def __init__(self, intensity): """Cr...
24.666667
74
0.555477
4a0fa3472b6e445d196f8ef9d8d9a92607463a56
22,712
py
Python
scene/scene.py
sometimescasey/pca_animations
acad802d7273571e47956f74b149b3e78148179f
[ "MIT" ]
1
2020-12-02T02:19:03.000Z
2020-12-02T02:19:03.000Z
scene/scene.py
sometimescasey/pca_animations
acad802d7273571e47956f74b149b3e78148179f
[ "MIT" ]
null
null
null
scene/scene.py
sometimescasey/pca_animations
acad802d7273571e47956f74b149b3e78148179f
[ "MIT" ]
null
null
null
import inspect import itertools as it import numpy as np import os import random import shutil import subprocess as sp import warnings from tqdm import tqdm as ProgressDisplay from constants import * from animation.animation import Animation from animation.transform import MoveToTarget from camera.camera import Cam...
35.4875
113
0.61593
4a0fa396a19248edd907d16fc0716706f5465bc8
1,138
py
Python
mars/dataframe/reduction/cummax.py
hxri/mars
f7864f00911883b94800b63856f0e57648d3d9b4
[ "Apache-2.0" ]
2,413
2018-12-06T09:37:11.000Z
2022-03-30T15:47:39.000Z
mars/dataframe/reduction/cummax.py
hxri/mars
f7864f00911883b94800b63856f0e57648d3d9b4
[ "Apache-2.0" ]
1,335
2018-12-07T03:06:18.000Z
2022-03-31T11:45:57.000Z
mars/dataframe/reduction/cummax.py
hxri/mars
f7864f00911883b94800b63856f0e57648d3d9b4
[ "Apache-2.0" ]
329
2018-12-07T03:12:41.000Z
2022-03-29T21:49:57.000Z
# Copyright 1999-2021 Alibaba Group Holding 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.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
37.933333
83
0.760984
4a0fa3a884cefc45f9a564bcd9ca112a1e42c254
1,740
py
Python
tests/test_formats_sqlite.py
ownport/filemeta
0e96abdd71a93c10d1f752b1c3532018297990dd
[ "MIT" ]
1
2018-05-07T06:07:41.000Z
2018-05-07T06:07:41.000Z
tests/test_formats_sqlite.py
ownport/filemeta
0e96abdd71a93c10d1f752b1c3532018297990dd
[ "MIT" ]
7
2017-09-17T19:18:12.000Z
2021-03-21T08:52:19.000Z
tests/test_formats_sqlite.py
ownport/filemeta
0e96abdd71a93c10d1f752b1c3532018297990dd
[ "MIT" ]
null
null
null
import json import pytest from filetools.formats.sqlite import Metastore, SQLiteDatabase RECORD = { 'sha256': '5b78afc1c065a1eecbbdb847a30cb1bea163a6ec4a2a8225fd3ca1eb2f952536', 'path': 'tests/resourses/data.file', 'name': 'data.file', 'ext': '.file', 'size': 17079235, 'tags': json.dumps(['te...
25.217391
101
0.608621
4a0fa3ca3d45186ac1353631e9fa6b0993a396f3
7,802
py
Python
tests/garage/tf/policies/test_gaussian_mlp_policy_with_model_transit.py
mark-koren/garage
a5feda84d8a226225ff6148542b4e53ff4bd0fb5
[ "MIT" ]
1
2020-01-05T14:57:43.000Z
2020-01-05T14:57:43.000Z
tests/garage/tf/policies/test_gaussian_mlp_policy_with_model_transit.py
lywong92/garage
96cb8887fcae90531a645d540653010e7fe10fcc
[ "MIT" ]
null
null
null
tests/garage/tf/policies/test_gaussian_mlp_policy_with_model_transit.py
lywong92/garage
96cb8887fcae90531a645d540653010e7fe10fcc
[ "MIT" ]
null
null
null
""" Unit test for GaussianMLPPolicyWithModel. This test consists of four different GaussianMLPPolicy: P1, P2, P3 and P4. P1 and P2 are from GaussianMLPPolicy, which does not use garage.tf.models.GaussianMLPModel while P3 and P4 do use. This test ensures the outputs from all the policies are the same, for the transiti...
42.868132
79
0.673289
4a0fa565b4df549d0c2c48c15499b4d086d24435
237
py
Python
setup.py
jupyterjazz/wordninja
0f7c909c9e20c117bc5fa445b0ab50fb854e84f1
[ "MIT" ]
3
2021-11-24T21:41:03.000Z
2021-11-27T13:49:02.000Z
setup.py
jupyterjazz/wordninja
0f7c909c9e20c117bc5fa445b0ab50fb854e84f1
[ "MIT" ]
1
2021-11-27T12:55:32.000Z
2021-11-27T13:51:58.000Z
setup.py
jupyterjazz/wordninja
0f7c909c9e20c117bc5fa445b0ab50fb854e84f1
[ "MIT" ]
1
2021-11-27T13:52:09.000Z
2021-11-27T13:52:09.000Z
from setuptools import setup setup(name='wordninja', version="0.1.0", packages = ['wordninja'], package_dir={'wordninja': 'wordninja'}, package_data={'wordninja': ['models/default_model.txt.gz']}, include_package_data=True, )
23.7
62
0.708861
4a0fa5e0aa2daf5d94eb4945bf13b870635ed995
18,818
py
Python
log_complete/model_215.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_complete/model_215.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_complete/model_215.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
# exported from PySB model 'model' from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD Model() Monomer('Ligand', ['Receptor']) Monomer('ParpU', ['C3A']) Monomer('C8A', ['BidU', 'C3pro']) Monomer('SmacM', ['BaxA']) Monomer('BaxM', ['BidM', '...
91.349515
710
0.806515
4a0fa6911e7ebecfe0eeb260b447f1530d4054b1
879
py
Python
tests/factories.py
wroberts/annotator
0a1ddaab417676f83723588613c1782fad938a8d
[ "BSD-3-Clause" ]
1
2020-09-16T07:47:49.000Z
2020-09-16T07:47:49.000Z
tests/factories.py
wroberts/annotator
0a1ddaab417676f83723588613c1782fad938a8d
[ "BSD-3-Clause" ]
37
2017-10-14T17:30:04.000Z
2021-01-03T17:44:37.000Z
tests/factories.py
wroberts/annotator
0a1ddaab417676f83723588613c1782fad938a8d
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Factories to help in tests.""" from datetime import datetime from factory import LazyFunction, Sequence from factory.alchemy import SQLAlchemyModelFactory from annotator.database import db from annotator.user.models import User class BaseFactory(SQLAlchemyModelFactory): """Base factor...
23.756757
63
0.67463
4a0fa69ac4e44ee0466186a0c994f8e7f4b9def7
5,571
py
Python
training/ModelXGBoost.py
grimmlab/HorticulturalSalesPredictions
92d582623a278c938d1674b154e370ed43482248
[ "MIT" ]
null
null
null
training/ModelXGBoost.py
grimmlab/HorticulturalSalesPredictions
92d582623a278c938d1674b154e370ed43482248
[ "MIT" ]
null
null
null
training/ModelXGBoost.py
grimmlab/HorticulturalSalesPredictions
92d582623a278c938d1674b154e370ed43482248
[ "MIT" ]
null
null
null
import xgboost as xgb import pandas as pd import numpy as np import copy from training import ModelsBaseClass class XGBoostRegression(ModelsBaseClass.BaseModel): """Class containing XGBoost Regression Model""" def __init__(self, target_column: str, seasonal_periods: int, tree_meth: str = 'auto', learning_rat...
51.110092
119
0.652486
4a0fa7bf1a316607b63010aac5ab3ccbcc73bff7
9,663
py
Python
openff/evaluator/tests/test_protocols/test_yank.py
lilyminium/openff-evaluator
21da54363009d83110b54d57e4416ae31df3868b
[ "MIT" ]
null
null
null
openff/evaluator/tests/test_protocols/test_yank.py
lilyminium/openff-evaluator
21da54363009d83110b54d57e4416ae31df3868b
[ "MIT" ]
null
null
null
openff/evaluator/tests/test_protocols/test_yank.py
lilyminium/openff-evaluator
21da54363009d83110b54d57e4416ae31df3868b
[ "MIT" ]
null
null
null
""" Units tests for openff.evaluator.protocols.yank """ import os import tempfile import mdtraj import numpy as np import pytest from openff.evaluator import unit from openff.evaluator.backends import ComputeResources from openff.evaluator.forcefield import ParameterGradientKey from openff.evaluator.protocols.coordin...
34.265957
88
0.684156
4a0fa81523832d7f43e902aedf8d905a0e8efc02
7,349
py
Python
targeting_oligo_design_app/orbit_tools.py
scott-saunders/orbit
50d9d01e0578168bee3850d4fd26ca5782db2820
[ "MIT" ]
null
null
null
targeting_oligo_design_app/orbit_tools.py
scott-saunders/orbit
50d9d01e0578168bee3850d4fd26ca5782db2820
[ "MIT" ]
null
null
null
targeting_oligo_design_app/orbit_tools.py
scott-saunders/orbit
50d9d01e0578168bee3850d4fd26ca5782db2820
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np import holoviews as hv import panel as pn #from functions import * from Bio.Seq import Seq from Bio.SeqIO import parse from bokeh.models import BasicTickFormatter from holoviews import opts def get_replichore(pos, ori = 3923882.5, ter = 1590250.5 ): """ Determine th...
39.090426
161
0.635052
4a0fa84aedf1bb46143122f7829a716544ea45da
2,006
py
Python
twint/user.py
3nws/twint
5555c69eb711636adf5ede16c5665fbece2d83c3
[ "MIT" ]
null
null
null
twint/user.py
3nws/twint
5555c69eb711636adf5ede16c5665fbece2d83c3
[ "MIT" ]
null
null
null
twint/user.py
3nws/twint
5555c69eb711636adf5ede16c5665fbece2d83c3
[ "MIT" ]
null
null
null
import datetime import logging as logme class user: type = "user" def __init__(self): pass User_formats = { 'join_date': '%Y-%m-%d', 'join_time': '%H:%M:%S %Z' } # ur object must be a json from the endpoint https://api.twitter.com/graphql def User(ur): logme.debug(__name__ + ':User') ...
37.849057
98
0.611167
4a0fa8ba7d089a8b08e178ac04636cdcb4e0add1
4,322
py
Python
warrant/__init__.py
warrant-dev/warrant-python
484e8081f3fa61677105f56fa4768d64f96fdb4a
[ "MIT" ]
null
null
null
warrant/__init__.py
warrant-dev/warrant-python
484e8081f3fa61677105f56fa4768d64f96fdb4a
[ "MIT" ]
null
null
null
warrant/__init__.py
warrant-dev/warrant-python
484e8081f3fa61677105f56fa4768d64f96fdb4a
[ "MIT" ]
null
null
null
import requests import json __version__ = "0.2.1" API_ENDPOINT = "https://api.warrant.dev" API_VERSION = "/v1" class WarrantException(Exception): def __init__(self, msg, status_code=-1): if status_code == -1: message = 'Warrant error: ' + msg else: message = f"Warrant erro...
37.912281
106
0.597409
4a0fa9e51a3e81480dece5d7980ef48a12897774
5,937
py
Python
hummingbot/strategy/avellaneda_market_making/start.py
phbrgnomo/hummingbot
72382954a06a277248f44b321344186aef1c367c
[ "Apache-2.0" ]
1
2021-07-01T20:56:32.000Z
2021-07-01T20:56:32.000Z
hummingbot/strategy/avellaneda_market_making/start.py
phbrgnomo/hummingbot
72382954a06a277248f44b321344186aef1c367c
[ "Apache-2.0" ]
null
null
null
hummingbot/strategy/avellaneda_market_making/start.py
phbrgnomo/hummingbot
72382954a06a277248f44b321344186aef1c367c
[ "Apache-2.0" ]
1
2021-10-12T15:40:43.000Z
2021-10-12T15:40:43.000Z
from typing import ( List, Tuple, ) from hummingbot import data_path import os.path from hummingbot.client.hummingbot_application import HummingbotApplication from hummingbot.strategy.market_trading_pair_tuple import MarketTradingPairTuple from hummingbot.strategy.hanging_orders_tracker import HangingOrdersAgg...
56.009434
137
0.716523
4a0fab0db78df078b4210f40f8dcf34818b0aa1c
3,118
py
Python
tests/test_imputations/test_mice_imputer.py
kearnz/autoimpute
a214e7ad2c664cd6c57843934ebf159067d6261f
[ "MIT" ]
191
2019-03-16T17:00:33.000Z
2022-03-11T12:14:17.000Z
tests/test_imputations/test_mice_imputer.py
kearnz/autoimpute
a214e7ad2c664cd6c57843934ebf159067d6261f
[ "MIT" ]
57
2019-03-09T23:59:38.000Z
2022-03-01T08:17:33.000Z
tests/test_imputations/test_mice_imputer.py
kearnz/autoimpute
a214e7ad2c664cd6c57843934ebf159067d6261f
[ "MIT" ]
19
2019-04-13T19:01:23.000Z
2021-05-14T08:59:27.000Z
"""Tests written to ensure the MiceImputer in the imputations package works. Note that this also tests the MultipleImputer, which really just passes to the SingleImputer. SingleImputer has tests, some of which are the same as here. Tests use the pytest library. The tests in this module ensure the following: - `test_st...
44.542857
79
0.692752
4a0faba9239bef91fc3a60d6211e34ff02eb9369
406
py
Python
invenio_cli/version.py
cenouralm/invenio-cli
0af8b1aad98f0fe9ef7ef73c4a431cf5900db8a6
[ "MIT" ]
null
null
null
invenio_cli/version.py
cenouralm/invenio-cli
0af8b1aad98f0fe9ef7ef73c4a431cf5900db8a6
[ "MIT" ]
null
null
null
invenio_cli/version.py
cenouralm/invenio-cli
0af8b1aad98f0fe9ef7ef73c4a431cf5900db8a6
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (C) 2019-2020 CERN. # Copyright (C) 2019-2020 Northwestern University. # # Invenio-Cli is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Version information for Invenio-Cli. This file is imported...
25.375
72
0.70936
4a0fabf28da7252d72c03df6ff2609e61b2db576
33,652
py
Python
python_modules/dagster/dagster_tests/core_tests/definitions_tests/test_decorators.py
basilvetas/dagster
b08f5534a0b0277dab38cb7b6a46d324e94b8940
[ "Apache-2.0" ]
2
2021-06-21T17:50:26.000Z
2021-06-21T19:14:23.000Z
python_modules/dagster/dagster_tests/core_tests/definitions_tests/test_decorators.py
basilvetas/dagster
b08f5534a0b0277dab38cb7b6a46d324e94b8940
[ "Apache-2.0" ]
null
null
null
python_modules/dagster/dagster_tests/core_tests/definitions_tests/test_decorators.py
basilvetas/dagster
b08f5534a0b0277dab38cb7b6a46d324e94b8940
[ "Apache-2.0" ]
1
2021-08-18T17:21:57.000Z
2021-08-18T17:21:57.000Z
# encoding: utf-8 # py27 compat import re from datetime import datetime, time import pendulum import pytest from dagster import ( Any, DagsterInvalidDefinitionError, DagsterInvariantViolationError, DependencyDefinition, Field, InputDefinition, Output, OutputDefinition, PipelineDefi...
32.863281
162
0.62662
4a0fad41bcf4be3cd578e16efbd94e9cd33e6222
315
py
Python
exercises/CursoemVideo/ex022.py
arthurguerra/cursoemvideo-python
37f45ec25f422673fa9bbeee682e098f14d8ceab
[ "MIT" ]
null
null
null
exercises/CursoemVideo/ex022.py
arthurguerra/cursoemvideo-python
37f45ec25f422673fa9bbeee682e098f14d8ceab
[ "MIT" ]
null
null
null
exercises/CursoemVideo/ex022.py
arthurguerra/cursoemvideo-python
37f45ec25f422673fa9bbeee682e098f14d8ceab
[ "MIT" ]
null
null
null
nome = str(input('Digite seu nome: ')) print('Maiúscula: {}.'.format(nome.upper())) print('Minúscula: {}.'.format(nome.lower())) print('Total de letras: {}.'.format(len(nome) - nome.count(' '))) dividido = nome.split() print('O seu primeiro nome é {} e possui {} letras.'.format(dividido[0], len(dividido[0])))
28.636364
91
0.64127
4a0fadb2b1fd2acc57bd20a682e09827646a65d8
14
py
Python
songs/src/tests/utils/__init__.py
macieyn/moje-357
5148cbaf893d58675de14060abccacfa57e8b8ce
[ "MIT" ]
1
2021-08-05T11:02:44.000Z
2021-08-05T11:02:44.000Z
songs/src/tests/utils/__init__.py
macieyn/moje-357
5148cbaf893d58675de14060abccacfa57e8b8ce
[ "MIT" ]
null
null
null
songs/src/tests/utils/__init__.py
macieyn/moje-357
5148cbaf893d58675de14060abccacfa57e8b8ce
[ "MIT" ]
null
null
null
# Entry point
7
13
0.714286
4a0fb03cb67f43b5348628c6dc07f3dfe9791359
1,808
py
Python
meow/webs/templates.py
aachurin/meow.webs
b3acb92234ba64f40bc7a7947ca2216544ae116a
[ "MIT" ]
null
null
null
meow/webs/templates.py
aachurin/meow.webs
b3acb92234ba64f40bc7a7947ca2216544ae116a
[ "MIT" ]
null
null
null
meow/webs/templates.py
aachurin/meow.webs
b3acb92234ba64f40bc7a7947ca2216544ae116a
[ "MIT" ]
null
null
null
import typing from . import App, Settings, Component try: import jinja2 except ImportError: # pragma: nocover jinja2 = None # type: ignore class Templates: def render(self, path: str, **context: object) -> str: raise NotImplementedError() class JinjaTemplates(Templates): def __init__(sel...
33.481481
85
0.631637
4a0fb077032899ece87917bac7bb4bd13a401eb0
4,068
py
Python
yahoo_finance.py
michaelmu/historical_returns
8be99f02865e2dd599ae526a5f3b7fd45177f90e
[ "Apache-2.0" ]
null
null
null
yahoo_finance.py
michaelmu/historical_returns
8be99f02865e2dd599ae526a5f3b7fd45177f90e
[ "Apache-2.0" ]
null
null
null
yahoo_finance.py
michaelmu/historical_returns
8be99f02865e2dd599ae526a5f3b7fd45177f90e
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function import datetime import requests import numpy as np import pandas as pd import time import io import re from sqlite_cache import SqliteCache class YahooFinance(object): _url = ("https://query1.finance.yahoo.com/v7/finance/download/{ticker}" "?period1={start}&peri...
38.018692
107
0.58235
4a0fb07c9d57946a14dd500f47147bc1471a0b2f
2,277
py
Python
dev_cmds.py
trishume/VintageousPlus
1dd62435138234979fe5bb413e1731119b017daf
[ "MIT" ]
6
2017-04-01T05:30:08.000Z
2017-04-05T14:17:40.000Z
dev_cmds.py
trishume/VintageousPlus
1dd62435138234979fe5bb413e1731119b017daf
[ "MIT" ]
1
2017-04-04T06:47:13.000Z
2017-04-04T14:26:32.000Z
dev_cmds.py
trishume/VintageousPlus
1dd62435138234979fe5bb413e1731119b017daf
[ "MIT" ]
null
null
null
import sublime import sublime_plugin import os def find_project_path(path): while True: if not path or os.path.exists(os.path.join(path, 'VintageousPlus.sublime-project')): return path path = os.path.dirname(path) class RunTestsForActiveViewCommand(sublime_plugin.Wi...
30.36
95
0.570048
4a0fb0d82f43a1fd3274306c2da92455d5e446b2
1,931
py
Python
extensions/issues/base.py
tjinjoy/oppia
ed5ccbd95e42078457d40dde1dda02f1ae6a4354
[ "Apache-2.0" ]
2
2021-04-08T01:06:08.000Z
2021-06-02T08:20:13.000Z
extensions/issues/base.py
gitter-badger/oppia
7d8e659264582d7ce74bc6c139e597b82bca0e04
[ "Apache-2.0" ]
35
2019-02-23T20:31:21.000Z
2019-08-19T12:32:13.000Z
extensions/issues/base.py
gitter-badger/oppia
7d8e659264582d7ce74bc6c139e597b82bca0e04
[ "Apache-2.0" ]
1
2021-01-28T05:20:56.000Z
2021-01-28T05:20:56.000Z
# coding: utf-8 # # Copyright 2018 The Oppia 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 requi...
34.482143
78
0.694977
4a0fb1c8d439abb7cb69b7d9ce9619c40cc32435
5,147
py
Python
falcon_helpers/tests/test_middlewares/test_parse_jwt.py
nZac/falcon-helpers
a5b3efa40de38867a572d80d958414fa8d303293
[ "BSD-3-Clause" ]
null
null
null
falcon_helpers/tests/test_middlewares/test_parse_jwt.py
nZac/falcon-helpers
a5b3efa40de38867a572d80d958414fa8d303293
[ "BSD-3-Clause" ]
null
null
null
falcon_helpers/tests/test_middlewares/test_parse_jwt.py
nZac/falcon-helpers
a5b3efa40de38867a572d80d958414fa8d303293
[ "BSD-3-Clause" ]
null
null
null
import pathlib import falcon import falcon.testing import jwt import pytest from falcon_helpers.middlewares.parsejwt import ParseJWTMiddleware as MW from falcon_helpers.config import ConfigurationError @pytest.fixture(scope='module') def rsa_priv_key(): p = pathlib.Path(__file__).parent.parent.joinpath('files',...
29.244318
97
0.664659
4a0fb378293348c370dee16a30273e40435a1cf5
753
py
Python
sample-code/post-message-to-channel.py
kirmar/delaysay
9cba01d9840ddb1ba35430cc709608256134b798
[ "Apache-2.0" ]
null
null
null
sample-code/post-message-to-channel.py
kirmar/delaysay
9cba01d9840ddb1ba35430cc709608256134b798
[ "Apache-2.0" ]
2
2022-01-19T11:20:06.000Z
2022-01-19T11:34:32.000Z
sample-code/post-message-to-channel.py
kirmar/delaysay
9cba01d9840ddb1ba35430cc709608256134b798
[ "Apache-2.0" ]
null
null
null
import os import slack import boto3 slack_token_name = os.environ["SLACK_API_TOKEN_NAME"] slack_channel_id = os.environ["SLACK_CHANNEL_ID"] ssm_client = boto3.client('ssm') parameter = ssm_client.get_parameter( Name=slack_token_name, WithDecryption=True ) slack_token = parameter['Parameter']['Value'] slack_c...
24.290323
57
0.730412
4a0fb3a67cd4e10c09e83da69af401ade473939f
3,096
py
Python
app.py
Nomad95/spotify-leds
2774a4a66c6e2a38950875d48047d52f6c8403a9
[ "MIT" ]
null
null
null
app.py
Nomad95/spotify-leds
2774a4a66c6e2a38950875d48047d52f6c8403a9
[ "MIT" ]
null
null
null
app.py
Nomad95/spotify-leds
2774a4a66c6e2a38950875d48047d52f6c8403a9
[ "MIT" ]
null
null
null
from flask import Flask, jsonify, Session, render_template, request import os from time import sleep from multiprocessing import Process import configparser from spotify_background_color import SpotifyBackgroundColor from current_spotify_playback import CurrentSpotifyPlayback, NoArtworkException from led_controller imp...
28.666667
86
0.614987
4a0fb4671d18c4644c0142bb00ef68858fa394e3
1,613
py
Python
img_aug.py
zzdyyy/ProtoPNet
d417ac4881e5384db386d9764df7a0ef0f0a6b28
[ "MIT" ]
null
null
null
img_aug.py
zzdyyy/ProtoPNet
d417ac4881e5384db386d9764df7a0ef0f0a6b28
[ "MIT" ]
null
null
null
img_aug.py
zzdyyy/ProtoPNet
d417ac4881e5384db386d9764df7a0ef0f0a6b28
[ "MIT" ]
2
2022-02-05T02:49:04.000Z
2022-02-15T19:40:54.000Z
import Augmentor import os def makedir(path): ''' if path does not exist in the file system, create it ''' if not os.path.exists(path): os.makedirs(path) datasets_root_dir = './datasets/cub200_cropped/' dir = datasets_root_dir + 'train_cropped/' target_dir = datasets_root_dir + 'train_cropped_a...
32.918367
87
0.691259
4a0fb6c91578e6b289897c316054c199ab85d287
28,777
py
Python
test.py
huawenyu/Boost-Cookbook
0419a93be2c8871c34fb64b748ed0daa0f6bf194
[ "BSL-1.0" ]
3
2018-10-28T23:13:35.000Z
2021-02-03T13:50:22.000Z
test.py
huawenyu/Boost-Cookbook
0419a93be2c8871c34fb64b748ed0daa0f6bf194
[ "BSL-1.0" ]
null
null
null
test.py
huawenyu/Boost-Cookbook
0419a93be2c8871c34fb64b748ed0daa0f6bf194
[ "BSL-1.0" ]
2
2018-06-29T19:46:32.000Z
2021-08-10T13:13:00.000Z
import os import sys import signal import subprocess import argparse from shutil import copyfile from time import sleep class tester: canonize_output = False outputs = {} expected = { 'Chapter01/01_A_program_options_base_10_20': ('Fruits count: 30\n', '', 0), 'Chapter01/01_A_program_opti...
55.022945
527
0.6255
4a0fb6d362d9fd599683512bfcfe77a5b4de66eb
13,518
py
Python
sins/database/database.py
fgnt/sins
80517a51dd6cedb3df98d61d9d0586a1f96d9e28
[ "MIT" ]
7
2020-04-09T07:43:52.000Z
2022-03-10T02:09:28.000Z
sins/database/database.py
fgnt/sins
80517a51dd6cedb3df98d61d9d0586a1f96d9e28
[ "MIT" ]
null
null
null
sins/database/database.py
fgnt/sins
80517a51dd6cedb3df98d61d9d0586a1f96d9e28
[ "MIT" ]
null
null
null
from collections import defaultdict from copy import deepcopy import lazy_dataset import numpy as np import samplerate import soundfile from cached_property import cached_property from lazy_dataset.database import JsonDatabase from sins.database.utils import annotate, add_audio_paths from sins.paths import jsons_dir ...
35.856764
79
0.592247
4a0fb6e8a0fd311558af9b18c6ede101c674b8e3
3,761
py
Python
tsrc/test/test_test_helpers.py
pdecat/tsrc
472778a473a31a1dc1093f9a5487facbd0bd8643
[ "BSD-3-Clause" ]
null
null
null
tsrc/test/test_test_helpers.py
pdecat/tsrc
472778a473a31a1dc1093f9a5487facbd0bd8643
[ "BSD-3-Clause" ]
null
null
null
tsrc/test/test_test_helpers.py
pdecat/tsrc
472778a473a31a1dc1093f9a5487facbd0bd8643
[ "BSD-3-Clause" ]
1
2020-09-03T13:34:42.000Z
2020-09-03T13:34:42.000Z
from path import Path import tsrc import tsrc.git from tsrc.test.helpers.git_server import GitServer def read_remote_manifest(workspace_path: Path, git_server: GitServer) -> tsrc.Manifest: tsrc.git.run(workspace_path, "clone", git_server.manifest_url) manifest_yml = workspace_path / "manifest/manifest.yml" ...
35.819048
88
0.731986
4a0fb75923a82d2c47e7a7e97f30ef275bae1b3d
18,100
py
Python
asciimatics/parsers.py
ekapujiw2002/asciimatics
68ecfb9d9769989565f4d669c824acde90bc746c
[ "Apache-2.0" ]
null
null
null
asciimatics/parsers.py
ekapujiw2002/asciimatics
68ecfb9d9769989565f4d669c824acde90bc746c
[ "Apache-2.0" ]
null
null
null
asciimatics/parsers.py
ekapujiw2002/asciimatics
68ecfb9d9769989565f4d669c824acde90bc746c
[ "Apache-2.0" ]
null
null
null
""" This module provides parsers to create ColouredText objects from embedded control strings. """ from __future__ import division from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import re from builtins import str from future.utils import with_metacl...
47.135417
109
0.511823
4a0fb7c246728fb3ab75da26ad7694c85ff15c03
14,556
py
Python
tests/test_providers.py
OnroerendErfgoed/skosprovider_getty
06df6cc97ca8202f3335a5d040ce8a50afd6c067
[ "MIT" ]
2
2018-03-02T20:14:56.000Z
2018-05-09T13:31:13.000Z
tests/test_providers.py
OnroerendErfgoed/skosprovider_getty
06df6cc97ca8202f3335a5d040ce8a50afd6c067
[ "MIT" ]
70
2015-01-29T14:11:41.000Z
2022-01-18T06:51:28.000Z
tests/test_providers.py
OnroerendErfgoed/skosprovider_getty
06df6cc97ca8202f3335a5d040ce8a50afd6c067
[ "MIT" ]
1
2016-10-12T16:58:10.000Z
2016-10-12T16:58:10.000Z
#!/usr/bin/python import unittest import pytest import requests from skosprovider.exceptions import ProviderUnavailableException from skosprovider_getty.providers import AATProvider from skosprovider_getty.providers import GettyProvider from skosprovider_getty.providers import TGNProvider from skosprovider_getty.prov...
43.711712
118
0.612256
4a0fb85799c12793ec854f33fc8dfaa8d4b07820
8,774
py
Python
mars/lib/nvutils.py
tomzhang/mars-1
6f1d85e37eb1b383251314cb0ba13e06288af03d
[ "Apache-2.0" ]
1
2020-06-25T13:51:16.000Z
2020-06-25T13:51:16.000Z
mars/lib/nvutils.py
tomzhang/mars-1
6f1d85e37eb1b383251314cb0ba13e06288af03d
[ "Apache-2.0" ]
null
null
null
mars/lib/nvutils.py
tomzhang/mars-1
6f1d85e37eb1b383251314cb0ba13e06288af03d
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 1999-2020 Alibaba Group Holding 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.org/licenses/LICENSE-2.0 # # Unless require...
27.504702
109
0.691589
4a0fb893dbd9f9e913daeb32df4e03d8048c4b46
5,205
py
Python
dallinger/notifications.py
mensch72/Dallinger
56899d231e2f2fc9f84879f100bf998797249d3e
[ "MIT" ]
1
2020-11-29T02:25:13.000Z
2020-11-29T02:25:13.000Z
dallinger/notifications.py
mensch72/Dallinger
56899d231e2f2fc9f84879f100bf998797249d3e
[ "MIT" ]
null
null
null
dallinger/notifications.py
mensch72/Dallinger
56899d231e2f2fc9f84879f100bf998797249d3e
[ "MIT" ]
1
2020-11-28T16:22:48.000Z
2020-11-28T16:22:48.000Z
import logging import six import smtplib from cached_property import cached_property from email.mime.text import MIMEText logger = logging.getLogger(__file__) CONFIG_PLACEHOLDER = u"???" class InvalidEmailConfig(ValueError): """The configuration contained missing or invalid email-related values. """ class...
30.438596
88
0.648991
4a0fb8f81ed56486ee94d175044fb8ea872e2c56
9,337
py
Python
venv/Lib/site-packages/pandas/tests/extension/test_categorical.py
EkremBayar/bayar
aad1a32044da671d0b4f11908416044753360b39
[ "MIT" ]
603
2020-12-23T13:49:32.000Z
2022-03-31T23:38:03.000Z
venv/Lib/site-packages/pandas/tests/extension/test_categorical.py
EkremBayar/bayar
aad1a32044da671d0b4f11908416044753360b39
[ "MIT" ]
387
2020-12-15T14:54:04.000Z
2022-03-31T07:00:21.000Z
venv/Lib/site-packages/pandas/tests/extension/test_categorical.py
EkremBayar/bayar
aad1a32044da671d0b4f11908416044753360b39
[ "MIT" ]
35
2021-03-26T03:12:04.000Z
2022-03-23T10:15:10.000Z
""" This file contains a minimal set of tests for compliance with the extension array interface test suite, and should contain no other tests. The test suite for the full functionality of the array is located in `pandas/tests/arrays/`. The tests in this file are inherited from the BaseExtensionTests, and only minimal ...
31.650847
86
0.651066
4a0fb9dc55c57e8833859e2c48fa636409940f81
1,185
py
Python
formfactory/fields.py
AltusBarry/django-formfactory
8da378d0952bfd0eb9a08d49b17b5b95ee7e607d
[ "BSD-3-Clause" ]
null
null
null
formfactory/fields.py
AltusBarry/django-formfactory
8da378d0952bfd0eb9a08d49b17b5b95ee7e607d
[ "BSD-3-Clause" ]
null
null
null
formfactory/fields.py
AltusBarry/django-formfactory
8da378d0952bfd0eb9a08d49b17b5b95ee7e607d
[ "BSD-3-Clause" ]
null
null
null
import markdown from django.forms.fields import Field from django.utils.text import mark_safe from django.utils.translation import ugettext as _ from formfactory import widgets class ParagraphField(Field): widget = widgets.ParagraphWidget def __init__(self, paragraph="", *args, **kwargs): super(Par...
32.916667
76
0.657384
4a0fbbf30ee1dbc6699712442fab3ea251ddc82f
2,358
py
Python
main.py
lavron/neopixel-uanimate
7a05b56c8f2f2a7f6600650646782d6dc5fc307b
[ "MIT" ]
1
2019-11-25T02:31:01.000Z
2019-11-25T02:31:01.000Z
main.py
lavron/neopixel-uanimate
7a05b56c8f2f2a7f6600650646782d6dc5fc307b
[ "MIT" ]
null
null
null
main.py
lavron/neopixel-uanimate
7a05b56c8f2f2a7f6600650646782d6dc5fc307b
[ "MIT" ]
1
2019-10-08T06:30:32.000Z
2019-10-08T06:30:32.000Z
# https://www.youtube.com/watch?v=a1_O9AnuGB0 import neopixel from machine import Pin from neopixel_animate import NeopixelAnimate, mix, wave, random_color import uasyncio as asyncio import utime import random strip_len = 25 strip = neopixel.NeoPixel(Pin(25), strip_len) GREEN = (0, 128, 0) RED = (128, 0, 0) BLUE = ...
24.821053
70
0.592027
4a0fbca92f86584bd74a744433b3008877b341f3
724
py
Python
picasso/picasso/context_processor.py
TejasM/picasso
8c6ff1b0f955810f8e70112a0401b981afb2c0ec
[ "MIT" ]
null
null
null
picasso/picasso/context_processor.py
TejasM/picasso
8c6ff1b0f955810f8e70112a0401b981afb2c0ec
[ "MIT" ]
null
null
null
picasso/picasso/context_processor.py
TejasM/picasso
8c6ff1b0f955810f8e70112a0401b981afb2c0ec
[ "MIT" ]
null
null
null
from django.db.models import Q, Count from picasso.index.models import Tag, Listing __author__ = 'tmehta' def get_current_tags(request): full_tags = Tag.objects.annotate(num_listings=Count('listings')).filter(parent_tag=None, visible=True).order_by( '-num_listings') all_tags = Tag.objects.annotate(nu...
51.714286
116
0.714088
4a0fbde0ab1334cc3f044ec2a15e7a81cbb1e2b7
2,191
py
Python
awacs/cloudsearch.py
alanjjenkins/awacs
0065e1833eae6a6070edb4ab4f180fd10b26c19a
[ "BSD-2-Clause" ]
358
2015-01-01T05:11:05.000Z
2022-03-20T14:11:39.000Z
awacs/cloudsearch.py
alanjjenkins/awacs
0065e1833eae6a6070edb4ab4f180fd10b26c19a
[ "BSD-2-Clause" ]
171
2015-01-17T00:32:48.000Z
2022-03-28T02:02:57.000Z
awacs/cloudsearch.py
michael-k/awacs
ed3dc822d268f10b0cd83feb90fd279277e54ed4
[ "BSD-2-Clause" ]
100
2015-01-04T16:34:34.000Z
2022-02-21T06:17:17.000Z
# Copyright (c) 2012-2021, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from .aws import Action as BaseAction from .aws import BaseARN service_name = "Amazon CloudSearch" prefix = "cloudsearch" class Action(BaseAction): def __init__(self, action: str = None) -> None: ...
37.775862
88
0.789137
4a0fbe2719131c405f418b5e80fde321064661b9
1,872
py
Python
Support_Vector_Machine(SVM)/SVM_Example.py
LeoZ123/Machine-Learning-Practice
dae55f52bb31f428526d6d60229bd1827c4e0af0
[ "MIT" ]
null
null
null
Support_Vector_Machine(SVM)/SVM_Example.py
LeoZ123/Machine-Learning-Practice
dae55f52bb31f428526d6d60229bd1827c4e0af0
[ "MIT" ]
null
null
null
Support_Vector_Machine(SVM)/SVM_Example.py
LeoZ123/Machine-Learning-Practice
dae55f52bb31f428526d6d60229bd1827c4e0af0
[ "MIT" ]
1
2018-04-28T01:27:23.000Z
2018-04-28T01:27:23.000Z
''' Created on Mar 16, 2017 @author: Leo Zhong ''' print(__doc__) import numpy as np #for calculation import pylab as pl #for plot from sklearn import svm # create 40 separable points np.random.seed(0) #generate the same random num X = np.r_[np.random.randn(20, 2) - [2, 2], np.random.randn(20, 2) + [2, 2]] Y = [0] *...
27.940299
127
0.655449
4a0fbe501fb97ee62f57f2fb04977e2c089e24ef
3,610
py
Python
server.py
eric2007/Python-game-of-UNO
d6e86a114139a6b84e9597109d8249eec4752187
[ "MIT" ]
null
null
null
server.py
eric2007/Python-game-of-UNO
d6e86a114139a6b84e9597109d8249eec4752187
[ "MIT" ]
null
null
null
server.py
eric2007/Python-game-of-UNO
d6e86a114139a6b84e9597109d8249eec4752187
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import socket import threading import time import random import json mysocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) mysocket.bind(('127.0.0.1', 1026)) mysocket.listen(10) mysocket.setblocking(False) # mysocket.setsockopt(socket.SOL_SOCKET, socket.SO_RCVTIMEO, 2) password...
32.522523
98
0.528255
4a0fbfa607944aa43ab8aedf2528c79cc74f0d6f
990
py
Python
sanic/models/handler_types.py
Lin0818/sanic
0cb342aef4c8cfd8a7287f800dc9a3487b1360ca
[ "MIT" ]
null
null
null
sanic/models/handler_types.py
Lin0818/sanic
0cb342aef4c8cfd8a7287f800dc9a3487b1360ca
[ "MIT" ]
null
null
null
sanic/models/handler_types.py
Lin0818/sanic
0cb342aef4c8cfd8a7287f800dc9a3487b1360ca
[ "MIT" ]
null
null
null
from asyncio.events import AbstractEventLoop from typing import Any, Callable, Coroutine, Optional, TypeVar, Union import sanic from sanic.request import Request from sanic.response import BaseHTTPResponse, HTTPResponse Sanic = TypeVar("Sanic", bound="sanic.Sanic") MiddlewareResponse = Union[ Optional[HTTPResp...
34.137931
78
0.774747
4a0fbfb4603136011c913aee1f9c74dd60f4e81f
5,077
py
Python
modules/database/create_table.py
elliotwutingfeng/Google-Safe-Browsing-DNSBL-Generator
1ed8d49047081dd4f6d929f3f9d4d97d21c366e4
[ "BSD-3-Clause" ]
null
null
null
modules/database/create_table.py
elliotwutingfeng/Google-Safe-Browsing-DNSBL-Generator
1ed8d49047081dd4f6d929f3f9d4d97d21c366e4
[ "BSD-3-Clause" ]
null
null
null
modules/database/create_table.py
elliotwutingfeng/Google-Safe-Browsing-DNSBL-Generator
1ed8d49047081dd4f6d929f3f9d4d97d21c366e4
[ "BSD-3-Clause" ]
null
null
null
""" SQLite utilities for making CREATE TABLE queries """ from typing import Optional from apsw import Error from modules.database.connect import create_connection from modules.utils.log import init_logger from modules.utils.parallel_compute import execute_with_ray from modules.utils.types import DatabaseTableModes lo...
34.073826
83
0.534568
4a0fbfd825e3bb2406c0f7850e3d427bf0c52b3b
8,875
py
Python
mc-package/mcsim/monte_carlo.py
msse-2021-bootcamp/team2-project
3915fd811be09e79d7ea5c9a368d7849ef5b629b
[ "BSD-3-Clause" ]
null
null
null
mc-package/mcsim/monte_carlo.py
msse-2021-bootcamp/team2-project
3915fd811be09e79d7ea5c9a368d7849ef5b629b
[ "BSD-3-Clause" ]
22
2021-08-10T20:36:55.000Z
2021-08-20T02:35:02.000Z
mc-package/mcsim/monte_carlo.py
msse-2021-bootcamp/team2-project
3915fd811be09e79d7ea5c9a368d7849ef5b629b
[ "BSD-3-Clause" ]
null
null
null
""" Functions for running a Motne Carlo Simulation """ import math import random def calculate_total_energy(coordinates, box_length, cutoff): """ Calculate the total energy of a set of particles using the Lennard Jones potential. Parameters ---------- coordinates : list A nested list ...
29.098361
153
0.626592
4a0fc0d449f6e59064b7e4c4e395313b9ac90ff2
2,071
py
Python
tests/test_storage.py
raphaelm/django-pgrowcrypt
cf113acf19e1656fd436bd346cfc0a240a423890
[ "Apache-2.0" ]
null
null
null
tests/test_storage.py
raphaelm/django-pgrowcrypt
cf113acf19e1656fd436bd346cfc0a240a423890
[ "Apache-2.0" ]
1
2018-12-22T23:37:36.000Z
2018-12-22T23:37:36.000Z
tests/test_storage.py
raphaelm/django-pgrowcrypt
cf113acf19e1656fd436bd346cfc0a240a423890
[ "Apache-2.0" ]
null
null
null
import pytest from django.db import InternalError from .testapp.models import Author, Book @pytest.mark.django_db def test_save_and_retrieve_cycles(key): Book.objects.create(title='The Lord of the Rings', _key=key) b = Book.objects.with_key(key).first() assert b.title == 'The Lord of the Rings' b.tit...
31.378788
122
0.700145
4a0fc22a412e1708101cefb57a2862173b838e9d
2,040
py
Python
mrl/algorithms/random_ensemble_DPG.py
ag8/mrl
f05b00347f88020cbeb216c7e4764a4d2523b67e
[ "MIT" ]
null
null
null
mrl/algorithms/random_ensemble_DPG.py
ag8/mrl
f05b00347f88020cbeb216c7e4764a4d2523b67e
[ "MIT" ]
null
null
null
mrl/algorithms/random_ensemble_DPG.py
ag8/mrl
f05b00347f88020cbeb216c7e4764a4d2523b67e
[ "MIT" ]
1
2021-08-12T23:13:03.000Z
2021-08-12T23:13:03.000Z
""" This is a random ensemble hybrid of DDPG/TD3, roughly based on https://arxiv.org/pdf/1907.04543.pdf. """ from mrl.algorithms.continuous_off_policy import * class RandomEnsembleDPG(OffPolicyActorCritic): def optimize_from_batch(self, states, actions, rewards, next_states, gammas): ...
35.172414
116
0.591176
4a0fc2c56c246d11e5a7b5fd460e9776dacba435
6,362
py
Python
lrutests.py
outofmbufs/PythonLRUCache
9bfee32770bb485bf94179ffe19988152e8e537d
[ "MIT" ]
null
null
null
lrutests.py
outofmbufs/PythonLRUCache
9bfee32770bb485bf94179ffe19988152e8e537d
[ "MIT" ]
null
null
null
lrutests.py
outofmbufs/PythonLRUCache
9bfee32770bb485bf94179ffe19988152e8e537d
[ "MIT" ]
null
null
null
import threading import queue import unittest import random from lrucache import ManualLRUCache class TestMethods(unittest.TestCase): testvals = (('a', 1), ('b', 2), ('c', 3), ('d', 4), ('e', 5)) # helper function. Builds the cache. # NOTE: Tests rely on knowing this puts the items into the cache # ...
34.389189
75
0.509588
4a0fc4032c7e837f21c2820561e648c32c935467
8,748
py
Python
clarity-ext-scripts/clarity_ext_scripts/covid/pcr/example_result_file_rt_pcr_qs7.py
ctmrbio/claritylims
e4f193e9cd3aa54b2a1974a2ce5b573c397a88eb
[ "MIT" ]
4
2020-04-13T14:52:33.000Z
2022-02-03T14:50:41.000Z
clarity-ext-scripts/clarity_ext_scripts/covid/pcr/example_result_file_rt_pcr_qs7.py
ctmrbio/claritylims
e4f193e9cd3aa54b2a1974a2ce5b573c397a88eb
[ "MIT" ]
104
2019-04-01T08:35:59.000Z
2021-05-04T11:53:00.000Z
clarity-ext-scripts/clarity_ext_scripts/covid/pcr/example_result_file_rt_pcr_qs7.py
ctmrbio/claritylims
e4f193e9cd3aa54b2a1974a2ce5b573c397a88eb
[ "MIT" ]
4
2020-04-02T07:06:41.000Z
2021-08-20T06:42:27.000Z
import xlwt import collections import datetime import random from clarity_ext.extensions import GeneralExtension class Extension(GeneralExtension): def execute(self): file_handle_name = "Result file" timestamp = datetime.datetime.now().strftime("%y%m%dT%H%M%S") user = self.context.current_...
41.856459
119
0.599108
4a0fc4e68cca766f8615982bf9af6e6ab61ad00c
51,719
py
Python
services/data_generator.py
meredithmurfin/DynamicPlacementGenerator
60c0e3f1892c702ae46db78a89ff5e64f472a1b7
[ "MIT" ]
2
2021-01-14T12:53:13.000Z
2021-03-28T19:28:46.000Z
services/data_generator.py
EccRiley/DynamicPlacementGenerator
60c0e3f1892c702ae46db78a89ff5e64f472a1b7
[ "MIT" ]
null
null
null
services/data_generator.py
EccRiley/DynamicPlacementGenerator
60c0e3f1892c702ae46db78a89ff5e64f472a1b7
[ "MIT" ]
1
2020-04-29T19:24:35.000Z
2020-04-29T19:24:35.000Z
from util import data_util, reader_util, writer_util import data from itertools import combinations, combinations_with_replacement, permutations, chain, groupby from operator import sub import numpy as np import pprint, logging, copy def generate_all_possible_states(): all_states = {1: [], 2: [], 3: [], 4: [], 5: []}...
46.426391
252
0.749222
4a0fc56d8df40ffb6976701cfb10344b5102675b
16,324
py
Python
scripts/install_third_party_libs_test.py
jlau323/oppia
37438a2c9bf7e66892fb9a6a93a1fe4ca7a82691
[ "Apache-2.0" ]
2
2021-04-08T01:06:08.000Z
2021-06-02T08:20:13.000Z
scripts/install_third_party_libs_test.py
gitter-badger/oppia
7d8e659264582d7ce74bc6c139e597b82bca0e04
[ "Apache-2.0" ]
1
2020-05-27T06:08:17.000Z
2020-05-27T06:08:17.000Z
scripts/install_third_party_libs_test.py
gitter-badger/oppia
7d8e659264582d7ce74bc6c139e597b82bca0e04
[ "Apache-2.0" ]
1
2020-12-11T06:56:31.000Z
2020-12-11T06:56:31.000Z
# coding: utf-8 # # Copyright 2019 The Oppia 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 requi...
45.344444
105
0.661419
4a0fc69cd484911f615bdecaea1be3ac551172c9
609
py
Python
var/spack/repos/builtin/packages/perl-text-format/package.py
jameshclrk/spack
1f8fcb36091e1d5ae63a2279a958ca3ff57088bf
[ "ECL-2.0", "Apache-2.0", "MIT" ]
1
2021-03-19T13:12:47.000Z
2021-03-19T13:12:47.000Z
var/spack/repos/builtin/packages/perl-text-format/package.py
jameshclrk/spack
1f8fcb36091e1d5ae63a2279a958ca3ff57088bf
[ "ECL-2.0", "Apache-2.0", "MIT" ]
1
2019-01-11T20:11:52.000Z
2019-01-11T20:11:52.000Z
var/spack/repos/builtin/packages/perl-text-format/package.py
jameshclrk/spack
1f8fcb36091e1d5ae63a2279a958ca3ff57088bf
[ "ECL-2.0", "Apache-2.0", "MIT" ]
1
2020-10-14T14:20:17.000Z
2020-10-14T14:20:17.000Z
# Copyright 2013-2018 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PerlTextFormat(PerlPackage): """Text::Format - Various subroutines to format text""" ...
33.833333
94
0.738916
4a0fc718bbfef0cd63b338ddbe4b6c11933535dd
194
py
Python
code/rotate.py
tumuum/prog-book
20798408ed14145f5c5e4abbc7cc720976aec4ec
[ "MIT" ]
null
null
null
code/rotate.py
tumuum/prog-book
20798408ed14145f5c5e4abbc7cc720976aec4ec
[ "MIT" ]
null
null
null
code/rotate.py
tumuum/prog-book
20798408ed14145f5c5e4abbc7cc720976aec4ec
[ "MIT" ]
null
null
null
def rotate(s, n): while n !=0: s = _rotate(s) n -= 1 return s def _rotate(s): return s[1:] + [s[0]] def rotate2(s, n): if n == 0: return s else: return rotate2(s[1:]+[s[0]],n-1)
12.933333
34
0.530928
4a0fc746619b8fcfcdc8e78efa7222d2ad62f2fd
3,403
py
Python
sktime/forecasting/hcrystalball.py
MFaroukB/sktime
29932fc071ab04797bc2f5c00cd533726b31eb46
[ "BSD-3-Clause" ]
null
null
null
sktime/forecasting/hcrystalball.py
MFaroukB/sktime
29932fc071ab04797bc2f5c00cd533726b31eb46
[ "BSD-3-Clause" ]
null
null
null
sktime/forecasting/hcrystalball.py
MFaroukB/sktime
29932fc071ab04797bc2f5c00cd533726b31eb46
[ "BSD-3-Clause" ]
1
2021-04-30T08:12:18.000Z
2021-04-30T08:12:18.000Z
# -*- coding: utf-8 -*- import pandas as pd from sklearn.base import clone from sktime.forecasting.base._base import DEFAULT_ALPHA from sktime.forecasting.base._sktime import _OptionalForecastingHorizonMixin from sktime.forecasting.base._sktime import _SktimeForecaster from sktime.utils.validation._dependencies import...
25.977099
84
0.652659
4a0fc7c6177e37c6570aecac3ea2fd168edbac41
1,118
py
Python
models/user.py
zbuc/imaghost
604af32abab3047f78b9b47aa6c6227e2235d9f3
[ "BSD-2-Clause" ]
null
null
null
models/user.py
zbuc/imaghost
604af32abab3047f78b9b47aa6c6227e2235d9f3
[ "BSD-2-Clause" ]
null
null
null
models/user.py
zbuc/imaghost
604af32abab3047f78b9b47aa6c6227e2235d9f3
[ "BSD-2-Clause" ]
null
null
null
from __future__ import (absolute_import, print_function, division) import bcrypt from flask import g from . import Model from interfaces.db import db_conn from ghost_exceptions import NotImplementedException def hash_password(password): hashed = bcrypt.hashpw(password, bcrypt.gensalt()) return hashed clas...
28.666667
76
0.634168
4a0fc974952d4b41e6b6cdbe72e9907ef0279cca
1,032
py
Python
basis_set_exchange/tests/test_duplicate_slow.py
atomse/basis_set_exchange
7ffd64082c14d2f61eb43f1c2d44792e8b0e394e
[ "BSD-3-Clause" ]
1
2020-12-17T09:55:45.000Z
2020-12-17T09:55:45.000Z
basis_set_exchange/tests/test_duplicate_slow.py
mettlyz/basis_set_exchange
2d9f096eb2485f9a72d616a80ace17f15dbfb255
[ "BSD-3-Clause" ]
null
null
null
basis_set_exchange/tests/test_duplicate_slow.py
mettlyz/basis_set_exchange
2d9f096eb2485f9a72d616a80ace17f15dbfb255
[ "BSD-3-Clause" ]
null
null
null
''' Test for duplicate data in a basis set ''' import pytest import basis_set_exchange as bse from .common_testvars import bs_names_vers, true_false from .test_duplicate import _test_duplicates @pytest.mark.slow @pytest.mark.parametrize('bs_name,bs_ver', bs_names_vers) @pytest.mark.parametrize('unc_gen', true_false)...
33.290323
88
0.682171
4a0fca9d7f569122556835bd152a735b3c3fbad3
17,252
py
Python
census/core.py
mr-fuller/census
a786073348af809e88699b278ae33f623510f223
[ "BSD-3-Clause" ]
null
null
null
census/core.py
mr-fuller/census
a786073348af809e88699b278ae33f623510f223
[ "BSD-3-Clause" ]
null
null
null
census/core.py
mr-fuller/census
a786073348af809e88699b278ae33f623510f223
[ "BSD-3-Clause" ]
null
null
null
import warnings from functools import wraps from builtins import str try: from functools import lru_cache except ImportError: from backports.functools_lru_cache import lru_cache import pkg_resources __version__ = pkg_resources.require("census")[0].version ALL = '*' def new_session(*args, **kwargs): imp...
32.489642
157
0.576745
4a0fcb350e928f417f0a7f47e2eb917c5298882f
10,489
py
Python
packages/w3af/w3af/core/data/constants/vulns.py
ZooAtmosphereGroup/HelloPackages
0ccffd33bf927b13d28c8f715ed35004c33465d9
[ "Apache-2.0" ]
null
null
null
packages/w3af/w3af/core/data/constants/vulns.py
ZooAtmosphereGroup/HelloPackages
0ccffd33bf927b13d28c8f715ed35004c33465d9
[ "Apache-2.0" ]
null
null
null
packages/w3af/w3af/core/data/constants/vulns.py
ZooAtmosphereGroup/HelloPackages
0ccffd33bf927b13d28c8f715ed35004c33465d9
[ "Apache-2.0" ]
null
null
null
""" vulns.py Copyright 2012 Andres Riancho This file is part of w3af, http://w3af.org/ . w3af is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation version 2 of the License. w3af is distributed in the hope that it wi...
40.187739
74
0.608447
4a0fccfcc6ac372268d5aba2aebccd09f27da0d7
72,109
py
Python
synapse/handlers/message.py
sowieta/synapse
bfd7a9b65c5e092c6a7ccdd46e59a278b1cbbd57
[ "Apache-2.0" ]
1
2021-12-30T23:47:29.000Z
2021-12-30T23:47:29.000Z
synapse/handlers/message.py
sowieta/synapse
bfd7a9b65c5e092c6a7ccdd46e59a278b1cbbd57
[ "Apache-2.0" ]
null
null
null
synapse/handlers/message.py
sowieta/synapse
bfd7a9b65c5e092c6a7ccdd46e59a278b1cbbd57
[ "Apache-2.0" ]
null
null
null
# Copyright 2014-2016 OpenMarket Ltd # Copyright 2017-2018 New Vector Ltd # Copyright 2019-2020 The Matrix.org Foundation C.I.C. # Copyrignt 2020 Sorunome # # 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...
41.465785
95
0.609106
4a0fcee5f9c878bda7435f8f3923fa797b7f0173
2,256
py
Python
textnormalize/cleaners.py
cyrta/textnormalizer
f4bb577c1c344b0d798cd46978e5332d08274af3
[ "MIT" ]
null
null
null
textnormalize/cleaners.py
cyrta/textnormalizer
f4bb577c1c344b0d798cd46978e5332d08274af3
[ "MIT" ]
null
null
null
textnormalize/cleaners.py
cyrta/textnormalizer
f4bb577c1c344b0d798cd46978e5332d08274af3
[ "MIT" ]
null
null
null
''' Cleaners are transformations that run over the input text at both training and eval time. Cleaners can be selected by passing a comma-delimited list of cleaner names as the "cleaners" hyperparameter. Some cleaners are English-specific. You'll typically want to use: 1. "english_cleaners" for English text 2. "bas...
26.541176
95
0.692376
4a0fcf3fb7168a10fea51899ef9a8e779f8612c3
232
py
Python
codility/nesting.py
py-in-the-sky/challenges
4a36095de8cb56b4f9f83c241eafb13dfbeb4065
[ "MIT" ]
null
null
null
codility/nesting.py
py-in-the-sky/challenges
4a36095de8cb56b4f9f83c241eafb13dfbeb4065
[ "MIT" ]
null
null
null
codility/nesting.py
py-in-the-sky/challenges
4a36095de8cb56b4f9f83c241eafb13dfbeb4065
[ "MIT" ]
null
null
null
""" https://codility.com/programmers/task/nesting/ """ def solution(S): balance = 0 for char in S: balance += (1 if char == '(' else -1) if balance < 0: return 0 return int(balance == 0)
14.5
46
0.521552
4a0fcf48af0b9035c972bb45b104df9e7d405f7c
1,506
py
Python
discord/oggparse.py
nextcord-ext/nextcord
7b3022ae19299e1f40f5f34da33b80ae491aa06a
[ "MIT" ]
null
null
null
discord/oggparse.py
nextcord-ext/nextcord
7b3022ae19299e1f40f5f34da33b80ae491aa06a
[ "MIT" ]
null
null
null
discord/oggparse.py
nextcord-ext/nextcord
7b3022ae19299e1f40f5f34da33b80ae491aa06a
[ "MIT" ]
null
null
null
""" The MIT License (MIT) Copyright (c) 2015-present Rapptz Copyright (c) 2021-present tag-epic 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 restriction, including without limitation t...
32.73913
78
0.760956
4a0fcfefaf6e168d0bca24c3d9df1cf56bc5e3c2
2,687
py
Python
fastapi_cache/decorator.py
rushilsrivastava/fastapi-cache
1f7b8837878f8b38370a11afc6757c707df20cdb
[ "Apache-2.0" ]
2
2021-03-29T03:18:57.000Z
2021-03-29T03:27:59.000Z
fastapi_cache/decorator.py
rushilsrivastava/fastapi-cache
1f7b8837878f8b38370a11afc6757c707df20cdb
[ "Apache-2.0" ]
null
null
null
fastapi_cache/decorator.py
rushilsrivastava/fastapi-cache
1f7b8837878f8b38370a11afc6757c707df20cdb
[ "Apache-2.0" ]
null
null
null
from functools import wraps from typing import Callable, Optional, Type from fastapi_cache import FastAPICache from fastapi_cache.coder import Coder def cache( expire: int = None, coder: Type[Coder] = None, key_builder: Callable = None, namespace: Optional[str] = "", ): """ cache all function...
32.373494
85
0.528098
4a0fd098a873439b3bbc96f7076a6385999fc28e
128
py
Python
uvcgan/__init__.py
LS4GAN/uvcgan
376439ae2a9be684ff279ddf634fe137aadc5df5
[ "BSD-2-Clause" ]
20
2022-02-14T22:36:19.000Z
2022-03-29T06:31:30.000Z
uvcgan/__init__.py
LS4GAN/uvcgan
376439ae2a9be684ff279ddf634fe137aadc5df5
[ "BSD-2-Clause" ]
1
2022-03-09T17:23:30.000Z
2022-03-09T17:23:30.000Z
uvcgan/__init__.py
LS4GAN/uvcgan
376439ae2a9be684ff279ddf634fe137aadc5df5
[ "BSD-2-Clause" ]
3
2022-02-14T22:36:41.000Z
2022-03-20T12:53:29.000Z
from .consts import CONFIG_NAME, ROOT_DATA, ROOT_OUTDIR from .utils.funcs import join_dicts from .train.train import train
32
60
0.796875
4a0fd0a3e55f98432a45820793b7b3d7cb2f4df8
1,238
py
Python
tools/try_importing_all.py
aisk/pyston
ac69cfef0621dbc8901175e84fa2b5cb5781a646
[ "BSD-2-Clause", "Apache-2.0" ]
1
2020-02-06T14:28:45.000Z
2020-02-06T14:28:45.000Z
tools/try_importing_all.py
aisk/pyston
ac69cfef0621dbc8901175e84fa2b5cb5781a646
[ "BSD-2-Clause", "Apache-2.0" ]
null
null
null
tools/try_importing_all.py
aisk/pyston
ac69cfef0621dbc8901175e84fa2b5cb5781a646
[ "BSD-2-Clause", "Apache-2.0" ]
1
2020-02-06T14:29:00.000Z
2020-02-06T14:29:00.000Z
import glob import os import subprocess LIB_DIR = "from_cpython/Lib" EXE_PATH = "./pyston_dbg" modules = [] for fn in glob.glob("%s/*.py" % LIB_DIR): modules.append(os.path.basename(fn)[:-3]) for fn in glob.glob("%s/*" % LIB_DIR): if not os.path.isdir(fn): continue modules.append(os.path.basename...
26.913043
92
0.599354
4a0fd18323a5b5972a5da5c6314ce84287437c51
5,833
py
Python
covid-19/covid-19.py
martinliu/elastic-labs
4ce4afbaa7e27780a4b8224c2ce14a1176203dd0
[ "Apache-2.0" ]
3
2020-09-07T06:17:01.000Z
2022-03-12T09:09:46.000Z
covid-19/covid-19.py
martinliu/elastic-labs
4ce4afbaa7e27780a4b8224c2ce14a1176203dd0
[ "Apache-2.0" ]
null
null
null
covid-19/covid-19.py
martinliu/elastic-labs
4ce4afbaa7e27780a4b8224c2ce14a1176203dd0
[ "Apache-2.0" ]
1
2021-04-15T08:16:02.000Z
2021-04-15T08:16:02.000Z
import requests import json import time import hashlib import os from elasticsearch import Elasticsearch def make_id(dict): # use date ad part of id to make sure one record per day which is easy to analyze time_local = time.localtime(dict['updateTime']/1000) dt = time.strftime("%Y-%m-%d",time_local) te...
27.514151
177
0.574833
4a0fd2726f6f6027e79487f8402d7580239e36a2
4,783
py
Python
benchmark/testsystems/testsystems.py
choderalab/integrator-benchmark
bb307e6ebf476b652e62e41ae49730f530732da3
[ "MIT" ]
5
2017-02-22T09:08:21.000Z
2021-09-08T21:21:35.000Z
benchmark/testsystems/testsystems.py
choderalab/integrator-benchmark
bb307e6ebf476b652e62e41ae49730f530732da3
[ "MIT" ]
36
2017-04-15T21:34:25.000Z
2018-07-22T13:56:40.000Z
benchmark/testsystems/testsystems.py
choderalab/integrator-benchmark
bb307e6ebf476b652e62e41ae49730f530732da3
[ "MIT" ]
2
2019-12-06T05:43:10.000Z
2021-04-01T01:00:24.000Z
import numpy as np from openmmtools.testsystems import LysozymeImplicit, DHFRExplicit, SrcExplicit from openmmtools.forcefactories import replace_reaction_field from simtk.openmm import app from simtk import unit from benchmark.testsystems.configuration import configure_platform from benchmark.utilities import keep_onl...
41.232759
149
0.734685
4a0fd42ef8d389e136733706abe0bfa6ab5a03b6
4,910
py
Python
tests/tests_unit/test_contextualization/test_match_rules.py
AlexThunder/cognite-sdk-python-experimental
468d29e7809793ed45cef5da25dca22418839972
[ "Apache-2.0" ]
null
null
null
tests/tests_unit/test_contextualization/test_match_rules.py
AlexThunder/cognite-sdk-python-experimental
468d29e7809793ed45cef5da25dca22418839972
[ "Apache-2.0" ]
null
null
null
tests/tests_unit/test_contextualization/test_match_rules.py
AlexThunder/cognite-sdk-python-experimental
468d29e7809793ed45cef5da25dca22418839972
[ "Apache-2.0" ]
null
null
null
import re import unittest import pytest from cognite.client.data_classes import ContextualizationJob from cognite.experimental import CogniteClient from tests.utils import jsgz_load COGNITE_CLIENT = CogniteClient() RULES_API = COGNITE_CLIENT.match_rules @pytest.fixture def sources(): return [{"id": 1, "name": ...
29.757576
119
0.566395
4a0fd4e32a321251c0d5e4e833bf107968da2a64
1,442
py
Python
src/manager/om/script/gspylib/common/CheckPythonVersion.py
wotchin/openGauss-server
ebd92e92b0cfd76b121d98e4c57a22d334573159
[ "MulanPSL-1.0" ]
1
2020-06-30T15:00:50.000Z
2020-06-30T15:00:50.000Z
src/manager/om/script/gspylib/common/CheckPythonVersion.py
wotchin/openGauss-server
ebd92e92b0cfd76b121d98e4c57a22d334573159
[ "MulanPSL-1.0" ]
null
null
null
src/manager/om/script/gspylib/common/CheckPythonVersion.py
wotchin/openGauss-server
ebd92e92b0cfd76b121d98e4c57a22d334573159
[ "MulanPSL-1.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding:utf-8 -*- # Copyright (c) 2020 Huawei Technologies Co.,Ltd. # # openGauss is licensed under Mulan PSL v2. # You can use this software according to the terms # and conditions of the Mulan PSL v2. # You may obtain a copy of Mulan PSL v2 at: # # http://license.coscl.org.cn/Mula...
32.772727
78
0.579057
4a0fd4ee749f7d9a74db614aed3e11b92bead04e
2,990
py
Python
src/base/replay_queue.py
Kautenja/playing-mario-with-deep-reinforcement-learning
bf61b8babfd06b6e6c26eb3694b84e8c7ff4c076
[ "MIT" ]
57
2018-04-24T07:07:29.000Z
2022-01-19T17:07:13.000Z
src/base/replay_queue.py
Kautenja/playing-mario-with-deep-reinforcement-learning
bf61b8babfd06b6e6c26eb3694b84e8c7ff4c076
[ "MIT" ]
10
2018-06-07T14:29:19.000Z
2019-07-29T13:48:03.000Z
src/base/replay_queue.py
Kautenja/playing-mario-with-deep-reinforcement-learning
bf61b8babfd06b6e6c26eb3694b84e8c7ff4c076
[ "MIT" ]
11
2018-09-11T23:14:37.000Z
2021-06-30T03:56:55.000Z
"""A queue for storing previous experiences to sample from.""" import numpy as np class ReplayQueue(object): """A replay queue for replaying previous experiences.""" def __init__(self, size: int) -> None: """ Initialize a new replay buffer with a given size. Args: size: t...
29.60396
77
0.545485
4a0fd51b41becd5fd5592b478c63bd8f5c9a9122
40,167
py
Python
fast_bert/summarisation/modeling_bertabs.py
kirankunapuli/fast-bert
14f8e21fa9f19582edba40b3159ea933d7c8c815
[ "Apache-2.0" ]
null
null
null
fast_bert/summarisation/modeling_bertabs.py
kirankunapuli/fast-bert
14f8e21fa9f19582edba40b3159ea933d7c8c815
[ "Apache-2.0" ]
null
null
null
fast_bert/summarisation/modeling_bertabs.py
kirankunapuli/fast-bert
14f8e21fa9f19582edba40b3159ea933d7c8c815
[ "Apache-2.0" ]
null
null
null
# MIT License # Copyright (c) 2019 Yang Liu and the HuggingFace team # 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 restriction, including without limitation the rights # to use, c...
34.567126
169
0.581771
4a0fd5f2fa2be782035e2b6eb292d6e8b8160216
835
py
Python
src/python/comments/comment_extractor.py
pamelarussell/github-bioinformatics
0e7184cae57426c25cfa0e838637d34adf0a59e7
[ "MIT" ]
32
2018-05-14T20:34:08.000Z
2022-03-22T12:37:19.000Z
src/python/comments/comment_extractor.py
pamelarussell/github-bioinformatics
0e7184cae57426c25cfa0e838637d34adf0a59e7
[ "MIT" ]
null
null
null
src/python/comments/comment_extractor.py
pamelarussell/github-bioinformatics
0e7184cae57426c25cfa0e838637d34adf0a59e7
[ "MIT" ]
6
2018-07-11T17:15:07.000Z
2021-08-02T19:51:40.000Z
import abc class CommentExtractor(object): """ Abstract class for extracting comments from source code Subclasses implement the functionality for specific languages """ __metaclass__ = abc.ABCMeta @abc.abstractmethod def extract_comments(self, file_contents): """ Returns a lis...
30.925926
105
0.644311
4a0fd6bd6e199b45270b180d23f4a581625e92dc
2,585
py
Python
downloader/downloads_app.py
allanvobraun/SnesGameManager
74d7040206d88aec452ad50ff2fc17193759d70b
[ "MIT" ]
7
2020-02-18T01:34:51.000Z
2021-09-12T00:55:34.000Z
downloader/downloads_app.py
allanvobraun/SnesGameManager
74d7040206d88aec452ad50ff2fc17193759d70b
[ "MIT" ]
null
null
null
downloader/downloads_app.py
allanvobraun/SnesGameManager
74d7040206d88aec452ad50ff2fc17193759d70b
[ "MIT" ]
2
2020-05-10T03:39:16.000Z
2020-07-20T18:33:39.000Z
from time import sleep from PyQt5.QtCore import QThread, pyqtSignal, QObject from PyQt5.QtWidgets import QDialog from math import floor from downloader.thread_fix import nongui from downloader.ui.download_dialog import * from downloader.format_download import download_cover from main import ROOT_DIR """ Faz todo o proc...
29.044944
80
0.64294
4a0fd7047a310c3d87a28329c4e1f185ece3c744
7,498
py
Python
neurolang/utils/tests/test_relational_algebra_set.py
tgy/NeuroLang
4b2fd4202db40de8336a82938ec50cd41055ee28
[ "BSD-3-Clause" ]
null
null
null
neurolang/utils/tests/test_relational_algebra_set.py
tgy/NeuroLang
4b2fd4202db40de8336a82938ec50cd41055ee28
[ "BSD-3-Clause" ]
null
null
null
neurolang/utils/tests/test_relational_algebra_set.py
tgy/NeuroLang
4b2fd4202db40de8336a82938ec50cd41055ee28
[ "BSD-3-Clause" ]
null
null
null
from ..relational_algebra_set import (NamedRelationalAlgebraFrozenSet, RelationalAlgebraFrozenSet, RelationalAlgebraSet) def test_relational_algebra_set_semantics_empty(): ras = RelationalAlgebraSet() assert len(ras) == 0 assert ...
26.034722
70
0.56215
4a0fd721f8712c05c5aaa308b142a4f2314dcac9
4,015
py
Python
nbgrader/tests/apps/test_nbgrader_fetch.py
FrattisUC/nbgrader
f6402dcbb875e41ee3317be9e7af518afda9f72c
[ "BSD-3-Clause-Clear" ]
2
2021-09-11T20:32:18.000Z
2021-09-11T20:32:37.000Z
nbgrader/tests/apps/test_nbgrader_fetch.py
FrattisUC/nbgrader
f6402dcbb875e41ee3317be9e7af518afda9f72c
[ "BSD-3-Clause-Clear" ]
null
null
null
nbgrader/tests/apps/test_nbgrader_fetch.py
FrattisUC/nbgrader
f6402dcbb875e41ee3317be9e7af518afda9f72c
[ "BSD-3-Clause-Clear" ]
1
2019-09-13T07:46:09.000Z
2019-09-13T07:46:09.000Z
# -*- coding: utf-8 -*- import io import os from os.path import join from .. import run_nbgrader from .base import BaseTestApp from .conftest import notwindows @notwindows class TestNbGraderFetch(BaseTestApp): def _release(self, assignment, exchange, course_dir, course="abc101"): self._copy_file(join("...
37.523364
116
0.612204
4a0fd7897cbb197a81dd49142ccd05b65c06cac4
8,868
py
Python
kubernetes/test/test_v1beta1_storage_class_list.py
mariusgheorghies/python
68ac7e168963d8b5a81dc493b1973d29e903a15b
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v1beta1_storage_class_list.py
mariusgheorghies/python
68ac7e168963d8b5a81dc493b1973d29e903a15b
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v1beta1_storage_class_list.py
mariusgheorghies/python
68ac7e168963d8b5a81dc493b1973d29e903a15b
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1.20.7 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import unitte...
47.42246
136
0.379229
4a0fd7e1e22b08b8571f5dcfc39eda1f28148d4f
2,404
py
Python
mbmega_face_expressions/actions.py
gregfreeman/mbmega_face_expressions
d593f5be2f40ffcb375119ee3fb7262916b450ca
[ "BSD-3-Clause" ]
null
null
null
mbmega_face_expressions/actions.py
gregfreeman/mbmega_face_expressions
d593f5be2f40ffcb375119ee3fb7262916b450ca
[ "BSD-3-Clause" ]
null
null
null
mbmega_face_expressions/actions.py
gregfreeman/mbmega_face_expressions
d593f5be2f40ffcb375119ee3fb7262916b450ca
[ "BSD-3-Clause" ]
null
null
null
import logging import numpy as np import asyncio as aio from time import sleep from random import random import math from makeblock import MegaPi, SerialPort log = logging.getLogger(__name__) A6 = 60 A7 = 61 A8 = 62 A9 = 63 A10 = 64 A11 = 65 A12 = 66 A13 = 67 A14 = 68 A15 = 69 COLORS = { 'black': (0, 0, 0), ...
21.087719
61
0.571131