hexsha
stringlengths
40
40
size
int64
4
1.02M
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
209
max_stars_repo_name
stringlengths
5
121
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
209
max_issues_repo_name
stringlengths
5
121
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
209
max_forks_repo_name
stringlengths
5
121
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
4
1.02M
avg_line_length
float64
1.07
66.1k
max_line_length
int64
4
266k
alphanum_fraction
float64
0.01
1
a3d2243d082790614459a110978ae66628dc23bf
5,978
py
Python
tests/models/validators/v1_3_0/jsd_f5a269c44f2a95fa.py
daxm/dnacentersdk
5baa0cb151fb9e72cf7af1ae29e7541d89c3f06b
[ "MIT" ]
null
null
null
tests/models/validators/v1_3_0/jsd_f5a269c44f2a95fa.py
daxm/dnacentersdk
5baa0cb151fb9e72cf7af1ae29e7541d89c3f06b
[ "MIT" ]
null
null
null
tests/models/validators/v1_3_0/jsd_f5a269c44f2a95fa.py
daxm/dnacentersdk
5baa0cb151fb9e72cf7af1ae29e7541d89c3f06b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """DNA Center Get task tree data model. Copyright (c) 2019 Cisco and/or its affiliates. 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 with...
27.172727
78
0.357143
d7c71789c6af3a42b83b5b8f9f9d17a81a1437f6
1,848
py
Python
src/csci_utils/io/io.py
kuangzheng800/2021sp-csci-utils-kuangzheng800-copy
5b269a280c1ce826330d11cee43fb16442910a36
[ "MIT" ]
null
null
null
src/csci_utils/io/io.py
kuangzheng800/2021sp-csci-utils-kuangzheng800-copy
5b269a280c1ce826330d11cee43fb16442910a36
[ "MIT" ]
null
null
null
src/csci_utils/io/io.py
kuangzheng800/2021sp-csci-utils-kuangzheng800-copy
5b269a280c1ce826330d11cee43fb16442910a36
[ "MIT" ]
null
null
null
import os from contextlib import contextmanager from typing import ContextManager, Union from datetime import datetime as dt from builtins import FileExistsError import warnings @contextmanager def atomic_write( file: Union[str, os.PathLike], mode: str = "w", as_file: bool = True, **kwargs ) -> ContextManager: ...
30.295082
106
0.645022
21b46be984f52712f65ae39c4346dd6ff4bc4828
6,728
py
Python
python/dask_cudf/dask_cudf/io/parquet.py
sriramch/cudf
db4adb284e0a16e807cb70ff01f0be537051c60a
[ "Apache-2.0" ]
null
null
null
python/dask_cudf/dask_cudf/io/parquet.py
sriramch/cudf
db4adb284e0a16e807cb70ff01f0be537051c60a
[ "Apache-2.0" ]
null
null
null
python/dask_cudf/dask_cudf/io/parquet.py
sriramch/cudf
db4adb284e0a16e807cb70ff01f0be537051c60a
[ "Apache-2.0" ]
null
null
null
import warnings from functools import partial import pyarrow.parquet as pq import dask.dataframe as dd from dask.dataframe.io.parquet.arrow import ArrowEngine import cudf from cudf.core.column import build_categorical_column from cudf.io import write_to_dataset class CudfEngine(ArrowEngine): @staticmethod ...
31.886256
77
0.53805
634650e04d0d4968f0d6a3b0fb1b8eaa3cb543e7
4,985
py
Python
demos/kitchen_sink/main.py
Jonypr-code/KivyMD
3ac5ba86430d9002baef678b47f0d7873b66b7bd
[ "MIT" ]
1,111
2015-07-15T02:31:09.000Z
2022-03-29T17:22:02.000Z
demos/kitchen_sink/main.py
AllSafeCybercurity/kivyMD
85c51f3e7a26ca170d639e73899df5d465ee8941
[ "MIT" ]
706
2015-06-10T22:24:13.000Z
2022-03-31T16:22:39.000Z
demos/kitchen_sink/main.py
AllSafeCybercurity/kivyMD
85c51f3e7a26ca170d639e73899df5d465ee8941
[ "MIT" ]
561
2015-07-15T04:57:23.000Z
2022-03-31T17:14:31.000Z
import ast import os import sys from pathlib import Path from kivy.core.window import Window from kivy.factory import Factory # NOQA: F401 from kivy.lang import Builder from kivy.loader import Loader from libs.baseclass.dialog_change_theme import ( KitchenSinkDialogChangeTheme, KitchenSinkUsageCode, ) from li...
34.37931
86
0.59659
a65c63123ea5527f4b927e3bf3d497473bc91bb5
17,395
py
Python
examples/system/ota/native_ota_example/example_test.py
tidbyt/esp-idf
3a19016f84ac10fc9e3865cbc42c6c5593d2d481
[ "Apache-2.0" ]
null
null
null
examples/system/ota/native_ota_example/example_test.py
tidbyt/esp-idf
3a19016f84ac10fc9e3865cbc42c6c5593d2d481
[ "Apache-2.0" ]
null
null
null
examples/system/ota/native_ota_example/example_test.py
tidbyt/esp-idf
3a19016f84ac10fc9e3865cbc42c6c5593d2d481
[ "Apache-2.0" ]
null
null
null
import re import os import socket from threading import Thread import ssl from tiny_test_fw import DUT import ttfw_idf import random import subprocess try: import BaseHTTPServer from SimpleHTTPServer import SimpleHTTPRequestHandler except ImportError: import http.server as BaseHTTPServer from http.ser...
47.92011
137
0.708939
ec03260c617faab793a29c96b2f047454e964a62
376
py
Python
codeforces/math数学/1100/955A喂猫.py
yofn/pyacm
e573f8fdeea77513711f00c42f128795cbba65a6
[ "Apache-2.0" ]
null
null
null
codeforces/math数学/1100/955A喂猫.py
yofn/pyacm
e573f8fdeea77513711f00c42f128795cbba65a6
[ "Apache-2.0" ]
null
null
null
codeforces/math数学/1100/955A喂猫.py
yofn/pyacm
e573f8fdeea77513711f00c42f128795cbba65a6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # https://codeforces.com/problemset/problem/955/A # 只有两个选择: 立刻或等到20点 def f(l1,l2): hh,mm = l1 h,d,c,n = l2 m = hh*60+mm if m>1200: return 0.8*c*((h+n-1)//n) h2 = h + (1200-m)*d return min(c*((h+n-1)//n), 0.8*c*((h2+n-1)//n)) l1 = list(map(int,input().split(...
20.888889
51
0.534574
ce153079a9d1434a4fb4fbee7436998ee5d48595
809
py
Python
Lib/corpuscrawler/crawl_agr.py
cash/corpuscrawler
8913fe1fb2b6bfdfbf2ba01d2ce88057b3b5ba3d
[ "Apache-2.0" ]
95
2019-06-13T23:34:21.000Z
2022-03-12T05:22:49.000Z
Lib/corpuscrawler/crawl_agr.py
sahwar/corpuscrawler
8913fe1fb2b6bfdfbf2ba01d2ce88057b3b5ba3d
[ "Apache-2.0" ]
31
2019-06-02T18:56:53.000Z
2021-08-10T20:16:02.000Z
Lib/corpuscrawler/crawl_agr.py
sahwar/corpuscrawler
8913fe1fb2b6bfdfbf2ba01d2ce88057b3b5ba3d
[ "Apache-2.0" ]
35
2019-06-18T08:26:24.000Z
2022-01-11T13:59:40.000Z
# Copyright 2018 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, ...
36.772727
74
0.770087
12f6975cfcf21450cf6c4db3994ec84445b92391
64,593
py
Python
saleor/graphql/order/tests/test_fulfillment.py
redsquaresoftware/saleor
54dd7446d250b4f292e34f9928692652ccea5326
[ "CC-BY-4.0" ]
null
null
null
saleor/graphql/order/tests/test_fulfillment.py
redsquaresoftware/saleor
54dd7446d250b4f292e34f9928692652ccea5326
[ "CC-BY-4.0" ]
null
null
null
saleor/graphql/order/tests/test_fulfillment.py
redsquaresoftware/saleor
54dd7446d250b4f292e34f9928692652ccea5326
[ "CC-BY-4.0" ]
null
null
null
from unittest.mock import ANY, patch import graphene import pytest from ....core.exceptions import InsufficientStock, InsufficientStockData from ....giftcard import GiftCardEvents from ....giftcard.models import GiftCard, GiftCardEvent from ....order import OrderLineData, OrderStatus from ....order.actions import ful...
34.266844
88
0.658585
3ed424fb9084d192848326e1e81241f18beaa1f4
5,696
py
Python
test/unit/test_batch.py
Prompsit/joeynmt
54ed51c5d524e46c053dafb01b92c80854e7744b
[ "Apache-2.0" ]
10
2021-11-19T06:24:51.000Z
2022-02-09T15:44:00.000Z
test/unit/test_batch.py
Prompsit/joeynmt
54ed51c5d524e46c053dafb01b92c80854e7744b
[ "Apache-2.0" ]
9
2021-10-01T11:06:27.000Z
2021-12-23T02:10:52.000Z
test/unit/test_batch.py
Prompsit/joeynmt
54ed51c5d524e46c053dafb01b92c80854e7744b
[ "Apache-2.0" ]
2
2021-09-14T04:08:36.000Z
2021-11-19T06:24:54.000Z
import random import torch from torchtext.legacy.data.batch import Batch as TorchTBatch from joeynmt.batch import Batch from joeynmt.data import load_data, make_data_iter from joeynmt.constants import PAD_TOKEN from .test_helpers import TensorTestCase class TestData(TensorTestCase): def setUp(self): se...
42.507463
80
0.533532
74b50ac60b79a6f7218b0f00a105ac9d2ed633e5
448
py
Python
tests/core/test_Version.py
dc-blockchain/dc-core
fc6af8ce04d7b52f94c069f6ec05b0e419e07d70
[ "MIT" ]
1
2021-03-05T14:24:32.000Z
2021-03-05T14:24:32.000Z
tests/core/test_Version.py
dc-blockchain/dc-core
fc6af8ce04d7b52f94c069f6ec05b0e419e07d70
[ "MIT" ]
null
null
null
tests/core/test_Version.py
dc-blockchain/dc-core
fc6af8ce04d7b52f94c069f6ec05b0e419e07d70
[ "MIT" ]
null
null
null
# coding=utf-8 # Distributed under the MIT software license, see the accompanying # file LICENSE or http://www.opensource.org/licenses/mit-license.php. from unittest import TestCase from dc.core import config from dc.core.misc import logger logger.initialize_default() class TestVersion(TestCase): def __init__(s...
24.888889
69
0.734375
0a5c60872d969ca705a122c4763352a2374955c8
626
py
Python
data/migrations/0068_populate_workflow_configuration_tag.py
Duke-GCB/bespin-api
cea5c20fb2ff592adabe6ebb7ca934939aa11a34
[ "MIT" ]
null
null
null
data/migrations/0068_populate_workflow_configuration_tag.py
Duke-GCB/bespin-api
cea5c20fb2ff592adabe6ebb7ca934939aa11a34
[ "MIT" ]
137
2016-12-09T18:59:45.000Z
2021-06-10T18:55:47.000Z
data/migrations/0068_populate_workflow_configuration_tag.py
Duke-GCB/bespin-api
cea5c20fb2ff592adabe6ebb7ca934939aa11a34
[ "MIT" ]
3
2017-11-14T16:05:58.000Z
2018-12-28T18:07:43.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2018-11-29 17:20 from __future__ import unicode_literals from django.db import migrations def populate_workflow_configuration_tag(apps, schema_editor): WorkflowConfiguration = apps.get_model("data", "WorkflowConfiguration") for obj in WorkflowConfigurat...
26.083333
93
0.715655
a7cf1e169a0417baa1a9815d0e49b86b7ba12ac8
4,360
py
Python
core/src/zeit/cms/checkout/tests/test_webhook.py
louika/vivi
3cc213b873d527127aa6f0dd3c79a542299a8a0e
[ "BSD-3-Clause" ]
null
null
null
core/src/zeit/cms/checkout/tests/test_webhook.py
louika/vivi
3cc213b873d527127aa6f0dd3c79a542299a8a0e
[ "BSD-3-Clause" ]
null
null
null
core/src/zeit/cms/checkout/tests/test_webhook.py
louika/vivi
3cc213b873d527127aa6f0dd3c79a542299a8a0e
[ "BSD-3-Clause" ]
null
null
null
from zeit.cms.checkout.helper import checked_out from zeit.cms.content.sources import Product from zeit.cms.repository.interfaces import IAutomaticallyRenameable from zeit.cms.testcontenttype.testcontenttype import ExampleContentType import celery.exceptions import lxml.objectify import mock import plone.testing import...
38.245614
79
0.669266
5a89ffb670673f905cf63e874dac1b9b7ae8d22b
2,964
py
Python
common/trainer.py
kentakuramochi/deep_learning_from_scratch
8b78369f6da316a6c14c16f729c658d959454b0e
[ "CC0-1.0" ]
null
null
null
common/trainer.py
kentakuramochi/deep_learning_from_scratch
8b78369f6da316a6c14c16f729c658d959454b0e
[ "CC0-1.0" ]
null
null
null
common/trainer.py
kentakuramochi/deep_learning_from_scratch
8b78369f6da316a6c14c16f729c658d959454b0e
[ "CC0-1.0" ]
null
null
null
# !usr/bin/env python # -*- coding: utf-8 -*- import os import sys sys.path.append(os.pardir) import numpy as np from common.optimizer import * class Trainer: def __init__(self, network, x_train, t_train, x_test, t_test, epochs=20, mini_batch_size=100, optimizer="SGD", optimizer_param={"lr":0.01},...
36.592593
97
0.628205
290d0fa16fd299de4a001bdfd4f61715fe2b968b
415
py
Python
env/Lib/site-packages/plotly/validators/scatterpolargl/line/_color.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
11,750
2015-10-12T07:03:39.000Z
2022-03-31T20:43:15.000Z
venv/Lib/site-packages/plotly/validators/scatterpolargl/line/_color.py
wakisalvador/constructed-misdirection
74779e9ec640a11bc08d5d1967c85ac4fa44ea5e
[ "Unlicense" ]
2,951
2015-10-12T00:41:25.000Z
2022-03-31T22:19:26.000Z
venv/Lib/site-packages/plotly/validators/scatterpolargl/line/_color.py
wakisalvador/constructed-misdirection
74779e9ec640a11bc08d5d1967c85ac4fa44ea5e
[ "Unlicense" ]
2,623
2015-10-15T14:40:27.000Z
2022-03-28T16:05:50.000Z
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterpolargl.line", **kwargs ): super(ColorValidator, self).__init__( plotly_name=plotly_name, parent_name=pare...
29.642857
78
0.653012
38dc7f4016a6ac6977ed3e1adc29d1d1fbcc7011
694
py
Python
core_get/vendor/diamond/diamond_project_discoverer.py
core-get/core-get
8fb960e4e51d0d46b5e3b2f4832eb4a39e0e60f7
[ "MIT" ]
null
null
null
core_get/vendor/diamond/diamond_project_discoverer.py
core-get/core-get
8fb960e4e51d0d46b5e3b2f4832eb4a39e0e60f7
[ "MIT" ]
null
null
null
core_get/vendor/diamond/diamond_project_discoverer.py
core-get/core-get
8fb960e4e51d0d46b5e3b2f4832eb4a39e0e60f7
[ "MIT" ]
null
null
null
from dataclasses import dataclass from pathlib import PurePath from typing import List from injector import inject from core_get.file.file_system import FileSystem from core_get.vendor.diamond.diamond_project import DiamondProjectReader from core_get.vendor.project import Project from core_get.vendor.project_discover...
31.545455
74
0.806916
755d9829b6ede13d9ed8dc1e81ea79bcb17e69a3
21,687
py
Python
helper/configuration.py
PINTO0309/multi-mono-sf
563d65f34624c9281571e8b8b6f1f25599a94a34
[ "Apache-2.0" ]
69
2021-05-06T01:31:54.000Z
2022-03-30T02:52:53.000Z
helper/configuration.py
PINTO0309/multi-mono-sf
563d65f34624c9281571e8b8b6f1f25599a94a34
[ "Apache-2.0" ]
7
2021-05-11T06:39:44.000Z
2022-02-28T10:13:53.000Z
helper/configuration.py
PINTO0309/multi-mono-sf
563d65f34624c9281571e8b8b6f1f25599a94a34
[ "Apache-2.0" ]
11
2021-05-09T13:34:46.000Z
2021-11-24T09:33:49.000Z
## Portions of Code from, copyright 2018 Jochen Gast from __future__ import absolute_import, division, print_function import os import torch from torch import nn from torch.utils.data import DataLoader import numpy as np import logging import shutil import random import fnmatch from helper import logger, tools from ...
41.151803
156
0.608521
16889165513c682396dfd76bf180aced0791ddc2
9,724
py
Python
photutils/psf/utils.py
rosteen/photutils
5821bddc2d3fa2709b8de79c18efe99cff1ecb71
[ "BSD-3-Clause" ]
167
2015-05-17T15:03:58.000Z
2022-03-23T13:31:33.000Z
photutils/psf/utils.py
rosteen/photutils
5821bddc2d3fa2709b8de79c18efe99cff1ecb71
[ "BSD-3-Clause" ]
701
2015-01-05T11:47:12.000Z
2022-03-29T14:37:03.000Z
photutils/psf/utils.py
rosteen/photutils
5821bddc2d3fa2709b8de79c18efe99cff1ecb71
[ "BSD-3-Clause" ]
119
2015-02-04T21:43:02.000Z
2022-02-15T10:55:13.000Z
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module provides utilities for PSF-fitting photometry. """ from astropy.table import QTable from astropy.modeling.models import Const2D, Identity, Shift from astropy.nddata.utils import add_array, extract_array import numpy as np __all__ = ['prep...
33.647059
78
0.627725
636d063eb96a6e50cfb06a2a8cd3a7574710b97f
8,084
py
Python
appGUI/preferences/tools/Tools2QRCodePrefGroupUI.py
DannyPol/flatcam
25a8634d0658e98b7fae31a095f8bef40c1b3067
[ "MIT" ]
1
2022-02-11T06:19:34.000Z
2022-02-11T06:19:34.000Z
appGUI/preferences/tools/Tools2QRCodePrefGroupUI.py
MRemy2/FlatCam
d4f941335ca8a8d5351aab23b396f99da06a9029
[ "MIT" ]
null
null
null
appGUI/preferences/tools/Tools2QRCodePrefGroupUI.py
MRemy2/FlatCam
d4f941335ca8a8d5351aab23b396f99da06a9029
[ "MIT" ]
null
null
null
from PyQt5 import QtWidgets, QtCore, QtGui from PyQt5.QtCore import Qt, QSettings from appGUI.GUIElements import FCSpinner, RadioSet, FCTextArea, FCEntry, FCColorEntry from appGUI.preferences.OptionsGroupUI import OptionsGroupUI import gettext import appTranslation as fcTranslate import builtins fcTranslate.apply_la...
41.244898
88
0.609104
dcdb1e22bdece0a3fda7984a68d7b8edc62514a7
78,110
py
Python
release/scripts/startup/bl_ui/properties_data_modifier.py
awebneck/blender
bfbee8783138c87c0f805bcb69540f7391bf2ad3
[ "Naumen", "Condor-1.1", "MS-PL" ]
3
2019-09-16T10:29:19.000Z
2022-02-11T14:43:18.000Z
release/scripts/startup/bl_ui/properties_data_modifier.py
awebneck/blender
bfbee8783138c87c0f805bcb69540f7391bf2ad3
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
release/scripts/startup/bl_ui/properties_data_modifier.py
awebneck/blender
bfbee8783138c87c0f805bcb69540f7391bf2ad3
[ "Naumen", "Condor-1.1", "MS-PL" ]
1
2019-09-05T05:11:15.000Z
2019-09-05T05:11:15.000Z
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program 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; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
33.280784
108
0.569953
d54146806f5cab20064c2ab91efced62d8ebf1b0
3,223
py
Python
optimization-cloud-functions/energy-management/energy_management.py
josealvarez97/Scientific-Computing
b46b96a5566b34ece483c6e64a9fa43446d572df
[ "Unlicense" ]
null
null
null
optimization-cloud-functions/energy-management/energy_management.py
josealvarez97/Scientific-Computing
b46b96a5566b34ece483c6e64a9fa43446d572df
[ "Unlicense" ]
null
null
null
optimization-cloud-functions/energy-management/energy_management.py
josealvarez97/Scientific-Computing
b46b96a5566b34ece483c6e64a9fa43446d572df
[ "Unlicense" ]
null
null
null
from cvxpower import * import numpy as np import matplotlib.pyplot as plt import networkx as nx # import graphviz # import agraph def optimize_static_network(json_body): g = nx.DiGraph() devices = [] for load in json_body["loads"]: load_obj = FixedLoad(power=load["power"], name=load["name"...
36.625
85
0.533975
860c7fb3eee48391f2cb4815a9745310b44fbe56
493
py
Python
modules/vtk_basic/vtkImageShiftScale.py
chrisidefix/devide
99bfe156e710fa47ba7ae88b0ce1eef592a3a439
[ "BSD-3-Clause" ]
25
2015-08-24T16:05:14.000Z
2020-12-09T20:07:14.000Z
modules/vtk_basic/vtkImageShiftScale.py
chrisidefix/devide
99bfe156e710fa47ba7ae88b0ce1eef592a3a439
[ "BSD-3-Clause" ]
1
2016-02-16T21:18:10.000Z
2016-02-16T21:18:10.000Z
modules/vtk_basic/vtkImageShiftScale.py
chrisidefix/devide
99bfe156e710fa47ba7ae88b0ce1eef592a3a439
[ "BSD-3-Clause" ]
5
2016-02-16T20:05:37.000Z
2020-01-31T11:27:39.000Z
# class generated by DeVIDE::createDeVIDEModuleFromVTKObject from module_kits.vtk_kit.mixins import SimpleVTKClassModuleBase import vtk class vtkImageShiftScale(SimpleVTKClassModuleBase): def __init__(self, module_manager): SimpleVTKClassModuleBase.__init__( self, module_manager, vt...
37.923077
63
0.713996
7733ca2ec38a7b35ece34f46906655864bbc97e0
2,641
py
Python
basic/wordcount.py
ptmccarthy/google-python-exercises
d3193d743f36e8026e9851d59be39f77d16b21a6
[ "Apache-2.0" ]
null
null
null
basic/wordcount.py
ptmccarthy/google-python-exercises
d3193d743f36e8026e9851d59be39f77d16b21a6
[ "Apache-2.0" ]
null
null
null
basic/wordcount.py
ptmccarthy/google-python-exercises
d3193d743f36e8026e9851d59be39f77d16b21a6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """Wordcount exercise Google's Python class The main() below is already defined and comp...
24.915094
79
0.673987
2461aee41de3e949c04f20c94b17deb97c2a6aff
4,266
py
Python
misc.py
Steve-Teal/eforth-misc16
1975068b33b2df5beb1c38efc27f4151d59bb766
[ "MIT" ]
5
2021-12-28T23:50:21.000Z
2022-02-07T01:53:31.000Z
misc.py
Steve-Teal/misc-cpu-forth
f7f369b2c027775c087386b9c84019e78f125b1f
[ "MIT" ]
1
2022-01-20T21:50:13.000Z
2022-01-20T21:50:13.000Z
misc.py
Steve-Teal/misc-cpu-forth
f7f369b2c027775c087386b9c84019e78f125b1f
[ "MIT" ]
null
null
null
import sys import miscsim import miscasm import time def filename(extension): ignore = True for arg in sys.argv: if not ignore and len(arg) > 4: if arg[-4:].lower() == extension.lower(): return arg ignore = False return "" def makemif(filename,image,length): ...
29.219178
134
0.570323
50ce04ec142d11b0bc7a16141c080b21612cd827
22,223
py
Python
redditpost/redditpost.py
sravan1946/flare-cogs
9128911c97a49f0de252d3ec9ce691e3f8a655aa
[ "MIT" ]
1
2022-01-23T22:59:54.000Z
2022-01-23T22:59:54.000Z
redditpost/redditpost.py
sravan1946/flare-cogs
9128911c97a49f0de252d3ec9ce691e3f8a655aa
[ "MIT" ]
null
null
null
redditpost/redditpost.py
sravan1946/flare-cogs
9128911c97a49f0de252d3ec9ce691e3f8a655aa
[ "MIT" ]
null
null
null
import asyncio import logging import re from datetime import datetime, timedelta from html import unescape from typing import Optional import aiohttp import asyncpraw import asyncprawcore import discord import tabulate import validators from discord.http import Route from redbot.core import Config, commands from redbo...
44.093254
436
0.56626
736a165b22e5bca0431b544713b899d8a74957fb
14,305
py
Python
automaticvolumeadjustment/src/AutomaticVolumeAdjustmentSetup.py
FoxyRabbit67/enigma2-plugins
f6b94012726931fdf28e80a26226aec612b350de
[ "Linux-OpenIB" ]
41
2016-01-21T17:54:44.000Z
2021-06-26T05:54:41.000Z
automaticvolumeadjustment/src/AutomaticVolumeAdjustmentSetup.py
FoxyRabbit67/enigma2-plugins
f6b94012726931fdf28e80a26226aec612b350de
[ "Linux-OpenIB" ]
22
2016-11-16T11:25:26.000Z
2021-12-13T09:13:06.000Z
automaticvolumeadjustment/src/AutomaticVolumeAdjustmentSetup.py
FoxyRabbit67/enigma2-plugins
f6b94012726931fdf28e80a26226aec612b350de
[ "Linux-OpenIB" ]
62
2016-02-05T22:55:48.000Z
2022-03-12T21:48:22.000Z
# -*- coding: utf-8 -*- # # AutomaticVolumeAdjustment E2 # # $Id$ # # Coded by Dr.Best (c) 2010 # Support: www.dreambox-tools.info # # This plugin is licensed under the Creative Commons # Attribution-NonCommercial-ShareAlike 3.0 Unported # License. To view a copy of this license, visit # http://creativecommon...
45.996785
226
0.741
ad45e1465c86a1cfecee6aff9675670b396e40d2
3,530
py
Python
ModelStats.py
leoi137/Asset-Price-Prediction_Machine-Learning
9f2a753eb9d4f13b855072bf0e77e5243bc00e72
[ "MIT" ]
1
2019-05-02T05:41:53.000Z
2019-05-02T05:41:53.000Z
ModelStats.py
leoi137/Asset-Price-Prediction_Machine-Learning
9f2a753eb9d4f13b855072bf0e77e5243bc00e72
[ "MIT" ]
null
null
null
ModelStats.py
leoi137/Asset-Price-Prediction_Machine-Learning
9f2a753eb9d4f13b855072bf0e77e5243bc00e72
[ "MIT" ]
2
2019-07-03T14:04:14.000Z
2021-06-21T15:51:28.000Z
import pandas as pd import json from sklearn.metrics import confusion_matrix from sklearn.metrics import accuracy_score class Statistics: def __init__(self, X_test_selected, y_test, Model, model_features, scores, size = 3): """ Parameters: THIS ONLY WORKS WITH A CLASSIFIER MODEL WI...
43.04878
105
0.513031
fec1ab30960dc413e6e05aba540173de339829e5
10,080
py
Python
meiduo_1/meiduo_1/apps/goods/migrations/0001_initial.py
zjc0520/meiduo
1939223b050e7b69237e8551f5582146989d78a3
[ "MIT" ]
null
null
null
meiduo_1/meiduo_1/apps/goods/migrations/0001_initial.py
zjc0520/meiduo
1939223b050e7b69237e8551f5582146989d78a3
[ "MIT" ]
null
null
null
meiduo_1/meiduo_1/apps/goods/migrations/0001_initial.py
zjc0520/meiduo
1939223b050e7b69237e8551f5582146989d78a3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2018-10-30 12:29 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Create...
51.428571
160
0.57748
273ad1ff7772f896a9745bbcb951992f2e6175e2
3,004
py
Python
tests/tests_indiv_jobs/test_r3createjob.py
tadinve/ctm_python_client
de44e5012214ec42bb99b7f9b4ebc5394cd14328
[ "BSD-3-Clause" ]
null
null
null
tests/tests_indiv_jobs/test_r3createjob.py
tadinve/ctm_python_client
de44e5012214ec42bb99b7f9b4ebc5394cd14328
[ "BSD-3-Clause" ]
null
null
null
tests/tests_indiv_jobs/test_r3createjob.py
tadinve/ctm_python_client
de44e5012214ec42bb99b7f9b4ebc5394cd14328
[ "BSD-3-Clause" ]
null
null
null
from ctm_python_client.jobs.sap.r3.create import R3CREATEJob import os from ctm_python_client.core.bmc_control_m import CmJobFlow from ctm_python_client.session.session import Session BASE_PATH = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(BASE_PATH, ".secrets"), "r") as fp: ctm_uri = fp.re...
47.68254
1,207
0.676431
e2a9ab05b278687b258d8b6a0dd8c780d44902ad
2,808
py
Python
supybot/plugins/Anonymous/test.py
ekolis/ChancellorGerathIrc
f536c1901e743708101cb27249d0e395b8c0a493
[ "BSD-3-Clause" ]
1
2015-04-16T14:23:20.000Z
2015-04-16T14:23:20.000Z
plugins/Anonymous/test.py
kblin/supybot-gsoc
656f42f8d6b3fe4544a5270e0dab816fd3603118
[ "BSD-3-Clause" ]
null
null
null
plugins/Anonymous/test.py
kblin/supybot-gsoc
656f42f8d6b3fe4544a5270e0dab816fd3603118
[ "BSD-3-Clause" ]
null
null
null
### # Copyright (c) 2005, Daniel DiPaolo # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of condition...
49.263158
79
0.714387
e1f04e36eec3b3d8d427753adce99a1dcc36b7ce
9,537
py
Python
nox.py
jkhnn/python-docs-samples
fa3a07a3fd383d7248e58c97a65e80d80b6774a1
[ "Apache-2.0" ]
1
2019-04-03T12:08:34.000Z
2019-04-03T12:08:34.000Z
nox.py
jkhnn/python-docs-samples
fa3a07a3fd383d7248e58c97a65e80d80b6774a1
[ "Apache-2.0" ]
null
null
null
nox.py
jkhnn/python-docs-samples
fa3a07a3fd383d7248e58c97a65e80d80b6774a1
[ "Apache-2.0" ]
1
2022-03-29T18:51:10.000Z
2022-03-29T18:51:10.000Z
# Copyright 2016 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 ...
32.003356
93
0.692146
65b1fa2c340cfd6c38c993ae9d70d5ac21556d53
7,652
py
Python
bin/archipelago-encode-trees.py
jeetsukumaran/archipelago
2007eb8bdfdc9a7c810af881102a7e3b63d155d3
[ "BSD-3-Clause" ]
1
2015-06-29T09:13:32.000Z
2015-06-29T09:13:32.000Z
bin/archipelago-encode-trees.py
jeetsukumaran/archipelago
2007eb8bdfdc9a7c810af881102a7e3b63d155d3
[ "BSD-3-Clause" ]
null
null
null
bin/archipelago-encode-trees.py
jeetsukumaran/archipelago
2007eb8bdfdc9a7c810af881102a7e3b63d155d3
[ "BSD-3-Clause" ]
null
null
null
#! /usr/bin/env python import os import sys import argparse try: from StringIO import StringIO # Python 2 legacy support: StringIO in this module is the one needed (not io) except ImportError: from io import StringIO # Python 3 import dendropy import archipelago from archipelago import model def symbols_desc(...
37.881188
131
0.59919
7fdbdf636badac9e78a8a5890f62b3e9a01cd1f4
2,256
py
Python
journalpdfscraper/BMJSoupScraper.py
PeterMorrison1/JournalPDFScraper
ca30112653da9a53c9be5dc742e1409d94f71708
[ "MIT" ]
null
null
null
journalpdfscraper/BMJSoupScraper.py
PeterMorrison1/JournalPDFScraper
ca30112653da9a53c9be5dc742e1409d94f71708
[ "MIT" ]
null
null
null
journalpdfscraper/BMJSoupScraper.py
PeterMorrison1/JournalPDFScraper
ca30112653da9a53c9be5dc742e1409d94f71708
[ "MIT" ]
null
null
null
from selenium.webdriver.common.keys import Keys from journalpdfscraper.BaseSoup import BaseSoup class BMJSoupScraper(BaseSoup): def __init__(self, url): super().__init__(url) def __get_article_button_element__(self, class_string='icon-open-access'): """Finds the element on the page for t...
32.695652
171
0.630762
4a9977bc5abf7fb9e9471545f55fc07bb6feb6b4
3,979
py
Python
brat_multitask/iterators/balanced_bucket_iterator.py
jzbjyb/cmu-multinlp
c418aa4772f3266b6d2b2c5f02589f39df22a6d0
[ "BSD-3-Clause" ]
80
2020-05-03T01:51:25.000Z
2022-03-27T03:41:18.000Z
brat_multitask/iterators/balanced_bucket_iterator.py
jzbjyb/cmu-multinlp
c418aa4772f3266b6d2b2c5f02589f39df22a6d0
[ "BSD-3-Clause" ]
9
2020-05-06T22:11:07.000Z
2022-03-30T14:37:54.000Z
brat_multitask/iterators/balanced_bucket_iterator.py
jzbjyb/cmu-multinlp
c418aa4772f3266b6d2b2c5f02589f39df22a6d0
[ "BSD-3-Clause" ]
9
2020-05-06T21:08:57.000Z
2021-09-28T09:30:54.000Z
import logging from typing import List, Tuple, Iterable, Dict from collections import defaultdict from overrides import overrides from allennlp.common.util import lazy_groups_of from allennlp.data.instance import Instance from allennlp.data.iterators.data_iterator import DataIterator from allennlp.data.iterators.bucke...
42.329787
111
0.661975
7f592a7a4c08772f17e05594f6d76c5297dd81c4
890
py
Python
rolemanagement/__init__.py
emshov74/SinbadCogs
ebf7b44436a8db877151836c6fcb394445fb3c5b
[ "Apache-2.0" ]
78
2017-08-08T04:36:11.000Z
2022-01-16T19:44:28.000Z
rolemanagement/__init__.py
emshov74/SinbadCogs
ebf7b44436a8db877151836c6fcb394445fb3c5b
[ "Apache-2.0" ]
193
2017-03-22T06:43:48.000Z
2021-08-05T17:58:23.000Z
rolemanagement/__init__.py
emshov74/SinbadCogs
ebf7b44436a8db877151836c6fcb394445fb3c5b
[ "Apache-2.0" ]
101
2017-03-23T07:34:21.000Z
2022-03-14T09:06:29.000Z
# Copyright 2017-present Michael Hall # # 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...
31.785714
76
0.730337
ce33764b5eef55cfa114cbe004e42f8c6afb595d
5,182
py
Python
model.py
JagjitBhatia-UIC/3D-ResNets-PyTorch
d02078b5042cbfed7c81fae711901d019fe97c7d
[ "MIT" ]
null
null
null
model.py
JagjitBhatia-UIC/3D-ResNets-PyTorch
d02078b5042cbfed7c81fae711901d019fe97c7d
[ "MIT" ]
null
null
null
model.py
JagjitBhatia-UIC/3D-ResNets-PyTorch
d02078b5042cbfed7c81fae711901d019fe97c7d
[ "MIT" ]
null
null
null
import torch from torch import nn from models import resnet, resnet2p1d, pre_act_resnet, wide_resnet, resnext, densenet def get_module_name(name): name = name.split('.') if name[0] == 'module': i = 1 else: i = 0 if name[i] == 'features': i += 1 return name[i] def get_fi...
40.170543
85
0.540332
ca34a5a5a848fce080d6c64295dfe1a6dc663cf7
1,968
py
Python
skl2onnx/operator_converters/__init__.py
PossieMP/https-github.com-onnx-sklearn-onnx
48c60398d38e6937897d7c1506a8dcfcf28830a2
[ "MIT" ]
1
2019-05-06T20:54:02.000Z
2019-05-06T20:54:02.000Z
skl2onnx/operator_converters/__init__.py
PossieMP/https-github.com-onnx-sklearn-onnx
48c60398d38e6937897d7c1506a8dcfcf28830a2
[ "MIT" ]
null
null
null
skl2onnx/operator_converters/__init__.py
PossieMP/https-github.com-onnx-sklearn-onnx
48c60398d38e6937897d7c1506a8dcfcf28830a2
[ "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. # -------------------------------------------------------------------------- # To regi...
24.6
76
0.70122
018c90018c6cd4beb5914c060d82b3289e2407ac
1,323
py
Python
extensions/interactions/NumberWithUnits/NumberWithUnits.py
Tim810306/oppia
6f90044d12dbe0979c999265cbe46f267c4c592d
[ "Apache-2.0" ]
4
2021-09-16T16:46:53.000Z
2022-02-06T13:00:14.000Z
extensions/interactions/NumberWithUnits/NumberWithUnits.py
Tim810306/oppia
6f90044d12dbe0979c999265cbe46f267c4c592d
[ "Apache-2.0" ]
80
2020-10-31T09:14:46.000Z
2021-01-12T23:38:15.000Z
extensions/interactions/NumberWithUnits/NumberWithUnits.py
Tim810306/oppia
6f90044d12dbe0979c999265cbe46f267c4c592d
[ "Apache-2.0" ]
1
2020-12-09T21:33:49.000Z
2020-12-09T21:33:49.000Z
# 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 required by applicable ...
33.923077
74
0.756614
c71e14d36de50954ab36ecd9a9a16f246a464a7f
340
py
Python
ctci/Chapter-1/String_Compression.py
atultherajput/playwithpython
7980a750a18b75728a96d42fe9d216a7a79334b6
[ "MIT" ]
null
null
null
ctci/Chapter-1/String_Compression.py
atultherajput/playwithpython
7980a750a18b75728a96d42fe9d216a7a79334b6
[ "MIT" ]
null
null
null
ctci/Chapter-1/String_Compression.py
atultherajput/playwithpython
7980a750a18b75728a96d42fe9d216a7a79334b6
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 def StringCompression(string): '''Count repeated no. of characters''' count = 0 temp = string[0] new_string = '' for x in string+' ': if temp == x: count +=1 continue new_string = new_string+temp+str(count) temp = x count = 1 print(new_string) StringCompression("aabcccccaaa")...
20
51
0.673529
82ce0563ecffd661e3ebea404b2e55533913731d
2,802
py
Python
python/oneflow/test/modules/test_empty.py
grybd/oneflow
82237ad096a10527591660c09b61444c42917e69
[ "Apache-2.0" ]
3,285
2020-07-31T05:51:22.000Z
2022-03-31T15:20:16.000Z
python/oneflow/test/modules/test_empty.py
grybd/oneflow
82237ad096a10527591660c09b61444c42917e69
[ "Apache-2.0" ]
2,417
2020-07-31T06:28:58.000Z
2022-03-31T23:04:14.000Z
python/oneflow/test/modules/test_empty.py
grybd/oneflow
82237ad096a10527591660c09b61444c42917e69
[ "Apache-2.0" ]
520
2020-07-31T05:52:42.000Z
2022-03-29T02:38:11.000Z
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
34.170732
83
0.683797
85489c964a35638be0b4f7e9398e0af56c941617
2,559
py
Python
hmkit/autoapi/properties/value/charging/departure_time.py
highmobility/hmkit-python
2ac06ed021b57014f5290eaece19a9399d52df48
[ "MIT" ]
1
2021-08-01T20:35:57.000Z
2021-08-01T20:35:57.000Z
hmkit/autoapi/properties/value/charging/departure_time.py
highmobility/hmkit-python
2ac06ed021b57014f5290eaece19a9399d52df48
[ "MIT" ]
null
null
null
hmkit/autoapi/properties/value/charging/departure_time.py
highmobility/hmkit-python
2ac06ed021b57014f5290eaece19a9399d52df48
[ "MIT" ]
null
null
null
""" The MIT License Copyright (c) 2014- High-Mobility GmbH (https://high-mobility.com) 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...
35.054795
132
0.69324
d28d7716d2116d5751ae02bc5320d002b8f0475c
3,473
py
Python
pipeline/engine/migrations/0018_auto_20190729_1041.py
sdgdsffdsfff/bk-sops-tencent
e8aff91f822e79031e12b0f66943830f44ced506
[ "Apache-2.0" ]
1
2020-10-13T03:04:53.000Z
2020-10-13T03:04:53.000Z
pipeline/engine/migrations/0018_auto_20190729_1041.py
sdgdsffdsfff/bk-sops-tencent
e8aff91f822e79031e12b0f66943830f44ced506
[ "Apache-2.0" ]
5
2021-02-08T20:46:54.000Z
2021-06-10T22:54:45.000Z
pipeline/engine/migrations/0018_auto_20190729_1041.py
sdgdsffdsfff/bk-sops-tencent
e8aff91f822e79031e12b0f66943830f44ced506
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2020 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in co...
40.383721
115
0.630579
5044bdb2f985f9398420568396ab79707e04ae31
10,879
py
Python
devstack/components/db.py
hagleitn/Openstack-Devstack2
88d3effc70c6479bba276856285dcb3974d76261
[ "Apache-2.0" ]
1
2015-02-21T05:30:46.000Z
2015-02-21T05:30:46.000Z
devstack/components/db.py
hagleitn/Openstack-Devstack2
88d3effc70c6479bba276856285dcb3974d76261
[ "Apache-2.0" ]
null
null
null
devstack/components/db.py
hagleitn/Openstack-Devstack2
88d3effc70c6479bba276856285dcb3974d76261
[ "Apache-2.0" ]
null
null
null
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (C) 2012 Yahoo! 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.or...
37.643599
101
0.583969
f48772403a7be2db612f6d06ca03ac993e48ea94
58
py
Python
src/aio_net_events/backends/__init__.py
ntamas/aio-net-events
a4fd2882f151008fb4351643fb5c1e0fe8fa0f5b
[ "MIT" ]
1
2020-04-08T21:32:58.000Z
2020-04-08T21:32:58.000Z
src/aio_net_events/backends/__init__.py
ntamas/aio-net-events
a4fd2882f151008fb4351643fb5c1e0fe8fa0f5b
[ "MIT" ]
1
2020-03-24T16:45:54.000Z
2020-03-24T16:45:54.000Z
src/aio_net_events/backends/__init__.py
ntamas/aio-net-events
a4fd2882f151008fb4351643fb5c1e0fe8fa0f5b
[ "MIT" ]
null
null
null
"""Network event detector backends for aio_net_events."""
29
57
0.775862
bb62b5b55668e6129f2ba4a2afcf5116acdc39b5
1,779
py
Python
examples/gcmc/input.py
sinamoeini/mapp4py
923ef57ee5bdb6231bec2885c09a58993b6c0f1f
[ "MIT" ]
3
2018-06-06T05:43:36.000Z
2020-07-18T14:31:37.000Z
examples/gcmc/input.py
sinamoeini/mapp4py
923ef57ee5bdb6231bec2885c09a58993b6c0f1f
[ "MIT" ]
null
null
null
examples/gcmc/input.py
sinamoeini/mapp4py
923ef57ee5bdb6231bec2885c09a58993b6c0f1f
[ "MIT" ]
7
2018-01-16T03:21:20.000Z
2020-07-20T19:36:13.000Z
####################################################################################### # [M] = a.m.u # [L] = Angs # [U] = [ML^2/T^2] = eV # # therefore # [T] = sqrt(a.m.u/eV)*Angs # # # a.m.u = 1.66053904020e-27 Kg # Angs = 1.0e-10 m # eV = 1.60217656535e-19 Kg m^2/s^2 # therefore # [T] ...
21.962963
87
0.510961
952c4dcd76ef8b6a8e0a147ee537a916fd423b40
295
py
Python
fdp/methods/nstxu/mpts/change_units.py
Fusion-Data-Platform/fdp
d87a52207238f168ed69b9f96dc8f20f4481366d
[ "MIT" ]
10
2015-12-18T22:38:07.000Z
2020-03-02T09:15:50.000Z
fdp/methods/nstxu/mpts/change_units.py
Fusion-Data-Platform/fdp
d87a52207238f168ed69b9f96dc8f20f4481366d
[ "MIT" ]
14
2015-12-07T16:41:48.000Z
2019-01-18T17:48:55.000Z
fdp/methods/nstxu/mpts/change_units.py
Fusion-Data-Platform/fdp
d87a52207238f168ed69b9f96dc8f20f4481366d
[ "MIT" ]
5
2016-05-20T17:35:23.000Z
2019-01-17T19:00:06.000Z
# -*- coding: utf-8 -*- """ Created on Thu Oct 15 11:59:54 2015 @author: ktritz """ def change_units(signal, data): if signal.units == 'cm': data /= 100. signal.units = 'm' if signal.units == 'cm^-3': data *= 1.e6 signal.units = 'm^-3' return data
17.352941
35
0.522034
961865559cd4c4ac445f2b90a43beba1d4835b45
966
py
Python
commands/fix_code_issue.py
ikust/omnisharp-sublime
423348b4461ba916141cb16105fcab86961709f0
[ "MIT" ]
424
2015-01-01T22:54:30.000Z
2022-03-16T02:32:02.000Z
commands/fix_code_issue.py
ikust/omnisharp-sublime
423348b4461ba916141cb16105fcab86961709f0
[ "MIT" ]
160
2015-01-02T11:28:14.000Z
2022-01-27T18:09:35.000Z
commands/fix_code_issue.py
ikust/omnisharp-sublime
423348b4461ba916141cb16105fcab86961709f0
[ "MIT" ]
81
2015-01-14T19:24:50.000Z
2022-03-12T11:05:22.000Z
import os import sublime import sublime_plugin from ..lib import omnisharp from ..lib import helpers class OmniSharpFixCodeIssue(sublime_plugin.TextCommand): data = None def run(self, edit): if self.data is None: omnisharp.get_response( self.view, '/fixcodeissue', self._ha...
26.108108
69
0.622153
1364db95adddcf8a51a4d4cf50c1aabb2aca9a93
3,726
py
Python
PaperExperiments/XHExp008/parameters.py
stefan-c-kremer/TE_World2
8e1fae218af8a1eabae776deecac62192c22e0ca
[ "MIT" ]
null
null
null
PaperExperiments/XHExp008/parameters.py
stefan-c-kremer/TE_World2
8e1fae218af8a1eabae776deecac62192c22e0ca
[ "MIT" ]
null
null
null
PaperExperiments/XHExp008/parameters.py
stefan-c-kremer/TE_World2
8e1fae218af8a1eabae776deecac62192c22e0ca
[ "MIT" ]
null
null
null
# parameters.py """ Exp 08 - {'Initial_genes': '500', 'Host_mutation_rate': '0.03', 'TE_progeny': '0.00, 0, 0.55, 1, 0.30, 2, 0.15, 3', 'TE_Insertion_Distribution': 'Triangle( pmax=0, pzero=3.0/3.0 )', 'Carrying_capacity': '30', 'TE_excision_rate': '0.5', 'Junk_BP': '1.4', 'Gene_Insertion_Distribution': 'Triangle( pze...
38.8125
374
0.647343
5267c80ad990fd6d9791cab037f0ec1a52e75805
737
py
Python
jp.atcoder/abc058/arc071_b/26033791.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-09T03:06:25.000Z
2022-02-09T03:06:25.000Z
jp.atcoder/abc058/arc071_b/26033791.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-05T22:53:18.000Z
2022-02-09T01:29:30.000Z
jp.atcoder/abc058/arc071_b/26033791.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
null
null
null
import sys import typing import numba as nb import numpy as np @nb.njit((nb.i8[:],) * 2, cache=True) def solve(x: np.ndarray, y: np.ndarray) -> typing.NoReturn: mod = 10**9 + 7 def calc_sum(x): n = len(x) i = np.arange(n - 1) s = np.sum((i + 1) * x[i + 1] % mod) % mod ...
19.918919
60
0.477612
7fd45394a0c7973cae0a5758c8eb51a80f7ba6d3
7,532
py
Python
examples/train_BCIC_IV_2a_intra-subject_cross-session.py
gzoumpourlis/braindecode
6bd595a146d0854541ff02b4483c011a394fdf0a
[ "BSD-3-Clause" ]
null
null
null
examples/train_BCIC_IV_2a_intra-subject_cross-session.py
gzoumpourlis/braindecode
6bd595a146d0854541ff02b4483c011a394fdf0a
[ "BSD-3-Clause" ]
null
null
null
examples/train_BCIC_IV_2a_intra-subject_cross-session.py
gzoumpourlis/braindecode
6bd595a146d0854541ff02b4483c011a394fdf0a
[ "BSD-3-Clause" ]
null
null
null
from braindecode.datasets.moabb import MOABBDataset from braindecode.datautil.preprocess import (exponential_moving_standardize, preprocess, Preprocessor) import numpy as np from braindecode.datautil.windowers import create_windows_from_events import torch from braindecode.util import set_random_seeds from braindeco...
28.530303
154
0.668614
93d4bd3867cc1901695dd5983d0426eb2cff1e40
2,473
py
Python
tools/gcc-arm-none-eabi-5_4-2016q3/arm-none-eabi/lib/fpu/libstdc++.a-gdb.py
971586331/rt-thread
4799ae65c3ef2b8d11cd3a16c11bbd5cd56c1b5d
[ "Apache-2.0" ]
16
2020-09-08T09:58:40.000Z
2022-01-24T08:50:45.000Z
tools/gcc-arm-none-eabi-5_4-2016q3/arm-none-eabi/lib/fpu/libstdc++.a-gdb.py
971586331/rt-thread
4799ae65c3ef2b8d11cd3a16c11bbd5cd56c1b5d
[ "Apache-2.0" ]
2
2020-11-17T07:45:03.000Z
2022-03-17T02:25:53.000Z
tools/gcc-arm-none-eabi-5_4-2016q3/arm-none-eabi/lib/fpu/libstdc++.a-gdb.py
971586331/rt-thread
4799ae65c3ef2b8d11cd3a16c11bbd5cd56c1b5d
[ "Apache-2.0" ]
9
2020-08-05T09:48:31.000Z
2021-12-28T06:53:00.000Z
# -*- python -*- # Copyright (C) 2009-2015 Free Software Foundation, Inc. # This program 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; either version 3 of the License, or # (at your option) any later versio...
39.887097
81
0.723817
6cf279e439a61bbb4a982f3913635764334a6b5f
9,822
py
Python
test/functional/rpc_createmultisig.py
Soptq/bitgesell
4e31314180d8cadaee5868c4d797208ddac7d392
[ "MIT" ]
12
2020-05-14T20:22:20.000Z
2021-06-07T19:21:34.000Z
test/functional/rpc_createmultisig.py
slowriot/bitgesell
9b7f9e207323e9863253ad2598068b0ad0b159d7
[ "MIT" ]
55
2021-03-24T15:00:42.000Z
2022-02-22T10:07:14.000Z
test/functional/rpc_createmultisig.py
slowriot/bitgesell
9b7f9e207323e9863253ad2598068b0ad0b159d7
[ "MIT" ]
35
2021-02-03T03:02:04.000Z
2021-11-22T07:27:55.000Z
#!/usr/bin/env python3 # Copyright (c) 2015-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test multisig RPCs""" import binascii import decimal import itertools import json import os from test_...
44.243243
174
0.645999
56079d39331923815dcd33ff540100fc115daf66
9,952
py
Python
methods/seg/fcn_segmentor_test.py
gatarelib/PyTorchCV
5191d0ddc5c42a4cc8dc5451aa14c263c2f3e77f
[ "Apache-2.0" ]
null
null
null
methods/seg/fcn_segmentor_test.py
gatarelib/PyTorchCV
5191d0ddc5c42a4cc8dc5451aa14c263c2f3e77f
[ "Apache-2.0" ]
null
null
null
methods/seg/fcn_segmentor_test.py
gatarelib/PyTorchCV
5191d0ddc5c42a4cc8dc5451aa14c263c2f3e77f
[ "Apache-2.0" ]
1
2019-07-23T02:33:07.000Z
2019-07-23T02:33:07.000Z
#!/usr/bin/env python # -*- coding:utf-8 -*- # Author: Donny You (youansheng@gmail.com) # Class Definition for Semantic Segmentation. from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import cv2 import numpy as np import torch from PIL import Image...
44.035398
126
0.615756
3463630712c5f189ef02f1225c22007718b1eec4
33,166
py
Python
cvtorchvision/cvtransforms/cvfunctional.py
jxw-tmp/opencv_transforms_torchvision
4604610a422cfdc0af94a7e3112949121a0c6fe6
[ "MIT" ]
null
null
null
cvtorchvision/cvtransforms/cvfunctional.py
jxw-tmp/opencv_transforms_torchvision
4604610a422cfdc0af94a7e3112949121a0c6fe6
[ "MIT" ]
null
null
null
cvtorchvision/cvtransforms/cvfunctional.py
jxw-tmp/opencv_transforms_torchvision
4604610a422cfdc0af94a7e3112949121a0c6fe6
[ "MIT" ]
null
null
null
from __future__ import division import torch import math import random from PIL import Image import cv2 import numpy as np import numbers import types import collections import warnings import matplotlib.pyplot as plt from torchvision.transforms import functional import PIL INTER_MODE = {'NEAREST': cv2.INTER_NEAREST, ...
37.603175
125
0.609962
815effbfb46ddc355ac2b30413071eb99fc70864
1,753
py
Python
ironic_tempest_plugin/tests/scenario/ironic_standalone/test_ramdisk_iso.py
ameya-r/ironic-tempest-plugin
d3360cf3b6ad8b89b9c80fc806dc5d4ba373dd01
[ "Apache-2.0" ]
9
2016-11-20T08:00:27.000Z
2019-01-28T22:03:31.000Z
ironic_tempest_plugin/tests/scenario/ironic_standalone/test_ramdisk_iso.py
ameya-r/ironic-tempest-plugin
d3360cf3b6ad8b89b9c80fc806dc5d4ba373dd01
[ "Apache-2.0" ]
2
2018-12-07T11:14:14.000Z
2022-01-19T10:25:28.000Z
ironic_tempest_plugin/tests/scenario/ironic_standalone/test_ramdisk_iso.py
ameya-r/ironic-tempest-plugin
d3360cf3b6ad8b89b9c80fc806dc5d4ba373dd01
[ "Apache-2.0" ]
7
2017-12-11T18:07:47.000Z
2021-10-21T05:07:02.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
35.06
75
0.727325
3e01024cab28256791d4ce424b896dc6c1a82a70
3,690
py
Python
ve/unit/test_randomization.py
fvutils/py-vsc
e30ffae1b750d8182d102b1fe5b1cfdce017a092
[ "Apache-2.0" ]
null
null
null
ve/unit/test_randomization.py
fvutils/py-vsc
e30ffae1b750d8182d102b1fe5b1cfdce017a092
[ "Apache-2.0" ]
null
null
null
ve/unit/test_randomization.py
fvutils/py-vsc
e30ffae1b750d8182d102b1fe5b1cfdce017a092
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
31.271186
129
0.51626
92c0ca8a21348147ca94c28fd27dbec36dd1af80
5,553
py
Python
visualization.py
Jabb0/FastFlow3D
cdc2a547268b85d0c851cf87786d80fcde4e8487
[ "MIT" ]
6
2021-10-14T03:30:32.000Z
2022-03-25T07:16:03.000Z
visualization.py
Jabb0/FastFlow3D
cdc2a547268b85d0c851cf87786d80fcde4e8487
[ "MIT" ]
2
2021-10-08T09:06:24.000Z
2022-03-26T10:37:22.000Z
visualization.py
Jabb0/FastFlow3D
cdc2a547268b85d0c851cf87786d80fcde4e8487
[ "MIT" ]
null
null
null
from argparse import ArgumentParser import yaml from data.WaymoDataset import WaymoDataset from data.util import ApplyPillarization, drop_points_function from utils import str2bool from visualization.util import predict_and_store_flows, flows_exist from models.FastFlow3DModelScatter import FastFlow3DModelScatter # v...
46.663866
118
0.638934
f9e4099323cb3b862a1e13cb38b93a612c9254ff
230
py
Python
rss_scraper/feeds/enums.py
muhammad-mamdouh/rss-scraper
a49f09e4ebc147b1de58ed3dce95a76400dac832
[ "MIT" ]
null
null
null
rss_scraper/feeds/enums.py
muhammad-mamdouh/rss-scraper
a49f09e4ebc147b1de58ed3dce95a76400dac832
[ "MIT" ]
null
null
null
rss_scraper/feeds/enums.py
muhammad-mamdouh/rss-scraper
a49f09e4ebc147b1de58ed3dce95a76400dac832
[ "MIT" ]
null
null
null
from enum import Enum from django.db import models class ItemStatus(models.IntegerChoices): NEW, READ = range(1, 3) class FeedParsingErrorCodes(Enum): IS_GONE = 410 URL_CHANGED = 301 CONTENT_NOT_CHANGED = 304
16.428571
40
0.726087
9846261d303995c8cf4d857d7737505b89ab8b81
6,254
py
Python
src/einsteinpy/symbolic/weyl.py
bibek22/einsteinpy
78bf5d942cbb12393852f8e4d7a8426f1ffe6f23
[ "MIT" ]
485
2019-02-04T09:15:22.000Z
2022-03-19T13:50:17.000Z
src/einsteinpy/symbolic/weyl.py
bibek22/einsteinpy
78bf5d942cbb12393852f8e4d7a8426f1ffe6f23
[ "MIT" ]
570
2019-02-02T10:57:27.000Z
2022-02-26T16:37:05.000Z
src/einsteinpy/symbolic/weyl.py
bibek22/einsteinpy
78bf5d942cbb12393852f8e4d7a8426f1ffe6f23
[ "MIT" ]
250
2019-01-30T14:14:14.000Z
2022-02-28T21:18:18.000Z
import numpy as np import sympy from einsteinpy.symbolic.helpers import _change_name from einsteinpy.symbolic.ricci import RicciScalar, RicciTensor from einsteinpy.symbolic.riemann import RiemannCurvatureTensor from einsteinpy.symbolic.tensor import BaseRelativityTensor, _change_config class WeylTensor(BaseRelativit...
36.573099
136
0.550847
8d0874b74bf2de8ffc385689980e859600b0c089
6,136
py
Python
tools/coresctostandoff.py
bepnye/brat
28acfb2d3cce20bd4d4ff1a67690e271675841f2
[ "CC-BY-3.0" ]
17
2017-09-14T07:21:37.000Z
2021-12-07T03:17:05.000Z
tools/coresctostandoff.py
bepnye/brat
28acfb2d3cce20bd4d4ff1a67690e271675841f2
[ "CC-BY-3.0" ]
7
2015-04-11T12:57:42.000Z
2016-04-08T13:43:44.000Z
tools/coresctostandoff.py
bepnye/brat
28acfb2d3cce20bd4d4ff1a67690e271675841f2
[ "CC-BY-3.0" ]
5
2017-09-14T07:21:55.000Z
2021-01-27T01:50:19.000Z
#!/usr/bin/env python import sys import re try: import cElementTree as ET except: import xml.etree.cElementTree as ET # tags of elements to exclude from standoff output # (not used now; anything not explicitly converted is excluded) EXCLUDED_TAGS = [ # "SP", # "IT", # "SB", # "REF", # "P",...
26.79476
86
0.538625
62fcc369b13216fd0e2be676ec660693c948412c
4,215
py
Python
city_scrapers/spiders/chi_ssa_48.py
MAYANK25402/city-scrapers
08f92ec5b68682a8120eee1a13c4a03fe0335b9e
[ "MIT" ]
255
2018-03-06T20:12:03.000Z
2022-03-05T03:06:45.000Z
city_scrapers/spiders/chi_ssa_48.py
MAYANK25402/city-scrapers
08f92ec5b68682a8120eee1a13c4a03fe0335b9e
[ "MIT" ]
514
2018-02-02T16:12:50.000Z
2022-03-21T20:07:35.000Z
city_scrapers/spiders/chi_ssa_48.py
MAYANK25402/city-scrapers
08f92ec5b68682a8120eee1a13c4a03fe0335b9e
[ "MIT" ]
342
2018-02-03T04:05:37.000Z
2022-03-18T16:34:58.000Z
import re from datetime import datetime from city_scrapers_core.constants import COMMISSION from city_scrapers_core.items import Meeting from city_scrapers_core.spiders import CityScrapersSpider # TODO: Fix class ChiSsa48Spider(CityScrapersSpider): name = "chi_ssa_48" agency = "Chicago Special Service Area #...
36.025641
88
0.559193
01f146e0aa9d8cce76dcf4fadb963ca6814f4017
110,449
py
Python
o3seespy/command/element/bearing.py
o3seespy/o3seespy
4fdd942370df1ac8d454e361f651405717b8584c
[ "MIT", "BSD-3-Clause" ]
16
2019-10-24T17:58:46.000Z
2022-03-01T19:48:06.000Z
o3seespy/command/element/bearing.py
o3seespy/o3seespy
4fdd942370df1ac8d454e361f651405717b8584c
[ "MIT", "BSD-3-Clause" ]
5
2020-04-17T01:39:27.000Z
2020-12-18T05:07:58.000Z
o3seespy/command/element/bearing.py
o3seespy/o3seespy
4fdd942370df1ac8d454e361f651405717b8584c
[ "MIT", "BSD-3-Clause" ]
6
2020-02-20T02:13:11.000Z
2021-11-01T19:08:41.000Z
from o3seespy.command.element.base_element import ElementBase class ElastomericBearingPlasticity2D(ElementBase): """ The ElastomericBearingPlasticity2D Element Class This command is used to construct an elastomericBearing element object, which is defined by two nodes. The element can have zero le...
45.677833
521
0.614492
45b1ee03736280cebcc40ed2096786f738993b8b
3,311
py
Python
frameworks/hdfs/tests/test_tls.py
jorgelopez1/hdfs
892589180438b90486ec7530d2a63c218b20e79f
[ "Apache-2.0" ]
null
null
null
frameworks/hdfs/tests/test_tls.py
jorgelopez1/hdfs
892589180438b90486ec7530d2a63c218b20e79f
[ "Apache-2.0" ]
null
null
null
frameworks/hdfs/tests/test_tls.py
jorgelopez1/hdfs
892589180438b90486ec7530d2a63c218b20e79f
[ "Apache-2.0" ]
null
null
null
import pytest import sdk_cmd import sdk_install import sdk_hosts import sdk_plan import sdk_security import sdk_utils import shakedown from tests import config from tests.config import ( DEFAULT_TASK_COUNT, PACKAGE_NAME, SERVICE_NAME, ) DEFAULT_JOURNAL_NODE_TLS_PORT = 8481 DEFAULT_NAME_NODE_TLS_PORT = 90...
26.918699
77
0.693144
ffaa3f5c0e98f247f46a60629d7d1351f6447702
1,568
py
Python
docs/examples/nrelcsm/example.py
ptrbortolotti/WISDEM
2b7e44716d022e2f62140073dd078c5deeb8bf0a
[ "Apache-2.0" ]
1
2020-06-02T14:58:28.000Z
2020-06-02T14:58:28.000Z
docs/examples/nrelcsm/example.py
ptrbortolotti/WISDEM
2b7e44716d022e2f62140073dd078c5deeb8bf0a
[ "Apache-2.0" ]
5
2016-05-27T07:50:55.000Z
2020-05-03T21:28:22.000Z
docs/examples/nrelcsm/example.py
ptrbortolotti/WISDEM
2b7e44716d022e2f62140073dd078c5deeb8bf0a
[ "Apache-2.0" ]
2
2018-12-27T06:14:57.000Z
2021-04-19T18:39:36.000Z
# 1 --------- from NREL_CSM.config import * from NREL_CSM.csm import csm # 1 --------- # 2 --------- #Default Cost and Scaling Model inputs for 5 MW turbine (onshore) ppi.curr_yr = 2009 ppi.curr_mon = 12 hubHeight=90.0 ratedPower=5000.0 maxTipSpd=80.0 rotorDiam=126.0 dtDesign=1 nblades = 3 altitude=0.0 thrustC...
24.123077
225
0.684949
dc8bd6768180bffa0efdbe8d2fce656a4a308149
23,150
py
Python
xldlib/objects/abstract/dataframe.py
Alexhuszagh/XLDiscoverer
60937b1f7f2e23af4219eb26519d6b83fb4232d6
[ "Apache-2.0", "MIT" ]
null
null
null
xldlib/objects/abstract/dataframe.py
Alexhuszagh/XLDiscoverer
60937b1f7f2e23af4219eb26519d6b83fb4232d6
[ "Apache-2.0", "MIT" ]
null
null
null
xldlib/objects/abstract/dataframe.py
Alexhuszagh/XLDiscoverer
60937b1f7f2e23af4219eb26519d6b83fb4232d6
[ "Apache-2.0", "MIT" ]
null
null
null
''' Objects/Abstract/dataframe ________________________ Custom data holders for dataframe-like mapping types. :copyright: (c) 2015 The Regents of the University of California. :license: GNU GPL, see licenses/GNU GPLv3.txt for more details. ''' # load modules import operator as op import weakref ...
30.621693
79
0.553089
e9f0473d1aedaa081d08f5ff15ad579b8014577f
6,613
py
Python
python/tests/api/expressions/test_inclusive_metrics_evaluator.py
moulimukherjee/incubator-iceberg
bf7edc4b325df6dd80d86fea0149d2be0ad09468
[ "Apache-2.0" ]
2,161
2020-05-28T01:20:01.000Z
2022-03-31T14:48:04.000Z
python/tests/api/expressions/test_inclusive_metrics_evaluator.py
moulimukherjee/incubator-iceberg
bf7edc4b325df6dd80d86fea0149d2be0ad09468
[ "Apache-2.0" ]
3,096
2020-05-27T20:57:13.000Z
2022-03-31T22:55:42.000Z
python/tests/api/expressions/test_inclusive_metrics_evaluator.py
moulimukherjee/incubator-iceberg
bf7edc4b325df6dd80d86fea0149d2be0ad09468
[ "Apache-2.0" ]
879
2020-05-28T01:20:01.000Z
2022-03-31T12:48:48.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...
50.480916
115
0.72418
91665f41c154bc1000aae6cd406068ca46b3849b
1,788
py
Python
ginga/mockw/ImageViewCanvasMock.py
kyraikeda/ginga
e0ce979de4a87e12ba7a90eec0517a0be05d14bc
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
76
2015-01-05T14:46:14.000Z
2022-03-23T04:10:54.000Z
ginga/mockw/ImageViewCanvasMock.py
kyraikeda/ginga
e0ce979de4a87e12ba7a90eec0517a0be05d14bc
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
858
2015-01-17T01:55:12.000Z
2022-03-08T20:20:31.000Z
ginga/mockw/ImageViewCanvasMock.py
kyraikeda/ginga
e0ce979de4a87e12ba7a90eec0517a0be05d14bc
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
60
2015-01-14T21:59:07.000Z
2022-02-13T03:38:49.000Z
# # ImageViewCanvasMock.py -- A Ginga image widget with canvas drawing in mock # widget set # # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # from ginga.mockw import ImageViewMock from ginga.canvas.mixins import DrawingMixin, Canv...
33.735849
76
0.606823
62198d6ddfc87ec6cd6e287961ec1d735b3976c6
10,157
py
Python
Extras/SMI_LSL/DataStreaming.py
HIIT/PeyeDF
55702482415a4a74820e1eb10536787a238a1054
[ "MIT" ]
3
2019-10-01T08:30:04.000Z
2021-12-08T18:18:01.000Z
Extras/SMI_LSL/DataStreaming.py
HIIT/PeyeDF
55702482415a4a74820e1eb10536787a238a1054
[ "MIT" ]
null
null
null
Extras/SMI_LSL/DataStreaming.py
HIIT/PeyeDF
55702482415a4a74820e1eb10536787a238a1054
[ "MIT" ]
1
2021-12-06T11:41:40.000Z
2021-12-06T11:41:40.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # ----------------------------------------------------------------------- # # (c) Copyright 1997-2013, SensoMotoric Instruments GmbH, Alto University # # Permission is hereby granted, free of charge, to any person or # organization obtaining a copy of t...
38.184211
187
0.624594
1469618a58df76cc811c3995a87fe79c3eabbbd2
57,138
py
Python
test/functional/test_framework/mininode.py
dartdart26/paicoin
5c233cf46dfd73fec8ce4934822bd687ec1c2ee4
[ "MIT" ]
1
2018-08-06T14:38:53.000Z
2018-08-06T14:38:53.000Z
test/functional/test_framework/mininode.py
git-nkliyc/paicoin
f621533b53cab0e3387b22dd0d6be860f077c270
[ "MIT" ]
null
null
null
test/functional/test_framework/mininode.py
git-nkliyc/paicoin
f621533b53cab0e3387b22dd0d6be860f077c270
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2010 ArtForz -- public domain half-a-node # Copyright (c) 2012 Jeff Garzik # Copyright (c) 2010-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """PAIcoin P2P ...
31.002713
262
0.597711
8e3d28f91cef4f9fba9780228bf98342447cac02
20,100
py
Python
venv/lib/python3.6/site-packages/twilio/rest/api/v2010/account/conference/recording.py
fernandoleira/stocktext
f755f83ffdaee3b179e21de955854354aced9134
[ "MIT" ]
null
null
null
venv/lib/python3.6/site-packages/twilio/rest/api/v2010/account/conference/recording.py
fernandoleira/stocktext
f755f83ffdaee3b179e21de955854354aced9134
[ "MIT" ]
11
2019-12-26T17:21:03.000Z
2022-03-21T22:17:07.000Z
venv/lib/python3.6/site-packages/twilio/rest/api/v2010/account/conference/recording.py
fernandoleira/stocktext
f755f83ffdaee3b179e21de955854354aced9134
[ "MIT" ]
null
null
null
# coding=utf-8 """ This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import serialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import ...
34.775087
121
0.626567
1ea7c34d9f4f3de0c3fc774af86916d218a6d39c
8,308
py
Python
sdks/python/apache_beam/io/filesystems_test.py
nancyxu123/beam
cd966ec35b6e534f11f1053f0846ae4e2dd25956
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause" ]
1
2022-02-25T21:58:19.000Z
2022-02-25T21:58:19.000Z
sdks/python/apache_beam/io/filesystems_test.py
nancyxu123/beam
cd966ec35b6e534f11f1053f0846ae4e2dd25956
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause" ]
1
2022-01-06T16:01:15.000Z
2022-01-06T16:01:15.000Z
sdks/python/apache_beam/io/filesystems_test.py
nancyxu123/beam
cd966ec35b6e534f11f1053f0846ae4e2dd25956
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause" ]
17
2021-12-15T19:31:54.000Z
2022-01-31T18:54:23.000Z
# -*- coding: utf-8 -*- # # 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 "L...
33.635628
79
0.675855
9881a15c04ec9d9703bbfc3f6b8dd9a7d9f62f0c
11,708
py
Python
apiclient/model.py
mdornseif/google-api-python-client
562ec98ea410793fe983f3ba72155fdacb80b4f6
[ "Apache-2.0" ]
null
null
null
apiclient/model.py
mdornseif/google-api-python-client
562ec98ea410793fe983f3ba72155fdacb80b4f6
[ "Apache-2.0" ]
null
null
null
apiclient/model.py
mdornseif/google-api-python-client
562ec98ea410793fe983f3ba72155fdacb80b4f6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python2.4 # # Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
30.489583
79
0.691835
4426554eaef7c5a7c16bba34a4b551d9b05e7d08
1,377
py
Python
aiida/backends/tests/orm/test_entities.py
borellim/aiida_core
eebef392c81e8b130834a92e1d7abf5e2e30b3ce
[ "BSD-2-Clause" ]
1
2019-03-15T10:37:53.000Z
2019-03-15T10:37:53.000Z
aiida/backends/tests/orm/test_entities.py
odarbelaeze/aiida_core
934b4ccdc73a993f2a6656caf516500470e3da08
[ "BSD-2-Clause" ]
null
null
null
aiida/backends/tests/orm/test_entities.py
odarbelaeze/aiida_core
934b4ccdc73a993f2a6656caf516500470e3da08
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
44.419355
90
0.578794
25635d42c141a29dcd741bb6e45f94955c0e9255
16,944
py
Python
src/sage/combinat/sf/homogeneous.py
yzpopulation/sage
d2dc2f80b5a8e039701e292653e25366e3e5ec1e
[ "BSL-1.0" ]
null
null
null
src/sage/combinat/sf/homogeneous.py
yzpopulation/sage
d2dc2f80b5a8e039701e292653e25366e3e5ec1e
[ "BSL-1.0" ]
null
null
null
src/sage/combinat/sf/homogeneous.py
yzpopulation/sage
d2dc2f80b5a8e039701e292653e25366e3e5ec1e
[ "BSL-1.0" ]
null
null
null
r""" Homogeneous symmetric functions By this we mean the basis formed of the complete homogeneous symmetric functions `h_\lambda`, not an arbitrary graded basis. """ #***************************************************************************** # Copyright (C) 2007 Mike Hansen <mhansen@gmail.com> # ...
38.076404
152
0.517469
b151f11e641a963f227e99d999eec86b1cb2268c
4,016
py
Python
dataprep/eda/report.py
kla55/dataprep
75542cda64570f1fe3c4ac61e670cc0ce2febaa3
[ "MIT" ]
null
null
null
dataprep/eda/report.py
kla55/dataprep
75542cda64570f1fe3c4ac61e670cc0ce2febaa3
[ "MIT" ]
null
null
null
dataprep/eda/report.py
kla55/dataprep
75542cda64570f1fe3c4ac61e670cc0ce2febaa3
[ "MIT" ]
null
null
null
""" This module implements the Report class. """ import sys import webbrowser from pathlib import Path from tempfile import NamedTemporaryFile from bokeh.io import save from bokeh.io.notebook import load_notebook from bokeh.embed.notebook import notebook_content from bokeh.models import LayoutDOM from bokeh.resou...
29.748148
160
0.580428
507db557c66fa71194a9097947163d9aca1b10c2
256
py
Python
exe020.py
evertondutra/Curso_em-_Video_Python
c44b0ca79d3a5f3d0db0f9a8b32a1ea210d07bba
[ "MIT" ]
null
null
null
exe020.py
evertondutra/Curso_em-_Video_Python
c44b0ca79d3a5f3d0db0f9a8b32a1ea210d07bba
[ "MIT" ]
null
null
null
exe020.py
evertondutra/Curso_em-_Video_Python
c44b0ca79d3a5f3d0db0f9a8b32a1ea210d07bba
[ "MIT" ]
null
null
null
import random n1 = input('Digite o primeiro nome: ') n2 = input('Digite o segundo aluno: ') n3 = input('Digite o terceiro aluno: ') n4 = input('Digite o quarto aluno: ') lista = [n1, n2, n3, n4] random.shuffle(lista) print(f'A ordem sorteada é\n {lista}')
28.444444
39
0.679688
270119555534cf1232b5587bbaf0870c550e606d
4,678
py
Python
onlinecourse/models.py
twicechild/ibm-final-cloud-app-with-database
235237fa0873351377a78055ee7276f0af2f9ff8
[ "Apache-2.0" ]
1
2022-02-15T11:25:32.000Z
2022-02-15T11:25:32.000Z
onlinecourse/models.py
twicechild/ibm-final-cloud-app-with-database
235237fa0873351377a78055ee7276f0af2f9ff8
[ "Apache-2.0" ]
null
null
null
onlinecourse/models.py
twicechild/ibm-final-cloud-app-with-database
235237fa0873351377a78055ee7276f0af2f9ff8
[ "Apache-2.0" ]
null
null
null
import sys from django.utils.timezone import now try: from django.db import models except Exception: print("There was an error loading django modules. Do you have django installed?") sys.exit() from django.conf import settings import uuid # Instructor model class Instructor(models.Model): user = mode...
34.145985
104
0.703292
ddfd7f23264a201a727793c7063f8cb1a4a6d175
287
py
Python
ch4/outer.py
chunhua2017/pythonprogrammingdemo
64e4ac2b33c54cde4671291a6203e94cd96de4ba
[ "MIT" ]
4
2020-05-18T05:25:44.000Z
2021-07-30T01:02:39.000Z
ch4/outer.py
chunhua2017/pythonprogrammingdemo
64e4ac2b33c54cde4671291a6203e94cd96de4ba
[ "MIT" ]
null
null
null
ch4/outer.py
chunhua2017/pythonprogrammingdemo
64e4ac2b33c54cde4671291a6203e94cd96de4ba
[ "MIT" ]
2
2021-09-15T05:41:05.000Z
2022-01-25T05:44:43.000Z
x = 10 #全局变量 def outer(): x = 20 #对outer()来说是局部变量 #对inner()来说是非局部变量 def inner(): x = 30 #对inner()来说是局部变量 print("From inner():x={0:d}".format(x)) inner() print("From outer():x={0:d}".format(x)) outer() print("From module:x={0:d}".format(x))
20.5
47
0.529617
720f4750294440fc808123c80162d2bafde03333
1,538
py
Python
example/config.py
slippers/Flask-Prose
809f563d16f1e3e6b5cab5bee84033934122aa6a
[ "MIT" ]
null
null
null
example/config.py
slippers/Flask-Prose
809f563d16f1e3e6b5cab5bee84033934122aa6a
[ "MIT" ]
null
null
null
example/config.py
slippers/Flask-Prose
809f563d16f1e3e6b5cab5bee84033934122aa6a
[ "MIT" ]
null
null
null
import os import binascii from tempfile import gettempdir def basedir(): return os.path.abspath(os.path.dirname(os.path.dirname(__file__))) class BaseConfig(object): SITE_NAME = 'Default' DEBUG = False TESTING = False SECRET_KEY = binascii.hexlify(os.urandom(24)) # flask-sqlalchemy DATA...
22.617647
70
0.674902
e5643f526246e6dc61d0ac17c4138f7244be9626
3,994
py
Python
model-optimizer/mo/front/mxnet/loader_test.py
calvinfeng/openvino
11f591c16852637506b1b40d083b450e56d0c8ac
[ "Apache-2.0" ]
null
null
null
model-optimizer/mo/front/mxnet/loader_test.py
calvinfeng/openvino
11f591c16852637506b1b40d083b450e56d0c8ac
[ "Apache-2.0" ]
19
2021-03-26T08:11:00.000Z
2022-02-21T13:06:26.000Z
model-optimizer/mo/front/mxnet/loader_test.py
calvinfeng/openvino
11f591c16852637506b1b40d083b450e56d0c8ac
[ "Apache-2.0" ]
1
2021-07-28T17:30:46.000Z
2021-07-28T17:30:46.000Z
""" Copyright (C) 2018-2021 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 i...
43.413043
134
0.704056
fdea68eb9085eed64528ee2b94b401d74d1530a8
5,762
py
Python
python/foglamp/services/core/api/configuration.py
praveen-garg/FogLAMP
abdec78b59c562513478d64402cdfc9681dc9dc0
[ "Apache-2.0" ]
1
2017-08-16T22:34:27.000Z
2017-08-16T22:34:27.000Z
python/foglamp/services/core/api/configuration.py
praveen-garg/FogLAMP
abdec78b59c562513478d64402cdfc9681dc9dc0
[ "Apache-2.0" ]
35
2017-07-05T06:26:35.000Z
2017-12-28T12:27:00.000Z
python/foglamp/services/core/api/configuration.py
praveen-garg/FogLAMP
abdec78b59c562513478d64402cdfc9681dc9dc0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # FOGLAMP_BEGIN # See: http://foglamp.readthedocs.io/ # FOGLAMP_END from aiohttp import web from foglamp.services.core import connect from foglamp.common.configuration_manager import ConfigurationManager __author__ = "Amarendra K. Sinha, Ashish Jabble" __copyright__ = "Copyright (c) 2017 OSIs...
34.297619
154
0.657931
55b273c22418a96a41e25ffafac455847b208900
24,899
py
Python
vaspy/atomco.py
MrLonelyZC88/VASPy
9edd6cb02a08653a0de5ad501496827cd5a19147
[ "MIT" ]
1
2018-11-29T13:04:36.000Z
2018-11-29T13:04:36.000Z
vaspy/atomco.py
MrLonelyZC88/VASPy
9edd6cb02a08653a0de5ad501496827cd5a19147
[ "MIT" ]
null
null
null
vaspy/atomco.py
MrLonelyZC88/VASPy
9edd6cb02a08653a0de5ad501496827cd5a19147
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- """ =================================================================== Provide coordinate file class which do operations on these files. =================================================================== Written by PytLab <shaozhengjiang@gmail.com>, November 2014 Updated by PytLab <shaozhengjia...
34.06156
94
0.506205
2420d0f54f7c2111520b8c2f8471162e1fb1a3df
23,079
py
Python
services/web/server/src/simcore_service_webserver/resource_manager/garbage_collector.py
GitHK/osparc-simcore-forked
5b01a28d1b8028afcf9a735e1d46a73daa13686e
[ "MIT" ]
null
null
null
services/web/server/src/simcore_service_webserver/resource_manager/garbage_collector.py
GitHK/osparc-simcore-forked
5b01a28d1b8028afcf9a735e1d46a73daa13686e
[ "MIT" ]
17
2020-10-15T16:06:05.000Z
2022-03-21T18:48:21.000Z
services/web/server/src/simcore_service_webserver/resource_manager/garbage_collector.py
GitHK/osparc-simcore-forked
5b01a28d1b8028afcf9a735e1d46a73daa13686e
[ "MIT" ]
null
null
null
import asyncio import logging from contextlib import suppress from itertools import chain from typing import Dict, List, Tuple from aiohttp import web from aiopg.sa.result import RowProxy from aioredlock import Aioredlock from servicelib.observer import emit from servicelib.utils import logged_gather from simcore_ser...
38.147107
112
0.661554
e8af60906df92e7c9a00c23b9577061c95b081da
1,112
py
Python
python_scripts/logging/main.py
NostraDavid/GODS
101777d50d3a9b0a22865cca7ccb4a09f1bc65c5
[ "MIT" ]
1
2022-02-05T06:36:19.000Z
2022-02-05T06:36:19.000Z
python_scripts/logging/main.py
NostraDavid/GODS
101777d50d3a9b0a22865cca7ccb4a09f1bc65c5
[ "MIT" ]
null
null
null
python_scripts/logging/main.py
NostraDavid/GODS
101777d50d3a9b0a22865cca7ccb4a09f1bc65c5
[ "MIT" ]
null
null
null
# pip install structlog colorama from structlog import get_logger log = get_logger() log.info("key_value_logging", out_of_the_box=True, effort=0) from structlog.processors import format_exc_info try: raise ValueError except ValueError: format_exc_info(None, None, {"exc_info": True}) import structlog log = st...
28.512821
72
0.757194
267891bc657dffd35f68951ca94c9d961818efdb
391
py
Python
TuShare/wsgi.py
lwh2015/TuShare
f244e05e5cf208e18e6237d3b81f71f0d3c1394a
[ "MIT" ]
1
2018-09-26T08:34:02.000Z
2018-09-26T08:34:02.000Z
TuShare/wsgi.py
lwh2015/TuShare
f244e05e5cf208e18e6237d3b81f71f0d3c1394a
[ "MIT" ]
null
null
null
TuShare/wsgi.py
lwh2015/TuShare
f244e05e5cf208e18e6237d3b81f71f0d3c1394a
[ "MIT" ]
null
null
null
""" WSGI config for TuShare project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTI...
23
78
0.785166
a43bef9ef6becd116f92f625425181c851908247
295
py
Python
yahoo_auc_crawler/pipelines.py
lamphanqg/yahoo_auction_crawler
2800527dfb24f2283cb8fe7e7ec6faa577b4acb2
[ "MIT" ]
1
2021-11-15T01:33:13.000Z
2021-11-15T01:33:13.000Z
yahoo_auc_crawler/pipelines.py
lamphanqg/yahoo_auction_crawler
2800527dfb24f2283cb8fe7e7ec6faa577b4acb2
[ "MIT" ]
null
null
null
yahoo_auc_crawler/pipelines.py
lamphanqg/yahoo_auction_crawler
2800527dfb24f2283cb8fe7e7ec6faa577b4acb2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html class YahooAucCrawlerPipeline(object): def process_item(self, item, spider): return item
24.583333
65
0.718644
25b7e5060f27278bc0ae9ff827fb12480fc04c88
890
py
Python
thefuck/rules/git_branch_exists.py
pybenchmark/thefuck
993a661c6048063e84645015cc832602b6ec32df
[ "MIT" ]
1
2020-12-23T15:56:56.000Z
2020-12-23T15:56:56.000Z
thefuck/rules/git_branch_exists.py
pybenchmark/thefuck
993a661c6048063e84645015cc832602b6ec32df
[ "MIT" ]
4
2020-12-23T15:44:08.000Z
2020-12-23T16:48:59.000Z
thefuck/rules/git_branch_exists.py
pybenchmark/thefuck
993a661c6048063e84645015cc832602b6ec32df
[ "MIT" ]
1
2020-12-23T14:46:54.000Z
2020-12-23T14:46:54.000Z
import re from thefuck.shells import shell from thefuck.specific.git import git_support from thefuck.utils import eager @git_support def match(command): return ("fatal: A branch named '" in command.stderr and " already exists." in command.stderr) @git_support @eager def get_new_command(command): ...
35.6
78
0.58764
07aa7b41a6420a3433a66b65e5defd216b520197
2,087
py
Python
src/mnist_reader.py
arjun-krishna/Multi-Layered-Perceptron
48afae44ae6ea118af941e2dc3b33e5313f14282
[ "MIT" ]
4
2017-11-18T17:30:41.000Z
2022-01-12T21:39:04.000Z
src/mnist_reader.py
arjun-krishna/Multi-Layered-Perceptron
48afae44ae6ea118af941e2dc3b33e5313f14282
[ "MIT" ]
null
null
null
src/mnist_reader.py
arjun-krishna/Multi-Layered-Perceptron
48afae44ae6ea118af941e2dc3b33e5313f14282
[ "MIT" ]
null
null
null
""" @author : arjun-krishna @desc : Read the byte encoded MNIST data in Lecun's page """ from __future__ import print_function import struct import numpy as np from PIL import Image """ display flattended image with (r,c) dimension """ def display_img(img, r, c, file=None) : img = img.reshape(r,c) disp = Image.from...
27.826667
67
0.587925
4aeb5cb919a70c0ac2be053ebf69b329fe3c2ae2
109
py
Python
tests/test_advanced.py
dhaitz/python-package-template
b4c636e48ae192e5efe30fe71af37be6f8273d29
[ "BSD-2-Clause" ]
null
null
null
tests/test_advanced.py
dhaitz/python-package-template
b4c636e48ae192e5efe30fe71af37be6f8273d29
[ "BSD-2-Clause" ]
null
null
null
tests/test_advanced.py
dhaitz/python-package-template
b4c636e48ae192e5efe30fe71af37be6f8273d29
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from .context import sample def test_thoughts(): assert(sample.hmm() is None)
13.625
32
0.642202
7cbfd1a6b67b408811681c1aac18d72fe14509b4
13,817
py
Python
virtualenv/lib/python3.6/site-packages/sphinx/apidoc.py
coderunn3r/HadoopSpike
3e57219d0489fae1d755bc4bd97eaf22f1898464
[ "MIT" ]
null
null
null
virtualenv/lib/python3.6/site-packages/sphinx/apidoc.py
coderunn3r/HadoopSpike
3e57219d0489fae1d755bc4bd97eaf22f1898464
[ "MIT" ]
null
null
null
virtualenv/lib/python3.6/site-packages/sphinx/apidoc.py
coderunn3r/HadoopSpike
3e57219d0489fae1d755bc4bd97eaf22f1898464
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ sphinx.apidoc ~~~~~~~~~~~~~ Parses a directory tree looking for Python modules and packages and creates ReST files appropriately to create code documentation with Sphinx. It also creates a modules index (named modules.<suffix>). This is derived from the "sphinx-aut...
37.958791
80
0.581602
5aedcd9ea35efc8e64aacddccafcceccd0463f47
8,403
py
Python
doc/source/conf.py
liguowang/epage
2ce60ddbcd23f06dc4d635681e8e52b66ba519f9
[ "MIT" ]
null
null
null
doc/source/conf.py
liguowang/epage
2ce60ddbcd23f06dc4d635681e8e52b66ba519f9
[ "MIT" ]
null
null
null
doc/source/conf.py
liguowang/epage
2ce60ddbcd23f06dc4d635681e8e52b66ba519f9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # CpGtools documentation build configuration file, created by # sphinx-quickstart on Thu Jue 25 12:09:37 2019. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # A...
30.78022
80
0.712841
5616d6dd6b5e5bd1e3e8dfef90a2c1d76566de03
2,959
py
Python
abstract-codegen/src/atmfjstc/lib/abstract_codegen/ast/text.py
goc9000/python-library
0a4a09278df6e84061baedda8997071e2201103f
[ "MIT" ]
null
null
null
abstract-codegen/src/atmfjstc/lib/abstract_codegen/ast/text.py
goc9000/python-library
0a4a09278df6e84061baedda8997071e2201103f
[ "MIT" ]
null
null
null
abstract-codegen/src/atmfjstc/lib/abstract_codegen/ast/text.py
goc9000/python-library
0a4a09278df6e84061baedda8997071e2201103f
[ "MIT" ]
null
null
null
from textwrap import dedent, wrap from typing import Iterable from atmfjstc.lib.text_utils import split_paragraphs from atmfjstc.lib.abstract_codegen.CodegenContext import CodegenContext from atmfjstc.lib.abstract_codegen.ast.base import AbstractCodegenASTNode class ReflowableText(AbstractCodegenASTNode): """ ...
34.811765
115
0.640419
3acbc7bf73e1abc5f694c29f63268f2fc79aad7c
3,486
py
Python
chat_backend/settings.py
CTXO/Chat-App
98c25905c0f897826e786b18d2d512b063bda957
[ "MIT" ]
2
2021-10-03T01:02:49.000Z
2021-11-20T13:46:39.000Z
chat_backend/settings.py
CTXO/Chat-App
98c25905c0f897826e786b18d2d512b063bda957
[ "MIT" ]
null
null
null
chat_backend/settings.py
CTXO/Chat-App
98c25905c0f897826e786b18d2d512b063bda957
[ "MIT" ]
null
null
null
""" Django settings for chat_backend project. Generated by 'django-admin startproject' using Django 3.2.7. For more information on this file, see https://docs.djangoproject.com/en/3.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.2/ref/settings/ """ from pa...
24.723404
83
0.699369
06d11dba522d4b4aaf61dfbaad74271ee37a0f7c
1,145
py
Python
vis/grad_modifiers.py
chrisPiemonte/keras-vis
b1e44e3b480bec0c51b38f85bdc4fbaffc954a31
[ "MIT" ]
null
null
null
vis/grad_modifiers.py
chrisPiemonte/keras-vis
b1e44e3b480bec0c51b38f85bdc4fbaffc954a31
[ "MIT" ]
null
null
null
vis/grad_modifiers.py
chrisPiemonte/keras-vis
b1e44e3b480bec0c51b38f85bdc4fbaffc954a31
[ "MIT" ]
1
2019-08-07T12:39:21.000Z
2019-08-07T12:39:21.000Z
from __future__ import absolute_import import numpy as np from tensorflow.keras import backend as K def negate(grads): """Negates the gradients. Args: grads: A numpy array of grads to use. Returns: The negated gradients. """ return -grads def absolute(grads): """Computes a...
17.348485
59
0.614847
291ffabb09df503c0497fd82cc9202748ceb8a98
1,601
py
Python
src/baboon_tracking/stages/motion_detector/quantize_history_frames.py
philipper905/baboon-tracking
d68735a7889a09516610f77969550aec74b769f2
[ "MIT" ]
null
null
null
src/baboon_tracking/stages/motion_detector/quantize_history_frames.py
philipper905/baboon-tracking
d68735a7889a09516610f77969550aec74b769f2
[ "MIT" ]
null
null
null
src/baboon_tracking/stages/motion_detector/quantize_history_frames.py
philipper905/baboon-tracking
d68735a7889a09516610f77969550aec74b769f2
[ "MIT" ]
null
null
null
"""Quantizes the shifted history frame.""" import numpy as np from baboon_tracking.mixins.shifted_history_frames_mixin import ( ShiftedHistoryFramesMixin, ) from baboon_tracking.models.frame import Frame from baboon_tracking.mixins.quantized_frames_mixin import QuantizedFramesMixin from pipeline.decorators...
34.06383
88
0.690194
273e420cf8e81a491a1bc5b137a7eca834f277ec
3,759
py
Python
worlds/admin.py
veselosky/storyworlds
7ad6f09787d0a4566abd2b29472e4faf84f8ea34
[ "Apache-2.0" ]
null
null
null
worlds/admin.py
veselosky/storyworlds
7ad6f09787d0a4566abd2b29472e4faf84f8ea34
[ "Apache-2.0" ]
3
2020-02-12T00:30:03.000Z
2021-03-18T22:20:33.000Z
worlds/admin.py
veselosky/storyworlds
7ad6f09787d0a4566abd2b29472e4faf84f8ea34
[ "Apache-2.0" ]
null
null
null
from adminsortable2.admin import SortableInlineAdminMixin from django.contrib import admin from django.contrib.gis import admin as geoadmin from .models import ( Character, Event, EventParticipation, FamilyTie, Honor, Organization, Place, Reference, Setting, Title, World, ) ...
26.471831
98
0.611865
544b715e064b6b7ed42de12f7249324adf021ef4
1,318
py
Python
test/lib/state.py
morgante/cnrm-blueprints
34453c4acde2cd321f71b76b3e6c6b086bc8ada1
[ "Apache-2.0" ]
9
2020-07-10T18:20:19.000Z
2021-10-08T23:58:06.000Z
test/lib/state.py
morgante/cnrm-blueprints
34453c4acde2cd321f71b76b3e6c6b086bc8ada1
[ "Apache-2.0" ]
1
2021-09-27T20:38:35.000Z
2021-09-27T20:38:35.000Z
test/lib/state.py
isabella232/cnrm-blueprints
19d7c459c4f71198208282da17bcade53d28cc9c
[ "Apache-2.0" ]
4
2020-07-10T23:22:20.000Z
2021-09-27T19:27:02.000Z
# 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, ...
26.36
77
0.640364
5e18e62000d6c7b649a59b4f642719462c1f8c59
48,180
py
Python
Python/multiscale_quad_retrieval.py
NeTatsu/video-diff
c2eb75373d20aefc82a0d8d198eddd7eb9b9675a
[ "BSD-3-Clause" ]
8
2017-03-20T16:40:04.000Z
2021-12-21T11:38:33.000Z
Python/multiscale_quad_retrieval.py
NeTatsu/video-diff
c2eb75373d20aefc82a0d8d198eddd7eb9b9675a
[ "BSD-3-Clause" ]
2
2019-12-19T23:22:05.000Z
2020-01-27T06:51:23.000Z
Python/multiscale_quad_retrieval.py
NeTatsu/video-diff
c2eb75373d20aefc82a0d8d198eddd7eb9b9675a
[ "BSD-3-Clause" ]
4
2017-02-22T12:39:29.000Z
2019-12-18T22:33:02.000Z
# !!!!TODO: takeout DBGPRINT - it's already replaced with common.MY_DEBUG_STDOUT (I think): import math import numpy as np from numpy import linalg as npla import cv2 import common import config import findquads import spatial_consistency import Matlab DBGPRINT = False #DBGPRINT = True #FILTER = False FILTER = Tr...
45.45283
195
0.480988
68b8c7b98c246d93e310c070b66e5e1f6e2939e4
4,118
py
Python
var/spack/repos/builtin/packages/trinity/package.py
adrianjhpc/spack
0a9e4fcee57911f2db586aa50c8873d9cca8de92
[ "ECL-2.0", "Apache-2.0", "MIT" ]
1
2019-09-15T23:55:48.000Z
2019-09-15T23:55:48.000Z
var/spack/repos/builtin/packages/trinity/package.py
adrianjhpc/spack
0a9e4fcee57911f2db586aa50c8873d9cca8de92
[ "ECL-2.0", "Apache-2.0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/trinity/package.py
adrianjhpc/spack
0a9e4fcee57911f2db586aa50c8873d9cca8de92
[ "ECL-2.0", "Apache-2.0", "MIT" ]
1
2017-01-21T17:19:32.000Z
2017-01-21T17:19:32.000Z
# Copyright 2013-2019 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 Trinity(MakefilePackage): """Trinity, developed at the Broad Institute and the Hebrew Univ...
43.808511
95
0.654444
0c7e4c094a7edb698c93923ce8ecc247c9b2b933
2,132
py
Python
rnbgrader/grids.py
matthew-brett/rnbgrader
f07494f59dd0d1cb97c094ac2ea9e9d1243f0f70
[ "BSD-2-Clause" ]
null
null
null
rnbgrader/grids.py
matthew-brett/rnbgrader
f07494f59dd0d1cb97c094ac2ea9e9d1243f0f70
[ "BSD-2-Clause" ]
null
null
null
rnbgrader/grids.py
matthew-brett/rnbgrader
f07494f59dd0d1cb97c094ac2ea9e9d1243f0f70
[ "BSD-2-Clause" ]
null
null
null
""" Calculate answer, evaluated chunk score grids A grid is a 2D array, with rows corresponding to answer, and columns corresponding to evalulated chunks. The array contains marks, where the evaluated chunk gets the corresponding marks from the given answer. An answer returns marks from an evaluated chunk. A evalua...
30.898551
79
0.671201
fb5ee45e18e4f604a2b809cd72f3d388c34d0351
5,034
py
Python
cytominer_eval/tests/test_operations/test_grit.py
hillsbury/cytominer-eval
56bd9e545d4ce5dea8c2d3897024a4eb241d06db
[ "BSD-3-Clause" ]
null
null
null
cytominer_eval/tests/test_operations/test_grit.py
hillsbury/cytominer-eval
56bd9e545d4ce5dea8c2d3897024a4eb241d06db
[ "BSD-3-Clause" ]
null
null
null
cytominer_eval/tests/test_operations/test_grit.py
hillsbury/cytominer-eval
56bd9e545d4ce5dea8c2d3897024a4eb241d06db
[ "BSD-3-Clause" ]
null
null
null
import os import random import pytest import pathlib import tempfile import numpy as np import pandas as pd from pandas.testing import assert_frame_equal from sklearn.preprocessing import StandardScaler from cytominer_eval.operations import grit from cytominer_eval.transform import metric_melt from cytominer_eval.tra...
31.4625
85
0.708979