hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 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 3 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
17082a1780c9b1d5cefa05b73988108b35ec786d | 7,699 | py | Python | test/test_simplemusic.py | eric-brechemier/pyknon | 14dfe74c95a271c5bb98841ef3b0dbfa10d55128 | [
"MIT"
] | 184 | 2015-02-04T15:19:32.000Z | 2022-03-13T06:39:12.000Z | test/test_simplemusic.py | eric-brechemier/pyknon | 14dfe74c95a271c5bb98841ef3b0dbfa10d55128 | [
"MIT"
] | 15 | 2015-03-28T01:12:15.000Z | 2021-04-26T19:25:39.000Z | test/test_simplemusic.py | eric-brechemier/pyknon | 14dfe74c95a271c5bb98841ef3b0dbfa10d55128 | [
"MIT"
] | 38 | 2015-03-09T20:38:27.000Z | 2022-03-07T12:42:25.000Z | from __future__ import division
from fractions import Fraction as F
try:
import unittest2 as unittest
except:
import unittest
import pyknon.simplemusic as music
class TestSimplemusic(unittest.TestCase):
def test_mod12(self):
self.assertEqual(music.mod12(0), 0)
self.assertEqual(music.mod1... | 43.497175 | 86 | 0.634628 |
a4652252a2f5d4e76421d8b7285e113521aa3ff4 | 6,444 | py | Python | app/models/user.py | abhisuri97/h4i-demo-flask | 7c143553c12e7be5d2546ea41848bb0a39eb0cf4 | [
"MIT"
] | null | null | null | app/models/user.py | abhisuri97/h4i-demo-flask | 7c143553c12e7be5d2546ea41848bb0a39eb0cf4 | [
"MIT"
] | null | null | null | app/models/user.py | abhisuri97/h4i-demo-flask | 7c143553c12e7be5d2546ea41848bb0a39eb0cf4 | [
"MIT"
] | null | null | null | from flask import current_app
from flask_login import AnonymousUserMixin, UserMixin
from itsdangerous import TimedJSONWebSignatureSerializer as Serializer
from itsdangerous import BadSignature, SignatureExpired
from werkzeug.security import check_password_hash, generate_password_hash
from .. import db, login_manager
... | 32.545455 | 76 | 0.609559 |
1995bf5779b779d80abf800906a19691a047e89f | 29,103 | py | Python | src/embedding/objects/train_obj.py | mykiscool/DeepCamera | e77cdbf45ab09895f315aa299bd6ac87b3bb6d66 | [
"MIT"
] | 914 | 2019-03-07T14:57:45.000Z | 2022-03-31T14:54:15.000Z | src/embedding/objects/train_obj.py | mykiscool/DeepCamera | e77cdbf45ab09895f315aa299bd6ac87b3bb6d66 | [
"MIT"
] | 45 | 2019-03-11T09:53:37.000Z | 2022-03-30T21:59:37.000Z | src/embedding/objects/train_obj.py | mykiscool/DeepCamera | e77cdbf45ab09895f315aa299bd6ac87b3bb6d66 | [
"MIT"
] | 148 | 2019-03-08T00:40:28.000Z | 2022-03-30T09:22:18.000Z | from __future__ import absolute_import, division, print_function
import hashlib
import os
import requests
import os.path
import random
import re
import struct
import sys
import tarfile
from datetime import datetime
from time import time
import numpy as np
import tensorflow as tf
from tensorflow.python.framework impor... | 47.24513 | 131 | 0.620692 |
9e830431587c9e0ff79f1a22f27fad3e98ff399e | 4,508 | py | Python | python/JSONManifestHandler.py | Kcjohnson/SCGP | e757b3b750ce8ccf15085cb4bc60f2dfd4d9a285 | [
"MIT"
] | 16 | 2020-11-09T14:23:45.000Z | 2022-03-22T07:10:15.000Z | python/JSONManifestHandler.py | Kcjohnson/SCGP | e757b3b750ce8ccf15085cb4bc60f2dfd4d9a285 | [
"MIT"
] | 3 | 2020-01-16T06:07:35.000Z | 2020-06-01T15:51:32.000Z | python/JSONManifestHandler.py | Kcjohnson/SCGP | e757b3b750ce8ccf15085cb4bc60f2dfd4d9a285 | [
"MIT"
] | 7 | 2020-12-14T02:51:42.000Z | 2022-02-18T07:15:55.000Z | """
JSON file
Manifest handler
"""
from python.ManifestHandler import ManifestHandler
import psycopg2
import psycopg2.extras
class JSONManifestHandler(ManifestHandler):
def __init__(self, cases_json, samples_json, aliquots_json, files_json, readgroups_json, pairs_json):
self.cases = json... | 50.651685 | 239 | 0.636868 |
741946c2d88c2dcd13d050a94db8ae629b61618d | 1,484 | py | Python | photos/models.py | gumato/gallery | 32a2d7b895cbba990ba5c9e5fa3ed9405dac4d09 | [
"Unlicense"
] | null | null | null | photos/models.py | gumato/gallery | 32a2d7b895cbba990ba5c9e5fa3ed9405dac4d09 | [
"Unlicense"
] | null | null | null | photos/models.py | gumato/gallery | 32a2d7b895cbba990ba5c9e5fa3ed9405dac4d09 | [
"Unlicense"
] | null | null | null | from django.db import models
# Create your models here.
class Location(models.Model):
location=models.CharField(max_length=30)
def save_locations(self):
self.save()
def delete_locations(self):
self.delete()
def __str__(self):
return self.location
class Category(models.M... | 20.901408 | 80 | 0.652291 |
8e31b2dac8489336cd1e06cecbc5aadc0d2594bb | 1,235 | py | Python | task_board/tasks/serializers.py | AlexanderKaluzhny/task_board | 286eeb52403d695d6a61ec42bea7fa32e5aca228 | [
"MIT"
] | 3 | 2017-04-22T11:22:39.000Z | 2020-01-22T12:22:56.000Z | task_board/tasks/serializers.py | AlexanderKaluzhny/task_board | 286eeb52403d695d6a61ec42bea7fa32e5aca228 | [
"MIT"
] | 12 | 2017-12-14T07:56:33.000Z | 2022-03-12T00:03:56.000Z | task_board/tasks/serializers.py | AlexanderKaluzhny/task_board | 286eeb52403d695d6a61ec42bea7fa32e5aca228 | [
"MIT"
] | 1 | 2022-01-29T16:44:50.000Z | 2022-01-29T16:44:50.000Z | from rest_framework import serializers
from task_board.tasks.models import Task, TaskStatuses
class TaskSerializer(serializers.ModelSerializer):
created_by_username = serializers.StringRelatedField(source='created_by')
accomplished_by_username = serializers.StringRelatedField(source='accomplished_by')
st... | 41.166667 | 87 | 0.645344 |
bafd2d1ff44b0b3eee2aac01505cde7e13dfd07d | 25,763 | py | Python | pmb.py | BTEST4HE/GT3MBLPMBTools | 09408d2a79971073f9d2a47f1d64e0ddcfa088cf | [
"MIT"
] | null | null | null | pmb.py | BTEST4HE/GT3MBLPMBTools | 09408d2a79971073f9d2a47f1d64e0ddcfa088cf | [
"MIT"
] | null | null | null | pmb.py | BTEST4HE/GT3MBLPMBTools | 09408d2a79971073f9d2a47f1d64e0ddcfa088cf | [
"MIT"
] | null | null | null | import helper
pmb_dict = {
'pmb10': 0x20,
'pmb20': 0x39,
'pmb21': 0x7D,
'pmb40': 0x7E,
'pmb40s': 0x5E
}
"""
pmb_dict
0x01 : chr_size = 0x20
0x02 : chr_size = 0x40
0x04 : FUNC data availability
0x08 : Availability of recursive data for SUB
0x10 : Presence of variable "text_unk_3" in TEXT data
0x20 :... | 38.625187 | 118 | 0.624229 |
41e03ed1bcf8f78e42b1200faf650dff19991ec9 | 18,525 | py | Python | bioslds/nsm.py | ttesileanu/bio-time-series | da14482422b56c2e750a0044866788f4a87dde12 | [
"MIT"
] | null | null | null | bioslds/nsm.py | ttesileanu/bio-time-series | da14482422b56c2e750a0044866788f4a87dde12 | [
"MIT"
] | null | null | null | bioslds/nsm.py | ttesileanu/bio-time-series | da14482422b56c2e750a0044866788f4a87dde12 | [
"MIT"
] | 1 | 2022-03-07T22:22:24.000Z | 2022-03-07T22:22:24.000Z | """ Define a biologically-plausible online learner using a similarity matching
objective.
"""
import numpy as np
from bioslds.monitor import AttributeMonitor
from types import SimpleNamespace
from typing import Optional, Sequence, Union, Callable
from numba import njit
class NonRecurrent(object):
""" Solve arg... | 35.831721 | 88 | 0.576248 |
56f331d448f77525796c2f5e269b4248e979f5c6 | 14,158 | py | Python | src/lama/modules/roberta_connector.py | Chandrahasd/OKGIT | 16f4dbbfca1020809d3bae0445ee564fa8af9193 | [
"MIT"
] | 4 | 2021-08-10T12:43:57.000Z | 2022-03-29T04:09:23.000Z | src/lama/modules/roberta_connector.py | Chandrahasd/OKGIT | 16f4dbbfca1020809d3bae0445ee564fa8af9193 | [
"MIT"
] | 1 | 2021-07-14T02:20:20.000Z | 2021-08-04T23:41:22.000Z | src/lama/modules/roberta_connector.py | Chandrahasd/OKGIT | 16f4dbbfca1020809d3bae0445ee564fa8af9193 | [
"MIT"
] | 1 | 2021-09-11T10:05:26.000Z | 2021-09-11T10:05:26.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
from fairseq.models.roberta import RobertaModel
from fairseq import utils
import torch
from pytorch_pretrained_bert import... | 39.002755 | 154 | 0.598178 |
3dec790aa0759f538be8ec3bd302aa1f600d6cb4 | 184 | py | Python | characters_in_range.py | GYosifov88/Python-Fundamentals | b46ba2822bd2dac6ff46830c6a520e559b448442 | [
"MIT"
] | null | null | null | characters_in_range.py | GYosifov88/Python-Fundamentals | b46ba2822bd2dac6ff46830c6a520e559b448442 | [
"MIT"
] | null | null | null | characters_in_range.py | GYosifov88/Python-Fundamentals | b46ba2822bd2dac6ff46830c6a520e559b448442 | [
"MIT"
] | null | null | null | def chars_in_range(a, b):
for n in range (ord(a) + 1, ord(b)):
print(chr(n), end= ' ')
first_char = input()
second_char = input()
chars_in_range(first_char, second_char) | 20.444444 | 40 | 0.63587 |
b89c1cba791992be0861b55542c2e3be46d91a39 | 1,663 | py | Python | boosted.py | alihakimtaskiran/GoblinWordGenerator | f7fd651ea8f9eb6d6c70be77653f4200ce463b68 | [
"BSD-3-Clause"
] | 2 | 2019-07-17T08:36:08.000Z | 2019-07-18T13:56:15.000Z | boosted.py | alihakimtaskiran/GoblinWordGenerator | f7fd651ea8f9eb6d6c70be77653f4200ce463b68 | [
"BSD-3-Clause"
] | null | null | null | boosted.py | alihakimtaskiran/GoblinWordGenerator | f7fd651ea8f9eb6d6c70be77653f4200ce463b68 | [
"BSD-3-Clause"
] | null | null | null | # Inteligent Wordlist Generator
#
# By: Sam Junior and UndeadSec
# Goblin Wordlist Generator
# Version: 2.0
#
#
##################
import itertools
ban = '''
'''
print('\n------------------\n\n G 0 B L ! N \033[32m2.0\033[m | WORDGENERATOR\n\n~ by: UndeadSec and S... | 31.980769 | 145 | 0.580277 |
6081acfc9aadc6295410d6328e411c90bf1ef21c | 2,426 | py | Python | utils/basic/create_test_world.py | rafsaf/Plemiona_Planer | 1a0e2da0c4b18f1abd1df876f688c6442cba17ce | [
"Apache-2.0"
] | 2 | 2020-11-15T12:50:07.000Z | 2020-11-17T21:54:54.000Z | utils/basic/create_test_world.py | rafsaf/Plemiona_Planer | 1a0e2da0c4b18f1abd1df876f688c6442cba17ce | [
"Apache-2.0"
] | 21 | 2021-11-01T14:04:19.000Z | 2022-03-25T06:31:03.000Z | utils/basic/create_test_world.py | rafsaf/Tribal-Wars-Planer | 083af9b1efe814be3abe975b9ac8faccc00ebb09 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Rafał Safin (rafsaf). 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 applicabl... | 37.323077 | 87 | 0.606348 |
d0ab89c261f970e16a9c4407620bd16a0df9e9e9 | 216 | py | Python | configs/dcn/faster_rcnn_r50_fpn_mdconv_c3-c5_group4_1x_coco.py | evgps/mmdetection_trashcan | aaf4237c2c0d473425cdc7b741d3009177b79751 | [
"Apache-2.0"
] | 20,190 | 2018-09-10T01:11:53.000Z | 2022-03-31T22:31:33.000Z | configs/dcn/faster_rcnn_r50_fpn_mdconv_c3-c5_group4_1x_coco.py | evgps/mmdetection_trashcan | aaf4237c2c0d473425cdc7b741d3009177b79751 | [
"Apache-2.0"
] | 6,736 | 2018-09-17T09:45:51.000Z | 2022-03-31T22:54:10.000Z | configs/dcn/faster_rcnn_r50_fpn_mdconv_c3-c5_group4_1x_coco.py | evgps/mmdetection_trashcan | aaf4237c2c0d473425cdc7b741d3009177b79751 | [
"Apache-2.0"
] | 7,837 | 2018-09-11T02:58:23.000Z | 2022-03-31T22:31:38.000Z | _base_ = '../faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py'
model = dict(
backbone=dict(
dcn=dict(type='DCNv2', deform_groups=4, fallback_on_stride=False),
stage_with_dcn=(False, True, True, True)))
| 36 | 74 | 0.699074 |
2ff2f8641367adf6478c7af4407cc524a3921cc8 | 5,928 | py | Python | phlibs/config/config.py | adambaumeister/panhit | f907dee310d401931d96312834e4d43523ddafac | [
"Apache-2.0"
] | null | null | null | phlibs/config/config.py | adambaumeister/panhit | f907dee310d401931d96312834e4d43523ddafac | [
"Apache-2.0"
] | null | null | null | phlibs/config/config.py | adambaumeister/panhit | f907dee310d401931d96312834e4d43523ddafac | [
"Apache-2.0"
] | null | null | null | from phlibs.modules import *
from phlibs.Inputs import *
from phlibs.outputs import *
from phlibs.db import JsonDB
import pathlib
import os
import yaml
DEFAULT_CONFIG_PATH=str(pathlib.Path.home()) + os.sep + "panhit.yaml"
class ConfigFile:
def __init__(self):
"""
Initialize the yaml/json panhit co... | 28.917073 | 108 | 0.553981 |
403d7272e998f0f28f5e387b100b39818792d86e | 1,278 | py | Python | venv/lib/python3.8/site-packages/azureml/_restclient/models/resource_name.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/azureml/_restclient/models/resource_name.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/azureml/_restclient/models/resource_name.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | 2 | 2021-05-23T16:46:31.000Z | 2021-05-26T23:51:09.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator 2.3.3... | 31.170732 | 77 | 0.561815 |
b83b591ba4016fd31e7c81ee7b8c8146b39e237e | 984 | py | Python | examples/django-weather-web/weather_client/settings.py | ericmoritz/hydra-python-client | a4f5564600e074ff0e835fe34ce6cb16fb31193d | [
"BSD-3-Clause"
] | 1 | 2016-08-28T08:08:07.000Z | 2016-08-28T08:08:07.000Z | examples/django-weather-web/weather_client/settings.py | ericmoritz/hydra-python-client | a4f5564600e074ff0e835fe34ce6cb16fb31193d | [
"BSD-3-Clause"
] | null | null | null | examples/django-weather-web/weather_client/settings.py | ericmoritz/hydra-python-client | a4f5564600e074ff0e835fe34ce6cb16fb31193d | [
"BSD-3-Clause"
] | null | null | null | from hydraclient.core.settings import DEFAULT_JSONLD_CONTEXT
import os
###===================================================================
### Added for hydraclient.contrib.django.hydraclient
###===================================================================
CONFIG_URL=os.environ['CONFIG_URL']
DEFAULT_JSONLD_C... | 27.333333 | 70 | 0.666667 |
5a12e0cbb8c44e424689de7d218971a831b6d406 | 5,348 | py | Python | downstream/insseg/models/resnet.py | ut-amrl/ContrastiveSceneContexts | 622b9cd32ea2dcf8307d25eb2e7ee1c09d220134 | [
"MIT"
] | 212 | 2019-10-11T19:14:05.000Z | 2022-03-31T07:08:02.000Z | sparseConv/multitask/semseg/models/resnet.py | HenrryBryant/Scene-Recognition-in-3D | 8fb869e1f8e8ff48c6f1082bb75f60a562875fc5 | [
"MIT"
] | 58 | 2019-10-13T14:49:39.000Z | 2022-03-24T08:29:41.000Z | sparseConv/multitask/semseg/models/resnet.py | HenrryBryant/Scene-Recognition-in-3D | 8fb869e1f8e8ff48c6f1082bb75f60a562875fc5 | [
"MIT"
] | 45 | 2019-10-23T07:09:23.000Z | 2022-03-04T09:49:37.000Z | import torch.nn as nn
import MinkowskiEngine as ME
from models.model import Model
from models.modules.common import ConvType, NormType, get_norm, conv, sum_pool
from models.modules.resnet_block import BasicBlock, Bottleneck
class ResNetBase(Model):
BLOCK = None
LAYERS = ()
INIT_DIM = 64
PLANES = (64, 128, 2... | 24.645161 | 94 | 0.6365 |
f5264a41043765eecc731c9c9897509af167c4aa | 28,370 | py | Python | bin/tools/config_tool/config_tool.py | overtalk/ARK | 9d314e99dc13684fc672371a0c3fbaa6b9a46d97 | [
"Apache-2.0"
] | 1 | 2020-02-21T14:32:13.000Z | 2020-02-21T14:32:13.000Z | bin/tools/config_tool/config_tool.py | overtalk/ARK | 9d314e99dc13684fc672371a0c3fbaa6b9a46d97 | [
"Apache-2.0"
] | null | null | null | bin/tools/config_tool/config_tool.py | overtalk/ARK | 9d314e99dc13684fc672371a0c3fbaa6b9a46d97 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# encoding=utf-8
# author: NickYang
# date: 2019/04/02
# version: 0.1
# changelog:
# 1. first version
# TODO:
# 1. array
import os
import sys
import datetime
import os.path
import shutil
import subprocess
import argparse
from xml.dom.minidom import Document
from xml.dom import minidom
# self mo... | 43.916409 | 155 | 0.636412 |
722d79f1bb2010f518235fadfb43bb136eab68c5 | 3,167 | py | Python | Codes/Hill Climbing Matplot.py | tanu17/Graph-Algorithms-for-Heavy-weight-binary-codes | 791a2ea858583c446e8a0a2de3c90107de534bc7 | [
"MIT"
] | null | null | null | Codes/Hill Climbing Matplot.py | tanu17/Graph-Algorithms-for-Heavy-weight-binary-codes | 791a2ea858583c446e8a0a2de3c90107de534bc7 | [
"MIT"
] | null | null | null | Codes/Hill Climbing Matplot.py | tanu17/Graph-Algorithms-for-Heavy-weight-binary-codes | 791a2ea858583c446e8a0a2de3c90107de534bc7 | [
"MIT"
] | null | null | null | import random
import itertools
import matplotlib.pyplot as plt
import numpy as np
"""
Let N(x) be the heuristic solution after hill climbing
| X \ {x} x belongs to X
N(x) = | removal depends on probability
| X\ {y} U {x} x belongs to H(n,w) \ x & y belong... | 23.992424 | 80 | 0.475213 |
fcf844cbeadaad435ccdfa098ef20d5607017637 | 4,390 | py | Python | paddlex/ppdet/utils/profiler.py | cheneyveron/PaddleX | 86f73fc6a66b12c638f642524bfd1cf730e26c4b | [
"Apache-2.0"
] | 8 | 2020-03-11T08:12:19.000Z | 2020-03-18T08:33:56.000Z | paddlex/ppdet/utils/profiler.py | cheneyveron/PaddleX | 86f73fc6a66b12c638f642524bfd1cf730e26c4b | [
"Apache-2.0"
] | 1 | 2020-03-15T13:05:43.000Z | 2020-03-15T13:05:43.000Z | paddlex/ppdet/utils/profiler.py | cheneyveron/PaddleX | 86f73fc6a66b12c638f642524bfd1cf730e26c4b | [
"Apache-2.0"
] | 2 | 2020-03-15T11:53:54.000Z | 2020-03-24T07:27:09.000Z | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 39.196429 | 81 | 0.628246 |
12f3434e71a5cbc6398ae865188f83d3c9fa32a7 | 14,904 | py | Python | python/desc/sims/GCRCatSimInterface/CatalogClasses.py | mpwiesner/sims_GCRCatSimInterface | 831e78ec8eb610983768d4657fbff9744cb17249 | [
"BSD-3-Clause"
] | null | null | null | python/desc/sims/GCRCatSimInterface/CatalogClasses.py | mpwiesner/sims_GCRCatSimInterface | 831e78ec8eb610983768d4657fbff9744cb17249 | [
"BSD-3-Clause"
] | null | null | null | python/desc/sims/GCRCatSimInterface/CatalogClasses.py | mpwiesner/sims_GCRCatSimInterface | 831e78ec8eb610983768d4657fbff9744cb17249 | [
"BSD-3-Clause"
] | 2 | 2018-04-12T20:49:23.000Z | 2018-08-04T00:08:46.000Z | import os
import re
import numpy as np
import copy
from .SedFitter import sed_from_galacticus_mags
from .SedFitter import sed_filter_names_from_catalog
from lsst.utils import getPackageDir
from lsst.sims.catalogs.definitions import InstanceCatalog
from lsst.sims.catalogs.decorators import cached
from lsst.sims.catUtils... | 41.057851 | 96 | 0.611648 |
ab0619f537226235945d25b6c0e3a61547304d47 | 12,851 | py | Python | view/messages.py | Prelysium/facemask-backend | bbd00ef095ef794da8a64b01bc90a3052618876b | [
"MIT"
] | null | null | null | view/messages.py | Prelysium/facemask-backend | bbd00ef095ef794da8a64b01bc90a3052618876b | [
"MIT"
] | null | null | null | view/messages.py | Prelysium/facemask-backend | bbd00ef095ef794da8a64b01bc90a3052618876b | [
"MIT"
] | null | null | null | import cv2
import numpy as np
from PIL import Image, ImageDraw, ImageFont
import math
from config import config_import as cu
from DB.db import CounterDB
# Database object
DB = CounterDB()
# Import conf constants
FONT_CONF = cu.get_config_data_by_key("font")
TEXT_CONF = cu.get_config_data_by_key("text")
CAPACITY = c... | 29.206818 | 87 | 0.646098 |
a6fbbbda33658c5e6fa44dfaf6e480487b0fb269 | 491 | py | Python | libraries/botbuilder-adapters-slack/botbuilder/adapters/slack/about.py | PrettyWood/botbuilder-python | ab79f6b60066b05a00f729d6cb1d8bee30a786e2 | [
"MIT"
] | null | null | null | libraries/botbuilder-adapters-slack/botbuilder/adapters/slack/about.py | PrettyWood/botbuilder-python | ab79f6b60066b05a00f729d6cb1d8bee30a786e2 | [
"MIT"
] | null | null | null | libraries/botbuilder-adapters-slack/botbuilder/adapters/slack/about.py | PrettyWood/botbuilder-python | ab79f6b60066b05a00f729d6cb1d8bee30a786e2 | [
"MIT"
] | 1 | 2022-02-24T10:23:28.000Z | 2022-02-24T10:23:28.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import os
__title__ = "botbuilder-adapters-slack"
__version__ = (
os.environ["packageVersion"] if "packageVersion" in os.environ else "4.11.0"
)
__uri__ = "https://www.github.com/Microsoft/botbuilder-python"
__... | 32.733333 | 81 | 0.741344 |
f3c5eff585209a747917f596ca483c2455deb6fb | 3,701 | py | Python | tests/test_airterminalsingleductvavnoreheat.py | marcelosalles/pyidf | c2f744211572b5e14e29522aac1421ba88addb0e | [
"Apache-2.0"
] | 19 | 2015-12-08T23:33:51.000Z | 2022-01-31T04:41:10.000Z | tests/test_airterminalsingleductvavnoreheat.py | marcelosalles/pyidf | c2f744211572b5e14e29522aac1421ba88addb0e | [
"Apache-2.0"
] | 2 | 2019-10-04T10:57:00.000Z | 2021-10-01T06:46:17.000Z | tests/test_airterminalsingleductvavnoreheat.py | marcelosalles/pyidf | c2f744211572b5e14e29522aac1421ba88addb0e | [
"Apache-2.0"
] | 7 | 2015-11-04T02:25:01.000Z | 2021-12-08T03:14:28.000Z | import os
import tempfile
import unittest
import logging
from pyidf import ValidationLevel
import pyidf
from pyidf.idf import IDF
from pyidf.zone_hvac_air_loop_terminal_units import AirTerminalSingleDuctVavNoReheat
log = logging.getLogger(__name__)
class TestAirTerminalSingleDuctVavNoReheat(unittest.TestCase):
d... | 50.013514 | 162 | 0.773845 |
b87b3845d4367f8a3a1ab108656146ac638d6678 | 125 | py | Python | tests/regression/RandomReg_500/ws_RandomReg_500_Ridge_mysql_code_gen.py | antoinecarme/sklearn2sql_heroku | d680db10683daa419324461eeea851dd8b103ad5 | [
"BSD-3-Clause"
] | 1 | 2019-07-09T14:45:18.000Z | 2019-07-09T14:45:18.000Z | tests/regression/RandomReg_500/ws_RandomReg_500_Ridge_mysql_code_gen.py | antoinecarme/sklearn2sql_heroku | d680db10683daa419324461eeea851dd8b103ad5 | [
"BSD-3-Clause"
] | 5 | 2017-11-13T13:35:37.000Z | 2021-11-11T12:57:20.000Z | tests/regression/RandomReg_500/ws_RandomReg_500_Ridge_mysql_code_gen.py | antoinecarme/sklearn2sql_heroku | d680db10683daa419324461eeea851dd8b103ad5 | [
"BSD-3-Clause"
] | 1 | 2021-09-19T15:05:33.000Z | 2021-09-19T15:05:33.000Z | from sklearn2sql_heroku.tests.regression import generic as reg_gen
reg_gen.test_model("Ridge" , "RandomReg_500" , "mysql")
| 25 | 66 | 0.792 |
795829e777b58f466017324eee8d5eba23bfc74e | 1,050 | py | Python | largest_rectangle_histogram.py | pranavdave893/Leetcode | 1f30ea37af7b60585d168b15d9397143f53c92a1 | [
"MIT"
] | null | null | null | largest_rectangle_histogram.py | pranavdave893/Leetcode | 1f30ea37af7b60585d168b15d9397143f53c92a1 | [
"MIT"
] | null | null | null | largest_rectangle_histogram.py | pranavdave893/Leetcode | 1f30ea37af7b60585d168b15d9397143f53c92a1 | [
"MIT"
] | null | null | null | from typing import List
class Solution:
def largestRectangleArea(self, height: List[int]) -> int:
stack = [-1]
height.append(0)
ans = 0
for i in range(len(height)):
while height[i] < height[stack[-1]]:
h = height[stack.pop()]
w = i - stack... | 30 | 115 | 0.480952 |
0d0085cc7af5fc569be7cf6c1fd433f90bd800b1 | 8,839 | py | Python | sample_project/env/lib/python3.9/site-packages/qtpy/QtGui.py | Istiakmorsalin/ML-Data-Science | 681e68059b146343ef55b0671432dc946970730d | [
"MIT"
] | 4 | 2021-11-19T03:25:13.000Z | 2022-02-24T15:32:30.000Z | sample_project/env/lib/python3.9/site-packages/qtpy/QtGui.py | Istiakmorsalin/ML-Data-Science | 681e68059b146343ef55b0671432dc946970730d | [
"MIT"
] | null | null | null | sample_project/env/lib/python3.9/site-packages/qtpy/QtGui.py | Istiakmorsalin/ML-Data-Science | 681e68059b146343ef55b0671432dc946970730d | [
"MIT"
] | 3 | 2020-08-04T02:48:32.000Z | 2020-08-17T01:20:09.000Z | # -*- coding: utf-8 -*-
#
# Copyright © 2014-2015 Colin Duquesnoy
# Copyright © 2009- The Spyder Development Team
#
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
"""
Provides QtGui classes and functions.
.. warning:: Only PyQt4/PySide QtGui classes compatible with PyQt5.QtGui ... | 54.561728 | 104 | 0.552438 |
f2c85a161d5d789fe7727b5480325c54a3008cdc | 29,438 | py | Python | armi/reactor/reactorParameters.py | ZanderUF/armi | c55ebe4d77821d3357ddd3326478ffaf44962c89 | [
"Apache-2.0"
] | 1 | 2022-01-23T06:09:50.000Z | 2022-01-23T06:09:50.000Z | armi/reactor/reactorParameters.py | ZanderUF/armi | c55ebe4d77821d3357ddd3326478ffaf44962c89 | [
"Apache-2.0"
] | null | null | null | armi/reactor/reactorParameters.py | ZanderUF/armi | c55ebe4d77821d3357ddd3326478ffaf44962c89 | [
"Apache-2.0"
] | 1 | 2020-08-26T09:02:06.000Z | 2020-08-26T09:02:06.000Z | # Copyright 2019 TerraPower, 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 writi... | 29.855984 | 144 | 0.559413 |
269f3787c499f48606500efcfa8c3b698df87d36 | 4,482 | py | Python | trax/shapes.py | yakovkeselman/trax | 615432bbc58ffb5bdf83a771e8f8b470995456db | [
"Apache-2.0"
] | 1 | 2020-05-30T15:19:39.000Z | 2020-05-30T15:19:39.000Z | trax/shapes.py | ZachT1711/trax | a0a3dd8d49e53fc48bb24cc08c10a8a53517e7bc | [
"Apache-2.0"
] | null | null | null | trax/shapes.py | ZachT1711/trax | a0a3dd8d49e53fc48bb24cc08c10a8a53517e7bc | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2020 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 31.787234 | 79 | 0.693887 |
557db83a9a9a5aef8f2940f9bedafd655e88fac1 | 1,129 | py | Python | configs/litehrnet/fcn_litehr18v2_split_512x512_40k_voc12aug.py | openvinotoolkit/mmsegmentation | 9f50fc158be50594ea4aecf0a07ea652c91ec846 | [
"Apache-2.0"
] | 3 | 2021-12-21T07:25:13.000Z | 2022-02-07T01:59:19.000Z | configs/litehrnet/fcn_litehr18v2_split_512x512_40k_voc12aug.py | openvinotoolkit/mmsegmentation | 9f50fc158be50594ea4aecf0a07ea652c91ec846 | [
"Apache-2.0"
] | 13 | 2021-12-10T15:08:56.000Z | 2022-03-23T08:58:03.000Z | configs/litehrnet/fcn_litehr18v2_split_512x512_40k_voc12aug.py | evgeny-izutov/mmsegmentation | 9f50fc158be50594ea4aecf0a07ea652c91ec846 | [
"Apache-2.0"
] | 3 | 2021-11-11T23:16:51.000Z | 2021-12-08T23:49:29.000Z | _base_ = [
'../_base_/models/fcn_litehr18v2_no-aggregator.py', '../_base_/datasets/pascal_voc12_aug.py',
'../_base_/default_runtime.py', '../_base_/schedules/schedule_cos_40k.py'
]
norm_cfg = dict(type='SyncBN', requires_grad=True)
model = dict(
decode_head=dict(
type='FCNHead',
in_channels... | 26.255814 | 97 | 0.551816 |
9e8d0cdd608d2ac6f64ff294ad8c84144336af78 | 7,377 | py | Python | zzdb/schema.py | AndreiPuchko/zzdb | 5a6878c5d9b7f013b9ddb940fe6c430ba62316fc | [
"Apache-2.0"
] | 1 | 2021-10-30T09:46:08.000Z | 2021-10-30T09:46:08.000Z | zzdb/schema.py | AndreiPuchko/zzdb | 5a6878c5d9b7f013b9ddb940fe6c430ba62316fc | [
"Apache-2.0"
] | null | null | null | zzdb/schema.py | AndreiPuchko/zzdb | 5a6878c5d9b7f013b9ddb940fe6c430ba62316fc | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2021 Andrei Puchko
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 35.296651 | 104 | 0.565406 |
e2b24e426524273891eb9b9e0a42fedb8d2d28ab | 529 | py | Python | .history/my_classes/ScopesClosuresAndDecorators/decorators_1_20210713200116.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | .history/my_classes/ScopesClosuresAndDecorators/decorators_1_20210713200116.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | .history/my_classes/ScopesClosuresAndDecorators/decorators_1_20210713200116.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | """Decorators
Recall the simple closure example we did which allowed us to maintain a count of ho9w many times a function was called:
"""
def counter(fn):
count = 0
def imnner(*args, **kwargs): # using *args. **kwargs means we can call any function fn with any combination of positional and keyword argument... | 31.117647 | 150 | 0.661626 |
91f813b13ed1868d33738a78afe558a0dedde88a | 2,160 | py | Python | pythainlp/soundex/metasound.py | fossabot/pythainlp | b3ea0ea2039ab9421bf851a73beb2559f3a28624 | [
"Apache-2.0"
] | null | null | null | pythainlp/soundex/metasound.py | fossabot/pythainlp | b3ea0ea2039ab9421bf851a73beb2559f3a28624 | [
"Apache-2.0"
] | null | null | null | pythainlp/soundex/metasound.py | fossabot/pythainlp | b3ea0ea2039ab9421bf851a73beb2559f3a28624 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Thai soundex - MetaSound system
References:
Snae & Brückner. (2009). Novel Phonetic Name Matching Algorithm with a Statistical
Ontology for Analysing Names Given in Accordance with Thai Astrology.
https://pdfs.semanticscholar.org/3983/963e87ddc6dfdbb291099aa3927a0e3e4ea6.pdf
"""
_CONS_THAN... | 26.024096 | 82 | 0.534259 |
4eae4a5396b6c3815938016485ade84b8eee42cb | 8,710 | py | Python | incidentsdq.py | TransitionProjects/IncidentReportDQ | 8cce17efa549bb38054505629338eeb6e78ce4f2 | [
"MIT"
] | null | null | null | incidentsdq.py | TransitionProjects/IncidentReportDQ | 8cce17efa549bb38054505629338eeb6e78ce4f2 | [
"MIT"
] | 1 | 2018-05-02T23:51:28.000Z | 2018-05-02T23:51:28.000Z | incidentsdq.py | TransitionProjects/IncidentReportDQ | 8cce17efa549bb38054505629338eeb6e78ce4f2 | [
"MIT"
] | null | null | null | """
This class will take the raw 'Agency - Exclusions Report' from ServicePoint's ART and process it into a DQ report for
tracking inconsistent data entry by TPI staff members. The rules this class checks against with the missing_data_check
method are not particularly flexible at this time and heavy modifications w... | 43.55 | 120 | 0.565901 |
4a5d41f15291bbe0034a156fd90dd5ed3e5376f7 | 5,364 | py | Python | Per6_Game.py | nknotts0176/-Per6_Nikolye_pYgAmE | c91f74972c8e0514dc8fe12f41c8313bde2327d8 | [
"MIT"
] | null | null | null | Per6_Game.py | nknotts0176/-Per6_Nikolye_pYgAmE | c91f74972c8e0514dc8fe12f41c8313bde2327d8 | [
"MIT"
] | null | null | null | Per6_Game.py | nknotts0176/-Per6_Nikolye_pYgAmE | c91f74972c8e0514dc8fe12f41c8313bde2327d8 | [
"MIT"
] | null | null | null | print("1")
import pygame
print("2")
import random
print("3")
import projectbutton
print("4")
score = 0
#inputs for Window
Y_N_start = input("Begin game? Y/N ")
if Y_N_start == "Y":
width_input = int(input("W? (Input must be above 599) "))
height_input = int(input("H? (Input must be above 599) "))
else:... | 45.07563 | 123 | 0.396905 |
934a819c7f861ab8078eb5a5be4f54f08818693c | 13,223 | py | Python | backend/moonstreamapi/admin/cli.py | zomglings/moonstream | 954f6014f782157ff3d708d0697457c4306a6588 | [
"Apache-2.0"
] | 1 | 2022-01-06T07:42:51.000Z | 2022-01-06T07:42:51.000Z | backend/moonstreamapi/admin/cli.py | zomglings/moonstream | 954f6014f782157ff3d708d0697457c4306a6588 | [
"Apache-2.0"
] | null | null | null | backend/moonstreamapi/admin/cli.py | zomglings/moonstream | 954f6014f782157ff3d708d0697457c4306a6588 | [
"Apache-2.0"
] | null | null | null | """
Moonstream CLI
"""
import argparse
import logging
import json
import os
from posix import listdir
from typing import Optional
from moonstreamdb.db import SessionLocal
from ..settings import BUGOUT_BROOD_URL, BUGOUT_SPIRE_URL, MOONSTREAM_APPLICATION_ID
from ..web3_provider import yield_web3_provid... | 34.434896 | 211 | 0.642214 |
1df22e4c72d5ac3e55797ffa140c562902eb3f37 | 3,876 | py | Python | tuesmon_ncurses/ui/views/backlog.py | tuesmoncom/tuesmon-ncurses | 21cd4c39f2eed13e7fe42cac0e70d752f76382ca | [
"Apache-2.0"
] | null | null | null | tuesmon_ncurses/ui/views/backlog.py | tuesmoncom/tuesmon-ncurses | 21cd4c39f2eed13e7fe42cac0e70d752f76382ca | [
"Apache-2.0"
] | null | null | null | tuesmon_ncurses/ui/views/backlog.py | tuesmoncom/tuesmon-ncurses | 21cd4c39f2eed13e7fe42cac0e70d752f76382ca | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
tuesmon_ncurses.ui.views.backlog
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"""
import urwid
from tuesmon_ncurses.ui.widgets import generic, backlog
from . import base
class ProjectBacklogSubView(base.SubView):
help_popup_title = "Backlog Help Info"
help_popup_info = base.SubView.help_popu... | 35.559633 | 96 | 0.606553 |
a0a8199f74e27a27e32250a2c661d417ee347afc | 38 | py | Python | perses/bias/__init__.py | schallerdavid/perses | 58bd6e626e027879e136f56e175683893e016f8c | [
"MIT"
] | 99 | 2016-01-19T18:10:37.000Z | 2022-03-26T02:43:08.000Z | perses/bias/__init__.py | schallerdavid/perses | 58bd6e626e027879e136f56e175683893e016f8c | [
"MIT"
] | 878 | 2015-09-18T19:25:30.000Z | 2022-03-31T02:33:04.000Z | perses/bias/__init__.py | schallerdavid/perses | 58bd6e626e027879e136f56e175683893e016f8c | [
"MIT"
] | 30 | 2015-09-21T15:26:35.000Z | 2022-01-10T20:07:24.000Z | from perses.bias.bias_engine import *
| 19 | 37 | 0.815789 |
0f871019bf966e0f44e2ca324510cbec47e9cf69 | 8,445 | py | Python | test/functional/feature_proxy.py | vivuscoin/vivuscoin | ba0db89712234bf68b2d6b63ef2c420d65c7c25d | [
"MIT"
] | null | null | null | test/functional/feature_proxy.py | vivuscoin/vivuscoin | ba0db89712234bf68b2d6b63ef2c420d65c7c25d | [
"MIT"
] | null | null | null | test/functional/feature_proxy.py | vivuscoin/vivuscoin | ba0db89712234bf68b2d6b63ef2c420d65c7c25d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2018 The Bitcoin Core developers
# Copyright (c) 2021 The Vivuscoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test vivuscoind with different proxy configuration.
... | 41.600985 | 123 | 0.627827 |
f87e9da093aae6e9e2053a4569bc759932b69baf | 1,292 | py | Python | venv/lib/python3.9/site-packages/google/cloud/monitoring_v3/services/service_monitoring_service/transports/__init__.py | qarik-hanrattyjen/apache-airflow-backport-providers-google-2021.3.3 | 630dcef73e6a258b6e9a52f934e2dd912ce741f8 | [
"Apache-2.0"
] | 18 | 2020-09-19T17:52:47.000Z | 2022-03-25T12:09:22.000Z | venv/lib/python3.9/site-packages/google/cloud/monitoring_v3/services/service_monitoring_service/transports/__init__.py | qarik-hanrattyjen/apache-airflow-backport-providers-google-2021.3.3 | 630dcef73e6a258b6e9a52f934e2dd912ce741f8 | [
"Apache-2.0"
] | 110 | 2020-02-05T15:26:47.000Z | 2022-03-28T23:02:02.000Z | venv/lib/python3.9/site-packages/google/cloud/monitoring_v3/services/service_monitoring_service/transports/__init__.py | qarik-hanrattyjen/apache-airflow-backport-providers-google-2021.3.3 | 630dcef73e6a258b6e9a52f934e2dd912ce741f8 | [
"Apache-2.0"
] | 26 | 2020-02-08T00:05:46.000Z | 2022-03-27T19:32:26.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 35.888889 | 82 | 0.797214 |
114fe1798c159fe3e6701928bb26f70b950c9c56 | 5,530 | py | Python | datasets.py | luyiyun/NormAE | 19eeb6c76af02855229092c5a53546b1fd7703de | [
"MIT"
] | 18 | 2019-12-08T06:01:13.000Z | 2022-02-25T09:49:13.000Z | datasets.py | luyiyun/NormAE | 19eeb6c76af02855229092c5a53546b1fd7703de | [
"MIT"
] | 4 | 2021-07-21T13:49:15.000Z | 2022-01-27T12:31:55.000Z | datasets.py | luyiyun/NormAE | 19eeb6c76af02855229092c5a53546b1fd7703de | [
"MIT"
] | 7 | 2020-08-04T13:14:13.000Z | 2022-01-26T17:36:16.000Z | import numpy as np
import pandas as pd
import torch.utils.data as data
from sklearn.model_selection import train_test_split
class BaseData(data.Dataset):
''' Base Data Class '''
def __init__(self, X_df, Y_df, pre_transfer=None):
'''
X_df: samples x peakes, dataframe;
Y_df:samples x 4, ... | 33.719512 | 78 | 0.618445 |
e99c11f7bf21fa183b40aea8403b5e39334b1af1 | 2,022 | py | Python | apps/portalbase/macros/page/explorer/1_main.py | Jumpscale/jumpscale_portal8 | 3a4d56a1ba985b68fe9b525aed2486a54808332f | [
"Apache-2.0"
] | null | null | null | apps/portalbase/macros/page/explorer/1_main.py | Jumpscale/jumpscale_portal8 | 3a4d56a1ba985b68fe9b525aed2486a54808332f | [
"Apache-2.0"
] | 74 | 2015-12-28T16:17:20.000Z | 2021-09-08T12:28:59.000Z | apps/portalbase/macros/page/explorer/1_main.py | Jumpscale/jumpscale_portal8 | 3a4d56a1ba985b68fe9b525aed2486a54808332f | [
"Apache-2.0"
] | null | null | null |
def main(j, args, params, tags, tasklet):
import os
page = args.page
params.result = page
page.addCSS(cssContent='''
.elfinder-contextmenu{
left: 39%;
}
''')
path = ''
space = args.paramsExtra.get('explorerspace')
if space:
space = j.portal.server.active.getSpace(space)
... | 29.735294 | 116 | 0.605836 |
94a022beb5636d6278267f5338c2c6b4ff637c68 | 7,460 | py | Python | bin/retag.py | VenoMpie/pyrescene | f75d98d9173f1576b5d8fd42da300673e918707c | [
"MIT"
] | 18 | 2020-08-09T02:17:46.000Z | 2022-02-18T09:17:25.000Z | bin/retag.py | VenoMpie/pyrescene | f75d98d9173f1576b5d8fd42da300673e918707c | [
"MIT"
] | 1 | 2021-11-23T21:13:37.000Z | 2021-11-23T21:13:37.000Z | bin/retag.py | VenoMpie/pyrescene | f75d98d9173f1576b5d8fd42da300673e918707c | [
"MIT"
] | 9 | 2020-10-15T11:02:49.000Z | 2022-03-15T10:36:14.000Z | #!/usr/bin/env python
# encoding: utf-8
# Copyright (c) 2014-2015 pyReScene
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights t... | 30.57377 | 74 | 0.71622 |
1bc45d5962a5a00f308908c1c681263bcf834322 | 4,391 | py | Python | roles/common/molecule/default/tests/test_default.py | chrisshiels/ansible | 75760ab42c04614771ea1c6f447c3f6af02238ce | [
"MIT"
] | null | null | null | roles/common/molecule/default/tests/test_default.py | chrisshiels/ansible | 75760ab42c04614771ea1c6f447c3f6af02238ce | [
"MIT"
] | 3 | 2021-04-07T23:16:01.000Z | 2021-09-23T23:21:59.000Z | roles/common/molecule/default/tests/test_default.py | chrisshiels/ansible | 75760ab42c04614771ea1c6f447c3f6af02238ce | [
"MIT"
] | null | null | null | import os
import pytest
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
@pytest.mark.parametrize('name',
[ 'CentOS-Base',
'CentOS-CR'... | 31.364286 | 75 | 0.355728 |
748794bac09d76e00159e63c3a8f32c6593bcc48 | 9,025 | py | Python | experiments/classification/train.py | JasprW/MiCT-Net-PyTorch | c7e876886695b22e53a95387a50e100810dee6f0 | [
"Apache-2.0"
] | 51 | 2019-11-16T22:20:24.000Z | 2022-03-15T12:23:15.000Z | experiments/classification/train.py | scenarios/MiCT-Net-PyTorch | fdd72270f70cfe81c24e5cb1daa9df65ecc5b035 | [
"Apache-2.0"
] | 8 | 2019-12-09T13:08:11.000Z | 2021-01-09T06:37:53.000Z | experiments/classification/train.py | scenarios/MiCT-Net-PyTorch | fdd72270f70cfe81c24e5cb1daa9df65ecc5b035 | [
"Apache-2.0"
] | 13 | 2020-01-10T03:18:17.000Z | 2022-02-23T05:51:01.000Z | # ==============================================================================
# Copyright 2019 Florent Mahoudeau. 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
#
# ... | 40.290179 | 92 | 0.559003 |
b69c27ecf70af2be4b48c6909829466b966dd285 | 513 | py | Python | tools/glidein_ps.py | ddbox/glideinwms | 1d0efbc1186ff9bd4cc3010fde6681b4cbe7cd54 | [
"Apache-2.0"
] | null | null | null | tools/glidein_ps.py | ddbox/glideinwms | 1d0efbc1186ff9bd4cc3010fde6681b4cbe7cd54 | [
"Apache-2.0"
] | null | null | null | tools/glidein_ps.py | ddbox/glideinwms | 1d0efbc1186ff9bd4cc3010fde6681b4cbe7cd54 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# SPDX-FileCopyrightText: 2009 Fermi Research Alliance, LLC
# SPDX-License-Identifier: Apache-2.0
# Description:
# Execute a ps command on a condor job
#
# Usage:
# glidein_ps.py <cluster>.<process> [-name <schedd_name>] [-pool <pool_name> ] [-timeout <nr secs>] [<options>]
import os.path
... | 24.428571 | 113 | 0.678363 |
e05eafcf7d984f0143b172044a41118ee7b4f318 | 412 | py | Python | brobin/blog/migrations/0002_auto_20160131_1356.py | Brobin/brobin.me | 4a625aedee4a9ebe35c14bdb3118afb98f97b48d | [
"Unlicense",
"MIT"
] | 4 | 2016-01-30T20:40:38.000Z | 2020-11-24T12:23:30.000Z | brobin/blog/migrations/0002_auto_20160131_1356.py | Brobin/brobin.me | 4a625aedee4a9ebe35c14bdb3118afb98f97b48d | [
"Unlicense",
"MIT"
] | 4 | 2021-04-08T18:29:06.000Z | 2022-02-10T08:55:47.000Z | brobin/blog/migrations/0002_auto_20160131_1356.py | Brobin/brobin.me | 4a625aedee4a9ebe35c14bdb3118afb98f97b48d | [
"Unlicense",
"MIT"
] | 3 | 2016-06-14T02:38:43.000Z | 2020-11-24T13:46:49.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-01-31 19:56
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('blog', '0001_initial'),
]
operations = [
migrations.AlterModelOptions(
n... | 20.6 | 58 | 0.616505 |
ef17c6701d2406d7b64586dd8e6a9f65d70adb35 | 737 | py | Python | recruiters/utils.py | miclemabasie/jobizar | 1dde7aab4ba02de75517a5cf91d54b43ac41e3cb | [
"MIT"
] | null | null | null | recruiters/utils.py | miclemabasie/jobizar | 1dde7aab4ba02de75517a5cf91d54b43ac41e3cb | [
"MIT"
] | null | null | null | recruiters/utils.py | miclemabasie/jobizar | 1dde7aab4ba02de75517a5cf91d54b43ac41e3cb | [
"MIT"
] | null | null | null | import string
import random
from django.utils.text import slugify
# Random string generator
def random_string_generator(size=10, chars=string.ascii_lowercase + string.digits):
return ''.join(random.choice(chars) for _ in range(size))
def random_slug_generator(instance, new_slug = None):
if new_slug:
s... | 28.346154 | 83 | 0.700136 |
ded1b71830cad2aecf0e1bdfcae864b148ae366a | 901 | py | Python | description_parser.py | d-kozak/sdu-data-science | 9197f615fcf9cd8f3305c3b5ea498afe32f0523a | [
"MIT"
] | null | null | null | description_parser.py | d-kozak/sdu-data-science | 9197f615fcf9cd8f3305c3b5ea498afe32f0523a | [
"MIT"
] | null | null | null | description_parser.py | d-kozak/sdu-data-science | 9197f615fcf9cd8f3305c3b5ea498afe32f0523a | [
"MIT"
] | null | null | null | CLEAN = 0
DIRTY = 1
# picture size 227 * 227 * 3 == 154 587
class ImageData():
"""
This data class represents one loaded image in memory
"""
def __init__(self, filename, type):
self.type = type
self.filename = filename
def __str__(self):
return '(' + self.filename + ',' + ... | 23.710526 | 88 | 0.612653 |
9ff4c3183764982c116d4d96e7b41d86a4ab99a8 | 2,428 | py | Python | src/filter_data.py | TheCoderChris/Hypixel_Stats | 5334608dc8e5e1b8d8ce80e156a462bcc98f79be | [
"MIT"
] | null | null | null | src/filter_data.py | TheCoderChris/Hypixel_Stats | 5334608dc8e5e1b8d8ce80e156a462bcc98f79be | [
"MIT"
] | null | null | null | src/filter_data.py | TheCoderChris/Hypixel_Stats | 5334608dc8e5e1b8d8ce80e156a462bcc98f79be | [
"MIT"
] | null | null | null | import json
data_keys = []
def nested_set(dic: dict, keys: list, value):
for key in keys[:-1]:
dic = dic.setdefault(key, {})
dic[keys[-1]] = value
return dic
def safeget(dct, *keys):
for key in keys:
try:
dct = dct[key]
except KeyError:
... | 20.752137 | 73 | 0.535008 |
03c95dfc96254e1017ad7e84aca3af021ac44d3a | 927 | py | Python | src/generator/AutoRest.Python.Azure.Tests/Expected/AcceptanceTests/AzureParameterGrouping/autorestparametergroupingtestservice/models/parameter_grouping_post_optional_parameters.py | fhoering/autorest | b36c77ebb6a5c92aca72eea0894a683506af5817 | [
"MIT"
] | null | null | null | src/generator/AutoRest.Python.Azure.Tests/Expected/AcceptanceTests/AzureParameterGrouping/autorestparametergroupingtestservice/models/parameter_grouping_post_optional_parameters.py | fhoering/autorest | b36c77ebb6a5c92aca72eea0894a683506af5817 | [
"MIT"
] | null | null | null | src/generator/AutoRest.Python.Azure.Tests/Expected/AcceptanceTests/AzureParameterGrouping/autorestparametergroupingtestservice/models/parameter_grouping_post_optional_parameters.py | fhoering/autorest | b36c77ebb6a5c92aca72eea0894a683506af5817 | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 34.333333 | 78 | 0.621359 |
173c840b181907d793dcdd1c4b9c26d306239eba | 2,342 | py | Python | _static/src/python/Radar/SAR/Imaging/demo_GEN_SAR.py | metai/aitrace | 8e42001f5e3a187801764f413b6ee2f32476c6d1 | [
"MIT"
] | 1 | 2022-01-03T06:13:31.000Z | 2022-01-03T06:13:31.000Z | _static/src/python/Radar/SAR/Imaging/demo_GEN_SAR.py | metai/aitrace | 8e42001f5e3a187801764f413b6ee2f32476c6d1 | [
"MIT"
] | null | null | null | _static/src/python/Radar/SAR/Imaging/demo_GEN_SAR.py | metai/aitrace | 8e42001f5e3a187801764f413b6ee2f32476c6d1 | [
"MIT"
] | 1 | 2022-01-03T06:13:33.000Z | 2022-01-03T06:13:33.000Z | import numpy as np
import matplotlib.pyplot as plt
from skimage import exposure
import utils
C = 299792458.0
PI = 3.1415926535898
As = 1.58 * PI / 180.0
# As = (90 - 80) * PI / 180.0
Ai = 58.2 * PI / 180.0
Ad = (90 - 58.2) * PI / 180.0
# Ad = (90 - 10.2) * PI / 180.0
F0 = 5.3e9
B = 30e6
Tp = 41.75e-4
Lr = 15.0
La =... | 20.725664 | 72 | 0.514091 |
553c39bb041d7484c3bf3f880a5462efffcd4d4a | 7,084 | py | Python | src/lib/public_method.py | linlin-coder/STPG | ba4db9067348f7a4b839b7d16a42e4ffe7201df7 | [
"Apache-2.0"
] | null | null | null | src/lib/public_method.py | linlin-coder/STPG | ba4db9067348f7a4b839b7d16a42e4ffe7201df7 | [
"Apache-2.0"
] | null | null | null | src/lib/public_method.py | linlin-coder/STPG | ba4db9067348f7a4b839b7d16a42e4ffe7201df7 | [
"Apache-2.0"
] | null | null | null | # !/usr/bin/python
# -*- coding: UTF-8 -*-
import configparser
import datetime
import os,shutil
import re
import subprocess
import sys
import yaml
bindir = os.path.realpath(os.path.dirname(__file__))
class Log():
def __init__(self,filename,funcname=''):
self.filename = filename
se... | 32.347032 | 146 | 0.55096 |
9cab341bf5c954b01c6016fbf4757ed295dbb54c | 5,406 | py | Python | functions/slackbot-tv-search-result/package/function.py | c0dyhi11/sickchill-slackbot | d3cbd270332d2276441be1ce858c0b83a7207d27 | [
"Apache-2.0"
] | null | null | null | functions/slackbot-tv-search-result/package/function.py | c0dyhi11/sickchill-slackbot | d3cbd270332d2276441be1ce858c0b83a7207d27 | [
"Apache-2.0"
] | 1 | 2021-09-08T15:58:29.000Z | 2021-09-08T15:58:29.000Z | functions/slackbot-tv-search-result/package/function.py | c0dyhi11/sickchill-slackbot | d3cbd270332d2276441be1ce858c0b83a7207d27 | [
"Apache-2.0"
] | null | null | null | import json
import requests
import urllib.parse
from helper import fetch_kube_data
from flask import request, Response
from flask import current_app
def get_search_results(url, search_text):
headers = {'Accept': 'application/json'}
print(search_text)
url += urllib.parse.quote(search_text)
rest_call = ... | 42.234375 | 168 | 0.443951 |
6261c61cdca3bf4f9a4ff46a7fa1871ac3acbdb2 | 1,311 | py | Python | appscan/admin.py | zx273983653/vulscan | 787397e267c4e6469522ee0abe55b3e98f968d4a | [
"MIT"
] | 582 | 2019-02-23T09:23:33.000Z | 2022-03-31T04:42:08.000Z | appscan/admin.py | git-wsf/vulscan | 112f8d6104daecfaaad579f73029a26d56aaa9b3 | [
"MIT"
] | 6 | 2019-03-20T10:37:48.000Z | 2020-03-10T06:20:07.000Z | appscan/admin.py | git-wsf/vulscan | 112f8d6104daecfaaad579f73029a26d56aaa9b3 | [
"MIT"
] | 183 | 2019-02-23T06:00:18.000Z | 2022-03-20T02:17:57.000Z | #coding=utf-8
from django.contrib import admin
# Register your models here.
from appscan.models import poc_list
from appscan.models import navigation,navigation_url,vul_scan, user_scan,vul_state
#POC 数据
class poc_listAdmin(admin.ModelAdmin):
list_display = ('vulID','category','vulType','cvss','filename','appName... | 33.615385 | 217 | 0.754386 |
24303fcbe11805798f91b7c3a6339f58d3ac546d | 8,889 | py | Python | src/oscar/test/factories/__init__.py | congnguyenthe/base-django-oscar | e328610026275ded385f837f20897af653563055 | [
"BSD-3-Clause"
] | 1 | 2021-11-13T22:44:25.000Z | 2021-11-13T22:44:25.000Z | src/oscar/test/factories/__init__.py | congnguyenthe/base-django-oscar | e328610026275ded385f837f20897af653563055 | [
"BSD-3-Clause"
] | 7 | 2021-01-06T20:02:43.000Z | 2022-03-12T00:42:59.000Z | src/oscar/test/factories/__init__.py | congnguyenthe/base-django-oscar | e328610026275ded385f837f20897af653563055 | [
"BSD-3-Clause"
] | null | null | null | # coding=utf-8
import datetime
import random
from decimal import Decimal as D
from django.conf import settings
from django.utils import timezone
from oscar.core.loading import get_class, get_model
from oscar.test.factories.address import * # noqa
from oscar.test.factories.basket import * # noqa
from oscar.test.fact... | 35.134387 | 85 | 0.665879 |
b9262398f60d52217d4c038ab952524120b01872 | 430 | py | Python | Recursion/Assignment-3/2 Simple Combination Sum LeetCode.py | techonair/Programming-Pathshala | 155dce78484bb965f24289e241e02db4be16bd3b | [
"MIT"
] | null | null | null | Recursion/Assignment-3/2 Simple Combination Sum LeetCode.py | techonair/Programming-Pathshala | 155dce78484bb965f24289e241e02db4be16bd3b | [
"MIT"
] | null | null | null | Recursion/Assignment-3/2 Simple Combination Sum LeetCode.py | techonair/Programming-Pathshala | 155dce78484bb965f24289e241e02db4be16bd3b | [
"MIT"
] | null | null | null | # Link: https://leetcode.com/problems/combination-sum-iii/
k, n = map(int, input().split(" "))
ans = []
tmp = []
size = 0
sum = 0
i = 1
def isCombSum(n, k, i , size, sum, tmp):
if size == k and sum == n:
ans.append(tmp)
if i < 10 and size < k and sum < n:
isCombSum(n, k, i+1, size, sum, tmp)
... | 22.631579 | 58 | 0.548837 |
91d56b85e1a48dbbcc2ce4401ae0fd8aaa0f955a | 5,791 | py | Python | laserfiche_api/api/simple_searches_api.py | Layer8Err/laserfiche_api | 8c9030c8f5cc245b61858bd096a1ad3c58cdbfd2 | [
"BSD-2-Clause"
] | 1 | 2021-06-17T23:51:25.000Z | 2021-06-17T23:51:25.000Z | laserfiche_api/api/simple_searches_api.py | Layer8Err/laserfiche_api | 8c9030c8f5cc245b61858bd096a1ad3c58cdbfd2 | [
"BSD-2-Clause"
] | null | null | null | laserfiche_api/api/simple_searches_api.py | Layer8Err/laserfiche_api | 8c9030c8f5cc245b61858bd096a1ad3c58cdbfd2 | [
"BSD-2-Clause"
] | null | null | null | # coding: utf-8
"""
Laserfiche API
Welcome to the Laserfiche API Swagger Playground. You can try out any of our API calls against your live Laserfiche Cloud account. Visit the developer center for more details: <a href=\"https://developer.laserfiche.com\">https://developer.laserfiche.com</a><p><strong>Build# ... | 42.270073 | 314 | 0.653773 |
d9fd26436c5cab68cb0f06f15c082e6ca540bcf6 | 2,819 | py | Python | dizoo/classic_control/cartpole/config/parallel/cartpole_dqn_config.py | uuid0000/DI-engine | cc2713fa01e5288bae21cfeb595729d665e092d1 | [
"Apache-2.0"
] | 1 | 2021-07-13T02:56:34.000Z | 2021-07-13T02:56:34.000Z | dizoo/classic_control/cartpole/config/parallel/cartpole_dqn_config.py | uuid0000/DI-engine | cc2713fa01e5288bae21cfeb595729d665e092d1 | [
"Apache-2.0"
] | null | null | null | dizoo/classic_control/cartpole/config/parallel/cartpole_dqn_config.py | uuid0000/DI-engine | cc2713fa01e5288bae21cfeb595729d665e092d1 | [
"Apache-2.0"
] | null | null | null | from easydict import EasyDict
cartpole_dqn_config = dict(
env=dict(
collector_env_num=8,
collector_episode_num=2,
evaluator_env_num=5,
evaluator_episode_num=1,
stop_value=195,
),
policy=dict(
cuda=False,
model=dict(
obs_shape=4,
... | 27.910891 | 81 | 0.59099 |
3b06a941092d435dd7d000258568ed0d9b9a76f0 | 1,609 | py | Python | util/config/validators/validate_oidc.py | dongboyan77/quay | 8018e5bd80f17e6d855b58b7d5f2792d92675905 | [
"Apache-2.0"
] | 1 | 2020-10-16T19:30:41.000Z | 2020-10-16T19:30:41.000Z | util/config/validators/validate_oidc.py | dongboyan77/quay | 8018e5bd80f17e6d855b58b7d5f2792d92675905 | [
"Apache-2.0"
] | 15 | 2020-06-18T15:32:06.000Z | 2022-03-03T23:06:24.000Z | util/config/validators/validate_oidc.py | dongboyan77/quay | 8018e5bd80f17e6d855b58b7d5f2792d92675905 | [
"Apache-2.0"
] | null | null | null | from oauth.loginmanager import OAuthLoginManager
from oauth.oidc import OIDCLoginService, DiscoveryFailureException
from util.config.validators import BaseValidator, ConfigValidationException
class OIDCLoginValidator(BaseValidator):
name = "oidc-login"
@classmethod
def validate(cls, validator_context):
... | 42.342105 | 100 | 0.649472 |
e4905dc7121b8c390d27c40a4a7f2964612b00cb | 26,265 | py | Python | main.py | MorningStarOvO/Mdetr | 048dd063cc0290a153b1754368be1f2e1a3e6825 | [
"Apache-2.0"
] | null | null | null | main.py | MorningStarOvO/Mdetr | 048dd063cc0290a153b1754368be1f2e1a3e6825 | [
"Apache-2.0"
] | null | null | null | main.py | MorningStarOvO/Mdetr | 048dd063cc0290a153b1754368be1f2e1a3e6825 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) Aishwarya Kamath & Nicolas Carion. Licensed under the Apache License 2.0. All Rights Reserved
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
# -------------------- 导入必要的包 -------------------- #
# ----- 系统操作相关 ----- #
import datetime
import os
import time
from pathlib import Path
... | 39.675227 | 121 | 0.62193 |
83a0a9054cf38560a71c6f6f0182a6a0c0245c8d | 13,134 | py | Python | inferelator/utils/loader.py | meichenfang/inferelator | 47f8ebcc5f303264a75814897c52026b47c57aef | [
"BSD-2-Clause"
] | null | null | null | inferelator/utils/loader.py | meichenfang/inferelator | 47f8ebcc5f303264a75814897c52026b47c57aef | [
"BSD-2-Clause"
] | null | null | null | inferelator/utils/loader.py | meichenfang/inferelator | 47f8ebcc5f303264a75814897c52026b47c57aef | [
"BSD-2-Clause"
] | null | null | null | import pandas as pd
import pandas.api.types as pat
import numpy as np
import os
import copy as cp
import anndata
from inferelator.utils.data import InferelatorData
from inferelator.utils.debug import Debug
from inferelator.preprocessing.metadata_parser import MetadataHandler
DEFAULT_PANDAS_TSV_SETTINGS = dict(sep="\t... | 39.679758 | 120 | 0.661185 |
e4794a6a504717bff8e3ebc7adf10c59f710b304 | 4,675 | py | Python | bin/Python27/Lib/site-packages/scipy/weave/_dumbdbm_patched.py | lefevre-fraser/openmeta-mms | 08f3115e76498df1f8d70641d71f5c52cab4ce5f | [
"MIT"
] | null | null | null | bin/Python27/Lib/site-packages/scipy/weave/_dumbdbm_patched.py | lefevre-fraser/openmeta-mms | 08f3115e76498df1f8d70641d71f5c52cab4ce5f | [
"MIT"
] | null | null | null | bin/Python27/Lib/site-packages/scipy/weave/_dumbdbm_patched.py | lefevre-fraser/openmeta-mms | 08f3115e76498df1f8d70641d71f5c52cab4ce5f | [
"MIT"
] | null | null | null | """A dumb and slow but simple dbm clone.
For database spam, spam.dir contains the index (a text file),
spam.bak *may* contain a backup of the index (also a text file),
while spam.dat contains the data (a binary file).
XXX TO DO:
- seems to contain a bug when updating...
- reclaim free space (currently, sp... | 29.21875 | 83 | 0.541176 |
4e1891cd1749c4ee0b22794fe71cb53e6164319d | 3,411 | py | Python | highway_env/envs/graphics.py | sebastopol06/highway-env | 3b946e42a635e224b3ad5b20817e68d2fc6787d7 | [
"MIT"
] | null | null | null | highway_env/envs/graphics.py | sebastopol06/highway-env | 3b946e42a635e224b3ad5b20817e68d2fc6787d7 | [
"MIT"
] | null | null | null | highway_env/envs/graphics.py | sebastopol06/highway-env | 3b946e42a635e224b3ad5b20817e68d2fc6787d7 | [
"MIT"
] | null | null | null | from __future__ import division, print_function, absolute_import
import os
import numpy as np
import pygame
from highway_env.road.graphics import WorldSurface, RoadGraphics
from highway_env.vehicle.graphics import VehicleGraphics
class EnvViewer(object):
"""
A viewer to render a highway driving environ... | 33.772277 | 118 | 0.632952 |
d9c2080bd01455a8eb0a44b12305fbb3bac9baca | 4,187 | py | Python | share/seeds/generate-seeds.py | thorn79/Ember | 88d1c0301002eaae559646963b769b2a03a3842c | [
"MIT"
] | 29 | 2017-08-18T02:53:57.000Z | 2018-11-04T17:30:25.000Z | share/seeds/generate-seeds.py | thorn79/Ember | 88d1c0301002eaae559646963b769b2a03a3842c | [
"MIT"
] | 63 | 2017-08-06T04:30:16.000Z | 2021-01-16T16:07:35.000Z | share/seeds/generate-seeds.py | thorn79/Ember | 88d1c0301002eaae559646963b769b2a03a3842c | [
"MIT"
] | 41 | 2017-08-30T13:18:21.000Z | 2018-12-27T06:18:29.000Z | #!/usr/bin/python
# Copyright (c) 2014 Wladmir J. van der Laan
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Script to generate list of seed nodes for chainparams.cpp.
This script expects two text files in the directory ... | 31.719697 | 98 | 0.588488 |
bd7e39eddf98f0a117c367a7c248b3e453bbca25 | 418 | py | Python | Products/CMFDefault/skins/zpt_content/source_html.py | zopefoundation/Products.CMFDefault | a176d9aac5a7e04725dbd0f7b76c6ac357062139 | [
"ZPL-2.1"
] | null | null | null | Products/CMFDefault/skins/zpt_content/source_html.py | zopefoundation/Products.CMFDefault | a176d9aac5a7e04725dbd0f7b76c6ac357062139 | [
"ZPL-2.1"
] | 5 | 2017-07-13T00:51:25.000Z | 2021-02-04T15:08:39.000Z | Products/CMFDefault/skins/zpt_content/source_html.py | zopefoundation/Products.CMFDefault | a176d9aac5a7e04725dbd0f7b76c6ac357062139 | [
"ZPL-2.1"
] | 3 | 2017-07-08T03:22:35.000Z | 2018-05-20T06:42:03.000Z | ##parameters=
##
from Products.CMFDefault.utils import decode
options = {}
metadata = [ {'name': field[0], 'body': field[1]}
for field in context.getMetadataHeaders()
if field[0].lower() != 'title' ]
options['title'] = context.Title()
options['listMetadataFields'] = metadata
options['editabl... | 27.866667 | 62 | 0.681818 |
8761c4b33d464b46a16c10ce8753421d685010bc | 2,387 | py | Python | SSDBM_figures/document_vs_storage/plot_document_vs_storage.py | dennlinger/hypergraph-document-store | 72b90119b163b92254c73442bee52cde55e58517 | [
"MIT"
] | null | null | null | SSDBM_figures/document_vs_storage/plot_document_vs_storage.py | dennlinger/hypergraph-document-store | 72b90119b163b92254c73442bee52cde55e58517 | [
"MIT"
] | 1 | 2019-12-12T09:20:00.000Z | 2019-12-12T09:20:00.000Z | SSDBM_figures/document_vs_storage/plot_document_vs_storage.py | dennlinger/hypergraph-document-store | 72b90119b163b92254c73442bee52cde55e58517 | [
"MIT"
] | 1 | 2021-07-22T14:16:47.000Z | 2021-07-22T14:16:47.000Z | """
Simple test plot for now
"""
import matplotlib.pyplot as plt
import matplotlib
import json
def y_getter(key, scaler=1024**2):
return [0] + [v[key]/scaler for _, v in data.items()]
if __name__ == "__main__":
matplotlib.rcParams['pdf.fonttype'] = 42
matplotlib.rcParams['ps.fonttype'] = 42
plt.rc... | 37.888889 | 120 | 0.670716 |
9d72168652a4c04048c9bc4ba3815b9e5953cc11 | 1,247 | py | Python | callbacks.py | rgiglio/clt-app | 28caf1c916c2b6f216357c446d5f1cd0582a9aff | [
"MIT"
] | null | null | null | callbacks.py | rgiglio/clt-app | 28caf1c916c2b6f216357c446d5f1cd0582a9aff | [
"MIT"
] | null | null | null | callbacks.py | rgiglio/clt-app | 28caf1c916c2b6f216357c446d5f1cd0582a9aff | [
"MIT"
] | null | null | null | from dash import callback_context
from dash.dependencies import Input, Output, State
from dash_table import FormatTemplate
from dash_table.Format import Format
import dash
import backend as be
def register_callbacks(app):
@app.callback(
[Output('clt-output', 'figure'),
Output('table-output'... | 40.225806 | 99 | 0.664796 |
652fae89a989bb5e257b7d6c4a208eb35e4caa20 | 8,344 | py | Python | nova/tests/fixtures.py | venusource/nova | 0c6e6f180eebe71a3431abf726a0fd0c66578162 | [
"Apache-2.0"
] | null | null | null | nova/tests/fixtures.py | venusource/nova | 0c6e6f180eebe71a3431abf726a0fd0c66578162 | [
"Apache-2.0"
] | null | null | null | nova/tests/fixtures.py | venusource/nova | 0c6e6f180eebe71a3431abf726a0fd0c66578162 | [
"Apache-2.0"
] | null | null | null | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# 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 ... | 33.243028 | 79 | 0.664549 |
056506ac8841d294192ff0e934b47ce303d317c1 | 1,082 | py | Python | tests/test_foursquare.py | chrislawlor/classify-server | 8730cd5e345149129fe565d3f65bc67e4cd51afd | [
"Apache-2.0"
] | null | null | null | tests/test_foursquare.py | chrislawlor/classify-server | 8730cd5e345149129fe565d3f65bc67e4cd51afd | [
"Apache-2.0"
] | 7 | 2017-10-13T16:01:13.000Z | 2021-06-01T21:36:03.000Z | tests/test_foursquare.py | chrislawlor/classify-server | 8730cd5e345149129fe565d3f65bc67e4cd51afd | [
"Apache-2.0"
] | 4 | 2017-10-18T18:10:52.000Z | 2019-02-01T08:39:18.000Z | from classify_server import foursquare
from .mocks import MockClient
async def test_match_venue_to_query_exact_match():
venues = [{'name': 'test'}]
query = 'test'
result = foursquare.match_venue_to_query(query, venues)
assert result == venues[0]
async def test_match_venue_to_query_small_difference(... | 27.74359 | 68 | 0.710721 |
a727f826e1f7c2262c5c9543a5159515706a036b | 129 | py | Python | data/__init__.py | neelabh17/MAVI-Face | 5dbf105b51a8b90203cd144f2fe671770d38eb81 | [
"MIT"
] | 6 | 2020-05-04T08:21:05.000Z | 2020-07-03T13:32:56.000Z | data/__init__.py | neelabh17/MAVI-Face | 5dbf105b51a8b90203cd144f2fe671770d38eb81 | [
"MIT"
] | 4 | 2020-04-30T00:57:54.000Z | 2020-06-06T09:46:03.000Z | data/__init__.py | neelabh17/MAVI-Face | 5dbf105b51a8b90203cd144f2fe671770d38eb81 | [
"MIT"
] | 3 | 2020-05-04T08:21:10.000Z | 2020-07-12T13:36:45.000Z | from .wider_face import WiderFaceDetection, detection_collate, ohemDataSampler
from .data_augment import *
from .config import *
| 32.25 | 78 | 0.837209 |
f396e36f2cbbf4ccc274c917fb7111ef852ff68f | 10,212 | py | Python | arc/web_functionality.py | zzpwahaha/ARC-Alkali-Rydberg-Calculator | 8f15f5f0c5247c5d2254efdfd01894fcd3e5d586 | [
"BSD-3-Clause"
] | null | null | null | arc/web_functionality.py | zzpwahaha/ARC-Alkali-Rydberg-Calculator | 8f15f5f0c5247c5d2254efdfd01894fcd3e5d586 | [
"BSD-3-Clause"
] | null | null | null | arc/web_functionality.py | zzpwahaha/ARC-Alkali-Rydberg-Calculator | 8f15f5f0c5247c5d2254efdfd01894fcd3e5d586 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import print_function, absolute_import
import numpy as np
from .alkali_atom_functions import printStateString, C_e, C_h, pi
def htmlLiteratureOutput(v, ref):
print("<div class='lit'><p>Literature values<p>Radial part of dipole matrix element: %.3f</p>" % v)
typeOfSource = "experimental value... | 32.113208 | 116 | 0.479828 |
3a95db8d1a6315f0725725741243263b22ca6c2c | 1,724 | py | Python | netwho-collector.py | TheProjecter/netwho | 89be92d90ddf2b54ecc7e05087359b26ce92ecce | [
"Apache-2.0"
] | 1 | 2015-09-27T01:13:59.000Z | 2015-09-27T01:13:59.000Z | netwho-collector.py | TheProjecter/netwho | 89be92d90ddf2b54ecc7e05087359b26ce92ecce | [
"Apache-2.0"
] | null | null | null | netwho-collector.py | TheProjecter/netwho | 89be92d90ddf2b54ecc7e05087359b26ce92ecce | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2010 The NetWho Project. 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 ... | 37.478261 | 104 | 0.694896 |
9ce6d5b5458beffea8f254f22989fd7fa487af9e | 2,966 | py | Python | tempest/services/identity/v3/json/policy_client.py | BeenzSyed/tempest | 7a64ee1216d844f6b99928b53f5c665b84cb8719 | [
"Apache-2.0"
] | null | null | null | tempest/services/identity/v3/json/policy_client.py | BeenzSyed/tempest | 7a64ee1216d844f6b99928b53f5c665b84cb8719 | [
"Apache-2.0"
] | null | null | null | tempest/services/identity/v3/json/policy_client.py | BeenzSyed/tempest | 7a64ee1216d844f6b99928b53f5c665b84cb8719 | [
"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... | 36.617284 | 79 | 0.590695 |
42b3938660f5c8596816a1fd1b5560116c8c3f7f | 2,276 | py | Python | main.py | nutszebra/squeeze_net | 85a0f99fce87f542b8c19c27ed3c80f0e2d867c2 | [
"MIT"
] | 5 | 2016-12-24T13:47:06.000Z | 2020-03-20T16:26:04.000Z | main.py | nutszebra/squeeze_net | 85a0f99fce87f542b8c19c27ed3c80f0e2d867c2 | [
"MIT"
] | null | null | null | main.py | nutszebra/squeeze_net | 85a0f99fce87f542b8c19c27ed3c80f0e2d867c2 | [
"MIT"
] | null | null | null | import sys
sys.path.append('./trainer')
import nutszebra_cifar10
import nutszebra_optimizer
import squeeze_net
import argparse
import trainer.nutszebra_data_augmentation as da
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='cifar10')
parser.add_argument('--load_model', '-m',
... | 39.241379 | 80 | 0.539543 |
d94efd62613c72088b07ff88dc398a639bc09c37 | 895 | py | Python | src/z3c/xmlhttp/browser.py | zopefoundation/z3c.xmlhttp | 370e2c5c7562f2d401563fe1dbe11ea3583854db | [
"ZPL-2.1"
] | null | null | null | src/z3c/xmlhttp/browser.py | zopefoundation/z3c.xmlhttp | 370e2c5c7562f2d401563fe1dbe11ea3583854db | [
"ZPL-2.1"
] | null | null | null | src/z3c/xmlhttp/browser.py | zopefoundation/z3c.xmlhttp | 370e2c5c7562f2d401563fe1dbe11ea3583854db | [
"ZPL-2.1"
] | null | null | null | ##############################################################################
#
# Copyright (c) 2008 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... | 33.148148 | 78 | 0.634637 |
4e10305e7e413c50fb48005de6239a03241a3cf2 | 278 | py | Python | rameniaapp/migrations/0018_merge_20201029_0154.py | awlane/ramenia | 6bf8e75a1f279ac584daa4ee19927ffccaa67551 | [
"MIT"
] | null | null | null | rameniaapp/migrations/0018_merge_20201029_0154.py | awlane/ramenia | 6bf8e75a1f279ac584daa4ee19927ffccaa67551 | [
"MIT"
] | null | null | null | rameniaapp/migrations/0018_merge_20201029_0154.py | awlane/ramenia | 6bf8e75a1f279ac584daa4ee19927ffccaa67551 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.1 on 2020-10-29 01:54
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('rameniaapp', '0017_profile_following'),
('rameniaapp', '0016_auto_20201015_0207'),
]
operations = [
]
| 18.533333 | 50 | 0.654676 |
13d81f89704055fe9bfa69b09b3745b9785d461a | 8,042 | py | Python | WriteRecord.py | Larz60p/Python-Record-Structure | e1af2b22845413e06e07bf214fd677b75ab5f7ae | [
"MIT"
] | 1 | 2016-12-06T18:49:10.000Z | 2016-12-06T18:49:10.000Z | WriteRecord.py | Larz60p/Python-Record-Structure | e1af2b22845413e06e07bf214fd677b75ab5f7ae | [
"MIT"
] | null | null | null | WriteRecord.py | Larz60p/Python-Record-Structure | e1af2b22845413e06e07bf214fd677b75ab5f7ae | [
"MIT"
] | null | null | null | """
Example usage of Record class
The MIT License (MIT)
Copyright (c) <2016> <Larry McCaig (aka: Larz60+ aka: Larz60p)>
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, inclu... | 49.036585 | 223 | 0.505844 |
20faa100016e96d5ff3397aa8bd253e9e0f9920d | 4,300 | py | Python | tests/accelerators/test_multi_nodes_gpu.py | prajakta0111/pytorch-lightning | 3df02b880a6d145ff0aca24ea429c12c0d8f1181 | [
"Apache-2.0"
] | 1 | 2021-08-05T01:45:26.000Z | 2021-08-05T01:45:26.000Z | tests/accelerators/test_multi_nodes_gpu.py | prajakta0111/pytorch-lightning | 3df02b880a6d145ff0aca24ea429c12c0d8f1181 | [
"Apache-2.0"
] | 1 | 2021-03-01T17:32:12.000Z | 2021-03-01T17:32:12.000Z | tests/accelerators/test_multi_nodes_gpu.py | prajakta0111/pytorch-lightning | 3df02b880a6d145ff0aca24ea429c12c0d8f1181 | [
"Apache-2.0"
] | 1 | 2021-02-16T00:47:46.000Z | 2021-02-16T00:47:46.000Z | # Copyright The PyTorch Lightning team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 32.089552 | 104 | 0.661395 |
4b3ae14882c9827343ee2613e8a45d3d07b08241 | 5,391 | py | Python | lyssa/feature_extract/spatial_pyramid.py | himanshukgp/Lyssandra | 7c6967e01548d00ace20faf6415f8df00a2578e8 | [
"BSD-3-Clause"
] | 65 | 2016-07-07T11:16:58.000Z | 2022-03-28T08:38:57.000Z | lyssa/feature_extract/spatial_pyramid.py | kevinyu1949/Lyssandra | 994da67a8bf4a63561cf4d6c58c7e58722e192f7 | [
"BSD-3-Clause"
] | 2 | 2017-11-12T04:49:06.000Z | 2018-05-15T21:56:25.000Z | lyssa/feature_extract/spatial_pyramid.py | kevinyu1949/Lyssandra | 994da67a8bf4a63561cf4d6c58c7e58722e192f7 | [
"BSD-3-Clause"
] | 25 | 2017-01-12T11:25:48.000Z | 2022-03-28T08:42:20.000Z | import numpy as np
from lyssa.utils import get_mmap
from lyssa.feature_extract.dsift import DsiftExtractor
from lyssa.utils.img import grid_patches
from lyssa.utils import run_parallel
class dsift_extractor():
def __init__(self, step_size=None, patch_size=None):
# self.step_size = step_size
self.... | 35.94 | 101 | 0.584678 |
478456393d05211d5ca9a45d70d31f232e6ade13 | 3,038 | py | Python | lpot/experimental/metric/f1.py | intelkevinputnam/lpot-docs | 1ff32b4d89074a6bd133ba531f7c0cea3b73152f | [
"Apache-2.0"
] | null | null | null | lpot/experimental/metric/f1.py | intelkevinputnam/lpot-docs | 1ff32b4d89074a6bd133ba531f7c0cea3b73152f | [
"Apache-2.0"
] | null | null | null | lpot/experimental/metric/f1.py | intelkevinputnam/lpot-docs | 1ff32b4d89074a6bd133ba531f7c0cea3b73152f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unl... | 36.166667 | 93 | 0.663594 |
3bb59236530bfa6778943d4955964e6b4a85b758 | 3,342 | py | Python | examples/visualization_examples.py | joannetruong/habitat-api | aad2fd7b8545dce44daefd4b7b3941672eb96ee3 | [
"MIT"
] | 489 | 2019-02-21T21:47:40.000Z | 2020-08-10T06:43:24.000Z | examples/visualization_examples.py | joannetruong/habitat-api | aad2fd7b8545dce44daefd4b7b3941672eb96ee3 | [
"MIT"
] | 380 | 2019-02-26T00:50:48.000Z | 2020-08-11T14:57:07.000Z | examples/visualization_examples.py | joannetruong/habitat-api | aad2fd7b8545dce44daefd4b7b3941672eb96ee3 | [
"MIT"
] | 167 | 2019-02-26T00:38:30.000Z | 2020-08-09T23:07:10.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import os
import imageio
import numpy as np
import habitat
from habitat.tasks.nav.nav import NavigationEpisode, Navig... | 30.66055 | 75 | 0.627768 |
665b4e5a7c24b0aa6ce16236628ec5e6eb53d19e | 3,328 | py | Python | core/__init__.py | xezzz/Twitch-Bot | 5370cb6918c417a88e8ce73401d562de29a580ce | [
"MIT"
] | 1 | 2021-12-07T22:17:38.000Z | 2021-12-07T22:17:38.000Z | core/__init__.py | xezzz/Twitch-Bot | 5370cb6918c417a88e8ce73401d562de29a580ce | [
"MIT"
] | null | null | null | core/__init__.py | xezzz/Twitch-Bot | 5370cb6918c417a88e8ce73401d562de29a580ce | [
"MIT"
] | null | null | null | import asyncio
import platform
import time
import traceback
from tabulate import tabulate
import discord
from discord.ext.commands import AutoShardedBot
from utils import TwitchHTTP, Mongo, handle_notifications
plugins = [
"meta",
"twitch",
"notifications"
#"audio"
]
_ascii = r"""
_ _ ... | 31.396226 | 113 | 0.528846 |
b75f4e6409d4d3f167cfa339d55bd0b8dfed32f1 | 572 | py | Python | 2565.py | WaiNaat/BOJ-Python | 3365ef090c7dcf6e6a598fea0b25c416a5a3e01b | [
"MIT"
] | null | null | null | 2565.py | WaiNaat/BOJ-Python | 3365ef090c7dcf6e6a598fea0b25c416a5a3e01b | [
"MIT"
] | null | null | null | 2565.py | WaiNaat/BOJ-Python | 3365ef090c7dcf6e6a598fea0b25c416a5a3e01b | [
"MIT"
] | null | null | null | import sys
input = sys.stdin.readline
# input
n = int(input())
wire = [tuple(map(int, input().split())) for _ in range(n)]
# process
'''
(A, B)쌍을 A 기준 오름차순 정렬,
B 전봇대의 위치들을 수열이라 치고
DP로 그 수열에서 감소하지 않는 부분 수열의 최대 길이를 구하는 문제!
위의 '그 수열'을 B라 하고
opt(i)를 B[0]~B[i]에서 B[i]를 마지막으로 하고 감소하지 않는 부분수열의 최대 길이라 하면
opt(i) =
1
opt(j)... | 17.875 | 59 | 0.582168 |
5bcf3dd7dd17e8499232424dcfed6bfeafa02bd4 | 1,132 | py | Python | scheduler/scheduler/urls.py | Awinja-j/Social-Media-post-Scheduler | 4f95b4bb2ca3f890d3e22bcda859b94ebc483b87 | [
"MIT"
] | 1 | 2021-05-08T08:21:06.000Z | 2021-05-08T08:21:06.000Z | scheduler/scheduler/urls.py | Awinja-j/Social-Media-post-Scheduler | 4f95b4bb2ca3f890d3e22bcda859b94ebc483b87 | [
"MIT"
] | null | null | null | scheduler/scheduler/urls.py | Awinja-j/Social-Media-post-Scheduler | 4f95b4bb2ca3f890d3e22bcda859b94ebc483b87 | [
"MIT"
] | null | null | null | """scheduler URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-bas... | 36.516129 | 77 | 0.685512 |
05acdecd3c2a6857b5df6df6d31ef7f35d481c82 | 405 | py | Python | twitter_killer_api/asgi.py | vadikam100500/Twitter_killer_API | f58dfe5edd4860942d87299d7bdedadc9fd33ffe | [
"MIT"
] | 1 | 2021-08-19T16:27:03.000Z | 2021-08-19T16:27:03.000Z | twitter_killer_api/asgi.py | vadikam100500/Twitter_killer_API | f58dfe5edd4860942d87299d7bdedadc9fd33ffe | [
"MIT"
] | null | null | null | twitter_killer_api/asgi.py | vadikam100500/Twitter_killer_API | f58dfe5edd4860942d87299d7bdedadc9fd33ffe | [
"MIT"
] | null | null | null | """
ASGI config for yatube_api project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SE... | 23.823529 | 78 | 0.792593 |
ff65b39c8c362b754cba401272a5dcfb7f2b54c0 | 18,986 | py | Python | predicting_movie_reviews_with_bert_on_tf_hub.py | hupidong/bert | 16816eb43ae4246ea1563d708b4878a18a4c2e11 | [
"Apache-2.0"
] | null | null | null | predicting_movie_reviews_with_bert_on_tf_hub.py | hupidong/bert | 16816eb43ae4246ea1563d708b4878a18a4c2e11 | [
"Apache-2.0"
] | null | null | null | predicting_movie_reviews_with_bert_on_tf_hub.py | hupidong/bert | 16816eb43ae4246ea1563d708b4878a18a4c2e11 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[ ]:
# Copyright 2019 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless requi... | 35.822642 | 470 | 0.709049 |
03ff1a599a64266599447107992fcb8683c8cecd | 4,151 | py | Python | viewer.py | mbforbes/rndjam1 | 3cb8f75a4ad7b2efb98a426caebb0641ddf773c2 | [
"MIT"
] | 4 | 2018-06-01T15:59:17.000Z | 2021-03-16T13:40:52.000Z | viewer.py | mbforbes/rndjam1 | 3cb8f75a4ad7b2efb98a426caebb0641ddf773c2 | [
"MIT"
] | 10 | 2017-10-05T18:19:36.000Z | 2019-06-26T18:11:35.000Z | viewer.py | mbforbes/rndjam1 | 3cb8f75a4ad7b2efb98a426caebb0641ddf773c2 | [
"MIT"
] | null | null | null | """
For looking at data. Currently using 'visdom' web dashboard.
"""
import code
import csv
import random
from typing import List, Dict
import torch
import visdom
import constants
# globals
vis = visdom.Visdom()
# functions
def scale(orig: torch.Tensor, scale: int) -> torch.Tensor:
"""
Pixel-perfect u... | 25.157576 | 81 | 0.564442 |
65e8f162e35ffd4111c90c4923c8754665df43ad | 1,431 | py | Python | am/legislative/management/body_membership_copy.py | access-missouri/am-django-project | 2457b8089900c61c73000c1d7479b7a72f6d1855 | [
"BSD-2-Clause"
] | 4 | 2018-05-01T20:31:49.000Z | 2021-12-20T19:30:40.000Z | am/legislative/management/body_membership_copy.py | access-missouri/am-django-project | 2457b8089900c61c73000c1d7479b7a72f6d1855 | [
"BSD-2-Clause"
] | 22 | 2017-04-13T15:02:09.000Z | 2021-02-02T21:48:41.000Z | am/legislative/management/body_membership_copy.py | access-missouri/am-django-project | 2457b8089900c61c73000c1d7479b7a72f6d1855 | [
"BSD-2-Clause"
] | 1 | 2018-07-02T20:08:43.000Z | 2018-07-02T20:08:43.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Utility functions for copying BodyMembership rows.
"""
from legislative.models import BodyMembership
def get_or_copy_body_membership_to_session(membership, session):
"""
Like ModelManager.get_or_create() only for copying BodyMembership.
:param membership:... | 32.522727 | 91 | 0.689727 |
1514c0868be0bc39f475fd991939a34e88e872df | 236 | py | Python | website/addons/dataverse/settings/defaults.py | DanielSBrown/osf.io | 98dda2ac237377197acacce78274bc0a4ce8f303 | [
"Apache-2.0"
] | 1 | 2015-10-02T18:35:53.000Z | 2015-10-02T18:35:53.000Z | website/addons/dataverse/settings/defaults.py | DanielSBrown/osf.io | 98dda2ac237377197acacce78274bc0a4ce8f303 | [
"Apache-2.0"
] | 4 | 2016-05-13T14:24:16.000Z | 2017-03-30T15:28:31.000Z | website/addons/dataverse/settings/defaults.py | DanielSBrown/osf.io | 98dda2ac237377197acacce78274bc0a4ce8f303 | [
"Apache-2.0"
] | null | null | null | DEFAULT_HOSTS = [
'dataverse.harvard.edu', # Harvard PRODUCTION server
'demo.dataverse.org', # Harvard DEMO server
'apitest.dataverse.org', # Dataverse TEST server
]
REQUEST_TIMEOUT = 15
| 29.5 | 67 | 0.605932 |
ac82c59c5653917357c87555134ebfefd24daada | 4,680 | py | Python | examples/chatbot/chatbot_example.py | bhaskar2443053/forte | 95fabd94126d45c0db07cdcc197049ed1859d228 | [
"Apache-2.0"
] | null | null | null | examples/chatbot/chatbot_example.py | bhaskar2443053/forte | 95fabd94126d45c0db07cdcc197049ed1859d228 | [
"Apache-2.0"
] | null | null | null | examples/chatbot/chatbot_example.py | bhaskar2443053/forte | 95fabd94126d45c0db07cdcc197049ed1859d228 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The Forte Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 35.725191 | 79 | 0.68547 |
0edf9e8befe3275eff95720da44bf00a92d494d7 | 3,875 | py | Python | install_op.py | parkside-securities/1password-client | c890b3b1f647fa8620e95d0aecf85c44851ce8aa | [
"MIT"
] | null | null | null | install_op.py | parkside-securities/1password-client | c890b3b1f647fa8620e95d0aecf85c44851ce8aa | [
"MIT"
] | null | null | null | install_op.py | parkside-securities/1password-client | c890b3b1f647fa8620e95d0aecf85c44851ce8aa | [
"MIT"
] | null | null | null | import os
import wget
import zipfile
import platform
from subprocess import Popen, PIPE
platform_links = {
"Darwin": {
"x86_64": "https://cache.agilebits.com/dist/1P/op/pkg/v1.8.0/op_darwin_amd64_v1.8.0.pkg",
"download_loc": "/usr/local/bin/"
},
"FreeBSD": {
"i386": "https://cache.... | 39.540816 | 112 | 0.641806 |
2219bf5399730b5dceb96a30371abf51b0affb36 | 1,082 | py | Python | backend/users/models/blockage.py | appheap/social-media-analyzer | 0f9da098bfb0b4f9eb38e0244aa3a168cf97d51c | [
"Apache-2.0"
] | 5 | 2021-09-11T22:01:15.000Z | 2022-03-16T21:33:42.000Z | backend/users/models/blockage.py | iamatlasss/social-media-analyzer | 429d1d2bbd8bfce80c50c5f8edda58f87ace668d | [
"Apache-2.0"
] | null | null | null | backend/users/models/blockage.py | iamatlasss/social-media-analyzer | 429d1d2bbd8bfce80c50c5f8edda58f87ace668d | [
"Apache-2.0"
] | 3 | 2022-01-18T11:06:22.000Z | 2022-02-26T13:39:28.000Z | from django.db import models
from db import models as db_models
class TimeZones(models.TextChoices):
UTC = 'UTC'
ASIA_TEHRAN = 'Asia/Tehran'
class BlockageTypes(models.TextChoices):
OTHER = 'OTHER'
FOREVER = 'FOREVER'
TEMPORARY = 'TEMPORARY'
SPAM = 'SPAM'
class Blockage(db_models.BaseMode... | 25.761905 | 72 | 0.640481 |
5e15d0512273d3b6bd08e6f36bf0e78198ebfb18 | 18,080 | py | Python | uvicorn/protocols/http/h11_impl.py | grouchoboy/uvicorn | ae0fd316f03dbef926e40216024dfb934417d48d | [
"BSD-3-Clause"
] | 2 | 2021-04-01T08:46:05.000Z | 2021-04-01T08:46:07.000Z | uvicorn/protocols/http/h11_impl.py | grouchoboy/uvicorn | ae0fd316f03dbef926e40216024dfb934417d48d | [
"BSD-3-Clause"
] | 9 | 2021-04-12T13:44:34.000Z | 2021-04-13T16:50:08.000Z | uvicorn/protocols/http/h11_impl.py | grouchoboy/uvicorn | ae0fd316f03dbef926e40216024dfb934417d48d | [
"BSD-3-Clause"
] | 2 | 2020-04-03T09:49:18.000Z | 2020-04-03T10:01:50.000Z | import asyncio
import http
import logging
from urllib.parse import unquote
import h11
from uvicorn.protocols.utils import (
get_client_addr,
get_local_addr,
get_path_with_query_string,
get_remote_addr,
is_ssl,
)
def _get_status_phrase(status_code):
try:
return http.HTTPStatus(status_... | 34.177694 | 89 | 0.558573 |
9778f1964d0f312479e92cb60ba32d5d79c5b22e | 2,770 | py | Python | python_modules/libraries/dagster-pagerduty/dagster_pagerduty/hooks.py | joshuataylor/dagster | 7ed9c52eb1d30d0aea99e4e9339de3d0bc5c3035 | [
"Apache-2.0"
] | null | null | null | python_modules/libraries/dagster-pagerduty/dagster_pagerduty/hooks.py | joshuataylor/dagster | 7ed9c52eb1d30d0aea99e4e9339de3d0bc5c3035 | [
"Apache-2.0"
] | null | null | null | python_modules/libraries/dagster-pagerduty/dagster_pagerduty/hooks.py | joshuataylor/dagster | 7ed9c52eb1d30d0aea99e4e9339de3d0bc5c3035 | [
"Apache-2.0"
] | null | null | null | from typing import Callable, Optional
from dagster.core.definitions import failure_hook
from dagster.core.execution.context.system import HookContext
def _default_summary_fn(context: HookContext) -> str:
return "Solid {solid_name} on pipeline {pipeline_name} failed!".format(
solid_name=context.solid.name... | 34.197531 | 115 | 0.641516 |
78a696ab9d55599cd5719f34bc92b424fba9a6e2 | 2,804 | py | Python | Python/example_controllers/flex_soft_body.py | felixbinder/tdw | eb2b00b74b9fcf8ef2dcba1baa62424640c520b1 | [
"BSD-2-Clause"
] | 307 | 2020-05-20T18:08:49.000Z | 2022-03-21T19:55:08.000Z | Python/example_controllers/flex_soft_body.py | felixbinder/tdw | eb2b00b74b9fcf8ef2dcba1baa62424640c520b1 | [
"BSD-2-Clause"
] | 92 | 2020-07-21T18:29:13.000Z | 2022-03-28T07:25:54.000Z | Python/example_controllers/flex_soft_body.py | felixbinder/tdw | eb2b00b74b9fcf8ef2dcba1baa62424640c520b1 | [
"BSD-2-Clause"
] | 53 | 2020-07-14T15:55:17.000Z | 2022-03-20T16:20:01.000Z | from tdw.controller import Controller
from tdw.output_data import FlexParticles
from tdw.tdw_utils import TDWUtils
"""
Create a soft-body object with the NVIDIA Flex physics engine.
"""
class FlexSoftBody(Controller):
def run(self):
self.load_streamed_scene(scene="tdw_room")
self.... | 37.891892 | 93 | 0.451141 |
28af6c700f52529f96ed910e66929d7ee389e4c5 | 3,866 | py | Python | commons/tgraph.py | oeg-upm/tada-entity | 6e538129229bed49bf1aa960fcd97a8468eca765 | [
"Apache-2.0"
] | 3 | 2019-06-11T10:19:25.000Z | 2022-02-28T22:58:29.000Z | commons/tgraph.py | oeg-upm/tada-entity | 6e538129229bed49bf1aa960fcd97a8468eca765 | [
"Apache-2.0"
] | 7 | 2019-02-04T08:57:54.000Z | 2021-11-01T12:42:03.000Z | commons/tgraph.py | oeg-upm/tada-entity | 6e538129229bed49bf1aa960fcd97a8468eca765 | [
"Apache-2.0"
] | null | null | null |
class Node:
def __init__(self):
self.class_uri = ""
self.Ic = None
self.Lc = None
self.fc = None
self.Is = None
self.Ls = None
self.fs = dict()
self.f = dict()
# self.fs = None
# self.fs1 = None
# self.fs2 = None
# se... | 28.850746 | 82 | 0.509053 |
19478a8e58edff191bfcf838e26d18d123c0a55a | 4,728 | py | Python | bokeh/application/handlers/lifecycle.py | g-parki/bokeh | 664ead5306bba64609e734d4105c8aa8cfb76d81 | [
"BSD-3-Clause"
] | null | null | null | bokeh/application/handlers/lifecycle.py | g-parki/bokeh | 664ead5306bba64609e734d4105c8aa8cfb76d81 | [
"BSD-3-Clause"
] | null | null | null | bokeh/application/handlers/lifecycle.py | g-parki/bokeh | 664ead5306bba64609e734d4105c8aa8cfb76d81 | [
"BSD-3-Clause"
] | null | null | null | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | 33.062937 | 82 | 0.483714 |
4b20ab14f0e271263136fa786763f91f173df4de | 165 | py | Python | URI Online Judge/Python/URI 1044.py | AugustoEstevaoMonte/Learning---C-programming | e496b301b6cc9dda68b1da6d72a4937b2c5f9aec | [
"MIT"
] | null | null | null | URI Online Judge/Python/URI 1044.py | AugustoEstevaoMonte/Learning---C-programming | e496b301b6cc9dda68b1da6d72a4937b2c5f9aec | [
"MIT"
] | 1 | 2020-08-04T17:08:41.000Z | 2020-08-04T17:12:48.000Z | URI Online Judge/Python/URI 1044.py | AugustoEstevaoMonte/Learning---C-programming | e496b301b6cc9dda68b1da6d72a4937b2c5f9aec | [
"MIT"
] | null | null | null | x=input().split()
a,b=x
a=int(a)
b=int(b)
if b>a:
resul=b%a
else:
resul=a%b
if resul==0:
print("Sao Multiplos")
else:
print("Nao sao Multiplos") | 12.692308 | 30 | 0.575758 |
eebffe8bbda47c236f618b9179a3878e915e0866 | 6,445 | py | Python | env/lib/python3.8/site-packages/plotly/graph_objs/scatter/selected/_marker.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11,750 | 2015-10-12T07:03:39.000Z | 2022-03-31T20:43:15.000Z | env/lib/python3.8/site-packages/plotly/graph_objs/scatter/selected/_marker.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 2,951 | 2015-10-12T00:41:25.000Z | 2022-03-31T22:19:26.000Z | env/lib/python3.8/site-packages/plotly/graph_objs/scatter/selected/_marker.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 2,623 | 2015-10-15T14:40:27.000Z | 2022-03-28T16:05:50.000Z | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Marker(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "scatter.selected"
_path_str = "scatter.selected.marker"
_valid_props = {"color", "opacity", ... | 33.051282 | 82 | 0.545694 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.