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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e0d3c8c44e9a78dfdefd3d78c0e47b2746c32032 | 5,233 | py | Python | multitidal/client_lib.py | xa4a/multitidal | 26f757f12464e8f935c0389c6356b97cfaa9f03f | [
"MIT"
] | 2 | 2021-12-01T05:39:05.000Z | 2021-12-07T07:26:16.000Z | multitidal/client_lib.py | xa4a/multitidal | 26f757f12464e8f935c0389c6356b97cfaa9f03f | [
"MIT"
] | 1 | 2021-12-02T03:54:16.000Z | 2021-12-02T03:54:16.000Z | multitidal/client_lib.py | parabolala/multitidal | 26f757f12464e8f935c0389c6356b97cfaa9f03f | [
"MIT"
] | null | null | null | import asyncio
import json
import os
import pty
import shutil
import sys
import tty
import termios
import time
import threading
import tornado.iostream
from tornado.ioloop import IOLoop
from tornado.websocket import websocket_connect
ioloop = tornado.ioloop.IOLoop.instance()
SSH_LOGIN = "root"
SSH_PASSWORD = "algor... | 28.911602 | 73 | 0.549016 |
e0d3e0406d466ee1eb3c15b25d95347feecab756 | 1,265 | py | Python | custom_components/ge_home/entities/common/ge_water_heater.py | olds/ha_gehome | 5cb24deab64bcade45861da0497a84631845922c | [
"MIT"
] | 41 | 2021-08-02T02:15:54.000Z | 2022-03-30T11:11:42.000Z | custom_components/ge_home/entities/common/ge_water_heater.py | olds/ha_gehome | 5cb24deab64bcade45861da0497a84631845922c | [
"MIT"
] | 46 | 2021-08-03T02:20:59.000Z | 2022-03-30T11:17:15.000Z | custom_components/ge_home/entities/common/ge_water_heater.py | olds/ha_gehome | 5cb24deab64bcade45861da0497a84631845922c | [
"MIT"
] | 15 | 2021-08-31T00:21:33.000Z | 2022-03-30T12:53:21.000Z | import abc
import logging
from typing import Any, Dict, List, Optional
from homeassistant.components.water_heater import WaterHeaterEntity
from homeassistant.const import (
TEMP_FAHRENHEIT,
TEMP_CELSIUS
)
from gehomesdk import ErdCode, ErdMeasurementUnits
from ...const import DOMAIN
from .ge_erd_entity import ... | 28.111111 | 83 | 0.728854 |
e0d425874c7577ffb290b5d9bb87cc599dbdcb1a | 2,790 | py | Python | scrapy/contracts/default.py | zyuchuan/scrapy | ce24f53957b41877319a5ffc6cf26f0a18baaec2 | [
"BSD-3-Clause"
] | null | null | null | scrapy/contracts/default.py | zyuchuan/scrapy | ce24f53957b41877319a5ffc6cf26f0a18baaec2 | [
"BSD-3-Clause"
] | null | null | null | scrapy/contracts/default.py | zyuchuan/scrapy | ce24f53957b41877319a5ffc6cf26f0a18baaec2 | [
"BSD-3-Clause"
] | null | null | null | import json
from scrapy.item import BaseItem
from scrapy.http import Request
from scrapy.exceptions import ContractFail
from scrapy.contracts import Contract
# contracts
| 26.074766 | 70 | 0.576344 |
e0d53d1eacb61e87932581de548a87b7c4071732 | 3,258 | py | Python | networks/metrics.py | pabloduque0/cnn_deconv_viz | 3fc3d8a9dbad8e8e28d4df4023bdb438e4c9cf85 | [
"MIT"
] | null | null | null | networks/metrics.py | pabloduque0/cnn_deconv_viz | 3fc3d8a9dbad8e8e28d4df4023bdb438e4c9cf85 | [
"MIT"
] | null | null | null | networks/metrics.py | pabloduque0/cnn_deconv_viz | 3fc3d8a9dbad8e8e28d4df4023bdb438e4c9cf85 | [
"MIT"
] | null | null | null | from keras import backend as K
import tensorflow as tf
import numpy as np
custom_dice_coef = custom_dice_coefficient
custom_dice_loss = custom_dice_coefficient_loss
dice_coef = dice_coefficient
dice_coef_loss = dice_coefficient_loss
weighted_crossentropy = weighted_crossentropy_pixelwise
predicted_count =... | 30.448598 | 126 | 0.736648 |
e0d6966f0f4824c8705c24412698017423279002 | 2,193 | py | Python | scrapy_template/scrapy_template/pipelines.py | kk0501/spider | 404540a76922885f9dd12f9a513f5ec88b0d2072 | [
"MIT"
] | null | null | null | scrapy_template/scrapy_template/pipelines.py | kk0501/spider | 404540a76922885f9dd12f9a513f5ec88b0d2072 | [
"MIT"
] | null | null | null | scrapy_template/scrapy_template/pipelines.py | kk0501/spider | 404540a76922885f9dd12f9a513f5ec88b0d2072 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html
from scrapy.exceptions import DropItem
from hashlib import md5
from scrapy import log
from twisted.enterprise import adbapi
fro... | 34.265625 | 85 | 0.579115 |
e0d7c84ced6a300c631d0fec1f9dd425ca8e581c | 2,726 | py | Python | run_training_size_bootstrap.py | willferreira/multilabel-stance-detection | ddc0ed9caa26b63f40e89a377f1738e83fcb7724 | [
"MIT"
] | null | null | null | run_training_size_bootstrap.py | willferreira/multilabel-stance-detection | ddc0ed9caa26b63f40e89a377f1738e83fcb7724 | [
"MIT"
] | null | null | null | run_training_size_bootstrap.py | willferreira/multilabel-stance-detection | ddc0ed9caa26b63f40e89a377f1738e83fcb7724 | [
"MIT"
] | null | null | null | import click
import pickle
import numpy as np
from collections import defaultdict
from utils import reset_seeds, get_dataset, load_embeddings
from mlp_multilabel_wrapper import PowersetKerasWrapper, MultiOutputKerasWrapper
from mlp_utils import CrossLabelDependencyLoss
if __name__ == '__main__':
run()
| 41.938462 | 104 | 0.705796 |
e0d8a4edfd7425e0db4ca0bd8268ff4b94c0916a | 1,268 | py | Python | code/evaluate.py | Shuailong/CCGSupertagging | 891a6a477a4a05daeb847d4a4c33a1bc929d97b2 | [
"MIT"
] | 3 | 2018-11-09T04:33:12.000Z | 2021-06-04T04:23:07.000Z | code/evaluate.py | Shuailong/CCGSupertagging | 891a6a477a4a05daeb847d4a4c33a1bc929d97b2 | [
"MIT"
] | 2 | 2017-03-13T02:56:09.000Z | 2019-07-27T02:47:29.000Z | code/evaluate.py | Shuailong/CCGSupertagging | 891a6a477a4a05daeb847d4a4c33a1bc929d97b2 | [
"MIT"
] | 1 | 2020-11-25T06:09:33.000Z | 2020-11-25T06:09:33.000Z | #!/usr/bin/env python
# encoding: utf-8
"""
evaluate.py
Created by Shuailong on 2016-12-2.
Evaluate model accuracy on test set.
"""
from __future__ import print_function
from time import time
from keras.models import load_model
import os
from utils import true_accuracy
from dataset import get_data
from train imp... | 25.877551 | 108 | 0.645899 |
e0d9891ebc981dc1dd6b1f55b9d60d1a276b4e1d | 1,283 | py | Python | setup.py | Cloudlock/bravado | bacf49ea9d791ec9f564a3a141c77995d2f395b0 | [
"BSD-3-Clause"
] | null | null | null | setup.py | Cloudlock/bravado | bacf49ea9d791ec9f564a3a141c77995d2f395b0 | [
"BSD-3-Clause"
] | 2 | 2016-12-14T07:33:33.000Z | 2017-05-11T13:40:48.000Z | setup.py | Cloudlock/bravado | bacf49ea9d791ec9f564a3a141c77995d2f395b0 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2013, Digium, Inc.
# Copyright (c) 2014-2016, Yelp, Inc.
import os
from setuptools import setup
import bravado
setup(
name="bravado",
# cloudlock version, no twisted dependency
version=bravado.version + "cl",
license="BSD 3-Clause License",
description="Lib... | 29.159091 | 71 | 0.59392 |
e0d98d3fbe99c6483d07cbca24e2f2d19d6ccfe4 | 4,691 | py | Python | solum/api/controllers/v1/assembly.py | devdattakulkarni/test-solum | 4e9ddb82d217116aa2c30a6f2581080cbdfae325 | [
"Apache-2.0"
] | null | null | null | solum/api/controllers/v1/assembly.py | devdattakulkarni/test-solum | 4e9ddb82d217116aa2c30a6f2581080cbdfae325 | [
"Apache-2.0"
] | null | null | null | solum/api/controllers/v1/assembly.py | devdattakulkarni/test-solum | 4e9ddb82d217116aa2c30a6f2581080cbdfae325 | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 - Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | 39.420168 | 77 | 0.675336 |
e0daa9911332d847f463b64cda5a0ec1b5c5fe82 | 562 | py | Python | server/website/website/migrations/0003_background_task_optimization.py | mjain2/ottertune | 011e896bf89df831fb1189b1ab4c9a7d7dca420a | [
"Apache-2.0"
] | 1 | 2019-08-16T19:35:35.000Z | 2019-08-16T19:35:35.000Z | server/website/website/migrations/0003_background_task_optimization.py | mjain2/ottertune | 011e896bf89df831fb1189b1ab4c9a7d7dca420a | [
"Apache-2.0"
] | null | null | null | server/website/website/migrations/0003_background_task_optimization.py | mjain2/ottertune | 011e896bf89df831fb1189b1ab4c9a7d7dca420a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2018-08-02 07:58
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
| 25.545455 | 129 | 0.631673 |
e0dbf6e6b17f8d31b9acfaa5334ab33b086914a3 | 1,379 | py | Python | src/agility/usc/settings.py | bobbyluig/6.A01 | 16dd8963951eca4a1312a15c216d0cc3c117d063 | [
"MIT"
] | null | null | null | src/agility/usc/settings.py | bobbyluig/6.A01 | 16dd8963951eca4a1312a15c216d0cc3c117d063 | [
"MIT"
] | null | null | null | src/agility/usc/settings.py | bobbyluig/6.A01 | 16dd8963951eca4a1312a15c216d0cc3c117d063 | [
"MIT"
] | 1 | 2021-02-24T07:13:01.000Z | 2021-02-24T07:13:01.000Z | from agility.usc.enumeration import uscSerialMode, ChannelMode, HomeMode
from agility.usc.reader import BytecodeReader
| 29.340426 | 73 | 0.636693 |
e0dd99fc8816a494d26cd7231afd96fb99ec03d8 | 476 | py | Python | invmonInfra/domain/__init__.py | jtom38/invmon-api | 28f163bef47ee5c95bac0f40198e25e44090758f | [
"MIT"
] | null | null | null | invmonInfra/domain/__init__.py | jtom38/invmon-api | 28f163bef47ee5c95bac0f40198e25e44090758f | [
"MIT"
] | 16 | 2021-12-09T06:22:29.000Z | 2022-03-25T06:26:01.000Z | invmonInfra/domain/__init__.py | jtom38/invmon-api | 28f163bef47ee5c95bac0f40198e25e44090758f | [
"MIT"
] | null | null | null | from .dbApiInterface import DbApiTableInterface
from .dbApiTableInterface import DbApiTableInterface
from .cacheInterface import CacheInterface
from .loggerInterface import LoggerInterface
from .envReaderInterface import EnvReaderInterface
from .driverInterface import DriverInterface
from .jobsInterface import JobsInte... | 47.6 | 58 | 0.897059 |
e0e0334b9f18fc8e44cf7c368bc6aba17a751a2d | 1,123 | py | Python | app/app8_18mix/h_noSeqSearch.py | ameenetemady/DeepPep | 121826309667f1290fa1121746a2992943d0927b | [
"Apache-2.0"
] | 1 | 2020-05-30T06:01:50.000Z | 2020-05-30T06:01:50.000Z | app/app8_18mix/h_noSeqSearch.py | ameenetemady/DeepPep | 121826309667f1290fa1121746a2992943d0927b | [
"Apache-2.0"
] | null | null | null | app/app8_18mix/h_noSeqSearch.py | ameenetemady/DeepPep | 121826309667f1290fa1121746a2992943d0927b | [
"Apache-2.0"
] | 1 | 2019-10-20T21:11:48.000Z | 2019-10-20T21:11:48.000Z | import sys
import csv
import os
sys.path.append('../../')
import h_lib
import h_lib_noSeqSearch
in_strFastaFilename = '{!s}/data/protein/18mix/18mix_db_plus_contaminants_20081209.fasta'.format(os.environ.get('HOME'))
in_strPeptideFilename = '{!s}/data/protein/18mix/18_mixtures_peptide_identification.txt'.format(os.en... | 38.724138 | 120 | 0.782725 |
e0e04165ecde0d603bc47e0b5c5deaa17a56ab3a | 700 | py | Python | normalizer.py | ashokn414/python_floating_conversions | 7a132c703272e6651daf555816171f04ee5b5555 | [
"Apache-2.0"
] | null | null | null | normalizer.py | ashokn414/python_floating_conversions | 7a132c703272e6651daf555816171f04ee5b5555 | [
"Apache-2.0"
] | null | null | null | normalizer.py | ashokn414/python_floating_conversions | 7a132c703272e6651daf555816171f04ee5b5555 | [
"Apache-2.0"
] | null | null | null | # for normalization we need to have the maxima of x and y values with the help of which
# we can normalise the given values
import csv
filename = "values.csv"
fields = []
rows = []
with open(filename,'r') as csvfile:
reader = csv.reader(csvfile)
fields = next(reader)
for row in reader:
... | 26.923077 | 89 | 0.615714 |
e0e23eae8f30892f74e1745a5cf500f5f0c7d685 | 3,477 | py | Python | pygdp/fwgs.py | jiwalker-usgs/pyGDP | dca4789fb0c53c889d6fa1b38ec867bc939a2d04 | [
"CC0-1.0"
] | null | null | null | pygdp/fwgs.py | jiwalker-usgs/pyGDP | dca4789fb0c53c889d6fa1b38ec867bc939a2d04 | [
"CC0-1.0"
] | null | null | null | pygdp/fwgs.py | jiwalker-usgs/pyGDP | dca4789fb0c53c889d6fa1b38ec867bc939a2d04 | [
"CC0-1.0"
] | null | null | null | from pygdp import _execute_request
from pygdp import _get_geotype
from owslib.util import log
def submitFeatureWeightedGridStatistics(geoType, dataSetURI, varID, startTime, endTime, attribute, value, gmlIDs,
verbose, coverage, delim, stat, grpby, timeStep, summAttr, weighted, WF... | 39.965517 | 157 | 0.595628 |
e0e302f950371ae0056fe68d4bc413f86d8a3bb5 | 1,180 | py | Python | tests/pure-req.py | rbanffy/bjoern | b177b62aa626cee97972a2e73f8543e6d86b5eb7 | [
"BSD-2-Clause"
] | 2,326 | 2015-01-05T21:20:29.000Z | 2022-03-31T15:42:24.000Z | tests/pure-req.py | rbanffy/bjoern | b177b62aa626cee97972a2e73f8543e6d86b5eb7 | [
"BSD-2-Clause"
] | 127 | 2015-04-09T03:33:17.000Z | 2022-03-11T13:43:55.000Z | tests/pure-req.py | rbanffy/bjoern | b177b62aa626cee97972a2e73f8543e6d86b5eb7 | [
"BSD-2-Clause"
] | 190 | 2015-01-20T10:54:38.000Z | 2022-02-23T05:45:45.000Z | import sys
import socket
conn = socket.create_connection(('0.0.0.0', 8080))
msgs = [
# 0 Keep-Alive, Transfer-Encoding chunked
'GET / HTTP/1.1\r\nConnection: Keep-Alive\r\n\r\n',
# 1,2,3 Close, EOF "encoding"
'GET / HTTP/1.1\r\n\r\n',
'GET / HTTP/1.1\r\nConnection: close\r\n\r\n',
'GET / HTTP/... | 28.780488 | 70 | 0.580508 |
e0e356f37fd9ccf2de0310d2d8f77f903645f43e | 324 | py | Python | apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/stock/models/web_planner.py | gtfarng/Odoo_migrade | 9cc28fae4c379e407645248a29d22139925eafe7 | [
"Apache-2.0"
] | 1 | 2019-12-19T01:53:13.000Z | 2019-12-19T01:53:13.000Z | apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/stock/models/web_planner.py | gtfarng/Odoo_migrade | 9cc28fae4c379e407645248a29d22139925eafe7 | [
"Apache-2.0"
] | null | null | null | apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/stock/models/web_planner.py | gtfarng/Odoo_migrade | 9cc28fae4c379e407645248a29d22139925eafe7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from odoo import models
| 24.923077 | 74 | 0.697531 |
e0e3e3c9acda1bb91d2a503dbb2cdcf350023dcd | 45,861 | py | Python | wizbot.py | Wizard-Of-Chaos/WizardBot | 75a2e482c7d7921e9a06dde4d210c68330c6fbe2 | [
"MIT"
] | null | null | null | wizbot.py | Wizard-Of-Chaos/WizardBot | 75a2e482c7d7921e9a06dde4d210c68330c6fbe2 | [
"MIT"
] | null | null | null | wizbot.py | Wizard-Of-Chaos/WizardBot | 75a2e482c7d7921e9a06dde4d210c68330c6fbe2 | [
"MIT"
] | null | null | null | #WIZARD BOT IS LIVE
import calendar
import discord as dc
from discord.ext.commands import Bot
from discord.ext import commands
from functools import partial
import asyncio as aio
import time
from random import randint
from datetime import datetime
from discord.ext import commands
from guildconfig import GuildConfig
f... | 48.788298 | 151 | 0.536556 |
e0e4e551502750847910375c9545b7c251613085 | 2,775 | py | Python | ProyectoDAI/settings.py | javiergarridomellado/proyectodai | 64944d10f543c3094630056906b5f101a73bdd7b | [
"Apache-2.0"
] | 1 | 2019-08-21T17:21:13.000Z | 2019-08-21T17:21:13.000Z | ProyectoDAI/settings.py | javiergarridomellado/proyectodai | 64944d10f543c3094630056906b5f101a73bdd7b | [
"Apache-2.0"
] | null | null | null | ProyectoDAI/settings.py | javiergarridomellado/proyectodai | 64944d10f543c3094630056906b5f101a73bdd7b | [
"Apache-2.0"
] | null | null | null | """
Django settings for TusPachangas project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
import django
import dj_database_url
# Build paths inside the project li... | 25.458716 | 131 | 0.735856 |
e0e5f077be0c9058daed1ddc7c50b58ba470d16a | 1,169 | py | Python | Plugins/UnrealEnginePython/Binaries/Win64/Lib/site-packages/tensorflow/python/eager/test.py | JustinACoder/H22-GR3-UnrealAI | 361eb9ef1147f8a2991e5f98c4118cd823184adf | [
"MIT"
] | 6 | 2022-02-04T18:12:24.000Z | 2022-03-21T23:57:12.000Z | Lib/site-packages/tensorflow/python/eager/test.py | shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings | 1fa4cd6a566c8745f455fc3d2273208f21f88ced | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/tensorflow/python/eager/test.py | shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings | 1fa4cd6a566c8745f455fc3d2273208f21f88ced | [
"bzip2-1.0.6"
] | 1 | 2022-02-08T03:53:23.000Z | 2022-02-08T03:53:23.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | 38.966667 | 81 | 0.707442 |
e0e63ae87cd65917f81764b65113935c80fb3646 | 1,150 | py | Python | util.py | monokim/CheesyBullets | eeb5a79a69936701ff7962b846e6310f7df91cb0 | [
"BSD-3-Clause"
] | 1 | 2021-09-28T01:02:31.000Z | 2021-09-28T01:02:31.000Z | util.py | monokim/CheesyBullets | eeb5a79a69936701ff7962b846e6310f7df91cb0 | [
"BSD-3-Clause"
] | null | null | null | util.py | monokim/CheesyBullets | eeb5a79a69936701ff7962b846e6310f7df91cb0 | [
"BSD-3-Clause"
] | 1 | 2021-09-28T01:02:32.000Z | 2021-09-28T01:02:32.000Z | import time
import pyautogui
import win32gui
| 26.744186 | 74 | 0.508696 |
e0e6d5767d002512b6411fc77a77af2956e16766 | 19,876 | py | Python | graph-to-graph/elf_correlate.py | mbrcknl/graph-refine | 78c74f18127db53606f18f775a5a50de86bc6b97 | [
"BSD-2-Clause",
"MIT"
] | 6 | 2017-03-17T17:57:48.000Z | 2019-12-28T13:03:23.000Z | graph-to-graph/elf_correlate.py | myuluo/graph-refine | 8924af0c61c3c863db7957e0ebac7ae1ceefad9d | [
"BSD-2-Clause",
"MIT"
] | 3 | 2020-04-07T09:15:55.000Z | 2022-03-23T01:36:26.000Z | graph-to-graph/elf_correlate.py | myuluo/graph-refine | 8924af0c61c3c863db7957e0ebac7ae1ceefad9d | [
"BSD-2-Clause",
"MIT"
] | 7 | 2020-04-16T00:32:41.000Z | 2022-03-09T05:25:23.000Z | #
# Copyright 2020, Data61, CSIRO (ABN 41 687 119 230)
#
# SPDX-License-Identifier: BSD-2-Clause
#
import re
import graph_refine.syntax as syntax
import graph_refine.problem as problem
import graph_refine.stack_logic as stack_logic
from graph_refine.syntax import true_term, false_term, mk_not
from graph_refine.check i... | 33.574324 | 132 | 0.550513 |
e0e7c60f7d5d1f6c613e5dbae742091e0b76d703 | 2,301 | py | Python | Gelatin/parser/Parser.py | Etherbay/Gelatin | d2afa85a48034d6ee34580e49e16542f31ad208e | [
"MIT"
] | 107 | 2015-01-26T21:37:57.000Z | 2022-02-25T16:28:44.000Z | Gelatin/parser/Parser.py | Etherbay/Gelatin | d2afa85a48034d6ee34580e49e16542f31ad208e | [
"MIT"
] | 20 | 2015-11-23T14:09:37.000Z | 2021-02-11T17:57:24.000Z | Gelatin/parser/Parser.py | Etherbay/Gelatin | d2afa85a48034d6ee34580e49e16542f31ad208e | [
"MIT"
] | 34 | 2015-01-05T18:47:34.000Z | 2020-12-13T06:47:26.000Z | # Copyright (c) 2010-2017 Samuel Abels
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, d... | 40.368421 | 80 | 0.704911 |
e0e93ce753097ffb23fb7c437281488fb715e819 | 308 | py | Python | C03-Unit-Testing/21-C03V15/utils.py | dirchev/Python-101-Forever-1 | 13c3bb182747aae244ae6f9fd6f79c8223f3e9a6 | [
"MIT"
] | 59 | 2021-02-05T10:40:08.000Z | 2022-01-26T08:30:43.000Z | C03-Unit-Testing/21-C03V15/utils.py | dirchev/Python-101-Forever-1 | 13c3bb182747aae244ae6f9fd6f79c8223f3e9a6 | [
"MIT"
] | null | null | null | C03-Unit-Testing/21-C03V15/utils.py | dirchev/Python-101-Forever-1 | 13c3bb182747aae244ae6f9fd6f79c8223f3e9a6 | [
"MIT"
] | 10 | 2021-02-13T16:50:26.000Z | 2022-03-20T12:17:00.000Z | BIG_CONSTANT = "YES"
print(group_by([1, 2, 3, 4, 5, 6], lambda x: "even" if x % 2 == 0 else "odd"))
| 16.210526 | 78 | 0.529221 |
e0eb718b5df49f7654c2a9064eafc5186c980c9e | 3,721 | py | Python | pipeline/test_sftp_to_s3.py | streamsets/datacollector-tests-external | 6f255b5e7496deeef333b57a5e9df4911ba3ef00 | [
"Apache-2.0"
] | 1 | 2020-04-14T03:01:51.000Z | 2020-04-14T03:01:51.000Z | pipeline/test_sftp_to_s3.py | streamsets/datacollector-tests-external | 6f255b5e7496deeef333b57a5e9df4911ba3ef00 | [
"Apache-2.0"
] | null | null | null | pipeline/test_sftp_to_s3.py | streamsets/datacollector-tests-external | 6f255b5e7496deeef333b57a5e9df4911ba3ef00 | [
"Apache-2.0"
] | 1 | 2019-09-14T08:30:23.000Z | 2019-09-14T08:30:23.000Z | # Copyright 2019 StreamSets Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 42.770115 | 133 | 0.742274 |
e0ed1ce1a37b62c8113cea099de0a407123519d8 | 950 | py | Python | terra/tests/__init__.py | NoahRJohnson/terra | 131954ee42fb5905ceff35101e34d89c5eb6de6c | [
"MIT"
] | null | null | null | terra/tests/__init__.py | NoahRJohnson/terra | 131954ee42fb5905ceff35101e34d89c5eb6de6c | [
"MIT"
] | null | null | null | terra/tests/__init__.py | NoahRJohnson/terra | 131954ee42fb5905ceff35101e34d89c5eb6de6c | [
"MIT"
] | null | null | null | import os
# Use this as a package level setup
| 38 | 77 | 0.749474 |
e0edc031d7ad458b3382ce23bb1ea18d6941bcf3 | 392 | py | Python | icons/svg2png.py | benburrill/formiko | 86630506c537f9517666d9b0d5b2a905e7385b01 | [
"BSD-3-Clause"
] | 116 | 2016-07-13T00:35:35.000Z | 2022-02-22T15:46:44.000Z | icons/svg2png.py | benburrill/formiko | 86630506c537f9517666d9b0d5b2a905e7385b01 | [
"BSD-3-Clause"
] | 32 | 2018-01-23T13:50:27.000Z | 2022-03-30T05:34:56.000Z | icons/svg2png.py | benburrill/formiko | 86630506c537f9517666d9b0d5b2a905e7385b01 | [
"BSD-3-Clause"
] | 8 | 2018-12-21T13:45:36.000Z | 2021-11-07T22:40:05.000Z | # -*- coding: utf-8 -*-
from gi.repository.GdkPixbuf import Pixbuf
from os import makedirs
if __name__ == "__main__":
main()
| 24.5 | 77 | 0.591837 |
e0eeafb1dffc9fb35d396d75f5c0ceb8be5469f6 | 545 | py | Python | django/currencies/migrations/0003_auto_20211121_0701.py | AngelOnFira/megagame-controller | 033fec84babf80ffd0868a0f7d946ac4c18b061c | [
"MIT"
] | null | null | null | django/currencies/migrations/0003_auto_20211121_0701.py | AngelOnFira/megagame-controller | 033fec84babf80ffd0868a0f7d946ac4c18b061c | [
"MIT"
] | 1 | 2022-03-03T21:56:12.000Z | 2022-03-03T21:56:12.000Z | django/currencies/migrations/0003_auto_20211121_0701.py | AngelOnFira/megagame-controller | 033fec84babf80ffd0868a0f7d946ac4c18b061c | [
"MIT"
] | null | null | null | # Generated by Django 3.2.8 on 2021-11-21 12:01
from django.db import migrations, models
| 22.708333 | 53 | 0.577982 |
e0ef4cd1fe213247f6cb053cb5a43dff995c8928 | 5,778 | py | Python | etna/transforms/decomposition/trend.py | tinkoff-ai/etna-ts | ded5161ed49f5c2697778825f899842ee30c6c61 | [
"Apache-2.0"
] | 96 | 2021-09-05T06:29:34.000Z | 2021-11-07T15:22:54.000Z | etna/transforms/decomposition/trend.py | geopars/etna | ded5161ed49f5c2697778825f899842ee30c6c61 | [
"Apache-2.0"
] | 188 | 2021-09-06T15:59:58.000Z | 2021-11-17T09:34:16.000Z | etna/transforms/decomposition/trend.py | geopars/etna | ded5161ed49f5c2697778825f899842ee30c6c61 | [
"Apache-2.0"
] | 8 | 2021-09-06T09:18:35.000Z | 2021-11-11T21:18:39.000Z | from typing import Optional
import pandas as pd
from ruptures import Binseg
from ruptures.base import BaseCost
from sklearn.linear_model import LinearRegression
from etna.transforms.base import PerSegmentWrapper
from etna.transforms.decomposition.change_points_trend import BaseEstimator
from etna.transforms.decomposi... | 31.232432 | 122 | 0.606265 |
e0f004be552defdc3e85fe514fc0037369c084b9 | 4,027 | py | Python | argopy/tests/test_fetchers_facade_index.py | schwehr/argopy | 1b35d5cfb87b2f9ccd2ca45b9987a614edd30700 | [
"Apache-2.0"
] | null | null | null | argopy/tests/test_fetchers_facade_index.py | schwehr/argopy | 1b35d5cfb87b2f9ccd2ca45b9987a614edd30700 | [
"Apache-2.0"
] | null | null | null | argopy/tests/test_fetchers_facade_index.py | schwehr/argopy | 1b35d5cfb87b2f9ccd2ca45b9987a614edd30700 | [
"Apache-2.0"
] | null | null | null | import xarray as xr
import pytest
import warnings
import argopy
from argopy import IndexFetcher as ArgoIndexFetcher
from argopy.errors import InvalidFetcherAccessPoint, InvalidFetcher, ErddapServerError, DataNotFound
from . import (
AVAILABLE_INDEX_SOURCES,
requires_fetcher_index,
requires_connected_erddap... | 35.955357 | 100 | 0.674696 |
e0f00c9b59cb978159364c5072c66c216bf67f98 | 968 | py | Python | custom_components/acthor/config_flow.py | jatty/hass-acthor | 9d5aaed3f01e9288fef031b47b0808e6e80c22d3 | [
"MIT"
] | null | null | null | custom_components/acthor/config_flow.py | jatty/hass-acthor | 9d5aaed3f01e9288fef031b47b0808e6e80c22d3 | [
"MIT"
] | null | null | null | custom_components/acthor/config_flow.py | jatty/hass-acthor | 9d5aaed3f01e9288fef031b47b0808e6e80c22d3 | [
"MIT"
] | null | null | null | import voluptuous as vol
from homeassistant.config_entries import ConfigFlow
from homeassistant.const import CONF_HOST, CONF_NAME
from .acthor import test_connection
from .const import DEVICE_NAME, DOMAIN
| 32.266667 | 72 | 0.597107 |
e0f0a9e1fa344475b21cf62a27dc93bb2296049d | 356 | py | Python | doajtest/fixtures/common.py | glauberm/doaj | dc24dfcbf4a9f02ce5c9b09b611a5766ea5742f7 | [
"Apache-2.0"
] | null | null | null | doajtest/fixtures/common.py | glauberm/doaj | dc24dfcbf4a9f02ce5c9b09b611a5766ea5742f7 | [
"Apache-2.0"
] | null | null | null | doajtest/fixtures/common.py | glauberm/doaj | dc24dfcbf4a9f02ce5c9b09b611a5766ea5742f7 | [
"Apache-2.0"
] | null | null | null | NOTES = {
'notes': [
{'date': '2014-05-22T00:00:00Z', 'note': 'Second Note'},
{'date': '2014-05-21T14:02:45Z', 'note': 'First Note'}
]
}
SUBJECT = {
"subject": ['HB1-3840', 'H']
}
OWNER = {
"owner": "Owner"
}
EDITORIAL = {
"editor_group": "editorgroup",
"editor": "associate"
}... | 14.833333 | 64 | 0.5 |
e0f1a06f3be393877c548f9dcd340350faeb7ed3 | 46,397 | py | Python | docnado/docnado.py | HEInventions/docnado | 8817d8a9856b4babd9a2f81678a9ef0b8a75d4bc | [
"MIT"
] | 78 | 2018-10-09T16:28:26.000Z | 2022-02-24T15:25:26.000Z | docnado/docnado.py | HEInventions/docnado | 8817d8a9856b4babd9a2f81678a9ef0b8a75d4bc | [
"MIT"
] | 27 | 2018-11-01T16:30:50.000Z | 2022-02-22T14:36:11.000Z | docnado/docnado.py | HEInventions/docnado | 8817d8a9856b4babd9a2f81678a9ef0b8a75d4bc | [
"MIT"
] | 9 | 2018-11-06T18:50:51.000Z | 2020-10-24T00:56:16.000Z | """ docnado.py
A rapid documentation tool that will blow you away.
"""
import os
import re
import sys
import csv
import glob
import time
import signal
import shutil
import urllib
import base64
import hashlib
import argparse
import tempfile
import datetime
import threading
import traceback
import subprocess
import pl... | 37.782573 | 128 | 0.613078 |
e0f3298883d9924a9725a46789f9e295ab60fc80 | 15,155 | py | Python | server/src/oscarbluelight/tests/offer/test_benefit_percentage.py | MaximBrewer/sebe | 4b94b2c782d018b6fa3a130fa30173386cc9bfdd | [
"0BSD"
] | 8 | 2016-06-18T01:40:26.000Z | 2021-02-08T04:08:58.000Z | server/src/oscarbluelight/tests/offer/test_benefit_percentage.py | MaximBrewer/sebe | 4b94b2c782d018b6fa3a130fa30173386cc9bfdd | [
"0BSD"
] | 16 | 2018-05-04T13:00:07.000Z | 2021-05-27T14:54:09.000Z | server/src/oscarbluelight/tests/offer/test_benefit_percentage.py | MaximBrewer/sebe | 4b94b2c782d018b6fa3a130fa30173386cc9bfdd | [
"0BSD"
] | 3 | 2016-12-19T11:30:47.000Z | 2019-10-27T20:30:15.000Z | from decimal import Decimal as D
from django.core import exceptions
from django.test import TestCase
from oscar.test import factories
from oscar.test.basket import add_product, add_products
from django_redis import get_redis_connection
from oscarbluelight.offer.models import (
Range,
Benefit,
BluelightCount... | 45.374251 | 91 | 0.692577 |
e0f5092962647fb17fad330ad7ca8a057c8cedba | 435 | py | Python | CLCC/ex8.py | adstr123/LPTHW | 1a331ef173ffd6122b5c5ed13d8fdcc73ab7ce66 | [
"Zed"
] | null | null | null | CLCC/ex8.py | adstr123/LPTHW | 1a331ef173ffd6122b5c5ed13d8fdcc73ab7ce66 | [
"Zed"
] | null | null | null | CLCC/ex8.py | adstr123/LPTHW | 1a331ef173ffd6122b5c5ed13d8fdcc73ab7ce66 | [
"Zed"
] | null | null | null | # Moving around directories with pushd & popd
# You can save directries to go back to later. These can be built up in a stack.
#pushd i/like/icecream
# current stack: ~temp/i/like/icecream
#pushd i/like
# current stack: ~temp/i/like ~temp/i/like/icecream
#popd
# PS ~temp/i/like
#popd
# PS ~temp/i/like/icecre... | 33.461538 | 109 | 0.728736 |
e0f7703f7d61c2e287ab471ebd07742e1540f442 | 15,577 | py | Python | mkt/search/tests/test_filters.py | clouserw/zamboni | c4a568b69c1613f27da41d46328b2975cbdc1c07 | [
"BSD-3-Clause"
] | null | null | null | mkt/search/tests/test_filters.py | clouserw/zamboni | c4a568b69c1613f27da41d46328b2975cbdc1c07 | [
"BSD-3-Clause"
] | null | null | null | mkt/search/tests/test_filters.py | clouserw/zamboni | c4a568b69c1613f27da41d46328b2975cbdc1c07 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import json
from nose.tools import eq_, ok_
from rest_framework.exceptions import ParseError
from django.contrib.auth.models import AnonymousUser
from django.test.client import RequestFactory
from django.test.utils import override_settings
import mkt
from mkt.constants.applications import DEV... | 39.737245 | 79 | 0.560506 |
e0f788d3a6de0a5319ec594f010d2fc7e6bb3c93 | 3,206 | py | Python | third_party/logging.py | sweeneyb/iot-core-micropython | 7fc341902fbf8fa587f0dc3aa10c0803a5e0d6a5 | [
"Apache-2.0"
] | 50 | 2019-06-12T22:30:43.000Z | 2022-02-22T18:30:26.000Z | third_party/logging.py | cashoefman/Resto-Score-for-Hack-2021-for-Positivity | cb3227c8db4b1be0e46cfe4b8d3973c1af4fe49b | [
"Apache-2.0"
] | 12 | 2019-07-05T09:39:45.000Z | 2022-03-12T05:45:01.000Z | third_party/logging.py | cashoefman/Resto-Score-for-Hack-2021-for-Positivity | cb3227c8db4b1be0e46cfe4b8d3973c1af4fe49b | [
"Apache-2.0"
] | 16 | 2019-06-13T09:12:24.000Z | 2022-03-12T05:47:22.000Z | # MIT License
#
# Copyright (c) 2019 Johan Brichau
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, mer... | 27.637931 | 80 | 0.647224 |
e0f88df1e0c707f34a922f07d69b31d76bda43ee | 536 | py | Python | assessments/migrations/0003_auto_20210212_1943.py | acounsel/django_msat | 86a54e43429001cb6433e28b294d6b8a94b97e6e | [
"MIT"
] | null | null | null | assessments/migrations/0003_auto_20210212_1943.py | acounsel/django_msat | 86a54e43429001cb6433e28b294d6b8a94b97e6e | [
"MIT"
] | null | null | null | assessments/migrations/0003_auto_20210212_1943.py | acounsel/django_msat | 86a54e43429001cb6433e28b294d6b8a94b97e6e | [
"MIT"
] | null | null | null | # Generated by Django 3.1.6 on 2021-02-12 19:43
from django.db import migrations, models
| 28.210526 | 195 | 0.600746 |
e0f8b6be8671efa3ab8fb691c490862ecc07081d | 668 | py | Python | noxfile.py | sethmlarson/workplace-search-python | 0680ce7144fc0608d3d8c336315ffaf7ddc3ca2d | [
"Apache-2.0"
] | 5 | 2020-03-05T16:37:35.000Z | 2021-02-26T03:44:09.000Z | noxfile.py | sethmlarson/workplace-search-python | 0680ce7144fc0608d3d8c336315ffaf7ddc3ca2d | [
"Apache-2.0"
] | 1 | 2019-01-08T20:10:16.000Z | 2019-01-08T20:10:16.000Z | noxfile.py | sethmlarson/workplace-search-python | 0680ce7144fc0608d3d8c336315ffaf7ddc3ca2d | [
"Apache-2.0"
] | 1 | 2020-04-22T18:20:26.000Z | 2020-04-22T18:20:26.000Z | import nox
SOURCE_FILES = (
"setup.py",
"noxfile.py",
"elastic_workplace_search/",
"tests/",
)
| 20.242424 | 82 | 0.609281 |
e0f8ef5b2d2b11ceb48d819c7022ba608e70f8fd | 17,241 | py | Python | komodo2_rl/src/environments/Spawner.py | osheraz/komodo | d53759100ced7439dd501620f955f347087e4f63 | [
"MIT"
] | 5 | 2020-08-11T08:47:25.000Z | 2022-02-15T06:19:18.000Z | komodo2_rl/src/environments/Spawner.py | osheraz/komodo | d53759100ced7439dd501620f955f347087e4f63 | [
"MIT"
] | null | null | null | komodo2_rl/src/environments/Spawner.py | osheraz/komodo | d53759100ced7439dd501620f955f347087e4f63 | [
"MIT"
] | 1 | 2021-05-06T14:25:17.000Z | 2021-05-06T14:25:17.000Z | # !/usr/bin/env python
import rospy
import numpy as np
from gazebo_msgs.srv import SpawnModel, SpawnModelRequest, SpawnModelResponse
from copy import deepcopy
from tf.transformations import quaternion_from_euler
sdf_cube = """<?xml version="1.0" ?>
<sdf version="1.4">
<model name="MODELNAME">
<static>0</static... | 33.283784 | 108 | 0.463198 |
e0f9e97bf2ab57eb94b8a3dc17de1f26affd17b5 | 121 | py | Python | output/models/ms_data/regex/re_l32_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 1 | 2021-08-14T17:59:21.000Z | 2021-08-14T17:59:21.000Z | output/models/ms_data/regex/re_l32_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 4 | 2020-02-12T21:30:44.000Z | 2020-04-15T20:06:46.000Z | output/models/ms_data/regex/re_l32_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | null | null | null | from output.models.ms_data.regex.re_l32_xsd.re_l32 import (
Regex,
Doc,
)
__all__ = [
"Regex",
"Doc",
]
| 12.1 | 59 | 0.603306 |
e0f9f1296b023c0d6516cc11729dc5f2eb6ecdd7 | 4,291 | py | Python | sdk/python/tests/dsl/metadata_tests.py | ConverJens/pipelines | a1d453af214ec9eebad73fb05845dd3499d60d00 | [
"Apache-2.0"
] | 6 | 2020-05-19T02:35:11.000Z | 2020-05-29T17:58:42.000Z | sdk/python/tests/dsl/metadata_tests.py | ConverJens/pipelines | a1d453af214ec9eebad73fb05845dd3499d60d00 | [
"Apache-2.0"
] | 1,932 | 2021-01-25T11:23:37.000Z | 2022-03-31T17:10:18.000Z | sdk/python/tests/dsl/metadata_tests.py | ConverJens/pipelines | a1d453af214ec9eebad73fb05845dd3499d60d00 | [
"Apache-2.0"
] | 11 | 2020-05-19T22:26:41.000Z | 2021-01-25T09:56:21.000Z | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 42.91 | 88 | 0.316476 |
e0fb958c05e67ba3756a0924303bc1ac81028564 | 644 | py | Python | challenges/python-solutions/day-25.py | elifloresch/thirty-days-challenge | d3d41f5ce8cc4155ebf9cf52c1ece43c15a1e2af | [
"MIT"
] | null | null | null | challenges/python-solutions/day-25.py | elifloresch/thirty-days-challenge | d3d41f5ce8cc4155ebf9cf52c1ece43c15a1e2af | [
"MIT"
] | null | null | null | challenges/python-solutions/day-25.py | elifloresch/thirty-days-challenge | d3d41f5ce8cc4155ebf9cf52c1ece43c15a1e2af | [
"MIT"
] | null | null | null | import math
test_cases = int(input())
numbers = []
for test_case in range(test_cases):
numbers.append(int(input()))
for n in numbers:
if is_prime_number(n):
print('Prime')
else:
print('Not prime')
| 19.515152 | 58 | 0.57764 |
e0fbf814aa561afb0f3e8aefc0b444cab5d08bda | 1,265 | py | Python | examples/path_config.py | rnixx/garden.cefpython | 91d5f69e9983a28ce1971637d7d2f0051c456882 | [
"MIT"
] | 13 | 2017-02-10T12:07:29.000Z | 2021-12-15T02:07:07.000Z | examples/path_config.py | Informatic/garden.cefpython | b7a03d31fd18a32a44ae293d4101b4cf7608795b | [
"MIT"
] | 22 | 2015-02-13T09:58:30.000Z | 2015-06-12T08:55:20.000Z | examples/path_config.py | Informatic/garden.cefpython | b7a03d31fd18a32a44ae293d4101b4cf7608795b | [
"MIT"
] | 12 | 2017-05-03T01:18:31.000Z | 2021-10-01T06:57:41.000Z | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
Minimal example of the CEFBrowser widget use. Here you don't have any controls
(back / forth / reload) or whatsoever. Just a kivy app displaying the
chromium-webview.
In this example we demonstrate how the cache path of CEF can be set.
"""
import os
from kivy.app im... | 34.189189 | 78 | 0.656917 |
e0fc122c2f5c222700dce3588b9faccba2d8800b | 312 | py | Python | simple-systems/and_xor_shift.py | laserbat/random-projects | 925f94f80299df6f16e91975e89f5fff7df20005 | [
"WTFPL"
] | 3 | 2019-04-14T12:29:10.000Z | 2020-02-26T22:27:04.000Z | simple-systems/and_xor_shift.py | laserbat/random-projects | 925f94f80299df6f16e91975e89f5fff7df20005 | [
"WTFPL"
] | null | null | null | simple-systems/and_xor_shift.py | laserbat/random-projects | 925f94f80299df6f16e91975e89f5fff7df20005 | [
"WTFPL"
] | 1 | 2020-06-08T22:12:16.000Z | 2020-06-08T22:12:16.000Z | #!/usr/bin/python3
# If F(a) is any function that can be defined as composition of bitwise XORs, ANDs and left shifts
# Then the dynac system x_(n+1) = F(x_n) is Turing complete
# Proof by simulation (rule110)
a = 1
while a:
print(bin(a))
a = a ^ (a << 1) ^ (a & (a << 1)) ^ (a & (a << 1) & (a << 2))
| 26 | 98 | 0.589744 |
e0fc7fc48d25fb30b40c2e42b598b6eff6d50954 | 5,543 | py | Python | trinity/protocol/common/peer_pool_event_bus.py | Gauddel/trinity | 0b12943ac36f4090abc22fc965e9e9a4f42c6f35 | [
"MIT"
] | null | null | null | trinity/protocol/common/peer_pool_event_bus.py | Gauddel/trinity | 0b12943ac36f4090abc22fc965e9e9a4f42c6f35 | [
"MIT"
] | null | null | null | trinity/protocol/common/peer_pool_event_bus.py | Gauddel/trinity | 0b12943ac36f4090abc22fc965e9e9a4f42c6f35 | [
"MIT"
] | null | null | null | from abc import (
abstractmethod,
)
from typing import (
Any,
Callable,
cast,
FrozenSet,
Generic,
Type,
TypeVar,
)
from cancel_token import (
CancelToken,
)
from p2p.exceptions import (
PeerConnectionLost,
)
from p2p.kademlia import Node
from p2p.peer import (
BasePeer,
... | 33.391566 | 99 | 0.625293 |
e0fe475b8134a31f2b77a708e5769cd268cfc749 | 18,488 | py | Python | tests/e2e/performance/csi_tests/test_pvc_creation_deletion_performance.py | annagitel/ocs-ci | 284fe04aeb6e3d6cb70c99e65fec8ff1b1ea1dd5 | [
"MIT"
] | 1 | 2019-09-17T08:38:05.000Z | 2019-09-17T08:38:05.000Z | tests/e2e/performance/csi_tests/test_pvc_creation_deletion_performance.py | annagitel/ocs-ci | 284fe04aeb6e3d6cb70c99e65fec8ff1b1ea1dd5 | [
"MIT"
] | 1 | 2021-08-30T20:06:00.000Z | 2021-09-30T20:05:46.000Z | tests/e2e/performance/csi_tests/test_pvc_creation_deletion_performance.py | annagitel/ocs-ci | 284fe04aeb6e3d6cb70c99e65fec8ff1b1ea1dd5 | [
"MIT"
] | 2 | 2019-09-17T10:04:14.000Z | 2022-02-07T16:36:49.000Z | """
Test to verify performance of PVC creation and deletion
for RBD, CephFS and RBD-Thick interfaces
"""
import time
import logging
import datetime
import pytest
import ocs_ci.ocs.exceptions as ex
import threading
import statistics
from concurrent.futures import ThreadPoolExecutor
from uuid import uuid4
from ocs_ci.fr... | 38.119588 | 119 | 0.59855 |
e0fe959730942d4fbe3c43eb35ca77c0cc852bbc | 1,233 | py | Python | templates/t/searchresult_withnone.py | MikeBirdsall/food-log | 5edc1fa515d5e2721e96afb7d2b437296903a31d | [
"MIT"
] | null | null | null | templates/t/searchresult_withnone.py | MikeBirdsall/food-log | 5edc1fa515d5e2721e96afb7d2b437296903a31d | [
"MIT"
] | 27 | 2017-07-01T19:20:48.000Z | 2019-03-07T06:04:22.000Z | templates/t/searchresult_withnone.py | MikeBirdsall/food-log | 5edc1fa515d5e2721e96afb7d2b437296903a31d | [
"MIT"
] | null | null | null | #!/usr/bin/python3
from jinja2 import Environment, FileSystemLoader
results = [
dict(
description="Noodles and Company steak Stromboli",
comment="",
size="small",
cals=530,
carbs=50,
fat=25,
protein=27,
score=30),
dict(
description="Stea... | 19.887097 | 58 | 0.544201 |
e0ff8f36b2a500b9d978be307fa6e00f7161603f | 2,146 | py | Python | payments/views.py | aman-roy/pune.pycon.org | f56cc948bd56767110d337c694ecbf5540bdf4b9 | [
"MIT"
] | null | null | null | payments/views.py | aman-roy/pune.pycon.org | f56cc948bd56767110d337c694ecbf5540bdf4b9 | [
"MIT"
] | null | null | null | payments/views.py | aman-roy/pune.pycon.org | f56cc948bd56767110d337c694ecbf5540bdf4b9 | [
"MIT"
] | null | null | null | from django.http import JsonResponse
from django.views.decorators.csrf import csrf_exempt
from payments.models import Invoice, RazorpayKeys
from payments.razorpay.razorpay_payments import RazorpayPayments
from payments.models import Payment, Order
import json
| 40.490566 | 91 | 0.66356 |
e0ff97e8d61ff585dcd9a0102ba24b2e2528bca2 | 6,541 | py | Python | src/convnet/image_classifier.py | danschef/gear-detector | 153d1031778f183ac38edf0532d2f266029c5ea7 | [
"MIT"
] | 1 | 2020-07-15T20:12:55.000Z | 2020-07-15T20:12:55.000Z | src/convnet/image_classifier.py | danschef/gear-detector | 153d1031778f183ac38edf0532d2f266029c5ea7 | [
"MIT"
] | null | null | null | src/convnet/image_classifier.py | danschef/gear-detector | 153d1031778f183ac38edf0532d2f266029c5ea7 | [
"MIT"
] | null | null | null | import configparser
import os
import sys
from time import localtime, strftime, mktime
import torch
import torch.nn as nn
import torch.optim as optim
from torch.autograd import Variable
from net import Net
from geo_helper import store_image_bounds
from image_helper import CLASSES
from image_helper import save_image
f... | 31.599034 | 92 | 0.581257 |
46004af1bf9a4f4788952ff849b76ab958f79e1c | 3,035 | py | Python | src/modules/AlphabetPlotter.py | aaanh/duplicated_accelcamp | 7d4b60ace023bede907f8ed367ba492731a1951d | [
"FTL",
"CNRI-Python",
"RSA-MD"
] | null | null | null | src/modules/AlphabetPlotter.py | aaanh/duplicated_accelcamp | 7d4b60ace023bede907f8ed367ba492731a1951d | [
"FTL",
"CNRI-Python",
"RSA-MD"
] | 2 | 2021-05-21T16:31:41.000Z | 2021-08-25T16:05:48.000Z | src/modules/AlphabetPlotter.py | aaanh/duplicated_accelcamp | 7d4b60ace023bede907f8ed367ba492731a1951d | [
"FTL",
"CNRI-Python",
"RSA-MD"
] | null | null | null | import tkinter as tk
from tkinter import filedialog
import csv
import matplotlib.pyplot as plt
root = tk.Tk(screenName=':0.0')
root.withdraw()
file_path = filedialog.askopenfilename()
lastIndex = len(file_path.split('/')) - 1
v0 = [0, 0, 0]
x0 = [0, 0, 0]
fToA = 1
error = 0.28
errorZ = 3
t = []
time... | 29.182692 | 106 | 0.577595 |
46023337d875860607f4a1fabbf53f963a80b88e | 2,647 | py | Python | users/migrations/0008_profile_fields_optional.py | mitodl/mit-xpro | 981d6c87d963837f0b9ccdd996067fe81394dba4 | [
"BSD-3-Clause"
] | 10 | 2019-02-20T18:41:32.000Z | 2021-07-26T10:39:58.000Z | users/migrations/0008_profile_fields_optional.py | mitodl/mit-xpro | 981d6c87d963837f0b9ccdd996067fe81394dba4 | [
"BSD-3-Clause"
] | 2,226 | 2019-02-20T20:03:57.000Z | 2022-03-31T11:18:56.000Z | users/migrations/0008_profile_fields_optional.py | mitodl/mit-xpro | 981d6c87d963837f0b9ccdd996067fe81394dba4 | [
"BSD-3-Clause"
] | 4 | 2020-08-26T19:26:02.000Z | 2021-03-09T17:46:47.000Z | # Generated by Django 2.2.3 on 2019-07-15 19:24
from django.db import migrations, models
def backpopulate_incomplete_profiles(apps, schema):
"""Backpopulate users who don't have a profile record"""
User = apps.get_model("users", "User")
Profile = apps.get_model("users", "Profile")
for user in User.o... | 32.280488 | 87 | 0.574613 |
4602886d15507fa511fee4f9d72dd974724d982f | 33,743 | py | Python | test/unit_testing/grid/element_linear_dx_data/test_element_linearC/element/geom_element_AD.py | nwukie/ChiDG | d096548ba3bd0a338a29f522fb00a669f0e33e9b | [
"BSD-3-Clause"
] | 36 | 2016-10-05T15:12:22.000Z | 2022-03-17T02:08:23.000Z | test/unit_testing/grid/element_linear_dx_data/test_element_linearC/element/geom_element_AD.py | nwukie/ChiDG | d096548ba3bd0a338a29f522fb00a669f0e33e9b | [
"BSD-3-Clause"
] | 17 | 2016-05-17T02:21:05.000Z | 2017-08-10T16:33:07.000Z | test/unit_testing/grid/element_linear_dx_data/test_element_linearC/element/geom_element_AD.py | nwukie/ChiDG | d096548ba3bd0a338a29f522fb00a669f0e33e9b | [
"BSD-3-Clause"
] | 20 | 2016-07-18T16:20:47.000Z | 2020-11-27T19:26:12.000Z | from __future__ import division
import torch
import torch.autograd as autograd
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import numpy as np
import sys
import os
import time
#
# TORCH INSTALLATION: refer to https://pytorch.org/get-started/locally/
#
cls()
################... | 40.950243 | 159 | 0.564532 |
4602f7f46fb5876b81f698415a8de6581f32551a | 2,827 | py | Python | osr_stat_generator/generator.py | brian-thomas/osr_stat_generator | 89f6a71e17c274befa3af7222a24c34a77f1f40e | [
"MIT"
] | null | null | null | osr_stat_generator/generator.py | brian-thomas/osr_stat_generator | 89f6a71e17c274befa3af7222a24c34a77f1f40e | [
"MIT"
] | null | null | null | osr_stat_generator/generator.py | brian-thomas/osr_stat_generator | 89f6a71e17c274befa3af7222a24c34a77f1f40e | [
"MIT"
] | null | null | null |
"""
OSR (LOTFP) stat generator.
"""
import random
def d(num_sides):
"""
Represents rolling a die of size 'num_sides'.
Returns random number from that size die
"""
return random.randint(1, num_sides)
def xdy(num_dice, num_sides):
""" represents rolling num_dice of size num_sides.
Re... | 22.798387 | 81 | 0.562434 |
4604dc5f65cd5f7e83502d4f9fd70d81c2c12903 | 4,178 | py | Python | cohesity_management_sdk/models/health_tile.py | nick6655/management-sdk-python | 88e792cb83e5c24a22af495b220c145d0c45841d | [
"Apache-2.0"
] | 18 | 2019-09-24T17:35:53.000Z | 2022-03-25T08:08:47.000Z | cohesity_management_sdk/models/health_tile.py | nick6655/management-sdk-python | 88e792cb83e5c24a22af495b220c145d0c45841d | [
"Apache-2.0"
] | 18 | 2019-03-29T19:32:29.000Z | 2022-01-03T23:16:45.000Z | cohesity_management_sdk/models/health_tile.py | nick6655/management-sdk-python | 88e792cb83e5c24a22af495b220c145d0c45841d | [
"Apache-2.0"
] | 16 | 2019-02-27T06:54:12.000Z | 2021-11-16T18:10:24.000Z | # -*- coding: utf-8 -*-
# Copyright 2021 Cohesity Inc.
import cohesity_management_sdk.models.alert
| 38.330275 | 109 | 0.646003 |
460510280808ce5edf4deb0f4ea853f4de886f05 | 4,149 | py | Python | TextRank/textrank.py | nihanjali/PageRank | baea9d89fb962fd1311a61127123bf36d9d2dd38 | [
"Apache-2.0"
] | null | null | null | TextRank/textrank.py | nihanjali/PageRank | baea9d89fb962fd1311a61127123bf36d9d2dd38 | [
"Apache-2.0"
] | null | null | null | TextRank/textrank.py | nihanjali/PageRank | baea9d89fb962fd1311a61127123bf36d9d2dd38 | [
"Apache-2.0"
] | null | null | null | import os
import sys
import copy
import collections
import nltk
import nltk.tokenize
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import pagerank
'''
textrank.py
-----------
This module implements TextRank, an unsupervised keyword
significance scoring algorithm. TextRank builds a... | 33.731707 | 97 | 0.644493 |
4606c41942e35425a62e84ea16612cc308900a33 | 10,472 | py | Python | tests/test_exploration.py | lionelkusch/neurolib | 714eef48616af0ebdb62decc84826221472398f9 | [
"MIT"
] | null | null | null | tests/test_exploration.py | lionelkusch/neurolib | 714eef48616af0ebdb62decc84826221472398f9 | [
"MIT"
] | null | null | null | tests/test_exploration.py | lionelkusch/neurolib | 714eef48616af0ebdb62decc84826221472398f9 | [
"MIT"
] | null | null | null | import logging
import os
import random
import string
import time
import unittest
import neurolib.utils.paths as paths
import neurolib.utils.pypetUtils as pu
import numpy as np
import pytest
import xarray as xr
from neurolib.models.aln import ALNModel
from neurolib.models.fhn import FHNModel
from neurolib.models.multim... | 36.110345 | 120 | 0.629297 |
46077178da4bf46135d1fc5fee2cb11b113e0b42 | 3,568 | py | Python | irc3/tags.py | belst/irc3 | c89303cf5937a4dc7cf1eda8e662dc702b5e0ad9 | [
"MIT"
] | null | null | null | irc3/tags.py | belst/irc3 | c89303cf5937a4dc7cf1eda8e662dc702b5e0ad9 | [
"MIT"
] | null | null | null | irc3/tags.py | belst/irc3 | c89303cf5937a4dc7cf1eda8e662dc702b5e0ad9 | [
"MIT"
] | 1 | 2018-07-22T18:40:37.000Z | 2018-07-22T18:40:37.000Z | # -*- coding: utf-8 -*-
'''
Module offering 2 functions, encode() and decode(), to transcode between
IRCv3.2 tags and python dictionaries.
'''
import re
import random
import string
_escapes = (
("\\", "\\\\"),
(";", r"\:"),
(" ", r"\s"),
("\r", r"\r"),
("\n", r"\n"),
)
# make the possibility of... | 28.31746 | 79 | 0.580998 |
4607ba171b6d586a01f576a069c7a776194711fd | 2,646 | py | Python | app/forms.py | Rahmatullina/FinalYearProject | 326f521b9f600dbbc7ace2223bd5aafc79b2267c | [
"Apache-2.0"
] | null | null | null | app/forms.py | Rahmatullina/FinalYearProject | 326f521b9f600dbbc7ace2223bd5aafc79b2267c | [
"Apache-2.0"
] | 9 | 2020-09-26T01:09:35.000Z | 2022-02-10T01:32:30.000Z | app/forms.py | Rahmatullina/FinalYearProject | 326f521b9f600dbbc7ace2223bd5aafc79b2267c | [
"Apache-2.0"
] | null | null | null | from django import forms
from django.contrib.auth.forms import PasswordResetForm, SetPasswordForm
# from .models import RegionModel
# from .models import SERVICE_CHOICES, REGION_CHOICES
from django.contrib.auth import authenticate
# from django.contrib.auth.forms import UserCreationForm, UserChangeForm
# from .models i... | 46.421053 | 120 | 0.62585 |
46085291ee66b159174d6179bad5ab2c5199a92f | 28,019 | py | Python | src/fedavg_trainer.py | MrZhang1994/mobile-federated-learning | 6e088a91266d889869af5a1eb0bad83ca635a4a5 | [
"Apache-2.0"
] | null | null | null | src/fedavg_trainer.py | MrZhang1994/mobile-federated-learning | 6e088a91266d889869af5a1eb0bad83ca635a4a5 | [
"Apache-2.0"
] | null | null | null | src/fedavg_trainer.py | MrZhang1994/mobile-federated-learning | 6e088a91266d889869af5a1eb0bad83ca635a4a5 | [
"Apache-2.0"
] | 1 | 2021-07-06T04:53:06.000Z | 2021-07-06T04:53:06.000Z | # newly added libraries
import copy
import wandb
import time
import math
import csv
import shutil
from tqdm import tqdm
import torch
import numpy as np
import pandas as pd
from client import Client
from config import *
import scheduler as sch | 52.965974 | 206 | 0.5891 |
46087abee7bffbddb94f7edf7ace7481d6b4e5e7 | 15,539 | py | Python | src/test.py | jfparentledartech/DEFT | 6e7e98664cd635509bdff69533a24a7c4e4e3ea3 | [
"MIT"
] | null | null | null | src/test.py | jfparentledartech/DEFT | 6e7e98664cd635509bdff69533a24a7c4e4e3ea3 | [
"MIT"
] | null | null | null | src/test.py | jfparentledartech/DEFT | 6e7e98664cd635509bdff69533a24a7c4e4e3ea3 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import time
import cv2
import matplotlib.pyplot as plt
import numpy as np
from progress.bar import Bar
import torch
import pickle
import motmetrics as mm
from lib.opts import opts
from lib.logger im... | 36.137209 | 140 | 0.533882 |
460899f19cdb6ea7310d1622b1d7bbb727078007 | 8,796 | py | Python | compiler_gym/envs/gcc/datasets/csmith.py | AkillesAILimited/CompilerGym | 34c0933ba26b385ebd2cd67f5d8edbb046c6bf02 | [
"MIT"
] | null | null | null | compiler_gym/envs/gcc/datasets/csmith.py | AkillesAILimited/CompilerGym | 34c0933ba26b385ebd2cd67f5d8edbb046c6bf02 | [
"MIT"
] | null | null | null | compiler_gym/envs/gcc/datasets/csmith.py | AkillesAILimited/CompilerGym | 34c0933ba26b385ebd2cd67f5d8edbb046c6bf02 | [
"MIT"
] | 1 | 2021-10-01T05:52:34.000Z | 2021-10-01T05:52:34.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import logging
import shutil
import subprocess
import tempfile
from pathlib import Path
from threading import Lock
from typing import Iterable,... | 35.756098 | 98 | 0.620509 |
46089e52d9f3438c0d2bdc953655d9f0dafbf49b | 444 | py | Python | dans_pymodules/power_of_two.py | DanielWinklehner/dans_pymodules | 04dfdaeccc171712cad6eb24202608e2eda21eca | [
"MIT"
] | null | null | null | dans_pymodules/power_of_two.py | DanielWinklehner/dans_pymodules | 04dfdaeccc171712cad6eb24202608e2eda21eca | [
"MIT"
] | null | null | null | dans_pymodules/power_of_two.py | DanielWinklehner/dans_pymodules | 04dfdaeccc171712cad6eb24202608e2eda21eca | [
"MIT"
] | null | null | null | __author__ = "Daniel Winklehner"
__doc__ = "Find out if a number is a power of two"
def power_of_two(number):
"""
Function that checks if the input value (data) is a power of 2
(i.e. 2, 4, 8, 16, 32, ...)
"""
res = 0
while res == 0:
res = number % 2
number /= 2.0
prin... | 19.304348 | 66 | 0.529279 |
460a17e5a2d4a382d4b56fd109a6fc2250ecd27e | 535 | py | Python | examples/index/context.py | rmorshea/viewdom | 24c528642e9ef0179999936b2e6f3b8a9d770df8 | [
"MIT"
] | null | null | null | examples/index/context.py | rmorshea/viewdom | 24c528642e9ef0179999936b2e6f3b8a9d770df8 | [
"MIT"
] | null | null | null | examples/index/context.py | rmorshea/viewdom | 24c528642e9ef0179999936b2e6f3b8a9d770df8 | [
"MIT"
] | null | null | null | from viewdom import html, render, use_context, Context
expected = '<h1>My Todos</h1><ul><li>Item: first</li></ul>'
# start-after
title = 'My Todos'
todos = ['first']
result = render(html('''
<{Context} prefix="Item: ">
<h1>{title}</h1>
<{TodoList} todos={todos} />
<//>
'''))
# '<h1>My Todos</h... | 20.576923 | 62 | 0.588785 |
460a2bcd85d3d00d44d62b6c67fe157741f17339 | 363 | py | Python | biblioteca/views.py | Dagmoores/ProjetoIntegradorIUnivesp | 86f5004c359b760cceec87bfa905db16e3375653 | [
"MIT"
] | null | null | null | biblioteca/views.py | Dagmoores/ProjetoIntegradorIUnivesp | 86f5004c359b760cceec87bfa905db16e3375653 | [
"MIT"
] | null | null | null | biblioteca/views.py | Dagmoores/ProjetoIntegradorIUnivesp | 86f5004c359b760cceec87bfa905db16e3375653 | [
"MIT"
] | null | null | null | from django.views.generic import DetailView, ListView, TemplateView
from .models import Books | 24.2 | 67 | 0.77135 |
460ac56ca325f939e25bdbf44f40c51f97e73226 | 429 | py | Python | choir/evaluation/__init__.py | scwangdyd/large_vocabulary_hoi_detection | db7a4397c3050b1bf9a3f7473edf125e2b1046c4 | [
"MIT"
] | 9 | 2021-11-13T17:14:07.000Z | 2022-03-29T00:27:54.000Z | choir/evaluation/__init__.py | scwangdyd/large_vocabulary_hoi_detection | db7a4397c3050b1bf9a3f7473edf125e2b1046c4 | [
"MIT"
] | 1 | 2022-02-04T16:28:01.000Z | 2022-02-04T16:28:01.000Z | choir/evaluation/__init__.py | scwangdyd/large_vocabulary_hoi_detection | db7a4397c3050b1bf9a3f7473edf125e2b1046c4 | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
from .evaluator import DatasetEvaluator, DatasetEvaluators, inference_context, inference_on_dataset
from .testing import print_csv_format, verify_results
from .hico_evaluation import HICOEvaluator
from .swig_evaluation import SWIGEvaluator
# from .d... | 47.666667 | 99 | 0.822844 |
460b1c41c9223f051fce73e3d45305d26f20419f | 4,092 | py | Python | api_yamdb/reviews/models.py | LHLHLHE/api_yamdb | bda83815a47f3fda03d54220dfe41e9263ff1b05 | [
"MIT"
] | null | null | null | api_yamdb/reviews/models.py | LHLHLHE/api_yamdb | bda83815a47f3fda03d54220dfe41e9263ff1b05 | [
"MIT"
] | null | null | null | api_yamdb/reviews/models.py | LHLHLHE/api_yamdb | bda83815a47f3fda03d54220dfe41e9263ff1b05 | [
"MIT"
] | null | null | null | import datetime as dt
from django.db import models
from django.core.validators import MinValueValidator, MaxValueValidator
from django.core.exceptions import ValidationError
from users.models import CustomUser
def validate_year(value):
"""
.
"""
if value > dt.datetime.now().year:
rais... | 24.650602 | 77 | 0.608016 |
460cac61f3a5248165f741d16e8295c7d5e81b06 | 127,462 | py | Python | angr/engines/pcode/arch/ArchPcode_PowerPC_LE_32_QUICC.py | matthewpruett/angr | bfba2af1ea2eb941001339f47a1264a685c60eec | [
"BSD-2-Clause"
] | 6,132 | 2015-08-06T23:24:47.000Z | 2022-03-31T21:49:34.000Z | angr/engines/pcode/arch/ArchPcode_PowerPC_LE_32_QUICC.py | matthewpruett/angr | bfba2af1ea2eb941001339f47a1264a685c60eec | [
"BSD-2-Clause"
] | 2,272 | 2015-08-10T08:40:07.000Z | 2022-03-31T23:46:44.000Z | angr/engines/pcode/arch/ArchPcode_PowerPC_LE_32_QUICC.py | matthewpruett/angr | bfba2af1ea2eb941001339f47a1264a685c60eec | [
"BSD-2-Clause"
] | 1,155 | 2015-08-06T23:37:39.000Z | 2022-03-31T05:54:11.000Z | ###
### This file was automatically generated
###
from archinfo.arch import register_arch, Endness, Register
from .common import ArchPcode
register_arch(['powerpc:le:32:quicc'], 32, Endness.LE, ArchPcode_PowerPC_LE_32_QUICC)
| 39.449706 | 85 | 0.545692 |
460d6b3dd6eff2aa0cc70e0bbc8f6441baed0341 | 6,796 | py | Python | makesense/graph.py | sieben/makesense | 485e71903bcc9446482f21bb5d0c7a392ca1efca | [
"Apache-2.0"
] | 5 | 2015-02-03T12:28:55.000Z | 2019-03-20T08:11:22.000Z | makesense/graph.py | sieben/makesense | 485e71903bcc9446482f21bb5d0c7a392ca1efca | [
"Apache-2.0"
] | 4 | 2016-05-16T07:26:19.000Z | 2016-06-23T22:22:10.000Z | makesense/graph.py | sieben/makesense | 485e71903bcc9446482f21bb5d0c7a392ca1efca | [
"Apache-2.0"
] | 1 | 2016-05-16T07:28:53.000Z | 2016-05-16T07:28:53.000Z | # -*- coding: utf-8 -*-
import json
import pdb
import os
from os.path import join as pj
import networkx as nx
import pandas as pd
from networkx.readwrite.json_graph import node_link_data
def plot_graph(self):
"""
Plot the transmission graph of the simulation.
TODO: Draw arrows and have a directed grap... | 27.626016 | 82 | 0.59741 |
460d75e0442c54e12cc43f9bb046096139d2369e | 2,741 | py | Python | recipes/Python/52228_Remote_control_with_telnetlib/recipe-52228.py | tdiprima/code | 61a74f5f93da087d27c70b2efe779ac6bd2a3b4f | [
"MIT"
] | 2,023 | 2017-07-29T09:34:46.000Z | 2022-03-24T08:00:45.000Z | recipes/Python/52228_Remote_control_with_telnetlib/recipe-52228.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 32 | 2017-09-02T17:20:08.000Z | 2022-02-11T17:49:37.000Z | recipes/Python/52228_Remote_control_with_telnetlib/recipe-52228.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 780 | 2017-07-28T19:23:28.000Z | 2022-03-25T20:39:41.000Z | # auto_telnet.py - remote control via telnet
import os, sys, string, telnetlib
from getpass import getpass
if __name__ == '__main__':
basename = os.path.splitext(os.path.basename(sys.argv[0]))[0]
logname = os.environ.get("LOGNAME", os.environ.get("USERNAME"))
host = 'localhost'
import getopt
optlis... | 34.2625 | 76 | 0.553448 |
460e2d1d15ba01da3b9d59848ee03f3a71e7df89 | 5,511 | py | Python | FFTNet_dilconv.py | mimbres/FFTNet | 3a6bfb4731bab2e0a59fc3a1ddb55f19f84aeba2 | [
"Apache-2.0"
] | null | null | null | FFTNet_dilconv.py | mimbres/FFTNet | 3a6bfb4731bab2e0a59fc3a1ddb55f19f84aeba2 | [
"Apache-2.0"
] | null | null | null | FFTNet_dilconv.py | mimbres/FFTNet | 3a6bfb4731bab2e0a59fc3a1ddb55f19f84aeba2 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon May 7 09:46:10 2018
@author: sungkyun
FFTNet model using 2x1 dil-conv
"""
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
# Models with Preset (for convenience)
'''
dim_input: dimension of input (256 for 8-bit mu-... | 40.822222 | 147 | 0.551987 |
460e42fc65b233b72dc53c72b8b11991e2b52abd | 1,390 | py | Python | snewpdag/plugins/Copy.py | SNEWS2/snewpdag | 57f886cf08e1acd8af48ee486a1c2400e2b77b8b | [
"BSD-3-Clause"
] | null | null | null | snewpdag/plugins/Copy.py | SNEWS2/snewpdag | 57f886cf08e1acd8af48ee486a1c2400e2b77b8b | [
"BSD-3-Clause"
] | 21 | 2021-06-09T10:31:40.000Z | 2022-03-21T17:14:03.000Z | snewpdag/plugins/Copy.py | SNEWS2/snewpdag | 57f886cf08e1acd8af48ee486a1c2400e2b77b8b | [
"BSD-3-Clause"
] | 9 | 2021-07-11T17:45:42.000Z | 2021-09-09T22:07:18.000Z | """
Copy - copy fields into other (possibly new) fields
configuration:
on: list of 'alert', 'revoke', 'report', 'reset' (optional: def 'alert' only)
cp: ( (in,out), ... )
Field names take the form of dir1/dir2/dir3,
which in the payload will be data[dir1][dir2][dir3]
"""
import logging
from snewpdag.dag import N... | 25.272727 | 79 | 0.576978 |
460ec208b3e5e026467442540a94ba66de7fb38a | 1,562 | py | Python | pages/aboutus.py | BuildWeek-AirBnB-Optimal-Price/application | c65e1ec3db309dd3afbcf9429d16489ccda534d8 | [
"MIT"
] | null | null | null | pages/aboutus.py | BuildWeek-AirBnB-Optimal-Price/application | c65e1ec3db309dd3afbcf9429d16489ccda534d8 | [
"MIT"
] | 1 | 2021-08-23T21:22:51.000Z | 2021-08-23T21:22:51.000Z | pages/aboutus.py | BuildWeek-AirBnB-Optimal-Price/application | c65e1ec3db309dd3afbcf9429d16489ccda534d8 | [
"MIT"
] | null | null | null | '''
houses each team member's
link to personal GitHub io or
website or blog space
RJProctor
'''
# Imports from 3rd party libraries
import dash
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
from app import app
... | 20.025641 | 77 | 0.518566 |
4610420d2938e979a1edec925cfaa9db7b11366a | 755 | py | Python | Codes/Python32/Lib/importlib/test/extension/test_path_hook.py | eyantra/FireBird_Swiss_Knife | cac322cf28e2d690b86ba28a75e87551e5e47988 | [
"MIT"
] | 319 | 2016-09-22T15:54:48.000Z | 2022-03-18T02:36:58.000Z | Codes/Python32/Lib/importlib/test/extension/test_path_hook.py | eyantra/FireBird_Swiss_Knife | cac322cf28e2d690b86ba28a75e87551e5e47988 | [
"MIT"
] | 9 | 2016-11-03T21:56:41.000Z | 2020-08-09T19:27:37.000Z | Codes/Python32/Lib/importlib/test/extension/test_path_hook.py | eyantra/FireBird_Swiss_Knife | cac322cf28e2d690b86ba28a75e87551e5e47988 | [
"MIT"
] | 27 | 2016-10-06T16:05:32.000Z | 2022-03-18T02:37:00.000Z | from importlib import _bootstrap
from . import util
import collections
import imp
import sys
import unittest
if __name__ == '__main__':
test_main()
| 23.59375 | 77 | 0.721854 |
46114f85ae8065583b2a1f11692dfc71d3d35a86 | 480 | py | Python | 3. count_words/solution.py | dcragusa/WeeklyPythonExerciseB2 | a7da3830e27891060dcfb0804c81f52b1f250ce8 | [
"MIT"
] | null | null | null | 3. count_words/solution.py | dcragusa/WeeklyPythonExerciseB2 | a7da3830e27891060dcfb0804c81f52b1f250ce8 | [
"MIT"
] | null | null | null | 3. count_words/solution.py | dcragusa/WeeklyPythonExerciseB2 | a7da3830e27891060dcfb0804c81f52b1f250ce8 | [
"MIT"
] | null | null | null | import os
from glob import iglob
from concurrent.futures import ThreadPoolExecutor
| 24 | 62 | 0.729167 |
46116c9d8947552c6fd85dd9c709b4bd524230cf | 141 | py | Python | kafka-connect-azblob/docs/autoreload.py | cirobarradov/kafka-connect-hdfs-datalab | 7e2b23bdb78b34f9934b8d56618a8035b75f6f54 | [
"Apache-2.0"
] | null | null | null | kafka-connect-azblob/docs/autoreload.py | cirobarradov/kafka-connect-hdfs-datalab | 7e2b23bdb78b34f9934b8d56618a8035b75f6f54 | [
"Apache-2.0"
] | null | null | null | kafka-connect-azblob/docs/autoreload.py | cirobarradov/kafka-connect-hdfs-datalab | 7e2b23bdb78b34f9934b8d56618a8035b75f6f54 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
from livereload import Server, shell
server = Server()
server.watch('*.rst', shell('make html'))
server.serve()
| 20.142857 | 42 | 0.680851 |
4612cb4af177cb85c305bcbf02040e60659a77f5 | 3,008 | py | Python | keras_textclassification/conf/path_config.py | atom-zh/Keras-TextClassification | 26c549e8e23c6a10905c2dcef7eef557dc43c932 | [
"MIT"
] | null | null | null | keras_textclassification/conf/path_config.py | atom-zh/Keras-TextClassification | 26c549e8e23c6a10905c2dcef7eef557dc43c932 | [
"MIT"
] | null | null | null | keras_textclassification/conf/path_config.py | atom-zh/Keras-TextClassification | 26c549e8e23c6a10905c2dcef7eef557dc43c932 | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
# !/usr/bin/python
# @time :2019/6/5 21:04
# @author :Mo
# @function :file of path
import os
import pathlib
import sys
#
path_root = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir))
path_root = path_root.replace('\\', '/')
path_top = str(pathlib.Path(os... | 41.777778 | 94 | 0.772939 |
4612f94a5e19222b82ccef62fa3f6a2d792d2930 | 2,617 | py | Python | tests/test_apyhgnc.py | robertopreste/apyhgnc | 26efa764a2262cfa12c8a2f0f077569e7f3e4e79 | [
"MIT"
] | null | null | null | tests/test_apyhgnc.py | robertopreste/apyhgnc | 26efa764a2262cfa12c8a2f0f077569e7f3e4e79 | [
"MIT"
] | 64 | 2019-04-21T09:22:01.000Z | 2022-03-31T23:01:14.000Z | tests/test_apyhgnc.py | robertopreste/apyhgnc | 26efa764a2262cfa12c8a2f0f077569e7f3e4e79 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
# Created by Roberto Preste
import pytest
import asyncio
from pandas.testing import assert_frame_equal
from apyhgnc import apyhgnc
# apyhgnc.info
# apyhgnc.fetch
# apyhgnc.search
| 27.840426 | 69 | 0.762323 |
46134dbafabea71d237df09c989e61b23906b699 | 2,770 | py | Python | bdaq/tools/extract_enums.py | magnium/pybdaq | 8511cff42b7f953c105e7a78c8c62f6deb2430ec | [
"MIT"
] | null | null | null | bdaq/tools/extract_enums.py | magnium/pybdaq | 8511cff42b7f953c105e7a78c8c62f6deb2430ec | [
"MIT"
] | null | null | null | bdaq/tools/extract_enums.py | magnium/pybdaq | 8511cff42b7f953c105e7a78c8c62f6deb2430ec | [
"MIT"
] | 1 | 2018-08-28T06:12:06.000Z | 2018-08-28T06:12:06.000Z | import os.path
import argparse
from xml.etree import ElementTree as ET
if __name__ == "__main__":
main()
| 27.156863 | 78 | 0.640794 |
46138642b2c4dc6d2e31c500bf65e34679d07086 | 1,230 | py | Python | Objetos/biblioteca.py | SebaB29/Python | 8fe7b375e200d2a629e3ef83a2356002621267a6 | [
"MIT"
] | null | null | null | Objetos/biblioteca.py | SebaB29/Python | 8fe7b375e200d2a629e3ef83a2356002621267a6 | [
"MIT"
] | null | null | null | Objetos/biblioteca.py | SebaB29/Python | 8fe7b375e200d2a629e3ef83a2356002621267a6 | [
"MIT"
] | null | null | null |
libro = Libro("HyP", "JK")
libro1 = Libro("La Isla M", "JCortazar")
libro2 = Libro("El tunel", "Sabato")
biblio = Biblioteca()
biblio.agregar_libro(libro)
biblio.agregar_libro(libro1)
biblio.agregar_libro(libro2)
print(biblio.contiene_libro("HyP", "JK"))
print(biblio.sacar_libro("HyP", "JK"))
print(biblio.contiene_lib... | 27.954545 | 63 | 0.582927 |
4613a39367cc38fb7bf09761273d5ec4ce7cfaaf | 5,540 | py | Python | parser_tool/tests/test_htmlgenerator.py | Harvard-ATG/visualizing_russian_tools | e8e5cf8c5b7eee0b6855594ad41b3ccd70a2d467 | [
"BSD-3-Clause"
] | 2 | 2020-07-10T14:17:03.000Z | 2020-11-17T09:18:26.000Z | parser_tool/tests/test_htmlgenerator.py | eelegiap/visualizing_russian_tools | 9c36baebc384133c7c27d7a7c4e0cedc8cb84e74 | [
"BSD-3-Clause"
] | 13 | 2019-03-17T13:27:31.000Z | 2022-01-18T17:03:14.000Z | parser_tool/tests/test_htmlgenerator.py | eelegiap/visualizing_russian_tools | 9c36baebc384133c7c27d7a7c4e0cedc8cb84e74 | [
"BSD-3-Clause"
] | 2 | 2019-10-19T16:37:44.000Z | 2020-06-22T13:30:20.000Z | # -*- coding: utf-8 -*-
import unittest
from xml.etree import ElementTree as ET
from parser_tool import tokenizer
from parser_tool import htmlgenerator
| 49.026549 | 192 | 0.658845 |
4613c4acf26a49b9382fcd9cbead5b7bfa04eb32 | 1,772 | py | Python | taiga/hooks/gitlab/migrations/0002_auto_20150703_1102.py | threefoldtech/Threefold-Circles | cbc433796b25cf7af9a295af65d665a4a279e2d6 | [
"Apache-2.0"
] | 1 | 2017-05-29T19:01:06.000Z | 2017-05-29T19:01:06.000Z | docker-images/taigav2/taiga-back/taiga/hooks/gitlab/migrations/0002_auto_20150703_1102.py | mattcongy/itshop | 6be025a9eaa7fe7f495b5777d1f0e5a3184121c9 | [
"MIT"
] | 12 | 2019-11-25T14:08:32.000Z | 2021-06-24T10:35:51.000Z | taiga/hooks/gitlab/migrations/0002_auto_20150703_1102.py | threefoldtech/Threefold-Circles | cbc433796b25cf7af9a295af65d665a4a279e2d6 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.core.files import File
| 34.745098 | 79 | 0.603273 |
4615c8d476cced9b6746382173a9829cad6f16c7 | 995 | bzl | Python | external_plugin_deps.bzl | michalgagat/plugins_oauth | 47cc344013bd43a4ac508c578f2d93f37a166ee6 | [
"Apache-2.0",
"MIT"
] | 143 | 2015-03-09T21:18:39.000Z | 2022-03-02T13:27:12.000Z | external_plugin_deps.bzl | michalgagat/plugins_oauth | 47cc344013bd43a4ac508c578f2d93f37a166ee6 | [
"Apache-2.0",
"MIT"
] | 162 | 2015-03-15T04:00:41.000Z | 2022-02-24T07:29:17.000Z | external_plugin_deps.bzl | michalgagat/plugins_oauth | 47cc344013bd43a4ac508c578f2d93f37a166ee6 | [
"Apache-2.0",
"MIT"
] | 97 | 2015-02-27T18:35:20.000Z | 2022-01-08T13:17:21.000Z | load("//tools/bzl:maven_jar.bzl", "maven_jar")
| 34.310345 | 84 | 0.629146 |
461741b98d074cd4fe4db2b2b85584fd2a2f2b2d | 442 | py | Python | 11.-Operaciones_entero_con_float_python.py | emiliocarcanobringas/11.-Operaciones_entero_con_float_python | faf3bf2fae3b7a990e0d20483ac9ac219dcb7857 | [
"MIT"
] | null | null | null | 11.-Operaciones_entero_con_float_python.py | emiliocarcanobringas/11.-Operaciones_entero_con_float_python | faf3bf2fae3b7a990e0d20483ac9ac219dcb7857 | [
"MIT"
] | null | null | null | 11.-Operaciones_entero_con_float_python.py | emiliocarcanobringas/11.-Operaciones_entero_con_float_python | faf3bf2fae3b7a990e0d20483ac9ac219dcb7857 | [
"MIT"
] | null | null | null | # Este programa muestra la suma de dos variables, de tipo int y float
print("Este programa muestra la suma de dos variables, de tipo int y float")
print("Tambin muestra que la variable que realiza la operacin es de tipo float")
numero1 = 7
numero2 = 3.1416
sumadeambos = numero1 + numero2
print("El resultado de ... | 34 | 83 | 0.748869 |
46175a845f983668cd1561f331edd1b1e7cee344 | 12,398 | py | Python | main_gat.py | basiralab/RG-Select | 074274f61667611205724c4423fc498ee4a0a9d0 | [
"MIT"
] | 1 | 2021-09-07T06:55:37.000Z | 2021-09-07T06:55:37.000Z | main_gat.py | basiralab/RG-Select | 074274f61667611205724c4423fc498ee4a0a9d0 | [
"MIT"
] | null | null | null | main_gat.py | basiralab/RG-Select | 074274f61667611205724c4423fc498ee4a0a9d0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from sklearn import preprocessing
from torch.autograd import Variable
from models_gat import GAT
import os
import torch
import numpy as np
import argparse
import pickle
import sklearn.metrics as metrics
import cross_val
import time
import random
torch.manual_seed(0)
np.random.seed(0)
random.s... | 37.008955 | 137 | 0.607275 |
4617a69a551305b5f32925b26d808534b36117fc | 12,752 | py | Python | dev/Gems/CloudGemDefectReporter/v1/AWS/common-code/Python/piexif/_dump.py | jeikabu/lumberyard | 07228c605ce16cbf5aaa209a94a3cb9d6c1a4115 | [
"AML"
] | 8 | 2019-10-07T16:33:47.000Z | 2020-12-07T03:59:58.000Z | dev/Gems/CloudGemDefectReporter/v1/AWS/common-code/Python/piexif/_dump.py | jeikabu/lumberyard | 07228c605ce16cbf5aaa209a94a3cb9d6c1a4115 | [
"AML"
] | 1 | 2018-02-18T22:24:55.000Z | 2018-02-21T18:36:09.000Z | dev/Gems/CloudGemDefectReporter/v1/AWS/common-code/Python/piexif/_dump.py | jeikabu/lumberyard | 07228c605ce16cbf5aaa209a94a3cb9d6c1a4115 | [
"AML"
] | 5 | 2020-08-27T20:44:18.000Z | 2021-08-21T22:54:11.000Z | import copy
import numbers
import struct
from ._common import *
from ._exif import *
TIFF_HEADER_LENGTH = 8
def dump(exif_dict_original):
"""
py:function:: piexif.load(data)
Return exif as bytes.
:param dict exif: Exif data({"0th":dict, "Exif":dict, "GPS":dict, "Interop":dict, "1st":dict, "thumbn... | 36.74928 | 117 | 0.571361 |
4617fb2b1109fbc2c363e6e5ce80547d57eca614 | 8,000 | py | Python | portal.py | mrahman4782/portalhoop | 29e87ccaca5544590aa9ed20096c3628c1ab57b1 | [
"Apache-2.0"
] | null | null | null | portal.py | mrahman4782/portalhoop | 29e87ccaca5544590aa9ed20096c3628c1ab57b1 | [
"Apache-2.0"
] | null | null | null | portal.py | mrahman4782/portalhoop | 29e87ccaca5544590aa9ed20096c3628c1ab57b1 | [
"Apache-2.0"
] | null | null | null | import pygame
import random
from pygame import *
pygame.init()
width, height = 740, 500
screen = pygame.display.set_mode((width, height))
player = [pygame.transform.scale(pygame.image.load("Resources/Balljump-1(2).png"), (100,100)), pygame.t... | 28.776978 | 419 | 0.5115 |
46195f448a6bacb19ed1a57308155484d10e7c8b | 2,137 | py | Python | datadog_cluster_agent/tests/test_datadog_cluster_agent.py | tdimnet/integrations-core | a78133a3b71a1b8377fa214d121a98647031ab06 | [
"BSD-3-Clause"
] | 1 | 2021-12-15T22:45:14.000Z | 2021-12-15T22:45:14.000Z | datadog_cluster_agent/tests/test_datadog_cluster_agent.py | tdimnet/integrations-core | a78133a3b71a1b8377fa214d121a98647031ab06 | [
"BSD-3-Clause"
] | null | null | null | datadog_cluster_agent/tests/test_datadog_cluster_agent.py | tdimnet/integrations-core | a78133a3b71a1b8377fa214d121a98647031ab06 | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2021-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from typing import Any, Dict
from datadog_checks.base.stubs.aggregator import AggregatorStub
from datadog_checks.datadog_cluster_agent import DatadogClusterAgentCheck
from datadog_checks.dev.utils import ... | 34.467742 | 87 | 0.759944 |
461ab2e151fa2b1e92504b3b4e0d6a8160278475 | 843 | py | Python | prev_ob_models/KaplanLansner2014/plotting_and_analysis/plot_results.py | fameshpatel/olfactorybulb | 8d7a644b4560309ef177c0590ff73ed4c2432604 | [
"MIT"
] | 5 | 2019-10-03T14:49:02.000Z | 2022-01-13T13:37:34.000Z | prev_ob_models/KaplanLansner2014/plotting_and_analysis/plot_results.py | fameshpatel/olfactorybulb | 8d7a644b4560309ef177c0590ff73ed4c2432604 | [
"MIT"
] | 4 | 2019-12-30T15:57:24.000Z | 2020-10-07T22:42:50.000Z | prev_ob_models/KaplanLansner2014/plotting_and_analysis/plot_results.py | fameshpatel/olfactorybulb | 8d7a644b4560309ef177c0590ff73ed4c2432604 | [
"MIT"
] | 2 | 2020-05-19T20:12:48.000Z | 2020-11-04T17:17:44.000Z | import pylab
import numpy
import sys
if (len(sys.argv) < 2):
fn = raw_input("Please enter data file to be plotted\n")
else:
fn = sys.argv[1]
data = np.loadtxt(fn)
# if the first line contains crap use skiprows=1
#data = np.loadtxt(fn, skiprows=1)
fig = pylab.figure()
ax = fig.add_subplot(111)
# if you wan... | 21.075 | 60 | 0.618031 |
1c9d4e8ece8e1713ad5f9d3791c348c5f5f83733 | 2,691 | py | Python | lib/take2/main.py | zacharyfrederick/deep_q_gaf | 6b712b17a6c89c1cba0d22e18fa336369c521d4e | [
"MIT"
] | null | null | null | lib/take2/main.py | zacharyfrederick/deep_q_gaf | 6b712b17a6c89c1cba0d22e18fa336369c521d4e | [
"MIT"
] | null | null | null | lib/take2/main.py | zacharyfrederick/deep_q_gaf | 6b712b17a6c89c1cba0d22e18fa336369c521d4e | [
"MIT"
] | null | null | null | from __future__ import division
from lib import env_config
from lib.senior_env import BetterEnvironment
from keras.optimizers import Adam
from rl.agents.dqn import DQNAgent
from rl.policy import LinearAnnealedPolicy, BoltzmannQPolicy, EpsGreedyQPolicy
from rl.memory import SequentialMemory
from lib import models
impor... | 42.714286 | 109 | 0.726867 |
1c9df7adb0b666ca2019704ffcc93ac51a469c6b | 1,752 | py | Python | src/clcore.py | ShepardPower/PyMCBuilder | b247151864cc6b7bca0dc23aa87cdbb44b52defc | [
"MIT"
] | 1 | 2019-07-09T04:45:07.000Z | 2019-07-09T04:45:07.000Z | src/clcore.py | ShepardPower/PyMCBuilder | b247151864cc6b7bca0dc23aa87cdbb44b52defc | [
"MIT"
] | null | null | null | src/clcore.py | ShepardPower/PyMCBuilder | b247151864cc6b7bca0dc23aa87cdbb44b52defc | [
"MIT"
] | null | null | null | # I'm just the one that executes the instructions!
import sys, math, json, operator, time
import mcpi.minecraft as minecraft
from PIL import Image as pillow
from blockid import get_block
import mcpi.block as block
import functions as pymc
from tqdm import tqdm
import tkinter as tk
# Functions
# Main code
mc = minecra... | 26.545455 | 93 | 0.66153 |
1c9e901d1d765a0acf44b58e4a7dca2f74accdab | 4,377 | py | Python | gaphor/tools/gaphorconvert.py | 987Frogh/project-makehuman | 3afc838b03c50f8e574d8c87cb71de4435a18a6d | [
"Apache-2.0"
] | 1 | 2020-11-27T12:39:15.000Z | 2020-11-27T12:39:15.000Z | gaphor/tools/gaphorconvert.py | 987Frogh/project-makehuman | 3afc838b03c50f8e574d8c87cb71de4435a18a6d | [
"Apache-2.0"
] | null | null | null | gaphor/tools/gaphorconvert.py | 987Frogh/project-makehuman | 3afc838b03c50f8e574d8c87cb71de4435a18a6d | [
"Apache-2.0"
] | 3 | 2020-01-23T14:13:59.000Z | 2020-02-18T18:21:47.000Z | #!/usr/bin/python
import optparse
import os
import re
import sys
import cairo
from gaphas.painter import Context, ItemPainter
from gaphas.view import View
import gaphor.UML as UML
from gaphor.application import Application
from gaphor.storage import storage
def pkg2dir(package):
"""
Return directory path f... | 28.796053 | 87 | 0.570482 |
1ca0182af54f9900fd8dd3f4d8ff457375adde5e | 1,140 | py | Python | test/test_ID.py | a-buntjer/tsib | 9d6ddcdca55c9b8afb5324c0da8d0910cb1a326e | [
"MIT"
] | 14 | 2019-12-16T16:54:43.000Z | 2021-11-08T11:46:51.000Z | test/test_ID.py | a-buntjer/tsib | 9d6ddcdca55c9b8afb5324c0da8d0910cb1a326e | [
"MIT"
] | null | null | null | test/test_ID.py | a-buntjer/tsib | 9d6ddcdca55c9b8afb5324c0da8d0910cb1a326e | [
"MIT"
] | 7 | 2020-05-27T19:49:58.000Z | 2022-02-02T12:45:33.000Z | # -*- coding: utf-8 -*-
"""
Created on Fri Apr 08 11:33:01 2016
@author: Leander Kotzur
"""
import tsib
| 20.727273 | 47 | 0.509649 |
1ca13538bfcd1f5b4948e14f8020f58d87fb25a8 | 25,791 | py | Python | dislib/model_selection/_search.py | alexbarcelo/dislib | 989f81f235ae30b17410a8d805df258c7d931b38 | [
"Apache-2.0"
] | 36 | 2018-10-22T19:21:14.000Z | 2022-03-22T12:10:01.000Z | dislib/model_selection/_search.py | alexbarcelo/dislib | 989f81f235ae30b17410a8d805df258c7d931b38 | [
"Apache-2.0"
] | 329 | 2018-11-22T18:04:57.000Z | 2022-03-18T01:26:55.000Z | dislib/model_selection/_search.py | alexbarcelo/dislib | 989f81f235ae30b17410a8d805df258c7d931b38 | [
"Apache-2.0"
] | 21 | 2019-01-10T11:46:39.000Z | 2022-03-17T12:59:45.000Z | from abc import ABC, abstractmethod
from collections import defaultdict
from collections.abc import Sequence
from functools import partial
from itertools import product
import numpy as np
from pycompss.api.api import compss_wait_on
from scipy.stats import rankdata
from sklearn import clone
from sklearn.model_selection... | 44.087179 | 79 | 0.584351 |
1ca1a822fc7884017cd3ac1dd4d887f9f5596b45 | 1,407 | py | Python | webapp/ui/tests/test_parse_search_results.py | robseed/botanist | 2f4fbab5d26499105a5057c86e0e6e37a2e8a727 | [
"MIT"
] | null | null | null | webapp/ui/tests/test_parse_search_results.py | robseed/botanist | 2f4fbab5d26499105a5057c86e0e6e37a2e8a727 | [
"MIT"
] | null | null | null | webapp/ui/tests/test_parse_search_results.py | robseed/botanist | 2f4fbab5d26499105a5057c86e0e6e37a2e8a727 | [
"MIT"
] | null | null | null | import os
from django.test import TestCase
from mock import patch
from ui.views import parse_search_results
FIXTURES_ROOT = os.path.join(os.path.dirname(__file__), 'fixtures')
FX = lambda *relpath: os.path.join(FIXTURES_ROOT, *relpath) | 43.96875 | 188 | 0.686567 |
1ca1fbc58c354b91137807db3948258d4447da15 | 4,395 | py | Python | minos/api_gateway/common/exceptions.py | Clariteia/api_gateway_common | e68095f31091699fc6cc4537bd6acf97a8dc6c3e | [
"MIT"
] | 3 | 2021-05-14T08:13:09.000Z | 2021-05-26T11:25:35.000Z | minos/api_gateway/common/exceptions.py | Clariteia/api_gateway_common | e68095f31091699fc6cc4537bd6acf97a8dc6c3e | [
"MIT"
] | 27 | 2021-05-13T08:43:19.000Z | 2021-08-24T17:19:36.000Z | minos/api_gateway/common/exceptions.py | Clariteia/api_gateway_common | e68095f31091699fc6cc4537bd6acf97a8dc6c3e | [
"MIT"
] | null | null | null | """
Copyright (C) 2021 Clariteia SL
This file is part of minos framework.
Minos framework can not be copied and/or distributed without the express permission of Clariteia SL.
"""
from typing import (
Any,
Type,
)
| 30.520833 | 116 | 0.739022 |
1ca27636ecfdf6c794d529bed48bdedc1987bdf3 | 4,598 | py | Python | tsdl/tools/extensions.py | burgerdev/hostload | 93142628bb32923c5e6f3a8b791488d72a5c9077 | [
"MIT"
] | null | null | null | tsdl/tools/extensions.py | burgerdev/hostload | 93142628bb32923c5e6f3a8b791488d72a5c9077 | [
"MIT"
] | null | null | null | tsdl/tools/extensions.py | burgerdev/hostload | 93142628bb32923c5e6f3a8b791488d72a5c9077 | [
"MIT"
] | null | null | null | """
Extensions for pylearn2 training algorithms. Those are either reimplemented to
suit the execution model of this package, or new ones for recording metrics.
"""
import os
import cPickle as pkl
import numpy as np
from pylearn2.train_extensions import TrainExtension
from .abcs import Buildable
| 27.047059 | 78 | 0.626577 |
1ca288015e226ac02375d4c474cc5edb714fc3e0 | 6,189 | py | Python | nogi/utils/post_extractor.py | Cooomma/nogi-backup-blog | 19868511d2b0f0c4d06bf4a88981bbfadc4121e4 | [
"MIT"
] | null | null | null | nogi/utils/post_extractor.py | Cooomma/nogi-backup-blog | 19868511d2b0f0c4d06bf4a88981bbfadc4121e4 | [
"MIT"
] | 164 | 2020-04-02T18:25:59.000Z | 2022-02-17T17:09:32.000Z | nogi/utils/post_extractor.py | Cooomma/nogi-backup-blog | 19868511d2b0f0c4d06bf4a88981bbfadc4121e4 | [
"MIT"
] | null | null | null | import asyncio
from io import BytesIO
import logging
import os
import random
import time
from typing import List
from urllib.parse import urlparse
import aiohttp
from aiohttp import ClientSession, TCPConnector
import requests
from requests import Response
from tqdm import tqdm
from nogi import REQUEST_HEADERS
from no... | 41.26 | 146 | 0.618517 |
1ca3e775b2d474b15aa148de47bee4762a8d884c | 1,429 | py | Python | sandbox/lib/jumpscale/JumpscaleLibsExtra/sal_zos/gateway/dhcp.py | threefoldtech/threebot_prebuilt | 1f0e1c65c14cef079cd80f73927d7c8318755c48 | [
"Apache-2.0"
] | 1 | 2020-10-05T08:53:57.000Z | 2020-10-05T08:53:57.000Z | sandbox/lib/jumpscale/JumpscaleLibsExtra/sal_zos/gateway/dhcp.py | threefoldtech/threebot_prebuilt | 1f0e1c65c14cef079cd80f73927d7c8318755c48 | [
"Apache-2.0"
] | 17 | 2019-11-14T08:41:37.000Z | 2020-05-27T09:23:51.000Z | sandbox/lib/jumpscale/JumpscaleLibsExtra/sal_zos/gateway/dhcp.py | threefoldtech/threebot_prebuilt | 1f0e1c65c14cef079cd80f73927d7c8318755c48 | [
"Apache-2.0"
] | null | null | null | from Jumpscale import j
import signal
from .. import templates
DNSMASQ = "/bin/dnsmasq --conf-file=/etc/dnsmasq.conf -d"
| 36.641026 | 94 | 0.638908 |
1ca47a4968ffeca31ec462add05b792e1ab435c2 | 340 | py | Python | answer/a4_type.py | breeze-shared-inc/python_training_01 | 7e918b37adbce062ae279f060bc25cfacda2fb85 | [
"MIT"
] | null | null | null | answer/a4_type.py | breeze-shared-inc/python_training_01 | 7e918b37adbce062ae279f060bc25cfacda2fb85 | [
"MIT"
] | 1 | 2020-05-11T04:59:04.000Z | 2020-05-11T05:29:08.000Z | answer/a4_type.py | bzgwhite/python_training_01 | 7e918b37adbce062ae279f060bc25cfacda2fb85 | [
"MIT"
] | null | null | null | hensu_int = 17 #
hensu_float = 1.7 #()
hensu_str = "HelloWorld" #
hensu_bool = True #
hensu_list = [] #
hensu_tuple = () #
hensu_dict = {} #
print(type(hensu_int))
print(type(hensu_float))
print(type(hensu_str))
print(type(hensu_bool))
print(type(hensu_list))
print(type(hensu_tuple))
print(type(hensu_dict))
| 21.25 | 29 | 0.732353 |