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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
35610507ab819d86ea042c5778fb91378bad6012 | 4,571 | py | Python | src/pycity_scheduling/classes/electrical_heater.py | ElsevierSoftwareX/SOFTX-D-20-00087 | d2d3f1effda2c0499cb05abf87435375a21379e3 | [
"MIT"
] | 4 | 2021-11-01T15:13:27.000Z | 2022-01-16T18:01:06.000Z | src/pycity_scheduling/classes/electrical_heater.py | ElsevierSoftwareX/SOFTX-D-20-00087 | d2d3f1effda2c0499cb05abf87435375a21379e3 | [
"MIT"
] | 2 | 2021-11-18T05:58:00.000Z | 2022-01-19T16:46:20.000Z | src/pycity_scheduling/classes/electrical_heater.py | ElsevierSoftwareX/SOFTX-D-20-00087 | d2d3f1effda2c0499cb05abf87435375a21379e3 | [
"MIT"
] | 5 | 2021-11-01T15:13:35.000Z | 2022-02-03T21:28:48.000Z | """
The pycity_scheduling framework
Copyright (C) 2022,
Institute for Automation of Complex Power Systems (ACS),
E.ON Energy Research Center (E.ON ERC),
RWTH Aachen University
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Softwa... | 41.18018 | 118 | 0.703566 |
35632b004edf0889b947ff8dab8238164166f87d | 13,394 | py | Python | klasses/api.py | mitodl/bootcamp-ecommerce | ba7d6aefe56c6481ae2a5afc84cdd644538b6d50 | [
"BSD-3-Clause"
] | 2 | 2018-06-20T19:37:03.000Z | 2021-01-06T09:51:40.000Z | klasses/api.py | mitodl/bootcamp-ecommerce | ba7d6aefe56c6481ae2a5afc84cdd644538b6d50 | [
"BSD-3-Clause"
] | 1,226 | 2017-02-23T14:52:28.000Z | 2022-03-29T13:19:54.000Z | klasses/api.py | mitodl/bootcamp-ecommerce | ba7d6aefe56c6481ae2a5afc84cdd644538b6d50 | [
"BSD-3-Clause"
] | 3 | 2017-03-20T03:51:27.000Z | 2021-03-19T15:54:31.000Z | """
API functionality for bootcamps
"""
import logging
from datetime import datetime, timedelta
import pytz
from django.core.exceptions import ValidationError, ObjectDoesNotExist
from django.db.models import Sum
from applications.constants import AppStates
from ecommerce.models import Line, Order
from klasses.constan... | 37.729577 | 117 | 0.657011 |
35643bae4260d8b9d3b851012048c6639e6d322b | 1,745 | py | Python | news/management/commands/fetch_planet.py | SIBSIND/PHPMYADMINWEBSITE | e2112f0fb43f042be551ecaadb05b1cc79ba5360 | [
"MIT"
] | 31 | 2015-05-26T23:13:06.000Z | 2022-03-10T12:03:33.000Z | news/management/commands/fetch_planet.py | SIBSIND/PHPMYADMINWEBSITE | e2112f0fb43f042be551ecaadb05b1cc79ba5360 | [
"MIT"
] | 136 | 2015-01-15T23:30:23.000Z | 2022-03-31T00:59:01.000Z | news/management/commands/fetch_planet.py | SIBSIND/PHPMYADMINWEBSITE | e2112f0fb43f042be551ecaadb05b1cc79ba5360 | [
"MIT"
] | 158 | 2015-01-15T23:25:26.000Z | 2022-02-09T01:47:20.000Z | # -*- coding: UTF-8 -*-
# vim: set expandtab sw=4 ts=4 sts=4:
#
# phpMyAdmin web site
#
# Copyright (C) 2008 - 2016 Michal Cihar <michal@cihar.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundati... | 32.314815 | 73 | 0.634384 |
356456d1a91cf05134c753d550fbf53265ec7f7c | 17,082 | py | Python | src/convert_dataset_video_to_mouth_img.py | iglaweb/HippoYD | da2c40be8017c43a7b7b6c029e2df30cf7d54932 | [
"Apache-2.0"
] | 7 | 2021-07-02T03:57:20.000Z | 2022-03-20T13:23:32.000Z | src/convert_dataset_video_to_mouth_img.py | filipul1s/HippoYD | da2c40be8017c43a7b7b6c029e2df30cf7d54932 | [
"Apache-2.0"
] | null | null | null | src/convert_dataset_video_to_mouth_img.py | filipul1s/HippoYD | da2c40be8017c43a7b7b6c029e2df30cf7d54932 | [
"Apache-2.0"
] | 3 | 2021-07-02T16:07:28.000Z | 2022-03-20T13:23:33.000Z | import collections
import csv
import os
import sys
from enum import Enum
from pathlib import Path
# adapt paths for jupyter
module_path = os.path.abspath(os.path.join('..'))
if module_path not in sys.path:
sys.path.append(module_path)
import face_alignment
from yawn_train.src.blazeface_detector import BlazeFaceD... | 37.625551 | 135 | 0.669652 |
35665e1b39e67d688ac135c0ce7cb34d35d57e66 | 1,223 | py | Python | homeassistant/components/launch_library/diagnostics.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 30,023 | 2016-04-13T10:17:53.000Z | 2020-03-02T12:56:31.000Z | homeassistant/components/launch_library/diagnostics.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 24,710 | 2016-04-13T08:27:26.000Z | 2020-03-02T12:59:13.000Z | homeassistant/components/launch_library/diagnostics.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 11,956 | 2016-04-13T18:42:31.000Z | 2020-03-02T09:32:12.000Z | """Diagnostics support for Launch Library."""
from __future__ import annotations
from typing import Any
from pylaunches.objects.event import Event
from pylaunches.objects.launch import Launch
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers.... | 29.829268 | 77 | 0.72036 |
3567e722e33bfee718b3bdecb716ef40a5ef9cda | 2,894 | py | Python | py_tests/test_vision_pipeline_manager.py | machine2learn/mlpiot.base | da0b77fccbb0e42d1ddbb6dbc490313433dc7575 | [
"Apache-2.0"
] | 1 | 2021-03-30T20:49:54.000Z | 2021-03-30T20:49:54.000Z | py_tests/test_vision_pipeline_manager.py | machine2learn/mlpiot.base | da0b77fccbb0e42d1ddbb6dbc490313433dc7575 | [
"Apache-2.0"
] | null | null | null | py_tests/test_vision_pipeline_manager.py | machine2learn/mlpiot.base | da0b77fccbb0e42d1ddbb6dbc490313433dc7575 | [
"Apache-2.0"
] | null | null | null | """Tests for mlpiot.base.vision_pipeline_manager"""
import unittest
from mlpiot.base.action_executor import ActionExecutor
from mlpiot.base.event_extractor import EventExtractor
from mlpiot.base.scene_descriptor import SceneDescriptor
from mlpiot.base.trainer import Trainer
from mlpiot.base.vision_pipeline_manager im... | 29.232323 | 75 | 0.717346 |
3567ef1a903012178ca2379e19f67a46e3d91e09 | 1,176 | py | Python | day04/code2.py | jfdahl/Advent-of-Code-2019 | 3e5100e77eddc09f361c07a3c860a0fd97ecaa78 | [
"MIT"
] | null | null | null | day04/code2.py | jfdahl/Advent-of-Code-2019 | 3e5100e77eddc09f361c07a3c860a0fd97ecaa78 | [
"MIT"
] | null | null | null | day04/code2.py | jfdahl/Advent-of-Code-2019 | 3e5100e77eddc09f361c07a3c860a0fd97ecaa78 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import re
import numpy as np
start = 168630
stop = 718098
double = re.compile(r'(\d)\1')
triple = re.compile(r'(\d)\1\1')
v_is_decreasing = np.vectorize(is_decreasing)
v_has_doubles = np.vectorize(has_doubles)
v_remove_triples = np.vectorize(remove_triples)
data = np.arange(start, stop) ... | 27.348837 | 94 | 0.661565 |
35680159b6dd0a0218a24c732bdcc58c5848a6a2 | 4,170 | py | Python | layint_api/models/stats_history_inner.py | LayeredInsight/layint_api_python | a5c9a5b24098bd823c5102b7ab9e4745432f19b4 | [
"Apache-2.0"
] | null | null | null | layint_api/models/stats_history_inner.py | LayeredInsight/layint_api_python | a5c9a5b24098bd823c5102b7ab9e4745432f19b4 | [
"Apache-2.0"
] | null | null | null | layint_api/models/stats_history_inner.py | LayeredInsight/layint_api_python | a5c9a5b24098bd823c5102b7ab9e4745432f19b4 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Layered Insight Assessment, Compliance, Witness & Control
LI Assessment & Compliance performs static vulnerability analysis, license and package compliance. LI Witness provides deep insight and analytics into containerized applications. Control provides dynamic runtime security and analyti... | 27.8 | 383 | 0.586091 |
3568fe33f1a70bcbcc1a0632feb3804b638fd10e | 6,056 | py | Python | powerapi/database/influxdb2.py | jorgermurillo/powerapi | 0636a693db2a0f3491ffd45a623de98a563fbd4d | [
"BSD-3-Clause"
] | null | null | null | powerapi/database/influxdb2.py | jorgermurillo/powerapi | 0636a693db2a0f3491ffd45a623de98a563fbd4d | [
"BSD-3-Clause"
] | null | null | null | powerapi/database/influxdb2.py | jorgermurillo/powerapi | 0636a693db2a0f3491ffd45a623de98a563fbd4d | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2018, INRIA
# Copyright (c) 2018, University of Lille
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright notice, thi... | 37.153374 | 91 | 0.662483 |
356a02e72caa007b811a18656a6e2973c6b20aee | 3,700 | py | Python | client/verta/verta/_tracking/organization.py | coutureai/CoutureModelDB | a799c0e3d6239bf79ac1462a936742af03492607 | [
"Apache-2.0"
] | null | null | null | client/verta/verta/_tracking/organization.py | coutureai/CoutureModelDB | a799c0e3d6239bf79ac1462a936742af03492607 | [
"Apache-2.0"
] | null | null | null | client/verta/verta/_tracking/organization.py | coutureai/CoutureModelDB | a799c0e3d6239bf79ac1462a936742af03492607 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from .._protos.public.uac import Organization_pb2 as _Organization
from .._protos.public.common import CommonService_pb2 as _CommonCommonService
| 40.659341 | 114 | 0.647297 |
356afbbf16bb44c8c36e543c3986db0e42688ac8 | 25,770 | py | Python | experiment/core/utmLib/ml/BN.py | LeonDong1993/TractableDE-ContCNet | 30e050eeef802308f4124bf56a161bae7f2e11c4 | [
"MIT"
] | null | null | null | experiment/core/utmLib/ml/BN.py | LeonDong1993/TractableDE-ContCNet | 30e050eeef802308f4124bf56a161bae7f2e11c4 | [
"MIT"
] | null | null | null | experiment/core/utmLib/ml/BN.py | LeonDong1993/TractableDE-ContCNet | 30e050eeef802308f4124bf56a161bae7f2e11c4 | [
"MIT"
] | null | null | null | # coding: utf-8
import numpy as np
from copy import deepcopy
from functools import partial
from utmLib import utils
from utmLib.ml.graph import Node, Graph
from pdb import set_trace
def moralize(g):
# will lost weight information
assert(g.digraph)
ret = deepcopy(g)
ret.digraph = False
ret.remove_all_... | 26.677019 | 113 | 0.60326 |
356bb777f77682e18da9872000b9c4effea83dc3 | 20,411 | py | Python | examples/pybullet/examples/quadruped.py | felipeek/bullet3 | 6a59241074720e9df119f2f86bc01765917feb1e | [
"Zlib"
] | 9,136 | 2015-01-02T00:41:45.000Z | 2022-03-31T15:30:02.000Z | examples/pybullet/examples/quadruped.py | felipeek/bullet3 | 6a59241074720e9df119f2f86bc01765917feb1e | [
"Zlib"
] | 2,424 | 2015-01-05T08:55:58.000Z | 2022-03-30T19:34:55.000Z | examples/pybullet/examples/quadruped.py | felipeek/bullet3 | 6a59241074720e9df119f2f86bc01765917feb1e | [
"Zlib"
] | 2,921 | 2015-01-02T10:19:30.000Z | 2022-03-31T02:48:42.000Z | import pybullet as p
import time
import math
import pybullet_data
toeConstraint = True
useMaximalCoordinates = False
useRealTime = 0
#the fixedTimeStep and numSolverIterations are the most important parameters to trade-off quality versus performance
fixedTimeStep = 1. / 100
numSolverIterations = 50
if (useMaxima... | 43.42766 | 116 | 0.598109 |
356cc44803c63961c21e1852560af9b7a53ad16e | 7,163 | py | Python | tensormonk/architectures/gans_esrgan.py | Tensor46/TensorMONK | 67617d3fdf8fde072ba9cab42de7d67c79b17494 | [
"MIT"
] | 29 | 2018-07-06T23:57:23.000Z | 2022-03-08T20:38:57.000Z | tensormonk/architectures/gans_esrgan.py | sparupat/TensorMONK | 7a2699a28299a89b186e0eb17ed6e9feaea5429e | [
"MIT"
] | 3 | 2018-12-14T22:21:26.000Z | 2020-06-19T02:13:34.000Z | tensormonk/architectures/gans_esrgan.py | sparupat/TensorMONK | 7a2699a28299a89b186e0eb17ed6e9feaea5429e | [
"MIT"
] | 8 | 2018-07-06T23:58:03.000Z | 2021-04-12T01:35:54.000Z | """ TensorMONK's :: architectures :: ESRGAN """
__all__ = ["Generator", "Discriminator", "VGG19"]
import torch
import torch.nn as nn
import torchvision
from ..layers import Convolution
| 35.285714 | 79 | 0.580064 |
356d07de30049e8cf0f6aad0e41acef8b5f0d9cb | 1,291 | py | Python | ingenico/connect/sdk/domain/product/device_fingerprint_request.py | festicket/connect-sdk-python3 | c399c6443789dd978f319c89e1ebd387c812a77b | [
"MIT"
] | 12 | 2016-09-26T21:46:31.000Z | 2020-12-23T18:44:54.000Z | ingenico/connect/sdk/domain/product/device_fingerprint_request.py | festicket/connect-sdk-python3 | c399c6443789dd978f319c89e1ebd387c812a77b | [
"MIT"
] | 3 | 2020-05-02T16:53:02.000Z | 2020-06-02T12:49:51.000Z | ingenico/connect/sdk/domain/product/device_fingerprint_request.py | festicket/connect-sdk-python3 | c399c6443789dd978f319c89e1ebd387c812a77b | [
"MIT"
] | 11 | 2017-07-16T00:55:28.000Z | 2021-09-24T17:00:49.000Z | # -*- coding: utf-8 -*-
#
# This class was auto-generated from the API references found at
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
#
from ingenico.connect.sdk.data_object import DataObject
| 34.891892 | 245 | 0.7134 |
356fae5d80236a3dbf63128736f174a103162b77 | 3,418 | py | Python | tests/nnapi/specs/skip/V1_2/space_to_batch_v1_2.mod.py | periannath/ONE | 61e0bdf2bcd0bc146faef42b85d469440e162886 | [
"Apache-2.0"
] | 255 | 2020-05-22T07:45:29.000Z | 2022-03-29T23:58:22.000Z | tests/nnapi/specs/skip/V1_2/space_to_batch_v1_2.mod.py | periannath/ONE | 61e0bdf2bcd0bc146faef42b85d469440e162886 | [
"Apache-2.0"
] | 5,102 | 2020-05-22T07:48:33.000Z | 2022-03-31T23:43:39.000Z | test/cts/tool/CTSConverter/src/nn/specs/V1_2/space_to_batch_v1_2.mod.py | ibelem/webml-polyfill | aaf1ba4f5357eaf6e89bf9990f5bdfb543cd2bc2 | [
"Apache-2.0"
] | 120 | 2020-05-22T07:51:08.000Z | 2022-02-16T19:08:05.000Z | #
# Copyright (C) 2018 The Android Open Source Project
#
# 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 la... | 35.978947 | 74 | 0.614687 |
35702e98a69fbbc4d367cef348aeb837ce0c6f47 | 20,594 | py | Python | Scripts/8Bit_Characters_Binary.py | Ifelsethendo/Blender-Game-Engine-Templates | b4cd92ee7e1c4e9ac8d10b4d843392856285f6ba | [
"Apache-2.0"
] | 5 | 2021-12-11T02:27:43.000Z | 2022-01-08T08:51:21.000Z | Scripts/8Bit_Characters_Binary.py | Ifelsethendo/Blender-Game-Engine-Templates | b4cd92ee7e1c4e9ac8d10b4d843392856285f6ba | [
"Apache-2.0"
] | null | null | null | Scripts/8Bit_Characters_Binary.py | Ifelsethendo/Blender-Game-Engine-Templates | b4cd92ee7e1c4e9ac8d10b4d843392856285f6ba | [
"Apache-2.0"
] | 2 | 2021-12-29T05:48:58.000Z | 2022-03-05T15:31:33.000Z | import bpy
try:
import bge
except:
print("no bge module")
## This array of binary strings defines each of 256 characters
binary=["0011110000100000001000000111100000100000011000001010110000000000","0100010001001000010100000010110001000100000010000001110000000000","01000100010010000101000000101100010101000... | 185.531532 | 17,160 | 0.891036 |
3570648818248f506b4acc069aadab42f128c69d | 2,732 | py | Python | examples/steps/test_calc.py | bigbirdcode/pt_gh | 2c1775c6141eee4594f27028d0c87cc783ee08af | [
"MIT"
] | null | null | null | examples/steps/test_calc.py | bigbirdcode/pt_gh | 2c1775c6141eee4594f27028d0c87cc783ee08af | [
"MIT"
] | null | null | null | examples/steps/test_calc.py | bigbirdcode/pt_gh | 2c1775c6141eee4594f27028d0c87cc783ee08af | [
"MIT"
] | null | null | null | """Example for Pytest-Gherkin"""
import ast
from pytest import approx
from pt_gh import step, value_options
operator = value_options("add", "subtract")
| 30.355556 | 69 | 0.673499 |
35708b1a267084c409e146c96cce29f59f8a1bdd | 8,901 | py | Python | runtime/opt/taupage/init.d/02-register-td-agent.py | a1exsh/taupage | aa3f31ec84d28db0f63b0300b5aabeb081bfcb35 | [
"Apache-2.0"
] | 49 | 2015-04-14T13:55:10.000Z | 2020-02-14T22:55:43.000Z | runtime/opt/taupage/init.d/02-register-td-agent.py | a1exsh/taupage | aa3f31ec84d28db0f63b0300b5aabeb081bfcb35 | [
"Apache-2.0"
] | 538 | 2015-04-01T10:53:09.000Z | 2020-04-17T08:43:36.000Z | runtime/opt/taupage/init.d/02-register-td-agent.py | a1exsh/taupage | aa3f31ec84d28db0f63b0300b5aabeb081bfcb35 | [
"Apache-2.0"
] | 67 | 2015-05-05T19:48:30.000Z | 2020-11-04T04:59:00.000Z | #!/usr/bin/env python3
import logging
import subprocess
import re
import boto.utils
from jinja2 import Environment, FileSystemLoader
from taupage import get_config
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
TPL_NAME = 'td-agent.conf.jinja2'
TD_AGENT_TEMPLATE_PATH = '/etc/td-agent/t... | 47.854839 | 117 | 0.700371 |
3573a03f2f0531d7422c7f22c5b3d8a3458c39f0 | 9,323 | py | Python | yagocd/resources/property.py | 1and1/yagocd | 4c75336ae6f107c8723d37b15e52169151822127 | [
"ISC"
] | null | null | null | yagocd/resources/property.py | 1and1/yagocd | 4c75336ae6f107c8723d37b15e52169151822127 | [
"ISC"
] | null | null | null | yagocd/resources/property.py | 1and1/yagocd | 4c75336ae6f107c8723d37b15e52169151822127 | [
"ISC"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# The MIT License
#
# Copyright (c) 2016 Grigory Chernyshev
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation file... | 34.150183 | 118 | 0.627909 |
3575d5d1e8e3f443d0861039be6502d8ce1a15c4 | 1,313 | py | Python | bb2cogs/tasks.py | Team-EG/j-bot | 2e160707d13cc4988f370713fc9f57c7cff3f5bb | [
"MIT"
] | 2 | 2020-07-07T01:15:15.000Z | 2021-08-15T19:49:32.000Z | bb2cogs/tasks.py | Team-EG/j-bot | 2e160707d13cc4988f370713fc9f57c7cff3f5bb | [
"MIT"
] | null | null | null | bb2cogs/tasks.py | Team-EG/j-bot | 2e160707d13cc4988f370713fc9f57c7cff3f5bb | [
"MIT"
] | 1 | 2020-04-08T04:23:10.000Z | 2020-04-08T04:23:10.000Z | import discord
import asyncio
import json
import asyncpg
from discord.ext import commands
from discord.ext import tasks
| 33.666667 | 151 | 0.672506 |
3575f69fbe1be7943d3fbe746ae637c360e21a03 | 1,103 | py | Python | controllers/api_error.py | elandcloud/python-api | fcdc0abe3e3273d5ec0aac6b9bdefbf00ca0f58b | [
"Apache-2.0"
] | null | null | null | controllers/api_error.py | elandcloud/python-api | fcdc0abe3e3273d5ec0aac6b9bdefbf00ca0f58b | [
"Apache-2.0"
] | 1 | 2021-03-31T19:27:16.000Z | 2021-03-31T19:27:16.000Z | controllers/api_error.py | elandcloud/python-api | fcdc0abe3e3273d5ec0aac6b9bdefbf00ca0f58b | [
"Apache-2.0"
] | 1 | 2020-01-02T02:33:39.000Z | 2020-01-02T02:33:39.000Z | from controllers.type_result import Error
# print(statusError(111).code) | 26.902439 | 72 | 0.728921 |
3576496a708959dfe8356700f2ca28d993c28dc4 | 3,357 | py | Python | Optimization/optimize.py | cty123/TriNet | 9c43ae4bd3bae7308289ba1e1980f693d692585b | [
"MIT"
] | 10 | 2020-02-12T20:54:10.000Z | 2022-03-17T03:18:54.000Z | Optimization/optimize.py | cty123/TriNet | 9c43ae4bd3bae7308289ba1e1980f693d692585b | [
"MIT"
] | 2 | 2020-04-24T22:18:41.000Z | 2021-12-27T05:22:09.000Z | Optimization/optimize.py | chuzcjoe/TriNet | d2689de7362f1845b5c399f1f9f66f42eb4df23f | [
"MIT"
] | 2 | 2020-02-12T20:54:37.000Z | 2020-03-26T05:17:33.000Z | import numpy as np
import math
from scipy.optimize import minimize
| 31.083333 | 132 | 0.494191 |
3578741287ad3fdaadbb1724717ecc78eefadf0d | 9,133 | py | Python | freyr/utils/agents.py | gutogirardon/freyer-stocks-api | 38dd69066e41cabfb2977a151ebf063003252fb0 | [
"MIT"
] | 3 | 2021-04-08T03:08:52.000Z | 2021-07-08T01:09:21.000Z | freyr/utils/agents.py | webclinic017/freyr-stocks-api | 38dd69066e41cabfb2977a151ebf063003252fb0 | [
"MIT"
] | null | null | null | freyr/utils/agents.py | webclinic017/freyr-stocks-api | 38dd69066e41cabfb2977a151ebf063003252fb0 | [
"MIT"
] | 2 | 2021-09-24T13:35:32.000Z | 2021-09-26T18:44:52.000Z | """
Freyr - A Free stock API
"""
import random
import requests.utils
header = [
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:83.0) Gecko/20100101 Firefox/83.0",
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:82.0) Gecko/20100101 Firefox/82.0",
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:83.0)... | 96.136842 | 140 | 0.698894 |
3578b0766410e85213ce6ed8b351520882df04bf | 8,581 | py | Python | mixcoatl/resource_utils.py | zomGreg/mixcoatl | dd8d7e206682955b251d7f858fffee56b11df8c6 | [
"Apache-2.0"
] | null | null | null | mixcoatl/resource_utils.py | zomGreg/mixcoatl | dd8d7e206682955b251d7f858fffee56b11df8c6 | [
"Apache-2.0"
] | null | null | null | mixcoatl/resource_utils.py | zomGreg/mixcoatl | dd8d7e206682955b251d7f858fffee56b11df8c6 | [
"Apache-2.0"
] | null | null | null | from mixcoatl.admin.billing_code import BillingCode
from mixcoatl.geography.region import Region
from mixcoatl.admin.group import Group
from mixcoatl.admin.user import User
def get_servers(servers, **kwargs):
""" Returns a list of servers
Arguments:
:param servers: a list of servers that needs to be filt... | 35.754167 | 110 | 0.646778 |
3579494bf1e826f12f91e8fb3c0875d2c71c341e | 8,443 | py | Python | PWGJE/EMCALJetTasks/Tracks/analysis/old/ComparePeriodsTriggerToMB.py | maroozm/AliPhysics | 22ec256928cfdf8f800e05bfc1a6e124d90b6eaf | [
"BSD-3-Clause"
] | 114 | 2017-03-03T09:12:23.000Z | 2022-03-03T20:29:42.000Z | PWGJE/EMCALJetTasks/Tracks/analysis/old/ComparePeriodsTriggerToMB.py | maroozm/AliPhysics | 22ec256928cfdf8f800e05bfc1a6e124d90b6eaf | [
"BSD-3-Clause"
] | 19,637 | 2017-01-16T12:34:41.000Z | 2022-03-31T22:02:40.000Z | PWGJE/EMCALJetTasks/Tracks/analysis/old/ComparePeriodsTriggerToMB.py | maroozm/AliPhysics | 22ec256928cfdf8f800e05bfc1a6e124d90b6eaf | [
"BSD-3-Clause"
] | 1,021 | 2016-07-14T22:41:16.000Z | 2022-03-31T05:15:51.000Z | #! /usr/bin/env python
from ROOT import TCanvas, TGraphErrors, TLegend, TPaveText
from ROOT import kBlack, kBlue, kRed
from Helper import Frame, ReadHistList
from Graphics import Style
from SpectrumContainer import DataContainer
from copy import deepcopy
def ReadSpectra(filename, trigger):
"""
Read th... | 36.549784 | 192 | 0.627384 |
357951c0b40f80c53a3a5f44fa52511a12076619 | 6,426 | py | Python | python/utility_functions.py | stellarpower/vio_common | 5508203cbcc166cbcd34dc0a6f7852c73e2cff55 | [
"BSD-3-Clause"
] | 16 | 2017-06-02T07:22:31.000Z | 2022-03-23T02:39:39.000Z | python/utility_functions.py | stellarpower/vio_common | 5508203cbcc166cbcd34dc0a6f7852c73e2cff55 | [
"BSD-3-Clause"
] | 2 | 2020-08-10T04:01:35.000Z | 2021-01-18T08:21:17.000Z | python/utility_functions.py | stellarpower/vio_common | 5508203cbcc166cbcd34dc0a6f7852c73e2cff55 | [
"BSD-3-Clause"
] | 19 | 2017-08-03T02:23:11.000Z | 2021-09-22T02:17:46.000Z | import json
import os
import numpy as np
from numpy import genfromtxt
SECOND_TO_MILLIS = 1000
SECOND_TO_MICROS = 1000000
SECOND_TO_NANOS = 1000000000
TIME_UNIT_TO_DECIMALS = {'s': 0, "ms": 3, "us": 6, "ns": 9}
def parse_time(timestamp_str, time_unit):
"""
convert a timestamp string to a rospy time
if a ... | 31.194175 | 77 | 0.571429 |
357a7c212d64ef469b6cfe0399c8c3f62da9f7bf | 7,160 | py | Python | app/models.py | nickspeal/net-zero-python-backend | a31139fe8d365abed4f48407a2f407a9b5ac7357 | [
"MIT"
] | null | null | null | app/models.py | nickspeal/net-zero-python-backend | a31139fe8d365abed4f48407a2f407a9b5ac7357 | [
"MIT"
] | null | null | null | app/models.py | nickspeal/net-zero-python-backend | a31139fe8d365abed4f48407a2f407a9b5ac7357 | [
"MIT"
] | null | null | null | from app import db
# Junction Tables for many-to-many relationships
campaign_users = db.Table('campaign_users',
db.Column('campaign', db.Integer, db.ForeignKey('campaigns.id'), primary_key=True),
db.Column('user', db.Integer, db.ForeignKey('users.username'), primary_key=True),
)
campaign_vehicles = db.Table('... | 41.149425 | 161 | 0.691899 |
357adb90337719d5723ab2cf058c01616c052b6e | 806 | py | Python | course/views.py | author31/HongsBlog | a94dc56a05062b5b2bab3f28f84b7ede1ae44bf8 | [
"MIT"
] | null | null | null | course/views.py | author31/HongsBlog | a94dc56a05062b5b2bab3f28f84b7ede1ae44bf8 | [
"MIT"
] | null | null | null | course/views.py | author31/HongsBlog | a94dc56a05062b5b2bab3f28f84b7ede1ae44bf8 | [
"MIT"
] | null | null | null | from typing import List
from django.shortcuts import render
from django.views.generic.detail import DetailView
from django.views.generic.list import ListView
from assignment.models import Assignment
from course.models import Course
| 29.851852 | 76 | 0.729529 |
357beddbd194c981ff7bfbba130b3a5fe87ac6d4 | 157 | py | Python | aldryn_search/apps.py | lab360-ch/aldryn-search | 15a319edac126aa1e44f22d34a7bcb5aec3e3dde | [
"BSD-3-Clause"
] | 11 | 2019-03-29T10:32:13.000Z | 2021-02-26T11:44:44.000Z | aldryn_search/apps.py | lab360-ch/aldryn-search | 15a319edac126aa1e44f22d34a7bcb5aec3e3dde | [
"BSD-3-Clause"
] | 23 | 2019-01-31T16:20:57.000Z | 2021-11-10T19:57:58.000Z | aldryn_search/apps.py | lab360-ch/aldryn-search | 15a319edac126aa1e44f22d34a7bcb5aec3e3dde | [
"BSD-3-Clause"
] | 23 | 2019-02-14T09:59:40.000Z | 2022-03-10T12:38:48.000Z | from django.apps import AppConfig
| 17.444444 | 36 | 0.687898 |
357c2647b8417e551b803cdb6ce940f55d5d1f67 | 606 | py | Python | tests/utils.py | openlobby/openlobby-server | b7a1a2b73e903c4da57970926844b0639dce5aae | [
"MIT"
] | 7 | 2017-11-23T15:24:50.000Z | 2018-11-29T21:47:55.000Z | tests/utils.py | openlobby/openlobby-server | b7a1a2b73e903c4da57970926844b0639dce5aae | [
"MIT"
] | 20 | 2018-02-21T22:25:42.000Z | 2020-06-05T17:22:36.000Z | tests/utils.py | openlobby/openlobby-server | b7a1a2b73e903c4da57970926844b0639dce5aae | [
"MIT"
] | 3 | 2018-03-08T10:05:01.000Z | 2018-08-16T14:36:28.000Z | from datetime import datetime
| 25.25 | 67 | 0.589109 |
357cffec267dd0668f1c68a283ee49efc4b0ead9 | 3,077 | py | Python | datastructures/binarytree.py | tkaleas/python-sandbox | 37ebe92c5f89300e27803118259d16f62d67f612 | [
"MIT"
] | null | null | null | datastructures/binarytree.py | tkaleas/python-sandbox | 37ebe92c5f89300e27803118259d16f62d67f612 | [
"MIT"
] | null | null | null | datastructures/binarytree.py | tkaleas/python-sandbox | 37ebe92c5f89300e27803118259d16f62d67f612 | [
"MIT"
] | null | null | null |
#Binary Tree
# Binary Search Tree
| 32.734043 | 118 | 0.577836 |
357d8ee4029bbe48236c823d9888079f0ce3ef3f | 4,203 | py | Python | cs15211/StoneGame.py | JulyKikuAkita/PythonPrac | 0ba027d9b8bc7c80bc89ce2da3543ce7a49a403c | [
"Apache-2.0"
] | 1 | 2021-07-05T01:53:30.000Z | 2021-07-05T01:53:30.000Z | cs15211/StoneGame.py | JulyKikuAkita/PythonPrac | 0ba027d9b8bc7c80bc89ce2da3543ce7a49a403c | [
"Apache-2.0"
] | null | null | null | cs15211/StoneGame.py | JulyKikuAkita/PythonPrac | 0ba027d9b8bc7c80bc89ce2da3543ce7a49a403c | [
"Apache-2.0"
] | 1 | 2018-01-08T07:14:08.000Z | 2018-01-08T07:14:08.000Z | __source__ = 'https://leetcode.com/problems/stone-game/'
# Time: O()
# Space: O()
#
# Description: Leetcode # 877. Stone Game
#
# Alex and Lee play a game with piles of stones.
# There are an even number of piles arranged in a row,
# and each pile has a positive integer number of stones piles[i].
#
# The objective of ... | 28.02 | 103 | 0.524863 |
3580446fc9f2895b65f629897e85da7d65bcfe94 | 149 | py | Python | project_pawz/sponsorships/apps.py | rlaneyjr/project_pawz | 27f316ef35968ed1319ec0585a050ebed795763a | [
"MIT"
] | null | null | null | project_pawz/sponsorships/apps.py | rlaneyjr/project_pawz | 27f316ef35968ed1319ec0585a050ebed795763a | [
"MIT"
] | 13 | 2020-02-12T00:12:52.000Z | 2022-02-12T09:42:36.000Z | project_pawz/sponsorships/apps.py | rlaneyjr/project_pawz | 27f316ef35968ed1319ec0585a050ebed795763a | [
"MIT"
] | null | null | null | from django.apps import AppConfig
| 21.285714 | 39 | 0.778523 |
3580b7cb753fcaa31d0c440e5b6586620bfd111a | 745 | py | Python | assignment_solutions/6/is_all_upper.py | dannymeijer/level-up-with-python | 1bd1169aafd0fdc124984c30edc7f0153626cf06 | [
"MIT"
] | null | null | null | assignment_solutions/6/is_all_upper.py | dannymeijer/level-up-with-python | 1bd1169aafd0fdc124984c30edc7f0153626cf06 | [
"MIT"
] | null | null | null | assignment_solutions/6/is_all_upper.py | dannymeijer/level-up-with-python | 1bd1169aafd0fdc124984c30edc7f0153626cf06 | [
"MIT"
] | null | null | null | import re
only_letters = re.compile("[a-zA-Z]")
if __name__ == '__main__':
print("Example:")
print(is_all_upper('ALL UPPER'))
# These "asserts" are used for self-checking and not for an auto-testing
assert is_all_upper('ALL UPPER') is True
assert is_all_upper('all lower') is False
assert is... | 29.8 | 76 | 0.689933 |
3581a840c4be8b7ea8177fe99a8cfde9dc61f37d | 1,661 | py | Python | osm/GeoFabrikSpider.py | TheGreatRefrigerator/openpoiservice | e345062c4eb887e661597f47cf167b793a586d49 | [
"Apache-2.0"
] | null | null | null | osm/GeoFabrikSpider.py | TheGreatRefrigerator/openpoiservice | e345062c4eb887e661597f47cf167b793a586d49 | [
"Apache-2.0"
] | null | null | null | osm/GeoFabrikSpider.py | TheGreatRefrigerator/openpoiservice | e345062c4eb887e661597f47cf167b793a586d49 | [
"Apache-2.0"
] | null | null | null | # sudo scrapy runspider GeoFabrikSpider.py
import scrapy
import os
import urlparse
from scrapy.selector import Selector
import subprocess
from time import sleep
| 30.759259 | 85 | 0.580373 |
35822f26b3ef7809b8f1f7729babe9f761bebf6a | 3,252 | py | Python | tests/basic.py | mkindahl/mysql-replicant-python | e627d29feae623f3f406ea472ca8cfae97abaa97 | [
"Apache-2.0"
] | null | null | null | tests/basic.py | mkindahl/mysql-replicant-python | e627d29feae623f3f406ea472ca8cfae97abaa97 | [
"Apache-2.0"
] | null | null | null | tests/basic.py | mkindahl/mysql-replicant-python | e627d29feae623f3f406ea472ca8cfae97abaa97 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2010, Mats Kindahl, Charles Bell, and Lars Thalmann
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# ... | 41.164557 | 71 | 0.671279 |
358309e43cd19cc91ae52a7e9d812eb22388abf7 | 2,348 | py | Python | routa/test_levenshtein.py | piglaker/SpecialEdition | 172688ef111e1b5c62bdb1ba0a523a2654201b90 | [
"Apache-2.0"
] | 2 | 2022-01-06T07:41:50.000Z | 2022-01-22T14:18:51.000Z | routa/test_levenshtein.py | piglaker/SpecialEdition | 172688ef111e1b5c62bdb1ba0a523a2654201b90 | [
"Apache-2.0"
] | null | null | null | routa/test_levenshtein.py | piglaker/SpecialEdition | 172688ef111e1b5c62bdb1ba0a523a2654201b90 | [
"Apache-2.0"
] | null | null | null |
def iterative_levenshtein(string, target, costs=(1, 1, 1)):
"""
piglaker modified version :
return edits
iterative_levenshtein(s, t) -> ldist
ldist is the Levenshtein distance between the strings
s and t.
For all i and j, dist[i,j] will contain the Levenshtein... | 35.044776 | 96 | 0.534072 |
3583587e857ba2e03f4dbec666f2d6bee6d2dba7 | 168 | py | Python | loggo2/__init__.py | bitpanda-labs/loggo2 | 0e0d157b12a34a737ddfc0c9083241a6db03b78a | [
"MIT"
] | 6 | 2018-05-15T13:30:02.000Z | 2022-03-08T16:08:05.000Z | loggo2/__init__.py | bitpanda-labs/loggo2 | 0e0d157b12a34a737ddfc0c9083241a6db03b78a | [
"MIT"
] | 102 | 2018-06-15T11:08:11.000Z | 2022-01-21T11:12:11.000Z | loggo2/__init__.py | bitpanda-labs/loggo | 0e0d157b12a34a737ddfc0c9083241a6db03b78a | [
"MIT"
] | 10 | 2018-05-15T11:01:14.000Z | 2022-02-06T20:58:56.000Z | from ._loggo2 import JsonLogFormatter, LocalLogFormatter, Loggo # noqa: F401
__version__ = "10.1.2" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT
| 42 | 88 | 0.767857 |
3584dd069c4afaf6ad2ec3546a7187fbdbbed6aa | 1,762 | py | Python | aoc/day11/__init__.py | scorphus/advent-of-code-2020 | 12270ccc86475a18e587007da0fbfc6c9ef3a6a8 | [
"BSD-3-Clause"
] | 9 | 2020-12-04T17:40:49.000Z | 2022-01-08T03:14:21.000Z | aoc/day11/__init__.py | scorphus/advent-of-code-2020 | 12270ccc86475a18e587007da0fbfc6c9ef3a6a8 | [
"BSD-3-Clause"
] | 1 | 2021-02-12T20:49:33.000Z | 2021-02-12T20:49:33.000Z | aoc/day11/__init__.py | scorphus/advent-of-code-2020 | 12270ccc86475a18e587007da0fbfc6c9ef3a6a8 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of Advent of Code 2020
# https://github.com/scorphus/advent-of-code-2020
# Licensed under the BSD-3-Clause license:
# https://opensource.org/licenses/BSD-3-Clause
# Copyright (c) 2020, Pablo S. Blum de Aguiar <scorphus@gmail.com>
from aoc import strip... | 25.911765 | 87 | 0.498297 |
35869169565f147aa6ca2effa9a220febbbdf872 | 3,349 | py | Python | analyses/ParamAnalyzer.py | ThinkNaive/Matrix-Vector-Multiplication | 9a00ba9e4d0d298ce4ff3bfae092f49571a56605 | [
"MIT"
] | null | null | null | analyses/ParamAnalyzer.py | ThinkNaive/Matrix-Vector-Multiplication | 9a00ba9e4d0d298ce4ff3bfae092f49571a56605 | [
"MIT"
] | null | null | null | analyses/ParamAnalyzer.py | ThinkNaive/Matrix-Vector-Multiplication | 9a00ba9e4d0d298ce4ff3bfae092f49571a56605 | [
"MIT"
] | null | null | null | # coding=utf-8
import matplotlib.pyplot as plt
import numpy as np
if __name__ == '__main__':
rows = [10000]
col = 10000
iteration = 10
params = [
{'id': '01', 'strategy': 'rep', 'p': 10, 'repNum': 1},
{'id': '02', 'strategy': 'rep', 'p': 10, 'repNum': 2},
{'id': '03', 'strategy'... | 48.536232 | 119 | 0.521947 |
358826b9087dfd29b78b2c2b77da9c4af1e5706c | 2,077 | py | Python | MsgRoute/myBackend.py | zhouli1014/OurGame | 5c1aa81c928c23b3ac3ca8a447dd1da44d4de44a | [
"MIT"
] | 3 | 2018-08-11T14:47:11.000Z | 2018-12-06T09:21:01.000Z | MsgRoute/myBackend.py | zhouli1014/OurGame | 5c1aa81c928c23b3ac3ca8a447dd1da44d4de44a | [
"MIT"
] | null | null | null | MsgRoute/myBackend.py | zhouli1014/OurGame | 5c1aa81c928c23b3ac3ca8a447dd1da44d4de44a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys, time
from backend import daemon
import itchat
import time
from ipcqueue import posixmq
import logging
import datetime as dt
import threading
import time
logFileDir = "/opt/crontab/IpcToItchat/"
nowDateTime = dt.datetime.now().strftime('%Y%m%d%H%M%S')
pyFilename = sys.argv[0].split('/... | 34.616667 | 96 | 0.569571 |
35884559fa63fe01a4c1157a7757aab150c568df | 3,979 | py | Python | mlbgame/data/people.py | trevor-viljoen/mlbgame3 | 73e79aebad751b36773f01c93f09a422f69ef9cc | [
"MIT"
] | 6 | 2018-03-23T02:51:10.000Z | 2021-06-15T21:26:51.000Z | mlbgame/data/people.py | trevor-viljoen/mlbgame3 | 73e79aebad751b36773f01c93f09a422f69ef9cc | [
"MIT"
] | null | null | null | mlbgame/data/people.py | trevor-viljoen/mlbgame3 | 73e79aebad751b36773f01c93f09a422f69ef9cc | [
"MIT"
] | 1 | 2019-02-23T07:11:51.000Z | 2019-02-23T07:11:51.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""mlbgame functions for the people API endpoints.
This module's functions gets the JSON payloads for the mlb.com games API
endpoints.
.. _Google Python Style Guide:
http://google.github.io/styleguide/pyguide.html
"""
from mlbgame.data import request
def get_person... | 32.349593 | 79 | 0.642372 |
35889badcfa8dc6a845da5eecd5c85fc2bdcc83d | 25,571 | py | Python | src/swadr.py | ericpruitt/swadr | 17ce19032ce9cd0ac2b640c5a54093ef9ff0effc | [
"BSD-2-Clause"
] | 2 | 2015-01-14T13:43:52.000Z | 2015-03-30T08:36:24.000Z | src/swadr.py | ericpruitt/swadr | 17ce19032ce9cd0ac2b640c5a54093ef9ff0effc | [
"BSD-2-Clause"
] | null | null | null | src/swadr.py | ericpruitt/swadr | 17ce19032ce9cd0ac2b640c5a54093ef9ff0effc | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import csv
import getopt
import io
import itertools
import logging
import numbers
import os
import re
import sqlite3
import string
import sys
import textwrap
import time
try:
import readline
except ImportError:
pass
try:
... | 36.322443 | 80 | 0.538383 |
3589c234fc1a0fe7e6d360402ae2ceaf2a97c3d8 | 726 | py | Python | django_analyses/filters/output/output_definition.py | TheLabbingProject/django_analyses | 08cac40a32754a265b37524f08ec6160c69ebea8 | [
"Apache-2.0"
] | 1 | 2020-12-30T12:43:34.000Z | 2020-12-30T12:43:34.000Z | django_analyses/filters/output/output_definition.py | TheLabbingProject/django_analyses | 08cac40a32754a265b37524f08ec6160c69ebea8 | [
"Apache-2.0"
] | 59 | 2019-12-25T13:14:56.000Z | 2021-07-22T12:24:46.000Z | django_analyses/filters/output/output_definition.py | TheLabbingProject/django_analyses | 08cac40a32754a265b37524f08ec6160c69ebea8 | [
"Apache-2.0"
] | 2 | 2020-05-24T06:44:27.000Z | 2020-07-09T15:47:31.000Z | """
Definition of an
:class:`~django_analyses.filters.output.output_definition.OutputDefinitionFilter`
for the :class:`~django_analyses.models.output.definitions.OutputDefinition`
model.
"""
from django_analyses.models.output.definitions.output_definition import \
OutputDefinition
from django_filters import rest_f... | 27.923077 | 90 | 0.774105 |
358a40fd5689697a1d8d1a2da43fe16bdb4a6fd3 | 87 | py | Python | mypage/apps.py | shotastage/neco-sys | 60816ceee3eaf36d8d278db72e741d45c3f4af41 | [
"MIT"
] | 2 | 2021-08-15T02:17:43.000Z | 2022-01-31T14:46:20.000Z | rainy_project/mypage/apps.py | habijung/WEB_HeavyReading_Rainy | 58b7429e88931175ddceab2c280161a267149a15 | [
"MIT"
] | 10 | 2020-02-12T00:37:45.000Z | 2022-03-03T21:58:40.000Z | rainy_project/mypage/apps.py | habijung/WEB_HeavyReading_Rainy | 58b7429e88931175ddceab2c280161a267149a15 | [
"MIT"
] | 2 | 2020-11-17T09:37:24.000Z | 2021-10-04T05:59:02.000Z | from django.apps import AppConfig
| 14.5 | 33 | 0.747126 |
358b78e3032d08e2e8e1264f9dd0d6ae5c3241bb | 3,225 | py | Python | additional.py | NatName/BD_2 | 67392c77af02e3e41075c3e79eeea0eb1991ffa1 | [
"MIT"
] | null | null | null | additional.py | NatName/BD_2 | 67392c77af02e3e41075c3e79eeea0eb1991ffa1 | [
"MIT"
] | null | null | null | additional.py | NatName/BD_2 | 67392c77af02e3e41075c3e79eeea0eb1991ffa1 | [
"MIT"
] | null | null | null | import psycopg2
| 39.329268 | 202 | 0.548837 |
358e7dc25cf28a3ce33d67b2d2dc79f0f2e5bd52 | 12,008 | py | Python | hanoi_window.py | SirIsaacNeutron/tower_of_hanoi | 18f7200b9b90b3117137c611fc31878405a17017 | [
"MIT"
] | null | null | null | hanoi_window.py | SirIsaacNeutron/tower_of_hanoi | 18f7200b9b90b3117137c611fc31878405a17017 | [
"MIT"
] | null | null | null | hanoi_window.py | SirIsaacNeutron/tower_of_hanoi | 18f7200b9b90b3117137c611fc31878405a17017 | [
"MIT"
] | null | null | null | """
Created on Mar 12, 2018
@author: SirIsaacNeutron
"""
import tkinter
import tkinter.messagebox
import hanoi
DEFAULT_FONT = ('Helvetica', 14)
if __name__ == '__main__':
HanoiWindow().run()
| 43.194245 | 110 | 0.553131 |
358ee60cb29f177fb65f6050d60d87a71d7179ec | 4,801 | py | Python | parser.py | PouletFreak/mailparser | 6877b879cbaaccb5e00491726ead740a42922ae3 | [
"MIT"
] | 1 | 2019-07-02T02:05:07.000Z | 2019-07-02T02:05:07.000Z | parser.py | PouletFreak/mailparser | 6877b879cbaaccb5e00491726ead740a42922ae3 | [
"MIT"
] | null | null | null | parser.py | PouletFreak/mailparser | 6877b879cbaaccb5e00491726ead740a42922ae3 | [
"MIT"
] | null | null | null | import email, json, os, re
import magic
import ssdeep
import hashlib
import datetime
if __name__ == '__main__':
main() | 32.006667 | 112 | 0.587378 |
358f891b1298dda3ec2ff6f47a9bf5842305d9ac | 5,937 | py | Python | analysis_vis/scripts/CovarEpi.py | arubenstein/deep_seq | 96c2bc131dc3bd3afb05486bfbc6f7297c57e604 | [
"BSD-2-Clause"
] | null | null | null | analysis_vis/scripts/CovarEpi.py | arubenstein/deep_seq | 96c2bc131dc3bd3afb05486bfbc6f7297c57e604 | [
"BSD-2-Clause"
] | null | null | null | analysis_vis/scripts/CovarEpi.py | arubenstein/deep_seq | 96c2bc131dc3bd3afb05486bfbc6f7297c57e604 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
"""Create edges and nodes from a list of sequences that are a given hamming distance apart"""
import itertools
import sys
import operator
import numpy as np
import argparse
from general_seq import conv
from general_seq import seq_IO
from plot import conv as pconv
import matplotlib.pyplot as plt
i... | 36.648148 | 243 | 0.640391 |
359068a8c7d26ee7c6e843121d47283532279c4e | 1,664 | py | Python | Modules/DirectoryIndex.py | spanoselias/LazyReplicationTool | 8fdc968e4fdf82992b704e1c7422f3a5591798eb | [
"MIT"
] | null | null | null | Modules/DirectoryIndex.py | spanoselias/LazyReplicationTool | 8fdc968e4fdf82992b704e1c7422f3a5591798eb | [
"MIT"
] | null | null | null | Modules/DirectoryIndex.py | spanoselias/LazyReplicationTool | 8fdc968e4fdf82992b704e1c7422f3a5591798eb | [
"MIT"
] | null | null | null | import os
import pickle
from Utils import DirectoryUtils, IOUtils, LoggingUtils
# Write to the disk the structure such that will be
# persistent.
from Utils.FilesUtils import readConfigFile
# Load a persistent data structure into memory.
shouldRead = True
if shouldRead:
conf = readConfigFile()
readPath ... | 28.689655 | 105 | 0.713942 |
35919643af15226e39bb83cf34dbdca479b35d9b | 5,046 | py | Python | perslay/utils.py | YuryUoL/perslay | b7f61ae60eaca110ef125d1c90685318ff934ae2 | [
"MIT"
] | null | null | null | perslay/utils.py | YuryUoL/perslay | b7f61ae60eaca110ef125d1c90685318ff934ae2 | [
"MIT"
] | null | null | null | perslay/utils.py | YuryUoL/perslay | b7f61ae60eaca110ef125d1c90685318ff934ae2 | [
"MIT"
] | null | null | null | """Module :mod:`perslay.utils` provide utils functions."""
# Authors: Mathieu Carriere <mathieu.carriere3@gmail.com>
# Theo Lacombe <theo.lacombe@inria.fr>
# Martin Royer <martin.royer@inria.fr>
# License: MIT
from __future__ import absolute_import
from __future__ import division
from __future__ impo... | 41.02439 | 109 | 0.589378 |
3591df80ea06a09fcf32bb3e38ed7f6312abf19d | 389 | py | Python | fabric/exceptions.py | lin-zh-cn/fabric | fd60d7e3d31eeddc2b90cfe367a573aff9f0540d | [
"BSD-2-Clause"
] | 1 | 2016-05-17T19:04:42.000Z | 2016-05-17T19:04:42.000Z | fabric/exceptions.py | offbyone/fabric | 4b1cd1f1326deee75d8699161e12d2da0cb09a1d | [
"BSD-2-Clause"
] | null | null | null | fabric/exceptions.py | offbyone/fabric | 4b1cd1f1326deee75d8699161e12d2da0cb09a1d | [
"BSD-2-Clause"
] | null | null | null | # TODO: this may want to move to Invoke if we can find a use for it there too?
# Or make it _more_ narrowly focused and stay here?
| 24.3125 | 78 | 0.686375 |
3591f068c0bebd3f9604752d46dc6a1ba19f8459 | 20,183 | py | Python | baselines/utils/agent_can_choose_helper.py | ClemenceLanfranchi/Flatland_project | 9ce4c80bb25f6cdca28cfd607ac733cb16688cc1 | [
"MIT"
] | null | null | null | baselines/utils/agent_can_choose_helper.py | ClemenceLanfranchi/Flatland_project | 9ce4c80bb25f6cdca28cfd607ac733cb16688cc1 | [
"MIT"
] | null | null | null | baselines/utils/agent_can_choose_helper.py | ClemenceLanfranchi/Flatland_project | 9ce4c80bb25f6cdca28cfd607ac733cb16688cc1 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
from flatland.core.grid.grid4_utils import get_new_position
from flatland.envs.agent_utils import TrainState
from flatland.utils.rendertools import RenderTool, AgentRenderVariant
from utils.fast_methods import fast_count_nonzero, fast_argmax
| 45.152125 | 122 | 0.60769 |
359377901334427aec4295ca0684ad7dffa3d7ff | 182 | py | Python | server/app/api/weather/resources.py | WagnerJM/home_pod | f6a51e4956d5956a85084f637e267406f21df6df | [
"MIT"
] | null | null | null | server/app/api/weather/resources.py | WagnerJM/home_pod | f6a51e4956d5956a85084f637e267406f21df6df | [
"MIT"
] | null | null | null | server/app/api/weather/resources.py | WagnerJM/home_pod | f6a51e4956d5956a85084f637e267406f21df6df | [
"MIT"
] | null | null | null | from flask import request
from flask_restful import Resource
from flask_jwt_extended import get_jwt_claims, get_jwt_identity, jwt_required
from app.cache import redis_client
| 26 | 78 | 0.840659 |
35939e520372bd241032dd0ca8f839c03e847bef | 1,792 | py | Python | demo/buf.py | uldisa/tuxedo-python | 59bd44ee9be1807b63599b48b3af9b4dc4ac4277 | [
"MIT"
] | 4 | 2019-11-05T17:44:29.000Z | 2022-03-21T08:51:14.000Z | demo/buf.py | uldisa/tuxedo-python | 59bd44ee9be1807b63599b48b3af9b4dc4ac4277 | [
"MIT"
] | 3 | 2020-12-15T19:39:38.000Z | 2021-11-22T20:54:13.000Z | demo/buf.py | uldisa/tuxedo-python | 59bd44ee9be1807b63599b48b3af9b4dc4ac4277 | [
"MIT"
] | 4 | 2020-12-13T17:02:21.000Z | 2021-12-15T22:46:00.000Z | #!/usr/bin/env python3
import tuxedo as t
if __name__ == '__main__':
buf = {'TA_CLASS': ['T_SVCGRP'], 'TA_OPERATION': ['GET']}
assert t.tpimport(t.tpexport(buf)) == buf
assert t.tpimport(t.tpexport(buf, t.TPEX_STRING), t.TPEX_STRING) == buf
assert t.Fname32(t.Fldid32('TA_OPERATION')) == 'TA_OPERATIO... | 41.674419 | 92 | 0.671875 |
359544a5826b09544016d35aa73f09018ee2fb1c | 1,746 | py | Python | src/term/api/serializers.py | eeriksp/e-dhamma-backend | c473b4504fb79e109c20f8f7ebaf05608d0a48ce | [
"MIT"
] | 1 | 2018-05-03T19:31:57.000Z | 2018-05-03T19:31:57.000Z | src/term/api/serializers.py | eeriksp/e-dhamma-backend | c473b4504fb79e109c20f8f7ebaf05608d0a48ce | [
"MIT"
] | 18 | 2018-05-03T19:30:52.000Z | 2022-02-12T04:20:58.000Z | src/term/api/serializers.py | eeriksp/e-dhamma-backend | c473b4504fb79e109c20f8f7ebaf05608d0a48ce | [
"MIT"
] | 1 | 2018-11-15T19:15:34.000Z | 2018-11-15T19:15:34.000Z | from rest_framework import serializers
from ..models import Term, Meaning, Comment, Example
# class TranslatorsChatSerializer(serializers.ModelSerializer):
# class Meta:
# model = TranslatorsChat
# fields = '__all__'
| 25.304348 | 105 | 0.596793 |
359667e8aabcd97e7d2ce1d0e41dfa0d7e888640 | 302 | py | Python | archive/2017/week12/tasks/more_list_tasks/tail.py | YAtOff/python0 | b5af5004131d64dd52d42746eddb72b6c43a13c7 | [
"Apache-2.0"
] | 6 | 2017-11-08T14:04:39.000Z | 2019-03-24T22:11:04.000Z | archive/2016/week13/tasks/tail.py | YAtOff/python0 | b5af5004131d64dd52d42746eddb72b6c43a13c7 | [
"Apache-2.0"
] | null | null | null | archive/2016/week13/tasks/tail.py | YAtOff/python0 | b5af5004131d64dd52d42746eddb72b6c43a13c7 | [
"Apache-2.0"
] | 7 | 2015-10-27T09:04:58.000Z | 2019-03-03T14:18:26.000Z | def tail(xs):
"""
Python, ,
** ** .
** , **
>>> tail([1, 2, 3])
[2, 3]
>>> tail(["Python"])
[]
"""
pass
| 21.571429 | 79 | 0.572848 |
35973f812223d4b16bcdd0f01ec5321169f6268b | 12,094 | py | Python | pool_automation/roles/aws_manage/library/stateful_set.py | Rob-S/indy-node | 0aefbda62c5a7412d7e03b2fb9795c500ea67e9f | [
"Apache-2.0"
] | 627 | 2017-07-06T12:38:08.000Z | 2022-03-30T13:18:43.000Z | pool_automation/roles/aws_manage/library/stateful_set.py | Rob-S/indy-node | 0aefbda62c5a7412d7e03b2fb9795c500ea67e9f | [
"Apache-2.0"
] | 580 | 2017-06-29T17:59:57.000Z | 2022-03-29T21:37:52.000Z | pool_automation/roles/aws_manage/library/stateful_set.py | Rob-S/indy-node | 0aefbda62c5a7412d7e03b2fb9795c500ea67e9f | [
"Apache-2.0"
] | 704 | 2017-06-29T17:45:34.000Z | 2022-03-30T07:08:58.000Z | #!/usr/bin/python
import re
from itertools import cycle
from collections import namedtuple, defaultdict, OrderedDict
import boto3
from ansible.module_utils.basic import AnsibleModule
# import logging
# boto3.set_stream_logger('', logging.DEBUG)
HostInfo = namedtuple('HostInfo', 'tag_id public_ip user')
InstancePara... | 33.225275 | 112 | 0.588722 |
3598073bb8b0c52a37225a3d3dc812d2999277d1 | 20,289 | py | Python | backend/hqlib/domain/measurement/metric.py | ICTU/quality-report | f6234e112228ee7cfe6476c2d709fe244579bcfe | [
"Apache-2.0"
] | 25 | 2016-11-25T10:41:24.000Z | 2021-07-03T14:02:49.000Z | backend/hqlib/domain/measurement/metric.py | ICTU/quality-report | f6234e112228ee7cfe6476c2d709fe244579bcfe | [
"Apache-2.0"
] | 783 | 2016-09-19T12:10:21.000Z | 2021-01-04T20:39:15.000Z | backend/hqlib/domain/measurement/metric.py | ICTU/quality-report | f6234e112228ee7cfe6476c2d709fe244579bcfe | [
"Apache-2.0"
] | 15 | 2015-03-25T13:52:49.000Z | 2021-03-08T17:17:56.000Z | """
Copyright 2012-2019 Ministerie van Sociale Zaken en Werkgelegenheid
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... | 48.078199 | 119 | 0.642368 |
35981b6b41348f376489c82ca46f8c08bcc7ebf0 | 3,564 | py | Python | examples/decrypt.py | joke325/Pyrop | 79669e3a3362180a239cd496513a60007a914e22 | [
"BSD-2-Clause"
] | null | null | null | examples/decrypt.py | joke325/Pyrop | 79669e3a3362180a239cd496513a60007a914e22 | [
"BSD-2-Clause"
] | null | null | null | examples/decrypt.py | joke325/Pyrop | 79669e3a3362180a239cd496513a60007a914e22 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2020 Janky <box@janky.tech>
# All right 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,
# ... | 36.742268 | 100 | 0.672559 |
359a0ef6c0200615c6b4cd4163ac0cfe31bb7efc | 970 | py | Python | squealy/urls.py | vaibhav-singh/squealy | abfe8fc5e7406987d84fb065bb70152d43f61250 | [
"MIT"
] | null | null | null | squealy/urls.py | vaibhav-singh/squealy | abfe8fc5e7406987d84fb065bb70152d43f61250 | [
"MIT"
] | null | null | null | squealy/urls.py | vaibhav-singh/squealy | abfe8fc5e7406987d84fb065bb70152d43f61250 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from django.conf.urls import url
from django.contrib.auth.decorators import login_required
from . import views
urlpatterns = [
url(r'^swagger.json/$',views.swagger_json_api),
url(r'^swagger/$', login_required(views.swagger)),
url(r'charts/$', login_required(views.Char... | 44.090909 | 96 | 0.710309 |
359a485e3ad209d745beb2991ca78d9f951ff276 | 1,023 | py | Python | src/jomiel_kore/version.py | guendto/jomiel-kore | 7bbb7193baed13d7bb7baacd6cf63b28f5ddf6ac | [
"Apache-2.0"
] | null | null | null | src/jomiel_kore/version.py | guendto/jomiel-kore | 7bbb7193baed13d7bb7baacd6cf63b28f5ddf6ac | [
"Apache-2.0"
] | null | null | null | src/jomiel_kore/version.py | guendto/jomiel-kore | 7bbb7193baed13d7bb7baacd6cf63b28f5ddf6ac | [
"Apache-2.0"
] | null | null | null | #
# jomiel-kore
#
# Copyright
# 2019-2020 Toni Gndodu
#
#
# SPDX-License-Identifier: Apache-2.0
#
"""TODO."""
try: # py38+
from importlib.metadata import version as metadata_version
from importlib.metadata import PackageNotFoundError
except ModuleNotFoundError:
from importlib_metadata import version as m... | 22.733333 | 67 | 0.675464 |
359ae6ec741ebfaca3f4e8299fb7c7de7b44d9e6 | 883 | py | Python | gpdist/tanh_saturate.py | saalfeldlab/gunpowder-distances | eb7702ccc21900987bf9539ea0f1c75a4502ef50 | [
"MIT"
] | null | null | null | gpdist/tanh_saturate.py | saalfeldlab/gunpowder-distances | eb7702ccc21900987bf9539ea0f1c75a4502ef50 | [
"MIT"
] | null | null | null | gpdist/tanh_saturate.py | saalfeldlab/gunpowder-distances | eb7702ccc21900987bf9539ea0f1c75a4502ef50 | [
"MIT"
] | null | null | null | import logging
import numpy as np
from gunpowder.nodes.batch_filter import BatchFilter
logger = logging.getLogger(__name__)
| 23.236842 | 112 | 0.628539 |
359bb85f1c025b4fbb8e2575afa0f0a3d21e6da8 | 2,497 | py | Python | app/api/users/views.py | msoedov/hackit | ebe1addbf7b9a457c6627b69223cc995a5d7ed5d | [
"MIT"
] | null | null | null | app/api/users/views.py | msoedov/hackit | ebe1addbf7b9a457c6627b69223cc995a5d7ed5d | [
"MIT"
] | null | null | null | app/api/users/views.py | msoedov/hackit | ebe1addbf7b9a457c6627b69223cc995a5d7ed5d | [
"MIT"
] | null | null | null | import os
from django.conf import settings
from django.http.response import HttpResponse
from django.shortcuts import get_object_or_404
from rest_framework.generics import ListAPIView, RetrieveUpdateAPIView, RetrieveAPIView
from rest_framework.pagination import PageNumberPagination
from rest_framework.authentication im... | 33.293333 | 87 | 0.678414 |
359bd535f1f4c3e1aa4fe7671744773be664415f | 3,542 | py | Python | main.py | azerpas/OFFSPRING_RAFFLE_NIKE_OW | 83d27376739ea772731d6d289506480933225368 | [
"MIT"
] | 3 | 2017-11-04T16:52:27.000Z | 2019-11-25T22:48:20.000Z | main.py | azerpas/OFFSPRING_RAFFLE_NIKE_OW | 83d27376739ea772731d6d289506480933225368 | [
"MIT"
] | null | null | null | main.py | azerpas/OFFSPRING_RAFFLE_NIKE_OW | 83d27376739ea772731d6d289506480933225368 | [
"MIT"
] | null | null | null | import requests, json, time, random, datetime, threading, pickle
from termcolor import colored
sitekey = "6Ld-VBsUAAAAABeqZuOqiQmZ-1WAMVeTKjdq2-bJ"
if __name__ == "__main__":
ra = Raffle()
accounts = [
# ENTER YOUR ACCOUNTS HERE
{"fname":"pete","lname":"james","mail":"7768james@gmail.com","phone":"+33612334455... | 32.495413 | 142 | 0.61773 |
359e4a1d1a339ad0c2dbb1f04272dbcd884b9fc0 | 163 | py | Python | HSTB/shared/settings.py | noaa-ocs-hydrography/shared | d2004e803c708dffa43d09d3ffea4e4045811b28 | [
"CC0-1.0"
] | null | null | null | HSTB/shared/settings.py | noaa-ocs-hydrography/shared | d2004e803c708dffa43d09d3ffea4e4045811b28 | [
"CC0-1.0"
] | null | null | null | HSTB/shared/settings.py | noaa-ocs-hydrography/shared | d2004e803c708dffa43d09d3ffea4e4045811b28 | [
"CC0-1.0"
] | null | null | null | from sys import platform
if 'win' in platform:
from .winreg import *
elif 'linux' in platform:
from posixreg import *
import posixreg
posixreg.__init__()
| 18.111111 | 25 | 0.730061 |
359f1c4eaa4c5057ef7d59000e8d7426e73f5504 | 13,956 | py | Python | src/skdh/features/core.py | PfizerRD/scikit-digital-health | f834a82d750d9e3cdd35f4f5692a0a388210b821 | [
"MIT"
] | 1 | 2022-03-31T20:56:49.000Z | 2022-03-31T20:56:49.000Z | src/skdh/features/core.py | PfizerRD/scikit-digital-health | f834a82d750d9e3cdd35f4f5692a0a388210b821 | [
"MIT"
] | null | null | null | src/skdh/features/core.py | PfizerRD/scikit-digital-health | f834a82d750d9e3cdd35f4f5692a0a388210b821 | [
"MIT"
] | null | null | null | """
Core functionality for feature computation
Lukas Adamowicz
Copyright (c) 2021. Pfizer Inc. All rights reserved.
"""
from abc import ABC, abstractmethod
from collections.abc import Iterator, Sequence
import json
from warnings import warn
from pandas import DataFrame
from numpy import float_, asarray, zeros, sum, m... | 37.718919 | 99 | 0.481227 |
359f880a9b970ee0910222ff4448b1d006562320 | 4,013 | py | Python | src/bin/shipyard_airflow/tests/unit/control/test_actions_validations_id_api.py | openvdro/airship-shipyard | bae15294c534cf321f5c7ca37592dfa74c4ad7c2 | [
"Apache-2.0"
] | 12 | 2018-05-18T18:59:23.000Z | 2019-05-10T12:31:44.000Z | src/bin/shipyard_airflow/tests/unit/control/test_actions_validations_id_api.py | openvdro/airship-shipyard | bae15294c534cf321f5c7ca37592dfa74c4ad7c2 | [
"Apache-2.0"
] | 4 | 2021-07-28T14:36:57.000Z | 2022-03-22T16:39:23.000Z | src/bin/shipyard_airflow/tests/unit/control/test_actions_validations_id_api.py | openvdro/airship-shipyard | bae15294c534cf321f5c7ca37592dfa74c4ad7c2 | [
"Apache-2.0"
] | 9 | 2018-05-18T16:42:41.000Z | 2019-04-18T20:12:14.000Z | # Copyright 2017 AT&T Intellectual Property. All other 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... | 37.157407 | 79 | 0.676053 |
35a03d99d3719963febefb8c4a03a9c25373c377 | 17,650 | py | Python | tests/test_lccv.py | fmohr/llcv | 22ba7b9712397f750150ed7e793245b5a0ae3fdf | [
"BSD-3-Clause"
] | 3 | 2021-11-30T18:58:58.000Z | 2022-03-07T20:40:41.000Z | tests/test_lccv.py | fmohr/llcv | 22ba7b9712397f750150ed7e793245b5a0ae3fdf | [
"BSD-3-Clause"
] | null | null | null | tests/test_lccv.py | fmohr/llcv | 22ba7b9712397f750150ed7e793245b5a0ae3fdf | [
"BSD-3-Clause"
] | null | null | null | import logging
import lccv
import numpy as np
import sklearn.datasets
from sklearn import *
import unittest
from parameterized import parameterized
import itertools as it
import time
from sklearn.experimental import enable_hist_gradient_boosting # noqa
import openml
import pandas as pd | 53.810976 | 791 | 0.634051 |
35a09d34a43d1ae1af511bf3da1674e129960148 | 4,099 | py | Python | plaso/formatters/firefox.py | cvandeplas/plaso | b625a2c267ed09505cfac84c9593d8c0922852b1 | [
"Apache-2.0"
] | 3 | 2016-03-11T02:47:08.000Z | 2016-12-24T03:19:27.000Z | plaso/formatters/firefox.py | cvandeplas/plaso | b625a2c267ed09505cfac84c9593d8c0922852b1 | [
"Apache-2.0"
] | null | null | null | plaso/formatters/firefox.py | cvandeplas/plaso | b625a2c267ed09505cfac84c9593d8c0922852b1 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2013 The Plaso Project Authors.
# Please see the AUTHORS file for details on individual authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the L... | 29.919708 | 78 | 0.704562 |
35a2f5e7894ff096b0490a08a6c06f504ef9c5b2 | 1,175 | py | Python | algorithms/prims.py | karensuzue/Maze | a9c613323d24d115279b1892a33036acef7b715e | [
"MIT"
] | null | null | null | algorithms/prims.py | karensuzue/Maze | a9c613323d24d115279b1892a33036acef7b715e | [
"MIT"
] | null | null | null | algorithms/prims.py | karensuzue/Maze | a9c613323d24d115279b1892a33036acef7b715e | [
"MIT"
] | null | null | null | import random
from grid import Grid
from grid import Cell | 28.658537 | 58 | 0.544681 |
35a50fd2c3fd502485183ee67073c6d3b767aa38 | 14,065 | py | Python | secfs/fs.py | quinnmagendanz/vFileSystem | 9a3c4b1d27a6325325a4f048f6a8fe93e5d871bf | [
"MIT"
] | null | null | null | secfs/fs.py | quinnmagendanz/vFileSystem | 9a3c4b1d27a6325325a4f048f6a8fe93e5d871bf | [
"MIT"
] | null | null | null | secfs/fs.py | quinnmagendanz/vFileSystem | 9a3c4b1d27a6325325a4f048f6a8fe93e5d871bf | [
"MIT"
] | null | null | null | # This file implements file system operations at the level of inodes.
import time
import secfs.crypto
import secfs.tables
import secfs.access
import secfs.store.tree
import secfs.store.block
from secfs.store.inode import Inode
from secfs.store.tree import Directory
from cryptography.fernet import Fernet
from secfs.typ... | 40.650289 | 140 | 0.664842 |
35a5e76930a9f052656cb9ba7d71587f5d8d63d6 | 3,355 | py | Python | neurons/feynman/visualization.py | unconst/SimpleWord2Vec | d1af6993c1d6bca273a0c8d147132ee9867f5543 | [
"MIT"
] | 9 | 2019-12-18T10:20:15.000Z | 2021-03-18T00:07:28.000Z | neurons/feynman/visualization.py | unconst/SimpleWord2Vec | d1af6993c1d6bca273a0c8d147132ee9867f5543 | [
"MIT"
] | 5 | 2020-02-12T02:21:15.000Z | 2022-02-10T00:25:28.000Z | neurons/feynman/visualization.py | unconst/BitTensor | d1af6993c1d6bca273a0c8d147132ee9867f5543 | [
"MIT"
] | null | null | null | from __future__ import division
import io
import matplotlib as mpl
import matplotlib.pyplot as plt
import networkx as nx
import numpy
import os
import tensorflow as tf
def figure_to_buff(figure):
"""Converts the matplotlib plot specified by 'figure' to a PNG image and
returns it. The supplied figure is closed a... | 34.234694 | 80 | 0.538897 |
35a7208f14977580e5b6c2241d160acef1319811 | 610 | py | Python | harvester/letsdoit/discovery/sublist3r.py | Average-stu/osint | 21c3f2b5145fb82156a317f7728498f368f6f6bb | [
"MIT"
] | 2 | 2021-02-13T13:46:21.000Z | 2021-02-13T13:53:46.000Z | harvester/letsdoit/discovery/sublist3r.py | Average-stu/osint | 21c3f2b5145fb82156a317f7728498f368f6f6bb | [
"MIT"
] | null | null | null | harvester/letsdoit/discovery/sublist3r.py | Average-stu/osint | 21c3f2b5145fb82156a317f7728498f368f6f6bb | [
"MIT"
] | null | null | null | from typing import Type
from letsdoit.lib.core import *
| 26.521739 | 83 | 0.64918 |
35a81e5b99ffdc95fe04f5cfea1745dceab51074 | 959 | py | Python | src/spinnaker_ros_lsm/venv/lib/python2.7/site-packages/spinnman/messages/eieio/data_messages/eieio_16bit_with_payload/eieio_16bit_with_payload_timed_data_message.py | Roboy/LSM_SpiNNaker_MyoArm | 04fa1eaf78778edea3ba3afa4c527d20c491718e | [
"BSD-3-Clause"
] | 2 | 2020-11-01T13:22:11.000Z | 2020-11-01T13:22:20.000Z | src/spinnaker_ros_lsm/venv/lib/python2.7/site-packages/spinnman/messages/eieio/data_messages/eieio_16bit_with_payload/eieio_16bit_with_payload_timed_data_message.py | Roboy/LSM_SpiNNaker_MyoArm | 04fa1eaf78778edea3ba3afa4c527d20c491718e | [
"BSD-3-Clause"
] | null | null | null | src/spinnaker_ros_lsm/venv/lib/python2.7/site-packages/spinnman/messages/eieio/data_messages/eieio_16bit_with_payload/eieio_16bit_with_payload_timed_data_message.py | Roboy/LSM_SpiNNaker_MyoArm | 04fa1eaf78778edea3ba3afa4c527d20c491718e | [
"BSD-3-Clause"
] | null | null | null | from spinnman.messages.eieio.eieio_type import EIEIOType
from spinnman.messages.eieio.data_messages.eieio_with_payload_data_message\
import EIEIOWithPayloadDataMessage
from spinnman.messages.eieio.data_messages.eieio_data_header\
import EIEIODataHeader
from spinnman.messages.eieio.data_messages.eieio_data_messa... | 38.36 | 77 | 0.746611 |
35a90826145b4db8ac5f1bb20d348f0f7947e310 | 4,505 | py | Python | reliability/tasks/Apps.py | RH-ematysek/svt | 3c4f99d453c6956b434f1a90e0658a95f3fda0a4 | [
"Apache-2.0"
] | 115 | 2016-07-15T12:24:42.000Z | 2022-02-21T20:40:09.000Z | reliability/tasks/Apps.py | RH-ematysek/svt | 3c4f99d453c6956b434f1a90e0658a95f3fda0a4 | [
"Apache-2.0"
] | 452 | 2016-05-19T13:55:19.000Z | 2022-03-24T11:25:20.000Z | reliability/tasks/Apps.py | RH-ematysek/svt | 3c4f99d453c6956b434f1a90e0658a95f3fda0a4 | [
"Apache-2.0"
] | 112 | 2016-05-16T08:48:55.000Z | 2022-01-12T13:13:37.000Z | from .GlobalData import global_data
from .utils.oc import oc
import requests
import time
import logging
all_apps=Apps()
if __name__ == "__main__":
app = App("cakephp-mysql-example", "t1", "cakephp-mysql-example","cakephp-mysql-example")
apps = Apps()
# apps.add(app)
# time.sleep(180)
app.vi... | 40.954545 | 130 | 0.583796 |
35a90fa7fe750428ce519a6161eec0ec07750701 | 4,463 | py | Python | recognize.py | aerdem4/rock-paper-scissors | 0e520aa53d8cb146a8ab4f5fd1ebd823ffed3a4b | [
"MIT"
] | null | null | null | recognize.py | aerdem4/rock-paper-scissors | 0e520aa53d8cb146a8ab4f5fd1ebd823ffed3a4b | [
"MIT"
] | 1 | 2020-03-02T13:26:05.000Z | 2020-03-02T13:26:05.000Z | recognize.py | aerdem4/rock-paper-scissors | 0e520aa53d8cb146a8ab4f5fd1ebd823ffed3a4b | [
"MIT"
] | null | null | null | import cv2
import numpy as np
from keras.models import load_model
bg = None
#-------------------------------------------------------------------------------
# Main function
#-------------------------------------------------------------------------------
if __name__ == "__main__":
model = load_model("model.h5")
... | 33.556391 | 118 | 0.561058 |
35ab2a8e1ddb97b8c757c40675e5df5553af81af | 4,829 | py | Python | src/extract-data.py | SMTG-UCL/singlet-fission-screening | 69c85d672a98420397094e55bef98287879db685 | [
"MIT"
] | null | null | null | src/extract-data.py | SMTG-UCL/singlet-fission-screening | 69c85d672a98420397094e55bef98287879db685 | [
"MIT"
] | null | null | null | src/extract-data.py | SMTG-UCL/singlet-fission-screening | 69c85d672a98420397094e55bef98287879db685 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from __future__ import unicode_literals
import os
import sys
import tarfile
import shutil
import tempfile
from contextlib import contextmanager
from pymatgen.io.gaussian import GaussianInput, GaussianOutput
from tinydb import TinyDB
def extract_data_from_tar_file(tar_file):
with tarfil... | 37.726563 | 84 | 0.601781 |
35acde1fca854d1c0727ab3afd45a6080b48ff76 | 14,007 | py | Python | src/pyprocessing/shapes.py | agarwalnaimish/pyprocessing | 46695c379c95a7b874f76257c37f44f4b59d39e9 | [
"MIT"
] | 3 | 2018-04-23T17:33:02.000Z | 2021-01-05T04:52:36.000Z | src/pyprocessing/shapes.py | agarwalnaimish/pyprocessing | 46695c379c95a7b874f76257c37f44f4b59d39e9 | [
"MIT"
] | 1 | 2018-04-23T17:37:37.000Z | 2018-04-23T17:37:37.000Z | src/pyprocessing/shapes.py | agarwalnaimish/pyprocessing | 46695c379c95a7b874f76257c37f44f4b59d39e9 | [
"MIT"
] | 2 | 2019-01-16T06:34:52.000Z | 2019-10-15T14:03:07.000Z | # coding: utf-8
# ************************
# SHAPE STUFF
# ************************
import ctypes
from pyglet.gl import *
from .globs import *
from .constants import *
from .pvector import *
from .primitives import _smoothFixHackBegin, _smoothFixHackEnd
from math import *
__all__ = ['beginShape', 'vertex', 'normal... | 36.667539 | 92 | 0.520811 |
35adcf6adc687ab72f83ce164d7c0aba3ae2e753 | 22,531 | py | Python | ptpy/transports/usb.py | komodo108/sequoia-ptpy | 3395e68286ef0dc8a026e48a960ff4d0c65792a4 | [
"BSD-3-Clause"
] | null | null | null | ptpy/transports/usb.py | komodo108/sequoia-ptpy | 3395e68286ef0dc8a026e48a960ff4d0c65792a4 | [
"BSD-3-Clause"
] | null | null | null | ptpy/transports/usb.py | komodo108/sequoia-ptpy | 3395e68286ef0dc8a026e48a960ff4d0c65792a4 | [
"BSD-3-Clause"
] | null | null | null | '''This module implements the USB transport layer for PTP.
It exports the PTPUSB class. Both the transport layer and the basic PTP
implementation are Vendor agnostic. Vendor extensions should extend these to
support more operations.
'''
from __future__ import absolute_import
import atexit
import logging
import usb.cor... | 37.42691 | 79 | 0.509609 |
35ae9be77ddd9d5c96ad4c48dcd4d7d31ac05858 | 4,598 | py | Python | cablegate/cable/models.py | h3/django-cablegate | bffa2970a1fb21717a48cfce76b8a24f909acab0 | [
"BSD-3-Clause"
] | 1 | 2016-04-03T03:15:48.000Z | 2016-04-03T03:15:48.000Z | cablegate/cable/models.py | h3/django-cablegate | bffa2970a1fb21717a48cfce76b8a24f909acab0 | [
"BSD-3-Clause"
] | null | null | null | cablegate/cable/models.py | h3/django-cablegate | bffa2970a1fb21717a48cfce76b8a24f909acab0 | [
"BSD-3-Clause"
] | 1 | 2019-07-31T06:02:12.000Z | 2019-07-31T06:02:12.000Z | import re
from operator import itemgetter
from django.conf import settings
from django.utils import simplejson
from django.db import models
from nltk.tokenize.simple import SpaceTokenizer
from nltk.stem import LancasterStemmer
WORDS_IGNORED = (
'after', 'that', 'with', 'which', 'into', 'when', 'than', 'them', 't... | 37.382114 | 101 | 0.565681 |
35aec8279955fef5781af2402034c048af969760 | 618 | py | Python | ztools/Fs/__init__.py | ItsCinnabar/Mass_Custom_XCIs | 94551f43eeed3a6ab7a761fd41ff5500435910dc | [
"MIT"
] | 6 | 2019-05-08T18:52:48.000Z | 2019-10-01T06:58:20.000Z | ztools/Fs/__init__.py | ItsCinnabar/Mass_Custom_XCIs | 94551f43eeed3a6ab7a761fd41ff5500435910dc | [
"MIT"
] | null | null | null | ztools/Fs/__init__.py | ItsCinnabar/Mass_Custom_XCIs | 94551f43eeed3a6ab7a761fd41ff5500435910dc | [
"MIT"
] | 1 | 2020-01-01T07:44:06.000Z | 2020-01-01T07:44:06.000Z | from Fs.Xci import Xci
from Fs.pXci import uXci
from Fs.pXci import nXci
from Fs.Nca import Nca
from Fs.Nsp import Nsp
from Fs.Rom import Rom
from Fs.Nacp import Nacp
from Fs.Pfs0 import Pfs0
from Fs.Hfs0 import Hfs0
from Fs.Ticket import Ticket
from Fs.File import File | 20.6 | 29 | 0.666667 |
35b0214bdc1e4c57ae70c73b860e17dcca99ae17 | 808 | py | Python | Days/Day 5 - Doesn't He Have Intern-Elves For This/Part 2.py | jamesjiang52/Advent-of-Code-2015 | 29c19eb11d9bde532bc2609c5b970a0a6924d11b | [
"MIT"
] | null | null | null | Days/Day 5 - Doesn't He Have Intern-Elves For This/Part 2.py | jamesjiang52/Advent-of-Code-2015 | 29c19eb11d9bde532bc2609c5b970a0a6924d11b | [
"MIT"
] | null | null | null | Days/Day 5 - Doesn't He Have Intern-Elves For This/Part 2.py | jamesjiang52/Advent-of-Code-2015 | 29c19eb11d9bde532bc2609c5b970a0a6924d11b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Jan 3 10:27:50 2018
@author: James Jiang
"""
all_lines = [line.rstrip('\n') for line in open('Data.txt')]
count = 0
for string in all_lines:
if is_nice(string) == True:
count += 1
print(count)
| 21.837838 | 83 | 0.566832 |
35b02597463fbb5f50f5b66d1352a253be0edf70 | 4,708 | py | Python | loggerBot.py | jskrist/channelLogger | 42d5820d29ce9213c823d76dbdc748e288f45eb8 | [
"MIT"
] | null | null | null | loggerBot.py | jskrist/channelLogger | 42d5820d29ce9213c823d76dbdc748e288f45eb8 | [
"MIT"
] | null | null | null | loggerBot.py | jskrist/channelLogger | 42d5820d29ce9213c823d76dbdc748e288f45eb8 | [
"MIT"
] | null | null | null | import asyncio, discord, json
from discord.ext.commands import Bot
from discord.ext import commands
from tinydb import TinyDB, Query
from tinydb.operations import delete, increment
'''
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SETUP
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -... | 37.664 | 105 | 0.647409 |
35b0660ef14051f12a9964eb3155f5bf5f684943 | 2,080 | py | Python | roomBasedLightControl/roomBasedLightControl.py | pippyn/appdaemon-scripts | 615cdfeaaf039ffbe1be041eb07c35a2494f008d | [
"MIT"
] | null | null | null | roomBasedLightControl/roomBasedLightControl.py | pippyn/appdaemon-scripts | 615cdfeaaf039ffbe1be041eb07c35a2494f008d | [
"MIT"
] | null | null | null | roomBasedLightControl/roomBasedLightControl.py | pippyn/appdaemon-scripts | 615cdfeaaf039ffbe1be041eb07c35a2494f008d | [
"MIT"
] | null | null | null | import appdaemon.plugins.hass.hassapi as hass
import datetime
import globals
#
# App which turns on the light based on the room the user is currently in
#
#
# Args:
# room_sensor: the sensor which shows the room the user is in. example: sensor.mqtt_room_user_one
# entity: The entity which gets turned on by alexa/snips.... | 33.015873 | 97 | 0.664423 |
35b0f708a1bc7275f2341dabd56cd8622b49aa36 | 4,074 | py | Python | Platypus StableSwap/emissions_rate.py | MattAHarrington/protocol-analysis | 50f15e186bb70b4c76c9e77c8fc832619382c8d0 | [
"MIT"
] | null | null | null | Platypus StableSwap/emissions_rate.py | MattAHarrington/protocol-analysis | 50f15e186bb70b4c76c9e77c8fc832619382c8d0 | [
"MIT"
] | null | null | null | Platypus StableSwap/emissions_rate.py | MattAHarrington/protocol-analysis | 50f15e186bb70b4c76c9e77c8fc832619382c8d0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
'''
Calculating the emissions from deposits in Platypus stable accounts
'''
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import cm
from matplotlib.ticker import LinearLocator, EngFormatter, PercentFormatter
from strategy_const import *
from const import *
def boosted_pool_... | 42.884211 | 120 | 0.738095 |
35b1c053362f87cf922d6f371df237e7204dcea6 | 1,477 | py | Python | Tests/test_management_client.py | acronis/acronis-cyber-platform-python-samples | bfcbea06753a773ac889054f7e4dee2a6496a8de | [
"MIT"
] | 16 | 2019-10-12T12:14:57.000Z | 2021-11-29T12:06:58.000Z | Tests/test_management_client.py | acronis/acronis-cyber-platform-python-samples | bfcbea06753a773ac889054f7e4dee2a6496a8de | [
"MIT"
] | null | null | null | Tests/test_management_client.py | acronis/acronis-cyber-platform-python-samples | bfcbea06753a773ac889054f7e4dee2a6496a8de | [
"MIT"
] | 4 | 2019-10-18T17:16:14.000Z | 2021-11-16T20:35:43.000Z | """
@date 30.08.2019
@author Anna.Shavrina@acronis.com
@details :copyright: 20032019 Acronis International GmbH,
Rheinweg 9, 8200 Schaffhausen, Switzerland. All rights reserved.
"""
from ManagementAPI.ManagementClient.how_to_create_client import create_client
from ManagementAPI.ManagementClient.how_to_delete_client i... | 36.925 | 77 | 0.786053 |
35b5a9f36ac319cd4dda6dbca8387f49972a915d | 6,276 | py | Python | holide1/src_test/unittests/test_school_holidays.py | SmartDataInnovationLab/holide-library | 2c2b023659fbaf40474caf693b57aafc98f45f7b | [
"MIT"
] | 1 | 2020-11-30T19:34:37.000Z | 2020-11-30T19:34:37.000Z | holide1/src_test/unittests/test_school_holidays.py | SmartDataInnovationLab/holide-library | 2c2b023659fbaf40474caf693b57aafc98f45f7b | [
"MIT"
] | 2 | 2021-06-08T09:25:47.000Z | 2021-06-08T09:26:34.000Z | holide1/src_test/unittests/test_school_holidays.py | SmartDataInnovationLab/holide-library | 2c2b023659fbaf40474caf693b57aafc98f45f7b | [
"MIT"
] | 1 | 2021-05-09T22:07:25.000Z | 2021-05-09T22:07:25.000Z | #!/usr/bin/env python3
import os, sys, inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(currentdir)
parentdir = os.path.dirname(parentdir)
sys.path.insert(0, parentdir)
import unittest
import datetime
from datetime import date
from src.holide i... | 39.721519 | 110 | 0.688177 |
35b60f638217a742f0dcf90d5b6242bfd1caa4d0 | 4,705 | py | Python | migrations/migrate.py | MJJojo97/openslides-backend | af0d1edb0070e352d46f285a1ba0bbe3702d49ae | [
"MIT"
] | null | null | null | migrations/migrate.py | MJJojo97/openslides-backend | af0d1edb0070e352d46f285a1ba0bbe3702d49ae | [
"MIT"
] | null | null | null | migrations/migrate.py | MJJojo97/openslides-backend | af0d1edb0070e352d46f285a1ba0bbe3702d49ae | [
"MIT"
] | null | null | null | import pkgutil
import sys
from argparse import ArgumentParser
from importlib import import_module
from typing import Any, List, Type
from datastore.migrations import BaseMigration, MigrationException, PrintFunction, setup
def get_parser() -> ArgumentParser:
parent_parser = ArgumentParser(
description=... | 32.902098 | 133 | 0.636557 |
35b754ce093c02acd53d79d1aafbde7ead2584ed | 2,221 | py | Python | src/refactor/parallel.py | luislorenzom/b33th0v3n | cf2665a51ed6779093c273cf9d7c404dd9222493 | [
"MIT"
] | null | null | null | src/refactor/parallel.py | luislorenzom/b33th0v3n | cf2665a51ed6779093c273cf9d7c404dd9222493 | [
"MIT"
] | null | null | null | src/refactor/parallel.py | luislorenzom/b33th0v3n | cf2665a51ed6779093c273cf9d7c404dd9222493 | [
"MIT"
] | null | null | null | from types import FunctionType
import numpy as np
import pandas as pd
from functools import partial
from multiprocessing import Pool, cpu_count
def get_levenshtein_distance(str1: str, str2: str) -> float:
"""
Computes the Levenshtein distance between two strings
:param str1: first string
:param str... | 30.013514 | 123 | 0.594327 |
35b8e7d7bd8c548bc9dcbb5f851dbbc98f40925a | 3,540 | py | Python | pygbif/caching.py | bartaelterman/pygbif | 110e0cbcd8cb2b1813f6e27d66e95a95579d4643 | [
"MIT"
] | 37 | 2015-03-20T13:50:27.000Z | 2021-07-10T11:23:16.000Z | pygbif/caching.py | bartaelterman/pygbif | 110e0cbcd8cb2b1813f6e27d66e95a95579d4643 | [
"MIT"
] | 82 | 2015-10-30T06:12:48.000Z | 2021-07-13T12:20:57.000Z | pygbif/caching.py | bartaelterman/pygbif | 110e0cbcd8cb2b1813f6e27d66e95a95579d4643 | [
"MIT"
] | 12 | 2015-03-20T13:50:29.000Z | 2020-09-23T08:53:46.000Z | import requests_cache
import os.path
import tempfile
try:
from requests_cache import remove_expired_responses
except ModuleNotFoundError:
from requests_cache.core import remove_expired_responses
def caching(
cache=False,
name=None,
backend="sqlite",
expire_after=86400,
allowable_codes=(200... | 34.705882 | 90 | 0.663559 |
35bbfe712541d7c2876a8f989c17d4e15afb5e72 | 1,441 | py | Python | mlir/lib/Bindings/Python/mlir/dialects/linalg/opdsl/lang/types.py | MochalovaAn/llvm | 528aa5ca4aa9df447dc3497ef19da3b124e88d7d | [
"Apache-2.0"
] | null | null | null | mlir/lib/Bindings/Python/mlir/dialects/linalg/opdsl/lang/types.py | MochalovaAn/llvm | 528aa5ca4aa9df447dc3497ef19da3b124e88d7d | [
"Apache-2.0"
] | null | null | null | mlir/lib/Bindings/Python/mlir/dialects/linalg/opdsl/lang/types.py | MochalovaAn/llvm | 528aa5ca4aa9df447dc3497ef19da3b124e88d7d | [
"Apache-2.0"
] | null | null | null | # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
"""Facility for symbolically referencing type variables.
Type variables are instances of the TypeVar class, which is u... | 20.585714 | 80 | 0.66898 |
35bc18ea4360aa47732f68c69e53ac55b41e9de8 | 2,867 | py | Python | run_exp/run_theory.py | andeyeluguo/AI_physicist | b242204da5a284cd22175bae66e6b4f79814ceeb | [
"MIT"
] | 25 | 2019-10-22T16:49:45.000Z | 2021-12-21T03:53:59.000Z | run_exp/run_theory.py | andeyeluguo/AI_physicist | b242204da5a284cd22175bae66e6b4f79814ceeb | [
"MIT"
] | 1 | 2021-01-21T15:57:19.000Z | 2021-04-04T15:51:27.000Z | run_exp/run_theory.py | andeyeluguo/AI_physicist | b242204da5a284cd22175bae66e6b4f79814ceeb | [
"MIT"
] | 10 | 2019-10-30T03:42:32.000Z | 2022-03-18T14:20:48.000Z | import os, sys
exp_id=[
"exp1.0",
]
env_source=[
"file",
]
exp_mode = [
"continuous",
#"newb",
#"base",
]
num_theories_init=[
4,
]
pred_nets_neurons=[
8,
]
pred_nets_activation=[
"linear",
# "leakyRelu",
]
domain_net_neurons=[
8,
]
domain_pred_mode=[
"onehot",
]
mse_amp=[
1e-7,
]
simplify_criteria=[
'\("DLs",... | 14.123153 | 89 | 0.647018 |
35bd4ab483f73871726c5a33d5a113b95bd2e29f | 10,304 | py | Python | lib/dataset/cao_cifar.py | jrcai/ACE | 1e2b04d1cf4bb517f107664ac489a1a96e95a4c1 | [
"MIT"
] | 18 | 2021-08-06T01:15:32.000Z | 2022-03-14T07:09:39.000Z | lib/dataset/cao_cifar.py | jrcai/BagofTricks-LT | d75b195367e3d535d316d134ec4bbef4bb7fcbdd | [
"MIT"
] | 2 | 2021-09-24T03:29:17.000Z | 2021-11-22T19:18:58.000Z | lib/dataset/cao_cifar.py | jrcai/BagofTricks-LT | d75b195367e3d535d316d134ec4bbef4bb7fcbdd | [
"MIT"
] | 2 | 2021-10-17T18:09:20.000Z | 2021-11-08T04:19:19.000Z | # To ensure fairness, we use the same code in LDAM (https://github.com/kaidic/LDAM-DRW) to produce long-tailed CIFAR datasets.
import torchvision
import torchvision.transforms as transforms
import numpy as np
from PIL import Image
import random
import os
import cv2
import time
import json
import copy
from utils.utils ... | 36.8 | 128 | 0.58948 |
35be620af3553df16e0f3406f42cf348349c4566 | 6,428 | py | Python | fs.py | titouanc/docfub | a06fdb9100c85ac3d80aa6e3102029436963d27c | [
"MIT"
] | 1 | 2018-03-26T15:58:49.000Z | 2018-03-26T15:58:49.000Z | fs.py | titouanc/docfub | a06fdb9100c85ac3d80aa6e3102029436963d27c | [
"MIT"
] | 1 | 2021-06-01T22:25:28.000Z | 2021-06-01T22:25:28.000Z | fs.py | titouanc/docfub | a06fdb9100c85ac3d80aa6e3102029436963d27c | [
"MIT"
] | null | null | null | import os
import errno
import stat
import logging
from io import BytesIO
from time import time, mktime, strptime
from fuse import FuseOSError, Operations, LoggingMixIn
logger = logging.getLogger('dochub_fs')
def wrap_errno(func):
"""
@brief Transform Exceptions happening inside func into meaningful
... | 28.192982 | 80 | 0.564872 |
35beb2659c3525943e08592cd4e9ebc8b9fd9ed7 | 2,239 | py | Python | algolab_class_API/migrations/0011_auto_20190110_1307.py | KMU-algolab/algolab_class | fdf22cd10d5af71eae63e259c4f88f2b55b44ec7 | [
"MIT"
] | 1 | 2019-01-10T05:46:09.000Z | 2019-01-10T05:46:09.000Z | algolab_class_API/migrations/0011_auto_20190110_1307.py | KMU-algolab/algolab_class | fdf22cd10d5af71eae63e259c4f88f2b55b44ec7 | [
"MIT"
] | 7 | 2018-12-25T15:59:49.000Z | 2019-01-10T05:45:25.000Z | algolab_class_API/migrations/0011_auto_20190110_1307.py | KMU-algolab/algolab_class | fdf22cd10d5af71eae63e259c4f88f2b55b44ec7 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.4 on 2019-01-10 04:07
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
| 38.603448 | 305 | 0.604734 |
35befecc57c6a5bb3923fbaf46cad1525bfacb20 | 11,266 | py | Python | spiderpy/spiderapi.py | peternijssen/python-itho-daalderop-api | a4c2b1488e7f32b892004df1ccfeb902f8e19135 | [
"MIT"
] | null | null | null | spiderpy/spiderapi.py | peternijssen/python-itho-daalderop-api | a4c2b1488e7f32b892004df1ccfeb902f8e19135 | [
"MIT"
] | null | null | null | spiderpy/spiderapi.py | peternijssen/python-itho-daalderop-api | a4c2b1488e7f32b892004df1ccfeb902f8e19135 | [
"MIT"
] | null | null | null | """ Python wrapper for the Spider API """
from __future__ import annotations
import json
import logging
import time
from datetime import datetime, timedelta
from typing import Any, Dict, ValuesView
from urllib.parse import unquote
import requests
from spiderpy.devices.powerplug import SpiderPowerPlug
from spiderpy.d... | 33.933735 | 106 | 0.582105 |
35bf68b8af9e43feff762af717348577fdc8b44c | 3,548 | py | Python | http_nudger/persister.py | askolosov/http-nudger | c483ffdef0df57ef625d0912cc2317d3c67f2303 | [
"MIT"
] | null | null | null | http_nudger/persister.py | askolosov/http-nudger | c483ffdef0df57ef625d0912cc2317d3c67f2303 | [
"MIT"
] | null | null | null | http_nudger/persister.py | askolosov/http-nudger | c483ffdef0df57ef625d0912cc2317d3c67f2303 | [
"MIT"
] | null | null | null | """
Persister module contains part of the http-nudger which consumes
records from Kafka and stores them into the database
"""
import json
import logging
from pathlib import Path
from typing import List
import aiokafka
import asyncpg
from .helpers import create_kafka_consumer, create_postgres_connection_pool
from .url... | 29.081967 | 85 | 0.598365 |
35c0bcc2adb3ea68d0b4f4ffb1f220f03d52c1be | 724 | py | Python | var/spack/repos/builtin/packages/liblzf/package.py | BenWibking/spack | 49b3b43a4a9375210b578635d9240875a5f3106b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2,360 | 2017-11-06T08:47:01.000Z | 2022-03-31T14:45:33.000Z | var/spack/repos/builtin/packages/liblzf/package.py | BenWibking/spack | 49b3b43a4a9375210b578635d9240875a5f3106b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 13,838 | 2017-11-04T07:49:45.000Z | 2022-03-31T23:38:39.000Z | var/spack/repos/builtin/packages/liblzf/package.py | joequant/spack | e028ee0d5903045e1cdeb57550cbff61f2ffb2fa | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1,793 | 2017-11-04T07:45:50.000Z | 2022-03-30T14:31:53.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
| 36.2 | 93 | 0.740331 |
35c0d7b1584b734cc6675d562fe57b7a5059350f | 15,565 | py | Python | blaze/compute/tests/test_elwise_eval.py | talumbau/blaze | 66c9e61476f11d53f7b734664214537182397739 | [
"BSD-3-Clause"
] | 1 | 2018-01-24T08:54:04.000Z | 2018-01-24T08:54:04.000Z | blaze/compute/tests/test_elwise_eval.py | talumbau/blaze | 66c9e61476f11d53f7b734664214537182397739 | [
"BSD-3-Clause"
] | null | null | null | blaze/compute/tests/test_elwise_eval.py | talumbau/blaze | 66c9e61476f11d53f7b734664214537182397739 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import, division, print_function
import unittest
import numpy as np
from numpy.testing import assert_array_equal, assert_allclose
from dynd import nd, ndt
import blaze
import unittest
import tempfile
import os, os.path
import glob
import shutil
import blaze
# Useful superclass for ... | 35.946882 | 76 | 0.595952 |