hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1c7969be772d5ed2a353c627c79ad693b7d879fa | 3,503 | py | Python | tests/unit/resources/test_certificates.py | HewlettPackard/simplivity-python-sdk | 03d8e92a02fe66e878ed22b37944e5a6ce991ef1 | [
"Apache-2.0"
] | 7 | 2020-02-28T09:03:09.000Z | 2022-03-28T15:52:23.000Z | tests/unit/resources/test_certificates.py | HewlettPackard/simplivity-python-sdk | 03d8e92a02fe66e878ed22b37944e5a6ce991ef1 | [
"Apache-2.0"
] | 47 | 2020-01-16T20:32:19.000Z | 2020-08-27T04:43:00.000Z | tests/unit/resources/test_certificates.py | HewlettPackard/simplivity-python-sdk | 03d8e92a02fe66e878ed22b37944e5a6ce991ef1 | [
"Apache-2.0"
] | 16 | 2020-01-10T14:15:17.000Z | 2021-04-06T13:31:01.000Z | ###
# (C) Copyright [2020] Hewlett Packard Enterprise Development LP
#
# 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 ap... | 41.702381 | 105 | 0.685983 |
1c799f3b1edd35b2d34e4aa8ec73ce279520cbea | 2,446 | py | Python | trainable/progress.py | hiltonjp/trainable | 3b1432c9c816285680f14e292eaef26cdbe213cf | [
"MIT"
] | 1 | 2018-12-17T19:38:00.000Z | 2018-12-17T19:38:00.000Z | trainable/progress.py | hiltonjp/trainable | 3b1432c9c816285680f14e292eaef26cdbe213cf | [
"MIT"
] | null | null | null | trainable/progress.py | hiltonjp/trainable | 3b1432c9c816285680f14e292eaef26cdbe213cf | [
"MIT"
] | null | null | null | from tqdm import tqdm
from collections import defaultdict
class ProgressManager(object):
def __init__(self, display_freq=1):
super().__init__()
self.loop = None
self.frequency = display_freq
self.counter = 0
self.metrics = defaultdict(lambda: [])
#######################... | 35.970588 | 85 | 0.414554 |
1c79a814d52301a3cd208d1b59cc9759ad163e19 | 2,160 | py | Python | odl/meter.py | cmscaltech/python-odl | 6c62ffe3cc2b28727e78ee451239796ea7ec7298 | [
"MIT"
] | null | null | null | odl/meter.py | cmscaltech/python-odl | 6c62ffe3cc2b28727e78ee451239796ea7ec7298 | [
"MIT"
] | null | null | null | odl/meter.py | cmscaltech/python-odl | 6c62ffe3cc2b28727e78ee451239796ea7ec7298 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that... | 29.589041 | 86 | 0.616204 |
1c79c9404359ab9534dcf6a760600d169f53e5d8 | 4,094 | py | Python | alipay/aop/api/request/AlipayCommerceTransportWorldVirtualcardBatchqueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/AlipayCommerceTransportWorldVirtualcardBatchqueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/AlipayCommerceTransportWorldVirtualcardBatchqueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayCommerceTransportWorldVirtualcardBatchqueryModel import AlipayCommerceTransportWorldVirtualcardBatchqueryModel
class AlipayCom... | 28.234483 | 148 | 0.655105 |
1c79e845fb5af59e5a35eeb6feb2c8a3f6cb9e39 | 4,286 | py | Python | rocrate/model/entity.py | pauldg/ro-crate-py | 695004f18175ca70b439534adece9e2242dca778 | [
"Apache-2.0"
] | null | null | null | rocrate/model/entity.py | pauldg/ro-crate-py | 695004f18175ca70b439534adece9e2242dca778 | [
"Apache-2.0"
] | null | null | null | rocrate/model/entity.py | pauldg/ro-crate-py | 695004f18175ca70b439534adece9e2242dca778 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2019-2022 The University of Manchester, UK
# Copyright 2020-2022 Vlaams Instituut voor Biotechnologie (VIB), BE
# Copyright 2020-2022 Barcelona Supercomputing Center (BSC), ES
# Copyright 2020-2022 Center for Advanced Studies, Research and Development in Sardinia (CRS4), IT
# Copyrigh... | 29.972028 | 98 | 0.635324 |
1c7a07b8480d3498bfd01748ede6cee5d51b6854 | 1,899 | py | Python | oled_status/draw.py | FlantasticDan/oled-status | 7aabb3e74ea78a70f7d4eae74ec04e378cd1c513 | [
"MIT"
] | null | null | null | oled_status/draw.py | FlantasticDan/oled-status | 7aabb3e74ea78a70f7d4eae74ec04e378cd1c513 | [
"MIT"
] | null | null | null | oled_status/draw.py | FlantasticDan/oled-status | 7aabb3e74ea78a70f7d4eae74ec04e378cd1c513 | [
"MIT"
] | null | null | null | """
Image Drawing and Generation for 0.91" 128 by 32 OLED Displays
"""
import pkg_resources
from PIL import Image, ImageDraw, ImageFont, ImageChops
from . import WIDTH, HEIGHT
def generate_status_image(header: str, body: str, footer: str, invert=False) -> Image.Image:
"""Generates an image to be displayed o... | 34.527273 | 121 | 0.685624 |
1c7a2c61e631ecea47952a913a179f6ab245e7b4 | 8,999 | py | Python | ParaUtils.py | mscook/pyParaTools | 5db60329519c1550a8480d2ace0ecd0dcfbf1255 | [
"ECL-2.0"
] | 2 | 2020-04-15T23:04:42.000Z | 2021-01-27T21:34:14.000Z | ParaUtils.py | mscook/pyParaTools | 5db60329519c1550a8480d2ace0ecd0dcfbf1255 | [
"ECL-2.0"
] | null | null | null | ParaUtils.py | mscook/pyParaTools | 5db60329519c1550a8480d2ace0ecd0dcfbf1255 | [
"ECL-2.0"
] | null | null | null | """Utility methods for paramagnetic observables """
import math
from numpy import *
def ZXZRot(A, B, G, scal=1.0):
"""
Builds the ZXZ rotation matrix given 3 Euler Angles. See:
http://mathworld.wolfram.com/EulerAngles.html
@param A : The (A)lpha angle
@type A : float
@param B :... | 33.084559 | 137 | 0.538949 |
1c7a3024a5fa2de00a2cf6fc351f200aaad187ac | 7,488 | py | Python | DataProcessing.py | fdurville/BeamProfiler | a68cf8df9dc73308e8bcccdd5701b70f5075d6ba | [
"Zlib"
] | null | null | null | DataProcessing.py | fdurville/BeamProfiler | a68cf8df9dc73308e8bcccdd5701b70f5075d6ba | [
"Zlib"
] | 2 | 2020-11-16T15:32:14.000Z | 2020-12-04T22:54:02.000Z | DataProcessing.py | fdurville/BeamProfiler | a68cf8df9dc73308e8bcccdd5701b70f5075d6ba | [
"Zlib"
] | null | null | null | #! Python 3
import math
import BeamProfiler as bp
v = 3.4
#This file defines the fuctions to process data
#crated F. Durville 3 Feb 2020
#last update - FD-26oct20
#calculating default bkg value
def CalcBkg(scan,imgData):
bkg = 0
sumX = 0
sumY = 0
if scan == "2D":
pass
... | 31.86383 | 99 | 0.446982 |
1c7a356ed4f65fa7c12f1516879ff321318f3388 | 1,316 | py | Python | gemma/_exceptions.py | illuscio-dev/gemma-py | c12b2aae8438b69236cf8b1c76ac6dd1912f6207 | [
"MIT"
] | 1 | 2020-11-05T04:42:39.000Z | 2020-11-05T04:42:39.000Z | gemma/_exceptions.py | illuscio-dev/gemma-py | c12b2aae8438b69236cf8b1c76ac6dd1912f6207 | [
"MIT"
] | null | null | null | gemma/_exceptions.py | illuscio-dev/gemma-py | c12b2aae8438b69236cf8b1c76ac6dd1912f6207 | [
"MIT"
] | null | null | null | from typing import List, Union, Iterable, Tuple, Any, Type
class NullNameError(BaseException):
"""Bearing cannot be found on object."""
class NonNavigableError(BaseException):
"""Target object cannot be traversed"""
class SuppressedErrors(BaseException):
"""
Errors occurred while Cartographer mapp... | 29.909091 | 87 | 0.645137 |
1c7a510be749c1a79838f28638303f5ec82e2829 | 1,104 | py | Python | networking_opencontrail/common/exceptions.py | SSU-DCN/opencontrail | 7ad252b008015c213341155dce1c99083049e0e3 | [
"Apache-2.0"
] | null | null | null | networking_opencontrail/common/exceptions.py | SSU-DCN/opencontrail | 7ad252b008015c213341155dce1c99083049e0e3 | [
"Apache-2.0"
] | null | null | null | networking_opencontrail/common/exceptions.py | SSU-DCN/opencontrail | 7ad252b008015c213341155dce1c99083049e0e3 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2016 OpenStack Foundation
#
# 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 ... | 34.5 | 78 | 0.729167 |
1c7a52b003d0022124bcc92b7f32079acb589ec9 | 2,294 | py | Python | tests/integration/test_migrations.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | tests/integration/test_migrations.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | tests/integration/test_migrations.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | """This module was taken from Wagtail, see:
https://github.com/torchbox/wagtail/blob/d82e38e11e9f6c27b6ad6dfc6467e2754b5ab228/wagtail/wagtailcore/tests/test_migrations.py
"""
from __future__ import absolute_import
from django.apps import apps
from django.db.migrations.autodetector import MigrationAutodetec... | 38.881356 | 127 | 0.61857 |
1c7aa86766c5f09dc2575e0993411f32cd205b83 | 24,550 | py | Python | sirepo/template/shadow.py | yeeon/sirepo | 081595df256d40fbc7959614689d64ad2bc745d4 | [
"Apache-2.0"
] | 1 | 2019-06-06T08:08:11.000Z | 2019-06-06T08:08:11.000Z | sirepo/template/shadow.py | yeeon/sirepo | 081595df256d40fbc7959614689d64ad2bc745d4 | [
"Apache-2.0"
] | null | null | null | sirepo/template/shadow.py | yeeon/sirepo | 081595df256d40fbc7959614689d64ad2bc745d4 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
u"""shadow execution template.
:copyright: Copyright (c) 2017 RadiaSoft LLC. All Rights Reserved.
:license: http://www.apache.org/licenses/LICENSE-2.0.html
"""
from __future__ import absolute_import, division, print_function
from pykern import pkcollections
from pykern import pkio
from pykern... | 38.661417 | 446 | 0.600163 |
1c7ab09ea2246b7ac56791e0b8a4528951c6e683 | 2,669 | py | Python | main.py | feiphoon/ner-pipeline | 1c343eea458e9c546bb8b53adcd22118d171aa63 | [
"MIT"
] | null | null | null | main.py | feiphoon/ner-pipeline | 1c343eea458e9c546bb8b53adcd22118d171aa63 | [
"MIT"
] | null | null | null | main.py | feiphoon/ner-pipeline | 1c343eea458e9c546bb8b53adcd22118d171aa63 | [
"MIT"
] | null | null | null | from pathlib import Path
from pyspark.sql import SparkSession
from src.helpers.run import Run
from src.A_pubmed_abstract_import.biopython_import import import_pubmed_abstracts
from src.B_pubmed_abstract_processing.biopython_processing import (
process_pubmed_abstracts,
)
from src.C_prepare_abstracts_for_annotation... | 39.835821 | 115 | 0.732109 |
1c7ad1e809c53f1578496850be2b6ebf6a2a2257 | 988 | py | Python | page_locators/forgot_login_info_page_locator.py | ikostan/ParaBankSeleniumAutomation | e28a886adba89b82a60831ad96a3a8f00f863116 | [
"Unlicense"
] | 4 | 2019-08-12T19:36:58.000Z | 2021-09-14T18:48:27.000Z | page_locators/forgot_login_info_page_locator.py | ikostan/ParaBankSeleniumAutomation | e28a886adba89b82a60831ad96a3a8f00f863116 | [
"Unlicense"
] | 1 | 2021-06-02T00:01:00.000Z | 2021-06-02T00:01:00.000Z | page_locators/forgot_login_info_page_locator.py | ikostan/ParaBankSeleniumAutomation | e28a886adba89b82a60831ad96a3a8f00f863116 | [
"Unlicense"
] | 2 | 2019-08-12T10:06:00.000Z | 2020-12-25T05:52:40.000Z | # Created by Egor Kostan.
# GitHub: https://github.com/ikostan
# LinkedIn: https://www.linkedin.com/in/egor-kostan/
from selenium.webdriver.common.by import By
from page_locators.base_page_locator import BasePageLocator
from page_locators.base_personal_info_page_locator import BasePersonalInfoPageLocator
class Fo... | 34.068966 | 85 | 0.705466 |
1c7aded36a7a929884d46ceeb1fccec9dfaac287 | 179 | py | Python | app_par/apps/blog/cache_utils.py | luduvigo/app-blog-code | 2de41573955f8dfb5f6d964d3cae2bbee6db2f9a | [
"Apache-2.0"
] | null | null | null | app_par/apps/blog/cache_utils.py | luduvigo/app-blog-code | 2de41573955f8dfb5f6d964d3cae2bbee6db2f9a | [
"Apache-2.0"
] | null | null | null | app_par/apps/blog/cache_utils.py | luduvigo/app-blog-code | 2de41573955f8dfb5f6d964d3cae2bbee6db2f9a | [
"Apache-2.0"
] | null | null | null | import webapp2
import handler
from google.appengine.api import memcache
class FlushCache(handler.BaseHandler):
def get(self):
memcache.flush_all()
self.redirect('/blog')
| 17.9 | 41 | 0.77095 |
1c7b107ba39c75503f2153722e851c0dcd2d6f48 | 645 | py | Python | day15/day15_part1.py | Disi77/AdventOfCode2020 | aafe1b402e08976c2cade3c044ead811b67bcf71 | [
"WTFPL"
] | 1 | 2020-12-05T12:39:03.000Z | 2020-12-05T12:39:03.000Z | day15/day15_part1.py | Disi77/AdventOfCode2020 | aafe1b402e08976c2cade3c044ead811b67bcf71 | [
"WTFPL"
] | null | null | null | day15/day15_part1.py | Disi77/AdventOfCode2020 | aafe1b402e08976c2cade3c044ead811b67bcf71 | [
"WTFPL"
] | null | null | null | numbers = [0, 8, 15, 2, 12, 1, 4]
end_turn = 2020
start_turn = len(numbers)
def get_2_last_index(numbers):
indexes = []
last_num = numbers[-1]
for i, num in enumerate(numbers):
if last_num == num:
indexes.append(i)
return indexes[-1], indexes[-2]
for turn in range(start_turn, en... | 24.807692 | 61 | 0.662016 |
1c7b2e7365a0e34f37742c957acfac69b958d04c | 12,310 | py | Python | tutorials/tutorial_kml.py | aravindm711/MSS | 128687ec036d445656a70ff4b82c3cb7586715e4 | [
"Apache-2.0"
] | 33 | 2020-12-04T04:29:28.000Z | 2022-03-05T17:11:49.000Z | tutorials/tutorial_kml.py | aravindm711/MSS | 128687ec036d445656a70ff4b82c3cb7586715e4 | [
"Apache-2.0"
] | 614 | 2020-12-06T16:54:44.000Z | 2022-03-31T07:41:02.000Z | tutorials/tutorial_kml.py | aravindm711/MSS | 128687ec036d445656a70ff4b82c3cb7586715e4 | [
"Apache-2.0"
] | 51 | 2020-12-04T15:10:46.000Z | 2022-03-20T02:02:11.000Z | """
mss.tutorials.tutorial_kml
~~~~~~~~~~~~~~~~~~~~~~~~~~
This python script generates an automatic demonstration of how to overlay kml flles on top of the map in topview.
kml(key hole markup language) is an XML based file format for demonstrating geographical context. This will
demonstrate how to ... | 36.099707 | 117 | 0.589683 |
1c7b37c2280e31a2eb05348379ff3d2fa8cfd1d3 | 2,123 | py | Python | src/curlify.py | subhadig/restcall | 9e9e9f8605db3ad4f3c92cab075a852942e1e41b | [
"MIT"
] | null | null | null | src/curlify.py | subhadig/restcall | 9e9e9f8605db3ad4f3c92cab075a852942e1e41b | [
"MIT"
] | null | null | null | src/curlify.py | subhadig/restcall | 9e9e9f8605db3ad4f3c92cab075a852942e1e41b | [
"MIT"
] | null | null | null | # MIT License
#
# Copyright (c) 2016 Egor
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publi... | 30.768116 | 80 | 0.654734 |
1c7b50bdfdd39669d83c1826a46bd7a1d841a0a8 | 1,187 | py | Python | lib/core/loss.py | CHUNYUWANG/imu-human-pose-pytorch | f4813336571789f46eabdfb520e7ed5b20ac04ea | [
"MIT"
] | 72 | 2020-03-26T13:26:39.000Z | 2022-03-16T08:45:34.000Z | lib/core/loss.py | zhezh/imu-human-pose-pytorch | f4813336571789f46eabdfb520e7ed5b20ac04ea | [
"MIT"
] | 10 | 2020-04-05T07:17:49.000Z | 2022-03-04T05:32:12.000Z | lib/core/loss.py | CHUNYUWANG/imu-human-pose-pytorch | f4813336571789f46eabdfb520e7ed5b20ac04ea | [
"MIT"
] | 13 | 2020-04-12T20:33:38.000Z | 2022-02-17T11:23:13.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import torch.nn as nn
class JointsMSELoss(nn.Module):
def __init__(self, use_target_weight):
super(JointsMSELoss, self).__... | 34.911765 | 80 | 0.647009 |
1c7b89a283d7e09dbf6e1762d45044e28bd895fb | 794 | py | Python | data/transcoder_evaluation_gfg/python/PROGRAM_CHECK_INPUT_INTEGER_STRING.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 241 | 2021-07-20T08:35:20.000Z | 2022-03-31T02:39:08.000Z | data/transcoder_evaluation_gfg/python/PROGRAM_CHECK_INPUT_INTEGER_STRING.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 49 | 2021-07-22T23:18:42.000Z | 2022-03-24T09:15:26.000Z | data/transcoder_evaluation_gfg/python/PROGRAM_CHECK_INPUT_INTEGER_STRING.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 71 | 2021-07-21T05:17:52.000Z | 2022-03-29T23:49:28.000Z | # Copyright (c) 2019-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
def f_gold ( s ) :
for i in range ( len ( s ) ) :
if s [ i ].isdigit ( ) != True :
return False
retu... | 24.060606 | 64 | 0.561713 |
1c7bbf260cc8acb146b256dc204b5d8a9c52d52e | 132 | py | Python | krvjezivot/common/admin.py | jkvakaric/krv-je-zivot | a875dcde468e1e5508713e592f974cb147223b52 | [
"MIT"
] | null | null | null | krvjezivot/common/admin.py | jkvakaric/krv-je-zivot | a875dcde468e1e5508713e592f974cb147223b52 | [
"MIT"
] | 4 | 2021-05-12T05:51:02.000Z | 2022-03-21T14:09:02.000Z | krvjezivot/common/admin.py | jkvakaric/krv-je-zivot | a875dcde468e1e5508713e592f974cb147223b52 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Notification
# Register your models here.
admin.site.register(Notification)
| 16.5 | 33 | 0.810606 |
1c7be54018433f28819b995139b8729471bdf4d6 | 3,525 | py | Python | intersight/models/snmp_user_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/snmp_user_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/snmp_user_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-255
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class SnmpUserRef(object):
"""
NOTE: This class is ... | 23.5 | 77 | 0.530496 |
1c7c28d27b356259b4acfa7ac5397aa7dc126996 | 795 | py | Python | bioseq/migrations/0002_dbx.py | sndg-arg/covid19-web | fe809c87563a00bbec53c3646338d571fdde6a69 | [
"MIT"
] | null | null | null | bioseq/migrations/0002_dbx.py | sndg-arg/covid19-web | fe809c87563a00bbec53c3646338d571fdde6a69 | [
"MIT"
] | 2 | 2021-03-10T17:08:59.000Z | 2021-09-29T17:40:48.000Z | bioseq/migrations/0002_dbx.py | sndg-arg/covid19-web | fe809c87563a00bbec53c3646338d571fdde6a69 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.6 on 2020-05-22 11:32
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('bioseq', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='DBx',
fields=[
('dbx_id', m... | 31.8 | 91 | 0.567296 |
1c7c35e8ed94c5986c6be631b117b16e684e2b9e | 7,861 | py | Python | qstkstudy/EventProfiler.py | grahesh/Stock-Market-Event-Analysis | 57dc06e087c29b9c134df8886c97377b3d99f05b | [
"BSD-3-Clause"
] | 1 | 2015-12-04T14:40:33.000Z | 2015-12-04T14:40:33.000Z | qstkstudy/EventProfiler.py | grahesh/Stock-Market-Event-Analysis | 57dc06e087c29b9c134df8886c97377b3d99f05b | [
"BSD-3-Clause"
] | null | null | null | qstkstudy/EventProfiler.py | grahesh/Stock-Market-Event-Analysis | 57dc06e087c29b9c134df8886c97377b3d99f05b | [
"BSD-3-Clause"
] | null | null | null | # (c) 2011, 2012 Georgia Tech Research Corporation
# This source code is released under the New BSD license. Please see
# http://wiki.quantsoftware.org/index.php?title=QSTK_License
# for license details.
#
# Created on October <day>,2011
# @author: Vishal Shekhar, Tucker Balch
# @contact: mailvishalshekhar@gmail.com
#... | 39.70202 | 92 | 0.546368 |
1c7c516e58c07f6125a9b54e975d3a7a9ee4c9e8 | 6,465 | py | Python | solum/classfile/classfile.py | sadimusi/Solum | 74082c1bb94e3df9c4ed778443a08639e3fedced | [
"MIT"
] | 2 | 2015-01-09T08:53:07.000Z | 2015-03-10T03:41:21.000Z | solum/classfile/classfile.py | sadimusi/Solum | 74082c1bb94e3df9c4ed778443a08639e3fedced | [
"MIT"
] | null | null | null | solum/classfile/classfile.py | sadimusi/Solum | 74082c1bb94e3df9c4ed778443a08639e3fedced | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf8 -*-
"""
Copyright (c) 2010-2011 Tyler Kennedy <tk@tkte.ch>
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 limitatio... | 32.164179 | 78 | 0.636968 |
1c7c83584cf07417d0057250f1a67e279d98cdb6 | 1,298 | py | Python | acasa/internet/meteo.py | pauldamian/-casa | cac1f1b2f3526ceb41a49a790c2a94d07d44ba18 | [
"Apache-2.0"
] | null | null | null | acasa/internet/meteo.py | pauldamian/-casa | cac1f1b2f3526ceb41a49a790c2a94d07d44ba18 | [
"Apache-2.0"
] | null | null | null | acasa/internet/meteo.py | pauldamian/-casa | cac1f1b2f3526ceb41a49a790c2a94d07d44ba18 | [
"Apache-2.0"
] | null | null | null | '''
Created on 4 apr. 2016
@author: Paul
'''
import time
from utility import constants, util
APPID = util.get_conf_value(constants.KEY_OPENWEATHER)
KELVIN_TO_CELSIUS = 273.15
def seconds_to_time(seconds):
return time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(seconds))
class Meteo():
... | 28.844444 | 94 | 0.615562 |
1c7ca13a29084ee95e32c10054091d6e876aaf7d | 4,864 | py | Python | celery/contrib/abortable.py | gthb/celery | 13057dc69a6ecda6aabfae7b7640d971176251fb | [
"BSD-3-Clause"
] | 2 | 2017-05-24T13:03:30.000Z | 2017-09-04T08:24:19.000Z | celery/contrib/abortable.py | gthb/celery | 13057dc69a6ecda6aabfae7b7640d971176251fb | [
"BSD-3-Clause"
] | null | null | null | celery/contrib/abortable.py | gthb/celery | 13057dc69a6ecda6aabfae7b7640d971176251fb | [
"BSD-3-Clause"
] | null | null | null | """
=========================
Abortable tasks overview
=========================
For long-running :class:`Task`'s, it can be desirable to support
aborting during execution. Of course, these tasks should be built to
support abortion specifically.
The :class:`AbortableTask` serves as a base class for all :class:`Task`
... | 30.980892 | 76 | 0.655633 |
1c7ca57d3b5efdb2ddb0446efef33eecea8639be | 2,301 | py | Python | demo/dygraph/pruning/imagenet.py | maxpark/PaddleSlim | f6b827fca5f3d9cc467426b8ef30e3a6d2b012b9 | [
"Apache-2.0"
] | 1 | 2021-12-30T08:23:21.000Z | 2021-12-30T08:23:21.000Z | demo/dygraph/pruning/imagenet.py | maxpark/PaddleSlim | f6b827fca5f3d9cc467426b8ef30e3a6d2b012b9 | [
"Apache-2.0"
] | null | null | null | demo/dygraph/pruning/imagenet.py | maxpark/PaddleSlim | f6b827fca5f3d9cc467426b8ef30e3a6d2b012b9 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 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... | 35.953125 | 80 | 0.629292 |
1c7cb45c7442b38574b791317b862b67910d6c04 | 15,219 | py | Python | xknx/devices/climate_mode.py | M-o-a-T/xknx | 0cf07a01a44c76478d916884437f3f4769a4ddd5 | [
"MIT"
] | null | null | null | xknx/devices/climate_mode.py | M-o-a-T/xknx | 0cf07a01a44c76478d916884437f3f4769a4ddd5 | [
"MIT"
] | null | null | null | xknx/devices/climate_mode.py | M-o-a-T/xknx | 0cf07a01a44c76478d916884437f3f4769a4ddd5 | [
"MIT"
] | null | null | null | """
Module for managing the climate mode.
Climate modes can be 'auto', 'comfort', 'standby', 'economy' or 'protection'.
"""
from xknx.dpt import (
DPTArray, DPTBinary, DPTControllerStatus, DPTHVACContrMode, DPTHVACMode,
HVACOperationMode)
from xknx.exceptions import CouldNotParseTelegram, DeviceIllegalValue
fr... | 53.588028 | 111 | 0.702674 |
1c7cc5df1b8c001b1cc253577293d7685b153ba5 | 471 | py | Python | auv_control_pi/management/commands/runrc.py | adrienemery/auv-control-pi | 633fe89b652b07eb6ebe03c0550daa211b122297 | [
"MIT"
] | 9 | 2016-10-02T06:59:37.000Z | 2020-09-24T15:36:10.000Z | auv_control_pi/management/commands/runrc.py | adrienemery/auv-control-pi | 633fe89b652b07eb6ebe03c0550daa211b122297 | [
"MIT"
] | null | null | null | auv_control_pi/management/commands/runrc.py | adrienemery/auv-control-pi | 633fe89b652b07eb6ebe03c0550daa211b122297 | [
"MIT"
] | 4 | 2019-01-12T23:09:34.000Z | 2020-11-05T14:52:42.000Z | import logging
from autobahn.asyncio.component import Component, run
from django.core.management.base import BaseCommand
from auv_control_pi.components.rc_controller import RCControler
logging.basicConfig(level=logging.INFO)
class Command(BaseCommand):
def handle(self, *args, **options):
comp = Compone... | 24.789474 | 63 | 0.692144 |
1c7cc63140439536b64f98b1b043a5c20a324e4d | 11,967 | py | Python | appengine/components/components/prpc/server.py | stefb965/luci-py | e0a8a5640c4104e5c90781d833168aa8a8d1f24d | [
"Apache-2.0"
] | null | null | null | appengine/components/components/prpc/server.py | stefb965/luci-py | e0a8a5640c4104e5c90781d833168aa8a8d1f24d | [
"Apache-2.0"
] | null | null | null | appengine/components/components/prpc/server.py | stefb965/luci-py | e0a8a5640c4104e5c90781d833168aa8a8d1f24d | [
"Apache-2.0"
] | 1 | 2020-07-05T19:54:40.000Z | 2020-07-05T19:54:40.000Z | # Copyright 2017 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
"""A stripped-down implementation of the gRPC interface for Python on AppEngine.
The Server class itself also provides the bulk of the implementa... | 37.870253 | 80 | 0.684549 |
1c7cc9887820e72a1bd5a9abe85e1094770fb3e2 | 5,868 | py | Python | samples/old/main.py | cair/deep-rts | 7aa5dde0c5df10ae3a3d057e7b89641aec58e115 | [
"MIT"
] | 144 | 2018-07-13T07:47:50.000Z | 2022-03-31T06:29:50.000Z | samples/old/main.py | cair/DeepRTS | 2ea4de0993ea0ca2677fdb36a172779db4ce7868 | [
"MIT"
] | 18 | 2019-03-29T10:37:01.000Z | 2022-03-02T12:47:34.000Z | samples/old/main.py | cair/DeepRTS | 2ea4de0993ea0ca2677fdb36a172779db4ce7868 | [
"MIT"
] | 23 | 2018-11-02T18:12:51.000Z | 2022-02-15T20:32:18.000Z |
# Run setup.py install in sources/python to build source files.
from DeepRTS import Engine
print(Engine)
from DeepRTS.python import scenario
from DeepRTS.Engine import Random
import Scenarios
import Agents
import torch
import imageio
import os
from datetime import datetime
import pygame
# all actions:
action_name... | 25.624454 | 92 | 0.581288 |
1c7cf24ad99e714c78866739f61d224ae31554f9 | 102,324 | py | Python | vk-layer-generate.py | baldurk/Vulkan-LoaderAndValidationLayers | 025e5113963305eff75601c96eac61d2c5b57e3c | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2021-08-10T01:02:30.000Z | 2021-08-10T01:02:30.000Z | vk-layer-generate.py | baldurk/Vulkan-LoaderAndValidationLayers | 025e5113963305eff75601c96eac61d2c5b57e3c | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | vk-layer-generate.py | baldurk/Vulkan-LoaderAndValidationLayers | 025e5113963305eff75601c96eac61d2c5b57e3c | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2021-08-10T01:02:31.000Z | 2021-08-10T01:02:31.000Z | #!/usr/bin/env python3
#
# VK
#
# Copyright (c) 2015-2016 The Khronos Group Inc.
# Copyright (c) 2015-2016 Valve Corporation
# Copyright (c) 2015-2016 LunarG, Inc.
# Copyright (c) 2015-2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance w... | 58.072645 | 275 | 0.546538 |
1c7cfba9634d0156ba0d7173019bba07ab6b0a4a | 1,655 | py | Python | opentelemetry-api/src/opentelemetry/context/context.py | ThePumpingLemma/opentelemetry-python | 9ed98eb9320b9064e43c3b43ee7c4990eec3657a | [
"Apache-2.0"
] | null | null | null | opentelemetry-api/src/opentelemetry/context/context.py | ThePumpingLemma/opentelemetry-python | 9ed98eb9320b9064e43c3b43ee7c4990eec3657a | [
"Apache-2.0"
] | null | null | null | opentelemetry-api/src/opentelemetry/context/context.py | ThePumpingLemma/opentelemetry-python | 9ed98eb9320b9064e43c3b43ee7c4990eec3657a | [
"Apache-2.0"
] | null | null | null | # Copyright 2020, OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 30.648148 | 74 | 0.692447 |
1c7d037d99eac3e6bd64d0442ffd354f7b7518ab | 717 | py | Python | setup.py | 5teffen/ViCE | 3652a4d74d50c6ffdf3a239cb00eb5799ec7b63d | [
"MIT"
] | 8 | 2020-03-07T11:48:36.000Z | 2022-03-20T23:57:43.000Z | setup.py | nyuvis/ViCE | 3652a4d74d50c6ffdf3a239cb00eb5799ec7b63d | [
"MIT"
] | 25 | 2020-02-08T11:02:42.000Z | 2020-04-21T09:52:02.000Z | setup.py | nyuvis/ViCE | 3652a4d74d50c6ffdf3a239cb00eb5799ec7b63d | [
"MIT"
] | 5 | 2020-04-22T07:11:26.000Z | 2022-03-19T21:23:10.000Z | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="ViCE-pkg-nyuvis", # Replace with your own username
version="0.0.1",
author="Steffen Holter",
author_email="steffen.holter@nyu.edu",
description="Visual Counterfactual Explanations for Mach... | 32.590909 | 81 | 0.67643 |
1c7d27b4a681db0139a5b0f43bf8f1d443d996f6 | 6,320 | py | Python | reana_server/config.py | holzman/reana-server | f0d55e16ba01ae4e4ca53b823eaa56d6bd2572aa | [
"MIT"
] | null | null | null | reana_server/config.py | holzman/reana-server | f0d55e16ba01ae4e4ca53b823eaa56d6bd2572aa | [
"MIT"
] | null | null | null | reana_server/config.py | holzman/reana-server | f0d55e16ba01ae4e4ca53b823eaa56d6bd2572aa | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# This file is part of REANA.
# Copyright (C) 2017, 2018 CERN.
#
# REANA is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Flask application configuration."""
import copy
import os
from distutils.util impor... | 33.617021 | 96 | 0.762975 |
1c7d3185618fb33f698dc0bf990201aacdead595 | 793 | py | Python | kpiit/factory.py | lnielsen/kpiit | a48c1c2ff807aa63b04b776d010f7e6da9cfc2e0 | [
"MIT"
] | null | null | null | kpiit/factory.py | lnielsen/kpiit | a48c1c2ff807aa63b04b776d010f7e6da9cfc2e0 | [
"MIT"
] | 11 | 2018-07-05T09:44:46.000Z | 2019-08-26T08:57:39.000Z | kpiit/factory.py | lnielsen/kpiit | a48c1c2ff807aa63b04b776d010f7e6da9cfc2e0 | [
"MIT"
] | 2 | 2018-06-25T13:49:32.000Z | 2018-09-14T10:01:41.000Z | # -*- coding: utf-8 -*-
#
# Copyright (C) 2018 CERN.
#
# KPIit is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Celery application."""
from celery import Celery
def create_app(config_module=None, **kwargs):
"""Celery applicati... | 23.323529 | 72 | 0.688525 |
1c7d5c39a62754649f91a9a95d94f1c2da773ffa | 8,951 | py | Python | scripts/create_label_image_from_raw.py | m-novikov/hytra | 0dc28deaa2571fa8bea63ca178f0e53cc1cd7508 | [
"MIT"
] | null | null | null | scripts/create_label_image_from_raw.py | m-novikov/hytra | 0dc28deaa2571fa8bea63ca178f0e53cc1cd7508 | [
"MIT"
] | null | null | null | scripts/create_label_image_from_raw.py | m-novikov/hytra | 0dc28deaa2571fa8bea63ca178f0e53cc1cd7508 | [
"MIT"
] | null | null | null | # pythonpath modification to make hytra available
# for import without requiring it to be installed
import os
import sys
sys.path.insert(0, os.path.abspath('..'))
# standard imports
import h5py
import vigra
from vigra import numpy as np
import configargparse as argparse
import hytra.util.axesconversion
from hytra.util... | 48.912568 | 140 | 0.634566 |
1c7d63813e24c393ddd7ad726d46a1328781ec68 | 3,626 | py | Python | ote_cli/ote_cli/registry/registry.py | ntyukaev/training_extensions | c897d42e50828fea853ceda0795e1f0e7d6e9909 | [
"Apache-2.0"
] | null | null | null | ote_cli/ote_cli/registry/registry.py | ntyukaev/training_extensions | c897d42e50828fea853ceda0795e1f0e7d6e9909 | [
"Apache-2.0"
] | null | null | null | ote_cli/ote_cli/registry/registry.py | ntyukaev/training_extensions | c897d42e50828fea853ceda0795e1f0e7d6e9909 | [
"Apache-2.0"
] | 1 | 2020-12-13T22:13:51.000Z | 2020-12-13T22:13:51.000Z | """
Model templates registry.
"""
# 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
#
# Unless required by... | 31.258621 | 106 | 0.623276 |
1c7d81e6b536433fc1a30f009690891ba33e9607 | 5,294 | py | Python | alchemist_lib/datafeed/__init__.py | Dodo33/alchemist-lib | 40c2d3b48d5f46315eb09e7f572d578b7e5324b4 | [
"MIT"
] | 5 | 2018-07-11T05:38:51.000Z | 2021-12-19T03:06:51.000Z | alchemist_lib/datafeed/__init__.py | Dodo33/alchemist-lib | 40c2d3b48d5f46315eb09e7f572d578b7e5324b4 | [
"MIT"
] | null | null | null | alchemist_lib/datafeed/__init__.py | Dodo33/alchemist-lib | 40c2d3b48d5f46315eb09e7f572d578b7e5324b4 | [
"MIT"
] | 2 | 2019-07-12T08:51:11.000Z | 2021-09-29T22:22:46.000Z | import datetime as dt
import pandas as pd
from .poloniexdatafeed import PoloniexDataFeed
from .bittrexdatafeed import BittrexDataFeed
from ..database.ohlcv import Ohlcv
from .. import utils
def get_data_sources_dict(session):
"""
Remember to change this method every time you add a module.
Args:
... | 29.248619 | 173 | 0.642425 |
1c7d8f6195a5ff2e0495662fefac859619f1189a | 944 | py | Python | tests/serenity/tickstore/test_journal.py | vishalbelsare/serenity | ab5788741ee04d042c1d5adaf6c2a3ade35d9c7c | [
"Apache-2.0"
] | 1 | 2020-09-12T19:03:23.000Z | 2020-09-12T19:03:23.000Z | tests/serenity/tickstore/test_journal.py | vishalbelsare/serenity | ab5788741ee04d042c1d5adaf6c2a3ade35d9c7c | [
"Apache-2.0"
] | null | null | null | tests/serenity/tickstore/test_journal.py | vishalbelsare/serenity | ab5788741ee04d042c1d5adaf6c2a3ade35d9c7c | [
"Apache-2.0"
] | 2 | 2021-09-23T10:42:14.000Z | 2021-10-18T18:28:15.000Z | import datetime
import shutil
from serenity.tickstore.journal import Journal
from pathlib import Path
def test_journal():
journal = Journal(Path('tmp'))
appender = journal.create_appender()
for i in range(0, 1000):
appender.write_string('BTC-USD')
appender.write_int(77571114)
app... | 26.222222 | 69 | 0.662076 |
1c7d9692e998823d9e595cf97ce2762dfd66c902 | 4,310 | py | Python | lib/sprites/base.py | codypiersall/platformer | 47651821b40a12f64d8b39ec2321d4931501385a | [
"BSD-3-Clause"
] | null | null | null | lib/sprites/base.py | codypiersall/platformer | 47651821b40a12f64d8b39ec2321d4931501385a | [
"BSD-3-Clause"
] | null | null | null | lib/sprites/base.py | codypiersall/platformer | 47651821b40a12f64d8b39ec2321d4931501385a | [
"BSD-3-Clause"
] | null | null | null | from __future__ import division
import pygame
import re
SUPPORTED_IMAGE_FORMATS = '((gif)|(png))'
WALK_IMAGE_FILE_PATTERN = re.compile(r'walk-[0-9][0-9]\.' + SUPPORTED_IMAGE_FORMATS)
JUMP_IMAGE_FILE_PATTERN = re.compile(r'jump-[0-9][0-9]\.' + SUPPORTED_IMAGE_FORMATS)
WEAPON_FILE_PATTERN = re.compile(r'weapon\... | 39.907407 | 97 | 0.582135 |
1c7db76a4ece8cb3d076336aa18fe87bd8e7d360 | 3,304 | py | Python | Leetcode/Construct Binary Tree from Preorder and Inorder Traversal/construct_tree.py | vedant-jad99/GeeksForGeeks-DSA-Workshop-Complete-Codes | 35cee8317c05b36864a992789c741554205b3919 | [
"MIT"
] | 1 | 2021-02-11T14:54:34.000Z | 2021-02-11T14:54:34.000Z | Leetcode/Construct Binary Tree from Preorder and Inorder Traversal/construct_tree.py | vedant-jad99/GeeksForGeeks-DSA-Workshop-Complete-Codes | 35cee8317c05b36864a992789c741554205b3919 | [
"MIT"
] | null | null | null | Leetcode/Construct Binary Tree from Preorder and Inorder Traversal/construct_tree.py | vedant-jad99/GeeksForGeeks-DSA-Workshop-Complete-Codes | 35cee8317c05b36864a992789c741554205b3919 | [
"MIT"
] | null | null | null | """
Given two integer arrays preorder and inorder where preorder is the preorder traversal of a binary tree and inorder is the inorder traversal of the same tree, construct and return
the binary tree.
Example:
Input - preorder = [3,9,20,15,7], inorder = [9,3,15,20,7]
Output - [3,9,20,null,null,15,7]
... | 30.592593 | 179 | 0.523608 |
1c7dc9209ab007705b2ab47eab6dd490190263c9 | 8,518 | py | Python | fedot/core/operations/evaluation/operation_implementations/data_operations/decompose.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | 358 | 2020-06-11T09:34:53.000Z | 2022-03-31T12:56:22.000Z | fedot/core/operations/evaluation/operation_implementations/data_operations/decompose.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | 467 | 2020-06-11T13:49:45.000Z | 2022-03-31T14:19:48.000Z | fedot/core/operations/evaluation/operation_implementations/data_operations/decompose.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | 48 | 2020-07-13T14:50:45.000Z | 2022-03-26T09:37:13.000Z | from typing import Optional
import numpy as np
from sklearn.preprocessing import OneHotEncoder
from fedot.core.operations.evaluation.operation_implementations. \
implementation_interfaces import DataOperationImplementation
from fedot.core.repository.tasks import Task, TaskTypesEnum
class DecomposerImplementatio... | 39.253456 | 107 | 0.666706 |
1c7ddd8b6e6fffe8965e6594546437e04f6f8646 | 1,155 | py | Python | mess_io/tests/test__write_montecarlo.py | sjklipp/interfaces | 646673ac125c4b48e69a64025a36abd1b2ace696 | [
"Apache-2.0"
] | null | null | null | mess_io/tests/test__write_montecarlo.py | sjklipp/interfaces | 646673ac125c4b48e69a64025a36abd1b2ace696 | [
"Apache-2.0"
] | null | null | null | mess_io/tests/test__write_montecarlo.py | sjklipp/interfaces | 646673ac125c4b48e69a64025a36abd1b2ace696 | [
"Apache-2.0"
] | null | null | null | """
Tests writing the input for a Monte Carlo sampling routine
"""
import mess_io
GEOM = (('C', (2.3369630270, 2.6603645819, -0.0002949975)),
('O', (4.9791531078, 2.6863483093, 0.0032931188)),
('H', (1.5983237149, 3.8235373073, -1.5858750908)),
('H', (1.5983208663, 3.3506042568, 1.8410631867)... | 26.860465 | 65 | 0.658874 |
1c7de530d95fec6889cab29a90e2bc71d934c633 | 38,056 | py | Python | quest/keras_wrapper/extra/evaluation.py | shuokabe/deepQuest-mod | 7140a57c30deedb0570bc835c6ad3c848f0039f4 | [
"BSD-3-Clause"
] | null | null | null | quest/keras_wrapper/extra/evaluation.py | shuokabe/deepQuest-mod | 7140a57c30deedb0570bc835c6ad3c848f0039f4 | [
"BSD-3-Clause"
] | null | null | null | quest/keras_wrapper/extra/evaluation.py | shuokabe/deepQuest-mod | 7140a57c30deedb0570bc835c6ad3c848f0039f4 | [
"BSD-3-Clause"
] | null | null | null | import json
import logging
import numpy as np
from localization_utilities import *
########################################
# EVALUATION FUNCTIONS SELECTOR
########################################
def get_coco_score(pred_list, verbose, extra_vars, split):
"""
COCO challenge metrics
:param pred_list: dic... | 36.733591 | 120 | 0.607499 |
1c7dff4e4eb380a9e1a7645cc3e28e59b0af04a0 | 6,043 | py | Python | python/phonenumbers/data/region_SE.py | Eyepea/python-phonenumbers | 0336e191fda80a21ed5c19d5e029ad8c70f620ee | [
"Apache-2.0"
] | 2 | 2019-03-30T02:12:54.000Z | 2021-03-08T18:59:40.000Z | python/phonenumbers/data/region_SE.py | Eyepea/python-phonenumbers | 0336e191fda80a21ed5c19d5e029ad8c70f620ee | [
"Apache-2.0"
] | null | null | null | python/phonenumbers/data/region_SE.py | Eyepea/python-phonenumbers | 0336e191fda80a21ed5c19d5e029ad8c70f620ee | [
"Apache-2.0"
] | 1 | 2018-11-10T03:47:34.000Z | 2018-11-10T03:47:34.000Z | """Auto-generated file, do not edit by hand. SE metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_SE = PhoneMetadata(id='SE', country_code=46, international_prefix='00',
general_desc=PhoneNumberDesc(national_number_pattern='[1-9]\\d{5,9}', possible_number_pattern='... | 151.075 | 745 | 0.599371 |
1c7e0ae3d200fd9011f075926d84d825757bbd26 | 15,228 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/aio/operations/_virtual_machine_images_edge_zone_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/aio/operations/_virtual_machine_images_edge_zone_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/aio/operations/_virtual_machine_images_edge_zone_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.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.
# Changes may ... | 42.655462 | 242 | 0.673299 |
1c7e10409dc4df65e3df7d483ac554734ba1d784 | 1,743 | py | Python | taro/listening/__init__.py | PetrSixta/taro | afe0caf0e0feb6948c4cc80217b5c5d11418859b | [
"MIT"
] | null | null | null | taro/listening/__init__.py | PetrSixta/taro | afe0caf0e0feb6948c4cc80217b5c5d11418859b | [
"MIT"
] | null | null | null | taro/listening/__init__.py | PetrSixta/taro | afe0caf0e0feb6948c4cc80217b5c5d11418859b | [
"MIT"
] | null | null | null | # Sender, Listening
import logging
from taro import util, dto
from taro.jobs.events import STATE_LISTENER_FILE_EXTENSION, OUTPUT_LISTENER_FILE_EXTENSION
from taro.jobs.job import ExecutionStateObserver
from taro.socket import SocketServer
log = logging.getLogger(__name__)
def _listener_socket_name(ext):
return... | 32.886792 | 90 | 0.67642 |
1c7e1e42e0807ddfcb66710fb7d415fc0fb4967b | 1,222 | py | Python | scripts/check_copyright.py | jmetzz/GpxTrackPoster | dd82482435a9b6e071a0e7dcdcf48b2691718194 | [
"MIT"
] | 262 | 2016-01-10T17:01:00.000Z | 2022-03-29T09:16:16.000Z | scripts/check_copyright.py | yihong0618/GpxTrackPoster | 8e6038927b37fc4d527c032e4acb00a4de778a84 | [
"MIT"
] | 75 | 2016-01-10T20:23:42.000Z | 2022-01-10T10:59:18.000Z | scripts/check_copyright.py | yihong0618/GpxTrackPoster | 8e6038927b37fc4d527c032e4acb00a4de778a84 | [
"MIT"
] | 53 | 2017-01-04T21:12:06.000Z | 2022-01-31T02:39:41.000Z | #!/usr/bin/env python
# Copyright 2018-2021 Florian Pigorsch & Contributors. All rights reserved.
#
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file.
import datetime
import re
import sys
def has_valid_copyright(file_name: str) -> bool:
re_copyright = re.compil... | 26 | 82 | 0.634206 |
1c7e282ba4cba83deb6863e0c4e3b9fc1d184846 | 3,117 | py | Python | venv/Lib/site-packages/pyrogram/raw/types/account/password_settings.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/types/account/password_settings.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/types/account/password_settings.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 35.827586 | 123 | 0.634264 |
1c7e63a7eaa7ab71148b2eb660c0bd89cff560db | 3,707 | py | Python | test_geo.py | TK594/IA-flood-risk-project | 17902a255d1e76b4085760d5ab655aa5dce762dc | [
"MIT"
] | null | null | null | test_geo.py | TK594/IA-flood-risk-project | 17902a255d1e76b4085760d5ab655aa5dce762dc | [
"MIT"
] | null | null | null | test_geo.py | TK594/IA-flood-risk-project | 17902a255d1e76b4085760d5ab655aa5dce762dc | [
"MIT"
] | null | null | null | from floodsystem.geo import stations_by_distance, stations_within_radius, rivers_with_station, stations_by_river, rivers_by_station_number
from floodsystem.station import *
from floodsystem.stationdata import build_station_list
def test_stations_by_distance():
station_A = MonitoringStation('ID A', 'Measurement ID ... | 50.094595 | 150 | 0.655247 |
1c7e779e9ce55eff49e14e923abcbe86181d3140 | 833 | py | Python | solutions/number-of-provinces.py | edab/-LC_StudyPlan_Python | e065f0ced68d23800d7b5001102c2e930ee35e23 | [
"MIT"
] | null | null | null | solutions/number-of-provinces.py | edab/-LC_StudyPlan_Python | e065f0ced68d23800d7b5001102c2e930ee35e23 | [
"MIT"
] | 1 | 2022-02-22T15:42:54.000Z | 2022-02-25T00:10:04.000Z | solutions/number-of-provinces.py | edab/-LC_StudyPlan_Python | e065f0ced68d23800d7b5001102c2e930ee35e23 | [
"MIT"
] | null | null | null | # Leetcode 547. Number of Provinces
#
# Link: https://leetcode.com/problems/number-of-provinces/
# Difficulty: Medium
# Solution using DFS and visited set.
# Complexity:
# O(N) time | where N represent the number of cities
# O(N) space | where N represent the number of cities
class Solution:
def findCircleNum(... | 28.724138 | 79 | 0.605042 |
1c7e85737028f4136511f4c8ad45f48f4ece64c0 | 3,935 | py | Python | docs/examples/use_cases/paddle/tsm/infer.py | ancientmooner/DALI | 355e8db8130cee0d20e9ae3d698f195278544995 | [
"ECL-2.0",
"Apache-2.0"
] | 11 | 2021-03-16T05:09:16.000Z | 2022-03-29T12:48:44.000Z | docs/examples/use_cases/paddle/tsm/infer.py | ancientmooner/DALI | 355e8db8130cee0d20e9ae3d698f195278544995 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | docs/examples/use_cases/paddle/tsm/infer.py | ancientmooner/DALI | 355e8db8130cee0d20e9ae3d698f195278544995 | [
"ECL-2.0",
"Apache-2.0"
] | 3 | 2021-05-08T16:51:55.000Z | 2021-07-22T09:02:44.000Z | # Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
# Copyright (c) 2017-2019, 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
#
# htt... | 34.217391 | 95 | 0.678526 |
1c7eb1fb54337af18aefafa852b2312bf128da19 | 3,981 | py | Python | archive/metafeature_extraction/meta_get_features.py | tueimage/meta-segmentation-msc-2018 | d497e6ea99b89fdb54e11568452894f022269043 | [
"MIT"
] | 3 | 2019-07-16T12:31:38.000Z | 2020-07-22T17:03:53.000Z | archive/metafeature_extraction/meta_get_features.py | tueimage/meta-segmentation-msc-2018 | d497e6ea99b89fdb54e11568452894f022269043 | [
"MIT"
] | null | null | null | archive/metafeature_extraction/meta_get_features.py | tueimage/meta-segmentation-msc-2018 | d497e6ea99b89fdb54e11568452894f022269043 | [
"MIT"
] | 1 | 2020-12-10T12:56:06.000Z | 2020-12-10T12:56:06.000Z | from MetaFeatureExtraction import MetaFeatureExtraction
from tqdm import tqdm
import numpy as np
import os
from keras.applications.vgg19 import VGG19
from keras.models import Model, model_from_json
from networks import EncoderDecoderNetwork
from keras.applications.mobilenet import relu6
os.environ["CUDA_VISIBLE_DEVICES... | 63.190476 | 327 | 0.6526 |
1c7eee4941f31fa274b73568325165038e7d5240 | 496 | py | Python | skynet/full_node/signage_point.py | hulatang/skynet-blockchain | d7d6f7ec84731c13b9d6d307bb171cf0e266be82 | [
"Apache-2.0"
] | 7 | 2021-09-07T02:14:15.000Z | 2022-03-27T06:42:35.000Z | skynet/full_node/signage_point.py | hulatang/skynet-blockchain | d7d6f7ec84731c13b9d6d307bb171cf0e266be82 | [
"Apache-2.0"
] | 1 | 2021-10-21T16:38:56.000Z | 2021-11-15T13:03:15.000Z | skynet/full_node/signage_point.py | hulatang/skynet-blockchain | d7d6f7ec84731c13b9d6d307bb171cf0e266be82 | [
"Apache-2.0"
] | 3 | 2021-10-21T07:17:40.000Z | 2022-03-16T12:57:09.000Z | from dataclasses import dataclass
from typing import Optional
from skynet.types.blockchain_format.sized_bytes import bytes32
from skynet.types.blockchain_format.vdf import VDFInfo, VDFProof
from skynet.util.streamable import Streamable, streamable
@dataclass(frozen=True)
@streamable
class SignagePoint(Streamable):
... | 29.176471 | 64 | 0.814516 |
1c7f05190a4175ceee8585a15f2b977a84d7098c | 17,433 | py | Python | python/pyspark/pandas/data_type_ops/num_ops.py | eejbyfeldt/spark | 5edbbd1711402735623fa1fc9b86ff41c28996e9 | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2021-07-12T10:39:09.000Z | 2021-07-12T10:39:09.000Z | python/pyspark/pandas/data_type_ops/num_ops.py | eejbyfeldt/spark | 5edbbd1711402735623fa1fc9b86ff41c28996e9 | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | python/pyspark/pandas/data_type_ops/num_ops.py | eejbyfeldt/spark | 5edbbd1711402735623fa1fc9b86ff41c28996e9 | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 42.210654 | 98 | 0.666953 |
1c7f6998a96bd747eabc59c11e3b6983ef7190e4 | 15,038 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/operations/_virtual_machine_scale_set_rolling_upgrades_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/operations/_virtual_machine_scale_set_rolling_upgrades_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/operations/_virtual_machine_scale_set_rolling_upgrades_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.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.
# Changes may ... | 47.739683 | 220 | 0.693776 |
1c7f6f651069ac6976715669de94b2f357b5b9d8 | 3,021 | py | Python | integration-tests/integration_tests/models/post_body_multipart_multipart_data.py | JamesHinshelwood/openapi-python-client | 08bc2acf91d50d4fcdd7f0e50a8b0d3f00a187d9 | [
"MIT"
] | 1 | 2022-02-17T11:45:13.000Z | 2022-02-17T11:45:13.000Z | integration-tests/integration_tests/models/post_body_multipart_multipart_data.py | guioliveirabh/openapi-python-client | d8d9cecffe41c5dc1c43bc667598b90f0d9253ca | [
"MIT"
] | null | null | null | integration-tests/integration_tests/models/post_body_multipart_multipart_data.py | guioliveirabh/openapi-python-client | d8d9cecffe41c5dc1c43bc667598b90f0d9253ca | [
"MIT"
] | null | null | null | from io import BytesIO
from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from ..types import UNSET, File, Unset
T = TypeVar("T", bound="PostBodyMultipartMultipartData")
@attr.s(auto_attribs=True)
class PostBodyMultipartMultipartData:
"""
Attributes:
a_string (str):
file (... | 28.771429 | 118 | 0.599139 |
1c7f7c1c68d8d6cb6b971c840ad4bb679f8ba5e9 | 3,456 | py | Python | Quantize/Quantizers.py | stevenygd/TensorQuant-Experiment | f084b57c22a3c2d4fa49d77b56a35e9017149789 | [
"Apache-2.0"
] | null | null | null | Quantize/Quantizers.py | stevenygd/TensorQuant-Experiment | f084b57c22a3c2d4fa49d77b56a35e9017149789 | [
"Apache-2.0"
] | null | null | null | Quantize/Quantizers.py | stevenygd/TensorQuant-Experiment | f084b57c22a3c2d4fa49d77b56a35e9017149789 | [
"Apache-2.0"
] | null | null | null | from Quantize import FixedPoint
from Quantize import QuantKernelWrapper as Wrapped
import tensorflow as tf
class Quantizer_if():
"""Interface for quantizer classes"""
def quantize(self,tensor):
raise NotImplementedError
###############################
### Fixed Point
###############################
... | 34.56 | 85 | 0.648148 |
1c7f8ec770d2a51d3cd00add0636c4fe95f87173 | 13,474 | py | Python | src/SpeakClass/scripts/rebuild_lib_SpeakClass.py | xylsxyls/xueyelingshuan | 61eb1c7c4f76c3eaf4cf26e4b2b37b6ed2abc5b9 | [
"MIT"
] | 3 | 2019-11-26T05:33:47.000Z | 2020-05-18T06:49:41.000Z | src/SpeakClass/scripts/rebuild_lib_SpeakClass.py | xylsxyls/xueyelingshuan | 61eb1c7c4f76c3eaf4cf26e4b2b37b6ed2abc5b9 | [
"MIT"
] | null | null | null | src/SpeakClass/scripts/rebuild_lib_SpeakClass.py | xylsxyls/xueyelingshuan | 61eb1c7c4f76c3eaf4cf26e4b2b37b6ed2abc5b9 | [
"MIT"
] | 1 | 2020-06-03T03:27:27.000Z | 2020-06-03T03:27:27.000Z | #!python3
# -*- coding:utf-8 -*-
import os
import sys
import time
import ctypes
import shutil
import subprocess
IsPy3 = sys.version_info[0] >= 3
if IsPy3:
import winreg
else:
import codecs
import _winreg as winreg
BuildType = 'Release'
IsRebuild = True
Build = 'Rebuild'
Update = False
C... | 39.282799 | 178 | 0.582678 |
1c7fa4ae9353ae587e365839581d65fab353ca56 | 27,769 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_10_01/_network_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_10_01/_network_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_10_01/_network_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"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 may ... | 79.567335 | 2,228 | 0.823436 |
1c7fc8839648cb797d672bf3894f8d325ede1f0c | 2,439 | py | Python | nanpack/backend/mesh_flatplate.py | vxsharma-14/DIFFUS | d70633890b8fb2e7b3dde918eb13b263f7a035ef | [
"MIT"
] | null | null | null | nanpack/backend/mesh_flatplate.py | vxsharma-14/DIFFUS | d70633890b8fb2e7b3dde918eb13b263f7a035ef | [
"MIT"
] | 2 | 2020-12-23T10:44:09.000Z | 2020-12-24T12:02:25.000Z | nanpack/backend/mesh_flatplate.py | vxsharma-14/DIFFUS | d70633890b8fb2e7b3dde918eb13b263f7a035ef | [
"MIT"
] | null | null | null | # ***********************************************************************
#
# FILE mesh_flatplate.py
#
# AUTHOR Dr. Vishal Sharma
#
# VERSION 1.0.0-alpha5
#
# WEBSITE https://github.com/vxsharma-14/project-NAnPack
#
# NAnPack Learner's Edition is distributed under the MIT L... | 39.33871 | 76 | 0.582206 |
1c7fd721e7a4636e0490537e278ac33d1374b804 | 5,195 | py | Python | super32emu/ui/main_window.py | xsjad0/Super32 | 75cf5828b17cdbce144447a69ff3d1be7ad601f2 | [
"BSD-3-Clause"
] | 1 | 2019-12-07T01:56:31.000Z | 2019-12-07T01:56:31.000Z | super32emu/ui/main_window.py | xsjad0/Super32 | 75cf5828b17cdbce144447a69ff3d1be7ad601f2 | [
"BSD-3-Clause"
] | 42 | 2019-11-30T12:57:07.000Z | 2020-02-26T16:30:33.000Z | super32emu/ui/main_window.py | xsjad0/Super32 | 75cf5828b17cdbce144447a69ff3d1be7ad601f2 | [
"BSD-3-Clause"
] | 4 | 2019-11-27T15:05:33.000Z | 2020-05-13T06:51:21.000Z | """python emulator"""
from PySide2.QtWidgets import QAction, QFileDialog, QMainWindow
from PySide2.QtGui import QIcon, Qt, QKeySequence
from PySide2.QtCore import Slot
from super32utils.inout.fileio import FileIO
from super32utils.inout.fileio import ResourceManager
from logic.emulator import Emulator
from .editor_widg... | 35.827586 | 96 | 0.622714 |
1c7ff1e23bd3aeeff89a69614e3253d0778c4016 | 13,808 | py | Python | tests/unit/fake_data_root/vault/var/lib/juju/agents/unit-vault-hacluster-0/charm/files/ocf/maas/maas_dns.py | KellenRenshaw/hotsos | e3fc51ab7f8af606a5846a3486a7fda23d761583 | [
"Apache-2.0"
] | 17 | 2016-07-07T23:39:17.000Z | 2020-05-06T14:03:54.000Z | tests/unit/fake_data_root/vault/var/lib/juju/agents/unit-vault-hacluster-0/charm/files/ocf/maas/maas_dns.py | KellenRenshaw/hotsos | e3fc51ab7f8af606a5846a3486a7fda23d761583 | [
"Apache-2.0"
] | 111 | 2021-10-01T18:18:17.000Z | 2022-03-29T12:23:20.000Z | tests/unit/fake_data_root/vault/var/lib/juju/agents/unit-vault-hacluster-0/charm/files/ocf/maas/maas_dns.py | KellenRenshaw/hotsos | e3fc51ab7f8af606a5846a3486a7fda23d761583 | [
"Apache-2.0"
] | 20 | 2016-11-03T04:04:09.000Z | 2021-01-04T20:40:43.000Z | #!/usr/bin/env python3
#
# Copyright 2016 Canonical Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 35.22449 | 79 | 0.592121 |
1c7ffb8754c85047753790c8f3d5196dedbcbe90 | 1,860 | py | Python | projects/model/Customfield.py | chamathshashika/projects-python-wrappers | 33e9f6bccba16a581b115c582033a93d43bb159c | [
"MIT"
] | null | null | null | projects/model/Customfield.py | chamathshashika/projects-python-wrappers | 33e9f6bccba16a581b115c582033a93d43bb159c | [
"MIT"
] | null | null | null | projects/model/Customfield.py | chamathshashika/projects-python-wrappers | 33e9f6bccba16a581b115c582033a93d43bb159c | [
"MIT"
] | null | null | null | #$Id$
class Customfield:
'''
Customfield object is used to create an object for the project custom field.
'''
def __init__(self):
'''
Initialize the parameters of the Customfield object.
'''
self.label_name = "";
self.column_name = "";
self.default_Value = "";
self.picklist_values = [];
de... | 16.460177 | 77 | 0.655914 |
1c800ce49c4371a474426ccc479b36eb8872ca88 | 1,983 | py | Python | api/utils/common.py | kkltcjk/kklt | 5388eb439616a442dde496ef77ba6b71169369e0 | [
"Apache-2.0"
] | null | null | null | api/utils/common.py | kkltcjk/kklt | 5388eb439616a442dde496ef77ba6b71169369e0 | [
"Apache-2.0"
] | null | null | null | api/utils/common.py | kkltcjk/kklt | 5388eb439616a442dde496ef77ba6b71169369e0 | [
"Apache-2.0"
] | null | null | null | ##############################################################################
# Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, ... | 26.797297 | 78 | 0.634897 |
1c801407494a2d1712c800ba7ccade4670314c98 | 1,035 | py | Python | chapter-6/project_template/urls.py | PacktPublishing/Real-time-Django | 07480a089fc0880d752d4ee5740ae6587de93aee | [
"MIT"
] | null | null | null | chapter-6/project_template/urls.py | PacktPublishing/Real-time-Django | 07480a089fc0880d752d4ee5740ae6587de93aee | [
"MIT"
] | null | null | null | chapter-6/project_template/urls.py | PacktPublishing/Real-time-Django | 07480a089fc0880d752d4ee5740ae6587de93aee | [
"MIT"
] | null | null | null | """project_template URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.0/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')
Cl... | 36.964286 | 77 | 0.703382 |
1c8034842a8c2493a8db494d86d875dc71bb1ef6 | 1,331 | py | Python | scripts/decompound_truecased.py | Simon-Will/neuralmonkey | b686a9d302cb10eda5fca991e1d7ee6b9e84b75a | [
"BSD-3-Clause"
] | 446 | 2016-06-16T11:31:12.000Z | 2021-12-04T04:19:26.000Z | scripts/decompound_truecased.py | Simon-Will/neuralmonkey | b686a9d302cb10eda5fca991e1d7ee6b9e84b75a | [
"BSD-3-Clause"
] | 673 | 2016-06-20T09:10:50.000Z | 2020-10-13T17:37:34.000Z | scripts/decompound_truecased.py | Simon-Will/neuralmonkey | b686a9d302cb10eda5fca991e1d7ee6b9e84b75a | [
"BSD-3-Clause"
] | 116 | 2016-06-16T18:23:13.000Z | 2021-02-06T06:45:20.000Z | #!/usr/bin/env python3
import sys
import codecs
import javabridge
from tokenize_data import get_decompounder
def main():
sys.stdin = codecs.getreader('utf-8')(sys.stdin)
sys.stdout = codecs.getwriter('utf-8')(sys.stdout)
sys.stderr = codecs.getwriter('utf-8')(sys.stderr)
try:
decompounder = ... | 30.953488 | 70 | 0.484598 |
1c803491191f97d8dc02cf587008784c50ef8638 | 2,742 | py | Python | main.py | GalAvineri/MelMedic | af9142d0fabd86b6c87a345a49dfb167b9765225 | [
"Apache-2.0"
] | 1 | 2019-03-01T21:49:07.000Z | 2019-03-01T21:49:07.000Z | main.py | GalAvineri/MelMedic | af9142d0fabd86b6c87a345a49dfb167b9765225 | [
"Apache-2.0"
] | 3 | 2018-10-26T14:35:25.000Z | 2019-04-20T14:25:09.000Z | main.py | GalAvineri/MelMedic | af9142d0fabd86b6c87a345a49dfb167b9765225 | [
"Apache-2.0"
] | null | null | null | from data.dataset import Dataset
from auxilleries import IO
from metrics import Precision, Recall, F1
from tensorflow import keras
from tensorflow.keras.applications.inception_v3 import InceptionV3
from tensorflow.keras.models import Model
from tensorflow.keras.layers import Dense, GlobalAveragePooling2D
from tensorfl... | 40.323529 | 119 | 0.774617 |
1c8091263b3af9741758223bd196e8415753695c | 11,285 | py | Python | business_register/converter/company_converters/company.py | Iva-khar/Data_converter | 9e991f479e2bf1c2ab430a9ad1be2da936ea139b | [
"MIT"
] | null | null | null | business_register/converter/company_converters/company.py | Iva-khar/Data_converter | 9e991f479e2bf1c2ab430a9ad1be2da936ea139b | [
"MIT"
] | null | null | null | business_register/converter/company_converters/company.py | Iva-khar/Data_converter | 9e991f479e2bf1c2ab430a9ad1be2da936ea139b | [
"MIT"
] | null | null | null | from business_register.converter.business_converter import BusinessConverter
from business_register.models.company_models import CompanyType
from data_ocean.postman import send_plain_mail
from django.core.mail import send_mail
from django.conf import settings
class CompanyConverter(BusinessConverter):
def __init_... | 60.347594 | 99 | 0.631724 |
1c80a1110091cffc1d0fcd80b9d0adee425b9a9e | 10,157 | py | Python | jina/clients/mixin.py | gauribhutani/jina | e1e23643f8260e6917d9704b63edc54bcebbc7e9 | [
"Apache-2.0"
] | null | null | null | jina/clients/mixin.py | gauribhutani/jina | e1e23643f8260e6917d9704b63edc54bcebbc7e9 | [
"Apache-2.0"
] | null | null | null | jina/clients/mixin.py | gauribhutani/jina | e1e23643f8260e6917d9704b63edc54bcebbc7e9 | [
"Apache-2.0"
] | null | null | null | import warnings
from functools import partialmethod, wraps
from inspect import signature
from typing import TYPE_CHECKING, AsyncGenerator, Dict, List, Optional, Union
from jina.helper import get_or_reuse_loop, run_async
from jina.importer import ImportExtensions
if TYPE_CHECKING:
from jina import DocumentArray
... | 40.791165 | 196 | 0.640347 |
1c80a4898aefee75b5aa0b7aa8088020b4c308df | 20,116 | py | Python | kadi/commands/observations.py | jzuhone/kadi | de4885327d256e156cfe42b2b1700775f5b4d6cf | [
"BSD-3-Clause"
] | null | null | null | kadi/commands/observations.py | jzuhone/kadi | de4885327d256e156cfe42b2b1700775f5b4d6cf | [
"BSD-3-Clause"
] | null | null | null | kadi/commands/observations.py | jzuhone/kadi | de4885327d256e156cfe42b2b1700775f5b4d6cf | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import os
from collections import defaultdict
import logging
from pathlib import Path
import numpy as np
from cxotime import CxoTime
import astropy.units as u
from astropy.table import Table, unique as table_unique
# kadi.commands.commands_v2 is also a d... | 39.212476 | 93 | 0.618016 |
1c80ba98fb27d3deac5844fc5007a60d94a4c4ba | 390 | py | Python | chapter11-iface-abc/drum.py | cgDeepLearn/fluentpython | ff89ad5a7da59c71f57b6392c9f5d5c6178e0475 | [
"MIT"
] | 1 | 2019-11-23T05:57:02.000Z | 2019-11-23T05:57:02.000Z | chapter11-iface-abc/drum.py | cgDeepLearn/fluentpython | ff89ad5a7da59c71f57b6392c9f5d5c6178e0475 | [
"MIT"
] | null | null | null | chapter11-iface-abc/drum.py | cgDeepLearn/fluentpython | ff89ad5a7da59c71f57b6392c9f5d5c6178e0475 | [
"MIT"
] | 1 | 2019-11-23T05:57:43.000Z | 2019-11-23T05:57:43.000Z | # -*-coding: utf-8 -*-
"""
drum.py
TumblingDrum是Tombola的子类
"""
from random import shuffle
from tombola import Tombola
class TumblingDrum(Tombola):
def __init__(self, iterable):
self._balls = []
self.load(iterable)
def load(self, iterable):
self._balls.extend(iterable)
shuff... | 16.25 | 36 | 0.638462 |
1c80ed949d52df7fe4033e6924a31ead0815a158 | 682 | py | Python | var/spack/repos/builtin/packages/py-magic/package.py | lguyot/spack | e910c227a7bac3adf2c18fc86cf994811b7d14f7 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/py-magic/package.py | lguyot/spack | e910c227a7bac3adf2c18fc86cf994811b7d14f7 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/py-magic/package.py | lguyot/spack | e910c227a7bac3adf2c18fc86cf994811b7d14f7 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | ##############################################################################
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyMagic(PythonPa... | 35.894737 | 96 | 0.643695 |
1c8113b446654ce3f4d63eeb82fa2a0cc6f5d49c | 4,456 | py | Python | dsr/dsr/utils.py | lacava/deep-symbolic-regression | d7b98b943740405724c2a9860c4b1ec5d6a532f3 | [
"BSD-3-Clause"
] | null | null | null | dsr/dsr/utils.py | lacava/deep-symbolic-regression | d7b98b943740405724c2a9860c4b1ec5d6a532f3 | [
"BSD-3-Clause"
] | null | null | null | dsr/dsr/utils.py | lacava/deep-symbolic-regression | d7b98b943740405724c2a9860c4b1ec5d6a532f3 | [
"BSD-3-Clause"
] | null | null | null | """Utility functions used in deep symbolic regression."""
import os
import functools
import numpy as np
def is_float(s):
"""Determine whether str can be cast to float."""
try:
float(s)
return True
except ValueError:
return False
# Adapted from: https://stackoverflow.com/questio... | 28.748387 | 111 | 0.614228 |
1c8143c24c6159c565c70085f2f5088f96e18e59 | 2,789 | py | Python | tests/common/test_run/gather_nd_run.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | tests/common/test_run/gather_nd_run.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | tests/common/test_run/gather_nd_run.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 30 | 2020-07-17T01:04:14.000Z | 2021-12-27T14:05:19.000Z | # Copyright 2020-2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | 39.842857 | 109 | 0.709215 |
1c815303656d9778536a835fc41c08524d3d303b | 3,637 | py | Python | flask_user/decorators.py | brunoresende1991/mult | e62e949a021db92ca74a9023423724ab26b583d7 | [
"BSD-2-Clause"
] | 5 | 2019-07-09T13:48:18.000Z | 2021-05-04T19:19:25.000Z | flask_user/decorators.py | brunoresende1991/mult | e62e949a021db92ca74a9023423724ab26b583d7 | [
"BSD-2-Clause"
] | null | null | null | flask_user/decorators.py | brunoresende1991/mult | e62e949a021db92ca74a9023423724ab26b583d7 | [
"BSD-2-Clause"
] | 2 | 2020-07-10T15:06:05.000Z | 2020-09-08T15:52:51.000Z | # -*- coding: utf-8 -*-
""" This file implements Flask-User decorators: @login_required, @confirm_email_required and @roles_required.
:copyright: (c) 2013 by Ling Thio
:author: Ling Thio (ling.thio@gmail.com)
:license: Simplified BSD License, see LICENSE.txt for more details."""
from functools import wrap... | 37.494845 | 109 | 0.672807 |
1c81678d01c37435d6d3555e36ddd44fa6eaa7e0 | 1,866 | py | Python | old1/selfish_dns_server.py | strickyak/aphid | 12469858facdc9d7f110bf6c895e58eae9fb728f | [
"MIT"
] | 2 | 2015-05-25T10:47:30.000Z | 2017-12-12T18:15:00.000Z | old1/selfish_dns_server.py | strickyak/aphid | 12469858facdc9d7f110bf6c895e58eae9fb728f | [
"MIT"
] | null | null | null | old1/selfish_dns_server.py | strickyak/aphid | 12469858facdc9d7f110bf6c895e58eae9fb728f | [
"MIT"
] | null | null | null | from go import net
from go import strings
from . import flag
from . import hexdump
BUFLEN = 512
ONE_Q_ONE_A = [0, 1, 0, 1, 0, 0, 0, 0]
LEN_ONE_Q_ONE_A = len(ONE_Q_ONE_A)
def ServeAnswerOnPort(answer, p):
quad = [int(s) for s in strings.Split(answer, '.')]
must 4 == len(quad)
bind = go_new(net.UDPAddr)
bind.P... | 25.916667 | 80 | 0.575027 |
1c81a98c5c06cb62eeb329648049f46af13255c4 | 10,165 | py | Python | saleor/graphql/product/schema.py | acabezasg/inka2 | ea95b9de8ec211245f423423d1378ace7c00194a | [
"BSD-3-Clause"
] | 1 | 2019-04-15T09:37:26.000Z | 2019-04-15T09:37:26.000Z | saleor/graphql/product/schema.py | acabezasg/inka2 | ea95b9de8ec211245f423423d1378ace7c00194a | [
"BSD-3-Clause"
] | null | null | null | saleor/graphql/product/schema.py | acabezasg/inka2 | ea95b9de8ec211245f423423d1378ace7c00194a | [
"BSD-3-Clause"
] | null | null | null | from textwrap import dedent
import graphene
from graphql_jwt.decorators import permission_required
from ..core.enums import ReportingPeriod
from ..core.fields import PrefetchingConnectionField
from ..descriptions import DESCRIPTIONS
from ..translations.mutations import (
AttributeTranslate, AttributeValueTranslat... | 45.379464 | 79 | 0.742351 |
1c81c747736380d6ea2a36d46bd77498c067e601 | 15,580 | py | Python | tutorials/lessonx_training_running_rl_agent.py | caltech-netlab/gym-acnportal | cacd2e4aa9159a3bf7f0b8e3db2dbb0832d76e46 | [
"BSD-3-Clause"
] | null | null | null | tutorials/lessonx_training_running_rl_agent.py | caltech-netlab/gym-acnportal | cacd2e4aa9159a3bf7f0b8e3db2dbb0832d76e46 | [
"BSD-3-Clause"
] | 3 | 2021-04-28T14:43:32.000Z | 2021-04-28T14:58:04.000Z | tutorials/lessonx_training_running_rl_agent.py | sunash/gym-acnportal | cacd2e4aa9159a3bf7f0b8e3db2dbb0832d76e46 | [
"BSD-3-Clause"
] | 1 | 2020-05-12T19:13:51.000Z | 2020-05-12T19:13:51.000Z | # coding=utf-8
"""
ACN-Sim Tutorial: Lesson X
Training and Running a Reinforcement Learning Agent on ACN-Sim
by Sunash Sharma
Last updated: 02/27/2020
It is strongly suggested that this tutorial is run in its own
environment (e.g. conda or pyenv), as it will require dependencies
not required by the rest of gym-acnport... | 35.248869 | 86 | 0.689538 |
1c8212f635b9ffce2822ba1b015d1a215228ed13 | 993 | py | Python | translation_related/translate_captioning_datasets/utils/visualize_json.py | gallardorafael/multilingual-mmf | aac47f684697210aea2bc039d4baea037c2c1616 | [
"BSD-3-Clause"
] | null | null | null | translation_related/translate_captioning_datasets/utils/visualize_json.py | gallardorafael/multilingual-mmf | aac47f684697210aea2bc039d4baea037c2c1616 | [
"BSD-3-Clause"
] | null | null | null | translation_related/translate_captioning_datasets/utils/visualize_json.py | gallardorafael/multilingual-mmf | aac47f684697210aea2bc039d4baea037c2c1616 | [
"BSD-3-Clause"
] | null | null | null | # Script to pretty print a JSON file.
import json
import argparse
import codecs
# Función que lee y parsea los argumentos
def get_args():
parser = argparse.ArgumentParser(description='Script to pretty print a JSON file')
parser.add_argument('--input_path', help='Path to the input file.')
args = parser.par... | 26.837838 | 86 | 0.671702 |
1c8216af1af657199c24a21f56d10122b2a96e91 | 1,783 | py | Python | google-cloud-sdk/lib/surface/compute/xpn/associated_projects/list.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2017-11-29T18:52:27.000Z | 2017-11-29T18:52:27.000Z | google-cloud-sdk/.install/.backup/lib/surface/compute/xpn/associated_projects/list.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/.install/.backup/lib/surface/compute/xpn/associated_projects/list.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2020-07-25T12:09:01.000Z | 2020-07-25T12:09:01.000Z | # Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 34.288462 | 79 | 0.727426 |
1c82329f8873315647da8641b2893d0860e011d5 | 11,851 | py | Python | wavedata/tools/core/voxel_grid_2d.py | Fredrik00/wavedata | 3e9b9b57c3254d84b2384153658206f07310264e | [
"MIT"
] | null | null | null | wavedata/tools/core/voxel_grid_2d.py | Fredrik00/wavedata | 3e9b9b57c3254d84b2384153658206f07310264e | [
"MIT"
] | null | null | null | wavedata/tools/core/voxel_grid_2d.py | Fredrik00/wavedata | 3e9b9b57c3254d84b2384153658206f07310264e | [
"MIT"
] | null | null | null | import numpy as np
from wavedata.tools.core import geometry_utils
class VoxelGrid2D(object):
"""
Voxel grids represent occupancy info. The voxelize_2d method projects a point cloud
onto a plane, while saving height and point density information for each voxel.
"""
# Class Constants
VOXEL_EMP... | 41.437063 | 143 | 0.598599 |
1c827928361cbd46d44a360c5b38d3af024491ca | 4,054 | py | Python | mtp_noms_ops/apps/security/views/dashboard.py | uk-gov-mirror/ministryofjustice.money-to-prisoners-noms-ops | eb537fb8a8e3adc588d50af1b000402c957b32a7 | [
"MIT"
] | 3 | 2016-12-22T15:56:57.000Z | 2020-03-10T10:37:40.000Z | mtp_noms_ops/apps/security/views/dashboard.py | uk-gov-mirror/ministryofjustice.money-to-prisoners-noms-ops | eb537fb8a8e3adc588d50af1b000402c957b32a7 | [
"MIT"
] | 61 | 2016-06-10T08:37:23.000Z | 2022-01-28T12:41:29.000Z | mtp_noms_ops/apps/security/views/dashboard.py | uk-gov-mirror/ministryofjustice.money-to-prisoners-noms-ops | eb537fb8a8e3adc588d50af1b000402c957b32a7 | [
"MIT"
] | 1 | 2021-04-11T06:13:53.000Z | 2021-04-11T06:13:53.000Z | import logging
from django.conf import settings
from django.urls import reverse
from django.utils.translation import gettext, ngettext
from django.views.generic import TemplateView
from mtp_common.auth.api_client import get_api_session
from requests.exceptions import RequestException
from security.context_processors ... | 36.522523 | 120 | 0.574988 |
1c828c67d02203bcf3c4bd0e2848860e3b60b4c2 | 20,527 | py | Python | venv/Lib/site-packages/tensorflow_estimator/python/estimator/export/export.py | rexliu3/StockTradingBotCloud | 46b732b9c05f73bc0e856a3c4a16854b6d12e18e | [
"MIT"
] | 2 | 2020-06-20T14:10:57.000Z | 2020-10-12T07:11:08.000Z | tensorflow_estimator/python/estimator/export/export.py | rushabh-v/estimator | 6915557cef8bfc86f29f87e4467d601e4553b957 | [
"Apache-2.0"
] | null | null | null | tensorflow_estimator/python/estimator/export/export.py | rushabh-v/estimator | 6915557cef8bfc86f29f87e4467d601e4553b957 | [
"Apache-2.0"
] | 1 | 2020-06-28T11:47:47.000Z | 2020-06-28T11:47:47.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 42.411157 | 95 | 0.731232 |
1c8298919bedab1d1f49cb108cd0905396651cf4 | 1,197 | py | Python | management/account/filters.py | pranavjandu/Attendance-Management-System | 76e87427a84cdd25ee544f13e98892492811aef9 | [
"MIT"
] | null | null | null | management/account/filters.py | pranavjandu/Attendance-Management-System | 76e87427a84cdd25ee544f13e98892492811aef9 | [
"MIT"
] | 6 | 2021-03-30T13:59:27.000Z | 2022-03-12T00:42:34.000Z | management/account/filters.py | pranavjandu/Facial-Attendance-System-Django | 76e87427a84cdd25ee544f13e98892492811aef9 | [
"MIT"
] | null | null | null | import django_filters
from django_filters import CharFilter
from .models import *
from django import forms
#These filters are used for filtering out the query set in templates according to models
class InstructorFilter(django_filters.FilterSet):
name=CharFilter(field_name="name",lookup_expr='icontains')
class... | 30.692308 | 88 | 0.705931 |
1c82e6073ad302cf50c7a8da3d31203ec3a9f462 | 2,616 | py | Python | tests/test_cloud_azure.py | swsachith/cm | d99837917f0dafe60c25829cf78ae77bbe02bd85 | [
"Apache-2.0"
] | null | null | null | tests/test_cloud_azure.py | swsachith/cm | d99837917f0dafe60c25829cf78ae77bbe02bd85 | [
"Apache-2.0"
] | null | null | null | tests/test_cloud_azure.py | swsachith/cm | d99837917f0dafe60c25829cf78ae77bbe02bd85 | [
"Apache-2.0"
] | null | null | null | import time
from cm4.vm.Vm import Vm
from cm4.configuration.config import Config
from cm4.common.debug import HEADING, myself
# nosetest -v --nopature tests/test_cloud_azure.py
class TestCloudAzure:
def setup(self):
self.config = Config()
self.azure = Vm("azure")
self.test_node_name = 'c... | 30.776471 | 137 | 0.644495 |
1c82f4b48ed8ac9b7a0a0b3e49a4078ce2ad71b5 | 3,247 | py | Python | scraper_cmds.py | RodrigoProjects/Flexer | 86a672ecf78488a3411206724008111bbe36a3bf | [
"MIT"
] | null | null | null | scraper_cmds.py | RodrigoProjects/Flexer | 86a672ecf78488a3411206724008111bbe36a3bf | [
"MIT"
] | null | null | null | scraper_cmds.py | RodrigoProjects/Flexer | 86a672ecf78488a3411206724008111bbe36a3bf | [
"MIT"
] | null | null | null | import os
import codecs
from PCdiga import PCdiga
import discord
from discord.ext import commands
SITES = ['pcdiga']
class Scraper(commands.Cog):
'''Comandos responsavéis por dar scrap em várias lojas na Internet'''
def __init__(self, bot):
self.bot = bot
@commands.command(name='pcdiga', help=... | 41.101266 | 136 | 0.561441 |
1c8305cff4adc9cf6a72b84368147fd1d4d88920 | 15,177 | py | Python | user_activity_benchmarks/select_optimal_benchmark_set.py | khadas/android_external_toolchain-utils | 3690e025de8daaed03c4acb02d2b054e5c4c0dd5 | [
"BSD-3-Clause"
] | null | null | null | user_activity_benchmarks/select_optimal_benchmark_set.py | khadas/android_external_toolchain-utils | 3690e025de8daaed03c4acb02d2b054e5c4c0dd5 | [
"BSD-3-Clause"
] | null | null | null | user_activity_benchmarks/select_optimal_benchmark_set.py | khadas/android_external_toolchain-utils | 3690e025de8daaed03c4acb02d2b054e5c4c0dd5 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python2
# Copyright 2016 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Selects the optimal set of benchmarks.
For each benchmark, there is a file with the common functions, as extracted by
the process_h... | 43.612069 | 80 | 0.713448 |
1c83696ee6e33ad41d530379c83168f086851162 | 18,564 | py | Python | tests/test_dbdiff.py | andyreagan/dbdiff | 6fccc6cd7c88e1e91def7bfc89057b0c0fd73883 | [
"MIT"
] | null | null | null | tests/test_dbdiff.py | andyreagan/dbdiff | 6fccc6cd7c88e1e91def7bfc89057b0c0fd73883 | [
"MIT"
] | null | null | null | tests/test_dbdiff.py | andyreagan/dbdiff | 6fccc6cd7c88e1e91def7bfc89057b0c0fd73883 | [
"MIT"
] | null | null | null | import logging
import os
from pathlib import Path
import pandas as pd
import pytest
from click.testing import CliRunner
from dbdiff.main import check_primary_key
from dbdiff.main import create_diff_table
from dbdiff.main import create_joined_table
from dbdiff.main import get_column_diffs
from dbdiff.main import get_d... | 41.253333 | 191 | 0.641349 |
1c839be41febcf9df74b2e3bc4aead02d10db442 | 4,549 | py | Python | oscar/lib/python2.7/site-packages/faker/providers/address/fa_IR/__init__.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/faker/providers/address/fa_IR/__init__.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/faker/providers/address/fa_IR/__init__.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from .. import Provider as AddressProvider
class Provider(AddressProvider):
city_prefixes = (
'شمال', 'غرب', 'شرق', 'جنوب', 'بندر', 'شهر', 'روستای', 'دهستان',
'شهرستان', 'باغات', 'استان',
)
building_number_formats ... | 51.693182 | 82 | 0.550231 |
1c841b34edba4db6c4a42a9d7a22570756088619 | 33,449 | py | Python | aquaponics-master/aquaponics/models.py | JunwenLIU/Aquaponics_system_Simulink | 5048012730815f3e8bb5ccb254c7e1d4be8a84d4 | [
"Apache-2.0"
] | null | null | null | aquaponics-master/aquaponics/models.py | JunwenLIU/Aquaponics_system_Simulink | 5048012730815f3e8bb5ccb254c7e1d4be8a84d4 | [
"Apache-2.0"
] | null | null | null | aquaponics-master/aquaponics/models.py | JunwenLIU/Aquaponics_system_Simulink | 5048012730815f3e8bb5ccb254c7e1d4be8a84d4 | [
"Apache-2.0"
] | null | null | null | """OBSOLETE!!!
Collection of utility functions for building components of an aquaponics model.
Each component takes a GEKKO model `m` as an imput, a long with some key word
arguments (typically used to set initial conditions), and returns that model
with the parameters, variables, equations, etc. for that component a... | 33.650905 | 79 | 0.566863 |
1c84290e074b976bf57ea8efb8160800e8b3ceef | 923 | py | Python | vaurien/behaviors/dummy.py | mozilla-libs/vaurien | dd53074fc3a01cf554c8f628423b5623f8d6e45d | [
"Apache-2.0"
] | 131 | 2015-01-04T06:11:22.000Z | 2017-12-01T14:39:26.000Z | vaurien/behaviors/dummy.py | leandromoreira/vaurien | 5e734a4280280e2763d0fca3ab3fef9c70484dc0 | [
"Apache-2.0"
] | 13 | 2015-01-29T02:10:33.000Z | 2017-07-31T17:34:11.000Z | vaurien/behaviors/dummy.py | leandromoreira/vaurien | 5e734a4280280e2763d0fca3ab3fef9c70484dc0 | [
"Apache-2.0"
] | 18 | 2015-02-02T13:09:18.000Z | 2017-07-07T09:04:37.000Z |
class Dummy(object):
"""Transparent behavior. Nothing's done.
"""
name = 'dummy'
options = {}
def __init__(self):
self.settings = {}
def update_settings(self, settings):
self.settings.update(settings)
def _convert(self, value, type_):
if isinstance(value, type_):... | 25.638889 | 68 | 0.600217 |
1c8429910961355b4716a98169a959b9eb1a2351 | 17,209 | py | Python | downunder/test/python/run_datasources.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null | downunder/test/python/run_datasources.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null | downunder/test/python/run_datasources.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null | ##############################################################################
#
# Copyright (c) 2003-2018 by The University of Queensland
# http://www.uq.edu.au
#
# Primary Business: Queensland, Australia
# Licensed under the Apache License, version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Development unti... | 41.973171 | 130 | 0.638154 |
1c8452ad223ffa838030c88d53308ea4b0de2dd0 | 512 | py | Python | tests/mock_module/mock_submodule/mock_subfile.py | yoyowallet/aws-xray-sdk-python | e082f8939d972577f62bd16cf83edb92bd3bd4d6 | [
"Apache-2.0"
] | null | null | null | tests/mock_module/mock_submodule/mock_subfile.py | yoyowallet/aws-xray-sdk-python | e082f8939d972577f62bd16cf83edb92bd3bd4d6 | [
"Apache-2.0"
] | 2 | 2018-11-07T16:49:02.000Z | 2018-11-12T17:16:32.000Z | tests/mock_module/mock_submodule/mock_subfile.py | yoyowallet/aws-xray-sdk-python | e082f8939d972577f62bd16cf83edb92bd3bd4d6 | [
"Apache-2.0"
] | null | null | null | from aws_xray_sdk.core import xray_recorder
def mock_subfunc():
pass
@xray_recorder.capture()
def mock_no_doublepatch():
pass
class MockClass(object):
def __init__(self):
pass
def mock_method(self):
pass
@classmethod
def mock_classmethod(cls):
pass
@staticmet... | 14.628571 | 44 | 0.650391 |
1c848a15f8fb96539e4e330e578c4dd047529c6c | 2,679 | py | Python | binconvert/convert.py | agoodm/binconvert | 97e702eeeef37cb16250ccbacea46d74da22e657 | [
"MIT"
] | null | null | null | binconvert/convert.py | agoodm/binconvert | 97e702eeeef37cb16250ccbacea46d74da22e657 | [
"MIT"
] | null | null | null | binconvert/convert.py | agoodm/binconvert | 97e702eeeef37cb16250ccbacea46d74da22e657 | [
"MIT"
] | null | null | null | import os
import struct
import sys
def convert(source, destination=None, byte_order=None, fmt=None):
"""
Converts the given file (specified by source) from one byte order
to another. For example, to convert a file in the current working directory
from big to little endian, call
>>> convert('a.bin... | 36.202703 | 79 | 0.656962 |
1c84ae0acc42aa8a660e818d7889111d0052a12c | 9,388 | py | Python | python/tests/test_heavisides.py | kristianmeyerr/AMICI | 15f14c24b781daf5ceb3606d79edbbf57155a043 | [
"CC0-1.0"
] | 44 | 2020-09-17T07:12:07.000Z | 2022-02-23T21:25:27.000Z | python/tests/test_heavisides.py | kristianmeyerr/AMICI | 15f14c24b781daf5ceb3606d79edbbf57155a043 | [
"CC0-1.0"
] | 589 | 2020-08-07T21:56:42.000Z | 2022-03-31T17:32:27.000Z | python/tests/test_heavisides.py | kristianmeyerr/AMICI | 15f14c24b781daf5ceb3606d79edbbf57155a043 | [
"CC0-1.0"
] | 10 | 2020-09-02T09:32:43.000Z | 2022-03-23T12:43:45.000Z | """Tests for SBML events, including piecewise expressions."""
import numpy as np
import pytest
from util import (
create_sbml_model,
create_amici_model,
check_trajectories_without_sensitivities,
check_trajectories_with_forward_sensitivities,
)
@pytest.fixture(params=[
'state_and_parameter_depende... | 27.775148 | 74 | 0.511717 |
1c84bbdc8df8834d81de0889df8a3a497fa5a472 | 7,007 | py | Python | chrome/browser/devtools/devtools_protocol_constants_generator.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2019-01-28T08:09:58.000Z | 2021-11-15T15:32:10.000Z | chrome/browser/devtools/devtools_protocol_constants_generator.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | chrome/browser/devtools/devtools_protocol_constants_generator.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 6 | 2020-09-23T08:56:12.000Z | 2021-11-18T03:40:49.000Z | #!/usr/bin/python
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import sys
import string
import json
package = sys.argv[1]
output_cc_path = sys.argv[2]
output_h_path = sys.argv[3]
blink_protocol_path = ... | 32.896714 | 75 | 0.684173 |
1c84bd37ed534704b1d5238fb7ab858d1dea8776 | 1,523 | py | Python | scripts/artifacts/coreDuetAirplane.py | mastenp/iLEAPP | ee40ef7505b36d0b9b04131f284a9d4d036514a5 | [
"MIT"
] | 1 | 2020-10-06T20:28:03.000Z | 2020-10-06T20:28:03.000Z | scripts/artifacts/coreDuetAirplane.py | mastenp/iLEAPP | ee40ef7505b36d0b9b04131f284a9d4d036514a5 | [
"MIT"
] | null | null | null | scripts/artifacts/coreDuetAirplane.py | mastenp/iLEAPP | ee40ef7505b36d0b9b04131f284a9d4d036514a5 | [
"MIT"
] | null | null | null | import glob
import os
import pathlib
import plistlib
import sqlite3
import json
from scripts.artifact_report import ArtifactHtmlReport
from scripts.ilapfuncs import logfunc, tsv, timeline, is_platform_windows
def get_coreDuetAirplane(files_found, report_folder, seeker):
file_found = str(files_found[0])
db = sqlit... | 28.203704 | 86 | 0.739987 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.