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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fa1db442c9e53ef996398c6e62a52fb34b4bd8ef | 2,350 | py | Python | tests/data/events.py | stackriot-labs/gitsome | d7c57abc7cb66e9c910a844f15d4536866da3310 | [
"Apache-2.0"
] | 7,986 | 2015-11-07T11:59:21.000Z | 2022-03-27T17:20:49.000Z | tests/data/events.py | themaximum88/gitsome | d7c57abc7cb66e9c910a844f15d4536866da3310 | [
"Apache-2.0"
] | 161 | 2016-05-09T09:53:48.000Z | 2022-02-22T04:18:59.000Z | tests/data/events.py | themaximum88/gitsome | d7c57abc7cb66e9c910a844f15d4536866da3310 | [
"Apache-2.0"
] | 539 | 2016-04-05T05:39:58.000Z | 2022-03-23T20:47:52.000Z | # -*- coding: utf-8 -*-
# Copyright 2015 Donne Martin. 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. A copy of
# the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "lice... | 138.235294 | 1,770 | 0.714043 |
93f551e5469b1f02fbf0ae7bd5d72a1f50913ecb | 6,617 | py | Python | landlab/components/stream_power/examples/plot_concavities_forAGU.py | awickert/landlab | 496de56717a5877db96f354a1b1285bfabe8b56f | [
"MIT"
] | 1 | 2015-08-17T19:29:50.000Z | 2015-08-17T19:29:50.000Z | landlab/components/stream_power/examples/plot_concavities_forAGU.py | awickert/landlab | 496de56717a5877db96f354a1b1285bfabe8b56f | [
"MIT"
] | 1 | 2018-04-07T08:24:56.000Z | 2018-04-07T13:52:03.000Z | landlab/components/stream_power/examples/plot_concavities_forAGU.py | awickert/landlab | 496de56717a5877db96f354a1b1285bfabe8b56f | [
"MIT"
] | 2 | 2017-07-03T20:21:13.000Z | 2018-09-06T23:58:19.000Z | from pylab import figure, plot, xlabel, ylabel, title, loglog, show, gca, xlim, ylim, legend
import numpy as np
yunnan_propx = np.loadtxt('yunnan_proplength.txt')
yunnan_theta = np.loadtxt('yunnan_theta.txt')
fagaras_propx = np.loadtxt('fagaras_proplength.txt')
fagaras_theta = np.loadtxt('fagaras_theta.txt')
ladakh_pr... | 53.796748 | 118 | 0.767115 |
f883ede988d8c7ff74636ec5037471134c42eda6 | 6,946 | py | Python | lib/yaml/reader.py | pflarr/pyyaml | 239110c403da1068498591e0c3bbff12cfc121ae | [
"MIT"
] | 2 | 2018-04-27T22:12:50.000Z | 2020-11-27T23:32:06.000Z | lib/yaml/reader.py | pflarr/pyyaml | 239110c403da1068498591e0c3bbff12cfc121ae | [
"MIT"
] | null | null | null | lib/yaml/reader.py | pflarr/pyyaml | 239110c403da1068498591e0c3bbff12cfc121ae | [
"MIT"
] | 2 | 2020-01-29T20:36:20.000Z | 2021-03-08T02:05:35.000Z | # This module contains abstractions for the input stream. You don't have to
# looks further, there are no pretty code.
#
# We define two classes here.
#
# Mark(source, line, column)
# It's just a record and its only use is producing nice error messages.
# Parser does not use it for any other purposes.
#
# Reader(so... | 35.804124 | 107 | 0.560035 |
08bf20f42b00ff927888ab8a1ab64f9b0a98eaba | 1,586 | py | Python | python/testData/inspections/PyArgumentListInspection/badarglist.py | Sajadrahimi/intellij-community | ab9ff612dde3ee94ecae33cbc0ea639fa51550d4 | [
"Apache-2.0"
] | null | null | null | python/testData/inspections/PyArgumentListInspection/badarglist.py | Sajadrahimi/intellij-community | ab9ff612dde3ee94ecae33cbc0ea639fa51550d4 | [
"Apache-2.0"
] | null | null | null | python/testData/inspections/PyArgumentListInspection/badarglist.py | Sajadrahimi/intellij-community | ab9ff612dde3ee94ecae33cbc0ea639fa51550d4 | [
"Apache-2.0"
] | 1 | 2022-01-02T19:58:08.000Z | 2022-01-02T19:58:08.000Z | # bad argument list samples
class A:
def foo(self, x, y):
pass
# no self, but so what
def bar(one, two):
pass
a = A()
a.foo(1,2)
a.bar(<warning descr="Parameter 'two' unfilled">)</warning>;
def f1():
pass
f1()
f1<warning descr="Unexpected argument(s)">(<warning descr="Unexpected a... | 28.321429 | 145 | 0.664565 |
9d7bb559e11f6498887ac670402f66515d1c2a29 | 11,578 | py | Python | code/python/StocksAPIforDigitalPortals/v2/fds/sdk/StocksAPIforDigitalPortals/model/inline_response2005_data_reported_key_figures_first_fiscal_year_ratios_enterprise_value_ebitda.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | 6 | 2022-02-07T16:34:18.000Z | 2022-03-30T08:04:57.000Z | code/python/StocksAPIforDigitalPortals/v2/fds/sdk/StocksAPIforDigitalPortals/model/inline_response2005_data_reported_key_figures_first_fiscal_year_ratios_enterprise_value_ebitda.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | 2 | 2022-02-07T05:25:57.000Z | 2022-03-07T14:18:04.000Z | code/python/StocksAPIforDigitalPortals/v2/fds/sdk/StocksAPIforDigitalPortals/model/inline_response2005_data_reported_key_figures_first_fiscal_year_ratios_enterprise_value_ebitda.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | null | null | null | """
Prime Developer Trial
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from fds.sdk.S... | 44.530769 | 124 | 0.578943 |
76bc248ecd134f17b32444962d08929ebb3edca2 | 1,107 | py | Python | Machine Learning Algorithms/Section 2 - Regression/2. Multiple Linear Regression/multiple_linear_regression.py | Hrishi97/All-About-Machine-Learning | e141951bc629cbd8c3068cc9d284cb40478d2d75 | [
"Unlicense"
] | 389 | 2021-06-13T13:57:13.000Z | 2022-03-30T07:49:47.000Z | multiple_linear_regression.py | rishikonapure/-100daysofmlcode | 50ea710eb197287ae1e538c8528c88c4503d9f9a | [
"MIT"
] | 23 | 2020-07-21T04:54:58.000Z | 2022-03-08T23:30:06.000Z | multiple_linear_regression.py | rishikonapure/-100daysofmlcode | 50ea710eb197287ae1e538c8528c88c4503d9f9a | [
"MIT"
] | 109 | 2021-06-13T14:26:21.000Z | 2022-03-29T11:55:27.000Z | # Multiple Linear Regression
# Importing the libraries
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
# Importing the dataset
dataset = pd.read_csv('50_Startups.csv')
X = dataset.iloc[:, :-1].values
y = dataset.iloc[:, -1].values
print(X)
# Encoding categorical data
from sklearn.compose impor... | 33.545455 | 97 | 0.785005 |
1141c9a9df8b6d197d8d175dc525309ee4a1e479 | 14,846 | py | Python | analyze/analyzeMinutes.py | Aquaware/MarketAlertWithXM | 6cfbc26f7b32880ff9a6911599b4a9614345e505 | [
"MIT"
] | null | null | null | analyze/analyzeMinutes.py | Aquaware/MarketAlertWithXM | 6cfbc26f7b32880ff9a6911599b4a9614345e505 | [
"MIT"
] | null | null | null | analyze/analyzeMinutes.py | Aquaware/MarketAlertWithXM | 6cfbc26f7b32880ff9a6911599b4a9614345e505 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), '../common'))
import pandas as pd
import numpy as np
from datetime import date, datetime, timedelta
from Timeframe import Timeframe
from CandlePlot import CandlePlot, BandPlot, makeFig
import matplotlib.pyplot as plt
... | 31.926882 | 201 | 0.505725 |
2fa2e1721327d71cd3cc1aefb5183d97a913170a | 1,986 | py | Python | backend/api/admin/resource/claritylist.py | blodstone/harness | 048a15d5f971b5b87cf6e80db98c7f9dd7a2cdbc | [
"MIT"
] | null | null | null | backend/api/admin/resource/claritylist.py | blodstone/harness | 048a15d5f971b5b87cf6e80db98c7f9dd7a2cdbc | [
"MIT"
] | null | null | null | backend/api/admin/resource/claritylist.py | blodstone/harness | 048a15d5f971b5b87cf6e80db98c7f9dd7a2cdbc | [
"MIT"
] | null | null | null | import urllib.parse
from flask import request
from flask_restful import Resource, abort
from backend.model.project import ClarityProject, ClarityProjectSchema
from backend.model.project_status import ProjectStatus
from backend.model import ma
class ProgressObject(object):
def __init__(self, total, current):
... | 32.557377 | 81 | 0.638469 |
9a8a72241d1d1a945bb43b6e7167fa7a16148f29 | 17,540 | py | Python | psat_server_web/atlas/atlas/dbviews.py | genghisken/psat-server-web | 63c697f1d08dc2173328d3018aadf8efc1e8e14f | [
"MIT"
] | null | null | null | psat_server_web/atlas/atlas/dbviews.py | genghisken/psat-server-web | 63c697f1d08dc2173328d3018aadf8efc1e8e14f | [
"MIT"
] | 11 | 2021-03-11T17:28:29.000Z | 2022-01-05T11:35:14.000Z | psat_server_web/atlas/atlas/dbviews.py | genghisken/psat-server-web | 63c697f1d08dc2173328d3018aadf8efc1e8e14f | [
"MIT"
] | null | null | null | from django.db import models
#from atlas.utils import *
from math import log10
from atlas.models import TcsCrossMatchesExternal, TcsDetectionLists, TcsImages
from gkutils.commonutils import ra_to_sex, dec_to_sex, getFlagDefs, getDateFractionMJD, FLAGS, transform, J2000toGalactic
class CustomLCPoints(models.Model):
... | 35.869121 | 143 | 0.701767 |
f0c8b35da052c54719297dabd73fad3e8d3007b7 | 1,902 | py | Python | tests/materials_test.py | hammy4815/EMpy | 64f2c356fbfb783277f69c2a69e020272b91df5d | [
"MIT"
] | null | null | null | tests/materials_test.py | hammy4815/EMpy | 64f2c356fbfb783277f69c2a69e020272b91df5d | [
"MIT"
] | null | null | null | tests/materials_test.py | hammy4815/EMpy | 64f2c356fbfb783277f69c2a69e020272b91df5d | [
"MIT"
] | null | null | null | # pylint: disable=no-self-use
from unittest import TestCase
from numpy import array
from numpy.testing import assert_almost_equal, assert_raises
import EMpy_gpu.materials as mat
class RefractiveIndexTest(TestCase):
def test_all_nones(self):
with assert_raises(ValueError):
mat.RefractiveInde... | 29.71875 | 69 | 0.572555 |
cbe82cebba1975db85cc22bf6e450519f57c004b | 3,914 | py | Python | message_families/audit_proof/aca_py_audit_proof/manager.py | ianco/aca-py-audit-plugin | 2280e79bca0cc785865b08b8e8cbcb5829d57e8e | [
"Apache-2.0"
] | null | null | null | message_families/audit_proof/aca_py_audit_proof/manager.py | ianco/aca-py-audit-plugin | 2280e79bca0cc785865b08b8e8cbcb5829d57e8e | [
"Apache-2.0"
] | null | null | null | message_families/audit_proof/aca_py_audit_proof/manager.py | ianco/aca-py-audit-plugin | 2280e79bca0cc785865b08b8e8cbcb5829d57e8e | [
"Apache-2.0"
] | null | null | null | """Classes to support proof audit."""
import logging
from aries_cloudagent.core.error import BaseError
from aries_cloudagent.revocation.models.revocation_registry import RevocationRegistry
from aries_cloudagent.core.error import BaseError
from aries_cloudagent.core.profile import Profile
from aries_cloudagent.ledger.... | 32.616667 | 85 | 0.553654 |
9ec37c0a2d5ef0fddf647b6b8005092800c7fc4a | 1,279 | py | Python | cifar10_test.py | z-a-f/PyTorch_CIFAR10 | 3233d8f86c546de438d0d117ff6698c85a0ca841 | [
"MIT"
] | 1 | 2020-07-12T23:18:09.000Z | 2020-07-12T23:18:09.000Z | cifar10_test.py | z-a-f/PyTorch_CIFAR10 | 3233d8f86c546de438d0d117ff6698c85a0ca841 | [
"MIT"
] | null | null | null | cifar10_test.py | z-a-f/PyTorch_CIFAR10 | 3233d8f86c546de438d0d117ff6698c85a0ca841 | [
"MIT"
] | null | null | null | import os, shutil
import torch
from argparse import ArgumentParser
from pytorch_lightning import Trainer
from cifar10_module import CIFAR10_Module
def main(hparams):
# If only train on 1 GPU. Must set_device otherwise PyTorch always store model on GPU 0 first
if type(hparams.gpus) == str:
if len(hparam... | 39.96875 | 97 | 0.713057 |
43d64d215f00c56a0967f1ff60395d9b841a365f | 3,920 | py | Python | pyiArduinoI2Cexpander/examples/FindDevices.py | tremaru/pyiArduinoI2Cexpander | 01154070bb1696346897113930379b52680b5669 | [
"MIT"
] | null | null | null | pyiArduinoI2Cexpander/examples/FindDevices.py | tremaru/pyiArduinoI2Cexpander | 01154070bb1696346897113930379b52680b5669 | [
"MIT"
] | 1 | 2021-09-16T14:05:26.000Z | 2021-09-16T14:05:26.000Z | pyiArduinoI2Cexpander/examples/FindDevices.py | tremaru/pyiArduinoI2Cexpander | 01154070bb1696346897113930379b52680b5669 | [
"MIT"
] | 1 | 2021-03-15T08:47:38.000Z | 2021-03-15T08:47:38.000Z | # Данный пример ищет модули на шине и выводит информацию о них.
#
import smbus # Подключаем модуль шины smbus(i2c)
choices = { # Создаём список устройств
0x01: "кнопкой", # Если значение... | 80 | 213 | 0.539286 |
880310388e6c829f07bf86dfcb9346436ea5303f | 602 | py | Python | Sketchbots/sw/labqueue/lask/server/xmp.py | rlugojr/ChromeWebLab | 60f964b3f283c15704b7a04b7bb50cb15791e2e4 | [
"Apache-2.0"
] | 306 | 2015-01-09T14:03:44.000Z | 2017-09-16T13:03:35.000Z | Sketchbots/sw/labqueue/lask/server/xmp.py | rlugojr/ChromeWebLab | 60f964b3f283c15704b7a04b7bb50cb15791e2e4 | [
"Apache-2.0"
] | 90 | 2019-03-26T05:36:00.000Z | 2021-07-28T05:30:16.000Z | Sketchbots/sw/labqueue/lask/server/xmp.py | rlugojr/ChromeWebLab | 60f964b3f283c15704b7a04b7bb50cb15791e2e4 | [
"Apache-2.0"
] | 119 | 2015-01-26T15:04:33.000Z | 2017-09-13T09:30:53.000Z | # Copyright 2013 Google Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | 43 | 77 | 0.727575 |
9c0e21d216903c0dc6ad9111c1cc62f2b7ef12f6 | 198 | py | Python | ems_wheniwork/views/api/exceptions.py | uw-asa/django-ems-wheniwork | 6a19f4a860fda369c68b8cb48518d61904d98683 | [
"Apache-2.0"
] | null | null | null | ems_wheniwork/views/api/exceptions.py | uw-asa/django-ems-wheniwork | 6a19f4a860fda369c68b8cb48518d61904d98683 | [
"Apache-2.0"
] | null | null | null | ems_wheniwork/views/api/exceptions.py | uw-asa/django-ems-wheniwork | 6a19f4a860fda369c68b8cb48518d61904d98683 | [
"Apache-2.0"
] | null | null | null | """
Custom exceptions used by EMS Scheduler.
"""
class MissingParamException(Exception):
pass
class InvalidParamException(Exception):
pass
class NotFoundException(Exception):
pass
| 12.375 | 40 | 0.742424 |
9529d7ae50c90c42cc3229363fd381e4e4993d31 | 6,428 | py | Python | cfg_exporter/helper.py | dong50252409/cfg_exporter | 8e6fdfef00dbb228eb34ffdf4c1c23a74f1d7e18 | [
"MIT"
] | 3 | 2021-12-10T10:26:15.000Z | 2022-02-11T08:34:31.000Z | cfg_exporter/helper.py | dong50252409/cfg_exporter | 8e6fdfef00dbb228eb34ffdf4c1c23a74f1d7e18 | [
"MIT"
] | null | null | null | cfg_exporter/helper.py | dong50252409/cfg_exporter | 8e6fdfef00dbb228eb34ffdf4c1c23a74f1d7e18 | [
"MIT"
] | 1 | 2022-02-11T09:16:00.000Z | 2022-02-11T09:16:00.000Z | import os
from argparse import RawTextHelpFormatter, ArgumentTypeError, ArgumentParser
from cfg_exporter.const import ExportType, ExtensionType, TEMPLATE_EXTENSION
def valid_source(source):
if os.path.exists(source):
return source
else:
raise ArgumentTypeError(_('the source path does not exis... | 45.588652 | 120 | 0.632078 |
12ca0ab0e9e224776635b85b9cccd063e505e9d0 | 10,281 | py | Python | image_widget.py | zhangkaisong/YoloAll | 7bb8c0ce11b6c033f0e6fd15621fdb5d5a2f1787 | [
"Apache-2.0"
] | 1 | 2021-12-05T07:52:50.000Z | 2021-12-05T07:52:50.000Z | image_widget.py | zhangkaisong/YoloAll | 7bb8c0ce11b6c033f0e6fd15621fdb5d5a2f1787 | [
"Apache-2.0"
] | null | null | null | image_widget.py | zhangkaisong/YoloAll | 7bb8c0ce11b6c033f0e6fd15621fdb5d5a2f1787 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
import os
if hasattr(sys, 'frozen'):
os.environ['PATH'] = sys._MEIPASS + ";" + os.environ['PATH']
from PyQt5.QtWidgets import *
from PyQt5 import QtCore, QtGui, uic
from PyQt5.QtCore import *
from PyQt5.QtGui import *
import copy
import xml.etree.cElementTree as et
import os
impor... | 35.329897 | 104 | 0.548779 |
06ba49e42e54f7ee4c7e52a132b320670ecd9e9f | 10,348 | py | Python | rubikenv/rubikgym.py | Forbu/rubikenv | 2dcf156b4dd03541c176c430675d8ddd5653825f | [
"Apache-2.0"
] | null | null | null | rubikenv/rubikgym.py | Forbu/rubikenv | 2dcf156b4dd03541c176c430675d8ddd5653825f | [
"Apache-2.0"
] | null | null | null | rubikenv/rubikgym.py | Forbu/rubikenv | 2dcf156b4dd03541c176c430675d8ddd5653825f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Dec 21 15:51:06 2018
@author: adrien
"""
import numpy as np
import pandas as pd
import gym
from gym import spaces
class rubik_cube:
"""
This is a rubik's cube class simulator
Attributes :
- state : a 9x6 array of value bet... | 35.560137 | 92 | 0.469463 |
71ccaeec04285c9d8689dbfa9fe0eb1fe7d9922c | 4,762 | py | Python | once_upon_a_repository/utilities.py | allegroai/trains-blogs | 19a1bc971f9eb5f31a0d08dd553ea0d1f5437e9d | [
"Apache-2.0"
] | 12 | 2020-02-06T10:02:36.000Z | 2022-01-15T19:38:16.000Z | once_upon_a_repository/utilities.py | allegroai/trains-blogs | 19a1bc971f9eb5f31a0d08dd553ea0d1f5437e9d | [
"Apache-2.0"
] | 1 | 2021-09-08T01:54:46.000Z | 2021-09-08T01:54:46.000Z | once_upon_a_repository/utilities.py | allegroai/trains-blogs | 19a1bc971f9eb5f31a0d08dd553ea0d1f5437e9d | [
"Apache-2.0"
] | 3 | 2020-02-10T00:19:44.000Z | 2020-05-31T13:51:06.000Z | import json
import attr
import cv2
import numpy as np
import torch
import torchvision
from torchvision.models.detection.faster_rcnn import FastRCNNPredictor
from torchvision.models.detection.mask_rcnn import MaskRCNNPredictor
from torchvision.transforms import functional as F
from torchvision_references import utils
... | 42.517857 | 116 | 0.634817 |
dfd7c5f562d84ddb6236ae21284c21d516b30548 | 7,751 | py | Python | configs/trainval/daotad_eccv2022/7.b.ii.py | klauscc/vedatad | c59f5ddc8fb227ef08baccbb513948bb1bb23857 | [
"Apache-2.0"
] | null | null | null | configs/trainval/daotad_eccv2022/7.b.ii.py | klauscc/vedatad | c59f5ddc8fb227ef08baccbb513948bb1bb23857 | [
"Apache-2.0"
] | null | null | null | configs/trainval/daotad_eccv2022/7.b.ii.py | klauscc/vedatad | c59f5ddc8fb227ef08baccbb513948bb1bb23857 | [
"Apache-2.0"
] | null | null | null | # 1. data
dataset_type = "Thumos14Dataset"
data_root = "data/thumos14/"
img_norm_cfg = dict(
mean=[122.7709, 116.7460, 104.0937], std=[68.5005, 66.6322, 70.3232], to_rgb=True
)
num_frames = 480
chunk_size = 1
img_shape = (224, 224)
overlap_ratio = 0.25
keep_ratio = 0.2
feat_downsample = 1
expid = "7.b.ii"
data = d... | 29.249057 | 140 | 0.56883 |
fdd52d1a1220d7207f5871e3fcdca365b1fa0e6c | 7,964 | py | Python | livvkit/components/numerics_tests/ismip.py | jhkennedy/LIVVkit | 680120cd437e408673e62e535fc0a246c7fc17db | [
"BSD-3-Clause"
] | null | null | null | livvkit/components/numerics_tests/ismip.py | jhkennedy/LIVVkit | 680120cd437e408673e62e535fc0a246c7fc17db | [
"BSD-3-Clause"
] | null | null | null | livvkit/components/numerics_tests/ismip.py | jhkennedy/LIVVkit | 680120cd437e408673e62e535fc0a246c7fc17db | [
"BSD-3-Clause"
] | null | null | null | # coding=utf-8
# Copyright (c) 2015-2017, UT-BATTELLE, LLC
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list... | 40.632653 | 99 | 0.573707 |
ff82373210dc1842acf9ffc54515bb4033c6bbaf | 14,270 | py | Python | ml_service/pipelines/img_class_build_parallel_batchscore_pipeline.py | MFG-Azure-MLOps-Hub/MLOpsImgClass | 4a1bbeb292590d12d2f46da4f0b993b86730e4eb | [
"MIT"
] | 1 | 2020-12-08T03:10:35.000Z | 2020-12-08T03:10:35.000Z | ml_service/pipelines/img_class_build_parallel_batchscore_pipeline.py | MFG-Azure-MLOps-Hub/MLOpsImgClass | 4a1bbeb292590d12d2f46da4f0b993b86730e4eb | [
"MIT"
] | null | null | null | ml_service/pipelines/img_class_build_parallel_batchscore_pipeline.py | MFG-Azure-MLOps-Hub/MLOpsImgClass | 4a1bbeb292590d12d2f46da4f0b993b86730e4eb | [
"MIT"
] | 1 | 2020-12-08T03:10:37.000Z | 2020-12-08T03:10:37.000Z | """
Copyright (C) Microsoft Corporation. All rights reserved.
Microsoft Corporation (“Microsoft”) grants you a nonexclusive, perpetual,
royalty-free right to use, copy, and modify the software code provided by us
("Software Code"). You may not sublicense the Software Code or any use of it
(except to your affiliates... | 33.263403 | 117 | 0.688788 |
1a2af3e295ac20af3f8bd5d081d8eed841351846 | 7,520 | py | Python | src/.history/HiwinRA605_socket_ros_20190604110804.py | SamKaiYang/2019_Hiwin_Shaking | d599f8c87dc4da89eae266990d12eb3a8b0f3e16 | [
"MIT"
] | null | null | null | src/.history/HiwinRA605_socket_ros_20190604110804.py | SamKaiYang/2019_Hiwin_Shaking | d599f8c87dc4da89eae266990d12eb3a8b0f3e16 | [
"MIT"
] | null | null | null | src/.history/HiwinRA605_socket_ros_20190604110804.py | SamKaiYang/2019_Hiwin_Shaking | d599f8c87dc4da89eae266990d12eb3a8b0f3e16 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# license removed for brevity
#接收策略端命令 用Socket傳輸至控制端電腦
import socket
##多執行序
import threading
import time
##
import sys
import os
import numpy as np
import rospy
import matplotlib as plot
from std_msgs.msg import String
from ROS_Socket.srv import *
from ROS_Socket.msg import *
import HiwinRA605_s... | 36.862745 | 171 | 0.562234 |
e93e4b2d340bfe7b131b6091d0ecd8f0008f2f8b | 10,106 | py | Python | src/5_Upload-to-aws.py | biomage-ltd/data-ingest | cbac0d5aae262afa6afdd2ee74b8ef7c58e745f6 | [
"MIT"
] | 2 | 2020-10-23T17:41:10.000Z | 2021-02-10T20:50:49.000Z | src/5_Upload-to-aws.py | biomage-ltd/data-ingest | cbac0d5aae262afa6afdd2ee74b8ef7c58e745f6 | [
"MIT"
] | 10 | 2021-01-07T11:34:57.000Z | 2021-06-22T15:46:46.000Z | src/5_Upload-to-aws.py | biomage-ltd/data-ingest | cbac0d5aae262afa6afdd2ee74b8ef7c58e745f6 | [
"MIT"
] | 1 | 2020-11-10T23:17:30.000Z | 2020-11-10T23:17:30.000Z | #!/usr/bin/python3
################################################
## 5_upload-to-aws.py
## - Getting ready samples-table and experiments-table
## - Upload tables to DynamoDB
## - Upload experiment.rds to S3
################################################
import hashlib
import os
import pandas
from scipy.io impo... | 30.439759 | 122 | 0.586483 |
f693863e5efd6d3824327951bced428042da4edc | 1,046 | py | Python | tests/bind_tests/boolean_tests/sweep_event_tests/strategies.py | skrat/martinez | 86db48324cb50ecb52be8ab2e4278a6d5cdd562b | [
"MIT"
] | 7 | 2020-05-07T08:13:44.000Z | 2021-12-17T07:33:51.000Z | tests/bind_tests/boolean_tests/sweep_event_tests/strategies.py | skrat/martinez | 86db48324cb50ecb52be8ab2e4278a6d5cdd562b | [
"MIT"
] | 17 | 2019-11-29T23:17:26.000Z | 2020-12-20T15:47:17.000Z | tests/bind_tests/boolean_tests/sweep_event_tests/strategies.py | skrat/martinez | 86db48324cb50ecb52be8ab2e4278a6d5cdd562b | [
"MIT"
] | 1 | 2020-12-17T22:44:21.000Z | 2020-12-17T22:44:21.000Z | from hypothesis import strategies
from tests.bind_tests.factories import (to_acyclic_bound_sweep_events,
to_bound_sweep_events,
to_nested_bound_sweep_events,
to_plain_bound_sweep_events)
from tests.b... | 43.583333 | 70 | 0.68738 |
d2222ceb694665f3958bcd9c395bbc4372b26251 | 606 | py | Python | example_project/blog/factories.py | allran/djangorestframework-appapi | 5e843b70910ccd55d787096ee08eb85315c80000 | [
"BSD-2-Clause"
] | 4 | 2019-10-15T06:47:29.000Z | 2019-11-11T13:16:15.000Z | example_project/blog/factories.py | allran/djangorestframework-appapi | 5e843b70910ccd55d787096ee08eb85315c80000 | [
"BSD-2-Clause"
] | null | null | null | example_project/blog/factories.py | allran/djangorestframework-appapi | 5e843b70910ccd55d787096ee08eb85315c80000 | [
"BSD-2-Clause"
] | null | null | null | # -*- encoding: utf-8 -*-
import factory
from faker import Factory as FakerFactory
from .models import (
Author,
Blog,
)
faker = FakerFactory.create()
faker.seed(883843)
class BlogFactory(factory.django.DjangoModelFactory):
class Meta:
model = Blog
title = factory.LazyAttribute(lambda x: f... | 21.642857 | 59 | 0.70132 |
8a27adb3e8e25e0949f740704a115c233df5e798 | 290 | py | Python | src/camera-test.py | parhamzm/OpenCV-FaceDetection_Filtering | 61cb497adeebac3d0c5062885078b4ba239ed963 | [
"MIT"
] | null | null | null | src/camera-test.py | parhamzm/OpenCV-FaceDetection_Filtering | 61cb497adeebac3d0c5062885078b4ba239ed963 | [
"MIT"
] | null | null | null | src/camera-test.py | parhamzm/OpenCV-FaceDetection_Filtering | 61cb497adeebac3d0c5062885078b4ba239ed963 | [
"MIT"
] | null | null | null | import numpy as np
import cv2
cap = cv2.VideoCapture(0)
while True:
ret, frame = cap.read()
grayscale = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
cv2.imshow('frame', frame)
cv2.imshow('frame2', grayscale)
if cv2.waitKey(20) & 0xFF == ord('q'):
break | 22.307692 | 56 | 0.617241 |
af72e2f5e1e65273b8dd9fc984cfe188e06a8f1a | 1,690 | py | Python | indico/modules/events/sessions/models/types.py | uxmaster/indico | ecd19f17ef6fdc9f5584f59c87ec647319ce5d31 | [
"MIT"
] | null | null | null | indico/modules/events/sessions/models/types.py | uxmaster/indico | ecd19f17ef6fdc9f5584f59c87ec647319ce5d31 | [
"MIT"
] | null | null | null | indico/modules/events/sessions/models/types.py | uxmaster/indico | ecd19f17ef6fdc9f5584f59c87ec647319ce5d31 | [
"MIT"
] | null | null | null | # This file is part of Indico.
# Copyright (C) 2002 - 2019 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from __future__ import unicode_literals
from sqlalchemy.ext.declarative import declared_attr
from indico... | 23.802817 | 106 | 0.616568 |
c4f8370c65c932a5e676049d43b43fc639fa4ef9 | 3,782 | py | Python | PyCapture2-2.13.31/examples/python3/SaveImageToAVIEx.py | sjtu-automatic-maritime-system/PengZhenghao | c063294d44ea9be972114b2c144dab3d9a2de863 | [
"MIT"
] | 1 | 2019-04-16T09:07:26.000Z | 2019-04-16T09:07:26.000Z | PyCapture2-2.13.31/examples/python3/SaveImageToAVIEx.py | sjtu-automatic-maritime-system/PengZhenghao | c063294d44ea9be972114b2c144dab3d9a2de863 | [
"MIT"
] | null | null | null | PyCapture2-2.13.31/examples/python3/SaveImageToAVIEx.py | sjtu-automatic-maritime-system/PengZhenghao | c063294d44ea9be972114b2c144dab3d9a2de863 | [
"MIT"
] | null | null | null | # =============================================================================
# Copyright (c) 2001-2018 FLIR Systems, Inc. All Rights Reserved.
#
# This software is the confidential and proprietary information of FLIR
# Integrated Imaging Solutions, Inc. ("Confidential Information"). You
# shall not disclose suc... | 35.345794 | 104 | 0.641988 |
ac818486ddb8df5fc9b2b1c4d429452d1fecff71 | 4,614 | py | Python | ark-tweet-nlp-0.3.2/postagger.py | enlighter/twitter-disasters-info-retrieval | 0a362fa68c1604152709dc25922c5611b0d1a484 | [
"MIT"
] | null | null | null | ark-tweet-nlp-0.3.2/postagger.py | enlighter/twitter-disasters-info-retrieval | 0a362fa68c1604152709dc25922c5611b0d1a484 | [
"MIT"
] | null | null | null | ark-tweet-nlp-0.3.2/postagger.py | enlighter/twitter-disasters-info-retrieval | 0a362fa68c1604152709dc25922c5611b0d1a484 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Simple Python wrapper for runTagger.sh script for CMU's Tweet Tokeniser and Part of Speech tagger: http://www.ark.cs.cmu.edu/TweetNLP/
Usage:
results=runtagger_parse(['example tweet 1', 'example tweet 2'])
results will contain a list of lists (one per tweet) of triples, ... | 47.081633 | 183 | 0.683572 |
771d228a71da476ad35e7b87c9c46d55499dcd42 | 8,851 | py | Python | great_expectations/exceptions.py | ap3xx/great_expectations | 67251ff3fcb60b1a52a6ece1bec98fb8e96f6a96 | [
"Apache-2.0"
] | null | null | null | great_expectations/exceptions.py | ap3xx/great_expectations | 67251ff3fcb60b1a52a6ece1bec98fb8e96f6a96 | [
"Apache-2.0"
] | 47 | 2020-07-15T06:32:50.000Z | 2022-03-29T12:03:23.000Z | great_expectations/exceptions.py | ap3xx/great_expectations | 67251ff3fcb60b1a52a6ece1bec98fb8e96f6a96 | [
"Apache-2.0"
] | null | null | null | import importlib
import json
from marshmallow import ValidationError
class GreatExpectationsError(Exception):
def __init__(self, message):
self.message = message
super().__init__(message)
class GreatExpectationsValidationError(ValidationError, GreatExpectationsError):
def __init__(self, mes... | 32.30292 | 120 | 0.707604 |
71945fb988133992fb441fa7ac8bb7f8654a6e1b | 1,792 | py | Python | python/pascal_triangle.py | shub0/leetcode | 8221d10f201d001abcb15b27c9cf4b8cd5060f1f | [
"BSD-3-Clause"
] | null | null | null | python/pascal_triangle.py | shub0/leetcode | 8221d10f201d001abcb15b27c9cf4b8cd5060f1f | [
"BSD-3-Clause"
] | null | null | null | python/pascal_triangle.py | shub0/leetcode | 8221d10f201d001abcb15b27c9cf4b8cd5060f1f | [
"BSD-3-Clause"
] | null | null | null | #! /usr/bin/python
'''
Given numRows, generate the first numRows of Pascal's triangle.
For example, given numRows = 5,
Return
[
[1],
[1,1],
[1,2,1],
[1,3,3,1],
[1,4,6,4,1]
]
'''
import math
class Solution:
# @param numRows, an integer
# @return a list of lists of integers
def generate(self... | 28.444444 | 136 | 0.573103 |
2432cea86c791ca43e4b7bb4d8923916aa0be20d | 122 | py | Python | Python/School/Project/q2.py | abdalrhmanyasser/Abdalrhman_Rep | e0fc3caa2cc04e92f591ccd7934586986d194000 | [
"CC0-1.0"
] | null | null | null | Python/School/Project/q2.py | abdalrhmanyasser/Abdalrhman_Rep | e0fc3caa2cc04e92f591ccd7934586986d194000 | [
"CC0-1.0"
] | null | null | null | Python/School/Project/q2.py | abdalrhmanyasser/Abdalrhman_Rep | e0fc3caa2cc04e92f591ccd7934586986d194000 | [
"CC0-1.0"
] | null | null | null | new_text = []
for i in input("enter your text : ").split():
new_text.append(i.capitalize())
print(" ".join(new_text))
| 24.4 | 45 | 0.647541 |
2229d633063975601d8b69179326163a31b1091d | 7,976 | py | Python | PathPlanning/AStar/a_star.py | robberwick/PythonRobotics | e8ffc01cc7975e02e226b547583d955dda8d0150 | [
"MIT"
] | 2 | 2020-03-07T11:04:57.000Z | 2020-04-10T03:34:47.000Z | PathPlanning/AStar/a_star.py | JeffLIrion/PythonRobotics | 487a7e4141dc4e2a0ae887e7fec98251900362b7 | [
"MIT"
] | null | null | null | PathPlanning/AStar/a_star.py | JeffLIrion/PythonRobotics | 487a7e4141dc4e2a0ae887e7fec98251900362b7 | [
"MIT"
] | 1 | 2022-03-07T10:30:07.000Z | 2022-03-07T10:30:07.000Z | """
A* grid planning
author: Atsushi Sakai(@Atsushi_twi)
Nikos Kanargias (nkana@tee.gr)
See Wikipedia article (https://en.wikipedia.org/wiki/A*_search_algorithm)
"""
import math
import matplotlib.pyplot as plt
show_animation = True
class AStarPlanner:
def __init__(self, ox, oy, reso, rr):
... | 29.109489 | 99 | 0.503009 |
7d040410ad52288978ee523cffe1c8bda5eea87a | 1,840 | py | Python | retinopathy/models/heads/gwap.py | RamsteinWR/Diabetic-Retinopathy-Blindness-Detection | 24390aeefd197600255a961189872dd4dfc77092 | [
"MIT"
] | 68 | 2019-09-08T20:04:23.000Z | 2021-05-05T10:05:14.000Z | retinopathy/models/heads/gwap.py | RamsteinWR/Diabetic-Retinopathy-Blindness-Detection | 24390aeefd197600255a961189872dd4dfc77092 | [
"MIT"
] | 1 | 2019-09-24T06:40:33.000Z | 2019-10-04T09:13:35.000Z | retinopathy/models/heads/gwap.py | RamsteinWR/Diabetic-Retinopathy-Blindness-Detection | 24390aeefd197600255a961189872dd4dfc77092 | [
"MIT"
] | 25 | 2019-09-09T04:42:51.000Z | 2022-03-28T15:01:30.000Z | from pytorch_toolbelt.modules.pooling import GWAP
from torch import nn
class GlobalWeightedAvgPoolHead(nn.Module):
"""
1) Squeeze last feature map in num_classes
2) Compute global average
"""
def __init__(self, feature_maps, num_classes: int, dropout=0.):
super().__init__()
self.f... | 29.677419 | 68 | 0.571739 |
092905028cc957eb5b398e024528b38074f0b84c | 1,088 | py | Python | 02-files-lab2/read_write_file.py | iproduct/course-robotics-npmg | 0feb2ded46007ba87b8128f1f2e039036ef274bd | [
"Apache-2.0"
] | null | null | null | 02-files-lab2/read_write_file.py | iproduct/course-robotics-npmg | 0feb2ded46007ba87b8128f1f2e039036ef274bd | [
"Apache-2.0"
] | null | null | null | 02-files-lab2/read_write_file.py | iproduct/course-robotics-npmg | 0feb2ded46007ba87b8128f1f2e039036ef274bd | [
"Apache-2.0"
] | 1 | 2021-03-17T09:08:02.000Z | 2021-03-17T09:08:02.000Z | """File read write demo script"""
def find_count(substring, string):
"""finds the number of occurences of substring in string"""
counter = 0
index = string.find(substring)
while index >= 0:
counter += 1
index = string.find(substring, index + 1)
return counter
if __name__ == "__main... | 41.846154 | 97 | 0.571691 |
be61eced7489304f1a225d0dbe7102f6434c5a6b | 2,975 | py | Python | sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sap_hana_system_workload_item.py | SanjayHukumRana/azure-sdk-for-python | 0669a0f07aaead29852f9d59cce8bc2d6085a7a2 | [
"MIT"
] | null | null | null | sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sap_hana_system_workload_item.py | SanjayHukumRana/azure-sdk-for-python | 0669a0f07aaead29852f9d59cce8bc2d6085a7a2 | [
"MIT"
] | null | null | null | sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sap_hana_system_workload_item.py | SanjayHukumRana/azure-sdk-for-python | 0669a0f07aaead29852f9d59cce8bc2d6085a7a2 | [
"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 ... | 43.75 | 82 | 0.665882 |
3affa5d4bec0cc1e46177bddedea7a476ca9552b | 9,970 | py | Python | game/sprites.py | coder489/Freestyle | d681bc839dd4b085f31e9b471edc5211388ddf83 | [
"MIT"
] | null | null | null | game/sprites.py | coder489/Freestyle | d681bc839dd4b085f31e9b471edc5211388ddf83 | [
"MIT"
] | null | null | null | game/sprites.py | coder489/Freestyle | d681bc839dd4b085f31e9b471edc5211388ddf83 | [
"MIT"
] | null | null | null | import pygame as pg
from settings import *
from os import path
vec = pg.math.Vector2
class Player(pg.sprite.Sprite):
"""
Creates the Player class to provide a template for players in the game.
"""
def __init__(self, game, img):
"""
Initializes (sets up) the player class.
Param... | 31.550633 | 150 | 0.577332 |
6c2220b72b2e87c7fb5f4421687f68764fe2beaa | 4,580 | py | Python | modules/tests/org/change_user_roles.py | nursix/STL | 682d8455c8e1c761f48542dad96da08767301923 | [
"MIT"
] | 1 | 2017-11-16T14:50:19.000Z | 2017-11-16T14:50:19.000Z | modules/tests/org/change_user_roles.py | vpccalderara/sahana | 6eb3f9798879dfa51bbe5d2b84829b1402671499 | [
"MIT"
] | null | null | null | modules/tests/org/change_user_roles.py | vpccalderara/sahana | 6eb3f9798879dfa51bbe5d2b84829b1402671499 | [
"MIT"
] | null | null | null | """ Sahana Eden Automated Test - ORG010 Change User Roles
@copyright: 2011-2017 (c) Sahana Software Foundation
@license: MIT
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 wi... | 33.925926 | 123 | 0.671397 |
bbd5c01695ae5b038f6fa40a26b2f8255461d01d | 10,370 | py | Python | sympy/functions/special/spherical_harmonics.py | ovolve/sympy | 0a15782f20505673466b940454b33b8014a25c13 | [
"BSD-3-Clause"
] | 4 | 2018-07-04T17:20:12.000Z | 2019-07-14T18:07:25.000Z | sympy/functions/special/spherical_harmonics.py | ovolve/sympy | 0a15782f20505673466b940454b33b8014a25c13 | [
"BSD-3-Clause"
] | 7 | 2017-05-01T14:15:32.000Z | 2017-09-06T20:44:24.000Z | sympy/functions/special/spherical_harmonics.py | ovolve/sympy | 0a15782f20505673466b940454b33b8014a25c13 | [
"BSD-3-Clause"
] | 1 | 2020-09-09T15:20:27.000Z | 2020-09-09T15:20:27.000Z | from __future__ import print_function, division
from sympy import pi, I
from sympy.core.singleton import S
from sympy.core import Dummy, sympify
from sympy.core.function import Function, ArgumentIndexError
from sympy.functions import assoc_legendre
from sympy.functions.elementary.trigonometric import sin, cos, cot
fro... | 33.237179 | 113 | 0.563934 |
5679f6a65c616ae6169ecfe361080267cb71eb97 | 1,544 | gyp | Python | ui/events/platform/x11/x11_events_platform.gyp | 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 | ui/events/platform/x11/x11_events_platform.gyp | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | null | null | null | ui/events/platform/x11/x11_events_platform.gyp | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | 6 | 2020-09-23T08:56:12.000Z | 2021-11-18T03:40:49.000Z | # 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.
{
'variables': {
'chromium_code': 1,
},
'targets': [{
# GN version: //ui/events/platform/x11
'target_name': 'x11_events_platform',
'typ... | 27.571429 | 72 | 0.538212 |
03487e44a28d3a0c86bea22fff1834f5072df4e0 | 1,820 | py | Python | internal/notes/builtin-SAVE/packages/xinit/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | 1 | 2019-01-17T20:07:19.000Z | 2019-01-17T20:07:19.000Z | internal/notes/builtin-SAVE/packages/xinit/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | null | null | null | internal/notes/builtin-SAVE/packages/xinit/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | 2 | 2019-08-06T18:13:57.000Z | 2021-11-05T18:19:49.000Z | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | 42.325581 | 78 | 0.674725 |
1d5702806c84daf7efc2d8c470d6a56aa7c91b9e | 439 | py | Python | terrathings/connection/deployment_status.py | elangenhan/terrathings | d54c9dce28762602475f5a77a6b07165efd2d5b0 | [
"MIT"
] | null | null | null | terrathings/connection/deployment_status.py | elangenhan/terrathings | d54c9dce28762602475f5a77a6b07165efd2d5b0 | [
"MIT"
] | null | null | null | terrathings/connection/deployment_status.py | elangenhan/terrathings | d54c9dce28762602475f5a77a6b07165efd2d5b0 | [
"MIT"
] | null | null | null | class Deployment:
def __init__(self, id: str, sha256: str) -> None:
self.id = id
self.sha256 = sha256
class Runtime:
def __init__(self, id: str, sha256: str) -> None:
self.id = id
self.sha256 = sha256
class Status:
def __init__(
self,
runtime: Runtime,
... | 20.904762 | 53 | 0.571754 |
51c7fcc1545daf287ecd45a8baeb94709cb59837 | 485 | py | Python | src/unicon/plugins/asa/ASAv/service_implementation.py | tahigash/unicon.plugins | 1b43a5a61244ea9312387fd855442ace37c65db9 | [
"Apache-2.0"
] | null | null | null | src/unicon/plugins/asa/ASAv/service_implementation.py | tahigash/unicon.plugins | 1b43a5a61244ea9312387fd855442ace37c65db9 | [
"Apache-2.0"
] | null | null | null | src/unicon/plugins/asa/ASAv/service_implementation.py | tahigash/unicon.plugins | 1b43a5a61244ea9312387fd855442ace37c65db9 | [
"Apache-2.0"
] | null | null | null | from unicon.plugins.generic.service_implementation import Reload
from unicon.eal.dialogs import Dialog, Statement
from unicon.plugins.asa.ASAv.service_statements import asa_reload_stmt_list
class ASAReload(Reload):
def __init__(self, connection, context, **kwargs):
super().__init__(connection, context, **k... | 40.416667 | 75 | 0.740206 |
d25afc1a1b0b1bbb5107951ac4f4021c58f8de6c | 420 | py | Python | packages/python/plotly/plotly/validators/table/cells/fill/_colorsrc.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/table/cells/fill/_colorsrc.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/table/cells/fill/_colorsrc.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | import _plotly_utils.basevalidators
class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="colorsrc", parent_name="table.cells.fill", **kwargs
):
super(ColorsrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=... | 30 | 78 | 0.652381 |
b2c33a10ede2d4331c9365e19ff4fc966dcb5722 | 632 | py | Python | setup.py | Chitanda-Satou/avocadopy | b6287416b5bfd6c283e848c9acdece1a8eade126 | [
"MIT"
] | null | null | null | setup.py | Chitanda-Satou/avocadopy | b6287416b5bfd6c283e848c9acdece1a8eade126 | [
"MIT"
] | null | null | null | setup.py | Chitanda-Satou/avocadopy | b6287416b5bfd6c283e848c9acdece1a8eade126 | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="avocadopy",
version="0.0.2",
author='B Niu',
author_email='shinji006@126.com',
description='Tools for medical statistics.',
long_description=long_description,
long_description_cont... | 27.478261 | 50 | 0.655063 |
ba7ffa54998c0e9d9575d3ee2f7b6876bad29405 | 1,731 | py | Python | sequniq/records.py | standage/sequniq | f77430402e52efeed62a6b41f9529d1a2ac4245b | [
"0BSD"
] | 2 | 2017-03-24T09:46:50.000Z | 2017-03-29T16:52:33.000Z | sequniq/records.py | standage/sequniq | f77430402e52efeed62a6b41f9529d1a2ac4245b | [
"0BSD"
] | 3 | 2015-06-30T18:01:50.000Z | 2015-06-30T18:02:22.000Z | sequniq/records.py | standage/sequniq | f77430402e52efeed62a6b41f9529d1a2ac4245b | [
"0BSD"
] | null | null | null | # -----------------------------------------------------------------------------
# Copyright (C) Daniel Standage, 2015. It is licensed under the ISC license,
# see LICENSE.txt. Contact: daniel.standage@gmail.com
# -----------------------------------------------------------------------------
"""
Utilities for working wi... | 36.829787 | 79 | 0.581745 |
262074695f7a0f3b74b5c985eaab8eee3ad89550 | 2,748 | py | Python | vp_suite/model_blocks/conv_lstm_hzzone.py | angelvillar96/vp-suite | 3e7c7d852862bad09a771d754fc56a71abf0a25f | [
"MIT"
] | null | null | null | vp_suite/model_blocks/conv_lstm_hzzone.py | angelvillar96/vp-suite | 3e7c7d852862bad09a771d754fc56a71abf0a25f | [
"MIT"
] | null | null | null | vp_suite/model_blocks/conv_lstm_hzzone.py | angelvillar96/vp-suite | 3e7c7d852862bad09a771d754fc56a71abf0a25f | [
"MIT"
] | null | null | null | from torch import nn
import torch
from vp_suite.base.base_model_block import ModelBlock
class ConvLSTM(ModelBlock):
NAME = "ConvLSTM (Shi et al.)"
PAPER_REFERENCE = "https://arxiv.org/abs/1506.04214"
CODE_REFERENCE = "https://github.com/Hzzone/Precipitation-Nowcasting"
MATCHES_REFERENCE = "Yes"
... | 40.411765 | 122 | 0.561863 |
ec4a45263b13b7d7ddc5e6f6a6c9d7aa3ffb460f | 78,553 | py | Python | constants/commands.py | Pure-Peace/gulag | d46c3c54ae8d224b62141c5e237b8ea988033864 | [
"MIT"
] | 1 | 2021-09-22T03:15:01.000Z | 2021-09-22T03:15:01.000Z | constants/commands.py | Pure-Peace/gulag | d46c3c54ae8d224b62141c5e237b8ea988033864 | [
"MIT"
] | null | null | null | constants/commands.py | Pure-Peace/gulag | d46c3c54ae8d224b62141c5e237b8ea988033864 | [
"MIT"
] | 1 | 2022-02-07T02:32:00.000Z | 2022-02-07T02:32:00.000Z | # -*- coding: utf-8 -*-
import asyncio
import copy
import importlib
import os
import pprint
import random
import secrets
import signal
import struct
import time
import uuid
from collections import Counter
from dataclasses import dataclass
from datetime import datetime
from importlib.metadata import version as pkg_vers... | 32.730417 | 182 | 0.597495 |
fa4a994e9123f80a551a9ea97895f95e25326e4d | 12,805 | py | Python | tests/test_create.py | fschleich/mhl | 5ae1f083c05f44a4e9751dc233f7d393b01e2210 | [
"MIT"
] | null | null | null | tests/test_create.py | fschleich/mhl | 5ae1f083c05f44a4e9751dc233f7d393b01e2210 | [
"MIT"
] | null | null | null | tests/test_create.py | fschleich/mhl | 5ae1f083c05f44a4e9751dc233f7d393b01e2210 | [
"MIT"
] | null | null | null | """
__author__ = "Alexander Sahm"
__copyright__ = "Copyright 2020, Pomfort GmbH"
__license__ = "MIT"
__maintainer__ = "Patrick Renner, Alexander Sahm"
__email__ = "opensource@pomfort.com"
"""
import os
from freezegun import freeze_time
from click.testing import CliRunner
from ascmhl.history import MHLHistory
import ... | 47.425926 | 134 | 0.713081 |
b4906b3427dc03099d4bd0d3667aa733e3e4e636 | 6,818 | py | Python | reinforcement_learning/rl_traveling_salesman_vehicle_routing_coach/src/TSP_env.py | jpmarques19/tensorflwo-test | 0ff8b06e0415075c7269820d080284a42595bb2e | [
"Apache-2.0"
] | 5 | 2019-01-19T23:53:35.000Z | 2022-01-29T14:04:31.000Z | reinforcement_learning/rl_traveling_salesman_vehicle_routing_coach/src/TSP_env.py | jpmarques19/tensorflwo-test | 0ff8b06e0415075c7269820d080284a42595bb2e | [
"Apache-2.0"
] | 6 | 2020-01-28T23:08:49.000Z | 2022-02-10T00:27:19.000Z | reinforcement_learning/rl_traveling_salesman_vehicle_routing_coach/src/TSP_env.py | jpmarques19/tensorflwo-test | 0ff8b06e0415075c7269820d080284a42595bb2e | [
"Apache-2.0"
] | 8 | 2020-12-14T15:49:24.000Z | 2022-03-23T18:38:36.000Z | import gym
import numpy as np
from gym import spaces
from TSP_view_2D import TSPView2D
class TSPEasyEnv(gym.Env):
def render(self, mode="human", close=False):
if self.tsp_view is None:
self.tsp_view = TSPView2D(self.n_orders, self.map_quad, grid_size=25)
return self.tsp_view.update... | 35.510417 | 116 | 0.588589 |
25a6bff3eb2f21d4cc8d8685672e3e4d3ec6bda2 | 451 | py | Python | nautilus/graphql/query.py | LeptoSpira/nautilus-chambers | 5aafd9eb599ed35d3e90c3ef7b84a25d28e60922 | [
"MIT"
] | 1 | 2020-05-12T03:01:58.000Z | 2020-05-12T03:01:58.000Z | nautilus/graphql/query.py | LeptoFlare/nautilus-chambers | 5aafd9eb599ed35d3e90c3ef7b84a25d28e60922 | [
"MIT"
] | 13 | 2020-05-05T01:06:01.000Z | 2020-07-19T07:17:31.000Z | nautilus/graphql/query.py | LeptoFlare/nautilus-chambers | 5aafd9eb599ed35d3e90c3ef7b84a25d28e60922 | [
"MIT"
] | 1 | 2019-08-16T02:35:17.000Z | 2019-08-16T02:35:17.000Z | """Contains query resolvers."""
from ariadne import QueryType
from nautilus import utils
query_type = QueryType()
@query_type.field("readProfile")
def resolve_read_profile(*_, discord):
"""query readProfile"""
utils.logger.debug(f"readProfile | discord={discord}")
if not (error := utils.errors.check_for(... | 28.1875 | 78 | 0.711752 |
70a5578ba6fed6590e22243adcf2db40376f8e99 | 110 | py | Python | 1065-pares-entre-cinco-numeros.py | ErickSimoes/URI-Online-Judge | 7e6f141db2647b1d0d69951b064bd95b0ce4ba1a | [
"MIT"
] | null | null | null | 1065-pares-entre-cinco-numeros.py | ErickSimoes/URI-Online-Judge | 7e6f141db2647b1d0d69951b064bd95b0ce4ba1a | [
"MIT"
] | null | null | null | 1065-pares-entre-cinco-numeros.py | ErickSimoes/URI-Online-Judge | 7e6f141db2647b1d0d69951b064bd95b0ce4ba1a | [
"MIT"
] | 1 | 2019-10-29T16:51:29.000Z | 2019-10-29T16:51:29.000Z | par = 0
for _ in range(5):
num = int(input())
if num % 2 == 0:
par += 1
print(par, 'valores pares')
| 12.222222 | 27 | 0.527273 |
755448555b6e9730432590407eb688e632243c9c | 1,204 | py | Python | perfkitbenchmarker/linux_packages/iperf3.py | Nowasky/PerfKitBenchmarker | cfa88e269eb373780910896ed4bdc8db09469753 | [
"Apache-2.0"
] | 3 | 2018-04-28T13:06:14.000Z | 2020-06-09T02:39:44.000Z | perfkitbenchmarker/linux_packages/iperf3.py | Nowasky/PerfKitBenchmarker | cfa88e269eb373780910896ed4bdc8db09469753 | [
"Apache-2.0"
] | 1 | 2021-09-09T07:43:25.000Z | 2021-09-09T10:47:56.000Z | perfkitbenchmarker/linux_packages/iperf3.py | Nowasky/PerfKitBenchmarker | cfa88e269eb373780910896ed4bdc8db09469753 | [
"Apache-2.0"
] | 6 | 2019-06-11T18:59:57.000Z | 2021-03-02T19:14:42.000Z | # Copyright 2021 PerfKitBenchmarker 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... | 38.83871 | 87 | 0.737542 |
7bfed55a579da789231c48e03ad08b1ac860b67c | 25,763 | py | Python | keras/layers/wrappers.py | chasebrignac/keras | 2ad932ba4ea501af7c3163573fce994ef878d8ef | [
"MIT"
] | 1 | 2020-03-03T08:56:34.000Z | 2020-03-03T08:56:34.000Z | keras/layers/wrappers.py | chasebrignac/keras | 2ad932ba4ea501af7c3163573fce994ef878d8ef | [
"MIT"
] | 10 | 2018-09-27T23:03:18.000Z | 2018-12-05T23:32:33.000Z | keras/layers/wrappers.py | chasebrignac/keras | 2ad932ba4ea501af7c3163573fce994ef878d8ef | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Layers that augment the functionality of a base layer.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import copy
from ..engine.base_layer import Layer
from ..engine.base_layer import InputSpec
from ..utils.generic_utils impor... | 39.392966 | 98 | 0.608237 |
7d2eb81d14d6f696ce047ce29601b12652e9b220 | 286 | py | Python | test/lex_doc1.py | pyarnold/ply | 98bb0e095d72c8aed9de01c15b65fa096c745ce3 | [
"Unlicense"
] | 1 | 2020-12-18T01:07:42.000Z | 2020-12-18T01:07:42.000Z | test/lex_doc1.py | pyarnold/ply | 98bb0e095d72c8aed9de01c15b65fa096c745ce3 | [
"Unlicense"
] | null | null | null | test/lex_doc1.py | pyarnold/ply | 98bb0e095d72c8aed9de01c15b65fa096c745ce3 | [
"Unlicense"
] | null | null | null | # lex_doc1.py
#
# Missing documentation string
import sys
if ".." not in sys.path:
sys.path.insert(0, "..")
import ply.lex as lex
tokens = [
"PLUS",
"MINUS",
"NUMBER",
]
t_PLUS = r'\+'
t_MINUS = r'-'
def t_NUMBER(t):
pass
def t_error(t):
pass
lex.lex()
| 9.862069 | 30 | 0.56993 |
844419c97ccd0ed050ed5004ca38582cf0766427 | 2,779 | py | Python | samples/basic/executor/models/ietf/ietf-netconf-monitoring/nc-execute-ietf-netconf-monitoring-20-ydk.py | deom119/ydk-py-samples | 1ad6cc2b798f358ff835df93d12924df308b85fc | [
"Apache-2.0"
] | 104 | 2016-03-15T17:04:01.000Z | 2021-12-31T06:09:35.000Z | samples/basic/executor/models/ietf/ietf-netconf-monitoring/nc-execute-ietf-netconf-monitoring-20-ydk.py | https-maxus-github-com/ydk-py-samples | 1ad6cc2b798f358ff835df93d12924df308b85fc | [
"Apache-2.0"
] | 15 | 2016-03-15T23:09:47.000Z | 2020-08-13T12:13:18.000Z | samples/basic/executor/models/ietf/ietf-netconf-monitoring/nc-execute-ietf-netconf-monitoring-20-ydk.py | https-maxus-github-com/ydk-py-samples | 1ad6cc2b798f358ff835df93d12924df308b85fc | [
"Apache-2.0"
] | 87 | 2016-04-15T16:59:23.000Z | 2021-09-18T18:05:47.000Z | #!/usr/bin/env python
#
# Copyright 2016 Cisco Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 33.481928 | 78 | 0.666067 |
d061354971c3542ad5859e145a366e0886c3430a | 21,752 | py | Python | dabl/plot/utils.py | j1c/dabl | c70fef7ca276a9d2378d84183b1df2d56008b187 | [
"BSD-3-Clause"
] | null | null | null | dabl/plot/utils.py | j1c/dabl | c70fef7ca276a9d2378d84183b1df2d56008b187 | [
"BSD-3-Clause"
] | null | null | null | dabl/plot/utils.py | j1c/dabl | c70fef7ca276a9d2378d84183b1df2d56008b187 | [
"BSD-3-Clause"
] | null | null | null | from warnings import warn
from functools import reduce
import itertools
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib.patches import Rectangle
from seaborn.utils import despine
# from sklearn.dummy import DummyClassifier
# from sklearn.metrics import recall_score
from sklear... | 34.363349 | 88 | 0.614426 |
c903650b451dbd241027420860a19244192fd8e9 | 1,233 | py | Python | com.nast.email/src/main/resources/com/ur/urcap/mail/impl/daemon/MailDaemon.py | nagmik/URCap-EMail | fcf3fb269c06b4a8b66989bbf7a5b0c7b203d519 | [
"Apache-2.0"
] | 3 | 2020-01-05T14:59:49.000Z | 2020-12-14T21:06:10.000Z | com.nast.email/src/main/resources/com/ur/urcap/mail/impl/daemon/MailDaemon.py | nagmik/URCap-EMail | fcf3fb269c06b4a8b66989bbf7a5b0c7b203d519 | [
"Apache-2.0"
] | null | null | null | com.nast.email/src/main/resources/com/ur/urcap/mail/impl/daemon/MailDaemon.py | nagmik/URCap-EMail | fcf3fb269c06b4a8b66989bbf7a5b0c7b203d519 | [
"Apache-2.0"
] | 1 | 2020-01-20T21:20:18.000Z | 2020-01-20T21:20:18.000Z | #!/usr/bin/env python
import xmlrpclib
from SimpleXMLRPCServer import SimpleXMLRPCServer
import string
import smtplib
from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText
# *****************************
# send email
# *****************************
def sendMail( smtpHost, smtpPort, usernam... | 24.66 | 98 | 0.623682 |
5cb01068cee0b6d808f74931f393bf2882f44796 | 1,779 | py | Python | step1_run_time_series_converter.py | M2LabOrg/WRF_little_r | 8f46e733387db4c62f39426a03b6a03b3b406b0e | [
"Apache-2.0"
] | 1 | 2021-09-14T06:41:02.000Z | 2021-09-14T06:41:02.000Z | step1_run_time_series_converter.py | M2LabOrg/WRF_little_r | 8f46e733387db4c62f39426a03b6a03b3b406b0e | [
"Apache-2.0"
] | null | null | null | step1_run_time_series_converter.py | M2LabOrg/WRF_little_r | 8f46e733387db4c62f39426a03b6a03b3b406b0e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
This script creates little_r formatted files to be used
in WRF. They are part of the input files needed for observation nudging.
The script makes use of the function time_series_to_little_r, which is a
FORTRAN wrapper found in time_series_converter.py and record.py
Wrapper sources:
https:... | 31.210526 | 82 | 0.717257 |
d0657c8c7475f2b5d7ccd2206cb4843366bd0d82 | 260 | py | Python | arc/arc006/arc006a.py | c-yan/atcoder | 940e49d576e6a2d734288fadaf368e486480a948 | [
"MIT"
] | 1 | 2019-08-21T00:49:34.000Z | 2019-08-21T00:49:34.000Z | arc/arc006/arc006a.py | c-yan/atcoder | 940e49d576e6a2d734288fadaf368e486480a948 | [
"MIT"
] | null | null | null | arc/arc006/arc006a.py | c-yan/atcoder | 940e49d576e6a2d734288fadaf368e486480a948 | [
"MIT"
] | null | null | null | E = set(input().split())
B = input()
L = set(input().split())
t = E & L
if len(t) == 6:
print(1)
elif len(t) == 5:
if B in L:
print(2)
else:
print(3)
elif len(t) == 4:
print(4)
elif len(t) == 3:
print(5)
else:
print(0)
| 13.684211 | 24 | 0.465385 |
e6362bc8dca85d6c909c76274c9275f3ace0d201 | 6,141 | py | Python | buddy/migrations/0001_initial.py | gc-13/studybuddy | 4488475eea7844adecb955d79d17687c4e0accda | [
"HPND",
"MIT"
] | null | null | null | buddy/migrations/0001_initial.py | gc-13/studybuddy | 4488475eea7844adecb955d79d17687c4e0accda | [
"HPND",
"MIT"
] | null | null | null | buddy/migrations/0001_initial.py | gc-13/studybuddy | 4488475eea7844adecb955d79d17687c4e0accda | [
"HPND",
"MIT"
] | null | null | null | # Generated by Django 3.1 on 2020-11-13 16:55
from django.conf import settings
import django.contrib.auth.models
import django.contrib.auth.validators
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
... | 57.392523 | 329 | 0.617978 |
6208deefd49012e284c73519bc7ffe6ffbad0104 | 652 | py | Python | contrib/python/pypodman/pypodman/lib/__init__.py | stevekuznetsov/libpod | af791f340cfc3f8134e1fe0e3b0a6d3597706277 | [
"Apache-2.0"
] | null | null | null | contrib/python/pypodman/pypodman/lib/__init__.py | stevekuznetsov/libpod | af791f340cfc3f8134e1fe0e3b0a6d3597706277 | [
"Apache-2.0"
] | null | null | null | contrib/python/pypodman/pypodman/lib/__init__.py | stevekuznetsov/libpod | af791f340cfc3f8134e1fe0e3b0a6d3597706277 | [
"Apache-2.0"
] | null | null | null | """Remote podman client support library."""
from pypodman.lib.action_base import AbstractActionBase
from pypodman.lib.parser_actions import (BooleanAction, BooleanValidate,
PathAction, PositiveIntAction,
UnitAction)
from pypodman.lib.podm... | 29.636364 | 72 | 0.710123 |
e999071b638aee46a8642b223ab112f55905a720 | 3,818 | py | Python | linear_projection.py | evrimozmermer/self_supervised_learning_linear_projection | 2cad8362c1d3be37e4ce5e94abf7f5e5db227cb9 | [
"Apache-2.0"
] | 1 | 2021-11-26T14:27:09.000Z | 2021-11-26T14:27:09.000Z | linear_projection.py | evrimozmermer/self_supervised_learning_linear_projection | 2cad8362c1d3be37e4ce5e94abf7f5e5db227cb9 | [
"Apache-2.0"
] | null | null | null | linear_projection.py | evrimozmermer/self_supervised_learning_linear_projection | 2cad8362c1d3be37e4ce5e94abf7f5e5db227cb9 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat Oct 16 20:16:44 2021
@author: tekin.evrim.ozmermer
"""
import torchvision
import torch
from torch import nn
from classifiers.MLP_ExactSolution import Model as mlpes
class LinearProjection(nn.Module):
def __init__(self, cfg):
super().__init__()
self.cfg =... | 35.351852 | 97 | 0.57098 |
3b39bbfe59b4a940b81dac1981613e6c028361e3 | 2,876 | py | Python | alipay/aop/api/domain/KoubeiRetailWmsDeliverypackageQueryModel.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/KoubeiRetailWmsDeliverypackageQueryModel.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/KoubeiRetailWmsDeliverypackageQueryModel.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import simplejson as json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.OperateContext import OperateContext
class KoubeiRetailWmsDeliverypackageQueryModel(object):
def __init__(self):
self._express_code = None
self.... | 31.955556 | 81 | 0.636648 |
b844f8a46b62ebdf685fb854ec92baa2163e6f77 | 6,358 | py | Python | padmal/DataLogs/POC_Setup/2022-02-21:03-21-19/plot.py | CloudyPadmal/Phantom-Contiki | c1f0e53cb1aaaa946c36f2d1dc72499875c35f5b | [
"BSD-3-Clause"
] | 1 | 2022-03-07T18:50:41.000Z | 2022-03-07T18:50:41.000Z | padmal/DataLogs/POC_Setup/2022-02-21:03-21-19/plot.py | CloudyPadmal/Phantom-Contiki | c1f0e53cb1aaaa946c36f2d1dc72499875c35f5b | [
"BSD-3-Clause"
] | null | null | null | padmal/DataLogs/POC_Setup/2022-02-21:03-21-19/plot.py | CloudyPadmal/Phantom-Contiki | c1f0e53cb1aaaa946c36f2d1dc72499875c35f5b | [
"BSD-3-Clause"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
plt.rcParams["figure.figsize"] = (20, 8)
POWER_L = 0
RATE_P = 50
PACKETS = 2500
MIN_RSSI = -100
MAX_RSSI = -10
BINS = [i * (PACKETS / 10) for i in range(11)]
SCATTER = 5
L_WIDTH = 0.5
props = dict(boxstyle='round', facecolor='#cccccc', alpha=0.5)
TX_NODE = '5a7a.b... | 40.496815 | 119 | 0.56134 |
ae76db1762cd23ecd5394f05cf6db126f6dbc993 | 4,411 | py | Python | posts/migrations/0004_auto_20211108_0210.py | GrimJ0/yatube | 7c6919bdfd25130d853d0d3ffdb9a63f32660c73 | [
"BSD-3-Clause"
] | 1 | 2021-11-09T21:29:16.000Z | 2021-11-09T21:29:16.000Z | posts/migrations/0004_auto_20211108_0210.py | GrimJ0/yatube | 7c6919bdfd25130d853d0d3ffdb9a63f32660c73 | [
"BSD-3-Clause"
] | null | null | null | posts/migrations/0004_auto_20211108_0210.py | GrimJ0/yatube | 7c6919bdfd25130d853d0d3ffdb9a63f32660c73 | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 2.2.9 on 2021-11-07 23:10
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('posts', '0003_auto_20211107_2325'),
]
operations = [
migrations.AlterModel... | 41.224299 | 201 | 0.607345 |
3d3ac9456e88a1e83999d907de2204c66088cd8a | 1,080 | py | Python | exercise_2020_05/test_data_wrapper.py | yorkshire-geek/advent_of_code_2020 | 6868f89849ab7347689136b010020f8cd90f2d93 | [
"Apache-2.0"
] | null | null | null | exercise_2020_05/test_data_wrapper.py | yorkshire-geek/advent_of_code_2020 | 6868f89849ab7347689136b010020f8cd90f2d93 | [
"Apache-2.0"
] | null | null | null | exercise_2020_05/test_data_wrapper.py | yorkshire-geek/advent_of_code_2020 | 6868f89849ab7347689136b010020f8cd90f2d93 | [
"Apache-2.0"
] | null | null | null | import unittest
from .exercise_5 import DataWrapper
class MyTestCase(unittest.TestCase):
data_wrapper = DataWrapper("FBFBBFFRLR")
def test_row_data(self):
self.assertEqual("FBFBBFF", self.data_wrapper.get_row_str())
def test_seat_data(self):
self.assertEqual("RLR", self.data_wrapper.get_... | 29.189189 | 71 | 0.700926 |
23dfa9774dd013e4933c2bc360661be0a8433e5d | 1,527 | py | Python | openstack/tests/functional/network/v2/test_quota.py | NeCTAR-RC/openstacksdk | 60a24f6c4717a1f9a0e545c9a07e68afaedc5a27 | [
"Apache-2.0"
] | 99 | 2018-03-28T15:41:45.000Z | 2022-01-23T17:22:13.000Z | openstack/tests/functional/network/v2/test_quota.py | NeCTAR-RC/openstacksdk | 60a24f6c4717a1f9a0e545c9a07e68afaedc5a27 | [
"Apache-2.0"
] | 5 | 2018-05-25T16:54:23.000Z | 2021-11-21T02:27:16.000Z | openstack/tests/functional/network/v2/test_quota.py | NeCTAR-RC/openstacksdk | 60a24f6c4717a1f9a0e545c9a07e68afaedc5a27 | [
"Apache-2.0"
] | 104 | 2018-04-06T14:33:54.000Z | 2022-03-01T01:58:09.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 41.27027 | 77 | 0.707924 |
147b9a4a68b6d401d59161005d7af4109ea5f30d | 6,204 | py | Python | vendor-local/lib/python/celery/worker/bootsteps.py | Mozilla-GitHub-Standards/6f0d85288b5b0ef8beecb60345173dc14c98e40f48e1307a444ab1e08231e695 | bf6a382913901ad193d907f022086931df0de8c4 | [
"BSD-3-Clause"
] | 1 | 2015-07-13T03:29:04.000Z | 2015-07-13T03:29:04.000Z | vendor-local/lib/python/celery/worker/bootsteps.py | Mozilla-GitHub-Standards/6f0d85288b5b0ef8beecb60345173dc14c98e40f48e1307a444ab1e08231e695 | bf6a382913901ad193d907f022086931df0de8c4 | [
"BSD-3-Clause"
] | 2 | 2015-03-03T23:02:19.000Z | 2019-03-30T04:45:51.000Z | vendor-local/lib/python/celery/worker/bootsteps.py | Mozilla-GitHub-Standards/6f0d85288b5b0ef8beecb60345173dc14c98e40f48e1307a444ab1e08231e695 | bf6a382913901ad193d907f022086931df0de8c4 | [
"BSD-3-Clause"
] | 2 | 2016-04-15T11:43:05.000Z | 2016-04-15T11:43:15.000Z | # -*- coding: utf-8 -*-
"""
celery.worker.bootsteps
~~~~~~~~~~~~~~~~~~~~~~~
The boot-step components.
"""
from __future__ import absolute_import
from collections import defaultdict
from importlib import import_module
from celery.datastructures import DependencyGraph
from celery.utils.imports import inst... | 29.264151 | 79 | 0.620729 |
9a477ec2dfb5268c91fe53bc2f477afa12b61727 | 1,543 | py | Python | src/helper/paths_generator.py | amillert/pic2story | efa0c7c966392b4efb88ae370d8eb78cd2ab062b | [
"MIT"
] | 3 | 2020-09-27T21:25:01.000Z | 2021-02-14T14:12:04.000Z | src/helper/paths_generator.py | amillert/pic2story | efa0c7c966392b4efb88ae370d8eb78cd2ab062b | [
"MIT"
] | 15 | 2020-09-26T10:52:56.000Z | 2020-11-15T08:19:12.000Z | src/helper/paths_generator.py | amillert/pic2story | efa0c7c966392b4efb88ae370d8eb78cd2ab062b | [
"MIT"
] | null | null | null | """
Module providing some helper functions
"""
import os
# TODO: file needs general refactor
def extract(path):
"""
Function for extracting path or paths if directory
:param path: str
:return: str / list[str] # TODO: fix
"""
if os.path.isdir(path):
res = []
contents = os.list... | 22.691176 | 65 | 0.605314 |
51c817e9b4cb7e38af78f4d52835eda6f1b496cf | 12,028 | py | Python | mars/dataframe/base/astype.py | humaohai/mars | 11373f64c3039d424f9276e610ae5ad108ea0eb1 | [
"Apache-2.0"
] | 1 | 2020-06-25T13:51:16.000Z | 2020-06-25T13:51:16.000Z | mars/dataframe/base/astype.py | humaohai/mars | 11373f64c3039d424f9276e610ae5ad108ea0eb1 | [
"Apache-2.0"
] | null | null | null | mars/dataframe/base/astype.py | humaohai/mars | 11373f64c3039d424f9276e610ae5ad108ea0eb1 | [
"Apache-2.0"
] | null | null | null | # Copyright 1999-2020 Alibaba Group Holding Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 37.943218 | 110 | 0.587629 |
125499d1b492f52653e97ff9af0a87245a597744 | 26,887 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2016_09_01/operations/_virtual_networks_operations.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 2 | 2021-03-24T06:26:11.000Z | 2021-04-18T15:55:59.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2016_09_01/operations/_virtual_networks_operations.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 4 | 2019-04-17T17:57:49.000Z | 2020-04-24T21:11:22.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2016_09_01/operations/_virtual_networks_operations.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"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.
# Changes may ... | 48.620253 | 230 | 0.662774 |
4f58841e546993f965038dec2306af4284050f45 | 901 | py | Python | examples/centerize.py | penguinflys/imgviz | 3deadced1fcce8ca51716c705d07a058b1839514 | [
"MIT"
] | 171 | 2018-12-28T23:40:01.000Z | 2022-03-29T14:55:27.000Z | examples/centerize.py | penguinflys/imgviz | 3deadced1fcce8ca51716c705d07a058b1839514 | [
"MIT"
] | 16 | 2018-12-29T16:21:15.000Z | 2022-03-09T15:36:06.000Z | examples/centerize.py | penguinflys/imgviz | 3deadced1fcce8ca51716c705d07a058b1839514 | [
"MIT"
] | 23 | 2018-12-29T13:11:18.000Z | 2022-02-06T15:18:42.000Z | #!/usr/bin/env python
import matplotlib.pyplot as plt
import imgviz
def centerize():
data = imgviz.data.arc2017()
rgb = data["rgb"]
H, W = rgb.shape[:2]
centerized1 = imgviz.centerize(rgb, shape=(H, H))
rgb_T = rgb.transpose(1, 0, 2)
centerized2 = imgviz.centerize(rgb_T, shape=(H, H))
... | 20.022222 | 79 | 0.588235 |
0bc6164cf6aa4cdcc0bdd2265556a07b34572ac5 | 9,195 | py | Python | userbot/__init__.py | Rizkipratama183/OpenUserBot | 896c19686dd8ced2ec2e0faaad4d5dd41a53d707 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2020-05-18T00:17:28.000Z | 2020-05-18T00:17:28.000Z | userbot/__init__.py | Rizkipratama183/OpenUserBot | 896c19686dd8ced2ec2e0faaad4d5dd41a53d707 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 2 | 2020-05-19T13:01:21.000Z | 2020-05-19T20:46:27.000Z | userbot/__init__.py | Rizkipratama183/OpenUserBot | 896c19686dd8ced2ec2e0faaad4d5dd41a53d707 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | # Copyright (C) 2019 The Raphielscape Company LLC.
#
# Licensed under the Raphielscape Public License, Version 1.c (the "License");
# you may not use this file except in compliance with the License.
#
# thanks to penn5 for bug fixing
""" Userbot initialization. """
import os
from sys import version_info
from logging ... | 34.567669 | 406 | 0.736378 |
0a7922b9cf2a8d5632f3e4f6933a9a68f500bdb0 | 3,907 | py | Python | dataset/datasets.py | ruiming46zrm/CurricularFace | d853f3d28659f0929469029ec80e29e91e7b24c1 | [
"MIT"
] | 433 | 2020-04-02T04:24:50.000Z | 2022-03-21T12:57:53.000Z | dataset/datasets.py | clscy/CurricularFace | d853f3d28659f0929469029ec80e29e91e7b24c1 | [
"MIT"
] | 35 | 2020-04-09T02:13:52.000Z | 2022-03-07T07:48:10.000Z | dataset/datasets.py | clscy/CurricularFace | d853f3d28659f0929469029ec80e29e91e7b24c1 | [
"MIT"
] | 72 | 2020-04-02T21:57:37.000Z | 2022-01-10T02:50:33.000Z | import numpy as np
import torch
from PIL import Image
from torch.utils.data import Dataset
import os
from collections import defaultdict
class ImageDataset(Dataset):
def __init__(self, root_dir, transform):
super(ImageDataset, self).__init__()
self.transform = transform
self.root_dir = roo... | 35.198198 | 128 | 0.602252 |
4343906b42accb20dabd6fbbcacdfe128c509e37 | 4,472 | py | Python | naolution/utils/cnn.py | kostelansky17/NAOlution | 60101858c233e4f0e83d38c4f8733c71187a1639 | [
"MIT"
] | null | null | null | naolution/utils/cnn.py | kostelansky17/NAOlution | 60101858c233e4f0e83d38c4f8733c71187a1639 | [
"MIT"
] | null | null | null | naolution/utils/cnn.py | kostelansky17/NAOlution | 60101858c233e4f0e83d38c4f8733c71187a1639 | [
"MIT"
] | null | null | null | import numpy as np
from keras import backend as K
from keras import layers
from keras.models import Sequential
from keras.preprocessing import image as keras_image
from keras.activations import relu, tanh
from keras.initializers import random_normal
from keras.layers.core import Dense, Flatten, Dropout
from keras.layer... | 32.642336 | 114 | 0.695886 |
7a567e3282ff44c354f9f0236598d852bef6000b | 373 | py | Python | lec2.py | Caleb0929/IA241 | 2fed3e8d0f12bb8180a3e53beed036949cd9eaa0 | [
"MIT"
] | null | null | null | lec2.py | Caleb0929/IA241 | 2fed3e8d0f12bb8180a3e53beed036949cd9eaa0 | [
"MIT"
] | null | null | null | lec2.py | Caleb0929/IA241 | 2fed3e8d0f12bb8180a3e53beed036949cd9eaa0 | [
"MIT"
] | null | null | null | """
this is a regional comment
"""
#print(" hello world ") # this is a single line comment
#print( type("123.") )
#print("It's our second python class")
#print("Hello" + " World")
my_str = 'hello world'
print(my_str)
my_str = 'second str'
print(my_str)
my_int = 2
my_float = 2.0
print(my_int + 3)
print(my_i... | 12.032258 | 55 | 0.646113 |
3734437b152ba33d8b52edec0724174e259d179d | 3,584 | py | Python | imperative/python/megengine/tools/accuracy_shake_var_tree.py | Olalaye/MegEngine | 695d24f24517536e6544b07936d189dbc031bbce | [
"Apache-2.0"
] | 5,168 | 2020-03-19T06:10:04.000Z | 2022-03-31T11:11:54.000Z | imperative/python/megengine/tools/accuracy_shake_var_tree.py | Olalaye/MegEngine | 695d24f24517536e6544b07936d189dbc031bbce | [
"Apache-2.0"
] | 286 | 2020-03-25T01:36:23.000Z | 2022-03-31T10:26:33.000Z | imperative/python/megengine/tools/accuracy_shake_var_tree.py | Olalaye/MegEngine | 695d24f24517536e6544b07936d189dbc031bbce | [
"Apache-2.0"
] | 515 | 2020-03-19T06:10:05.000Z | 2022-03-30T09:15:59.000Z | #!/usr/bin/env python3
# -*-coding=utf-8-*-
# This tool is used to analyze the file generated by compare_binary_iodump.py.
# parse() can build a dependency tree with those varnodes
# where accuracy shake occurs and show the root varnodes.
# get_varNode()/get_dependence_list()/get_reference_list()/show_src_info()
# are... | 27.358779 | 82 | 0.577288 |
672808a32edbecea6f4841e38b145440d7c0ecd4 | 1,197 | py | Python | dlhub_sdk/utils/schemas.py | DLHub-Argonne/dlhub_sdk | 9449f120490cba40fa43d4ccb06a0d1d7e78f1fd | [
"Apache-2.0"
] | 24 | 2018-11-01T12:48:21.000Z | 2021-12-30T21:19:16.000Z | dlhub_sdk/utils/schemas.py | DLHub-Argonne/dlhub_sdk | 9449f120490cba40fa43d4ccb06a0d1d7e78f1fd | [
"Apache-2.0"
] | 79 | 2018-11-27T16:41:29.000Z | 2022-03-25T17:32:09.000Z | dlhub_sdk/utils/schemas.py | DLHub-Argonne/dlhub_toolbox | d8e06ba4247ebd3a955782099a4a9fa68890bea4 | [
"Apache-2.0"
] | 4 | 2019-02-27T16:23:19.000Z | 2020-09-19T01:25:30.000Z | """Utilities for validating against DLHub schemas"""
from typing import Union
from jsonschema import Draft7Validator, RefResolver
import requests
from dlhub_sdk.models import BaseMetadataModel
_schema_repo = "https://raw.githubusercontent.com/DLHub-Argonne/dlhub_schemas/master/schemas/"
def validate_against_dlhub_... | 34.2 | 94 | 0.736842 |
85724628b3792ced75fd57e833bd34daef742c58 | 475 | py | Python | full-stack-angular-ngrx/backend/src/core/services/pg_data_session.py | t4d-classes/angular_02212022 | 152dfa4b14ee84c1c34cef0b852349b250103e3b | [
"MIT"
] | null | null | null | full-stack-angular-ngrx/backend/src/core/services/pg_data_session.py | t4d-classes/angular_02212022 | 152dfa4b14ee84c1c34cef0b852349b250103e3b | [
"MIT"
] | null | null | null | full-stack-angular-ngrx/backend/src/core/services/pg_data_session.py | t4d-classes/angular_02212022 | 152dfa4b14ee84c1c34cef0b852349b250103e3b | [
"MIT"
] | null | null | null | from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from src.core.interfaces.data_session import DataSessionInterface
class PgDataSession(DataSessionInterface):
def __init__(self, url: str, name: str, user: str,
password: str):
engine = create_engine(
... | 27.941176 | 65 | 0.690526 |
0dd8978b9c29cc5df77b21474df7b16fd0eca5de | 1,686 | py | Python | eng/utils.py | Dalloriam/popeui | f3477cd546e885bc53e755b3eb1452ce43ef5697 | [
"MIT"
] | 30 | 2016-08-25T14:47:49.000Z | 2017-12-20T23:01:03.000Z | eng/utils.py | dalloriam/engel | f3477cd546e885bc53e755b3eb1452ce43ef5697 | [
"MIT"
] | 25 | 2016-07-18T01:57:07.000Z | 2016-08-24T18:33:54.000Z | eng/utils.py | dalloriam/engel | f3477cd546e885bc53e755b3eb1452ce43ef5697 | [
"MIT"
] | 5 | 2016-08-26T12:54:42.000Z | 2017-09-17T00:08:26.000Z | import os
from jinja2 import Template
from eng.logging import error, success
def create_folder(folder_path):
if os.path.isdir(folder_path):
error("Directory {dirName} already exists.".format(dirName=os.path.abspath(folder_path)))
os.mkdir(folder_path)
success(os.path.abspath(folder_path) + "/")
... | 30.654545 | 97 | 0.69395 |
cc71595b8bbf92207b50b99a748848dac230bf4e | 500 | py | Python | plotly/validators/histogram/marker/colorbar/_tick0.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | 2 | 2020-03-24T11:41:14.000Z | 2021-01-14T07:59:43.000Z | plotly/validators/histogram/marker/colorbar/_tick0.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | null | null | null | plotly/validators/histogram/marker/colorbar/_tick0.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | 4 | 2019-06-03T14:49:12.000Z | 2022-01-06T01:05:12.000Z | import _plotly_utils.basevalidators
class Tick0Validator(_plotly_utils.basevalidators.AnyValidator):
def __init__(
self,
plotly_name='tick0',
parent_name='histogram.marker.colorbar',
**kwargs
):
super(Tick0Validator, self).__init__(
plotly_name=plotly_name,... | 25 | 64 | 0.594 |
dc6d551743c6ad44bc972f07050291cf490441bb | 374 | py | Python | Catkin_PKG_Car/build/race_robot/catkin_generated/pkg.installspace.context.pc.py | jessecha/OPCAS | 2b51543b4ad1ee37dba2e45a0c7d0b872309d418 | [
"MIT"
] | 1 | 2021-02-28T05:58:50.000Z | 2021-02-28T05:58:50.000Z | Catkin_PKG_Car/build/race_robot/catkin_generated/pkg.installspace.context.pc.py | jessecha/OPCAS | 2b51543b4ad1ee37dba2e45a0c7d0b872309d418 | [
"MIT"
] | null | null | null | Catkin_PKG_Car/build/race_robot/catkin_generated/pkg.installspace.context.pc.py | jessecha/OPCAS | 2b51543b4ad1ee37dba2e45a0c7d0b872309d418 | [
"MIT"
] | null | null | null | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else []
PROJECT_CATKIN_DEPENDS = "".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else []
PROJECT_NAME = "race_robot"
PROJECT_SPACE_DIR = "/hom... | 41.555556 | 68 | 0.705882 |
3fd63e1d10600a20b76c274d31c46bbb2f7fff83 | 631 | py | Python | src/global_get_latent.py | P2Oileen/oh-my-face | b73cb8ea713205bbf2bc1408145fa668c715359b | [
"MIT"
] | 45 | 2021-12-20T07:49:17.000Z | 2022-03-18T17:08:30.000Z | src/global_get_latent.py | P2Oileen/oh-my-face | b73cb8ea713205bbf2bc1408145fa668c715359b | [
"MIT"
] | null | null | null | src/global_get_latent.py | P2Oileen/oh-my-face | b73cb8ea713205bbf2bc1408145fa668c715359b | [
"MIT"
] | null | null | null | from cog_predict import get_latent_code
import cv2
import argparse
import torch
parser = argparse.ArgumentParser(description='Process Options.')
parser.add_argument('--input_dir', default='input.jpg', type=str)
parser.add_argument('--data_type', default='face', type=str) #[face, cat]
parser.add_argument('--weight_dir',... | 37.117647 | 73 | 0.773376 |
613a67a11ccf95894141c3d36685b8bd82d00fd0 | 58 | py | Python | flavio/physics/edms/__init__.py | jasonaebischerGIT/flavio | b8d833c8380c619112ed75175cb7db52b788b1cd | [
"MIT"
] | null | null | null | flavio/physics/edms/__init__.py | jasonaebischerGIT/flavio | b8d833c8380c619112ed75175cb7db52b788b1cd | [
"MIT"
] | null | null | null | flavio/physics/edms/__init__.py | jasonaebischerGIT/flavio | b8d833c8380c619112ed75175cb7db52b788b1cd | [
"MIT"
] | null | null | null | r"""Electric dipole moments."""
from . import neutronedm
| 14.5 | 31 | 0.724138 |
21ab7aff8e27cf2dfd4fd785c56d30b37a749332 | 516 | py | Python | configurator/missile/classes/PersistenceStrategy.py | ClockworkOrigins/m2etis | 3b9c0f98c172f48889e75fe0b80a61a0e47670f5 | [
"Apache-2.0"
] | 2 | 2016-01-24T22:08:27.000Z | 2017-01-01T13:06:44.000Z | configurator/missile/classes/PersistenceStrategy.py | ClockworkOrigins/m2etis | 3b9c0f98c172f48889e75fe0b80a61a0e47670f5 | [
"Apache-2.0"
] | null | null | null | configurator/missile/classes/PersistenceStrategy.py | ClockworkOrigins/m2etis | 3b9c0f98c172f48889e75fe0b80a61a0e47670f5 | [
"Apache-2.0"
] | null | null | null | import copy
import logging
from strategy import Strategy
logging.basicConfig(level=logging.INFO)
LOG = logging.getLogger(__name__)
class PersistenceStrategy(Strategy):
def __init__(self, strategy):
self.__dict__ = copy.deepcopy(strategy.__dict__)
def compatible(self, event):
if event is N... | 23.454545 | 103 | 0.670543 |
9d67d91f6844786c8bf5b84f3c6a90ee733b9574 | 210 | py | Python | chartpy/__init__.py | Joukahainen/chartpy | 410f9e4553cb07be7d11823cad404f10da079ada | [
"Apache-2.0"
] | 519 | 2016-08-17T10:38:58.000Z | 2022-03-30T19:30:15.000Z | chartpy/__init__.py | distagon/chartpy | 39282158cdb6bbddba1ea1d5faa9ff182c3ceb39 | [
"Apache-2.0"
] | 5 | 2016-08-21T22:16:17.000Z | 2019-12-06T06:17:13.000Z | chartpy/__init__.py | distagon/chartpy | 39282158cdb6bbddba1ea1d5faa9ff182c3ceb39 | [
"Apache-2.0"
] | 108 | 2016-08-21T12:01:10.000Z | 2022-03-25T06:38:58.000Z | __author__ = 'saeedamen'
from chartpy.chart import Chart
from chartpy.style import Style
from chartpy.canvas import Canvas
from chartpy.chartconstants import ChartConstants
from chartpy.twitter import Twitter
| 26.25 | 49 | 0.847619 |
09cc0ee75bb333141c9a82af2ffabac227365dda | 11,780 | py | Python | app/DataCollection/models.py | RohitKochhar/FTU-Django-Dashboard | 4015969058184ed9f11c48915ed1515b4524f46a | [
"Apache-2.0"
] | null | null | null | app/DataCollection/models.py | RohitKochhar/FTU-Django-Dashboard | 4015969058184ed9f11c48915ed1515b4524f46a | [
"Apache-2.0"
] | null | null | null | app/DataCollection/models.py | RohitKochhar/FTU-Django-Dashboard | 4015969058184ed9f11c48915ed1515b4524f46a | [
"Apache-2.0"
] | null | null | null | ################################################################################
# File Name: models.py
#
# File Author: Rohit Singh
#
# File Description:
# This file defines models used
# in our database
#
# File History:
# 2020-11-05: Result model added by Rohit
# 2020-11-02: Created by Rohit
#
... | 45.836576 | 148 | 0.521902 |
f14097d8b129653ff56adc6c32ccac5f0fccc066 | 92,214 | py | Python | test/unit/common/test_db.py | CiscoSystems/swift | d5067017f0509129d8d3e41aeff5d7c2a634643e | [
"Apache-2.0"
] | null | null | null | test/unit/common/test_db.py | CiscoSystems/swift | d5067017f0509129d8d3e41aeff5d7c2a634643e | [
"Apache-2.0"
] | null | null | null | test/unit/common/test_db.py | CiscoSystems/swift | d5067017f0509129d8d3e41aeff5d7c2a634643e | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2010-2012 OpenStack, 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 ... | 45.22511 | 94 | 0.58245 |
35d14ef7657d4272430c1b7767d4d43612636748 | 9,851 | py | Python | python/paddle/fluid/layers/metric_op.py | LWhite027/PaddleBox | b14bcdf285dd8829e11ab12cc815ac1b1ab62694 | [
"Apache-2.0"
] | 10 | 2021-05-12T07:20:32.000Z | 2022-03-04T08:21:56.000Z | python/paddle/fluid/layers/metric_op.py | AFLee/Paddle | 311b3b44fc7d51d4d66d90ab8a3fc0d42231afda | [
"Apache-2.0"
] | 1 | 2021-01-25T09:40:19.000Z | 2021-01-25T09:40:19.000Z | python/paddle/fluid/layers/metric_op.py | AFLee/Paddle | 311b3b44fc7d51d4d66d90ab8a3fc0d42231afda | [
"Apache-2.0"
] | 18 | 2021-05-19T08:01:49.000Z | 2022-02-11T03:11:32.000Z | # Copyright (c) 2018 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 app... | 39.09127 | 258 | 0.617501 |
3fad4eec46ea2d6b02d515d89bff8163657fb518 | 739 | py | Python | configs/liteflownet2/liteflownet2_pre_M4S4R4_8x1_flyingchairs_320x448.py | hologerry/mmflow | 40caf064851bd95317424e31cc137c0007a2bece | [
"Apache-2.0"
] | 481 | 2021-11-16T07:04:23.000Z | 2022-03-31T22:21:21.000Z | configs/liteflownet2/liteflownet2_pre_M4S4R4_8x1_flyingchairs_320x448.py | hologerry/mmflow | 40caf064851bd95317424e31cc137c0007a2bece | [
"Apache-2.0"
] | 72 | 2021-11-16T12:25:55.000Z | 2022-03-28T13:10:45.000Z | configs/liteflownet2/liteflownet2_pre_M4S4R4_8x1_flyingchairs_320x448.py | hologerry/mmflow | 40caf064851bd95317424e31cc137c0007a2bece | [
"Apache-2.0"
] | 48 | 2021-11-16T06:48:46.000Z | 2022-03-30T12:46:40.000Z | _base_ = [
'../_base_/models/liteflownet2/liteflownet2_pre_M4S4R4.py',
'../_base_/datasets/flyingchairs_320x448.py',
'../_base_/default_runtime.py'
]
optimizer = dict(type='Adam', lr=1e-4, weight_decay=0.0004, betas=(0.9, 0.999))
optimizer_config = dict(grad_clip=None)
# learning policy
lr_config = dict(
... | 41.055556 | 125 | 0.756428 |
76984a93b2c732b02e1fefb6db23bdb08a9ef297 | 884 | py | Python | tfxc/bigquery.py | sfujiwara/tfxc | 5469862e7c6bdac89edb0bd7cbc1808b8c7e7665 | [
"MIT"
] | null | null | null | tfxc/bigquery.py | sfujiwara/tfxc | 5469862e7c6bdac89edb0bd7cbc1808b8c7e7665 | [
"MIT"
] | null | null | null | tfxc/bigquery.py | sfujiwara/tfxc | 5469862e7c6bdac89edb0bd7cbc1808b8c7e7665 | [
"MIT"
] | null | null | null | from google.cloud import bigquery
from tfx.types.experimental.simple_artifacts import Dataset
from tfx import v1 as tfx
# TODO(sfujiwara): Automatically create dataset if it does not exist.
@tfx.dsl.components.component
def BigQueryTableGen(
project: tfx.dsl.components.Parameter[str],
query: tfx.dsl.component... | 34 | 95 | 0.757919 |
93b98023e6d9551444c949db1eb1b44b1863a6d9 | 19,641 | py | Python | indico/util/mdx_latex.py | EdverCompany/indico | c4b5e7b2e3a47355d850a342ed527c09334ef336 | [
"MIT"
] | null | null | null | indico/util/mdx_latex.py | EdverCompany/indico | c4b5e7b2e3a47355d850a342ed527c09334ef336 | [
"MIT"
] | 5 | 2021-04-08T19:26:47.000Z | 2022-01-24T16:30:18.000Z | indico/util/mdx_latex.py | EdverCompany/indico | c4b5e7b2e3a47355d850a342ed527c09334ef336 | [
"MIT"
] | 2 | 2019-02-24T17:29:10.000Z | 2021-04-08T19:23:27.000Z | # This file is part of Indico.
# Copyright (C) 2002 - 2021 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
"""Extension to python-markdown to support LaTeX (rather than html) output.
Authored by Rufus Pollock: <h... | 39.360721 | 120 | 0.600071 |
be23dabcf4cf24016633887ccb3fc264b5227895 | 14,011 | py | Python | linkfinder.py | storenth/LinkFinder | f23e221aed9ed9733a9e667a0a5ec1fbd881c93d | [
"MIT"
] | null | null | null | linkfinder.py | storenth/LinkFinder | f23e221aed9ed9733a9e667a0a5ec1fbd881c93d | [
"MIT"
] | null | null | null | linkfinder.py | storenth/LinkFinder | f23e221aed9ed9733a9e667a0a5ec1fbd881c93d | [
"MIT"
] | null | null | null | #! /usr/bin/python3
# Python 3
# LinkFinder
# By Gerben_Javado
# Powered by storenth
# Fix webbrowser bug for MacOS
import os
os.environ["BROWSER"] = "open"
# Import libraries
import re, sys, glob, html, argparse, jsbeautifier, webbrowser, subprocess, base64, ssl, xml.etree.ElementTree
from gzip import GzipFile
from... | 34.509852 | 149 | 0.523374 |
3fc5288cdbf71fe08846bd47f7b688da3b7df09e | 4,741 | py | Python | PySpectrograph/Spectrograph/Spectrograph.py | crawfordsm/pyspectrograph | 4237ba4b4fe08a69e1d6487924d959f089ecca46 | [
"BSD-3-Clause"
] | 18 | 2015-01-11T21:04:59.000Z | 2021-08-06T18:30:47.000Z | PySpectrograph/Spectrograph/Spectrograph.py | crawfordsm/pyspectrograph | 4237ba4b4fe08a69e1d6487924d959f089ecca46 | [
"BSD-3-Clause"
] | 14 | 2015-04-23T09:39:16.000Z | 2017-12-03T12:49:05.000Z | PySpectrograph/Spectrograph/Spectrograph.py | crawfordsm/pyspectrograph | 4237ba4b4fe08a69e1d6487924d959f089ecca46 | [
"BSD-3-Clause"
] | 5 | 2015-04-23T08:17:37.000Z | 2019-06-22T13:36:47.000Z | """Spectrograph is a class that general describes a spectrograph. This includes
describing the telescope, slit, collimator, grating, camera, and detector.
HISTORY
20090912 SMC First written by SM Crawford
Limitations:
-Still need to verify how alpha, grating angle, beta, and camera angle
to see if I can hardwire ... | 30.006329 | 119 | 0.64016 |
3ddf31e510a4c981fb6715ad9a61470902d8cc8b | 3,751 | py | Python | basis_set_exchange/tests/test_unused.py | ltalirz/basis_set_exchange | 0e9601d7b37ae7672a78a335e34ac5591dd509f0 | [
"BSD-3-Clause"
] | 108 | 2018-07-09T14:23:49.000Z | 2022-03-30T08:26:15.000Z | basis_set_exchange/tests/test_unused.py | susilehtola/basis_set_exchange | 0185cecc56a67ad561167290fd56ac86c0c76ce7 | [
"BSD-3-Clause"
] | 230 | 2018-06-01T15:15:49.000Z | 2022-03-30T12:02:11.000Z | basis_set_exchange/tests/test_unused.py | susilehtola/basis_set_exchange | 0185cecc56a67ad561167290fd56ac86c0c76ce7 | [
"BSD-3-Clause"
] | 38 | 2018-07-20T15:16:47.000Z | 2022-03-30T08:32:45.000Z | '''
Test for unused data
'''
import os
import basis_set_exchange as bse
from .common_testvars import data_dir, all_component_paths, all_element_paths, all_table_paths, all_metadata_files, all_families
def test_unused_data():
'''
Test for any unused data in the data directory
'''
# All elements conta... | 34.731481 | 128 | 0.659024 |
e167e1cd7853cce0477d7a7d211b887237ff0b03 | 3,562 | py | Python | bindings/python/ensmallen/datasets/string/tetragenococcussolitariusnbrc100494.py | AnacletoLAB/ensmallen | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 5 | 2021-09-10T18:31:58.000Z | 2022-03-24T04:28:04.000Z | bindings/python/ensmallen/datasets/string/tetragenococcussolitariusnbrc100494.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/ensmallen/datasets/string/tetragenococcussolitariusnbrc100494.py | AnacletoLAB/ensmallen | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 3 | 2021-01-14T02:20:59.000Z | 2021-08-04T19:09:52.000Z | """
This file offers the methods to automatically retrieve the graph Tetragenococcus solitarius NBRC 100494.
The graph is automatically retrieved from the STRING repository.
References
---------------------
Please cite the following if you use the data:
```bib
@article{szklarczyk2019string,
title={STRING v11: ... | 33.92381 | 223 | 0.684166 |
8644d3c9d57f0468b133f626a088f6f5531ebd02 | 988 | py | Python | server/gdserver/protocol.py | daimin/AiwanGobang | 26ed7488403986f061a2144a14a8e870bccf226c | [
"MIT"
] | null | null | null | server/gdserver/protocol.py | daimin/AiwanGobang | 26ed7488403986f061a2144a14a8e870bccf226c | [
"MIT"
] | null | null | null | server/gdserver/protocol.py | daimin/AiwanGobang | 26ed7488403986f061a2144a14a8e870bccf226c | [
"MIT"
] | null | null | null | # coding:utf-8
from __future__ import absolute_import, division, print_function, \
with_statement
__author__ = 'daimin'
from message import Message
DEFAULT = Message(0x0000)
VERSION = Message(0x0001)
HEARTBEAT = Message(0x0002)
LOGIN = Message(0x0003)
RANDOM_CHAT = Message(0x0... | 27.444444 | 67 | 0.665992 |
3f63a75dc4b20882fd1556b89394d7d97e8f7ca2 | 39,710 | py | Python | discord/http.py | Rayster4/discord.py-1.7.3 | 4a4c60a8fab7bf00eac2e9ffbb5621f68a4c6b6f | [
"MIT"
] | 21 | 2021-03-29T05:49:35.000Z | 2022-03-18T09:02:34.000Z | discord/http.py | Rayster4/discord.py-1.7.3 | 4a4c60a8fab7bf00eac2e9ffbb5621f68a4c6b6f | [
"MIT"
] | 15 | 2021-04-10T11:08:09.000Z | 2022-03-22T07:48:58.000Z | discord/http.py | Rayster4/discord.py-1.7.3 | 4a4c60a8fab7bf00eac2e9ffbb5621f68a4c6b6f | [
"MIT"
] | 31 | 2021-03-29T05:54:57.000Z | 2022-03-22T16:58:57.000Z | # -*- coding: utf-8 -*-
"""
The MIT License (MIT)
Copyright (c) 2015-present Rapptz
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... | 39.473161 | 143 | 0.604357 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.