hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | 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 247 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 247 | max_forks_repo_name stringlengths 4 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.04M | avg_line_length float64 1.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
953e1d7c28a3471eb1e0e76a0283763e127f57f4 | 2,959 | py | Python | tests/base/test_survey_data.py | Prithwijit-Chak/simpeg | d93145d768b5512621cdd75566b4a8175fee9ed3 | [
"MIT"
] | 358 | 2015-03-11T05:48:41.000Z | 2022-03-26T02:04:12.000Z | tests/base/test_survey_data.py | Prithwijit-Chak/simpeg | d93145d768b5512621cdd75566b4a8175fee9ed3 | [
"MIT"
] | 885 | 2015-01-19T09:23:48.000Z | 2022-03-29T12:08:34.000Z | tests/base/test_survey_data.py | Prithwijit-Chak/simpeg | d93145d768b5512621cdd75566b4a8175fee9ed3 | [
"MIT"
] | 214 | 2015-03-11T05:48:43.000Z | 2022-03-02T01:05:11.000Z | import unittest
import numpy as np
np.random.seed(100)
if __name__ == "__main__":
unittest.main()
| 36.530864 | 84 | 0.595809 | import unittest
import discretize
import numpy as np
from SimPEG import survey, utils, data
np.random.seed(100)
class TestData(unittest.TestCase):
def setUp(self):
mesh = discretize.TensorMesh(
[np.ones(n) * 5 for n in [10, 11, 12]], [0, 0, -30]
)
x = np.linspace(5, 10, 3)
... | 0 | 0 | 0 | 2,773 | 0 | 0 | 0 | 13 | 67 |
4bbb926f66098c7067d697e09c7f040b88ab1750 | 2,045 | py | Python | experimental/utilities/python/heap.py | liuhoward/tech-interview-handbook | 250e643d43c0a24ea69f3b2d273ac0a49ccb643c | [
"MIT"
] | 71,386 | 2017-06-27T10:41:30.000Z | 2022-03-31T23:57:50.000Z | experimental/utilities/python/heap.py | Abhik1998/tech-interview-handbook | 430b1ac5014b3c1335d5c075e3c05ae4694bdd78 | [
"MIT"
] | 165 | 2017-09-25T13:00:12.000Z | 2022-03-31T18:27:57.000Z | experimental/utilities/python/heap.py | Abhik1998/tech-interview-handbook | 430b1ac5014b3c1335d5c075e3c05ae4694bdd78 | [
"MIT"
] | 9,863 | 2017-06-27T14:30:27.000Z | 2022-03-31T13:42:19.000Z | # Implements a min-heap. For max-heap, simply reverse all comparison orders.
#
# Note on alternate subroutine namings (used in some textbooks):
# - _bubble_up = siftdown
# - _bubble_down = siftup
# Example usage
heap = [3, 2, 1, 0]
heapify(heap)
print('Heap(0, 1, 2, 3):', heap)
heappush(heap, 4)
heappush(hea... | 24.058824 | 76 | 0.602934 | # Implements a min-heap. For max-heap, simply reverse all comparison orders.
#
# Note on alternate subroutine namings (used in some textbooks):
# - _bubble_up = siftdown
# - _bubble_down = siftup
def _bubble_up(heap, i):
while i > 0:
parent_i = (i - 1) // 2
if heap[i] < heap[parent_i]:
... | 0 | 0 | 0 | 0 | 0 | 1,067 | 0 | 0 | 115 |
43047773d2378e82780d810b939ff1c0c81eb7aa | 244 | py | Python | examples/predict.py | raysunau/pyawb | 745490d279893b15dff8039d38ab274ae8e5c8dd | [
"MIT"
] | null | null | null | examples/predict.py | raysunau/pyawb | 745490d279893b15dff8039d38ab274ae8e5c8dd | [
"MIT"
] | 9 | 2020-11-26T06:26:29.000Z | 2020-12-28T22:16:00.000Z | examples/predict.py | raysunau/pydatoolkit | 745490d279893b15dff8039d38ab274ae8e5c8dd | [
"MIT"
] | null | null | null |
import sys
import os
sys.path.append(os.path.abspath(os.path.join(os.path.abspath(''))))
from datk.model import ModelTrainer
pred_params = {
'cmd':'predict',
'data_path': './examples/test_titanic.csv'
}
ModelTrainer(**pred_params)
| 16.266667 | 67 | 0.709016 |
import sys
import os
sys.path.append(os.path.abspath(os.path.join(os.path.abspath(''))))
from datk.model import ModelTrainer
pred_params = {
'cmd':'predict',
'data_path': './examples/test_titanic.csv'
}
ModelTrainer(**pred_params)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3eb50e9e9182cd0d7bf0c010aa67df03e7e176f8 | 806 | py | Python | utils/vgg_loss.py | tnquang1416/FI-MSAGAN | a3b1ea0370509fcac8f773ad3eeea5e933c3ab4d | [
"MIT"
] | 1 | 2021-11-04T23:47:58.000Z | 2021-11-04T23:47:58.000Z | utils/vgg_loss.py | tnquang1416/FI-MSAGAN | a3b1ea0370509fcac8f773ad3eeea5e933c3ab4d | [
"MIT"
] | null | null | null | utils/vgg_loss.py | tnquang1416/FI-MSAGAN | a3b1ea0370509fcac8f773ad3eeea5e933c3ab4d | [
"MIT"
] | null | null | null | '''
Created on Jun 7, 2021
@see: copied from https://github.com/martkartasev/sepconv/blob/master/src/loss.py
'''
| 23.705882 | 82 | 0.612903 | '''
Created on Jun 7, 2021
@see: copied from https://github.com/martkartasev/sepconv/blob/master/src/loss.py
'''
import torch
import torchvision
from torch import nn
class VggLoss(nn.Module):
def __init__(self):
super(VggLoss, self).__init__()
model = torchvision.models.vgg19(p... | 0 | 0 | 0 | 602 | 0 | 0 | 0 | -13 | 96 |
3609c1fccd417b671bf439406191dee8076fad4d | 823 | py | Python | parse_mutation_annotations_dbsnp.py | raroes/predicting-annotations-from-citations | a0d4a6b029e8da43e192cd4cfcac0864a6851a74 | [
"MIT"
] | 1 | 2019-12-19T12:52:36.000Z | 2019-12-19T12:52:36.000Z | parse_mutation_annotations_dbsnp.py | raroes/annotation-transfer-for-biomedical-articles | a0d4a6b029e8da43e192cd4cfcac0864a6851a74 | [
"MIT"
] | null | null | null | parse_mutation_annotations_dbsnp.py | raroes/annotation-transfer-for-biomedical-articles | a0d4a6b029e8da43e192cd4cfcac0864a6851a74 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# this script extract citations mentioned in the dbSNP database
import json
import bz2
output_file = "pmid_annotations_dbsnp.txt"
f_out = open(output_file, "w")
file_list1 = ['refsnp-chr' + str(i) for i in list(range(1,23)) + ['MT', 'X', 'Y']]
file_list = ["./data/" + base_file_name + ".json.b... | 26.548387 | 87 | 0.624544 | #!/usr/bin/python3
# this script extract citations mentioned in the dbSNP database
import json
import bz2
output_file = "pmid_annotations_dbsnp.txt"
f_out = open(output_file, "w")
file_list1 = ['refsnp-chr' + str(i) for i in list(range(1,23)) + ['MT', 'X', 'Y']]
file_list = ["./data/" + base_file_name + ".json.b... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1974c75ed524d8e1421715d1744766ca816cad4b | 2,313 | py | Python | chapter-8/movie_recs_flow.py | outerbounds/dsbook | 411b55c2057a3ba1e1d893cde03d6ec97d529969 | [
"Apache-2.0"
] | 27 | 2021-05-29T14:36:34.000Z | 2022-03-22T10:12:40.000Z | chapter-8/movie_recs_flow.py | saibaldas/dsbook | be6b4670ed33a2001de8f28f6fb4151111cb26ca | [
"Apache-2.0"
] | null | null | null | chapter-8/movie_recs_flow.py | saibaldas/dsbook | be6b4670ed33a2001de8f28f6fb4151111cb26ca | [
"Apache-2.0"
] | 6 | 2021-05-29T14:36:40.000Z | 2022-03-09T14:57:46.000Z |
if __name__ == '__main__':
MovieRecsFlow()
| 37.918033 | 72 | 0.572849 | from metaflow import FlowSpec, step, conda_base, Parameter,\
current, resources, Flow, Run
from itertools import chain, combinations
@conda_base(python='3.8.10', libraries={'pyarrow': '5.0.0',
'python-annoy': '1.17.0'})
class MovieRecsFlow(FlowSpec):
nu... | 0 | 2,088 | 0 | 0 | 0 | 0 | 0 | 110 | 67 |
e656cb1f8547766858f1ed556e5c8711ed81a28e | 1,294 | py | Python | Ping-pong.py | Dimadel435/Ping-pong | 52e87344893b35f2c51ba8d3249f78b5db05c387 | [
"CC0-1.0"
] | null | null | null | Ping-pong.py | Dimadel435/Ping-pong | 52e87344893b35f2c51ba8d3249f78b5db05c387 | [
"CC0-1.0"
] | null | null | null | Ping-pong.py | Dimadel435/Ping-pong | 52e87344893b35f2c51ba8d3249f78b5db05c387 | [
"CC0-1.0"
] | null | null | null | #
#
back = (200,255,255)
window = display.set_mode((600,500))
window.fill(back)
#fps
clock = time.Clock()
FPS = 60
#
game = True
while game:
for e in event.get():
if e.type == QUIT:
game = False
display.update()
clock.tick(FPS)
| 26.958333 | 89 | 0.574189 | from pygame import *
#Классы
class GameSprite(sprite.Sprite):
def __init__ (self, player_image, player_x, player_y, size_x, size_y, player_speed):
sprite.Sprite.__init__(self)
self.image = transform.scale(image.load(player_image), (size_x, size_y))
self.speed = player_speed
se... | 30 | 0 | 0 | 910 | 0 | 0 | 0 | -1 | 72 |
5db8c5e7dd7c202ce27f038169f566aafd6b79ff | 1,026 | py | Python | main/efivar/template.py | RoastVeg/cports | 803c7f07af341eb32f791b6ec1f237edb2764bd5 | [
"BSD-2-Clause"
] | 46 | 2021-06-10T02:27:32.000Z | 2022-03-27T11:33:24.000Z | main/efivar/template.py | RoastVeg/cports | 803c7f07af341eb32f791b6ec1f237edb2764bd5 | [
"BSD-2-Clause"
] | 58 | 2021-07-03T13:58:20.000Z | 2022-03-13T16:45:35.000Z | main/efivar/template.py | RoastVeg/cports | 803c7f07af341eb32f791b6ec1f237edb2764bd5 | [
"BSD-2-Clause"
] | 6 | 2021-07-04T10:46:40.000Z | 2022-01-09T00:03:59.000Z | pkgname = "efivar"
pkgver = "37"
pkgrel = 0
build_style = "makefile"
make_cmd = "gmake"
make_build_target = "all"
make_build_args = ["libdir=/usr/lib", "ERRORS="]
make_install_args = ["libdir=/usr/lib"]
make_check_target = "test"
hostmakedepends = ["pkgconf", "gmake"]
makedepends = ["linux-headers"]
pkgdesc = "Tools an... | 30.176471 | 75 | 0.717349 | pkgname = "efivar"
pkgver = "37"
pkgrel = 0
build_style = "makefile"
make_cmd = "gmake"
make_build_target = "all"
make_build_args = ["libdir=/usr/lib", "ERRORS="]
make_install_args = ["libdir=/usr/lib"]
make_check_target = "test"
hostmakedepends = ["pkgconf", "gmake"]
makedepends = ["linux-headers"]
pkgdesc = "Tools an... | 0 | 156 | 0 | 0 | 0 | 113 | 0 | 0 | 92 |
ea88cb35f45e7505dd2167889263cc8ddc439459 | 3,489 | py | Python | function.py | gvangool/wapi | f70eb4b17da4cd634f27fdc4cdcc6a698c0c0526 | [
"MIT"
] | 1 | 2016-05-09T07:27:13.000Z | 2016-05-09T07:27:13.000Z | function.py | gvangool/wapi | f70eb4b17da4cd634f27fdc4cdcc6a698c0c0526 | [
"MIT"
] | null | null | null | function.py | gvangool/wapi | f70eb4b17da4cd634f27fdc4cdcc6a698c0c0526 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2008 Alberto Garca Hierro <fiam@rm-fr.net>
# 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 righ... | 36.34375 | 80 | 0.68673 | # -*- coding: utf-8 -*-
# Copyright (c) 2008 Alberto García Hierro <fiam@rm-fr.net>
# 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 rig... | 6 | 694 | 0 | 1,437 | 0 | 0 | 0 | 22 | 69 |
7a3f398a0c1fa9aff11c60dbc40bdc061b6ca458 | 1,830 | py | Python | calm/dsl/decompile/ref_dependency.py | tuxtof/calm-dsl | 5af67435d8304b97e170a690068f2d5975e9bfe6 | [
"Apache-2.0"
] | 37 | 2019-12-23T15:23:20.000Z | 2022-03-15T11:12:11.000Z | calm/dsl/decompile/ref_dependency.py | gabybeitler/calm-dsl | bac453413cfcf800eef95d89d5a7323c83654a93 | [
"Apache-2.0"
] | 144 | 2020-03-09T11:22:09.000Z | 2022-03-28T21:34:09.000Z | calm/dsl/decompile/ref_dependency.py | gabybeitler/calm-dsl | bac453413cfcf800eef95d89d5a7323c83654a93 | [
"Apache-2.0"
] | 46 | 2020-01-23T14:28:04.000Z | 2022-03-09T04:17:10.000Z | SERVICE_NAME_MAP = {}
PROFILE_NAME_MAP = {}
SUBSTRATE_NAME_MAP = {}
PACKAGE_NAME_MAP = {}
DEPLOYMENT_NAME_MAP = {}
def get_service_name(name):
"""returns the class name used for entity ref"""
global SERVICE_NAME_MAP
return SERVICE_NAME_MAP.get(name, None)
def update_service_name(ui_name, dsl_name):
... | 22.048193 | 104 | 0.745902 | SERVICE_NAME_MAP = {}
PROFILE_NAME_MAP = {}
SUBSTRATE_NAME_MAP = {}
PACKAGE_NAME_MAP = {}
DEPLOYMENT_NAME_MAP = {}
def get_service_name(name):
"""returns the class name used for entity ref"""
global SERVICE_NAME_MAP
return SERVICE_NAME_MAP.get(name, None)
def update_service_name(ui_name, dsl_name):
... | 0 | 0 | 0 | 0 | 0 | 638 | 0 | 0 | 115 |
3a78b29efb4c60280b296d8c7889ff9d34c0b45f | 2,018 | py | Python | srcs/tools/args/ArgParser.py | grandmaster-xav/multilayer_perceptron | 75176d6e5b2ea92ebc4a6cf144e6ab668533f574 | [
"MIT"
] | null | null | null | srcs/tools/args/ArgParser.py | grandmaster-xav/multilayer_perceptron | 75176d6e5b2ea92ebc4a6cf144e6ab668533f574 | [
"MIT"
] | null | null | null | srcs/tools/args/ArgParser.py | grandmaster-xav/multilayer_perceptron | 75176d6e5b2ea92ebc4a6cf144e6ab668533f574 | [
"MIT"
] | null | null | null | import logging
logging.getLogger().setLevel(logging.INFO)
| 27.27027 | 87 | 0.602081 | import logging
import argparse
logging.getLogger().setLevel(logging.INFO)
class ArgParser:
args: argparse.Namespace
"""
Override methods
"""
class _HelpAction(argparse._HelpAction):
def __call__(self, parser, namespace, values, option_string=None):
parser.print_help()
... | 0 | 156 | 0 | 1,763 | 0 | 0 | 0 | -6 | 45 |
46ece1b4504f4f91846f7f56e48ee5fe350b22e3 | 9,635 | py | Python | asyncirc/irc.py | aarongolliver/asyncirc | e72a3902d581de778b5859fe44ecb9a8178d4698 | [
"MIT"
] | null | null | null | asyncirc/irc.py | aarongolliver/asyncirc | e72a3902d581de778b5859fe44ecb9a8178d4698 | [
"MIT"
] | null | null | null | asyncirc/irc.py | aarongolliver/asyncirc | e72a3902d581de778b5859fe44ecb9a8178d4698 | [
"MIT"
] | null | null | null | import asyncio
from blinker import signal
loop = asyncio.get_event_loop()
connections = {}
plugins = []
signal("plugin-registered").connect(plugin_registered_handler)
def connect(server, port=6697, use_ssl=True):
"""
Connect to an IRC server. Returns a proxy to an IRCProtocol object.
"""
connector =... | 33.454861 | 138 | 0.618371 | import asyncio
import collections
import importlib
import logging
import random
import ssl
from blinker import signal
loop = asyncio.get_event_loop()
connections = {}
plugins = []
def plugin_registered_handler(plugin_name):
plugins.append(plugin_name)
signal("plugin-registered").connect(plugin_registered_handler... | 0 | 280 | 0 | 6,640 | 0 | 308 | 0 | -27 | 270 |
540494501102fdc0ee0e0dd166e8a4ae77863589 | 1,546 | py | Python | examples/remote_sensing/eval.py | yaoshanliang/PaddleX | fe40b6d10db0e4d46f3a73cc5e83c3236d6a5842 | [
"Apache-2.0"
] | 3,655 | 2020-03-28T09:19:50.000Z | 2022-03-31T13:28:39.000Z | examples/remote_sensing/eval.py | yaoshanliang/PaddleX | fe40b6d10db0e4d46f3a73cc5e83c3236d6a5842 | [
"Apache-2.0"
] | 829 | 2020-03-28T04:03:18.000Z | 2022-03-31T14:34:30.000Z | examples/remote_sensing/eval.py | yaoshanliang/PaddleX | fe40b6d10db0e4d46f3a73cc5e83c3236d6a5842 | [
"Apache-2.0"
] | 738 | 2020-03-28T03:56:46.000Z | 2022-03-31T13:11:03.000Z | # GPU
# https://paddlex.readthedocs.io/zh_CN/develop/appendix/parameters.html#gpu
import os
os.environ['CUDA_VISIBLE_DEVICES'] = '0'
import numpy as np
from PIL import Image
import paddlex as pdx
import paddlex.utils.logging as logging
from paddlex.cv.models.utils.seg_eval import ConfusionMatrix
model_dir = 'outpu... | 34.355556 | 112 | 0.769082 | # 环境变量配置,用于控制是否使用GPU
# 说明文档:https://paddlex.readthedocs.io/zh_CN/develop/appendix/parameters.html#gpu
import os
os.environ['CUDA_VISIBLE_DEVICES'] = '0'
import numpy as np
import cv2
from PIL import Image
from collections import OrderedDict
import paddlex as pdx
import paddlex.utils.logging as logging
from paddlex.cv... | 69 | 0 | 0 | 0 | 0 | 311 | 0 | 3 | 67 |
80e1f17767f781b108e345ede183ab3d5a26d644 | 560 | py | Python | machin/frame/buffers/__init__.py | ikamensh/machin | af7b423c47bc1412530cf6c96c11bd3af9b3e239 | [
"MIT"
] | 1 | 2021-04-01T21:21:23.000Z | 2021-04-01T21:21:23.000Z | machin/frame/buffers/__init__.py | ikamensh/machin | af7b423c47bc1412530cf6c96c11bd3af9b3e239 | [
"MIT"
] | null | null | null | machin/frame/buffers/__init__.py | ikamensh/machin | af7b423c47bc1412530cf6c96c11bd3af9b3e239 | [
"MIT"
] | null | null | null | import warnings
from .buffer import Buffer
from .prioritized_buffer import WeightTree, PrioritizedBuffer
try:
from .buffer_d import DistributedBuffer
from .prioritized_buffer_d import DistributedPrioritizedBuffer
except ImportError as _:
warnings.warn(
"Failed to import buffers relying on torch.dis... | 25.454545 | 85 | 0.742857 | import warnings
from .buffer import Buffer
from .prioritized_buffer import WeightTree, PrioritizedBuffer
try:
from .buffer_d import DistributedBuffer
from .prioritized_buffer_d import DistributedPrioritizedBuffer
except ImportError as _:
warnings.warn(
"Failed to import buffers relying on torch.dis... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4a2067dbde4c48be365d48d7d6c83c39f1bbb5e8 | 1,283 | py | Python | refbuka.py | gumblex/refine-buka | 815afca8b0c0f2cea6b91ce095c815b157e0b165 | [
"MIT"
] | 49 | 2015-01-06T15:50:49.000Z | 2020-12-06T05:39:12.000Z | refbuka.py | gumblex/refine-buka | 815afca8b0c0f2cea6b91ce095c815b157e0b165 | [
"MIT"
] | null | null | null | refbuka.py | gumblex/refine-buka | 815afca8b0c0f2cea6b91ce095c815b157e0b165 | [
"MIT"
] | 13 | 2015-01-19T06:21:21.000Z | 2021-08-03T08:22:15.000Z | import re
import struct
import os
import sys
import time
import json
USAGE = """
python refine.py INPUT_DIR OUTPUT_DIR
"""
if __name__ == '__main__':
if len(sys.argv) != 3:
print(USAGE)
else:
print time.strftime('%H:%M:%S')
extract_dir(sys.argv[1], sys.argv[2])
print time.s... | 30.547619 | 81 | 0.597818 | import re
import struct
import os
import sys
import time
import json
USAGE = """
python refine.py INPUT_DIR OUTPUT_DIR
"""
def refine(file_name,output_dir):
if not os.path.isdir(output_dir):
print(USAGE)
raise IOError('output dir `%s` not found' %output_dir)
with open(file_name, 'rb') as f... | 0 | 0 | 0 | 0 | 0 | 897 | 0 | 0 | 46 |
172fce64370d6ef974eb59c706115f2690dfd2c6 | 264 | py | Python | eventsourcing_django/admin.py | Skyross/eventsourcing-django | 41386bed3e279f9abe176e2b9626fab5c07187c3 | [
"BSD-3-Clause"
] | 19 | 2021-07-21T19:54:00.000Z | 2022-01-25T09:56:56.000Z | eventsourcing_django/admin.py | Skyross/eventsourcing-django | 41386bed3e279f9abe176e2b9626fab5c07187c3 | [
"BSD-3-Clause"
] | 1 | 2022-01-13T16:49:02.000Z | 2022-01-13T16:49:02.000Z | eventsourcing_django/admin.py | Skyross/eventsourcing-django | 41386bed3e279f9abe176e2b9626fab5c07187c3 | [
"BSD-3-Clause"
] | 2 | 2021-08-05T01:50:41.000Z | 2022-01-13T16:41:58.000Z | # -*- coding: utf-8 -*-
from django.contrib import admin
from .models import NotificationTrackingRecord, SnapshotRecord, StoredEventRecord
admin.site.register(StoredEventRecord)
admin.site.register(SnapshotRecord)
admin.site.register(NotificationTrackingRecord)
| 29.333333 | 81 | 0.829545 | # -*- coding: utf-8 -*-
from django.contrib import admin
from .models import NotificationTrackingRecord, SnapshotRecord, StoredEventRecord
admin.site.register(StoredEventRecord)
admin.site.register(SnapshotRecord)
admin.site.register(NotificationTrackingRecord)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6f9c4b28bccb389ac2b6c6b926ce67c95fdf8472 | 4,532 | py | Python | week_04/project_week_4.py | ebelingbarros/Spiced-academy-other-projects | 725e03ad5e69f0ae443daa617ccc9c555fbf4352 | [
"CC0-1.0"
] | null | null | null | week_04/project_week_4.py | ebelingbarros/Spiced-academy-other-projects | 725e03ad5e69f0ae443daa617ccc9c555fbf4352 | [
"CC0-1.0"
] | null | null | null | week_04/project_week_4.py | ebelingbarros/Spiced-academy-other-projects | 725e03ad5e69f0ae443daa617ccc9c555fbf4352 | [
"CC0-1.0"
] | null | null | null | #### Get libraries
import pandas as pd
from sklearn.pipeline import make_pipeline
from sklearn.model_selection import GridSearchCV
from sklearn.ensemble import RandomForestClassifier
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.naive_bayes import MultinomialNB
import argparse
parser = argp... | 29.815789 | 159 | 0.63504 | #### Get libraries
import requests
import re
from bs4 import BeautifulSoup
from collections import Counter
import pandas as pd
from sklearn.feature_extraction.text import CountVectorizer
from nltk.tokenize import word_tokenize
from nltk.stem import WordNetLemmatizer
from sklearn.pipeline import make_pipeline
from skle... | 0 | 0 | 0 | 0 | 0 | 1,709 | 0 | 224 | 354 |
c4041169c541b5120bd270c1a0353ac992d69ba2 | 454 | py | Python | scripts/extract_empty_bigrams.py | devqazi/roman-urdu | 1bc09f489ccfbf712a4bc743aaf07e846d7f4ba5 | [
"MIT"
] | 3 | 2018-06-21T14:55:58.000Z | 2019-08-30T04:39:52.000Z | scripts/extract_empty_bigrams.py | devqazi/roman-urdu | 1bc09f489ccfbf712a4bc743aaf07e846d7f4ba5 | [
"MIT"
] | null | null | null | scripts/extract_empty_bigrams.py | devqazi/roman-urdu | 1bc09f489ccfbf712a4bc743aaf07e846d7f4ba5 | [
"MIT"
] | null | null | null |
in_path = "../res/freq_map.csv"
out_path = "../res/empty_bigrams.csv"
with open(in_path) as f:
data = f.read()
data = [[int(j) for j in i.split(",")] for i in data.split("\n")]
empty_bigrams = []
for i,row in enumerate(data):
for j,col in enumerate(row):
if data[i][j] is 0:
... | 22.7 | 66 | 0.572687 | import re
in_path = "../res/freq_map.csv"
out_path = "../res/empty_bigrams.csv"
with open(in_path) as f:
data = f.read()
data = [[int(j) for j in i.split(",")] for i in data.split("\n")]
empty_bigrams = []
for i,row in enumerate(data):
for j,col in enumerate(row):
if data[i][j] is 0:
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -12 | 23 |
d21484b45ab05e2fbfc02c75304620d59c4067b2 | 2,427 | py | Python | os_scrapy_record/items.py | zanachka/os-scrapy-record | 03d0cafbea74c981a72d5d7c8a3e28f05e487689 | [
"MIT"
] | 2 | 2020-05-13T12:55:01.000Z | 2020-07-24T06:52:49.000Z | os_scrapy_record/items.py | zanachka/os-scrapy-record | 03d0cafbea74c981a72d5d7c8a3e28f05e487689 | [
"MIT"
] | 1 | 2020-05-22T09:03:04.000Z | 2020-05-22T09:31:45.000Z | os_scrapy_record/items.py | zanachka/os-scrapy-record | 03d0cafbea74c981a72d5d7c8a3e28f05e487689 | [
"MIT"
] | 2 | 2020-07-21T00:54:09.000Z | 2020-10-29T18:10:03.000Z | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# https://docs.scrapy.org/en/latest/topics/items.html
| 26.380435 | 78 | 0.662134 | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# https://docs.scrapy.org/en/latest/topics/items.html
import copy
from typing import Type, Union
import scrapy
from scrapy.http.response import Response
from scrapy.spidermiddlewares.httperror import HttpError
from twis... | 0 | 0 | 0 | 535 | 0 | 1,299 | 0 | 141 | 294 |
695d59e2af8d4bb5d228d04ef0948a4264041615 | 2,626 | py | Python | sdk/python/pulumi_rundeck/_tables.py | alexhwoods/pulumi-rundeck | 779a6cf242d55e65914ab43a1f19218602c47e31 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_rundeck/_tables.py | alexhwoods/pulumi-rundeck | 779a6cf242d55e65914ab43a1f19218602c47e31 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_rundeck/_tables.py | alexhwoods/pulumi-rundeck | 779a6cf242d55e65914ab43a1f19218602c47e31 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
SNAKE_TO_CAMEL_CASE_TABLE = {
"allow_concurrent_executions": "allowConcurrentExecutions",
"api_version": "apiVersion",
"aut... | 42.354839 | 87 | 0.734577 | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
SNAKE_TO_CAMEL_CASE_TABLE = {
"allow_concurrent_executions": "allowConcurrentExecutions",
"api_version": "apiVersion",
"aut... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1e035577dd140f8e6245580d8413cb4bdab5f5b8 | 209 | py | Python | app/__main__.py | bartoszadamczyk/weather-station-rpi | 2e373a6fec1dad178f2daba7b9015e48a19d6a80 | [
"MIT"
] | 1 | 2022-01-13T23:02:17.000Z | 2022-01-13T23:02:17.000Z | app/__main__.py | bartoszadamczyk/weather-station-rpi | 2e373a6fec1dad178f2daba7b9015e48a19d6a80 | [
"MIT"
] | null | null | null | app/__main__.py | bartoszadamczyk/weather-station-rpi | 2e373a6fec1dad178f2daba7b9015e48a19d6a80 | [
"MIT"
] | null | null | null | import sentry_sdk
from app.config import CONFIG
if __name__ == "__main__":
# Init Sentry before any app imports
sentry_sdk.init(server_name=CONFIG.DEVICE_ID)
from app import init
init.run()
| 19 | 49 | 0.727273 | import sentry_sdk
from app.config import CONFIG
if __name__ == "__main__":
# Init Sentry before any app imports
sentry_sdk.init(server_name=CONFIG.DEVICE_ID)
from app import init
init.run()
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0e68528a3040db5fab58f7d7c843c42e12eaf67e | 14,724 | py | Python | pic2vec/build_featurizer.py | datarobot/pic2vec | 2dae5093d10414456ca2210c78dc5c3392b70c8e | [
"BSD-3-Clause"
] | 33 | 2017-08-10T01:12:02.000Z | 2021-06-05T01:49:39.000Z | pic2vec/build_featurizer.py | datarobot/pic2vec | 2dae5093d10414456ca2210c78dc5c3392b70c8e | [
"BSD-3-Clause"
] | 22 | 2017-07-24T15:04:29.000Z | 2021-11-15T17:46:59.000Z | pic2vec/build_featurizer.py | datarobot/pic2vec | 2dae5093d10414456ca2210c78dc5c3392b70c8e | [
"BSD-3-Clause"
] | 15 | 2017-08-10T15:46:00.000Z | 2021-01-21T08:12:15.000Z | """
This file deals with building the actual featurizer:
1. Initializing the InceptionV3 model
2. Decapitating it to the appropriate depth
3. Downsampling, if desired
The integrated function is the build_featurizer function, which takes the depth,
a flag signalling downsampling, and the number of features to downsampl... | 38.747368 | 100 | 0.64439 | """
This file deals with building the actual featurizer:
1. Initializing the InceptionV3 model
2. Decapitating it to the appropriate depth
3. Downsampling, if desired
The integrated function is the build_featurizer function, which takes the depth,
a flag signalling downsampling, and the number of features to downsampl... | 0 | 10,972 | 0 | 0 | 0 | 0 | 0 | 49 | 271 |
583baf05358f7d11242c2537ddbba4aec690a665 | 347 | py | Python | pylibrary/plotting/__init__.py | pbmanis/pylibrary | d6cb41386cd39b7a1b6678a71a704f3b9d09faef | [
"MIT"
] | 1 | 2016-06-24T18:32:40.000Z | 2016-06-24T18:32:40.000Z | pylibrary/plotting/__init__.py | pbmanis/pylibrary | d6cb41386cd39b7a1b6678a71a704f3b9d09faef | [
"MIT"
] | null | null | null | pylibrary/plotting/__init__.py | pbmanis/pylibrary | d6cb41386cd39b7a1b6678a71a704f3b9d09faef | [
"MIT"
] | 1 | 2019-03-20T18:03:20.000Z | 2019-03-20T18:03:20.000Z | #!/usr/bin/env python
__author__ = "Paul B. Manis"
__version__ = "0.4"
import pylibrary.plotting.plothelpers
import pylibrary.plotting.matplotlibexporter
import pylibrary.plotting.picker
import pylibrary.plotting.pyqtgraph_plothelpers
import pylibrary.plotting.styler
import pylibrary.plotting.talbotetalticks
| 28.916667 | 47 | 0.850144 | #!/usr/bin/env python
__author__ = "Paul B. Manis"
__version__ = "0.4"
import pylibrary.plotting.plothelpers
import pylibrary.plotting.matplotlibexporter
import pylibrary.plotting.picker
import pylibrary.plotting.pyqtgraph_plothelpers
import pylibrary.plotting.styler
import pylibrary.plotting.talbotetalticks
import py... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 22 |
bf7b4f40a2a2986a3bc5912beb0c0fb0feec8cc5 | 3,238 | py | Python | pybleau/app/model/tests/test_plot_template_manager.py | KBIbiopharma/pybleau | 5cdfce603ad29af874f74f0f527adc6b4c9066e8 | [
"MIT"
] | 4 | 2020-02-27T22:38:29.000Z | 2021-05-03T05:32:11.000Z | pybleau/app/model/tests/test_plot_template_manager.py | KBIbiopharma/pybleau | 5cdfce603ad29af874f74f0f527adc6b4c9066e8 | [
"MIT"
] | 85 | 2020-02-04T21:57:14.000Z | 2021-05-03T14:29:40.000Z | pybleau/app/model/tests/test_plot_template_manager.py | KBIbiopharma/pybleau | 5cdfce603ad29af874f74f0f527adc6b4c9066e8 | [
"MIT"
] | 1 | 2020-02-20T00:45:09.000Z | 2020-02-20T00:45:09.000Z | from os.path import dirname
HERE = dirname(__file__)
| 34.446809 | 71 | 0.692712 | import os
from os.path import dirname
from unittest import TestCase
from unittest.mock import patch
from traits.api import Callable
from traits.has_traits import provides, HasStrictTraits
from traits.testing.unittest_tools import UnittestTools
from pybleau.app.model.plot_template_manager import PlotTemplateManager
fr... | 0 | 687 | 0 | 2,069 | 0 | 0 | 0 | 202 | 224 |
6bbe3d9d6746120c4773a44a29a278aa10b819f8 | 2,400 | py | Python | applications/allocation_result_mapper.py | SuviVappula/tilavarauspalvelu-core | ad7dec36e392a7b2927e2f825c3b0eb29b700793 | [
"MIT"
] | null | null | null | applications/allocation_result_mapper.py | SuviVappula/tilavarauspalvelu-core | ad7dec36e392a7b2927e2f825c3b0eb29b700793 | [
"MIT"
] | 90 | 2020-11-13T07:42:32.000Z | 2022-03-29T08:54:20.000Z | applications/allocation_result_mapper.py | SuviVappula/tilavarauspalvelu-core | ad7dec36e392a7b2927e2f825c3b0eb29b700793 | [
"MIT"
] | 8 | 2021-02-10T11:31:22.000Z | 2022-01-28T14:33:47.000Z | import logging
logger = logging.getLogger(__name__)
| 38.095238 | 113 | 0.6575 | import logging
from allocation.allocation_solver import AllocatedEvent
from applications.models import (
ApplicationEventSchedule,
ApplicationEventScheduleResult,
ApplicationEventStatus,
ApplicationRound,
)
from applications.utils.aggregate_data import (
ApplicationEventScheduleResultAggregateDataR... | 0 | 0 | 0 | 2,009 | 0 | 0 | 0 | 247 | 90 |
beb13d8ca7c18008dada503f180b13c961028595 | 5,052 | py | Python | classifier/cnn_classifier.py | j99nowicki/ml_road_signs_web | e2a9e8a8bc81f57c46d87d6a21ca523e28bec6ca | [
"MIT"
] | null | null | null | classifier/cnn_classifier.py | j99nowicki/ml_road_signs_web | e2a9e8a8bc81f57c46d87d6a21ca523e28bec6ca | [
"MIT"
] | 4 | 2021-06-08T21:36:28.000Z | 2022-02-25T01:16:35.000Z | classifier/cnn_classifier.py | j99nowicki/ml_road_signs_web | e2a9e8a8bc81f57c46d87d6a21ca523e28bec6ca | [
"MIT"
] | null | null | null | from __future__ import print_function
from rsc_webapp import app
import torch
import plotly.graph_objs as go
import numpy as np
from torch.nn import functional as F
from PIL import Image
import time
import os
import random
import string
from classifier.model_1 import visualize_stn
import matplotlib.pyplot as plt
#impo... | 36.345324 | 119 | 0.629652 | from __future__ import print_function
from rsc_webapp import app
import torch
import pandas as pd
import plotly.graph_objs as go
import numpy as np
import json
from torchvision import transforms
from torch.nn import functional as F
from PIL import Image
import time
import os
import random
import string
from classifier.... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 66 |
b1e3525c88c03b345ab533f55f8fbd5b31c3954a | 7,571 | py | Python | lambda_code/ssm/Parameter/index.py | ikben/custom-resources | 6857c4bc86dd118e44221efa43e8298f748bf116 | [
"Apache-2.0"
] | 2 | 2019-05-02T13:06:40.000Z | 2019-12-20T15:48:31.000Z | lambda_code/ssm/Parameter/index.py | ikben/custom-resources | 6857c4bc86dd118e44221efa43e8298f748bf116 | [
"Apache-2.0"
] | 2 | 2019-09-26T14:18:49.000Z | 2021-09-01T10:52:08.000Z | lambda_code/ssm/Parameter/index.py | ikben/custom-resources | 6857c4bc86dd118e44221efa43e8298f748bf116 | [
"Apache-2.0"
] | 1 | 2019-08-02T15:26:19.000Z | 2019-08-02T15:26:19.000Z | import os
try:
from _metadata import CUSTOM_RESOURCE_NAME
except ImportError:
CUSTOM_RESOURCE_NAME = 'dummy'
REGION = os.environ['AWS_REGION']
handler = Parameter.get_handler()
| 35.378505 | 100 | 0.598336 | import datetime
import hashlib
import os
import random
import string
import typing
from distutils.util import strtobool
from cfn_custom_resource import CloudFormationCustomResource
try:
from _metadata import CUSTOM_RESOURCE_NAME
except ImportError:
CUSTOM_RESOURCE_NAME = 'dummy'
REGION = os.environ['AWS_REGI... | 0 | 0 | 0 | 6,814 | 0 | 348 | 0 | 17 | 201 |
10500e1032d005b29464397476ca44473be5da06 | 1,906 | py | Python | pages/new_account.py | jose-marquez89/cryptovest | e0f04e3cbaa01f2de969ed17462052b23328fff8 | [
"MIT"
] | null | null | null | pages/new_account.py | jose-marquez89/cryptovest | e0f04e3cbaa01f2de969ed17462052b23328fff8 | [
"MIT"
] | null | null | null | pages/new_account.py | jose-marquez89/cryptovest | e0f04e3cbaa01f2de969ed17462052b23328fff8 | [
"MIT"
] | null | null | null | import logging
import dash_bootstrap_components as dbc
import dash_html_components as html
FORMAT = "%(asctime)s - %(levelname)s - %(message)s"
logging.basicConfig(level=logging.DEBUG, format=FORMAT)
username_group = dbc.FormGroup(
[
dbc.Input(name="username", placeholder="Enter new username")
],
)
p... | 25.756757 | 90 | 0.570304 | import logging
import flask
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output, State
from app import app
from db_users import create_new_user
from db_model import load_engine
FORMAT = "%(asctime)s - %(levelname)s ... | 0 | 379 | 0 | 0 | 0 | 0 | 0 | 57 | 157 |
4a664bd3461b267bf3702066f99f9d336bde539f | 6,959 | py | Python | src/OrderBook.py | gbarany/crypto-arbitrage-finder | 8b1dcf14cce795f4d0bbfa640abf3e13fe75eedb | [
"Apache-2.0"
] | 6 | 2020-02-25T09:40:57.000Z | 2022-03-30T09:20:02.000Z | src/OrderBook.py | gbarany/crypto-arbitrage-finder | 8b1dcf14cce795f4d0bbfa640abf3e13fe75eedb | [
"Apache-2.0"
] | null | null | null | src/OrderBook.py | gbarany/crypto-arbitrage-finder | 8b1dcf14cce795f4d0bbfa640abf3e13fe75eedb | [
"Apache-2.0"
] | 1 | 2020-04-22T11:39:47.000Z | 2020-04-22T11:39:47.000Z | #import numpy as np
import logging
logger = logging.getLogger('CryptoArbitrageApp')
| 32.069124 | 199 | 0.614025 | import ast
import copy
#import numpy as np
import math
import logging
logger = logging.getLogger('CryptoArbitrageApp')
class Asset:
def __init__(self, exchange, symbol):
self.exchange = exchange
self.symbol = symbol
def getExchange(self):
return self.exchange
def getSymbol(self):... | 0 | 120 | 0 | 6,623 | 0 | 0 | 0 | -31 | 158 |
7da89cf3ddf394c3360e698272738f341c17d143 | 1,636 | py | Python | cui_methods.py | ielab/word-suggestion | d246a024c3625392aad383f98b954acb258a15a6 | [
"MIT"
] | null | null | null | cui_methods.py | ielab/word-suggestion | d246a024c3625392aad383f98b954acb258a15a6 | [
"MIT"
] | 4 | 2019-12-10T00:32:08.000Z | 2020-06-28T05:23:18.000Z | cui_methods.py | hanglics/word-suggestion | d246a024c3625392aad383f98b954acb258a15a6 | [
"MIT"
] | 1 | 2019-12-10T01:23:40.000Z | 2019-12-10T01:23:40.000Z |
nCols = 20
# read the bin file and construct the matrix
# Thanks to Jimmy
# convert the cui to int
# Thanks to Jimmy
# a method to read the cui -> term csv file and construct a dict
| 27.728814 | 93 | 0.514059 | import math
import csv
nCols = 20
# read the bin file and construct the matrix
# Thanks to Jimmy
def readCuiDistance(distanceFile):
with open(distanceFile, "rb") as fb:
b = fb.read()
size = int.from_bytes(b[:4], byteorder='little', signed=False)
j = 4
k = 0
currentCui = 0... | 0 | 0 | 0 | 0 | 0 | 1,358 | 0 | -21 | 110 |
dbd7300caa8cd171fdd6c97e8bc6add0c8d5c4b4 | 1,457 | py | Python | scripts/merge_junit.py | avisconti/ci-tools | 3c2eb1f11b06032d03b001be2e83868096db4c10 | [
"Apache-2.0"
] | null | null | null | scripts/merge_junit.py | avisconti/ci-tools | 3c2eb1f11b06032d03b001be2e83868096db4c10 | [
"Apache-2.0"
] | null | null | null | scripts/merge_junit.py | avisconti/ci-tools | 3c2eb1f11b06032d03b001be2e83868096db4c10 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
#
# Corey Goldberg, Dec 2012
#
"""Merge multiple JUnit XML files into a single results file.
Output dumps to sdtdout.
example usage:
$ python merge_junit_results.py results1.xml results2.xml > results.xml
"""
if __name__ == '__main__':
main()
| 23.126984 | 75 | 0.621826 | #!/usr/bin/env python3
#
# Corey Goldberg, Dec 2012
#
import os
import sys
import xml.etree.ElementTree as ET
"""Merge multiple JUnit XML files into a single results file.
Output dumps to sdtdout.
example usage:
$ python merge_junit_results.py results1.xml results2.xml > results.xml
"""
def main():
args =... | 0 | 0 | 0 | 0 | 0 | 1,049 | 0 | -10 | 136 |
e883a8fd795307d797fb09acc7cb21c169d3284f | 10,485 | py | Python | docker/environment/docker.py | onedata/bamboo | 5f6ce4234a75d150e8c9bfd60054d6a96bfcc3c1 | [
"MIT"
] | null | null | null | docker/environment/docker.py | onedata/bamboo | 5f6ce4234a75d150e8c9bfd60054d6a96bfcc3c1 | [
"MIT"
] | null | null | null | docker/environment/docker.py | onedata/bamboo | 5f6ce4234a75d150e8c9bfd60054d6a96bfcc3c1 | [
"MIT"
] | null | null | null | # coding=utf-8
"""Author: Konrad Zemek
Copyright (C) 2015 ACK CYFRONET AGH
This software is released under the MIT license cited in 'LICENSE.txt'
Functions wrapping capabilities of docker binary.
"""
import subprocess
# Adds a bind-mount consistency option depending on the container's access_level.
# This option app... | 27.738095 | 101 | 0.619552 | # coding=utf-8
"""Author: Konrad Zemek
Copyright (C) 2015 ACK CYFRONET AGH
This software is released under the MIT license cited in 'LICENSE.txt'
Functions wrapping capabilities of docker binary.
"""
import json
import os
import subprocess
import sys
from six import string_types
# Adds a bind-mount consistency opti... | 0 | 0 | 0 | 0 | 0 | 6,416 | 0 | -26 | 317 |
a57c06fcfd9367ddf11e6f377131424d523baced | 25,018 | py | Python | bacnet/bacnet.py | demmsnt/visiodesk-gateway | 2adb7115f81ef8662b4339bab055e1698fcbc3aa | [
"Apache-2.0"
] | null | null | null | bacnet/bacnet.py | demmsnt/visiodesk-gateway | 2adb7115f81ef8662b4339bab055e1698fcbc3aa | [
"Apache-2.0"
] | null | null | null | bacnet/bacnet.py | demmsnt/visiodesk-gateway | 2adb7115f81ef8662b4339bab055e1698fcbc3aa | [
"Apache-2.0"
] | 2 | 2020-08-17T09:08:28.000Z | 2020-09-20T15:56:04.000Z |
bacnet_name_map = {
"acked-transitions": "0",
"ack-required": "1",
"action": "2",
"action-text": "3",
"active-text": "4",
"active-vt-sessions": "5",
"alarm-value": "6",
"alarm-values": "7",
"all": "8",
"all-writes-successful": "9",
"apdu-segment-timeout": "10",
"apdu-t... | 29.607101 | 97 | 0.612519 | import enum
class StatusFlag(enum.Enum):
IN_ALARM = 0
FAULT = 1
OVERRIDEN = 2
OUT_OF_SERVICE = 3
def id(self):
return self.value
bacnet_name_map = {
"acked-transitions": "0",
"ack-required": "1",
"action": "2",
"action-text": "3",
"active-text": "4",
"active-vt-s... | 0 | 430 | 0 | 13,351 | 0 | 0 | 0 | -10 | 114 |
9c3b2e1e9af1d396e224a0994537f38c92425a71 | 5,446 | py | Python | ambari-agent/src/main/python/ambari_agent/DataCleaner.py | likenamehaojie/Apache-Ambari-ZH | 5973025bd694cdbb4b49fb4c4e0d774782811ff6 | [
"Apache-2.0"
] | 1,664 | 2015-01-03T09:35:21.000Z | 2022-03-31T04:55:24.000Z | ambari-agent/src/main/python/ambari_agent/DataCleaner.py | likenamehaojie/Apache-Ambari-ZH | 5973025bd694cdbb4b49fb4c4e0d774782811ff6 | [
"Apache-2.0"
] | 3,018 | 2015-02-19T20:16:10.000Z | 2021-11-13T20:47:48.000Z | ambari-agent/src/main/python/ambari_agent/DataCleaner.py | likenamehaojie/Apache-Ambari-ZH | 5973025bd694cdbb4b49fb4c4e0d774782811ff6 | [
"Apache-2.0"
] | 1,673 | 2015-01-06T14:14:42.000Z | 2022-03-31T07:22:30.000Z | #!/usr/bin/env python
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License")... | 40.641791 | 115 | 0.698311 | #!/usr/bin/env python
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License")... | 0 | 0 | 0 | 4,366 | 0 | 85 | 0 | -41 | 157 |
b4706244bbead557837e16bb38acef3f9635ad0d | 1,343 | py | Python | sunnysouth/marketplace/views/assets.py | EdwinBaeza05/django-genricsl-app | a8759d609957e80883cca79f0694d494364775a4 | [
"MIT"
] | null | null | null | sunnysouth/marketplace/views/assets.py | EdwinBaeza05/django-genricsl-app | a8759d609957e80883cca79f0694d494364775a4 | [
"MIT"
] | null | null | null | sunnysouth/marketplace/views/assets.py | EdwinBaeza05/django-genricsl-app | a8759d609957e80883cca79f0694d494364775a4 | [
"MIT"
] | null | null | null | """Users views."""
# Django
# Django REST Framework
# Custom permissions
# Serializers
# Models
| 32.756098 | 89 | 0.780343 | """Users views."""
# Django
from django.shortcuts import get_object_or_404
# Django REST Framework
from rest_framework import mixins, status, viewsets
from rest_framework.decorators import action
from rest_framework.response import Response
from rest_framework.permissions import (
AllowAny,
IsAuthenticated,
)
... | 0 | 0 | 0 | 693 | 0 | 0 | 0 | 328 | 221 |
14e5a79615d1f8d6d44894ee6027d83e89b7731c | 12,905 | py | Python | BDpan.py | sang8052/bt_baidupan | 9a271040c76133241c7a425a4c41582e754121ff | [
"Apache-2.0"
] | 7 | 2019-10-20T23:07:10.000Z | 2021-09-30T07:07:45.000Z | BDpan.py | sang8052/bt_baidupan | 9a271040c76133241c7a425a4c41582e754121ff | [
"Apache-2.0"
] | null | null | null | BDpan.py | sang8052/bt_baidupan | 9a271040c76133241c7a425a4c41582e754121ff | [
"Apache-2.0"
] | 1 | 2019-10-20T23:07:44.000Z | 2019-10-20T23:07:44.000Z | #!/usr/bin/python
# coding: utf-8
# -------------------------------------------------------------------
# Author: Sudem mail@szhcloud.cn
#
#
# 2019
#
#
#
# github houtianze https://github.com/houtianze/bypy
# bypy api
# baidu linux ,,
# BDpan github MIT
#
#
#
#-------------------------------------------... | 37.623907 | 275 | 0.583495 | #!/usr/bin/python
# coding: utf-8
# -------------------------------------------------------------------
# Author: Sudem mail@szhcloud.cn
# 写在项目最前面的话
#
# 非常感谢宝塔团队给予了我这个平台,这是我在2019年暑假结束前的最后一个作品
# 这个暑假我学习了很多,收获了很多,过的非常的充实
# 我将继续努力下去,成功一个优秀的小码农
#
# 鸣谢 github 大佬 houtianze https://github.com/houtianze/bypy
# 您的 bypy 项目给予我学习... | 1,905 | 0 | 0 | 9,992 | 0 | 0 | 0 | -8 | 23 |
f944b462e9b9eaea50480498cfd5972b404cb557 | 7,972 | py | Python | python/hotspots.py | mikehankey/mikehankey | 87cae99a4390f635c17ba1ccc8e393153803dca7 | [
"MIT"
] | null | null | null | python/hotspots.py | mikehankey/mikehankey | 87cae99a4390f635c17ba1ccc8e393153803dca7 | [
"MIT"
] | 5 | 2020-07-17T10:25:58.000Z | 2020-07-17T10:26:10.000Z | python/hotspots.py | mikehankey/mikehankey | 87cae99a4390f635c17ba1ccc8e393153803dca7 | [
"MIT"
] | null | null | null | import os
if __name__ == "__main__":
os.system("clear")
main_menu() | 35.118943 | 297 | 0.603613 | import glob
import os
import numpy as np
import random
from create_json_data_files import *
from update_data_src import *
from create_main_gbu_page import *
from create_state_gbu_pages import *
def get_hotspots_and_alerts():
hotspots = [] # more than 100 new COVID-19 cases per day
alerts = [] # 7-d... | 0 | 0 | 0 | 0 | 0 | 7,569 | 0 | 30 | 296 |
0397eb327adbf10a2589faea10f68780847410a5 | 5,251 | py | Python | db/mongo.py | pharmaDB/scoring_data_processor | f433d725754aaf9cfca7ff6ddff623555cb1cb1c | [
"Apache-2.0"
] | null | null | null | db/mongo.py | pharmaDB/scoring_data_processor | f433d725754aaf9cfca7ff6ddff623555cb1cb1c | [
"Apache-2.0"
] | null | null | null | db/mongo.py | pharmaDB/scoring_data_processor | f433d725754aaf9cfca7ff6ddff623555cb1cb1c | [
"Apache-2.0"
] | null | null | null | from dotenv import dotenv_values
import os
import pymongo
import sys
from utils.logging import getLogger
_logger = getLogger(__name__)
_config = dict(
dotenv_values(
os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", ".env")
)
)
def connect_mongo(alt_db_name=None):
"""
This me... | 35.006667 | 81 | 0.578176 | from dotenv import dotenv_values
import os
import pymongo
from bson.objectid import ObjectId
import dateutil
import json
import sys
from utils.logging import getLogger
_logger = getLogger(__name__)
_config = dict(
dotenv_values(
os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", ".env")
... | 0 | 0 | 0 | 3,898 | 0 | 0 | 0 | -3 | 89 |
23cc5ddf2c50381532462c5462e4d74cec87053c | 230 | py | Python | files/Listas Compostas/d88.py | heltonricardo/estudo-python | e82eb8ebc15378175b03d367a6eeea66e8858cff | [
"MIT"
] | null | null | null | files/Listas Compostas/d88.py | heltonricardo/estudo-python | e82eb8ebc15378175b03d367a6eeea66e8858cff | [
"MIT"
] | null | null | null | files/Listas Compostas/d88.py | heltonricardo/estudo-python | e82eb8ebc15378175b03d367a6eeea66e8858cff | [
"MIT"
] | null | null | null | from random import sample
print('= PROGRAMA MEGASENA =')
n = int(input('\nQuantidade de jogos: '))
jogos = []
for i in range(n):
jogos.append([sorted(sample(range(1, 61), 6))])
print(f'Jogo {i + 1:2}:', jogos[i])
input()
| 23 | 51 | 0.621739 | from random import sample
print('= PROGRAMA MEGASENA =')
n = int(input('\nQuantidade de jogos: '))
jogos = []
for i in range(n):
jogos.append([sorted(sample(range(1, 61), 6))])
print(f'Jogo {i + 1:2}:', jogos[i])
input()
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
317e786129bb5cb27755efa788ede336ac5eab3a | 14,312 | py | Python | src/full_node/store.py | reghacker/chia-blockchain | 51ab6260dcfbd95b4be9686f717f8d63133ef50f | [
"Apache-2.0"
] | null | null | null | src/full_node/store.py | reghacker/chia-blockchain | 51ab6260dcfbd95b4be9686f717f8d63133ef50f | [
"Apache-2.0"
] | null | null | null | src/full_node/store.py | reghacker/chia-blockchain | 51ab6260dcfbd95b4be9686f717f8d63133ef50f | [
"Apache-2.0"
] | null | null | null | import logging
log = logging.getLogger(__name__)
| 37.270833 | 104 | 0.657141 | import asyncio
import logging
import aiosqlite
from typing import Dict, List, Optional, Tuple
from src.types.program import Program
from src.types.full_block import FullBlock
from src.types.header import HeaderData, Header
from src.types.header_block import HeaderBlock
from src.types.proof_of_space import ProofOfSpace... | 0 | 1,843 | 3,295 | 8,676 | 0 | 0 | 0 | 181 | 266 |
45ec67ba035d3d6571018f709586a7b700bb408a | 1,835 | py | Python | dali/python/nvidia/dali/plugin/tf.py | rajkaramchedu/DALI | 3ee7b3476cfaebb4d5299ca147def01086b39373 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | dali/python/nvidia/dali/plugin/tf.py | rajkaramchedu/DALI | 3ee7b3476cfaebb4d5299ca147def01086b39373 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2018-12-21T21:47:50.000Z | 2018-12-21T21:47:50.000Z | dali/python/nvidia/dali/plugin/tf.py | paulbisso/DALI | e5ebc9a6185facfae43dafd4098c43d192a6292e | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright (c) 2017-2018, NVIDIA CORPORATION. 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 a... | 33.981481 | 254 | 0.775477 | # Copyright (c) 2017-2018, NVIDIA CORPORATION. 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 a... | 0 | 0 | 0 | 0 | 0 | 50 | 0 | 0 | 45 |
abfde1c46c673c6df7348da235740e9361e3043c | 29,100 | py | Python | daisy/api/v1/clusters.py | OpenDaisy/daisy-api | 662d4a49548268a7b6bc6898d648bf5d1cb872bd | [
"Apache-2.0"
] | 3 | 2015-12-22T09:04:44.000Z | 2017-10-18T15:26:03.000Z | daisy/api/v1/clusters.py | OpenDaisy/daisy-api | 662d4a49548268a7b6bc6898d648bf5d1cb872bd | [
"Apache-2.0"
] | null | null | null | daisy/api/v1/clusters.py | OpenDaisy/daisy-api | 662d4a49548268a7b6bc6898d648bf5d1cb872bd | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 OpenStack Foundation
# 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 requ... | 47.24026 | 129 | 0.54488 | # Copyright 2013 OpenStack Foundation
# 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 requ... | 0 | 5,480 | 0 | 21,565 | 0 | 0 | 0 | 153 | 378 |
5b014a47d1d504b014235f2f86a6a479917aeb03 | 1,299 | py | Python | tests/config/test_trainer.py | zanussbaum/Transformers4Rec | 8a755e04968293b75ef3f489f74ecd70d8833a9d | [
"Apache-2.0"
] | null | null | null | tests/config/test_trainer.py | zanussbaum/Transformers4Rec | 8a755e04968293b75ef3f489f74ecd70d8833a9d | [
"Apache-2.0"
] | null | null | null | tests/config/test_trainer.py | zanussbaum/Transformers4Rec | 8a755e04968293b75ef3f489f74ecd70d8833a9d | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2021, NVIDIA 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 ... | 32.475 | 83 | 0.755196 | #
# Copyright (c) 2021, NVIDIA 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 ... | 0 | 0 | 0 | 0 | 0 | 549 | 0 | 64 | 92 |
88ed3bc3c10ded26c1b2ce130dc8bcb287b5354e | 1,789 | py | Python | libs/SSD1306/ssd1306.py | CIRCUSPi/MAPS6.0 | 03e02fc07651c05f25b5174beb7159599a1c6216 | [
"MIT"
] | null | null | null | libs/SSD1306/ssd1306.py | CIRCUSPi/MAPS6.0 | 03e02fc07651c05f25b5174beb7159599a1c6216 | [
"MIT"
] | null | null | null | libs/SSD1306/ssd1306.py | CIRCUSPi/MAPS6.0 | 03e02fc07651c05f25b5174beb7159599a1c6216 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# ssd1306.py
# @Author : (Zack Huang)
# @Link :
# @Date : 12/16/2021, 11:22:36 AM
| 34.403846 | 110 | 0.596423 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# ssd1306.py
# @Author : (Zack Huang)
# @Link :
# @Date : 12/16/2021, 11:22:36 AM
import Adafruit_SSD1306
from PIL import Image
from PIL import ImageDraw
from PIL import ImageFont
from datetime import datetime
class SSD1306(object):
def __init__(self):
... | 2 | 0 | 0 | 1,500 | 0 | 0 | 0 | 18 | 134 |
802063ba8f5c08431274d26caa89e98079d44013 | 2,924 | py | Python | jsl/nlds/base.py | AdrienCorenflos/JSL | 8a3ba27179a2bd90207214fccb81df884b05c3d0 | [
"MIT"
] | 23 | 2021-12-29T19:45:23.000Z | 2022-03-31T07:21:32.000Z | jsl/nlds/base.py | AdrienCorenflos/JSL | 8a3ba27179a2bd90207214fccb81df884b05c3d0 | [
"MIT"
] | 23 | 2021-12-22T18:23:08.000Z | 2022-03-23T23:05:53.000Z | jsl/nlds/base.py | AdrienCorenflos/JSL | 8a3ba27179a2bd90207214fccb81df884b05c3d0 | [
"MIT"
] | 5 | 2022-03-10T04:26:09.000Z | 2022-03-22T13:23:32.000Z | # Library of nonlinear dynamical systems
# Usage: Every discrete xKF class inherits from NLDS.
# There are two ways to use this library in the discrete case:
# 1) Explicitly initialize a discrete NLDS object with the desired parameters,
# then pass it onto the xKF class of your choice.
# 2) Initialize the xKF object... | 29.535354 | 92 | 0.632695 | # Library of nonlinear dynamical systems
# Usage: Every discrete xKF class inherits from NLDS.
# There are two ways to use this library in the discrete case:
# 1) Explicitly initialize a discrete NLDS object with the desired parameters,
# then pass it onto the xKF class of your choice.
# 2) Initialize the xKF object... | 4 | 2,140 | 0 | 0 | 0 | 0 | 0 | 25 | 136 |
6d2adc8fff68be47e13c7eb1c46ad0a9b684d267 | 4,220 | py | Python | examples/02_braced_tower_2d.py | dylau/compas_cem | 643c7d60cb9d6a9999cb96d39c44175cc8662a25 | [
"MIT"
] | 15 | 2020-12-11T14:35:19.000Z | 2022-03-31T03:12:30.000Z | examples/02_braced_tower_2d.py | dylau/compas_cem | 643c7d60cb9d6a9999cb96d39c44175cc8662a25 | [
"MIT"
] | 8 | 2020-10-09T00:08:05.000Z | 2021-11-18T00:24:20.000Z | examples/02_braced_tower_2d.py | dylau/compas_cem | 643c7d60cb9d6a9999cb96d39c44175cc8662a25 | [
"MIT"
] | 2 | 2021-12-28T02:29:47.000Z | 2022-03-15T14:04:23.000Z | from compas_cem.diagrams import TopologyDiagram
from compas_cem.elements import Node
from compas_cem.elements import TrailEdge
from compas_cem.elements import DeviationEdge
from compas_cem.loads import NodeLoad
from compas_cem.supports import NodeSupport
from compas_cem.equilibrium import static_equilibrium
from co... | 33.492063 | 80 | 0.373934 | from compas_cem.diagrams import TopologyDiagram
from compas_cem.elements import Node
from compas_cem.elements import TrailEdge
from compas_cem.elements import DeviationEdge
from compas_cem.loads import NodeLoad
from compas_cem.supports import NodeSupport
from compas_cem.equilibrium import static_equilibrium
from co... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
92c2712d475fe53d43f6d2ccfa6f0f9693e42043 | 2,150 | py | Python | scripts/pxgrid.py | zabrewer/adaptive-policy-ise-sync | cfedf2369899e8bf26b8ba067a5711448fc19d12 | [
"MIT"
] | 6 | 2020-07-14T12:23:16.000Z | 2021-05-27T08:53:37.000Z | scripts/pxgrid.py | zabrewer/adaptive-policy-ise-sync | cfedf2369899e8bf26b8ba067a5711448fc19d12 | [
"MIT"
] | 7 | 2020-11-30T09:56:08.000Z | 2021-09-22T19:22:56.000Z | scripts/pxgrid.py | zabrewer/adaptive-policy-ise-sync | cfedf2369899e8bf26b8ba067a5711448fc19d12 | [
"MIT"
] | 3 | 2020-07-02T17:05:56.000Z | 2021-06-25T00:10:47.000Z | import logging
logger = logging.getLogger(__name__)
| 39.814815 | 83 | 0.677674 | import base64
import json
import urllib.request
import logging
logger = logging.getLogger(__name__)
class PxgridControl:
def __init__(self, config):
self.config = config
def send_rest_request(self, url_suffix, payload):
logger.debug('send_rest_request %s', url_suffix)
url = 'https://... | 0 | 0 | 0 | 2,025 | 0 | 0 | 0 | -18 | 89 |
9c73e6b8f248c9f4f9b5ac32976fe1856f21be35 | 1,178 | py | Python | src/tests/ColorLegend.py | WaveBlocks/WaveBlocks | 2af3730dcf27e54006ec602e696b4d4df25459d8 | [
"BSD-3-Clause"
] | null | null | null | src/tests/ColorLegend.py | WaveBlocks/WaveBlocks | 2af3730dcf27e54006ec602e696b4d4df25459d8 | [
"BSD-3-Clause"
] | null | null | null | src/tests/ColorLegend.py | WaveBlocks/WaveBlocks | 2af3730dcf27e54006ec602e696b4d4df25459d8 | [
"BSD-3-Clause"
] | null | null | null | from WaveBlocks.Plot import plotcf
a = linspace(0,2*pi,6000)
y = exp(1.0j*a)
fig = figure()
ax = fig.gca()
plotcf(a, angle(y), abs(y))
ax.plot(a, real(y), "b-", label=r"$\Re y$")
ax.plot(a, imag(y), "g-", label=r"$\Im y$")
ax.plot(a, angle(y), "c-", label=r"$\arg y$")
ax.set_xlim(0,2*pi)
ax.set_xticks((0,
... | 21.418182 | 45 | 0.357385 | from numpy import *
from matplotlib.pyplot import *
from WaveBlocks.Plot import plotcf
a = linspace(0,2*pi,6000)
y = exp(1.0j*a)
fig = figure()
ax = fig.gca()
plotcf(a, angle(y), abs(y))
ax.plot(a, real(y), "b-", label=r"$\Re y$")
ax.plot(a, imag(y), "g-", label=r"$\Im y$")
ax.plot(a, angle(y), "c-", label=r"$\arg y... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 44 |
da9478cee24f5c74390fefb7db88775834236234 | 2,496 | py | Python | drawPicture.py | hcjohn463/PCRedive-Analyzer | 4cd575fd0802d0e800a8d69abcae5ff0390c85db | [
"Apache-2.0"
] | null | null | null | drawPicture.py | hcjohn463/PCRedive-Analyzer | 4cd575fd0802d0e800a8d69abcae5ff0390c85db | [
"Apache-2.0"
] | null | null | null | drawPicture.py | hcjohn463/PCRedive-Analyzer | 4cd575fd0802d0e800a8d69abcae5ff0390c85db | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
import warnings
warnings.filterwarnings("ignore")
# In[2]: | 24.96 | 66 | 0.621394 | #!/usr/bin/env python
# coding: utf-8
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
from countDefense import getDefenseTime
from countSkill import getSkillTime
import warnings
warnings.filterwarnings("ignore")
# In[2]:
def startDraw(level,selectData,nameList):
countList = getDefenseTime... | 69 | 0 | 0 | 0 | 0 | 2,205 | 0 | 37 | 134 |
76c42348a1169fc4eabd01d324e76734f43462a9 | 6,220 | py | Python | src/votechain/settings.py | Votechain-LUT/Votechain-Core | 12c02a393ce005f1c7e2e852ad35aaa798517d90 | [
"MIT"
] | null | null | null | src/votechain/settings.py | Votechain-LUT/Votechain-Core | 12c02a393ce005f1c7e2e852ad35aaa798517d90 | [
"MIT"
] | 3 | 2021-01-24T16:40:33.000Z | 2021-02-10T12:05:47.000Z | src/votechain/settings.py | Votechain-LUT/Votechain-Core | 12c02a393ce005f1c7e2e852ad35aaa798517d90 | [
"MIT"
] | null | null | null | """
Django settings for votechain project.
Generated by 'django-admin startproject' using Django 3.1.1.
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/
"""
from pathl... | 28.018018 | 91 | 0.673151 | """
Django settings for votechain project.
Generated by 'django-admin startproject' using Django 3.1.1.
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/
"""
from pathl... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
92b3308bb8399d4f3d21f1c4a194a33b0286519e | 277 | py | Python | test.py | Davidnet/pypeln | 6e1295c2ac7914dadfa546a937537aa2c2a5978d | [
"MIT"
] | null | null | null | test.py | Davidnet/pypeln | 6e1295c2ac7914dadfa546a937537aa2c2a5978d | [
"MIT"
] | null | null | null | test.py | Davidnet/pypeln | 6e1295c2ac7914dadfa546a937537aa2c2a5978d | [
"MIT"
] | null | null | null | import pypeln as pl
# stage = lambda: generator()
stage = [1, 2, 3]
stage = pl.process.map(lambda x: x + 1, stage)
# stage0 = deepcopy(stage)
print(list(stage))
print(list(stage))
print(pl.Element)
| 16.294118 | 46 | 0.67148 | import pypeln as pl
from copy import copy, deepcopy
def generator():
yield from [1, 2, 3]
# stage = lambda: generator()
stage = [1, 2, 3]
stage = pl.process.map(lambda x: x + 1, stage)
# stage0 = deepcopy(stage)
print(list(stage))
print(list(stage))
print(pl.Element)
| 0 | 0 | 0 | 0 | 20 | 0 | 0 | 10 | 45 |
74bf856d75e727e03ba9683c58817b7756547d8e | 2,563 | py | Python | qtstyles/sheet.py | simongarisch/qstyles | d09aed4fcb1f1d3491165af308994e3333f8ddb0 | [
"MIT"
] | 10 | 2018-07-26T10:07:54.000Z | 2021-11-08T10:45:15.000Z | qtstyles/sheet.py | simongarisch/qstyles | d09aed4fcb1f1d3491165af308994e3333f8ddb0 | [
"MIT"
] | 2 | 2018-07-23T06:40:55.000Z | 2020-07-28T21:47:05.000Z | qtstyles/sheet.py | simongarisch/qstyles | d09aed4fcb1f1d3491165af308994e3333f8ddb0 | [
"MIT"
] | 5 | 2019-01-12T07:32:41.000Z | 2020-08-01T12:03:37.000Z | '''
Defines -
Sheet: a class representing a style sheet object
with attributes such as path and contents.
get_style_sheets: a function that returns a dictionary
with style sheet names as keys and sheet objects as values.
'''
import os
def get_style_sheets():
'''
Returns a dictionary with the... | 32.443038 | 75 | 0.611783 | '''
Defines -
Sheet: a class representing a style sheet object
with attributes such as path and contents.
get_style_sheets: a function that returns a dictionary
with style sheet names as keys and sheet objects as values.
'''
import os
from qtstyles import errors
class Sheet(object):
'''
Keeps... | 0 | 282 | 0 | 1,135 | 0 | 0 | 0 | 6 | 48 |
f59427107a52c8302f9557fa9719c5db05c6631d | 214 | py | Python | men_women/r3.py | kumarisneha/task_queue | 656907958d81d8781c422679308fb98a1863663c | [
"MIT"
] | null | null | null | men_women/r3.py | kumarisneha/task_queue | 656907958d81d8781c422679308fb98a1863663c | [
"MIT"
] | null | null | null | men_women/r3.py | kumarisneha/task_queue | 656907958d81d8781c422679308fb98a1863663c | [
"MIT"
] | null | null | null | from r1 import check, time
import r2
print "Please check either the person is men or women(m/w)"
s = raw_input()
if(s== 'm'):
result = r2.q1.enqueue(check, s)
else:
result = r2.q2.enqueue(check, s)
| 19.454545 | 59 | 0.64486 | from r1 import check,time
import r2
print "Please check either the person is men or women(m/w)"
s = raw_input()
if(s== 'm'):
result = r2.q1.enqueue(check, s)
else:
result = r2.q2.enqueue(check, s)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | -1 | 0 |
02e55211673d1af1c75de8b5e6b2c87b6ec22160 | 478 | py | Python | time_tracking/__main__.py | ptcar2009/ptcime | 1af74562d0a2515842a769e8623b83fc6878cafd | [
"MIT"
] | null | null | null | time_tracking/__main__.py | ptcar2009/ptcime | 1af74562d0a2515842a769e8623b83fc6878cafd | [
"MIT"
] | null | null | null | time_tracking/__main__.py | ptcar2009/ptcime | 1af74562d0a2515842a769e8623b83fc6878cafd | [
"MIT"
] | null | null | null | from .parsing import main_parser
from .time_tracking import start, stop, week, day, current, toggle
if __name__ == "__main__":
arguments = main_parser.parse_args()
if arguments.action == "start":
start()
if arguments.action == "stop":
stop()
if arguments.action == "current":
cur... | 28.117647 | 66 | 0.60251 | from .parsing import main_parser
from .time_tracking import start, stop, week, day, current, toggle
if __name__ == "__main__":
arguments = main_parser.parse_args()
if arguments.action == "start":
start()
if arguments.action == "stop":
stop()
if arguments.action == "current":
cur... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
94f69b1fb46335097777246130d43f5ebbdbac63 | 16,200 | py | Python | tools/cuds-prioritized-attribution/test/test_commitment_intervals.py | sourcery-ai-bot/professional-services | 0dd87e18560894bc68c05b580c6c9f2322eabc47 | [
"Apache-2.0"
] | null | null | null | tools/cuds-prioritized-attribution/test/test_commitment_intervals.py | sourcery-ai-bot/professional-services | 0dd87e18560894bc68c05b580c6c9f2322eabc47 | [
"Apache-2.0"
] | null | null | null | tools/cuds-prioritized-attribution/test/test_commitment_intervals.py | sourcery-ai-bot/professional-services | 0dd87e18560894bc68c05b580c6c9f2322eabc47 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 32.079208 | 93 | 0.476235 | # 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, ... | 0 | 0 | 0 | 0 | 0 | 15,179 | 0 | 82 | 320 |
b9097cead264a9847685ac019280c84770e702de | 2,065 | py | Python | contrib_lib/user_pandas.py | red5alex/ifm_contrib | 750e7fdf19a6adabcf27ff08608bfa88b04c8775 | [
"MIT"
] | null | null | null | contrib_lib/user_pandas.py | red5alex/ifm_contrib | 750e7fdf19a6adabcf27ff08608bfa88b04c8775 | [
"MIT"
] | null | null | null | contrib_lib/user_pandas.py | red5alex/ifm_contrib | 750e7fdf19a6adabcf27ff08608bfa88b04c8775 | [
"MIT"
] | 1 | 2018-09-22T13:18:19.000Z | 2018-09-22T13:18:19.000Z | # from ifm import Enum
| 36.875 | 118 | 0.621792 | # from ifm import Enum
import pandas as pd
class UserPd:
def __init__(self, doc):
self.doc = doc
def info(self):
"""
Returns a pandas.DataFrame with information on existing user distributions.
"""
# elemental Distribution
df_dist_e = pd.DataFrame(
... | 0 | 0 | 0 | 1,999 | 0 | 0 | 0 | -2 | 45 |
78d4949af0cf39b040581db390c91642aec8b24f | 4,041 | py | Python | test.py | lesibius/pyFT | 509bb047d629d8de5049df74e02b09fb91610347 | [
"MIT"
] | null | null | null | test.py | lesibius/pyFT | 509bb047d629d8de5049df74e02b09fb91610347 | [
"MIT"
] | null | null | null | test.py | lesibius/pyFT | 509bb047d629d8de5049df74e02b09fb91610347 | [
"MIT"
] | null | null | null | import pyFT
#Comment these line and uncomment the next one to use your own API key
with open('apiKey','r') as f:
apiKey = f.read()
#apiKey =
#Initialize the FTRequest object using your developer key
request = pyFT.FTRequest(apiKey)
#For the main part of your query, you can either set it directly:
request.custom... | 43.923913 | 242 | 0.762188 | import pyFT
#Comment these line and uncomment the next one to use your own API key
with open('apiKey','r') as f:
apiKey = f.read()
#apiKey =
#Initialize the FTRequest object using your developer key
request = pyFT.FTRequest(apiKey)
#For the main part of your query, you can either set it directly:
request.custom... | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0003a26a848ecdda661bde2a3ca29c86785ec60e | 10,996 | py | Python | DDQN2.py | smlblr/Snake-Game-with-DDQN | 1b79a0d34cc07c43b121460f560bc2b8f99e591d | [
"MIT"
] | null | null | null | DDQN2.py | smlblr/Snake-Game-with-DDQN | 1b79a0d34cc07c43b121460f560bc2b8f99e591d | [
"MIT"
] | null | null | null | DDQN2.py | smlblr/Snake-Game-with-DDQN | 1b79a0d34cc07c43b121460f560bc2b8f99e591d | [
"MIT"
] | null | null | null | # Sevgilime Notlar:
# reward kademeli olarak arttrmak.
# Sunuma 47. satr koy statelerdeki pixel deiimleri ylana gre.
import tensorflow as tf
# from tensorflow.keras.utils import plot_model
tf.keras.backend.clear_session()
tf.compat.v1.disable_eager_execution()
hello = tf.constant('Hello, TensorFlow!')
sess = tf.com... | 40.877323 | 117 | 0.601582 | # Sevgilime Notlar:
# rewardü kademeli olarak arttırmak.
# Sunuma 47. satırı koy statelerdeki pixel değişimleri yılana göre.
import tensorflow as tf
import os
from tensorflow.keras.layers import Dense, Activation, Conv2D, MaxPooling2D, Flatten, BatchNormalization, \
ZeroPadding2D, Dropout
from tensorflow.keras.mode... | 48 | 0 | 0 | 8,680 | 0 | 757 | 0 | 158 | 179 |
81cde36c888c2c2ddfbc6eb989b6f24d2502ef98 | 399 | py | Python | footballleagues/migrations/0006_auto_20201114_1551.py | RicardoSilveira23/TonicAppChallenge | 961107acbcdd93551bcd1b4b0ecd877fb4a7d813 | [
"MIT"
] | null | null | null | footballleagues/migrations/0006_auto_20201114_1551.py | RicardoSilveira23/TonicAppChallenge | 961107acbcdd93551bcd1b4b0ecd877fb4a7d813 | [
"MIT"
] | null | null | null | footballleagues/migrations/0006_auto_20201114_1551.py | RicardoSilveira23/TonicAppChallenge | 961107acbcdd93551bcd1b4b0ecd877fb4a7d813 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.3 on 2020-11-14 15:51
| 22.166667 | 84 | 0.631579 | # Generated by Django 3.1.3 on 2020-11-14 15:51
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("footballleagues", "0005_auto_20201113_2056"),
]
operations = [
migrations.AddIndex(
model_name="player",
index=model... | 0 | 0 | 0 | 285 | 0 | 0 | 0 | 19 | 46 |
0c96097958043e1d5ed5c20c65b2823dd2167871 | 29,552 | py | Python | src/simulator/tests/halo_simulator_test.py | pasin30055/planning-evaluation-framework | ba5fc3b553fee0b4f5beb50076ecaa7b634dac23 | [
"Apache-2.0"
] | null | null | null | src/simulator/tests/halo_simulator_test.py | pasin30055/planning-evaluation-framework | ba5fc3b553fee0b4f5beb50076ecaa7b634dac23 | [
"Apache-2.0"
] | null | null | null | src/simulator/tests/halo_simulator_test.py | pasin30055/planning-evaluation-framework | ba5fc3b553fee0b4f5beb50076ecaa7b634dac23 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The Private Cardinality Estimation Framework 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 b... | 36.529048 | 120 | 0.558372 | # Copyright 2021 The Private Cardinality Estimation Framework 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 b... | 0 | 22,329 | 0 | 5,407 | 0 | 0 | 0 | 719 | 357 |
5446a5f3011c1c9947fdeeb4e10624cbe86de4e7 | 1,049 | py | Python | examples/hf20_testnet.py | creativechain/crea-python-lib | b0a61e947586e2d19001824259efad51722e43a8 | [
"MIT"
] | null | null | null | examples/hf20_testnet.py | creativechain/crea-python-lib | b0a61e947586e2d19001824259efad51722e43a8 | [
"MIT"
] | 1 | 2020-03-02T12:18:48.000Z | 2020-03-02T12:18:48.000Z | examples/hf20_testnet.py | creativechain/crea-python-lib | b0a61e947586e2d19001824259efad51722e43a8 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import logging
from crea.account import Account
from crea.crea import Crea
log = logging.getLogger(__name__)
logging.basicConfig(level=logging.INFO)
if __name__ == "__ma... | 30.852941 | 71 | 0.78551 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import sys
from datetime import datetime, timedelta
import time
import io
import logging
from crea.blockchain import Blockchain
from crea.block import Block
from crea.acc... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 138 | 243 |
4ae704a8368b7c1eff8ef877a4d4f54f90585076 | 727 | py | Python | Python/behavioral_patterns/strategy/mirror_strategy.py | ploukareas/Design-Patterns | 8effde38d73ae9058c3028c97ef395644a90d55b | [
"BSD-3-Clause",
"MIT"
] | 28 | 2018-09-28T07:45:35.000Z | 2022-02-12T12:25:05.000Z | Python/behavioral_patterns/strategy/mirror_strategy.py | ploukareas/Design-Patterns | 8effde38d73ae9058c3028c97ef395644a90d55b | [
"BSD-3-Clause",
"MIT"
] | null | null | null | Python/behavioral_patterns/strategy/mirror_strategy.py | ploukareas/Design-Patterns | 8effde38d73ae9058c3028c97ef395644a90d55b | [
"BSD-3-Clause",
"MIT"
] | 5 | 2021-05-10T23:19:55.000Z | 2022-03-04T20:26:35.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
#
# Mirror Strategy: showing a hand signal from the previous opponent's hand signal.
#
#
| 17.309524 | 82 | 0.61348 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# ˅
from behavioral_patterns.strategy.hand_signal import get_hand, HandSignal
from behavioral_patterns.strategy.strategy import Strategy
# ˄
# Mirror Strategy: showing a hand signal from the previous opponent's hand signal.
class MirrorStrategy(Strategy):
# ˅
... | 28 | 0 | 0 | 411 | 0 | 0 | 0 | 89 | 66 |
f1229579b6212d221a1361b93dcb4b34caa4a0e5 | 22 | py | Python | terminus/version.py | briancline/terminus | be9eec78e772b01c32e93866d89e8b6a3d65c965 | [
"MIT"
] | null | null | null | terminus/version.py | briancline/terminus | be9eec78e772b01c32e93866d89e8b6a3d65c965 | [
"MIT"
] | null | null | null | terminus/version.py | briancline/terminus | be9eec78e772b01c32e93866d89e8b6a3d65c965 | [
"MIT"
] | 1 | 2018-03-27T09:05:45.000Z | 2018-03-27T09:05:45.000Z | version_str = '0.1.2'
| 11 | 21 | 0.636364 | version_str = '0.1.2'
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d481a95aafd12df36723482540b6c1ab5dffd2af | 11,140 | py | Python | .ipynb_checkpoints/CryptoPerfSummary-checkpoint.py | briggslalor/Numisma | f8e67832991d0ddd16d334870c8e5e0657e2ff4e | [
"MIT"
] | null | null | null | .ipynb_checkpoints/CryptoPerfSummary-checkpoint.py | briggslalor/Numisma | f8e67832991d0ddd16d334870c8e5e0657e2ff4e | [
"MIT"
] | null | null | null | .ipynb_checkpoints/CryptoPerfSummary-checkpoint.py | briggslalor/Numisma | f8e67832991d0ddd16d334870c8e5e0657e2ff4e | [
"MIT"
] | null | null | null | #Analyze performeace by Return Breakdown (xy), Annualized_std_dev, Average Annual Return, Sharpe_ratio, BTC_Beta (30d rolling average)
#Return Daily, Cumulative and Overall Summary Matrix
#Author: Ken Lee 2022.02.22
# Import Modules
from datetime import date
crypto_data_connection_string = 'sqlite:///./Reference/cry... | 58.631579 | 435 | 0.762298 | #Analyze performeace by Return Breakdown (xy), Annualized_std_dev, Average Annual Return, Sharpe_ratio, BTC_Beta (30d rolling average)
#Return Daily, Cumulative and Overall Summary Matrix
#Author: Ken Lee 2022.02.22
# Import Modules
import pandas as pd
import os
import json
import requests
from dotenv import load_dot... | 0 | 0 | 0 | 0 | 0 | 10,221 | 0 | 50 | 539 |
187dbd006e4d72b5913bf1c8c4d302a2bcfd48f4 | 4,111 | py | Python | glycan_profiling/chromatogram_tree/mass_shift_tree.py | mstim/glycresoft | 1d305c42c7e6cba60326d8246e4a485596a53513 | [
"Apache-2.0"
] | 4 | 2019-04-26T15:47:57.000Z | 2021-04-20T22:53:58.000Z | glycan_profiling/chromatogram_tree/mass_shift_tree.py | mstim/glycresoft | 1d305c42c7e6cba60326d8246e4a485596a53513 | [
"Apache-2.0"
] | 8 | 2017-11-22T19:20:20.000Z | 2022-02-14T01:49:58.000Z | glycan_profiling/chromatogram_tree/mass_shift_tree.py | mstim/glycresoft | 1d305c42c7e6cba60326d8246e4a485596a53513 | [
"Apache-2.0"
] | 3 | 2017-11-21T18:05:28.000Z | 2021-09-23T18:38:33.000Z |
prune_bad_mass_shift_branches = MassShiftTreePruner.prune_bad_mass_shift_branches
| 49.53012 | 109 | 0.650207 | from glycan_profiling.task import TaskBase
from .chromatogram import (get_chromatogram, mask_subsequence)
from .index import ChromatogramFilter
class MassShiftTreePruner(TaskBase):
def __init__(self, solutions, score_margin=2.5, ratio_threshold=1.5, trivial_abundance_delta_ratio=0.01):
self.solutions = s... | 0 | 288 | 0 | 3,570 | 0 | 0 | 0 | 78 | 90 |
c928e20dab8b496e38e0bc5467598a423fc24f3b | 2,263 | py | Python | craftroom/color.py | davidjwilson/craftroom | 05721893350a8b554204e188c8413ee33a7768ad | [
"MIT"
] | 1 | 2019-11-25T21:19:03.000Z | 2019-11-25T21:19:03.000Z | craftroom/color.py | davidjwilson/craftroom | 05721893350a8b554204e188c8413ee33a7768ad | [
"MIT"
] | 1 | 2018-03-14T04:26:54.000Z | 2018-03-14T04:26:54.000Z | craftroom/color.py | davidjwilson/craftroom | 05721893350a8b554204e188c8413ee33a7768ad | [
"MIT"
] | 1 | 2021-09-10T21:24:43.000Z | 2021-09-10T21:24:43.000Z | '''tools for getting (sometimes astrophysically relevant) plotting colors'''
import colormath.color_objects
import colormath.color_conversions
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.colors as co
def name2color(name):
"""Return the 3-element RGB array of a given color name."""
if... | 33.279412 | 95 | 0.686257 | '''tools for getting (sometimes astrophysically relevant) plotting colors'''
import colormath.color_objects
import colormath.color_conversions
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.colors as co
def name2color(name):
"""Return the 3-element RGB array of a given color name."""
if... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2bfa0327b5108a92597a80b74028eda9508e69f0 | 2,690 | py | Python | media_management_api/media_service/permissions.py | nmaekawa/mediamanager | e429a2aeb2a3b37dfa9a5aae062fb04d85509b96 | [
"BSD-3-Clause"
] | 1 | 2017-09-25T19:55:49.000Z | 2017-09-25T19:55:49.000Z | media_management_api/media_service/permissions.py | nmaekawa/mediamanager | e429a2aeb2a3b37dfa9a5aae062fb04d85509b96 | [
"BSD-3-Clause"
] | 32 | 2015-12-09T20:31:19.000Z | 2022-03-11T23:33:50.000Z | media_management_api/media_service/permissions.py | nmaekawa/mediamanager | e429a2aeb2a3b37dfa9a5aae062fb04d85509b96 | [
"BSD-3-Clause"
] | 1 | 2020-12-10T16:52:56.000Z | 2020-12-10T16:52:56.000Z |
import logging
logger = logging.getLogger(__name__)
SAFE_METHODS = ('GET', 'HEAD', 'OPTIONS')
| 44.833333 | 158 | 0.681784 | from rest_framework.permissions import BasePermission, IsAuthenticated
from media_management_api.media_service.models import CourseUser, UserProfile
import logging
logger = logging.getLogger(__name__)
SAFE_METHODS = ('GET', 'HEAD', 'OPTIONS')
class IsCourseUserAuthenticated(BasePermission):
def has_permission(se... | 0 | 0 | 0 | 2,422 | 0 | 0 | 0 | 105 | 67 |
58e008a4ba02ce677a5c4636177c297b6b9007ee | 34,665 | py | Python | intel/WinIntelPE32.py | Rainism/the-backdoor-factory | 6237b9ff84c9ca83e9bdedb9cc93a4865c776bc0 | [
"BSD-3-Clause"
] | null | null | null | intel/WinIntelPE32.py | Rainism/the-backdoor-factory | 6237b9ff84c9ca83e9bdedb9cc93a4865c776bc0 | [
"BSD-3-Clause"
] | null | null | null | intel/WinIntelPE32.py | Rainism/the-backdoor-factory | 6237b9ff84c9ca83e9bdedb9cc93a4865c776bc0 | [
"BSD-3-Clause"
] | 1 | 2020-03-19T04:04:09.000Z | 2020-03-19T04:04:09.000Z | '''
Copyright (c) 2013-2015, Joshua Pitts
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and t... | 55.91129 | 149 | 0.508755 | '''
Copyright (c) 2013-2015, Joshua Pitts
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and t... | 0 | 0 | 0 | 32,878 | 0 | 0 | 0 | 10 | 67 |
b180890c1af920f01dc37fc79cda117356682f37 | 6,409 | py | Python | tests/test_handler_transform_inverter.py | ambroslins/MONAI | a49a63c8610bd8d0bf32535816ccac05bc59c642 | [
"Apache-2.0"
] | null | null | null | tests/test_handler_transform_inverter.py | ambroslins/MONAI | a49a63c8610bd8d0bf32535816ccac05bc59c642 | [
"Apache-2.0"
] | null | null | null | tests/test_handler_transform_inverter.py | ambroslins/MONAI | a49a63c8610bd8d0bf32535816ccac05bc59c642 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 - 2021 MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in wri... | 42.443709 | 111 | 0.642534 | # Copyright 2020 - 2021 MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in wri... | 0 | 0 | 0 | 5,069 | 0 | 0 | 0 | 420 | 246 |
07cd31f60fe6df82c2d456af7334d4e5e94ffca3 | 7,503 | py | Python | dask_cuda/proxify_device_objects.py | pentschev/dask-cuda | 984263c006e1e3cfa67ab63f5f8608c5e713a57f | [
"Apache-2.0"
] | 191 | 2019-01-17T05:08:41.000Z | 2022-03-17T07:43:22.000Z | dask_cuda/proxify_device_objects.py | rapidsai/dask-cuda | e9a291ad873a61a1035472befd4eaea777dda7b4 | [
"Apache-2.0"
] | 830 | 2019-01-25T23:36:46.000Z | 2022-03-31T15:50:30.000Z | dask_cuda/proxify_device_objects.py | pentschev/dask-cuda | 984263c006e1e3cfa67ab63f5f8608c5e713a57f | [
"Apache-2.0"
] | 64 | 2019-02-12T17:56:54.000Z | 2022-01-21T13:50:06.000Z | from collections import defaultdict
from functools import partial
from typing import Any, List, MutableMapping
import dask
from dask.utils import Dispatch
from .proxy_object import ProxyObject
dispatch = Dispatch(name="proxify_device_objects")
ignore_types = None
def _register_ignore_types():
"""Lazy register ... | 30.5 | 86 | 0.69119 | import functools
import pydoc
from collections import defaultdict
from functools import partial
from typing import Any, List, MutableMapping
import dask
from dask.utils import Dispatch
from .proxy_object import ProxyObject, asproxy
dispatch = Dispatch(name="proxify_device_objects")
ignore_types = None
def _registe... | 0 | 2,310 | 0 | 0 | 0 | 355 | 0 | -5 | 266 |
2f293436af489dcdd69e9c6d0915f4522d5dc3d1 | 2,457 | py | Python | bertserini/experiments/args.py | akkefa/bertserini | bc3c8b20c256814dbe87ed7310dd4f2d10f304a0 | [
"Apache-2.0"
] | 3 | 2022-03-04T22:29:30.000Z | 2022-03-13T10:53:06.000Z | bertserini/experiments/args.py | akkefa/bertserini | bc3c8b20c256814dbe87ed7310dd4f2d10f304a0 | [
"Apache-2.0"
] | 2 | 2022-03-22T03:52:43.000Z | 2022-03-30T02:27:50.000Z | bertserini/experiments/args.py | akkefa/bertserini | bc3c8b20c256814dbe87ed7310dd4f2d10f304a0 | [
"Apache-2.0"
] | 3 | 2022-03-11T00:02:33.000Z | 2022-03-24T04:32:58.000Z | import argparse
parser = argparse.ArgumentParser()
parser.add_argument(
"--device",
default="cpu",
type=str,
help="Device to run query encoder, cpu or [cuda:0, cuda:1, ...]",
)
parser.add_argument(
"--dataset_path",
default=None,
type=str,
help="Path to the [dev, test] dataset",
)
pars... | 22.135135 | 122 | 0.660562 | import argparse
parser = argparse.ArgumentParser()
parser.add_argument(
"--device",
default="cpu",
type=str,
help="Device to run query encoder, cpu or [cuda:0, cuda:1, ...]",
)
parser.add_argument(
"--dataset_path",
default=None,
type=str,
help="Path to the [dev, test] dataset",
)
pars... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
cf8d3792f16d9d9201cc627b96911682e8cd9e0d | 602 | py | Python | lib/python2.7/site-packages/FuncDesigner/examples/sle1.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | 5 | 2017-01-23T16:23:43.000Z | 2022-01-20T16:14:06.000Z | lib/python2.7/site-packages/FuncDesigner/examples/sle1.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2015-04-24T06:46:25.000Z | 2015-04-24T06:46:25.000Z | lib/python2.7/site-packages/FuncDesigner/examples/sle1.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | 8 | 2016-05-30T13:35:17.000Z | 2021-06-15T22:24:29.000Z | """
"Hello world" example
for solving SLE (system of linear equations)
"""
# create some variables
a, b, c = oovars('a', 'b', 'c')
# or just a, b, c = oovars(3)
# Python list of 3 linear equations with 3 variables
f = [2*a+3*b-2*c+5, 2*a+13*b+15, a+4*b+2*c-45]
# alternatively, you could pass equations:
#f = [2*a+3*b... | 25.083333 | 71 | 0.611296 | """
"Hello world" example
for solving SLE (system of linear equations)
"""
from FuncDesigner import *
# create some variables
a, b, c = oovars('a', 'b', 'c')
# or just a, b, c = oovars(3)
# Python list of 3 linear equations with 3 variables
f = [2*a+3*b-2*c+5, 2*a+13*b+15, a+4*b+2*c-45]
# alternatively, you could pa... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 22 |
d80d5c239e43e9452314d65faae1d4b3f6f2e564 | 7,008 | py | Python | lib/candy_editor/qt/QtEditorModule.py | lihaochen910/Candy | d12cb964768459c22f30c22531d3e1734901e814 | [
"MIT"
] | 1 | 2021-11-06T14:38:37.000Z | 2021-11-06T14:38:37.000Z | lib/candy_editor/qt/QtEditorModule.py | lihaochen910/Candy | d12cb964768459c22f30c22531d3e1734901e814 | [
"MIT"
] | 5 | 2021-11-06T04:23:06.000Z | 2022-03-12T01:03:25.000Z | lib/candy_editor/qt/QtEditorModule.py | lihaochen910/Candy | d12cb964768459c22f30c22531d3e1734901e814 | [
"MIT"
] | 1 | 2021-11-07T05:19:51.000Z | 2021-11-07T05:19:51.000Z |
##----------------------------------------------------------------##
_QT_SETTING_FILE = 'qt.ini'
##----------------------------------------------------------------##
| 28.958678 | 76 | 0.670947 | from abc import abstractmethod
from candy_editor.core import EditorModule
from candy_editor.qt.controls.Menu import MenuManager
from candy_editor.qt.controls.ToolBar import ToolBarManager, ToolBarItem
from PyQt5 import QtGui, QtWidgets
from PyQt5.QtCore import Qt
##---------------------------------------------------... | 0 | 37 | 0 | 6,514 | 0 | 0 | 0 | 132 | 156 |
6501bef4a8afef8dd931306896331ad98e3dcbec | 9,350 | py | Python | pymodaq_plugins_smaract/daq_move_plugins/daq_move_SmarActMCS.py | Attolab/pymodaq_plugins_smaract | 109808255d784bd98b875fb4886c90a1f0e9ff7b | [
"CECILL-B"
] | null | null | null | pymodaq_plugins_smaract/daq_move_plugins/daq_move_SmarActMCS.py | Attolab/pymodaq_plugins_smaract | 109808255d784bd98b875fb4886c90a1f0e9ff7b | [
"CECILL-B"
] | null | null | null | pymodaq_plugins_smaract/daq_move_plugins/daq_move_SmarActMCS.py | Attolab/pymodaq_plugins_smaract | 109808255d784bd98b875fb4886c90a1f0e9ff7b | [
"CECILL-B"
] | null | null | null |
if __name__ == "__main__":
test = DAQ_Move_SmarActMCS()
| 35.551331 | 79 | 0.554545 | from pymodaq.daq_move.utility_classes import DAQ_Move_base
from pymodaq.daq_move.utility_classes import comon_parameters
from pymodaq.daq_utils.daq_utils import ThreadCommand
from easydict import EasyDict as edict
from ..hardware.smaract.smaract import SmarAct
from ..hardware.smaract.smaract import get_controller_locat... | 16 | 0 | 0 | 8,932 | 0 | 0 | 0 | 192 | 155 |
e2620169bb8f204a7628e2d72abcc5b32abb7513 | 6,175 | py | Python | python/minicons.py | kanishkamisra/emnlp-bert-priming | a084b11a2b620879eee1b77900a6214350d23441 | [
"MIT"
] | null | null | null | python/minicons.py | kanishkamisra/emnlp-bert-priming | a084b11a2b620879eee1b77900a6214350d23441 | [
"MIT"
] | null | null | null | python/minicons.py | kanishkamisra/emnlp-bert-priming | a084b11a2b620879eee1b77900a6214350d23441 | [
"MIT"
] | null | null | null |
# Returns the index of the masked token. after applying the model's tokenizer.
| 44.42446 | 227 | 0.726964 | from transformers import AutoTokenizer, AutoModel
import random
import torch
import torch.nn.functional as F
from tqdm import tqdm
import re
from typing import Optional, Callable
def mask(sentence: str, word: str) -> str:
replaced = re.sub(rf'(?<![\w\/-])({word})(?=[^\w\/-])', '[MASK]', sentence)
masked = ['[... | 0 | 0 | 0 | 0 | 394 | 5,198 | 0 | 25 | 476 |
a8ded37312954789356f31d9b123f9279a293e41 | 1,883 | py | Python | mlf_to_csv.py | drokia2/224s_project | 5f0ab9704e5926a0f9f1bdd6d610a7a9fd83846b | [
"MIT"
] | null | null | null | mlf_to_csv.py | drokia2/224s_project | 5f0ab9704e5926a0f9f1bdd6d610a7a9fd83846b | [
"MIT"
] | 1 | 2018-04-01T21:43:11.000Z | 2018-04-01T21:43:11.000Z | mlf_to_csv.py | drokia2/224s_project | 5f0ab9704e5926a0f9f1bdd6d610a7a9fd83846b | [
"MIT"
] | null | null | null | # mlf_to_csv.py
# grabs mlf from the data/mlfs directory and creates a csv in
# in the data/csvs directory with the date
from subprocess import call
import csv
import re
natives = open('data/FWOA.txt').readlines()
natives = [x.strip() for x in natives]
foreigners = open('data/FWA.txt').readlines()
foreigners = [x.s... | 21.643678 | 63 | 0.66171 | # mlf_to_csv.py
# grabs mlf from the data/mlfs directory and creates a csv in
# in the data/csvs directory with the date
from subprocess import call
import csv
import re
natives = open('data/FWOA.txt').readlines()
natives = [x.strip() for x in natives]
foreigners = open('data/FWA.txt').readlines()
foreigners = [x.s... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0dec020a2128ae4182e25a251294b57fa7208dff | 6,388 | py | Python | sphinxext/pwa/__init__.py | Daltz333/sphinxext-pwa | 3d9b47cbee45980305e4c16cf765b43d3654d81d | [
"BSD-3-Clause"
] | 2 | 2022-03-19T05:44:22.000Z | 2022-03-19T16:50:53.000Z | sphinxext/pwa/__init__.py | Daltz333/sphinxext-pwa | 3d9b47cbee45980305e4c16cf765b43d3654d81d | [
"BSD-3-Clause"
] | 9 | 2022-03-09T01:23:56.000Z | 2022-03-19T05:43:43.000Z | sphinxext/pwa/__init__.py | Daltz333/sphinxext-pwa | 3d9b47cbee45980305e4c16cf765b43d3654d81d | [
"BSD-3-Clause"
] | 2 | 2022-03-09T01:19:26.000Z | 2022-03-09T01:28:36.000Z | from sphinx.util import logging
logger = logging.getLogger(__name__)
READTHEDOCS_BUILDERS = ["readthedocs", "readthedocsdirhtml"]
# verify workbox exists or is installed
# if it is not, install it
| 34.160428 | 151 | 0.597996 | import subprocess
from sys import stderr
from typing import Any, Dict, List
from pathlib import Path
import mimetypes
import os
import json
from sphinx.builders.dirhtml import DirectoryHTMLBuilder
from sphinx.builders.html import StandaloneHTMLBuilder
from sphinx.builders.linkcheck import CheckExternalLinksB... | 0 | 0 | 0 | 0 | 0 | 5,525 | 0 | 144 | 497 |
c87f03204e9a7ddadad05d206f33f9203cc7b96f | 1,539 | py | Python | finnmarkslopet-scraper.py | Ash-Crow/mush-bot | 1e59927d13fba7c215a94e0970086fc07f18937d | [
"BSD-3-Clause"
] | null | null | null | finnmarkslopet-scraper.py | Ash-Crow/mush-bot | 1e59927d13fba7c215a94e0970086fc07f18937d | [
"BSD-3-Clause"
] | null | null | null | finnmarkslopet-scraper.py | Ash-Crow/mush-bot | 1e59927d13fba7c215a94e0970086fc07f18937d | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
"""
Create a CSV with each race since 1990, with the rid and the Wikidata qid.
"""
import os
import requests
from bs4 import BeautifulSoup
import re
import csv
race_qids= {}
root_dir = os.environ['HOME'] + "/Dropbox/finnmarkslopet/"
with open(root_dir + 'finnmarkslopet... | 24.428571 | 90 | 0.635478 | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
"""
Create a CSV with each race since 1990, with the rid and the Wikidata qid.
"""
import os
import requests
from bs4 import BeautifulSoup
import re
import csv
race_qids= {}
root_dir = os.environ['HOME'] + "/Dropbox/finnmarkslopet/"
with open(root_dir + 'finnmarkslopet... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5822c055ddb0d39fa933c18b9a5cd835ad0c422e | 231 | py | Python | tests/test_email.py | changrunner/zeppos_mail | 184e6e99d569fd3561f5e9682a8f4e4c3638f1c7 | [
"Apache-2.0"
] | null | null | null | tests/test_email.py | changrunner/zeppos_mail | 184e6e99d569fd3561f5e9682a8f4e4c3638f1c7 | [
"Apache-2.0"
] | null | null | null | tests/test_email.py | changrunner/zeppos_mail | 184e6e99d569fd3561f5e9682a8f4e4c3638f1c7 | [
"Apache-2.0"
] | null | null | null | import unittest
if __name__ == '__main__':
unittest.main()
| 19.25 | 47 | 0.731602 | import unittest
from zeppos_mail.email import Email
class TestTheProjectMethods(unittest.TestCase):
def test_send_methods(self):
self.assertEqual(True, Email().send())
if __name__ == '__main__':
unittest.main()
| 0 | 0 | 0 | 106 | 0 | 0 | 0 | 14 | 45 |
dbeaa325f3c8c14177fa7f791382c0825babacb1 | 4,275 | py | Python | tests/test_create_user.py | k4ch0/ansible-create-user | 02abc8018a1b324f383620c5e825c3c0f9aed467 | [
"MIT"
] | null | null | null | tests/test_create_user.py | k4ch0/ansible-create-user | 02abc8018a1b324f383620c5e825c3c0f9aed467 | [
"MIT"
] | null | null | null | tests/test_create_user.py | k4ch0/ansible-create-user | 02abc8018a1b324f383620c5e825c3c0f9aed467 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import unicode_literals
from testinfra.utils.ansible_runner import AnsibleRunner
import os
import logging
import testinfra.utils.ansible_runner
logging.basicConfig(level=logging.DEBUG)
# # DEFAULT_HOST = 'all'
VAR_FILE = "../../vars/main.yml"
TESTINFRA_HOSTS = t... | 32.142857 | 74 | 0.709708 | from __future__ import absolute_import
from __future__ import unicode_literals
from testinfra.utils.ansible_runner import AnsibleRunner
import os
import pytest
import logging
import testinfra.utils.ansible_runner
import collections
logging.basicConfig(level=logging.DEBUG)
# # DEFAULT_HOST = 'all'
VAR_FILE = "../../va... | 0 | 709 | 0 | 0 | 0 | 1,953 | 0 | -11 | 228 |
67c1181c15fc004d40845fe78dc27574a45524b2 | 12,374 | py | Python | Interface.py | SebasDany/imageplay- | 06d589357e229ab237276a690b97c62c213da0dd | [
"MIT"
] | null | null | null | Interface.py | SebasDany/imageplay- | 06d589357e229ab237276a690b97c62c213da0dd | [
"MIT"
] | null | null | null | Interface.py | SebasDany/imageplay- | 06d589357e229ab237276a690b97c62c213da0dd | [
"MIT"
] | null | null | null | from distutils import command
import time
import Validacion
import shutil
from tkinter import messagebox
from tkinter import ttk
from tkinter.filedialog import askopenfilename
from tkinter import filedialog
from tkinter import Label, Tk
objeto_validacion=Validacion.validacion()
global lista_de_textbox
lista_de_textbox... | 28.445977 | 175 | 0.62696 | from distutils import command
from tkinter import *
import time
import Validacion
import Datos
import os
import shutil
from tkinter import messagebox
from tkinter import ttk
from tkinter.filedialog import askopenfilename
from tkinter import filedialog
from distutils import command
import shutil
from tkinter import mess... | 16 | 0 | 0 | 0 | 0 | 6,169 | 0 | 32 | 539 |
2c6bbd17f262a7ae7a57746b22665c81c22a2df6 | 9,085 | py | Python | client.py | secondspass/docker-performance | 0b1b7d8c14e631fa76a3b0c09cb58c072ce4afe5 | [
"Apache-2.0"
] | null | null | null | client.py | secondspass/docker-performance | 0b1b7d8c14e631fa76a3b0c09cb58c072ce4afe5 | [
"Apache-2.0"
] | null | null | null | client.py | secondspass/docker-performance | 0b1b7d8c14e631fa76a3b0c09cb58c072ce4afe5 | [
"Apache-2.0"
] | null | null | null | from bottle import Bottle
import json
app = Bottle()
dbNoBlob = 0
dbNoFile = 1
dbNoBFRecipe = 2
####
# NANNAN: tar the blobs and send back to master.
# maybe ignore.
####
##
# NANNAN: fetch the serverips from redis by using layer digest
##
################################
# NANNAN: forward to regis... | 30.79661 | 174 | 0.543864 | from bottle import route, run, request, static_file, Bottle, response
import hash_ring
import sys, getopt
import yaml
import os
import requests
import json
from argparse import ArgumentParser
from optparse import OptionParser
import time
import socket
import random
from multiprocessing import Process, Queue
from dxf im... | 0 | 192 | 0 | 0 | 0 | 7,987 | 0 | 30 | 456 |
2bfbc1962415624b52848e0bf74bac2c31a1328b | 3,356 | py | Python | py/g1/webs/g1/webs/handlers/requests.py | clchiou/garage | 446ff34f86cdbd114b09b643da44988cf5d027a3 | [
"MIT"
] | 3 | 2016-01-04T06:28:52.000Z | 2020-09-20T13:18:40.000Z | py/g1/webs/g1/webs/handlers/requests.py | clchiou/garage | 446ff34f86cdbd114b09b643da44988cf5d027a3 | [
"MIT"
] | null | null | null | py/g1/webs/g1/webs/handlers/requests.py | clchiou/garage | 446ff34f86cdbd114b09b643da44988cf5d027a3 | [
"MIT"
] | null | null | null | """Handlers that modify and/or filter requests."""
__all__ = [
'RateLimiter',
]
import logging
from .. import consts
from .. import wsgi_apps
LOG = logging.getLogger(__name__)
| 31.660377 | 75 | 0.654946 | """Handlers that modify and/or filter requests."""
__all__ = [
'RateLimiter',
]
import logging
import math
import time
from g1.bases import collections as g1_collections
from g1.bases.assertions import ASSERT
from .. import consts
from .. import wsgi_apps
LOG = logging.getLogger(__name__)
def default_get_buc... | 0 | 0 | 814 | 1,980 | 0 | 191 | 0 | 26 | 158 |
0d1d973508d6601a4b00288620a207d3cfd8506b | 2,952 | py | Python | check_python_cla/__main__.py | waseem18/check_python_cla | 17e715798cceb3e624c996b4a69717b0df971d2e | [
"Apache-2.0"
] | 6 | 2018-08-17T09:10:17.000Z | 2021-01-03T00:56:37.000Z | check_python_cla/__main__.py | waseem18/check_python_cla | 17e715798cceb3e624c996b4a69717b0df971d2e | [
"Apache-2.0"
] | 124 | 2018-08-13T05:10:57.000Z | 2022-03-18T09:17:59.000Z | check_python_cla/__main__.py | waseem18/check_python_cla | 17e715798cceb3e624c996b4a69717b0df971d2e | [
"Apache-2.0"
] | 11 | 2018-08-17T11:18:32.000Z | 2021-11-16T06:37:20.000Z | import os
import aiohttp_jinja2
import jinja2
from aiohttp import web
if __name__ == "__main__": # pragma: no cover
app = web.Application(middlewares=[error_middleware])
aiohttp_jinja2.setup(
app, loader=jinja2.FileSystemLoader(os.path.join(os.getcwd(), "templates"))
)
app["static_root_url... | 34.325581 | 93 | 0.628726 | import os
import aiohttp
import aiohttp_jinja2
import jinja2
from aiohttp import web
from gidgethub.aiohttp import GitHubAPI
from check_python_cla.bpo import Status, check_cla
from check_python_cla.exceptions import CheckCLAException
from check_python_cla.github import get_and_update_pending_prs
@web.middleware
asy... | 0 | 494 | 1,487 | 0 | 0 | 0 | 0 | 117 | 181 |
3fd47c6825721296f142d239616160203423b85b | 319 | py | Python | geotrek/trekking/migrations/0034_delete_accessibilityattachment.py | GeotrekCE/Geotrek | c1393925c1940ac795ab7fc04819cd8c78bc79fb | [
"BSD-2-Clause"
] | null | null | null | geotrek/trekking/migrations/0034_delete_accessibilityattachment.py | GeotrekCE/Geotrek | c1393925c1940ac795ab7fc04819cd8c78bc79fb | [
"BSD-2-Clause"
] | null | null | null | geotrek/trekking/migrations/0034_delete_accessibilityattachment.py | GeotrekCE/Geotrek | c1393925c1940ac795ab7fc04819cd8c78bc79fb | [
"BSD-2-Clause"
] | null | null | null | # Generated by Django 3.1.14 on 2022-01-31 15:17
| 18.764706 | 53 | 0.633229 | # Generated by Django 3.1.14 on 2022-01-31 15:17
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('trekking', '0033_accessibilityattachment'),
]
operations = [
migrations.DeleteModel(
name='AccessibilityAttachment',
),
]
| 0 | 0 | 0 | 212 | 0 | 0 | 0 | 11 | 46 |
b6a9cf321fddeb01a0cf868c508848c115144dbc | 10,717 | py | Python | mechlib/reaction/rxnid.py | keceli/mechdriver | 978994ba5c77b6df00078b639c4482dacf269440 | [
"Apache-2.0"
] | null | null | null | mechlib/reaction/rxnid.py | keceli/mechdriver | 978994ba5c77b6df00078b639c4482dacf269440 | [
"Apache-2.0"
] | null | null | null | mechlib/reaction/rxnid.py | keceli/mechdriver | 978994ba5c77b6df00078b639c4482dacf269440 | [
"Apache-2.0"
] | 8 | 2019-12-18T20:09:46.000Z | 2020-11-14T16:37:28.000Z | """
New reaction ID code
"""
import autofile
import automol
from mechanalyzer.inf import rxn as rinfo
from mechanalyzer.inf import thy as tinfo
from phydat import phycon
from mechlib import filesys
def build_reaction(rxn_info, ini_thy_info, zma_locs, save_prefix,
id_missing=True, re_id=False):
... | 36.328814 | 78 | 0.642531 | """
New reaction ID code
"""
import autofile
import automol
from mechanalyzer.inf import rxn as rinfo
from mechanalyzer.inf import thy as tinfo
from phydat import phycon
from mechlib import filesys
def build_reaction(rxn_info, ini_thy_info, zma_locs, save_prefix,
id_missing=True, re_id=False):
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4fb558e77134284b552937b6cc72c253c5fb0bdc | 694 | py | Python | srcs/main.py | touilleWoman/N-puzzle | 420d016a08b0106a96fabc3b711f01b12c3dc990 | [
"MIT"
] | null | null | null | srcs/main.py | touilleWoman/N-puzzle | 420d016a08b0106a96fabc3b711f01b12c3dc990 | [
"MIT"
] | null | null | null | srcs/main.py | touilleWoman/N-puzzle | 420d016a08b0106a96fabc3b711f01b12c3dc990 | [
"MIT"
] | null | null | null |
if __name__ == "__main__":
main()
| 19.828571 | 78 | 0.638329 | import click
from game import Game
from parser import parser
from a_star import a_star
@click.command()
@click.option(
"--size",
default=3,
type=int,
help="Input a puzzel size to generate a start puzzel, default value is 3",
)
@click.option(
"--file",
type=click.Path(exists=True, readable=Tru... | 0 | 542 | 0 | 0 | 0 | 0 | 0 | -1 | 112 |
19501d3605991ae11b95c42db74a6a6de46a1cb3 | 201 | py | Python | exercises/exc_02_02.py | rklymentiev/py-for-neuro | 6bb163347483642c79eac429e5a9289edff7ce09 | [
"MIT"
] | 7 | 2021-04-28T13:12:16.000Z | 2022-01-15T00:21:11.000Z | exercises/exc_02_02.py | rklymentiev/py-for-neuro | 6bb163347483642c79eac429e5a9289edff7ce09 | [
"MIT"
] | 2 | 2021-04-02T18:42:55.000Z | 2021-05-20T08:43:06.000Z | exercises/exc_02_02.py | rklymentiev/py-for-neuro | 6bb163347483642c79eac429e5a9289edff7ce09 | [
"MIT"
] | 2 | 2021-07-04T22:57:29.000Z | 2021-07-29T19:28:43.000Z | fibonacci_series = [0, 1] # first two values of series
while ___(fibonacci_series) ___ ___: # condition for the length
# add the new value
fibonacci_series.___(___)
print(fibonacci_series)
| 25.125 | 64 | 0.736318 | fibonacci_series = [0, 1] # first two values of series
while ___(fibonacci_series) ___ ___: # condition for the length
# add the new value
fibonacci_series.___(___)
print(fibonacci_series)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7ff6de80204f399e1cd582b00c14aec6c6935c8d | 296 | py | Python | Components/plark-game/plark_game/classes/pantherAgent.py | gjp1203/plark_ai_public | 7aae5352cd13b33971ae52148ef7df90a8426f8e | [
"Apache-2.0"
] | null | null | null | Components/plark-game/plark_game/classes/pantherAgent.py | gjp1203/plark_ai_public | 7aae5352cd13b33971ae52148ef7df90a8426f8e | [
"Apache-2.0"
] | null | null | null | Components/plark-game/plark_game/classes/pantherAgent.py | gjp1203/plark_ai_public | 7aae5352cd13b33971ae52148ef7df90a8426f8e | [
"Apache-2.0"
] | null | null | null |
ACTION_LOOKUP = {
0 : '1', # Up
1 : '2', # Up right
2 : '3', # Down right
3 : '4', # Down
4 : '5', # Down left
5 : '6', # Up left
6 : 'end'
}
| 18.5 | 33 | 0.537162 | from .agent import Agent
class Panther_Agent(Agent):
def action_lookup(self, action):
return ACTION_LOOKUP[action]
ACTION_LOOKUP = {
0 : '1', # Up
1 : '2', # Up right
2 : '3', # Down right
3 : '4', # Down
4 : '5', # Down left
5 : '6', # Up left
6 : 'end'
}
| 0 | 0 | 0 | 71 | 0 | 0 | 0 | 3 | 45 |
ff0ccd8b12a0dece5449d0ecd1eab14931b12a9f | 4,759 | py | Python | dl_multi/commands/default.py | wbrandenburger/MTPIA | 02c773ce60b7efd5b15f270f047a6da5a8f00b7e | [
"MIT"
] | 1 | 2020-04-14T10:19:37.000Z | 2020-04-14T10:19:37.000Z | dl_multi/commands/default.py | wbrandenburger/MTPIA | 02c773ce60b7efd5b15f270f047a6da5a8f00b7e | [
"MIT"
] | null | null | null | dl_multi/commands/default.py | wbrandenburger/MTPIA | 02c773ce60b7efd5b15f270f047a6da5a8f00b7e | [
"MIT"
] | null | null | null | # ===========================================================================
# default.py --------------------------------------------------------------
# ===========================================================================
"""
Examples
^^^^^^^^
- To override some configuration options, you can use the flag... | 29.196319 | 77 | 0.434755 | # ===========================================================================
# default.py --------------------------------------------------------------
# ===========================================================================
"""
Examples
^^^^^^^^
- To override some configuration options, you can use the flag... | 0 | 1,411 | 0 | 1,797 | 0 | 0 | 0 | -49 | 199 |
ca664f99426c4233bb183526150ff77bb24145d7 | 848 | py | Python | homeassistant/components/sleepiq/coordinator.py | d4rk1/core | 52ca1a3d475fdd96e6998d8c8b0be9a423b4dd06 | [
"Apache-2.0"
] | 1 | 2022-02-20T14:35:42.000Z | 2022-02-20T14:35:42.000Z | homeassistant/components/sleepiq/coordinator.py | d4rk1/core | 52ca1a3d475fdd96e6998d8c8b0be9a423b4dd06 | [
"Apache-2.0"
] | 4 | 2022-03-02T07:18:01.000Z | 2022-03-31T07:09:30.000Z | homeassistant/components/sleepiq/coordinator.py | d4rk1/core | 52ca1a3d475fdd96e6998d8c8b0be9a423b4dd06 | [
"Apache-2.0"
] | null | null | null | """Coordinator for SleepIQ."""
from datetime import timedelta
import logging
_LOGGER = logging.getLogger(__name__)
UPDATE_INTERVAL = timedelta(seconds=60)
| 25.69697 | 75 | 0.676887 | """Coordinator for SleepIQ."""
from datetime import timedelta
import logging
from asyncsleepiq import AsyncSleepIQ
from homeassistant.core import HomeAssistant
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
_LOGGER = logging.getLogger(__name__)
UPDATE_INTERVAL = timedelta(seconds=60)
c... | 0 | 0 | 0 | 507 | 0 | 0 | 0 | 92 | 91 |
33ff156cd09bc70291b785ac8824cd230a47e786 | 4,004 | py | Python | learning/clustering/demo/data_generation.py | dibakch/differential-privacy | ae9c6b6d5b7e772837ae336d1b3092683481ec16 | [
"Apache-2.0"
] | 2,550 | 2019-09-04T13:13:24.000Z | 2022-03-31T16:05:50.000Z | learning/clustering/demo/data_generation.py | fbalicchia/differential-privacy | 099080e49c4c047802d785bc818898c0caf84d45 | [
"Apache-2.0"
] | 90 | 2019-09-10T15:37:10.000Z | 2022-03-28T12:55:03.000Z | learning/clustering/demo/data_generation.py | fbalicchia/differential-privacy | 099080e49c4c047802d785bc818898c0caf84d45 | [
"Apache-2.0"
] | 324 | 2019-09-05T11:52:06.000Z | 2022-03-31T03:30:26.000Z | # Copyright 2021 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | 40.04 | 80 | 0.715534 | # Copyright 2021 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
99e1c48ddc31697574f9fd3971b6d7d07d74b2be | 4,111 | py | Python | src/ezdxf/addons/drawing/matplotlib_hatch.py | jpsantos-mf/ezdxf | 2b542a551b2cfc3c0920a5dbf302ff58cea90fbd | [
"MIT"
] | 1 | 2021-06-05T09:15:15.000Z | 2021-06-05T09:15:15.000Z | src/ezdxf/addons/drawing/matplotlib_hatch.py | jpsantos-mf/ezdxf | 2b542a551b2cfc3c0920a5dbf302ff58cea90fbd | [
"MIT"
] | null | null | null | src/ezdxf/addons/drawing/matplotlib_hatch.py | jpsantos-mf/ezdxf | 2b542a551b2cfc3c0920a5dbf302ff58cea90fbd | [
"MIT"
] | null | null | null | # Copyright (c) 2020, Manfred Moitzi
# License: MIT License
# Predefined matplotlib pattern:
# / - diagonal hatching
# \ - back diagonal
# | - vertical
# - - horizontal
# + - crossed
# x - crossed diagonal
# o - small circle
# O - large circle
# . - dots
# * - stars
# 1x sparse
# 2x normal
# 3x dense
HATCH_NAME_MAPPI... | 23.095506 | 37 | 0.396984 | # Copyright (c) 2020, Manfred Moitzi
# License: MIT License
# Predefined matplotlib pattern:
# / - diagonal hatching
# \ - back diagonal
# | - vertical
# - - horizontal
# + - crossed
# x - crossed diagonal
# o - small circle
# O - large circle
# . - dots
# * - stars
# 1x sparse
# 2x normal
# 3x dense
HATCH_NAME_MAPPI... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
dcf3e2db95541e26c80bf72e6ad74117517b4d9f | 2,252 | py | Python | tensorflow_graphics/projects/points_to_3Dobjects/utils/io.py | Liang813/graphics | 71ab1775228a0a292427551350cbb62bfa8bd01a | [
"Apache-2.0"
] | 2,759 | 2019-01-08T10:40:34.000Z | 2022-03-28T13:49:37.000Z | tensorflow_graphics/projects/points_to_3Dobjects/utils/io.py | Liang813/graphics | 71ab1775228a0a292427551350cbb62bfa8bd01a | [
"Apache-2.0"
] | 262 | 2019-04-28T12:25:49.000Z | 2022-03-24T19:35:15.000Z | tensorflow_graphics/projects/points_to_3Dobjects/utils/io.py | Liang813/graphics | 71ab1775228a0a292427551350cbb62bfa8bd01a | [
"Apache-2.0"
] | 380 | 2019-05-09T00:14:45.000Z | 2022-03-31T12:48:25.000Z | # Copyright 2020 The TensorFlow 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 37.533333 | 77 | 0.672735 | # Copyright 2020 The TensorFlow 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 0 | 0 | 0 | 0 | 0 | 192 | 0 | -12 | 45 |
3582ad7858e54f54435dda04097f21a99f1c4151 | 197 | py | Python | video-processing/sigs.py | jonathanli2012/ece-capstone | 4cdb3083a44aba713d6e115bc7439283f6d3beb8 | [
"MIT"
] | null | null | null | video-processing/sigs.py | jonathanli2012/ece-capstone | 4cdb3083a44aba713d6e115bc7439283f6d3beb8 | [
"MIT"
] | null | null | null | video-processing/sigs.py | jonathanli2012/ece-capstone | 4cdb3083a44aba713d6e115bc7439283f6d3beb8 | [
"MIT"
] | null | null | null | from threading import Lock
mutex = Lock()
mutex.acquire()
mutex.release()
CRASH_STATUS = None
#t = Thread(target = processData, args = (0,))
#t.start()
| 13.133333 | 46 | 0.695431 | from threading import Thread, Lock
mutex = Lock()
mutex.acquire()
mutex.release()
CRASH_STATUS = None
def processData(data):
return
#t = Thread(target = processData, args = (0,))
#t.start()
| 0 | 0 | 0 | 0 | 0 | 10 | 0 | 8 | 23 |
108a308eb9b6b3961ea4ec4cbadb7e08d88f9569 | 389 | py | Python | project/app.py | jiangtyd/crewviewer | 4ab2d77b7699a8d0adb035969aab3551cdea26c9 | [
"MIT"
] | null | null | null | project/app.py | jiangtyd/crewviewer | 4ab2d77b7699a8d0adb035969aab3551cdea26c9 | [
"MIT"
] | null | null | null | project/app.py | jiangtyd/crewviewer | 4ab2d77b7699a8d0adb035969aab3551cdea26c9 | [
"MIT"
] | null | null | null | from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
import os
app = Flask(__name__)
app.config.from_object(os.environ['APP_SETTINGS'])
db = SQLAlchemy(app)
if __name__ == '__main__':
app.run(debug=True)
| 20.473684 | 50 | 0.727506 | from flask import Flask, render_template
from flask.ext.sqlalchemy import SQLAlchemy
import os
app = Flask(__name__)
app.config.from_object(os.environ['APP_SETTINGS'])
db = SQLAlchemy(app)
@app.route('/')
def index():
return render_template('index.html')
@app.route('/hello')
def hello():
return render_templa... | 0 | 101 | 0 | 0 | 0 | 0 | 0 | 17 | 46 |
863904d76e32e33aa9cc5c6242fa4bff00ff2e96 | 2,811 | py | Python | heat_tempest_plugin/scenario/test_base_resources.py | ricolin/heat-tempest-plugin | f90cef06e4dbf9094e8d6044e523665f5289b582 | [
"Apache-2.0"
] | null | null | null | heat_tempest_plugin/scenario/test_base_resources.py | ricolin/heat-tempest-plugin | f90cef06e4dbf9094e8d6044e523665f5289b582 | [
"Apache-2.0"
] | null | null | null | heat_tempest_plugin/scenario/test_base_resources.py | ricolin/heat-tempest-plugin | f90cef06e4dbf9094e8d6044e523665f5289b582 | [
"Apache-2.0"
] | null | null | null | # 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
# d... | 37.986486 | 78 | 0.673782 | # 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
# d... | 0 | 0 | 0 | 2,070 | 0 | 0 | 0 | 78 | 90 |
3c61d6ecc0747549e30a5427fa18a80c581883c0 | 5,638 | py | Python | checkmarx/tablefmt.py | zkdev/cc-utils | 042c6632ca6f61a484bc0a71f85957aeba7f7278 | [
"BSD-3-Clause"
] | 15 | 2018-04-18T13:25:30.000Z | 2022-03-04T09:25:41.000Z | checkmarx/tablefmt.py | zkdev/cc-utils | 042c6632ca6f61a484bc0a71f85957aeba7f7278 | [
"BSD-3-Clause"
] | 221 | 2018-04-12T06:29:43.000Z | 2022-03-27T03:01:40.000Z | checkmarx/tablefmt.py | zkdev/cc-utils | 042c6632ca6f61a484bc0a71f85957aeba7f7278 | [
"BSD-3-Clause"
] | 29 | 2018-04-11T14:42:23.000Z | 2021-11-09T16:26:32.000Z | import checkmarx.model as model
| 30.978022 | 91 | 0.625576 | import tabulate
import textwrap
import typing
import checkmarx.client
import checkmarx.model as model
def get_scan_info_table(
scan_results: typing.Iterable[model.ScanResult],
tablefmt: str = 'simple',
):
scan_info_header = ('Scan ID', 'Artifact Name', 'Scan State', 'Start', 'End')
def started_on(sc... | 0 | 0 | 0 | 0 | 0 | 5,415 | 0 | -18 | 204 |
be2fcd431aeeb5c9f69dd44788a4665b5d101786 | 2,811 | py | Python | tests/test_main/test_single_pulse.py | HughPaynter/PyGRB | 2eaf834cf3c62a639a056285ca9518456daa4b7c | [
"BSD-3-Clause"
] | 14 | 2020-05-29T02:43:18.000Z | 2022-03-12T13:27:36.000Z | tests/test_main/test_single_pulse.py | HughPaynter/PyGRB | 2eaf834cf3c62a639a056285ca9518456daa4b7c | [
"BSD-3-Clause"
] | 8 | 2020-08-03T02:41:52.000Z | 2021-06-22T05:41:52.000Z | tests/test_main/test_single_pulse.py | HughPaynter/PyGRB | 2eaf834cf3c62a639a056285ca9518456daa4b7c | [
"BSD-3-Clause"
] | 14 | 2020-06-30T07:10:47.000Z | 2022-03-12T13:27:39.000Z | import unittest
if __name__ == '__main__':
unittest.main()
| 31.58427 | 82 | 0.605834 | import os
import bilby
import unittest
import numpy as np
from numpy.testing import (assert_almost_equal, assert_equal, assert_allclose,
assert_array_almost_equal, assert_)
from PyGRB.backend.makepriors import MakePriors
from PyGRB.backend.makemodels import create_model_from_key
from PyGR... | 0 | 0 | 0 | 2,315 | 0 | 0 | 0 | 197 | 225 |
235d8f355803d0bbc8342e00f8a5b931224412a1 | 4,037 | py | Python | QnABoT/Core/Word2Vec/buildModel.py | CankutCoskun/semanticQuestionAnswerBot | ee7faf616c0ce92a88926abd2dbe7169617ae115 | [
"Apache-2.0"
] | null | null | null | QnABoT/Core/Word2Vec/buildModel.py | CankutCoskun/semanticQuestionAnswerBot | ee7faf616c0ce92a88926abd2dbe7169617ae115 | [
"Apache-2.0"
] | null | null | null | QnABoT/Core/Word2Vec/buildModel.py | CankutCoskun/semanticQuestionAnswerBot | ee7faf616c0ce92a88926abd2dbe7169617ae115 | [
"Apache-2.0"
] | 1 | 2021-06-07T10:44:57.000Z | 2021-06-07T10:44:57.000Z | '''
#Reads processed tokens from a file called "docs_processed.txt"
#corpus type list of lists of strings [[Str]]
#Built gensim word2vec model, gensim reference: https://radimrehurek.com/gensim/models/word2vec.html
#Gensim is an open source library which is
#Using highly optimized C routines,
#Originally ported from ... | 30.816794 | 252 | 0.732475 | '''
#Reads processed tokens from a file called "docs_processed.txt"
#corpus type list of lists of strings [[Str]]
#Built gensim word2vec model, gensim reference: https://radimrehurek.com/gensim/models/word2vec.html
#Gensim is an open source library which is
#Using highly optimized C routines,
#Originally ported from ... | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 17 | 22 |