hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 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 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 251 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7dad1f1269de17e831dca23ea74171d92ef7258b | 34,626 | py | Python | ringallreduce_simulator.py | hgao10/horovod_simulation | 3678a7d1d424931f48af4b53ef3293073af71c2e | [
"Apache-2.0"
] | null | null | null | ringallreduce_simulator.py | hgao10/horovod_simulation | 3678a7d1d424931f48af4b53ef3293073af71c2e | [
"Apache-2.0"
] | null | null | null | ringallreduce_simulator.py | hgao10/horovod_simulation | 3678a7d1d424931f48af4b53ef3293073af71c2e | [
"Apache-2.0"
] | null | null | null | import collections
import time
import heapq
from horovod_simulator_config import SimulatorConfig, SchedulingDisc
from utils.logger import get_logger
import typing
from queue import PriorityQueue
# compute iteration time from records
def compute_iteration_time(record, simulator):
logger = get_logger("compute_i... | 55.313099 | 210 | 0.6591 |
7daef8b7f43d19ad4b4a4241d53911344a3bad74 | 675 | py | Python | ABNOOrchestrator/ABNOParameters.py | HPNLAB/ABNO-FUTEBOL | 3a1dbee11abd9a808d337a6bbdccba052671d33c | [
"Apache-2.0"
] | null | null | null | ABNOOrchestrator/ABNOParameters.py | HPNLAB/ABNO-FUTEBOL | 3a1dbee11abd9a808d337a6bbdccba052671d33c | [
"Apache-2.0"
] | null | null | null | ABNOOrchestrator/ABNOParameters.py | HPNLAB/ABNO-FUTEBOL | 3a1dbee11abd9a808d337a6bbdccba052671d33c | [
"Apache-2.0"
] | null | null | null | __author__ = 'alejandroaguado'
from xml.etree import ElementTree
| 35.526316 | 51 | 0.638519 |
7daf7e347025b6adafd5d8ff1bdd20e4296b68c6 | 15,533 | py | Python | gcloud/bigtable/_generated/bigtable_table_service_messages_pb2.py | scrapinghub/gcloud-python | 1ec6d636ebf2c4d618aca6b2485fbbfa5f0fde29 | [
"Apache-2.0"
] | null | null | null | gcloud/bigtable/_generated/bigtable_table_service_messages_pb2.py | scrapinghub/gcloud-python | 1ec6d636ebf2c4d618aca6b2485fbbfa5f0fde29 | [
"Apache-2.0"
] | null | null | null | gcloud/bigtable/_generated/bigtable_table_service_messages_pb2.py | scrapinghub/gcloud-python | 1ec6d636ebf2c4d618aca6b2485fbbfa5f0fde29 | [
"Apache-2.0"
] | 2 | 2017-07-30T16:18:23.000Z | 2020-10-14T11:24:18.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/bigtable/admin/table/v1/bigtable_table_service_messages.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf impo... | 39.224747 | 1,208 | 0.771905 |
7dafc11fd8fb86ab44db99cb63fe8f3a5c118843 | 277 | py | Python | influencer-detection/src/api/influencers/api/v1.py | luisblazquezm/influencer-detection | bd8aec83cbd8e5fbb3231824b5e274c47f491501 | [
"Apache-2.0"
] | 4 | 2021-05-22T16:33:41.000Z | 2021-11-22T23:44:40.000Z | influencer-detection/src/api/influencers/api/v1.py | Alburrito/influencer-detection | bd8aec83cbd8e5fbb3231824b5e274c47f491501 | [
"Apache-2.0"
] | null | null | null | influencer-detection/src/api/influencers/api/v1.py | Alburrito/influencer-detection | bd8aec83cbd8e5fbb3231824b5e274c47f491501 | [
"Apache-2.0"
] | 2 | 2021-05-21T16:34:14.000Z | 2021-09-29T12:59:49.000Z | #!flask/bin/python
# Copyright 2021 Luis Blazquez Miambres (@luisblazquezm)
# See LICENSE for details.
from flask_restx import Api
api = Api(version='1.0',
title='Influencer Detection Project',
description="**PORBI Influencer Detection project's Flask RESTX API**") | 27.7 | 75 | 0.747292 |
7db08f8c76f09b843e5f713087e6a5fa445f6755 | 7,543 | py | Python | core/models/sparse_bp_cnn.py | JeremieMelo/L2ight | 67f93b66ddf8bb5a365834b84ed6acdbc4f48eaf | [
"MIT"
] | 7 | 2021-11-02T16:21:47.000Z | 2022-03-09T06:01:25.000Z | core/models/sparse_bp_cnn.py | JeremieMelo/L2ight | 67f93b66ddf8bb5a365834b84ed6acdbc4f48eaf | [
"MIT"
] | null | null | null | core/models/sparse_bp_cnn.py | JeremieMelo/L2ight | 67f93b66ddf8bb5a365834b84ed6acdbc4f48eaf | [
"MIT"
] | null | null | null | '''
Description:
Author: Jiaqi Gu (jqgu@utexas.edu)
Date: 2021-10-24 16:23:50
LastEditors: Jiaqi Gu (jqgu@utexas.edu)
LastEditTime: 2021-10-24 16:23:50
'''
from collections import OrderedDict
from typing import Callable, Dict, List, Optional, Tuple, Union
import numpy as np
import torch
import torch.nn.functional as F... | 31.298755 | 113 | 0.56158 |
7db09573c7b7fdf192db6f472bcb81e9222dc388 | 9,017 | py | Python | lite/demo/python/mobilenetv1_full_api.py | 714627034/Paddle-Lite | 015ba88a4d639db0b73603e37f83e47be041a4eb | [
"Apache-2.0"
] | 3 | 2021-06-17T11:00:13.000Z | 2021-08-10T10:28:59.000Z | lite/demo/python/mobilenetv1_full_api.py | 714627034/Paddle-Lite | 015ba88a4d639db0b73603e37f83e47be041a4eb | [
"Apache-2.0"
] | null | null | null | lite/demo/python/mobilenetv1_full_api.py | 714627034/Paddle-Lite | 015ba88a4d639db0b73603e37f83e47be041a4eb | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019 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... | 38.046414 | 113 | 0.663303 |
7db0ea31fec60827935b4f0a8b82bcb2927b7b8f | 2,218 | py | Python | discord_ui/errors.py | brotherelric/discord-ui | 6f8cd994aff66fb51f385d23907b3a612546cbe9 | [
"MIT"
] | 26 | 2021-08-21T15:34:13.000Z | 2022-03-26T13:50:48.000Z | discord_ui/errors.py | brotherelric/discord-ui | 6f8cd994aff66fb51f385d23907b3a612546cbe9 | [
"MIT"
] | 12 | 2021-08-21T15:24:00.000Z | 2022-02-25T02:49:01.000Z | discord_ui/errors.py | brotherelric/discord-ui | 6f8cd994aff66fb51f385d23907b3a612546cbe9 | [
"MIT"
] | 10 | 2021-09-03T12:31:13.000Z | 2022-03-29T06:24:06.000Z | from discord.ext.commands import BadArgument | 69.3125 | 171 | 0.656898 |
7db12d202da616ad47115b53db18fc8f8d4df1a8 | 178 | py | Python | Python/bot_2.py | maurovasconcelos/Ola-Mundo | 526c6c271fbe916c4f9f22153828e4d8c726a544 | [
"MIT"
] | 1 | 2021-02-16T17:36:53.000Z | 2021-02-16T17:36:53.000Z | Python/bot_2.py | maurovasconcelos/Ola-Mundo | 526c6c271fbe916c4f9f22153828e4d8c726a544 | [
"MIT"
] | null | null | null | Python/bot_2.py | maurovasconcelos/Ola-Mundo | 526c6c271fbe916c4f9f22153828e4d8c726a544 | [
"MIT"
] | null | null | null | from selenium import webdriver
navegador = webdriver.Chrome()
navegador.get("https://webstatic-sea.mihoyo.com/ys/event/signin-sea/index.html?act_id=e202102251931481&lang=pt-pt") | 44.5 | 115 | 0.808989 |
7db1db7e3a4320d312306a5a9f6265803704a70b | 18,177 | py | Python | vendor/istio.io/api/python/istio_api/envoy/config/filter/http/jwt_auth/v2alpha1/config_pb2.py | PinZhang/istio | dce455456d77ca5af34ba5848f9704577349c6bd | [
"Apache-2.0"
] | 794 | 2018-07-12T06:08:10.000Z | 2019-05-12T20:06:00.000Z | vendor/istio.io/api/python/istio_api/envoy/config/filter/http/jwt_auth/v2alpha1/config_pb2.py | PinZhang/istio | dce455456d77ca5af34ba5848f9704577349c6bd | [
"Apache-2.0"
] | 25 | 2018-07-20T08:53:42.000Z | 2019-05-05T06:23:11.000Z | vendor/istio.io/api/python/istio_api/envoy/config/filter/http/jwt_auth/v2alpha1/config_pb2.py | PinZhang/istio | dce455456d77ca5af34ba5848f9704577349c6bd | [
"Apache-2.0"
] | 116 | 2018-07-12T15:24:17.000Z | 2019-05-10T10:11:32.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: envoy/config/filter/http/jwt_auth/v2alpha1/config.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from g... | 45.329177 | 1,704 | 0.760301 |
7db2d15a3db81041f88feba1273d33752a9d0183 | 1,730 | py | Python | filestream.py | ziyua/filestream | b79e9dc550d39c6bd5685eb0311f11d3a63537d9 | [
"Apache-2.0"
] | null | null | null | filestream.py | ziyua/filestream | b79e9dc550d39c6bd5685eb0311f11d3a63537d9 | [
"Apache-2.0"
] | null | null | null | filestream.py | ziyua/filestream | b79e9dc550d39c6bd5685eb0311f11d3a63537d9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: gb2312 -*-
import fileinput
import os
if __name__ == '__main__':
fs = FileStream('1.txt', 1024)
print fs.cuttimes()
print fs.lastsize()
while 1:
fby = fs.getstream()
if fby is not None:
print '--------'
print fby, len(fby)
... | 25.441176 | 54 | 0.514451 |
7db33bbd439b5c7268b5e21a4ea3bb5bcb4b092b | 3,148 | py | Python | libvirt_vm_optimizer/util/arg_parser.py | atiratree/libvirt-vm-optimizer | a022391ea86e3609e3b9c01fc2b84279939a26ab | [
"MIT"
] | 1 | 2019-01-16T18:59:59.000Z | 2019-01-16T18:59:59.000Z | libvirt_vm_optimizer/util/arg_parser.py | suomiy/libvirt-vm-optimizer | a022391ea86e3609e3b9c01fc2b84279939a26ab | [
"MIT"
] | null | null | null | libvirt_vm_optimizer/util/arg_parser.py | suomiy/libvirt-vm-optimizer | a022391ea86e3609e3b9c01fc2b84279939a26ab | [
"MIT"
] | 1 | 2021-05-04T00:06:12.000Z | 2021-05-04T00:06:12.000Z | import argparse
from argparse import ArgumentError
from libvirt_vm_optimizer.util.utils import Profile
| 39.848101 | 126 | 0.542567 |
7db3b96495442c5054ba6d121c6a02f0d28e7612 | 8,323 | py | Python | lib_bgp_data/collectors/mrt/mrt_base/mrt_file.py | jfuruness/lib_bgp_data | 25f7d57b9e2101c7aefb325e8d728bd91f47d557 | [
"BSD-3-Clause"
] | 16 | 2018-09-24T05:10:03.000Z | 2021-11-29T19:18:59.000Z | lib_bgp_data/collectors/mrt/mrt_base/mrt_file.py | jfuruness/lib_bgp_data | 25f7d57b9e2101c7aefb325e8d728bd91f47d557 | [
"BSD-3-Clause"
] | 4 | 2019-10-09T18:54:17.000Z | 2021-03-05T14:02:50.000Z | lib_bgp_data/collectors/mrt/mrt_base/mrt_file.py | jfuruness/lib_bgp_data | 25f7d57b9e2101c7aefb325e8d728bd91f47d557 | [
"BSD-3-Clause"
] | 3 | 2018-09-17T17:35:18.000Z | 2020-03-24T16:03:31.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""This module contains class MRT_File.
The MRT_File class contains the functionality to load and parse
mrt files. This is done through a series of steps, detailed in README.
"""
__authors__ = ["Justin Furuness", "Matt Jaccino"]
__credits__ = ["Justin Furuness", "Matt J... | 42.464286 | 78 | 0.622252 |
7db66263d9d342b5a826306669c5a5214abeb3e7 | 1,611 | py | Python | demo.py | mhy12345/rcaudio | 90fcc3c2d2586905c7f35ea5c2ac6b2c2cf70029 | [
"MIT"
] | 31 | 2018-09-27T03:35:06.000Z | 2022-01-11T09:49:26.000Z | demo.py | yeashen/rcaudio | 90fcc3c2d2586905c7f35ea5c2ac6b2c2cf70029 | [
"MIT"
] | 3 | 2018-11-20T07:49:24.000Z | 2021-01-06T11:48:41.000Z | demo.py | yeashen/rcaudio | 90fcc3c2d2586905c7f35ea5c2ac6b2c2cf70029 | [
"MIT"
] | 7 | 2019-04-23T06:32:23.000Z | 2020-09-25T14:18:32.000Z | from rcaudio import *
import time
import logging
logging.basicConfig(level=logging.INFO,
format='%(asctime)s %(filename)s[line:%(lineno)d] %(levelname)s %(message)s')
demo2()
| 22.690141 | 85 | 0.556797 |
7db6acccc13d73c452c9d80805e389c51f138158 | 346 | py | Python | Backend/linux.py | TheInvincibleLearner/simranquirky.github.io | 21a2524b321493b9ff82eb8b4fcc10af8f8face7 | [
"MIT"
] | null | null | null | Backend/linux.py | TheInvincibleLearner/simranquirky.github.io | 21a2524b321493b9ff82eb8b4fcc10af8f8face7 | [
"MIT"
] | 10 | 2021-09-29T13:25:21.000Z | 2021-10-05T13:51:36.000Z | Backend/linux.py | TheInvincibleLearner/simranquirky.github.io | 21a2524b321493b9ff82eb8b4fcc10af8f8face7 | [
"MIT"
] | 7 | 2021-09-22T13:26:35.000Z | 2021-10-05T03:07:43.000Z | #!/usr/bin/python3
print("content-type: text/html")
print()
import subprocess as sp
import cgi
fs = cgi.FieldStorage()
cmd = fs.getvalue("command")
output = sp.getoutput("sudo "+cmd)
print("<body style='padding: 40px;'>")
print('<h1 style="color:#df405a;" >Output</h1>')
print("<pre>{}</pre>".format(ou... | 20.352941 | 49 | 0.635838 |
7db6de9a9058b5930c41c0b6f46d74899e0a554e | 1,334 | py | Python | tests/test_swagger_registry.py | niall-byrne/flask-restful-swagger | 4ce4284627f27e1e8d58ff922abbefe9e7fd8c21 | [
"MIT"
] | 667 | 2015-01-05T02:11:09.000Z | 2022-03-30T02:01:04.000Z | tests/test_swagger_registry.py | Deepstatsanalysis/flask-restful-swagger | 4ce4284627f27e1e8d58ff922abbefe9e7fd8c21 | [
"MIT"
] | 83 | 2015-01-05T19:39:23.000Z | 2021-11-22T16:39:52.000Z | tests/test_swagger_registry.py | Deepstatsanalysis/flask-restful-swagger | 4ce4284627f27e1e8d58ff922abbefe9e7fd8c21 | [
"MIT"
] | 184 | 2015-01-05T19:20:23.000Z | 2022-03-21T10:32:34.000Z | from flask import Flask
from flask_restful_swagger.swagger import SwaggerRegistry
try:
from unittest.mock import patch
except ImportError:
from mock import patch
| 26.68 | 67 | 0.676912 |
7db77614b73b30faa1f8658a19a8d335313caf9b | 1,921 | py | Python | gcp_census/bigquery/bigquery_handler.py | ocadotechnology/gcp-census | 6ce7c55a798efd83c07b9677081d26bb6113e2ed | [
"Apache-2.0"
] | 40 | 2017-05-18T12:39:11.000Z | 2021-12-02T11:24:18.000Z | gcp_census/bigquery/bigquery_handler.py | ocadotechnology/gcp-census | 6ce7c55a798efd83c07b9677081d26bb6113e2ed | [
"Apache-2.0"
] | 35 | 2017-05-18T12:41:36.000Z | 2019-11-15T10:06:19.000Z | gcp_census/bigquery/bigquery_handler.py | ocadotechnology/gcp-census | 6ce7c55a798efd83c07b9677081d26bb6113e2ed | [
"Apache-2.0"
] | 7 | 2018-01-18T12:39:51.000Z | 2018-08-16T09:17:00.000Z | import logging
import webapp2
from googleapiclient.errors import HttpError
from gcp_census.bigquery.bigquery_client import BigQuery
from gcp_census.bigquery.bigquery_task import BigQueryTask
| 36.942308 | 80 | 0.660073 |
7db8db74363fb05b1c46621fca683280e13e4190 | 67 | py | Python | Solutions/Python/Posix command(7 kyu).py | collenirwin/Codewars-Solutions | 14bad3878d3fc37c7e73cbaaaa24cd28f759ce3b | [
"MIT"
] | null | null | null | Solutions/Python/Posix command(7 kyu).py | collenirwin/Codewars-Solutions | 14bad3878d3fc37c7e73cbaaaa24cd28f759ce3b | [
"MIT"
] | null | null | null | Solutions/Python/Posix command(7 kyu).py | collenirwin/Codewars-Solutions | 14bad3878d3fc37c7e73cbaaaa24cd28f759ce3b | [
"MIT"
] | null | null | null | from os import popen | 16.75 | 26 | 0.701493 |
7db9356e6b7de8c8a7ac0cabb607897d76784d53 | 3,056 | py | Python | resources/src/gcp_iam_service_account.py | kfirz/deployster | b95fdb9cf150eee765f7ef3dbdee3666119e76f9 | [
"Apache-2.0"
] | null | null | null | resources/src/gcp_iam_service_account.py | kfirz/deployster | b95fdb9cf150eee765f7ef3dbdee3666119e76f9 | [
"Apache-2.0"
] | 19 | 2017-12-28T19:39:37.000Z | 2018-04-18T23:24:45.000Z | resources/src/gcp_iam_service_account.py | kfirz/deployster | b95fdb9cf150eee765f7ef3dbdee3666119e76f9 | [
"Apache-2.0"
] | 1 | 2018-04-06T16:50:49.000Z | 2018-04-06T16:50:49.000Z | #!/usr/bin/env python3.6
import argparse
import json
import sys
from typing import Sequence, MutableSequence
from dresources import DAction, action
from external_services import ExternalServices
from gcp import GcpResource
if __name__ == "__main__":
main()
| 39.688312 | 108 | 0.620419 |
7dbac9eb3255daf0f5135503edb3305af6da290c | 806 | py | Python | tests/consumtodb_test.py | thomas-for-aiven/monitor | bd712fed77c3b3cea3e1dd0f99318043ff3dc166 | [
"MIT"
] | null | null | null | tests/consumtodb_test.py | thomas-for-aiven/monitor | bd712fed77c3b3cea3e1dd0f99318043ff3dc166 | [
"MIT"
] | null | null | null | tests/consumtodb_test.py | thomas-for-aiven/monitor | bd712fed77c3b3cea3e1dd0f99318043ff3dc166 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import pytest
import monitor.monitorshared as m
import monitor.consumtodb as con
def test_db_connection(tmpdir):
"test postgres connection"
conf = m.Configuration('configx.ini', "test")
# in case the field is empty
if conf.db_host == '':
pytest.skip("no broker configure... | 23.028571 | 57 | 0.691067 |
7dbc7331779b26c50f838cb805bfffb5e23cfa30 | 542 | py | Python | pytorch3dunet/unet3d/config.py | VolkerH/pytorch-3dunet | 01ee7d53ef1c8edb2bd45d76faf7df447144fb67 | [
"MIT"
] | null | null | null | pytorch3dunet/unet3d/config.py | VolkerH/pytorch-3dunet | 01ee7d53ef1c8edb2bd45d76faf7df447144fb67 | [
"MIT"
] | null | null | null | pytorch3dunet/unet3d/config.py | VolkerH/pytorch-3dunet | 01ee7d53ef1c8edb2bd45d76faf7df447144fb67 | [
"MIT"
] | null | null | null | import argparse
import torch
import yaml
| 27.1 | 97 | 0.714022 |
7dbdd82b44af43747c667e7503af84473c437bc0 | 4,630 | py | Python | Code/chatbot.py | pavithra-b-reddy/Chatbot-CS310 | 0cae72c974272d00ee5db3c980f48c0dbfa16e2b | [
"MIT"
] | null | null | null | Code/chatbot.py | pavithra-b-reddy/Chatbot-CS310 | 0cae72c974272d00ee5db3c980f48c0dbfa16e2b | [
"MIT"
] | null | null | null | Code/chatbot.py | pavithra-b-reddy/Chatbot-CS310 | 0cae72c974272d00ee5db3c980f48c0dbfa16e2b | [
"MIT"
] | null | null | null | # This codes are referenced from the Github repo (https://github.com/parulnith/Building-a-Simple-Chatbot-in-Python-using-NLTK/blob/master/chatbot.py)
# Loading the required packages
import nltk
import random
import string
import warnings
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics... | 35.615385 | 149 | 0.649028 |
7dbe53a8adce10ce3864cc27ec6021037f99abf0 | 2,714 | py | Python | relo/core/log.py | cwoebker/relo | db11dea794b4b241578f8de4f11d9dbbbbabf894 | [
"BSD-3-Clause"
] | null | null | null | relo/core/log.py | cwoebker/relo | db11dea794b4b241578f8de4f11d9dbbbbabf894 | [
"BSD-3-Clause"
] | null | null | null | relo/core/log.py | cwoebker/relo | db11dea794b4b241578f8de4f11d9dbbbbabf894 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
import sys
LEVEL = {
'NORMAL': 0,
'INFO': 1,
'DEBUG': 2,
'CRITICAl': 0,
'ERROR': 0,
'EXCEPTION': 0,
}
logger = Logger() | 26.096154 | 71 | 0.562638 |
7dbeb142bc5611ae233fb17f68720f678cc9d5f9 | 2,031 | py | Python | client/src/proto3/socket_server.py | andrhahn/pi-spy | 04013565c83eb20db85688c0abb23d6f83d3fbaa | [
"MIT"
] | 1 | 2020-08-17T18:32:06.000Z | 2020-08-17T18:32:06.000Z | client/src/proto3/socket_server.py | andrhahn/pi-spy | 04013565c83eb20db85688c0abb23d6f83d3fbaa | [
"MIT"
] | null | null | null | client/src/proto3/socket_server.py | andrhahn/pi-spy | 04013565c83eb20db85688c0abb23d6f83d3fbaa | [
"MIT"
] | null | null | null | import SocketServer
import io
import logging
import struct
import threading
import PIL.Image
import pika
import config
logging.basicConfig(level=logging.INFO)
if __name__ == "__main__":
print 'Connecting to queue server'
queue_connection = pika.BlockingConnection(
pika.ConnectionParameters(host=... | 24.46988 | 115 | 0.652388 |
7dbec2776e2389304afbc67d66e86856becf8f17 | 537 | py | Python | lib/showFaces.py | ZakDoesGaming/OregonTrail | 90cab35536ac5c6ba9e772ac5c29c914017c9c23 | [
"MIT"
] | 6 | 2018-05-07T04:04:58.000Z | 2021-05-15T17:44:16.000Z | lib/showFaces.py | ZakDoesGaming/OregonTrail | 90cab35536ac5c6ba9e772ac5c29c914017c9c23 | [
"MIT"
] | null | null | null | lib/showFaces.py | ZakDoesGaming/OregonTrail | 90cab35536ac5c6ba9e772ac5c29c914017c9c23 | [
"MIT"
] | 2 | 2017-05-27T17:06:23.000Z | 2020-08-26T17:57:10.000Z | from pygame import image | 35.8 | 91 | 0.690875 |
7dbf4c0c61fb56b588d550f32b9ba42ac0a71e93 | 3,506 | py | Python | Thirdparty/libpsd/build.py | stinvi/dava.engine | 2b396ca49cdf10cdc98ad8a9ffcf7768a05e285e | [
"BSD-3-Clause"
] | 26 | 2018-09-03T08:48:22.000Z | 2022-02-14T05:14:50.000Z | Thirdparty/libpsd/build.py | ANHELL-blitz/dava.engine | ed83624326f000866e29166c7f4cccfed1bb41d4 | [
"BSD-3-Clause"
] | null | null | null | Thirdparty/libpsd/build.py | ANHELL-blitz/dava.engine | ed83624326f000866e29166c7f4cccfed1bb41d4 | [
"BSD-3-Clause"
] | 45 | 2018-05-11T06:47:17.000Z | 2022-02-03T11:30:55.000Z | import os
import shutil
import build_utils
| 31.585586 | 104 | 0.72162 |
7dc01542f166fdf824058cb9a8b3de627c4cc58f | 53 | py | Python | molpal/__init__.py | mchaker/lab-molpal | f4db7ee2ca51515b4246604867a93a3aac08107d | [
"MIT"
] | 1 | 2022-03-27T10:17:25.000Z | 2022-03-27T10:17:25.000Z | molpal/__init__.py | mchaker/lab-molpal | f4db7ee2ca51515b4246604867a93a3aac08107d | [
"MIT"
] | 2 | 2022-03-27T20:08:23.000Z | 2022-03-28T11:47:11.000Z | molpal/__init__.py | mchaker/lab-molpal | f4db7ee2ca51515b4246604867a93a3aac08107d | [
"MIT"
] | 1 | 2022-03-27T20:20:01.000Z | 2022-03-27T20:20:01.000Z | from .explorer import Explorer
__version__ = "1.0.2" | 17.666667 | 30 | 0.754717 |
7dc06bfcfd35ab80fe1f5fe2ede0d1828b1336ca | 6,192 | py | Python | Data.py | praenubilus/lc-tool | 6af4c557d2780758a4d53cd70554e16b70809859 | [
"MIT"
] | null | null | null | Data.py | praenubilus/lc-tool | 6af4c557d2780758a4d53cd70554e16b70809859 | [
"MIT"
] | null | null | null | Data.py | praenubilus/lc-tool | 6af4c557d2780758a4d53cd70554e16b70809859 | [
"MIT"
] | null | null | null | import subprocess
import os.path
import json
import time
import urllib.parse
from typing import Any, Tuple
import config
from requests_html import HTMLSession
from markdownify import markdownify
| 34.786517 | 94 | 0.581234 |
7dc0ff0cd5dcfd9cb62fcfb00a3e84da41a487f5 | 1,407 | py | Python | examples/python/WeightedCentroidalVoronoi.py | mparno/sdot2d | f632824fc4f0285eab6de911cca8932f69ece705 | [
"BSD-3-Clause"
] | null | null | null | examples/python/WeightedCentroidalVoronoi.py | mparno/sdot2d | f632824fc4f0285eab6de911cca8932f69ece705 | [
"BSD-3-Clause"
] | null | null | null | examples/python/WeightedCentroidalVoronoi.py | mparno/sdot2d | f632824fc4f0285eab6de911cca8932f69ece705 | [
"BSD-3-Clause"
] | null | null | null | import pysdot as ot
import numpy as np
import matplotlib.pyplot as plt
numPts = 100
xbnds = [0.0,1.0] # minimum and maximum x values
ybnds = [0.0,1.0] # minimum and maximum y values
Ns = [50,50]
bbox = ot.BoundingBox(xbnds[0],xbnds[1],ybnds[0],ybnds[1])
grid = ot.RegularGrid(bbox, Ns[0], Ns[1])
dens = np.ones(Ns)
f... | 33.5 | 100 | 0.713575 |
7dc1969b2d44d9ad370f7f09a3b9e9919cb4e854 | 589 | py | Python | Combinatorialifier.py | Theta291/Partial-Application-in-Python | db503fbf7a1c173c01fca86a858875e38c41997a | [
"MIT"
] | null | null | null | Combinatorialifier.py | Theta291/Partial-Application-in-Python | db503fbf7a1c173c01fca86a858875e38c41997a | [
"MIT"
] | null | null | null | Combinatorialifier.py | Theta291/Partial-Application-in-Python | db503fbf7a1c173c01fca86a858875e38c41997a | [
"MIT"
] | null | null | null | #Exercise: Try to make a function that accepts a function of only positional arguments and returns a function that takes the same number of positional arguments and, given they are all iterators, attempts every combination of one arguments from each iterator.
#Skills: Partial application, Iteration
papplycomboreverse ... | 45.307692 | 259 | 0.726655 |
7dc217926986aef9243e5b82602418597122bc4f | 6,780 | py | Python | api/api_funct.py | pjclock/haproxy-wi | 2ea59c892ae24d824d29dd0cee580c969f64cc87 | [
"Apache-2.0"
] | null | null | null | api/api_funct.py | pjclock/haproxy-wi | 2ea59c892ae24d824d29dd0cee580c969f64cc87 | [
"Apache-2.0"
] | null | null | null | api/api_funct.py | pjclock/haproxy-wi | 2ea59c892ae24d824d29dd0cee580c969f64cc87 | [
"Apache-2.0"
] | 1 | 2019-11-19T14:59:25.000Z | 2019-11-19T14:59:25.000Z | import os
import sys
os.chdir(os.path.dirname(__file__))
sys.path.append(os.path.dirname(__file__))
sys.path.append(os.path.join(sys.path[0], '/var/www/haproxy-wi/app/'))
from bottle import route, run, template, hook, response, request, post
import sql
import funct
| 22.450331 | 149 | 0.629499 |
7dc490740f712aa8ee9b1a1e793a10bb7cab5ed9 | 27,885 | py | Python | trove-11.0.0/trove/guestagent/datastore/experimental/vertica/service.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 1 | 2020-04-08T07:42:19.000Z | 2020-04-08T07:42:19.000Z | trove/guestagent/datastore/experimental/vertica/service.py | ttcong/trove | 1db2dc63fdd5409eafccebe79ff2900d0535ed13 | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | trove/guestagent/datastore/experimental/vertica/service.py | ttcong/trove | 1db2dc63fdd5409eafccebe79ff2900d0535ed13 | [
"Apache-2.0"
] | 2 | 2020-03-15T01:24:15.000Z | 2020-07-22T20:34:26.000Z | # Copyright [2015] Hewlett-Packard Development Company, L.P.
# 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... | 45.048465 | 79 | 0.58146 |
7dc4cee1dbb027b9999c91c7ea99faa307db2e19 | 15,179 | py | Python | waymo_open_dataset/waymo_detection_dataset.py | abahnasy/IDP | c131a597ad72105f67f0ff8850f4eb8275a9800b | [
"MIT"
] | null | null | null | waymo_open_dataset/waymo_detection_dataset.py | abahnasy/IDP | c131a597ad72105f67f0ff8850f4eb8275a9800b | [
"MIT"
] | null | null | null | waymo_open_dataset/waymo_detection_dataset.py | abahnasy/IDP | c131a597ad72105f67f0ff8850f4eb8275a9800b | [
"MIT"
] | null | null | null | """ Waymo dataset with votes.
Author: Ahmed Bahnasy
Date: 2020
"""
import os
import sys
import numpy as np
import pickle
from torch.utils.data import Dataset
import scipy.io as sio # to load .mat files for depth points
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
# ROOT_DIR = os.path.dirname(BASE_DIR)
sys.pa... | 46.277439 | 180 | 0.620792 |
7dc5dc988616aaca00dd30fca002242eb44adc92 | 2,792 | py | Python | smoketests/tests/test_dir_test.py | erlware-deprecated/sinan | 5172974e75f30bd7050b99ff2e6849501008ec44 | [
"MIT"
] | 7 | 2015-06-03T19:18:39.000Z | 2022-01-26T10:39:03.000Z | smoketests/tests/test_dir_test.py | ericbmerritt/sinan | 36d89008a332e1283fc9f7081165e91fb0547885 | [
"MIT"
] | 3 | 2020-06-25T04:15:54.000Z | 2020-06-25T04:16:13.000Z | smoketests/tests/test_dir_test.py | ericbmerritt/sinan | 36d89008a332e1283fc9f7081165e91fb0547885 | [
"MIT"
] | 3 | 2015-11-27T10:33:31.000Z | 2018-07-31T22:56:32.000Z | import unittest
import sin_testing as st
import pexpect
import os
if __name__ == '__main__':
unittest.main()
| 31.370787 | 79 | 0.523997 |
7dc85646e762b266d883108a8fd66e58db5c4d2f | 7,362 | py | Python | budgetportal/tests/test_management_commands.py | fluenty/datamanager | 97ba9d58d4527b7d61b730ea4896f09a56e6ae60 | [
"MIT"
] | null | null | null | budgetportal/tests/test_management_commands.py | fluenty/datamanager | 97ba9d58d4527b7d61b730ea4896f09a56e6ae60 | [
"MIT"
] | null | null | null | budgetportal/tests/test_management_commands.py | fluenty/datamanager | 97ba9d58d4527b7d61b730ea4896f09a56e6ae60 | [
"MIT"
] | null | null | null | from budgetportal.models import (
FinancialYear,
Sphere,
Government,
Department,
Programme,
)
from django.core.management import call_command
from django.test import TestCase
from tempfile import NamedTemporaryFile
from StringIO import StringIO
import yaml
| 40.450549 | 108 | 0.664493 |
7dc8bc4931a3fbdfc68cead350a1a5f0c0c77747 | 898 | py | Python | src/fedservice/utils.py | rohe/fedservice | 1460d21217b804cac0f38fa26ffa24bee7cf6dad | [
"Apache-2.0"
] | 3 | 2018-11-28T12:01:31.000Z | 2020-12-16T21:43:29.000Z | src/fedservice/utils.py | peppelinux/fedservice | 0dc5fd0bd33e181b6a1a9bbef6835b2ce5d2f568 | [
"Apache-2.0"
] | 13 | 2020-02-10T15:33:37.000Z | 2022-02-01T16:43:36.000Z | src/fedservice/utils.py | peppelinux/fedservice | 0dc5fd0bd33e181b6a1a9bbef6835b2ce5d2f568 | [
"Apache-2.0"
] | 4 | 2019-05-29T10:04:48.000Z | 2020-10-14T09:52:53.000Z | import json
import logging
import ssl
import sys
from oidcrp.exception import ResponseError
logger = logging.getLogger(__name__)
| 22.45 | 71 | 0.609131 |
7dc8ee9b4d42b514db819f378b41dbecf850d307 | 3,884 | py | Python | plugins/rd_bot.py | deg4uss3r/rd_bot | f82a929b59331d2ee67067369cd6ffe92a4fa7e6 | [
"MIT"
] | null | null | null | plugins/rd_bot.py | deg4uss3r/rd_bot | f82a929b59331d2ee67067369cd6ffe92a4fa7e6 | [
"MIT"
] | 3 | 2016-09-17T09:51:49.000Z | 2019-11-13T20:58:37.000Z | plugins/rd_bot.py | deg4uss3r/rd_bot | f82a929b59331d2ee67067369cd6ffe92a4fa7e6 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
import requests
import json
import os
import sys
outputs = []
| 28.77037 | 205 | 0.583162 |
7dcb26b78425a819dd55aa11592a32323ece117a | 6,855 | py | Python | swss.py | andycranston/swss | 22db6b2e2eb5711d4fd06bd7a094342ad6be8b62 | [
"MIT"
] | null | null | null | swss.py | andycranston/swss | 22db6b2e2eb5711d4fd06bd7a094342ad6be8b62 | [
"MIT"
] | null | null | null | swss.py | andycranston/swss | 22db6b2e2eb5711d4fd06bd7a094342ad6be8b62 | [
"MIT"
] | null | null | null | #! /usr/bin/python3
#
# @(!--#) @(#) swss.py, version 002, 27-july-2018
#
# open a series of home pages and take a screen shot of each one
#
################################################################################################
#
# imports
#
import sys
import os
import argparse
import glob
import shutil
im... | 26.467181 | 156 | 0.484318 |
7dcb91ee413942a4aa1e8d201a6cf906a3130f7f | 1,041 | py | Python | api/migrations/versions/0be658f07ac6_state_consumed.py | eve-git/namex | 130f261500ce595b291d5428c32e1f6cc38ea505 | [
"Apache-2.0"
] | 4 | 2018-10-05T23:41:05.000Z | 2019-06-19T16:17:50.000Z | api/migrations/versions/0be658f07ac6_state_consumed.py | eve-git/namex | 130f261500ce595b291d5428c32e1f6cc38ea505 | [
"Apache-2.0"
] | 635 | 2018-05-31T04:12:46.000Z | 2022-03-31T18:45:42.000Z | api/migrations/versions/0be658f07ac6_state_consumed.py | thorwolpert/namex | b9d927774e4c0da0255ca5aaa7ed1890283956fd | [
"Apache-2.0"
] | 71 | 2018-05-14T20:47:55.000Z | 2022-03-31T23:08:30.000Z | """state consumed
Revision ID: 0be658f07ac6
Revises: bd1e892d0609
Create Date: 2021-07-18 21:26:04.588007
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.sql import table, column
from sqlalchemy import String
# revision identifiers, used by Alembic.
revision = '0be658f07ac6'
down_revision = 'bd1e... | 24.785714 | 68 | 0.612872 |
7dcbb0c32530744ec259355b1498ba6ed0c58b39 | 2,878 | py | Python | tests/test_pydantic.py | hCaptcha/hmt-basemodels | 5108bf4ddf68d670607daf8d68302c01631c4be2 | [
"MIT"
] | 3 | 2020-09-08T15:03:31.000Z | 2021-06-30T19:00:45.000Z | tests/test_pydantic.py | humanprotocol/hmt-basemodels | 5108bf4ddf68d670607daf8d68302c01631c4be2 | [
"MIT"
] | 43 | 2019-02-28T17:43:42.000Z | 2022-02-13T11:37:08.000Z | tests/test_pydantic.py | hCaptcha/hmt-basemodels | 5108bf4ddf68d670607daf8d68302c01631c4be2 | [
"MIT"
] | 5 | 2019-05-09T15:58:07.000Z | 2020-12-09T23:24:24.000Z | from unittest import TestCase, mock
from copy import deepcopy
from pydantic.error_wrappers import ValidationError
from basemodels.pydantic import Manifest
from basemodels.pydantic.manifest.data.taskdata import TaskDataEntry
SIMPLE = {
"job_mode": "batch",
"request_type": "image_label_multiple_choice",
"r... | 33.858824 | 143 | 0.673384 |
7dcc1a030ac1c718e3ae0328b8bf873af5f2d223 | 1,064 | py | Python | olutils/path.py | OctaveLauby/olutils | 9d0741fe2a3ce527be60be2bf1a6904c3340e488 | [
"Apache-2.0"
] | 1 | 2020-10-23T17:11:42.000Z | 2020-10-23T17:11:42.000Z | olutils/path.py | OctaveLauby/olutils | 9d0741fe2a3ce527be60be2bf1a6904c3340e488 | [
"Apache-2.0"
] | 4 | 2019-05-09T12:53:33.000Z | 2020-12-03T13:49:26.000Z | olutils/path.py | OctaveLauby/olutils | 9d0741fe2a3ce527be60be2bf1a6904c3340e488 | [
"Apache-2.0"
] | null | null | null | from os.path import exists
def get_next_path(path_frmt: str, start: int = 1) -> str:
"""Return next available path based on path_frmt (1 positional-placeholder)"""
return path_frmt.format(get_next_path_index(path_frmt, start=start))
def get_next_path_index(path_frmt: str, start: int = 1) -> int:
"""Get ... | 36.689655 | 92 | 0.68797 |
7dccf7de030e74e41a66762279d9a43fa3b28e62 | 63 | py | Python | env/lib/python2.7/site-packages/certifi/__init__.py | wagnermarkd/stationary-hud | 96eb0457e52a7e8a691e8ae101d43353db038f57 | [
"MIT"
] | 6 | 2021-09-18T07:19:54.000Z | 2021-09-18T07:20:07.000Z | venv/Lib/site-packages/certifi/__init__.py | Airren/mxonline-python | f16c7039b5a8ac7d2d743c83c9f44f77f02e1432 | [
"MIT"
] | 10 | 2020-01-20T13:52:07.000Z | 2022-03-12T00:12:31.000Z | venv/Lib/site-packages/certifi/__init__.py | Airren/mxonline-python | f16c7039b5a8ac7d2d743c83c9f44f77f02e1432 | [
"MIT"
] | 1 | 2016-08-24T01:08:34.000Z | 2016-08-24T01:08:34.000Z | from .core import where, old_where
__version__ = "2016.02.28"
| 15.75 | 34 | 0.746032 |
7dcd9cbc95d9ac46a0346d6a8f8325d12f3bf6be | 681 | py | Python | setup.py | jacobschaer/qt_compat | 8121500c1fb6f95d3cfff033410e055a187a39c9 | [
"MIT"
] | null | null | null | setup.py | jacobschaer/qt_compat | 8121500c1fb6f95d3cfff033410e055a187a39c9 | [
"MIT"
] | null | null | null | setup.py | jacobschaer/qt_compat | 8121500c1fb6f95d3cfff033410e055a187a39c9 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
setup(
name="QtCompat",
version="0.1",
packages=find_packages(),
scripts=[],
# Project uses reStructuredText, so ensure that the docutils get
# installed or upgraded on the target machine
install_requires=[],
package_data={
},
# meta... | 28.375 | 82 | 0.690162 |
7dcde3e58f5df9d50ac28aa03a0ad0516f667fbc | 2,730 | py | Python | test/patterns/joined_validation/test_joined_validation.py | acheshkov/aibolit | eed2fafa9fbc5f3359510cd80fee2ae8311d7ed8 | [
"MIT"
] | null | null | null | test/patterns/joined_validation/test_joined_validation.py | acheshkov/aibolit | eed2fafa9fbc5f3359510cd80fee2ae8311d7ed8 | [
"MIT"
] | null | null | null | test/patterns/joined_validation/test_joined_validation.py | acheshkov/aibolit | eed2fafa9fbc5f3359510cd80fee2ae8311d7ed8 | [
"MIT"
] | null | null | null | import os
from unittest import TestCase
from aibolit.patterns.joined_validation.joined_validation import JoinedValidation
from pathlib import Path
| 33.292683 | 81 | 0.630037 |
7dce2ac1c38976edf285448acc824af893571906 | 971 | py | Python | python_structure/data_structures/lists_tuples_dictionaries/tuple_defs.py | bangyen/pascal-triangle | 0831348e93c274bdd38bba5c3aeeda7596ab97ee | [
"MIT"
] | 1 | 2020-03-11T10:20:53.000Z | 2020-03-11T10:20:53.000Z | python_structure/data_structures/lists_tuples_dictionaries/tuple_defs.py | bangyen/pascal-triangle | 0831348e93c274bdd38bba5c3aeeda7596ab97ee | [
"MIT"
] | 1 | 2020-07-06T15:45:01.000Z | 2020-07-06T15:50:32.000Z | python_structure/data_structures/lists_tuples_dictionaries/tuple_defs.py | bangyen/pascal-triangle | 0831348e93c274bdd38bba5c3aeeda7596ab97ee | [
"MIT"
] | 1 | 2020-07-02T05:21:58.000Z | 2020-07-02T05:21:58.000Z | """
Global tuple to avoid make a new one each time a method is called
"""
my_tuple = ("London", 123, 18.2)
if __name__ == '__main__':
main_tuple = city_tuple_declaration()
print(main_tuple)
print(my_tuple)
tuple_get_element(5)
print(bool_to_string_translator(tuple_has_element("London")))
... | 22.068182 | 69 | 0.676622 |
7dcea3fbbfd1ee77dfca864ce3a07a6ca9ff127e | 389 | py | Python | annotations/filters.py | acdh-oeaw/ner-annotator | ee8f72248669b848eb273644d80ad52dc495a07c | [
"MIT"
] | 1 | 2019-01-02T15:05:30.000Z | 2019-01-02T15:05:30.000Z | annotations/filters.py | acdh-oeaw/ner-annotator | ee8f72248669b848eb273644d80ad52dc495a07c | [
"MIT"
] | 8 | 2020-02-11T23:02:04.000Z | 2021-06-10T20:39:58.000Z | annotations/filters.py | acdh-oeaw/ner-annotator | ee8f72248669b848eb273644d80ad52dc495a07c | [
"MIT"
] | 1 | 2019-01-02T15:05:31.000Z | 2019-01-02T15:05:31.000Z | import django_filters
from . models import NerSample
| 24.3125 | 62 | 0.678663 |
7dcf866c0422d8f7d07418dae857b071849168bc | 51 | py | Python | m3o_plugin/postcode.py | JustIceQAQ/play_m3o_in_python | 140b1f07cb574d1f0a2890503ae9e73ce3907f2b | [
"MIT"
] | null | null | null | m3o_plugin/postcode.py | JustIceQAQ/play_m3o_in_python | 140b1f07cb574d1f0a2890503ae9e73ce3907f2b | [
"MIT"
] | null | null | null | m3o_plugin/postcode.py | JustIceQAQ/play_m3o_in_python | 140b1f07cb574d1f0a2890503ae9e73ce3907f2b | [
"MIT"
] | null | null | null | # TODO Postcode: https://m3o.com/postcode/overview
| 25.5 | 50 | 0.764706 |
7dd0263f686636079c3320a5eff927b93bd01ba9 | 3,016 | py | Python | learning_algorithms/hysteretic_q_matrix.py | swj0418/Reinforcement_Learning_Framework | 1ac6bbe31cee5ea7f1e5f28d8b53aa3985b39db8 | [
"Apache-2.0"
] | 1 | 2019-07-01T11:47:33.000Z | 2019-07-01T11:47:33.000Z | learning_algorithms/hysteretic_q_matrix.py | swj0418/Reinforcement_Learning_Framework | 1ac6bbe31cee5ea7f1e5f28d8b53aa3985b39db8 | [
"Apache-2.0"
] | 1 | 2019-04-13T05:46:14.000Z | 2019-04-13T05:46:14.000Z | learning_algorithms/hysteretic_q_matrix.py | swj0418/Reinforcement_Learning_Framework | 1ac6bbe31cee5ea7f1e5f28d8b53aa3985b39db8 | [
"Apache-2.0"
] | null | null | null | import numpy as np | 33.511111 | 110 | 0.623342 |
7dd0a1a9133fdf0ceb0199e1c5e7bef38b12567d | 14,581 | py | Python | psiz/keras/layers/kernel.py | asuiconlab/psiz | 4f05348cf43d2d53ff9cc6dee633de385df883e3 | [
"Apache-2.0"
] | null | null | null | psiz/keras/layers/kernel.py | asuiconlab/psiz | 4f05348cf43d2d53ff9cc6dee633de385df883e3 | [
"Apache-2.0"
] | null | null | null | psiz/keras/layers/kernel.py | asuiconlab/psiz | 4f05348cf43d2d53ff9cc6dee633de385df883e3 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 The PsiZ 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 r... | 32.692825 | 79 | 0.613812 |
7dd13c6ad4dc8afcb18c82aeecd32fc176c29e34 | 1,261 | py | Python | apps/user/migrations/0005_auto_20190804_1443.py | tiger-fight-tonight/E-Server | 3939bc3f8c090441cc2af17f4e6cb777642fb792 | [
"Apache-2.0"
] | 6 | 2019-07-18T16:21:17.000Z | 2020-11-19T04:47:02.000Z | apps/user/migrations/0005_auto_20190804_1443.py | tiger-fight-tonight/E-Server | 3939bc3f8c090441cc2af17f4e6cb777642fb792 | [
"Apache-2.0"
] | null | null | null | apps/user/migrations/0005_auto_20190804_1443.py | tiger-fight-tonight/E-Server | 3939bc3f8c090441cc2af17f4e6cb777642fb792 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.1.7 on 2019-08-04 06:43
import datetime
from django.db import migrations, models
import uuid
| 35.027778 | 181 | 0.634417 |
7dd3bf8d2c2f8bbd741f59dd7b443601e8b83316 | 282 | py | Python | scripts/get_plat_name.py | uuosio/gscdk | 995d99948d7090032f76b05656cad29c6cfbb647 | [
"BSD-3-Clause"
] | 6 | 2021-09-03T09:02:39.000Z | 2022-01-12T06:31:09.000Z | scripts/get_plat_name.py | learnforpractice/gscdk | dc17c43fa2be28500f38897a29bbbd9eb9c7ada7 | [
"BSD-3-Clause"
] | 1 | 2021-11-01T16:46:09.000Z | 2021-11-04T12:51:45.000Z | scripts/get_plat_name.py | learnforpractice/gscdk | dc17c43fa2be28500f38897a29bbbd9eb9c7ada7 | [
"BSD-3-Clause"
] | 2 | 2021-11-10T01:56:15.000Z | 2022-01-13T14:27:31.000Z | import platform
#check the platform for linux, macos, windows
if platform.system() == "Linux":
print("manylinux1_x86_64")
elif platform.system() == "Windows":
print("win-amd64")
elif platform.system() == "Darwin":
print("macosx_10_15_x86_64")
else:
print("Unknown")
| 25.636364 | 45 | 0.691489 |
7dd3f523efb7218a00299577b756498b0e6e336c | 508 | py | Python | submissions/mirror-reflection/solution.py | Wattyyy/LeetCode | 13a9be056d0a0c38c2f8c8222b11dc02cb25a935 | [
"MIT"
] | null | null | null | submissions/mirror-reflection/solution.py | Wattyyy/LeetCode | 13a9be056d0a0c38c2f8c8222b11dc02cb25a935 | [
"MIT"
] | 1 | 2022-03-04T20:24:32.000Z | 2022-03-04T20:31:58.000Z | submissions/mirror-reflection/solution.py | Wattyyy/LeetCode | 13a9be056d0a0c38c2f8c8222b11dc02cb25a935 | [
"MIT"
] | null | null | null | # https://leetcode.com/problems/mirror-reflection
| 24.190476 | 55 | 0.36811 |
7dd470fef059403a7425a058aa8ed792b44ec169 | 4,290 | py | Python | sdk/python/kulado_azure/batch/get_account.py | kulado/kulado-azure | f3a408fa0405fe6ae93e0049b2ae0f0e266f1cf6 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/kulado_azure/batch/get_account.py | kulado/kulado-azure | f3a408fa0405fe6ae93e0049b2ae0f0e266f1cf6 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/kulado_azure/batch/get_account.py | kulado/kulado-azure | f3a408fa0405fe6ae93e0049b2ae0f0e266f1cf6 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Kulado Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import json
import warnings
import kulado
import kulado.runtime
from .. import utilities, tables
| 44.226804 | 226 | 0.675991 |
7dd4c10b342878f52f717eef146ce0ddd5328f2c | 1,988 | py | Python | run/run_fd_tgv_conv.py | huppd/PINTimpact | 766b2ef4d2fa9e6727965e48a3fba7b752074850 | [
"MIT"
] | null | null | null | run/run_fd_tgv_conv.py | huppd/PINTimpact | 766b2ef4d2fa9e6727965e48a3fba7b752074850 | [
"MIT"
] | null | null | null | run/run_fd_tgv_conv.py | huppd/PINTimpact | 766b2ef4d2fa9e6727965e48a3fba7b752074850 | [
"MIT"
] | null | null | null | """ running converferce for finite differences and Taylor-Green vortex """
import os
from math import pi
import xml.etree.ElementTree as ET
import platform_paths as pp
import manipulator as ma
# load parameter file
ma.set_ids('../XML/parameterTGVTime.xml')
TREE = ET.parse('../XML/parameterTGVTime.xml')
ROOT = TREE.ge... | 27.611111 | 74 | 0.551308 |
7dd56ee0d12643635fe1de9999d5c50d9f66ca84 | 14,617 | py | Python | DCSCN.py | dattv/DCSCN-Tensorflow | eaed09c1d39236617f970b16f555ae88cfa49280 | [
"MIT"
] | 3 | 2019-06-18T13:04:26.000Z | 2019-06-25T07:59:10.000Z | DCSCN.py | dattv/DCSCN-Tensorflow | eaed09c1d39236617f970b16f555ae88cfa49280 | [
"MIT"
] | null | null | null | DCSCN.py | dattv/DCSCN-Tensorflow | eaed09c1d39236617f970b16f555ae88cfa49280 | [
"MIT"
] | null | null | null | """
"""
import logging
import os
import random
import time
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf
from helper import loader, utility as util
matplotlib.use("agg")
INPUT_IMAGE_DIR = "input"
INTERPOLATED_IMAGE_DIR = "interpolated"
TRUE_IMAGE_DIR = "true"
| 46.256329 | 126 | 0.59205 |
7dd643437e0865cafce1491b350b4e99be342f2c | 27 | py | Python | tests/tests.py | cjapp/tkinter_simpleEncodeDecode | 15520d73c51bb1a6a316414b2e8fb50b7be8f942 | [
"MIT"
] | null | null | null | tests/tests.py | cjapp/tkinter_simpleEncodeDecode | 15520d73c51bb1a6a316414b2e8fb50b7be8f942 | [
"MIT"
] | null | null | null | tests/tests.py | cjapp/tkinter_simpleEncodeDecode | 15520d73c51bb1a6a316414b2e8fb50b7be8f942 | [
"MIT"
] | null | null | null |
from .context import main
| 9 | 25 | 0.777778 |
7dd7abdb00a4ee3724c7dfc992569e2f8f38d9dd | 23,149 | py | Python | ofa/tutorial/imagenet_eval_helper.py | johsnows/once-for-all | fac2a6388e70873666b848a316aa58c7b2e17031 | [
"Apache-2.0"
] | null | null | null | ofa/tutorial/imagenet_eval_helper.py | johsnows/once-for-all | fac2a6388e70873666b848a316aa58c7b2e17031 | [
"Apache-2.0"
] | null | null | null | ofa/tutorial/imagenet_eval_helper.py | johsnows/once-for-all | fac2a6388e70873666b848a316aa58c7b2e17031 | [
"Apache-2.0"
] | null | null | null | import os.path as osp
import numpy as np
import math
from tqdm import tqdm
import torch.nn as nn
import torch.backends.cudnn as cudnn
import torch.utils.data
from torchvision import transforms, datasets
from ofa.utils import AverageMeter, accuracy
from ofa.model_zoo import ofa_specialized
from ofa.imagenet_classifica... | 44.093333 | 177 | 0.607154 |
7dd999fb131d09d1bf5880249af5cf7d95c80d95 | 8,713 | py | Python | python/housinginsights/sources/cama.py | mrkem598/housing-insights | 05dffebad690bf727cbcbec53128d2fb69166e4c | [
"MIT"
] | null | null | null | python/housinginsights/sources/cama.py | mrkem598/housing-insights | 05dffebad690bf727cbcbec53128d2fb69166e4c | [
"MIT"
] | null | null | null | python/housinginsights/sources/cama.py | mrkem598/housing-insights | 05dffebad690bf727cbcbec53128d2fb69166e4c | [
"MIT"
] | null | null | null | # Script is deprecated, as of September 18, 2017.
# zoneUnitCount now calculated with LoadData's _get_residential_units()
#
from pprint import pprint
import os
import sys
import requests
from collections import OrderedDict
import csv
import datetime
PYTHON_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__)... | 39.247748 | 177 | 0.572019 |
7dd9c7a745a3b97ae9face412cad220abf628e7d | 402 | py | Python | certbot_dns_cfproxy/__init__.py | ProfFan/certbot-dns-cfproxy | 999038999642e5ba070e7089d62146b4f05caa46 | [
"Apache-1.1"
] | 2 | 2019-02-04T06:06:00.000Z | 2022-03-04T09:12:31.000Z | certbot_dns_cfproxy/__init__.py | ProfFan/certbot-dns-cfproxy | 999038999642e5ba070e7089d62146b4f05caa46 | [
"Apache-1.1"
] | null | null | null | certbot_dns_cfproxy/__init__.py | ProfFan/certbot-dns-cfproxy | 999038999642e5ba070e7089d62146b4f05caa46 | [
"Apache-1.1"
] | null | null | null | """
The `~certbot_dns_cfproxy.dns_cfproxy` plugin automates the process of
completing a ``dns-01`` challenge (`~acme.challenges.DNS01`) by creating, and
subsequently removing, TXT records using the CFProxy API.
Examples
--------
.. code-block:: bash
:caption: To acquire a certificate for ``example.com``
certbo... | 23.647059 | 77 | 0.699005 |
7ddaf2399cff82d2687308f91fcf9cc720123562 | 1,234 | py | Python | web-app/servers/card-recognize/app.py | woojae9488/HLF_chaincode | 6737f70c1daea766fa567b08454b8b63a7a97d4a | [
"Apache-2.0"
] | 2 | 2020-02-10T00:08:11.000Z | 2020-02-19T02:06:14.000Z | web-app/servers/card-recognize/app.py | woojae9488/HLF_chaincode | 6737f70c1daea766fa567b08454b8b63a7a97d4a | [
"Apache-2.0"
] | 14 | 2020-04-26T13:56:38.000Z | 2020-09-23T06:27:53.000Z | web-app/servers/card-recognize/app.py | woojae9488/HLF_chaincode | 6737f70c1daea766fa567b08454b8b63a7a97d4a | [
"Apache-2.0"
] | 3 | 2020-04-25T11:28:57.000Z | 2022-03-28T12:19:25.000Z | from flask import Flask, make_response, request
from flask_cors import CORS
import json
from config import *
from StudentCard import *
from ApiError import *
App = Flask(__name__)
cors = CORS(App,
resources={r'*': {'origins': ENV.ADDR_API_GATEWAY}},
headers='Content-Type: application/json')
... | 26.826087 | 64 | 0.63047 |
7ddb8e0adf2de6b7f5b4a9514a61cad048355467 | 2,604 | py | Python | smart_home/power_controller.py | achuchev/-SmartHome-AlexaLambda | 0e8bfe30c76688a209ee4bc8d40016478d537aba | [
"MIT"
] | null | null | null | smart_home/power_controller.py | achuchev/-SmartHome-AlexaLambda | 0e8bfe30c76688a209ee4bc8d40016478d537aba | [
"MIT"
] | null | null | null | smart_home/power_controller.py | achuchev/-SmartHome-AlexaLambda | 0e8bfe30c76688a209ee4bc8d40016478d537aba | [
"MIT"
] | 1 | 2020-06-27T15:20:29.000Z | 2020-06-27T15:20:29.000Z | import logging
from smart_home.mqtt_client import MQTTClient
from smart_home.utils_lambda import get_utc_timestamp, error_response, success_response, get_request_message_id, get_mqtt_topics_from_request, get_request_name, get_friendly_name_from_request
| 37.2 | 191 | 0.661674 |
7ddd6afc3df36a52da70783ec74e257d9596b945 | 4,082 | py | Python | components/mpas-seaice/testing_and_setup/testcases/advection/plot_testcase.py | Fa-Li/E3SM | a91995093ec6fc0dd6e50114f3c70b5fb64de0f0 | [
"zlib-acknowledgement",
"FTL",
"RSA-MD"
] | 235 | 2018-04-23T16:30:06.000Z | 2022-03-21T17:53:12.000Z | components/mpas-seaice/testing_and_setup/testcases/advection/plot_testcase.py | Fa-Li/E3SM | a91995093ec6fc0dd6e50114f3c70b5fb64de0f0 | [
"zlib-acknowledgement",
"FTL",
"RSA-MD"
] | 2,372 | 2018-04-20T18:12:34.000Z | 2022-03-31T23:43:17.000Z | components/mpas-seaice/testing_and_setup/testcases/advection/plot_testcase.py | Fa-Li/E3SM | a91995093ec6fc0dd6e50114f3c70b5fb64de0f0 | [
"zlib-acknowledgement",
"FTL",
"RSA-MD"
] | 254 | 2018-04-20T20:43:32.000Z | 2022-03-30T20:13:38.000Z | from netCDF4 import Dataset
import matplotlib
import matplotlib.pyplot as plt
from matplotlib.patches import Polygon
from matplotlib.collections import PatchCollection
import matplotlib.cm as cm
import numpy as np
#-------------------------------------------------------------
#----------------------------------------... | 31.160305 | 184 | 0.533317 |
7dddf53059511b42c5f3c624d5d6af6d11789231 | 87 | py | Python | ABC_A/ABC063_A.py | ryosuke0825/atcoder_python | 185cdbe7db44ecca1aaf357858d16d31ce515ddb | [
"MIT"
] | null | null | null | ABC_A/ABC063_A.py | ryosuke0825/atcoder_python | 185cdbe7db44ecca1aaf357858d16d31ce515ddb | [
"MIT"
] | null | null | null | ABC_A/ABC063_A.py | ryosuke0825/atcoder_python | 185cdbe7db44ecca1aaf357858d16d31ce515ddb | [
"MIT"
] | null | null | null | a, b = map(int, input().split())
if a+b >= 10:
print("error")
else:
print(a+b)
| 14.5 | 32 | 0.517241 |
7ddf431c5c2dcc581f44d2c5411d8380ca8401f0 | 2,278 | py | Python | aeropy/filehandling/paraview.py | belac626/AeroPy | 4f045306427e08b742237b7393ce9602f1072d60 | [
"MIT"
] | null | null | null | aeropy/filehandling/paraview.py | belac626/AeroPy | 4f045306427e08b742237b7393ce9602f1072d60 | [
"MIT"
] | null | null | null | aeropy/filehandling/paraview.py | belac626/AeroPy | 4f045306427e08b742237b7393ce9602f1072d60 | [
"MIT"
] | null | null | null | #### import the simple module from the paraview
from paraview.simple import *
#### disable automatic camera reset on 'Show'
paraview.simple._DisableFirstRenderCameraReset()
network_number = 2
filename = 'test_network'
directory = 'C:\\Users\\leal26\\Documents\\GitHub\\AeroPy\\aeropy\\CST\\'
# get active view... | 43.807692 | 127 | 0.763389 |
7de07a2c955d17b395e18d20843ee393cc3f7511 | 21,804 | py | Python | pyFIRS/utils.py | Ecotrust/pyFIRS | f4bd8e11b24f125c59b69b04a7c3d11eabc0e81b | [
"BSD-3-Clause"
] | 3 | 2019-05-01T01:38:05.000Z | 2020-02-06T01:42:00.000Z | pyFIRS/utils.py | Ecotrust/pyFIRS | f4bd8e11b24f125c59b69b04a7c3d11eabc0e81b | [
"BSD-3-Clause"
] | 1 | 2019-09-19T00:56:58.000Z | 2019-09-19T00:56:58.000Z | pyFIRS/utils.py | Ecotrust/pyFIRS | f4bd8e11b24f125c59b69b04a7c3d11eabc0e81b | [
"BSD-3-Clause"
] | null | null | null | import glob
import json
import os
import subprocess
import time
import xml.etree.ElementTree as ET
from xml.etree.ElementTree import ParseError
import geopandas as gpd
import rasterio
import numpy as np
from shapely.geometry import Polygon
def listlike(arg):
'''Checks whether an argument is list-like, returns b... | 34.175549 | 83 | 0.631948 |
7de18177bc8f9c705a1427b2d13f1d6f74890139 | 1,308 | py | Python | test/test_message.py | Smac01/Stego | 0bcf94642871e611b6731676591a571ff40ce4a0 | [
"MIT"
] | null | null | null | test/test_message.py | Smac01/Stego | 0bcf94642871e611b6731676591a571ff40ce4a0 | [
"MIT"
] | null | null | null | test/test_message.py | Smac01/Stego | 0bcf94642871e611b6731676591a571ff40ce4a0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import unittest
import sys
sys.path.insert(0, '.')
from random import choice
from PIL import Image
from stego.encoder import embed
from stego.decoder import extract, _decompress, IncorrectPassword
from stego.base import make_array, as_string, extract_metadata
images = ['test/rgba.png', 'test/... | 25.647059 | 86 | 0.769113 |
7de18971fbc5070d8520ba99ee3a0260bc65c1f5 | 638 | py | Python | tests/test_simulation_utils.py | burgersmoke/epysurv | 606aaf1d50a8d39473dc245e78e5b2eb122c2ba3 | [
"MIT"
] | 8 | 2019-07-29T09:44:43.000Z | 2021-06-29T20:54:57.000Z | tests/test_simulation_utils.py | burgersmoke/epysurv | 606aaf1d50a8d39473dc245e78e5b2eb122c2ba3 | [
"MIT"
] | 31 | 2019-03-29T23:05:33.000Z | 2021-10-04T16:26:46.000Z | tests/test_simulation_utils.py | burgersmoke/epysurv | 606aaf1d50a8d39473dc245e78e5b2eb122c2ba3 | [
"MIT"
] | 4 | 2019-09-25T12:54:22.000Z | 2021-08-11T06:40:45.000Z | import pandas as pd
from rpy2 import robjects
from epysurv.simulation.utils import add_date_time_index_to_frame, r_list_to_frame
| 29 | 82 | 0.716301 |
7de40d6d686a2a728856437129c7cee7420fe46e | 95 | py | Python | assemble/tool/assemble_CodeBlockUnixMake.py | vbloodv/blood | 1c6f6c54e937e8d7064f72f32cbbcc8fdaa2677d | [
"MIT"
] | 2 | 2015-08-27T20:02:04.000Z | 2015-08-31T12:33:13.000Z | assemble/tool/assemble_CodeBlockUnixMake.py | vbloodv/blood | 1c6f6c54e937e8d7064f72f32cbbcc8fdaa2677d | [
"MIT"
] | null | null | null | assemble/tool/assemble_CodeBlockUnixMake.py | vbloodv/blood | 1c6f6c54e937e8d7064f72f32cbbcc8fdaa2677d | [
"MIT"
] | null | null | null | import cmake
cmake.buildCmake(
'CodeBlockUnixMake',
'../../',
'../../assemble/'
)
| 11.875 | 24 | 0.536842 |
7de5842a34fa630d341aa9d9c697b199184bb9ae | 655 | py | Python | examples/python/bunny_pieline.py | Willyzw/vdbfusion | ca9107a3f44e43629b149ea80c9cd21d9f274baa | [
"MIT"
] | 119 | 2022-02-08T15:25:25.000Z | 2022-03-29T12:16:35.000Z | examples/python/bunny_pieline.py | arenas7307979/vdbfusion | 7ed8d3142b4b6e164633516f0ed435e1065e5212 | [
"MIT"
] | 10 | 2022-02-09T07:54:23.000Z | 2022-03-25T03:12:47.000Z | examples/python/bunny_pieline.py | arenas7307979/vdbfusion | 7ed8d3142b4b6e164633516f0ed435e1065e5212 | [
"MIT"
] | 11 | 2022-02-08T15:33:44.000Z | 2022-02-22T02:47:27.000Z | #!/usr/bin/env python3
# @file cow_pipeline.py
# @author Ignacio Vizzo [ivizzo@uni-bonn.de]
#
# Copyright (c) 2021 Ignacio Vizzo, all rights reserved
import argh
from datasets import BunnyGeneratedDataset as Dataset
from vdbfusion_pipeline import VDBFusionPipeline as Pipeline
def main(
data_source: s... | 25.192308 | 60 | 0.708397 |
7de74902240dafd5d3ece0f149442d4593ed9d43 | 1,091 | py | Python | tests/test_dashboard_generator_generate_widget.py | phelewski/aws-codepipeline-dashboard | c32fbfb01b383be9b5f813fac4ed36074e3ddc7e | [
"MIT"
] | null | null | null | tests/test_dashboard_generator_generate_widget.py | phelewski/aws-codepipeline-dashboard | c32fbfb01b383be9b5f813fac4ed36074e3ddc7e | [
"MIT"
] | 5 | 2021-04-02T18:12:58.000Z | 2021-05-21T12:15:30.000Z | tests/test_dashboard_generator_generate_widget.py | phelewski/aws-codepipeline-dashboard | c32fbfb01b383be9b5f813fac4ed36074e3ddc7e | [
"MIT"
] | null | null | null | import os
import pytest
from dashboard_generator import DashboardGenerator
| 29.486486 | 84 | 0.6022 |
7de837001eba6d36074503fa3a70a1bcb083d08b | 795 | py | Python | opencadd/tests/structure/test_superposition_mda.py | pipaj97/opencadd | 4fcf090bd612a22df9d617473ae458316a4cb4b6 | [
"MIT"
] | 39 | 2020-08-14T07:33:21.000Z | 2022-03-30T02:05:19.000Z | opencadd/tests/structure/test_superposition_mda.py | Allend95/opencadd | 1fde238e3cf8e5e47e8266a504d9df0196505e97 | [
"MIT"
] | 94 | 2020-06-29T12:47:46.000Z | 2022-02-13T19:16:25.000Z | opencadd/tests/structure/test_superposition_mda.py | Allend95/opencadd | 1fde238e3cf8e5e47e8266a504d9df0196505e97 | [
"MIT"
] | 11 | 2020-11-11T17:12:38.000Z | 2022-03-21T09:23:39.000Z | """
Tests for opencadd.structure.superposition.engines.mda
"""
import pytest
from opencadd.structure.core import Structure
from opencadd.structure.superposition.engines.mda import MDAnalysisAligner
| 28.392857 | 98 | 0.733333 |
7de96af0dde6dfcdb1cd866b9ae2a4a947f6d2c2 | 274 | py | Python | examples/python/hello2.py | redcodestudios/legion_script | 565fb9bc6fe1dd9d9cf1a2111fd4e4cef4cd3565 | [
"MIT"
] | 13 | 2020-10-21T16:34:50.000Z | 2022-03-16T14:37:30.000Z | examples/python/hello2.py | redcodestudios/legion_script | 565fb9bc6fe1dd9d9cf1a2111fd4e4cef4cd3565 | [
"MIT"
] | null | null | null | examples/python/hello2.py | redcodestudios/legion_script | 565fb9bc6fe1dd9d9cf1a2111fd4e4cef4cd3565 | [
"MIT"
] | null | null | null | import engine
print("Python: Script 2")
result = engine.query(Color)
print("Python: Query colors from Script 2")
for c in result:
c.string()
print("--------------------")
| 18.266667 | 47 | 0.638686 |
7de9ef0f997041de89ca689516f1669065c3dc15 | 4,389 | py | Python | io_scene_halo/file_tag/import_tag.py | AerialDave144/Halo-Asset-Blender-Development-Toolset | f1b0c0b22806ebabaf0126ad864896193c02307f | [
"MIT"
] | null | null | null | io_scene_halo/file_tag/import_tag.py | AerialDave144/Halo-Asset-Blender-Development-Toolset | f1b0c0b22806ebabaf0126ad864896193c02307f | [
"MIT"
] | null | null | null | io_scene_halo/file_tag/import_tag.py | AerialDave144/Halo-Asset-Blender-Development-Toolset | f1b0c0b22806ebabaf0126ad864896193c02307f | [
"MIT"
] | null | null | null | # ##### BEGIN MIT LICENSE BLOCK #####
#
# MIT License
#
# Copyright (c) 2022 Steven Garcia
#
# 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 ... | 39.1875 | 125 | 0.75188 |
7deaa318807e1bc9f791206624ba77111ef68405 | 1,537 | py | Python | pines/smartread.py | jpn--/pine | 3980a9f0b09dd36b2fed7e52750847637be5f067 | [
"MIT"
] | 2 | 2017-08-09T02:42:37.000Z | 2020-06-16T14:14:16.000Z | pines/smartread.py | jpn--/pine | 3980a9f0b09dd36b2fed7e52750847637be5f067 | [
"MIT"
] | null | null | null | pines/smartread.py | jpn--/pine | 3980a9f0b09dd36b2fed7e52750847637be5f067 | [
"MIT"
] | null | null | null |
import gzip, os, struct, zipfile, io
| 30.137255 | 94 | 0.657775 |
7dec49d76923ecb9be4b17a5cb4c2e8eb1b3a170 | 510 | py | Python | lib/clckwrkbdgr/time.py | umi0451/dotfiles | c618811be788d995fe01f6a16b355828d7efdd36 | [
"MIT"
] | 2 | 2017-04-16T14:54:17.000Z | 2020-11-12T04:15:00.000Z | lib/clckwrkbdgr/time.py | clckwrkbdgr/dotfiles | 292dac8c3211248b490ddbae55fe2adfffcfcf58 | [
"MIT"
] | null | null | null | lib/clckwrkbdgr/time.py | clckwrkbdgr/dotfiles | 292dac8c3211248b490ddbae55fe2adfffcfcf58 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from time import *
import datetime
import six
def get_utctimestamp(mtime=None): # pragma: no cover
""" Converts local mtime (timestamp) to integer UTC timestamp.
If mtime is None, returns current UTC time.
"""
if mtime is None:
if six.PY2:
return int((datetime.datetime.n... | 31.875 | 88 | 0.754902 |
7dee18b24646c7a504a2809135076549b5a544fa | 135 | py | Python | configutator/__version.py | innovate-invent/configutator | 372b45c44a10171b8518e61f2a7974969304c33a | [
"MIT"
] | null | null | null | configutator/__version.py | innovate-invent/configutator | 372b45c44a10171b8518e61f2a7974969304c33a | [
"MIT"
] | 1 | 2017-09-22T05:52:54.000Z | 2017-09-22T05:52:54.000Z | configutator/__version.py | innovate-invent/configutator | 372b45c44a10171b8518e61f2a7974969304c33a | [
"MIT"
] | null | null | null | __version__ = [1, 0, 2]
__versionstr__ = '.'.join([str(i) for i in __version__])
if __name__ == '__main__':
print(__versionstr__) | 22.5 | 56 | 0.666667 |
7dee5b01ddca7ca6f3f444bdaf770ca84c443c68 | 572 | py | Python | tests/integration/test_serialise.py | csiro-easi/eo-datasets | 7805c569763f828cb0ace84c93932bddb882a6a3 | [
"Apache-2.0"
] | null | null | null | tests/integration/test_serialise.py | csiro-easi/eo-datasets | 7805c569763f828cb0ace84c93932bddb882a6a3 | [
"Apache-2.0"
] | null | null | null | tests/integration/test_serialise.py | csiro-easi/eo-datasets | 7805c569763f828cb0ace84c93932bddb882a6a3 | [
"Apache-2.0"
] | null | null | null | from pathlib import Path
from typing import Dict
from eodatasets3 import serialise
from .common import assert_same, dump_roundtrip
| 30.105263 | 84 | 0.791958 |
7deee6c010d48a8d2b8631423560a24cab9c77a0 | 4,369 | py | Python | src/plot/plot-bb/plot_methods.py | bcrafton/speed_read | 3e9c0c873e49e4948a216aae14ec0d4654d1a62c | [
"MIT"
] | null | null | null | src/plot/plot-bb/plot_methods.py | bcrafton/speed_read | 3e9c0c873e49e4948a216aae14ec0d4654d1a62c | [
"MIT"
] | null | null | null | src/plot/plot-bb/plot_methods.py | bcrafton/speed_read | 3e9c0c873e49e4948a216aae14ec0d4654d1a62c | [
"MIT"
] | 2 | 2020-11-08T12:51:23.000Z | 2021-12-02T23:16:48.000Z |
import numpy as np
import matplotlib.pyplot as plt
####################
####################
comp_pJ = 22. * 1e-12 / 32. / 16.
num_layers = 6
num_comparator = 8
results = np.load('results.npy', allow_pickle=True).item()
y_mean = np.zeros(shape=(2, 2, 2, 2, num_layers))
y_std = np.zeros(shape=(2, 2, 2, 2, num_laye... | 29.721088 | 145 | 0.559396 |
7def97525f164a67b3206cba17eb1da34b5d6234 | 3,154 | py | Python | build/getversion.py | timgates42/subversion | 0f088f530747140c6783c2eeb77ceff8e8613c42 | [
"Apache-2.0"
] | 3 | 2017-01-03T03:20:56.000Z | 2018-12-24T22:05:09.000Z | build/getversion.py | timgates42/subversion | 0f088f530747140c6783c2eeb77ceff8e8613c42 | [
"Apache-2.0"
] | 3 | 2016-06-12T17:02:25.000Z | 2019-02-03T11:08:18.000Z | build/getversion.py | timgates42/subversion | 0f088f530747140c6783c2eeb77ceff8e8613c42 | [
"Apache-2.0"
] | 3 | 2017-01-21T00:15:13.000Z | 2020-11-04T07:23:50.000Z | #!/usr/bin/env python
#
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | 27.426087 | 63 | 0.675333 |
7df019fabd0e51d78fd4be6cb16ea6706b50e9be | 1,136 | py | Python | redis/p02-vote/client/c02.py | JoseIbanez/testing | 4d6ff310cd63a8b2f8e1abcfbea0f17b23220021 | [
"MIT"
] | 1 | 2016-09-15T03:58:30.000Z | 2016-09-15T03:58:30.000Z | redis/p02-vote/client/c02.py | JoseIbanez/testing | 4d6ff310cd63a8b2f8e1abcfbea0f17b23220021 | [
"MIT"
] | 1 | 2020-09-13T08:44:50.000Z | 2020-09-13T08:44:50.000Z | redis/p02-vote/client/c02.py | JoseIbanez/testing | 4d6ff310cd63a8b2f8e1abcfbea0f17b23220021 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import httplib
import random
import argparse
import sys
#Get options
parser = argparse.ArgumentParser(
description='Testing vote app')
parser.add_argument(
'-port',
type=int,
help='port of server',
default=8000)
parser.add_argument(
'-host',
... | 17.476923 | 60 | 0.647007 |
7df1653c3e5e087f0be1c1ff434e58035664ddf1 | 8,161 | py | Python | vm_manager/vm_functions/admin_functionality.py | NeCTAR-RC/bumblebee | 8ba4c543695c83ea1ca532012203f05189438e23 | [
"Apache-2.0"
] | 3 | 2021-11-19T10:45:17.000Z | 2022-02-15T21:57:58.000Z | vm_manager/vm_functions/admin_functionality.py | NeCTAR-RC/bumblebee | 8ba4c543695c83ea1ca532012203f05189438e23 | [
"Apache-2.0"
] | null | null | null | vm_manager/vm_functions/admin_functionality.py | NeCTAR-RC/bumblebee | 8ba4c543695c83ea1ca532012203f05189438e23 | [
"Apache-2.0"
] | null | null | null | from uuid import UUID
import django_rq
import logging
from datetime import datetime, timezone, timedelta
from django.core.mail import mail_managers
from django.db.models import Count
from django.db.models.functions import TruncDay
from django.http import HttpResponse, HttpResponseRedirect, Http404
from django.shortcu... | 41.01005 | 92 | 0.638892 |
7df1d68440ff66d19aea439b6b82acb020e94a8f | 365 | py | Python | scripts/af_renameSG.py | aaronfang/small-Scripts | 890b10ab19fa9cdf2415aaf2dc08b81cc64fc79d | [
"MIT"
] | 1 | 2018-03-08T16:34:00.000Z | 2018-03-08T16:34:00.000Z | scripts/af_renameSG.py | aaronfang/personal_scripts | 890b10ab19fa9cdf2415aaf2dc08b81cc64fc79d | [
"MIT"
] | null | null | null | scripts/af_renameSG.py | aaronfang/personal_scripts | 890b10ab19fa9cdf2415aaf2dc08b81cc64fc79d | [
"MIT"
] | null | null | null | # rename shading group name to material name but with SG ended
import pymel.core as pm
import re
selSG = pm.ls(sl=True,fl=True)
for SG in selSG:
curMat = pm.listConnections(SG,d=1)
for mat in curMat:
if pm.nodeType(mat) == 'blinn' or pm.nodeType(mat) == 'lambert':
sgNM = re.split("_mat",str(... | 33.181818 | 72 | 0.632877 |
8145be52efea74b03f5b43c1e53cd198f1584621 | 729 | py | Python | conftest.py | berpress/MT5WT | 10826f974cd5aef14e8771e18ca0314f27a902e3 | [
"Apache-2.0"
] | null | null | null | conftest.py | berpress/MT5WT | 10826f974cd5aef14e8771e18ca0314f27a902e3 | [
"Apache-2.0"
] | 1 | 2019-11-26T18:12:24.000Z | 2019-11-26T18:12:24.000Z | conftest.py | berpress/MT5WT | 10826f974cd5aef14e8771e18ca0314f27a902e3 | [
"Apache-2.0"
] | null | null | null | import pytest
from common.common import NETTING_ACCOUNT
from fixture.application import Application
| 24.3 | 79 | 0.699588 |
81473d4251ec4022292a6f33a138c31e6bf74550 | 3,855 | py | Python | chapps/tests/test_util/test_util.py | easydns/chapps | 3bb54e795de1f91c6cf749f9aeb16b1211584809 | [
"MIT"
] | 1 | 2022-03-23T13:36:43.000Z | 2022-03-23T13:36:43.000Z | chapps/tests/test_util/test_util.py | easydns/chapps | 3bb54e795de1f91c6cf749f9aeb16b1211584809 | [
"MIT"
] | 2 | 2022-02-25T18:12:15.000Z | 2022-03-07T22:32:13.000Z | chapps/tests/test_util/test_util.py | easydns/chapps | 3bb54e795de1f91c6cf749f9aeb16b1211584809 | [
"MIT"
] | null | null | null | """CHAPPS Utilities Tests
.. todo::
Write tests for :class:`~chapps.util.VenvDetector`
"""
import pytest
from pprint import pprint as ppr
from chapps.util import AttrDict, PostfixPolicyRequest
pytestmark = pytest.mark.order(1)
| 33.521739 | 82 | 0.628275 |
8147a9961c8020efb6e931a049f2c9b13c430d08 | 84 | py | Python | PMMH/apps/game/map/admin.py | metinberkkaratas/ProjectMagic-MightofHeroes | 578697e637aba0f18b4f83762bf1c87fb20db2ee | [
"MIT"
] | null | null | null | PMMH/apps/game/map/admin.py | metinberkkaratas/ProjectMagic-MightofHeroes | 578697e637aba0f18b4f83762bf1c87fb20db2ee | [
"MIT"
] | 4 | 2021-03-19T02:37:45.000Z | 2022-02-10T11:18:04.000Z | PMMH/apps/game/map/admin.py | metinberkkaratas/ProjectMagic-MightofHeroes | 578697e637aba0f18b4f83762bf1c87fb20db2ee | [
"MIT"
] | 1 | 2019-10-21T20:32:20.000Z | 2019-10-21T20:32:20.000Z | from django.contrib import admin
from .models import Map
admin.site.register(Map)
| 14 | 32 | 0.797619 |
8148c634d7eb81e51ee23984bd4ad754b8ff54d8 | 816 | py | Python | models/__init__.py | pgodet/star_flow | cedb96ff339d11abf71d12d09e794593a742ccce | [
"Apache-2.0"
] | 10 | 2020-11-17T12:55:00.000Z | 2022-01-13T07:23:55.000Z | models/__init__.py | pgodet/star_flow | cedb96ff339d11abf71d12d09e794593a742ccce | [
"Apache-2.0"
] | 1 | 2021-01-02T22:46:07.000Z | 2021-01-02T22:46:07.000Z | models/__init__.py | pgodet/star_flow | cedb96ff339d11abf71d12d09e794593a742ccce | [
"Apache-2.0"
] | 1 | 2021-01-26T10:53:02.000Z | 2021-01-26T10:53:02.000Z | from . import pwcnet
from . import pwcnet_irr
from . import pwcnet_occ_joint
from . import pwcnet_irr_occ_joint
from . import tr_flow
from . import tr_features
from . import IRR_PWC
from . import IRR_PWC_occ_joint
from . import STAR
PWCNet = pwcnet.PWCNet
PWCNet_irr = pwcnet_irr.PWCNet
PWCNe... | 24 | 53 | 0.792892 |
81497b94baefb829f896f3159d41b2c5f1e8542b | 2,386 | py | Python | blkdiscovery/blkid.py | jaredeh/blkdiscovery | b2a73f12adfe784157783d94dbdb17a79810a680 | [
"MIT"
] | null | null | null | blkdiscovery/blkid.py | jaredeh/blkdiscovery | b2a73f12adfe784157783d94dbdb17a79810a680 | [
"MIT"
] | null | null | null | blkdiscovery/blkid.py | jaredeh/blkdiscovery | b2a73f12adfe784157783d94dbdb17a79810a680 | [
"MIT"
] | null | null | null | import os
import re
#hack for python2 support
try:
from .blkdiscoveryutil import *
except:
from blkdiscoveryutil import *
if __name__ == '__main__':
import pprint
pp = pprint.PrettyPrinter(indent=4)
l = Blkid()
devdata = l.call_blkid()
pp.pprint(devdata)
disks = l.find_disks(devdata)
... | 29.45679 | 75 | 0.538139 |
81498134e7422fff5c181158b8b48f05fe97fab6 | 6,217 | py | Python | cosa/analyzers/bmc_ltl.py | zsisco/CoSA | b7a5107fcbae9b3ed3726fbcf9240b39252ef551 | [
"BSD-3-Clause"
] | 52 | 2018-02-26T19:01:03.000Z | 2022-02-24T08:30:00.000Z | cosa/analyzers/bmc_ltl.py | zsisco/CoSA | b7a5107fcbae9b3ed3726fbcf9240b39252ef551 | [
"BSD-3-Clause"
] | 28 | 2018-06-07T22:18:23.000Z | 2020-10-27T01:21:01.000Z | cosa/analyzers/bmc_ltl.py | zsisco/CoSA | b7a5107fcbae9b3ed3726fbcf9240b39252ef551 | [
"BSD-3-Clause"
] | 12 | 2018-08-16T20:02:46.000Z | 2021-01-20T18:17:45.000Z | # Copyright 2018 Cristian Mattarei
#
# Licensed under the modified BSD (3-clause BSD) License.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the ... | 32.212435 | 102 | 0.579218 |
81499daf35ebda15aaf719c6405036c7a52b937c | 4,623 | py | Python | paleomix/nodes/bowtie2.py | MikkelSchubert/paleomix | 5c6414060088ba178ff1c400bdbd45d2f6b1aded | [
"MIT"
] | 33 | 2015-04-08T10:44:19.000Z | 2021-11-01T14:23:40.000Z | paleomix/nodes/bowtie2.py | MikkelSchubert/paleomix | 5c6414060088ba178ff1c400bdbd45d2f6b1aded | [
"MIT"
] | 41 | 2015-07-17T12:46:16.000Z | 2021-10-13T06:47:25.000Z | paleomix/nodes/bowtie2.py | MikkelSchubert/paleomix | 5c6414060088ba178ff1c400bdbd45d2f6b1aded | [
"MIT"
] | 19 | 2015-01-23T07:09:39.000Z | 2021-04-06T09:30:21.000Z | #!/usr/bin/python3
#
# Copyright (c) 2012 Mikkel Schubert <MikkelSch@gmail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
... | 30.019481 | 79 | 0.605667 |
8149af93bae69dfead5a5f9ae4e810455dcc5116 | 976 | py | Python | modu_01/04_02_lab.py | 94JuHo/study_for_deeplearning | ababf482b6a24d94b5f860ea9a68e34fe324d182 | [
"MIT"
] | null | null | null | modu_01/04_02_lab.py | 94JuHo/study_for_deeplearning | ababf482b6a24d94b5f860ea9a68e34fe324d182 | [
"MIT"
] | null | null | null | modu_01/04_02_lab.py | 94JuHo/study_for_deeplearning | ababf482b6a24d94b5f860ea9a68e34fe324d182 | [
"MIT"
] | null | null | null | import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' #
import tensorflow as tf
#using matrix
x_data = [[73., 80., 75.], [93., 88., 93.,], [89., 91., 90.], [96., 98., 100.], [73., 66., 70.]]
y_data = [[152.], [185.], [180.], [196.], [142.]]
X = tf.placeholder(tf.float32, shape=[None, 3]) #n . tensorflow none .
... | 32.533333 | 96 | 0.655738 |
814a3026ad57c4136a0d1ae0e01b8c8cbeaa23f5 | 3,291 | py | Python | freezer/storage/fslike.py | kwu83tw/freezer | 5aaab1e70bf957436d888fbc3fce7af8d25eb124 | [
"MIT"
] | 141 | 2015-10-18T02:53:47.000Z | 2022-03-10T11:31:30.000Z | freezer/storage/fslike.py | kwu83tw/freezer | 5aaab1e70bf957436d888fbc3fce7af8d25eb124 | [
"MIT"
] | 1 | 2016-10-31T01:56:10.000Z | 2016-10-31T01:56:10.000Z | freezer/storage/fslike.py | kwu83tw/freezer | 5aaab1e70bf957436d888fbc3fce7af8d25eb124 | [
"MIT"
] | 50 | 2015-10-27T12:16:08.000Z | 2022-02-14T07:14:01.000Z | # (c) Copyright 2014,2015 Hewlett-Packard Development Company, L.P.
#
# 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... | 32.264706 | 74 | 0.606806 |
814afb82812c77d3cd59d4373c1636829f4ef2dc | 1,558 | py | Python | rubicon/repository/asynchronous/s3.py | gforsyth/rubicon | b77c0bdfc73d3f5666f76c83240706c10cd2e88c | [
"Apache-2.0"
] | null | null | null | rubicon/repository/asynchronous/s3.py | gforsyth/rubicon | b77c0bdfc73d3f5666f76c83240706c10cd2e88c | [
"Apache-2.0"
] | null | null | null | rubicon/repository/asynchronous/s3.py | gforsyth/rubicon | b77c0bdfc73d3f5666f76c83240706c10cd2e88c | [
"Apache-2.0"
] | null | null | null | from rubicon.repository.asynchronous import AsynchronousBaseRepository
from rubicon.repository.utils import json
| 33.869565 | 73 | 0.67715 |
814b91426dfa04f0937c2eaf434296d7b486ca56 | 1,660 | py | Python | examples/multidata_example.py | zssherman/ACT | db87008aa6649d3d21b79ae97ea0f11d7f1f1935 | [
"BSD-3-Clause"
] | 62 | 2020-01-13T19:48:49.000Z | 2022-03-22T07:56:37.000Z | examples/multidata_example.py | zssherman/ACT | db87008aa6649d3d21b79ae97ea0f11d7f1f1935 | [
"BSD-3-Clause"
] | 215 | 2020-01-07T20:17:11.000Z | 2022-03-31T18:49:57.000Z | examples/multidata_example.py | zssherman/ACT | db87008aa6649d3d21b79ae97ea0f11d7f1f1935 | [
"BSD-3-Clause"
] | 16 | 2020-01-13T21:25:55.000Z | 2022-03-26T18:01:29.000Z | """
==================================================
Example on how to plot multiple datasets at a time
==================================================
This is an example of how to download and
plot multiple datasets at a time.
.. image:: ../../multi_ds_plot1.png
"""
import act
import matplotlib.pyplot as plt
... | 32.54902 | 88 | 0.689759 |
814bbe8913aa4c1ed64cfd661e62c150faebc750 | 805 | py | Python | gpdata.py | masenov/bullet | be7148c93e3bf8111923063b599f2e9f7ea929b8 | [
"Zlib"
] | null | null | null | gpdata.py | masenov/bullet | be7148c93e3bf8111923063b599f2e9f7ea929b8 | [
"Zlib"
] | null | null | null | gpdata.py | masenov/bullet | be7148c93e3bf8111923063b599f2e9f7ea929b8 | [
"Zlib"
] | null | null | null | flat_x = x.flatten()
flat_y = y.flatten()
flat_z = z.flatten()
size = flat_x.shape[0]
filename = 'landscapeData.h'
open(filename, 'w').close()
f = open(filename, 'a')
f.write('#include "LinearMath/btScalar.h"\n#define Landscape01VtxCount 4\n#define Landscape01IdxCount 4\nbtScalar Landscape01Vtx[] = {\n')
for i in r... | 23.676471 | 138 | 0.62236 |
814d356177b5fffd6e85621ee2f5863452f63451 | 2,776 | py | Python | samples/create_project.py | zuarbase/server-client-python | 1e5e02a550727d72fa90c3d8e4caa4c5f416dc74 | [
"CC0-1.0",
"MIT"
] | 470 | 2016-09-14T23:38:48.000Z | 2022-03-31T07:59:53.000Z | samples/create_project.py | zuarbase/server-client-python | 1e5e02a550727d72fa90c3d8e4caa4c5f416dc74 | [
"CC0-1.0",
"MIT"
] | 772 | 2016-09-09T18:15:44.000Z | 2022-03-31T22:01:08.000Z | samples/create_project.py | zuarbase/server-client-python | 1e5e02a550727d72fa90c3d8e4caa4c5f416dc74 | [
"CC0-1.0",
"MIT"
] | 346 | 2016-09-10T00:05:00.000Z | 2022-03-30T18:55:47.000Z | ####
# This script demonstrates how to use the Tableau Server Client
# to create new projects, both at the root level and how to nest them using
# parent_id.
#
#
# To run the script, you must have installed Python 3.6 or later.
####
import argparse
import logging
import sys
import tableauserverclient as TSC
if __... | 40.823529 | 101 | 0.699568 |
814e51bb73ef3a0faf2172d4b70fb37c15405587 | 2,146 | py | Python | tests/test_threading.py | nmandery/rasterio | ba5e90c487bd1930f52e57dba999e889b4df9ade | [
"BSD-3-Clause"
] | 1,479 | 2015-01-10T12:35:07.000Z | 2021-10-18T16:17:15.000Z | tests/test_threading.py | nmandery/rasterio | ba5e90c487bd1930f52e57dba999e889b4df9ade | [
"BSD-3-Clause"
] | 1,819 | 2015-01-06T21:56:25.000Z | 2021-10-20T02:28:27.000Z | tests/test_threading.py | nmandery/rasterio | ba5e90c487bd1930f52e57dba999e889b4df9ade | [
"BSD-3-Clause"
] | 509 | 2015-01-06T20:59:12.000Z | 2021-10-18T14:14:57.000Z | from threading import Thread
import time
import unittest
import rasterio as rio
from rasterio.env import get_gdal_config
def test_child_thread_inherits_env():
"""A new thread inherit's the main thread's env"""
t1 = Thread(target=func)
with rio.Env(FROM_MAIN=True):
t1.start()
assert get... | 25.855422 | 75 | 0.584809 |
81507c4f325c3f7f550df8daa74e43be479e3fc4 | 4,600 | py | Python | dm_construction/environments_test.py | frangipane/dm_construction | c84dcbd13ef6896a57da04fe62be85297178552a | [
"Apache-2.0"
] | 25 | 2020-07-16T12:35:07.000Z | 2022-03-25T11:02:54.000Z | dm_construction/environments_test.py | frangipane/dm_construction | c84dcbd13ef6896a57da04fe62be85297178552a | [
"Apache-2.0"
] | 2 | 2021-01-11T11:40:21.000Z | 2021-06-15T12:43:28.000Z | dm_construction/environments_test.py | LaudateCorpus1/dm_construction | f9d59f6ccb8818b71f971387704f2db8f2b3323a | [
"Apache-2.0"
] | 7 | 2020-08-20T13:04:37.000Z | 2021-11-19T18:55:09.000Z | #!/usr/bin/python
#
# Copyright 2020 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | 35.658915 | 80 | 0.722609 |
8150b4a9e126831d7b3a5289d0e53064e11cb629 | 225 | py | Python | Modulo_3/semana 2/imagenes/imagen.py | rubens233/cocid_python | 492ebdf21817e693e5eb330ee006397272f2e0cc | [
"MIT"
] | null | null | null | Modulo_3/semana 2/imagenes/imagen.py | rubens233/cocid_python | 492ebdf21817e693e5eb330ee006397272f2e0cc | [
"MIT"
] | null | null | null | Modulo_3/semana 2/imagenes/imagen.py | rubens233/cocid_python | 492ebdf21817e693e5eb330ee006397272f2e0cc | [
"MIT"
] | null | null | null | from tkinter import *
ventana = Tk()
ventana.geometry("500x500")
ventana.title('PythonGuides')
img = PhotoImage(file='./logo.png')
img = img.subsample(3, 3)
Label( ventana, image=img ).pack(fill="both")
ventana.mainloop() | 18.75 | 45 | 0.711111 |
815225f9552d4d71ea93b38bd616e126479cf8c1 | 476 | py | Python | htdfsdk/utils.py | youngqqcn/htdfsdk | c22f213a967c8233bb6ccfb01bf148112efd44db | [
"MIT"
] | 2 | 2021-01-21T01:46:29.000Z | 2021-03-12T05:59:19.000Z | htdfsdk/utils.py | youngqqcn/htdfsdk | c22f213a967c8233bb6ccfb01bf148112efd44db | [
"MIT"
] | null | null | null | htdfsdk/utils.py | youngqqcn/htdfsdk | c22f213a967c8233bb6ccfb01bf148112efd44db | [
"MIT"
] | null | null | null | #coding:utf8
#author: yqq
#date: 2020/12/15 5:38
#descriptions:
from decimal import Decimal, getcontext
# getcontext()
if __name__ == '__main__':
assert htdf_to_satoshi(139623.71827296) == 13962371827296
assert htdf_to_satoshi('139623.71827296') == 13962371827296
assert htdf_to_satoshi(13962371827296)... | 21.636364 | 70 | 0.714286 |
81523ae13c659215630baf70c984ec0ce5e2200e | 1,213 | py | Python | hanzi_font_deconstructor/scripts/create_training_data.py | chanind/hanzi-font-deconstructor | ce41b2a5c0e66b8a83d6c734678446d1d32a18b7 | [
"MIT"
] | null | null | null | hanzi_font_deconstructor/scripts/create_training_data.py | chanind/hanzi-font-deconstructor | ce41b2a5c0e66b8a83d6c734678446d1d32a18b7 | [
"MIT"
] | null | null | null | hanzi_font_deconstructor/scripts/create_training_data.py | chanind/hanzi-font-deconstructor | ce41b2a5c0e66b8a83d6c734678446d1d32a18b7 | [
"MIT"
] | null | null | null | from dataclasses import asdict
from hanzi_font_deconstructor.common.generate_training_data import (
STROKE_VIEW_BOX,
get_training_input_svg_and_masks,
)
from os import path, makedirs
from pathlib import Path
import shutil
import argparse
PROJECT_ROOT = Path(__file__).parents[2]
DEST_FOLDER = PROJECT_ROOT / "da... | 29.585366 | 86 | 0.698269 |
815535942d00809101f7b9f361c4f256b557f56f | 1,321 | py | Python | examples/generated_sample_regression.py | micheleantonazzi/gibson-dataset | cb5fc81061bbda1a653d6fc7b625b14c8a517f3c | [
"MIT"
] | 3 | 2021-10-31T17:43:50.000Z | 2022-03-21T08:55:01.000Z | examples/generated_sample_regression.py | micheleantonazzi/gibson-dataset | cb5fc81061bbda1a653d6fc7b625b14c8a517f3c | [
"MIT"
] | null | null | null | examples/generated_sample_regression.py | micheleantonazzi/gibson-dataset | cb5fc81061bbda1a653d6fc7b625b14c8a517f3c | [
"MIT"
] | null | null | null | from generic_dataset.data_pipeline import DataPipeline
from generic_dataset.generic_sample import synchronize_on_fields
from generic_dataset.sample_generator import SampleGenerator
import numpy as np
import generic_dataset.utilities.save_load_methods as slm
pipeline_rgb_to_gbr = DataPipeline().add_operation(lambda dat... | 62.904762 | 255 | 0.824375 |