hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | 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 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | 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 248 | max_forks_repo_name stringlengths 5 125 | 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 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e359e595d02499d12ce9088ccf34ac138ffada36 | 384 | py | Python | 2018/2/hash.py | octonion/adventofcode | 132e8bf0c9bc0ad64a0e12e22170177df4947e37 | [
"MIT"
] | 1 | 2019-01-10T09:43:34.000Z | 2019-01-10T09:43:34.000Z | 2018/2/hash.py | octonion/adventofcode | 132e8bf0c9bc0ad64a0e12e22170177df4947e37 | [
"MIT"
] | null | null | null | 2018/2/hash.py | octonion/adventofcode | 132e8bf0c9bc0ad64a0e12e22170177df4947e37 | [
"MIT"
] | null | null | null | data = [i.strip() for i in open("input.txt").readlines()]
two = 0
three = 0
for code in data:
counts = {}
for i in range(0,len(code)):
if code[i] in counts.keys():
counts[code[i]] += 1
else:
counts[code[i]] = 1
if (2 in counts.values()):
two += 1
if (3 in... | 21.333333 | 57 | 0.492188 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 0.028646 |
e359f824dde6ff522819969499136201763f90fa | 322 | py | Python | conf_site/speakers/tests/factories.py | jasongrout/conf_site | 6b3beb21de8d847cba65dcb6da84464b40739d48 | [
"MIT"
] | 13 | 2015-05-22T17:10:22.000Z | 2021-07-15T16:45:19.000Z | conf_site/speakers/tests/factories.py | jasongrout/conf_site | 6b3beb21de8d847cba65dcb6da84464b40739d48 | [
"MIT"
] | 758 | 2015-03-18T13:39:25.000Z | 2022-03-31T13:14:09.000Z | conf_site/speakers/tests/factories.py | jasongrout/conf_site | 6b3beb21de8d847cba65dcb6da84464b40739d48 | [
"MIT"
] | 16 | 2015-03-24T18:53:17.000Z | 2020-10-22T21:30:02.000Z | # -*- coding: utf-8 -*-
import factory
from symposion.speakers.models import Speaker
from conf_site.accounts.tests.factories import UserFactory
class SpeakerFactory(factory.django.DjangoModelFactory):
user = factory.SubFactory(UserFactory)
name = factory.Faker("name")
class Meta:
model = Speake... | 21.466667 | 58 | 0.73913 | 173 | 0.537267 | 0 | 0 | 0 | 0 | 0 | 0 | 29 | 0.090062 |
e35a2abebd28f1f938e6001756592d76df4ec548 | 179 | py | Python | pokediadb/dbuilder/__init__.py | Kynarth/pokediadb | 97d981909803335f878b9e07ed31d86fc93e7941 | [
"MIT"
] | null | null | null | pokediadb/dbuilder/__init__.py | Kynarth/pokediadb | 97d981909803335f878b9e07ed31d86fc93e7941 | [
"MIT"
] | null | null | null | pokediadb/dbuilder/__init__.py | Kynarth/pokediadb | 97d981909803335f878b9e07ed31d86fc93e7941 | [
"MIT"
] | null | null | null | # flake8: noqa
import pokediadb.dbuilder.version
import pokediadb.dbuilder.type
import pokediadb.dbuilder.ability
import pokediadb.dbuilder.move
import pokediadb.dbuilder.pokemon
| 25.571429 | 33 | 0.860335 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0.078212 |
e35b469d7625c1fa8f422ae121b4eaab1ed606da | 10,171 | py | Python | origin/app_bb_modifier.py | nukeguys/myutil | 65d0aff36ec45bffbd2e52fea0fabfbabd5609b1 | [
"Apache-2.0"
] | null | null | null | origin/app_bb_modifier.py | nukeguys/myutil | 65d0aff36ec45bffbd2e52fea0fabfbabd5609b1 | [
"Apache-2.0"
] | null | null | null | origin/app_bb_modifier.py | nukeguys/myutil | 65d0aff36ec45bffbd2e52fea0fabfbabd5609b1 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
import sys
import os
import io
from orderedset import OrderedSet
from shell import Shell
import logpath as LogPath
VERSION = '1.1'
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
current_path... | 39.730469 | 125 | 0.534756 | 9,046 | 0.889391 | 0 | 0 | 0 | 0 | 0 | 0 | 2,166 | 0.212958 |
e35b94ca7170c796ccad0fbd61ea4ee542cd52e0 | 3,514 | py | Python | gamebike/controlmapbits.py | johnlpage/gamebike | 429736d0238dca2961763f2a33d8e4e72ed97364 | [
"Apache-2.0"
] | null | null | null | gamebike/controlmapbits.py | johnlpage/gamebike | 429736d0238dca2961763f2a33d8e4e72ed97364 | [
"Apache-2.0"
] | null | null | null | gamebike/controlmapbits.py | johnlpage/gamebike | 429736d0238dca2961763f2a33d8e4e72ed97364 | [
"Apache-2.0"
] | null | null | null | # These were used when I was trying to map between controllers
# To map to a wheel - but was defeated in that by using a driver
# 2021 comment (What did I mean there?)
GAMEPAD_TRIANGLE = (0, 0x08)
GAMEPAD_CIRCLE = (0, 0x04)
GAMEPAD_CROSS = (0, 0x02)
GAMEPAD_SQUARE = (0, 0x01)
GAMEPAD_DPAD_MASK = 0x0F
GAMEPAD_DPAD_NON... | 24.746479 | 79 | 0.726807 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 479 | 0.136312 |
e35c3059ee54c88a4dcfc9000cdd58922b31c667 | 4,185 | py | Python | conveyordashboard/volumes/tables.py | Hybrid-Cloud/birdie-dashboard | a3dc370c50ef9f33498a8ed4180ff5009532a79f | [
"Apache-2.0"
] | null | null | null | conveyordashboard/volumes/tables.py | Hybrid-Cloud/birdie-dashboard | a3dc370c50ef9f33498a8ed4180ff5009532a79f | [
"Apache-2.0"
] | null | null | null | conveyordashboard/volumes/tables.py | Hybrid-Cloud/birdie-dashboard | a3dc370c50ef9f33498a8ed4180ff5009532a79f | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2017 Huawei, 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 a... | 35.769231 | 78 | 0.61601 | 2,817 | 0.673118 | 0 | 0 | 0 | 0 | 0 | 0 | 1,069 | 0.255436 |
e35f9878c2b4e671e6f25e427a7cdba3e0466f0b | 9,046 | py | Python | tools/tver/tver.py | jackyzy823/restrictionbreaker | 1aabce0c98c50782a592fa6c91abd72e82e59a6a | [
"Unlicense"
] | 5 | 2019-05-29T21:34:34.000Z | 2021-07-25T10:58:57.000Z | tools/tver/tver.py | jackyzy823/restrictionbreaker | 1aabce0c98c50782a592fa6c91abd72e82e59a6a | [
"Unlicense"
] | null | null | null | tools/tver/tver.py | jackyzy823/restrictionbreaker | 1aabce0c98c50782a592fa6c91abd72e82e59a6a | [
"Unlicense"
] | 1 | 2020-06-25T14:14:41.000Z | 2020-06-25T14:14:41.000Z | import requests
import re
import sqlite3
db =sqlite3.connect("db_tver.db",check_same_thread =False)
cur = db.cursor()
cur.execute(
'''CREATE TABLE if not exists `tver` (
`reference_id` TEXT NOT NULL,
`service` TEXT NOT NULL,
`player_id` TEXT NOT NULL,
`name` TEXT NOT NULL,
`title` TEXT,
... | 41.118182 | 272 | 0.624254 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,722 | 0.521999 |
e360941b07ce2d49e4d682a79c218a27dc642b96 | 1,696 | py | Python | tests/test_init.py | nuvolos-cloud/resolos | 0918066cab7b11ef04ae005f3e052b14a65ded68 | [
"MIT"
] | 1 | 2021-11-30T06:47:24.000Z | 2021-11-30T06:47:24.000Z | tests/test_init.py | nuvolos-cloud/resolos | 0918066cab7b11ef04ae005f3e052b14a65ded68 | [
"MIT"
] | 1 | 2021-04-08T12:56:39.000Z | 2021-04-08T12:56:39.000Z | tests/test_init.py | nuvolos-cloud/resolos | 0918066cab7b11ef04ae005f3e052b14a65ded68 | [
"MIT"
] | null | null | null | from pathlib import Path
from click.testing import CliRunner
from resolos.interface import res, res_run
from resolos.shell import run_shell_cmd
from tests.common import verify_result
import logging
logger = logging.getLogger(__name__)
def test_init_empty():
runner = CliRunner()
with runner.isolated_filesyste... | 34.612245 | 108 | 0.595519 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 401 | 0.236439 |
e3619a35a7b1327801ed3520deafd02b23723cdc | 946 | py | Python | performence/get_flops.py | idealboy/mmsr | f8284e9fb977a74db1904e6034b768805845e138 | [
"Apache-2.0"
] | 2 | 2020-08-05T05:13:14.000Z | 2020-11-10T03:37:48.000Z | performence/get_flops.py | idealboy/mmsr | f8284e9fb977a74db1904e6034b768805845e138 | [
"Apache-2.0"
] | null | null | null | performence/get_flops.py | idealboy/mmsr | f8284e9fb977a74db1904e6034b768805845e138 | [
"Apache-2.0"
] | null | null | null | import os
import sys
op_name = []
with open("name.txt") as lines:
for line in lines:
line = line.strip()
op_name.append(line)
with open("shape.txt") as lines:
index = 0
for line in lines:
name = op_name[index]
line = line.strip()
items = line.split("\t")
if "conv" in name:
input_shape = [int(s) for ... | 32.62069 | 138 | 0.605708 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 78 | 0.082452 |
e3621a99c91f66bf8b690df838e64f5433dfeefe | 6,086 | py | Python | pan/mesh_bee_wrapper.py | KillingJacky/CloudPan | 128f438b8d84c734aad94ad3e03f6c3aa12b66af | [
"MIT"
] | 1 | 2016-08-29T14:28:45.000Z | 2016-08-29T14:28:45.000Z | pan/mesh_bee_wrapper.py | KillingJacky/CloudPan | 128f438b8d84c734aad94ad3e03f6c3aa12b66af | [
"MIT"
] | null | null | null | pan/mesh_bee_wrapper.py | KillingJacky/CloudPan | 128f438b8d84c734aad94ad3e03f6c3aa12b66af | [
"MIT"
] | null | null | null | # Wrapper for Mesh Bee library
# helping to easier communicate with Mesh Bee module
#
# Copyright (C) 2014 at seeedstudio
# Author: Jack Shao (jacky.shaoxg@gmail.com)
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associate... | 34.977011 | 141 | 0.565067 | 4,636 | 0.761748 | 0 | 0 | 0 | 0 | 0 | 0 | 2,124 | 0.348998 |
e36654005301b9cf41913be091e578a74c259424 | 1,669 | py | Python | pythonapm/collector/test_reqhandler.py | nextapm/pythonapm | ddd8ad374e4f268516fc81f0bf710206565b737e | [
"FTL"
] | null | null | null | pythonapm/collector/test_reqhandler.py | nextapm/pythonapm | ddd8ad374e4f268516fc81f0bf710206565b737e | [
"FTL"
] | null | null | null | pythonapm/collector/test_reqhandler.py | nextapm/pythonapm | ddd8ad374e4f268516fc81f0bf710206565b737e | [
"FTL"
] | null | null | null | import unittest
import json
import requests
from unittest import mock
from .reqhandler import send_req
from pythonapm.agent import Agent
from pythonapm import constants
class Resp:
def __init__(self):
self.data = json.dumps({'txn':'success'})
def json(self):
return json.loads(self.data)
cl... | 37.931818 | 233 | 0.711803 | 1,490 | 0.89275 | 0 | 0 | 1,113 | 0.666866 | 0 | 0 | 493 | 0.295386 |
e366e2fcb39a47a49999de24a158d9a70e017103 | 277 | py | Python | app/admin.py | hbuiOnline/AMS | d9118aee7b5ddd90d54bf4cf7f5cdd11c8e4a511 | [
"MIT"
] | null | null | null | app/admin.py | hbuiOnline/AMS | d9118aee7b5ddd90d54bf4cf7f5cdd11c8e4a511 | [
"MIT"
] | null | null | null | app/admin.py | hbuiOnline/AMS | d9118aee7b5ddd90d54bf4cf7f5cdd11c8e4a511 | [
"MIT"
] | null | null | null | from django.contrib import admin
# Register your models here.
from .models import * # To import all the model from .models, then specify those in register
admin.site.register(Customer)
admin.site.register(Staff)
admin.site.register(Service)
admin.site.register(Appointment) | 27.7 | 93 | 0.794224 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 98 | 0.353791 |
e36726ae66238ed268d95c0acb72decccf95ea5d | 17,263 | py | Python | static/brythonlib/cs1robots/worlds_data.py | pythonpad/vue-pythonpad-runner | 52decba9607b3b7b050ee0bf6dd4ef07ae644587 | [
"MIT"
] | 3 | 2021-01-26T16:18:45.000Z | 2021-09-15T00:57:12.000Z | static/brythonlib/cs1robots/worlds_data.py | pythonpad/vue-pythonpad-runner | 52decba9607b3b7b050ee0bf6dd4ef07ae644587 | [
"MIT"
] | null | null | null | static/brythonlib/cs1robots/worlds_data.py | pythonpad/vue-pythonpad-runner | 52decba9607b3b7b050ee0bf6dd4ef07ae644587 | [
"MIT"
] | 2 | 2021-01-26T16:18:47.000Z | 2021-10-21T20:45:20.000Z | def conv_world(kaist_world_dict):
pieces = {}
for (sx, sy), count in kaist_world_dict['beepers'].items():
for i in range(count):
beeper_id = len(pieces)
pieces[beeper_id] = {
'type': 'beeper',
'piece_type': 'marker',
'id': beeper_... | 60.36014 | 635 | 0.333835 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,836 | 0.164282 |
e369c6172f4572b618818bae53263220f4153bc2 | 934 | py | Python | util/label.py | bluehackmaster/bl-api-objdetect | dc8b514e62346904c3b9ab7e88987461721dd6b0 | [
"Apache-2.0"
] | null | null | null | util/label.py | bluehackmaster/bl-api-objdetect | dc8b514e62346904c3b9ab7e88987461721dd6b0 | [
"Apache-2.0"
] | 16 | 2020-01-28T21:56:54.000Z | 2022-03-11T23:15:09.000Z | util/label.py | bluehackmaster/bl-api-objdetect | dc8b514e62346904c3b9ab7e88987461721dd6b0 | [
"Apache-2.0"
] | 1 | 2017-10-17T04:52:08.000Z | 2017-10-17T04:52:08.000Z |
def convert_class_to_code(label_map,
max_num_classes,
use_display_name=True):
categories = []
list_of_ids_already_added = []
if not label_map:
label_id_offset = 1
for class_id in range(max_num_classes):
categories.append({
'id': class_id +... | 33.357143 | 72 | 0.635974 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 114 | 0.122056 |
e36ae367550f66dd2b4a1cdb03a10bf47b3c6b9c | 5,694 | py | Python | hdp_api/routes/__init__.py | CedricCazinHC/HyperAPI | 789419b95679faf550a57773b9cc57107b2b8504 | [
"BSD-3-Clause"
] | null | null | null | hdp_api/routes/__init__.py | CedricCazinHC/HyperAPI | 789419b95679faf550a57773b9cc57107b2b8504 | [
"BSD-3-Clause"
] | null | null | null | hdp_api/routes/__init__.py | CedricCazinHC/HyperAPI | 789419b95679faf550a57773b9cc57107b2b8504 | [
"BSD-3-Clause"
] | null | null | null | from abc import ABCMeta, abstractproperty, abstractmethod
import inspect
import random
import re
import time
from requests.exceptions import HTTPError
class RoutePathInvalidException(Exception):
def __init__(self, name, value, path, validator):
self.path = path
self.name = name
self.value =... | 31.114754 | 131 | 0.592378 | 5,530 | 0.971198 | 81 | 0.014226 | 1,533 | 0.269231 | 0 | 0 | 693 | 0.121707 |
e36b3c194ac71da00a1987d9f541d4a940300816 | 332 | py | Python | compsocsite/polls/migrations/0108_merge_20180105_1930.py | ReedyChen/opra | 86ce88c7219d92e321cd9aa3d0bc2bf631e4b90f | [
"MIT"
] | 8 | 2017-03-07T19:46:51.000Z | 2021-06-01T01:41:37.000Z | compsocsite/polls/migrations/0108_merge_20180105_1930.py | ReedyChen/opra | 86ce88c7219d92e321cd9aa3d0bc2bf631e4b90f | [
"MIT"
] | null | null | null | compsocsite/polls/migrations/0108_merge_20180105_1930.py | ReedyChen/opra | 86ce88c7219d92e321cd9aa3d0bc2bf631e4b90f | [
"MIT"
] | 9 | 2016-06-09T03:36:20.000Z | 2019-09-11T20:56:23.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-01-06 00:30
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('polls', '0107_auto_20180101_2108'),
('polls', '0107_auto_20180105_1858'),
]
operation... | 19.529412 | 46 | 0.659639 | 184 | 0.554217 | 0 | 0 | 0 | 0 | 0 | 0 | 133 | 0.400602 |
e36c689a2b24e54549cda9f00830211a35aefafa | 5,141 | py | Python | source.py | Sakshisingh05/ClockChian | 21ce1005c83b003a9fc62203d03c50b3e8f70793 | [
"MIT"
] | null | null | null | source.py | Sakshisingh05/ClockChian | 21ce1005c83b003a9fc62203d03c50b3e8f70793 | [
"MIT"
] | null | null | null | source.py | Sakshisingh05/ClockChian | 21ce1005c83b003a9fc62203d03c50b3e8f70793 | [
"MIT"
] | null | null | null | from flask import Flask
from flask import render_template, redirect, url_for
from flask import request
import blockChain
app = Flask(__name__)
@app.route('/', methods=['GET', 'POST'])
def index():
# print(request.method )
if request.method == 'POST':
text = request.form['text']
if len(text) < ... | 29.545977 | 108 | 0.606497 | 0 | 0 | 0 | 0 | 1,036 | 0.201517 | 0 | 0 | 670 | 0.130325 |
e36dc2963b3e15b6183197cc7bce8f0677915722 | 27 | py | Python | rtmp/__init__.py | notnola/pinybot | 8ad579fe5652b42a8fb9486c8d11962f5972f817 | [
"MIT"
] | null | null | null | rtmp/__init__.py | notnola/pinybot | 8ad579fe5652b42a8fb9486c8d11962f5972f817 | [
"MIT"
] | null | null | null | rtmp/__init__.py | notnola/pinybot | 8ad579fe5652b42a8fb9486c8d11962f5972f817 | [
"MIT"
] | 1 | 2019-01-31T01:07:56.000Z | 2019-01-31T01:07:56.000Z | __author__ = 'TechWhizZ199' | 27 | 27 | 0.814815 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0.518519 |
e36e0bc7f72121825603a719d4feff88206f860b | 5,668 | py | Python | download_pinterest_images.py | BrunoKrinski/pinterest_download_tools | c804f83bc97c418ea44f1d179ad9864e90631fe5 | [
"MIT"
] | 1 | 2022-03-07T04:38:26.000Z | 2022-03-07T04:38:26.000Z | download_pinterest_images.py | BrunoKrinski/pinterest_download_tools | c804f83bc97c418ea44f1d179ad9864e90631fe5 | [
"MIT"
] | null | null | null | download_pinterest_images.py | BrunoKrinski/pinterest_download_tools | c804f83bc97c418ea44f1d179ad9864e90631fe5 | [
"MIT"
] | null | null | null | import os
import wget
import time
import argparse
import subprocess
import geckodriver_autoinstaller
import chromedriver_autoinstaller
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver import FirefoxOptions
from selenium.webdriver import DesiredCapabilities
fr... | 35.873418 | 114 | 0.569689 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,580 | 0.278758 |
e36ead0127bc40a1f4670d0eba027d0736c82d0a | 781 | py | Python | kafka_scripts/kafka-producer-stream-algorithm.py | walterjgsp/meaning | 71fd69eab430d364baefb31096c866999de9b4dd | [
"MIT"
] | null | null | null | kafka_scripts/kafka-producer-stream-algorithm.py | walterjgsp/meaning | 71fd69eab430d364baefb31096c866999de9b4dd | [
"MIT"
] | null | null | null | kafka_scripts/kafka-producer-stream-algorithm.py | walterjgsp/meaning | 71fd69eab430d364baefb31096c866999de9b4dd | [
"MIT"
] | null | null | null | from kafka import KafkaProducer
import json
import random
from time import sleep
from datetime import datetime
# Create an instance of the Kafka producer
producer = KafkaProducer(bootstrap_servers='kafka-server:9092',
value_serializer=lambda m: json.dumps(
m).encod... | 37.190476 | 97 | 0.658131 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 313 | 0.400768 |
e3727e0484521064be92f2b66e6c5b9dd289ef54 | 897 | py | Python | kinsumer/helpers.py | ungikim/kinsumer | 01bd9626d985bc3c239b979f0d98094f78cc102f | [
"MIT"
] | 5 | 2018-03-09T05:16:38.000Z | 2021-11-12T11:56:18.000Z | kinsumer/helpers.py | ungikim/kinsumer | 01bd9626d985bc3c239b979f0d98094f78cc102f | [
"MIT"
] | 2 | 2017-10-16T06:38:28.000Z | 2017-10-18T08:05:37.000Z | kinsumer/helpers.py | balancehero/kinsumer | 01bd9626d985bc3c239b979f0d98094f78cc102f | [
"MIT"
] | 1 | 2017-10-18T08:15:28.000Z | 2017-10-18T08:15:28.000Z | """:mod:`kinsumer.helpers` --- Implements various helpers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"""
from threading import RLock
_missing = object()
class locked_cached_property(object):
def __init__(self, func, name=None, doc=None):
self.__name__ = name or func.__name__
self.... | 27.181818 | 61 | 0.570792 | 596 | 0.664437 | 0 | 0 | 0 | 0 | 0 | 0 | 120 | 0.133779 |
e372ca50f1bbb91d278a5aa868f3b3246267b836 | 4,886 | py | Python | python/tests/pyspark/feature/string_map_test.py | voganrc/mleap | 68cbf375968d9f55acb1d673a4c2390602c0274a | [
"Apache-2.0"
] | 1,401 | 2017-01-07T03:34:44.000Z | 2022-03-31T22:17:58.000Z | python/tests/pyspark/feature/string_map_test.py | liang0/mleap | 41dbde99e389873fc609083cce5d610cea9e9170 | [
"Apache-2.0"
] | 546 | 2016-12-30T19:10:55.000Z | 2022-03-31T16:56:52.000Z | python/tests/pyspark/feature/string_map_test.py | liang0/mleap | 41dbde99e389873fc609083cce5d610cea9e9170 | [
"Apache-2.0"
] | 326 | 2017-01-24T10:35:41.000Z | 2022-03-15T15:53:17.000Z | import os
import tempfile
import unittest
from py4j.protocol import Py4JJavaError
from pyspark.ml import Pipeline
from pyspark.sql import types as t
from mleap.pyspark.feature.string_map import StringMap
from mleap.pyspark.spark_support import SimpleSparkSerializer
from tests.pyspark.lib.assertions import assert_df
f... | 36.192593 | 107 | 0.657388 | 3,654 | 0.747851 | 0 | 0 | 245 | 0.050143 | 0 | 0 | 427 | 0.087393 |
e374829b389cef040daa81ebe91954032d3a7a55 | 72 | py | Python | __init__.py | hoel-bagard/yolact | 028fd121e94c18531243a73eb4c0d443fc38a079 | [
"MIT"
] | null | null | null | __init__.py | hoel-bagard/yolact | 028fd121e94c18531243a73eb4c0d443fc38a079 | [
"MIT"
] | null | null | null | __init__.py | hoel-bagard/yolact | 028fd121e94c18531243a73eb4c0d443fc38a079 | [
"MIT"
] | null | null | null | from .predict import YolactK
from .data import *
__version__ = "0.1.0"
| 14.4 | 28 | 0.722222 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0.097222 |
e374d42c0a5b986cfc32f92436749b7345991388 | 4,210 | py | Python | stocks.py | nicojapas/algorithmic_trading | 46b2b59253638f15858e44b4ebae39eb222a4619 | [
"MIT"
] | 1 | 2021-03-16T12:11:47.000Z | 2021-03-16T12:11:47.000Z | stocks.py | nicojapas/algorithmic_trading | 46b2b59253638f15858e44b4ebae39eb222a4619 | [
"MIT"
] | null | null | null | stocks.py | nicojapas/algorithmic_trading | 46b2b59253638f15858e44b4ebae39eb222a4619 | [
"MIT"
] | 1 | 2022-01-14T21:48:08.000Z | 2022-01-14T21:48:08.000Z | #!/usr/bin/env python
# coding: utf-8
# In[6]:
import pandas as pd
import io
import requests
import time
import random
# In[3]:
# gets the hidden API keys
api_key = pd.read_csv('secrets.csv').api_key.to_string().split()[1]
# In[124]:
# gets data using user's parameters
def get_data(symbol, interval):
"""... | 24.195402 | 113 | 0.611639 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,897 | 0.688124 |
e3773931c3c2274119d47a9e56c7b5427c5ed618 | 241 | py | Python | python/sock-merchant.py | gajubadge11/hackerrank-3 | 132a5019b7ed21507bb95b5063fa66c446b0eff7 | [
"MIT"
] | 21 | 2015-02-09T18:08:38.000Z | 2021-11-08T15:00:48.000Z | python/sock-merchant.py | gajubadge11/hackerrank-3 | 132a5019b7ed21507bb95b5063fa66c446b0eff7 | [
"MIT"
] | 7 | 2020-04-12T23:00:19.000Z | 2021-01-30T23:44:24.000Z | python/sock-merchant.py | gajubadge11/hackerrank-3 | 132a5019b7ed21507bb95b5063fa66c446b0eff7 | [
"MIT"
] | 27 | 2015-07-22T18:08:12.000Z | 2022-02-28T19:50:26.000Z | #!/bin/python3
from collections import Counter
def pairs(socks):
return sum(list(map(lambda sock: sock // 2, Counter(socks).values())))
_ = int(input().strip())
socks = list(map(int, input().strip().split(' ')))
print(pairs(socks))
| 18.538462 | 74 | 0.659751 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 17 | 0.070539 |
e37917c4d561fd8d9c4ecc0de859e1c2d60e6398 | 1,834 | py | Python | statdpwrapper/experiments/exp_without_pp.py | barryZZJ/dp-sniper | 71a3fc06f3fc319b023bde9aad8f05b8c5a47a80 | [
"MIT"
] | 13 | 2021-03-30T15:39:35.000Z | 2022-02-21T08:30:45.000Z | statdpwrapper/experiments/exp_without_pp.py | barryZZJ/dp-sniper | 71a3fc06f3fc319b023bde9aad8f05b8c5a47a80 | [
"MIT"
] | null | null | null | statdpwrapper/experiments/exp_without_pp.py | barryZZJ/dp-sniper | 71a3fc06f3fc319b023bde9aad8f05b8c5a47a80 | [
"MIT"
] | 4 | 2021-06-30T08:37:45.000Z | 2022-03-05T03:21:14.000Z | import os
from dpsniper.utils.my_multiprocessing import initialize_parallel_executor
from dpsniper.utils.paths import get_output_directory, set_output_directory
from statdpwrapper.algorithms_ext import *
from statdpwrapper.experiments.base import run_statdp
from statdpwrapper.experiments.mechanism_config import statd... | 41.681818 | 99 | 0.768811 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 234 | 0.12759 |
e37a1fef8ba0d57e0296169fc7cb4fee0cc149e2 | 1,134 | py | Python | ants/registration/symimg.py | ncullen93/ANTsPy | a4c990dcd5b7445a45ce7b366ee018c7350e7d9f | [
"Apache-2.0"
] | 3 | 2018-06-07T19:11:47.000Z | 2019-06-10T05:24:06.000Z | ants/registration/symimg.py | ncullen93/ANTsPy | a4c990dcd5b7445a45ce7b366ee018c7350e7d9f | [
"Apache-2.0"
] | null | null | null | ants/registration/symimg.py | ncullen93/ANTsPy | a4c990dcd5b7445a45ce7b366ee018c7350e7d9f | [
"Apache-2.0"
] | 1 | 2019-04-04T06:18:44.000Z | 2019-04-04T06:18:44.000Z |
__all__ = ['symimg']
from tempfile import mktemp
from .reflect_image import reflect_image
from .interface import registration
from .apply_transforms import apply_transforms
from ..core import image_io as iio
def symimg(img, gs=0.25):
"""
Symmetrize an image
Example
-------
>>> import ants
... | 27.658537 | 95 | 0.636684 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 295 | 0.260141 |
e37b4614ad6f2375762685c14b508a5358b41194 | 184 | py | Python | CRONtest/hello.py | liu2z2/TutorCal | 41cd0272d59cd1cca439cfef178485d0d8096820 | [
"MIT"
] | null | null | null | CRONtest/hello.py | liu2z2/TutorCal | 41cd0272d59cd1cca439cfef178485d0d8096820 | [
"MIT"
] | null | null | null | CRONtest/hello.py | liu2z2/TutorCal | 41cd0272d59cd1cca439cfef178485d0d8096820 | [
"MIT"
] | null | null | null | import datetime
time=datetime.datetime.today().strftime("%H-%M-%S")
text_file = open("/home/pi/TutorCal/CRONtest/"+time+".txt", "w")
text_file.write("Hello world!")
text_file.close() | 26.285714 | 64 | 0.711957 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 62 | 0.336957 |
e37b5fbe24287ac8297fbe7f44ed3c806e40c97b | 3,775 | py | Python | src/facrecog_core.py | GaussQR/cs305-g01 | 06b1ad9ba2d05e7c76ee10eb053e9d091b070d6d | [
"MIT"
] | null | null | null | src/facrecog_core.py | GaussQR/cs305-g01 | 06b1ad9ba2d05e7c76ee10eb053e9d091b070d6d | [
"MIT"
] | null | null | null | src/facrecog_core.py | GaussQR/cs305-g01 | 06b1ad9ba2d05e7c76ee10eb053e9d091b070d6d | [
"MIT"
] | null | null | null | import dlib
import face_recognition
import glob
import pickle
import cv2
import numpy as np
import os
from PIL import Image,ImageFont, ImageDraw, ImageEnhance
def add_target_faces(path):
faces = {}
for img in glob.glob(path + "/*.jpg"):
print("encoding img...")
f_image = face_recognition.load_image_... | 41.944444 | 115 | 0.614834 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 612 | 0.162119 |
e37b884d8c5f1d75d2683c37c9063a16300e4321 | 117 | py | Python | src/aioprometheus/formats/__init__.py | jbunce12/aioprometheus | d6dec47b05cab04901ffb8d2016d659927e02311 | [
"MIT"
] | null | null | null | src/aioprometheus/formats/__init__.py | jbunce12/aioprometheus | d6dec47b05cab04901ffb8d2016d659927e02311 | [
"MIT"
] | null | null | null | src/aioprometheus/formats/__init__.py | jbunce12/aioprometheus | d6dec47b05cab04901ffb8d2016d659927e02311 | [
"MIT"
] | null | null | null | from . import text
from .base import IFormatter
try:
from . import binary
except ImportError:
binary = None
| 14.625 | 28 | 0.717949 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e37d41115e68a3191b6a2c67d0ba9d33fd342473 | 378 | py | Python | pulpo_forms_example/urls.py | pulpocoders/pulpo-forms-examples | 8b9121b8e323b9432d17f7fc0812405668df3b04 | [
"Apache-2.0"
] | 3 | 2015-11-05T00:23:32.000Z | 2017-05-02T15:24:11.000Z | pulpo_forms_example/urls.py | pulpocoders/pulpo-forms-examples | 8b9121b8e323b9432d17f7fc0812405668df3b04 | [
"Apache-2.0"
] | null | null | null | pulpo_forms_example/urls.py | pulpocoders/pulpo-forms-examples | 8b9121b8e323b9432d17f7fc0812405668df3b04 | [
"Apache-2.0"
] | 1 | 2015-08-01T02:03:23.000Z | 2015-08-01T02:03:23.000Z | from django.conf.urls import include, url
from django.contrib import admin
urlpatterns = [
url(r'^example/', include('pulpo_example.urls')),
url(r'^pulpo/', include('pulpo_forms.urls'), name='base'),
url(r'^admin/', include(admin.site.urls)),
url(r'^model_field_form/$',
'pulpo_forms.views.rend... | 29.076923 | 62 | 0.656085 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 160 | 0.42328 |
e37dccf1196dd3e409502f652bd89e454eb6a2b8 | 2,903 | py | Python | backup_tool/utils.py | tnoff/backup-tool | 114d066b0aeaa9dab9e2594f42a520839587df20 | [
"BSD-2-Clause"
] | null | null | null | backup_tool/utils.py | tnoff/backup-tool | 114d066b0aeaa9dab9e2594f42a520839587df20 | [
"BSD-2-Clause"
] | null | null | null | backup_tool/utils.py | tnoff/backup-tool | 114d066b0aeaa9dab9e2594f42a520839587df20 | [
"BSD-2-Clause"
] | null | null | null | import codecs
from contextlib import contextmanager
import hashlib
import logging
from logging.handlers import RotatingFileHandler
import random
import string
from pathlib import Path
def random_string(length=32, prefix='', suffix=''):
'''
Generate random string
length : Length of string
prefix :... | 31.901099 | 96 | 0.613503 | 0 | 0 | 765 | 0.26352 | 781 | 0.269032 | 0 | 0 | 727 | 0.250431 |
e37ecee0bdcbaf77c2d3a8c1147419b338c8e1b7 | 1,573 | py | Python | invmonInfra/models/inventoryModels.py | jtom38/invmon-api | 28f163bef47ee5c95bac0f40198e25e44090758f | [
"MIT"
] | null | null | null | invmonInfra/models/inventoryModels.py | jtom38/invmon-api | 28f163bef47ee5c95bac0f40198e25e44090758f | [
"MIT"
] | 16 | 2021-12-09T06:22:29.000Z | 2022-03-25T06:26:01.000Z | invmonInfra/models/inventoryModels.py | jtom38/invmon-api | 28f163bef47ee5c95bac0f40198e25e44090758f | [
"MIT"
] | null | null | null | from logging import lastResort
from pydantic import BaseModel
from invmonApi.database import Base
from invmonInfra.enum import InventoryLastStatusEnum
from sqlalchemy import Column, String, Boolean
from uuid import uuid4
class InventorySqlModel(Base):
__tablename__ = "inventory"
id = Column(String, primary_ke... | 25.370968 | 121 | 0.628099 | 1,334 | 0.848061 | 0 | 0 | 0 | 0 | 0 | 0 | 15 | 0.009536 |
e37f1a70ff938fa436f4a4d3d93cb8fdc066ba63 | 2,201 | py | Python | chatette/parsing/lexing/rule_slot_val.py | ziligy/Chatette | 014c0b0a991bf66cb69fc6a69e0f6c298974eec9 | [
"MIT"
] | 263 | 2018-09-06T14:46:29.000Z | 2022-03-31T08:40:19.000Z | chatette/parsing/lexing/rule_slot_val.py | ziligy/Chatette | 014c0b0a991bf66cb69fc6a69e0f6c298974eec9 | [
"MIT"
] | 50 | 2018-09-06T14:50:18.000Z | 2021-11-16T03:54:27.000Z | chatette/parsing/lexing/rule_slot_val.py | ziligy/Chatette | 014c0b0a991bf66cb69fc6a69e0f6c298974eec9 | [
"MIT"
] | 49 | 2018-09-18T23:15:09.000Z | 2022-03-02T11:23:08.000Z | # coding: utf-8
"""
Module `chatette.parsing.lexing.rule_slot_val`
Contains the definition of the class that represents the lexing rule
to tokenize a slot value being set within a unit rule (only for a slot).
"""
from chatette.parsing.lexing.lexing_rule import LexingRule
from chatette.parsing.lexing import LexicalToke... | 37.948276 | 78 | 0.598364 | 1,795 | 0.815538 | 0 | 0 | 0 | 0 | 0 | 0 | 535 | 0.243071 |
e37fa4448f670de81c2e240c869389511aaf6b49 | 441 | py | Python | python算法/6.5如何根据已知随机数生成函数计算新的随机数.py | RobinYaoWenbin/Python-CommonCode | 1ee714541f2fd9c8b96d018d3d4eb94f4edc812a | [
"MIT"
] | 12 | 2020-09-28T03:25:03.000Z | 2022-03-20T07:44:09.000Z | python算法/6.5如何根据已知随机数生成函数计算新的随机数.py | RobinYaoWenbin/Python-CommonCode | 1ee714541f2fd9c8b96d018d3d4eb94f4edc812a | [
"MIT"
] | null | null | null | python算法/6.5如何根据已知随机数生成函数计算新的随机数.py | RobinYaoWenbin/Python-CommonCode | 1ee714541f2fd9c8b96d018d3d4eb94f4edc812a | [
"MIT"
] | 21 | 2020-03-19T00:44:35.000Z | 2022-01-30T03:46:18.000Z | # -*- coding: utf-8 -*-
"""
Created on Sun Feb 23 20:28:51 2020
@author: Administrator
"""
"""
已知随机数rand7()产生的随机数是整数1~7的均匀分布,如何构造rand10()函数,使其产生的随机数是整数1-10的均匀分布.
"""
import random
def rand7():
return random.randint(1,7)
def rand10():
x = 0
while True:
x = (rand7() - 1) * 7 + ra... | 16.961538 | 67 | 0.535147 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 263 | 0.502868 |
e380169c4e3938481f564cc3fc99e33f8bdaa725 | 26,432 | py | Python | pytropos/internals/values/python_values/python_values.py | helq/pytropos | 497ed5902e6e4912249ca0a46b477f9bfa6ae80a | [
"MIT"
] | 4 | 2019-10-06T18:01:24.000Z | 2020-07-03T05:27:35.000Z | pytropos/internals/values/python_values/python_values.py | helq/pytropos | 497ed5902e6e4912249ca0a46b477f9bfa6ae80a | [
"MIT"
] | 5 | 2021-06-07T15:50:04.000Z | 2021-06-07T15:50:06.000Z | pytropos/internals/values/python_values/python_values.py | helq/pytropos | 497ed5902e6e4912249ca0a46b477f9bfa6ae80a | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
from enum import Enum
from functools import partial
# from math import isinf
from typing import Union, Optional, Any
from typing import Callable, Tuple, Dict, List, Set, Type # noqa: F401
from ..builtin_values import Bool, ops_symbols
from ..abstract_value import AbstractValue
from... | 37.019608 | 99 | 0.589967 | 25,880 | 0.979116 | 0 | 0 | 2,115 | 0.080017 | 0 | 0 | 7,752 | 0.293281 |
e3819ef8cd2690861dd5dfa539b9d90716dabcd3 | 2,249 | py | Python | datasets/utils_cifar10.py | jbinas/fortified-networks | 7db626075a019a6a7d8e2cb7d3a97404a1124c69 | [
"MIT"
] | 5 | 2018-10-29T20:21:58.000Z | 2021-11-19T08:58:18.000Z | datasets/utils_cifar10.py | yaya20160101/fortified-networks | 7db626075a019a6a7d8e2cb7d3a97404a1124c69 | [
"MIT"
] | null | null | null | datasets/utils_cifar10.py | yaya20160101/fortified-networks | 7db626075a019a6a7d8e2cb7d3a97404a1124c69 | [
"MIT"
] | 5 | 2018-06-29T00:37:56.000Z | 2021-05-28T04:00:55.000Z | import keras
import tensorflow as tf
import numpy.random as rng
from keras.datasets import cifar10
from keras.utils import np_utils
def data_cifar10(**kwargs):
"""
Preprocess CIFAR10 dataset
:return:
"""
# These values are specific to CIFAR10
img_rows = 32
img_cols = 32
nb_classes = ... | 29.207792 | 74 | 0.678524 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 549 | 0.244108 |
e382e90eebc5900ceec8c6969e8c5a01efb198a6 | 93 | py | Python | gorden_crawler/utils/country.py | Enmming/gorden_cralwer | 3c279e4f80eaf90f3f03acd31b75cf991952adee | [
"Apache-2.0"
] | 2 | 2019-02-22T13:51:08.000Z | 2020-08-03T14:01:30.000Z | gorden_crawler/utils/country.py | Enmming/gorden_cralwer | 3c279e4f80eaf90f3f03acd31b75cf991952adee | [
"Apache-2.0"
] | null | null | null | gorden_crawler/utils/country.py | Enmming/gorden_cralwer | 3c279e4f80eaf90f3f03acd31b75cf991952adee | [
"Apache-2.0"
] | 1 | 2020-08-03T14:01:32.000Z | 2020-08-03T14:01:32.000Z | #!/usr/bin/python
#-*- coding:utf-8 -*-
from . import const
const.UK = 'UK'
const.US = 'US'
| 13.285714 | 21 | 0.591398 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 46 | 0.494624 |
e3850a968708849ad26d08ad8495038926eabd09 | 248 | py | Python | 9bus.py | sayonsom/Canvass | e59cd68f26722144abc5caf2d7ae1e7389c39ad1 | [
"MIT"
] | 9 | 2018-01-29T10:53:25.000Z | 2021-02-21T19:35:23.000Z | 9bus.py | cyberange-dev0ps/Canvass | e59cd68f26722144abc5caf2d7ae1e7389c39ad1 | [
"MIT"
] | 1 | 2019-06-04T14:43:34.000Z | 2021-07-09T08:35:13.000Z | 9bus.py | cyberange-dev0ps/Canvass | e59cd68f26722144abc5caf2d7ae1e7389c39ad1 | [
"MIT"
] | 12 | 2017-05-04T23:39:10.000Z | 2021-09-25T17:05:00.000Z | # There are copyright holders.
import pandapower as pp
import pandapower.networks as pn
net = pn.case9()
pp.runpp(net)
print ("Canvass NR Power Flow Results At The Buses")
print ("------------------------------------------")
print (net.res_bus) | 22.545455 | 52 | 0.612903 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 119 | 0.479839 |
e388be8ed758ecb9a717bada7d2953a7819ac2aa | 315 | py | Python | archeutils/urls.py | acdh-oeaw/acdh-django-archeutils | d1d560ce739d3e2eeddd080c4d96e7482fefbbc5 | [
"MIT"
] | null | null | null | archeutils/urls.py | acdh-oeaw/acdh-django-archeutils | d1d560ce739d3e2eeddd080c4d96e7482fefbbc5 | [
"MIT"
] | null | null | null | archeutils/urls.py | acdh-oeaw/acdh-django-archeutils | d1d560ce739d3e2eeddd080c4d96e7482fefbbc5 | [
"MIT"
] | null | null | null | from django.urls import include, path
from . import arche_rdf_views
app_name = "archeutils"
urlpatterns = [
path('<app_name>/<model_name>/<pk>', arche_rdf_views.res_as_arche_graph, name='res_as_arche_graph'),
path('<app_name>/<model_name>', arche_rdf_views.qs_as_arche_graph, name='qs_as_arche_graph'),
]
| 31.5 | 104 | 0.75873 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 106 | 0.336508 |
8b4c4b1f780806fe28ac378ba5bc5176a6a833d9 | 763 | py | Python | applications/createEVENT/SimCenterEvent.py | fmckenna/EE-UQ | a1fe96fd000aec933430bda5829c82b5743338c3 | [
"BSD-2-Clause"
] | 1 | 2019-04-30T19:38:17.000Z | 2019-04-30T19:38:17.000Z | applications/createEVENT/SimCenterEvent.py | s-m-amin-ghasemi/EE-UQ | 7eb42d09b59b42fd1256c6d8693cfe46e0b8034b | [
"BSD-2-Clause"
] | 2 | 2018-09-11T01:32:27.000Z | 2018-09-11T23:08:06.000Z | applications/createEVENT/SimCenterEvent.py | s-m-amin-ghasemi/EE-UQ | 7eb42d09b59b42fd1256c6d8693cfe46e0b8034b | [
"BSD-2-Clause"
] | 6 | 2018-05-14T21:45:24.000Z | 2018-10-04T18:13:42.000Z | import sys
from shutil import copyfile
def main():
inputArgs = sys.argv
#First let's process the arguments
argBIM = inputArgs.index("--filenameBIM") + 1
bimFile = inputArgs[argBIM]
argEVENT = inputArgs.index("--filenameEVENT") + 1
eventFile = inputArgs[argEVENT]
argInputFile = inputArg... | 29.346154 | 69 | 0.626474 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 199 | 0.260813 |
8b4cf66930d071ee4505d81a0c0281d51346de46 | 384 | py | Python | zad1_12.py | kamilhabrych/python-semestr5-lista1 | 65faeffe83bcc4706b2818e2e7802d986b19244b | [
"MIT"
] | null | null | null | zad1_12.py | kamilhabrych/python-semestr5-lista1 | 65faeffe83bcc4706b2818e2e7802d986b19244b | [
"MIT"
] | null | null | null | zad1_12.py | kamilhabrych/python-semestr5-lista1 | 65faeffe83bcc4706b2818e2e7802d986b19244b | [
"MIT"
] | null | null | null | x = 2 ** (1/2)
y = 3 ** (1/3)
z = 5 ** (1/5)
print(x)
print(y)
print(z)
print()
if x>y and x>z:
print(x,'jest największa')
elif y>x and y>z:
print(y,'jest największa')
elif z>x and z>y:
print(z,'jest największa')
print()
if x<y and x<z:
print(x,'jest najmniejsza')
elif y<x and y<z:
print(y,'jest... | 16 | 31 | 0.585938 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 108 | 0.27907 |
8b4d9675e98a4abeceff47ef0ef4214b548c119b | 259 | py | Python | 2-mouth02/day03/exe03.py | gary-gggggg/gary | d8ba30ea4bc2b662a2d6a87d247f813e5680d63e | [
"Apache-2.0"
] | 4 | 2021-02-01T10:28:11.000Z | 2021-02-01T10:34:40.000Z | 2-mouth02/day03/exe03.py | gary-gggggg/gary | d8ba30ea4bc2b662a2d6a87d247f813e5680d63e | [
"Apache-2.0"
] | null | null | null | 2-mouth02/day03/exe03.py | gary-gggggg/gary | d8ba30ea4bc2b662a2d6a87d247f813e5680d63e | [
"Apache-2.0"
] | null | null | null | title=open("file.txt","w")
title.write("《悯农》\n" )
title.close()
sum=0
while 1:
sentence=open("file.txt","a")
sum+=1
if sum>4:
sentence.close()
break
k =input("请输入句子(包括标点符号):")
sentence.write(f"{k}\n")
sentence.close()
| 17.266667 | 33 | 0.555985 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 94 | 0.318644 |
8b4d9f6ab5c3257761c9eb3fa1e62a13d1f8d05b | 1,635 | py | Python | scanplans/grid_scan.py | st3107/bluesky_scanplans | 2ab126c0b7f4427a10d42cf59ea004770c433383 | [
"BSD-3-Clause"
] | null | null | null | scanplans/grid_scan.py | st3107/bluesky_scanplans | 2ab126c0b7f4427a10d42cf59ea004770c433383 | [
"BSD-3-Clause"
] | null | null | null | scanplans/grid_scan.py | st3107/bluesky_scanplans | 2ab126c0b7f4427a10d42cf59ea004770c433383 | [
"BSD-3-Clause"
] | null | null | null | import bluesky.plan_stubs as bps
import bluesky.plans as bp
from xpdacq.beamtime import _configure_area_det
from xpdacq.glbl import glbl
from xpdacq.xpdacq import open_shutter_stub, close_shutter_stub
from xpdacq.xpdacq_conf import xpd_configuration
def acq_rel_grid_scan(
dets: list,
exposure: float,
wait... | 34.0625 | 76 | 0.688685 | 0 | 0 | 1,182 | 0.722936 | 0 | 0 | 0 | 0 | 427 | 0.261162 |
8b4e6b2b167aebf419baed2ece989c7a96978324 | 5,172 | py | Python | kolibri/logger/migrations/0001_initial_redone.py | aronasorman/kolibri | 940672bc849cd0b26d7d84ee08a34f072c4f6cd6 | [
"MIT"
] | 1 | 2021-11-09T11:30:12.000Z | 2021-11-09T11:30:12.000Z | kolibri/logger/migrations/0001_initial_redone.py | aronasorman/kolibri | 940672bc849cd0b26d7d84ee08a34f072c4f6cd6 | [
"MIT"
] | 2 | 2017-02-08T00:22:04.000Z | 2017-06-12T20:27:44.000Z | kolibri/logger/migrations/0001_initial_redone.py | aronasorman/kolibri | 940672bc849cd0b26d7d84ee08a34f072c4f6cd6 | [
"MIT"
] | 1 | 2020-05-21T18:17:55.000Z | 2020-05-21T18:17:55.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-08-09 17:25
from __future__ import unicode_literals
import django.core.validators
import django.db.models.deletion
import kolibri.content.models
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependen... | 56.835165 | 176 | 0.616589 | 4,923 | 0.951856 | 0 | 0 | 0 | 0 | 0 | 0 | 897 | 0.173434 |
8b4e779744d51e5ebec4b797f93c9f1ab0c716a1 | 555 | py | Python | setup.py | kennydo/pick-my-stick | 17bb4fbb35cc9637a838f5bdd91caeb7458b43bd | [
"MIT"
] | null | null | null | setup.py | kennydo/pick-my-stick | 17bb4fbb35cc9637a838f5bdd91caeb7458b43bd | [
"MIT"
] | null | null | null | setup.py | kennydo/pick-my-stick | 17bb4fbb35cc9637a838f5bdd91caeb7458b43bd | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
setup(
name='picker-my-sticker',
version='0.0.1',
description='Stickers for Slack',
long_description='S t i c k e r s',
url='https://github.com/kennydo/pick-my-stick',
author='Kenny Do',
author_email='chinesedewey@gmail.com',
classifiers=[
... | 25.227273 | 51 | 0.610811 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 271 | 0.488288 |
8b504f70d7990baf24d2b512d627ec9c1ca831af | 223 | py | Python | src/common/json_attributes.py | rosenloecher-it/enocean-mqtt-bridge | d56e41a1a67e70bdeb1aa46d10f48ed5a12ca59c | [
"MIT"
] | 1 | 2020-12-01T17:10:14.000Z | 2020-12-01T17:10:14.000Z | src/common/json_attributes.py | rosenloecher-it/enocean-mqtt-bridge | d56e41a1a67e70bdeb1aa46d10f48ed5a12ca59c | [
"MIT"
] | 1 | 2021-09-19T13:38:02.000Z | 2021-09-19T13:38:02.000Z | src/common/json_attributes.py | rosenloecher-it/enocean-mqtt-bridge | d56e41a1a67e70bdeb1aa46d10f48ed5a12ca59c | [
"MIT"
] | null | null | null |
class JsonAttributes:
TIMESTAMP = "timestamp"
STATE = "state"
DIM_STATE = "dim_state"
SWITCH_STATE = "switch_state"
VALUE = "value"
BUTTON = "button"
SINCE = "since"
DEVICE = "device"
| 13.117647 | 33 | 0.596413 | 221 | 0.991031 | 0 | 0 | 0 | 0 | 0 | 0 | 73 | 0.327354 |
8b528bad86c27520698632ef706d6564180389c3 | 10,562 | py | Python | helpers.py | TimHeiszwolf/NBPGravity | b054b189f5493ad8ec094786f16f5525c117a127 | [
"MIT"
] | 1 | 2022-03-08T07:16:53.000Z | 2022-03-08T07:16:53.000Z | helpers.py | TimHeiszwolf/NBPGravity | b054b189f5493ad8ec094786f16f5525c117a127 | [
"MIT"
] | null | null | null | helpers.py | TimHeiszwolf/NBPGravity | b054b189f5493ad8ec094786f16f5525c117a127 | [
"MIT"
] | null | null | null | import numpy as np
import time
import matplotlib.pyplot as plt
import imageio
from scipy.optimize import fsolve
from body import Body
def get_position_from_Kepler(semimajor_axis, eccentricity, inclination, ascending_node, argument_of_periapsis, mean_anomaly, mass_orbit, G=6.67430 * 10**(-11)):
"""
Get the pos... | 44.944681 | 194 | 0.639841 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,588 | 0.245029 |
8b569282b5d41a4fb5d9ee37ff203ff019b8b666 | 10,897 | py | Python | opttrack/lib/ui/edit_handlers.py | aisthesis/opttrack | 17e0c7740ea43e0f07166e30d689b106d0319d0b | [
"MIT"
] | null | null | null | opttrack/lib/ui/edit_handlers.py | aisthesis/opttrack | 17e0c7740ea43e0f07166e30d689b106d0319d0b | [
"MIT"
] | 2 | 2016-03-30T02:50:31.000Z | 2016-03-30T16:18:23.000Z | opttrack/lib/ui/edit_handlers.py | aisthesis/opttrack | 17e0c7740ea43e0f07166e30d689b106d0319d0b | [
"MIT"
] | null | null | null | """
Copyright (c) 2015 Marshall Farrier
license http://opensource.org/licenses/MIT
lib/ui/handlers.py
Handlers for edit menu
"""
from bson.codec_options import CodecOptions
import datetime as dt
from functools import partial
import json
from pymongo.errors import BulkWriteError
from ..dbschema import SPREADS
from ... | 37.968641 | 112 | 0.623383 | 6,819 | 0.625769 | 0 | 0 | 0 | 0 | 0 | 0 | 2,429 | 0.222905 |
8b58c384ea2a5cec4051907804ed34709b049103 | 4,126 | py | Python | server/music/api.py | tricelex/zc_plugin_youtube_music_video | f3389cafc9e1a6b0fd2d94e0af77e9beec678282 | [
"MIT"
] | null | null | null | server/music/api.py | tricelex/zc_plugin_youtube_music_video | f3389cafc9e1a6b0fd2d94e0af77e9beec678282 | [
"MIT"
] | null | null | null | server/music/api.py | tricelex/zc_plugin_youtube_music_video | f3389cafc9e1a6b0fd2d94e0af77e9beec678282 | [
"MIT"
] | null | null | null | # class SidebarView(GenericAPIView):
# permission_classes = [AllowAny]
# def get(self, request, *args, **kwargs):
# org_id = request.GET.get("org", None)
# user_id = request.GET.get("user", None)
# room = settings.ROOM_COLLECTION
# plugin_id = settings.PLUGIN_ID
# roomi... | 41.26 | 134 | 0.479641 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,027 | 0.976006 |
8b59bcd3a89ce1967c8f1f93333ca68f2476a3f5 | 6,331 | py | Python | BIT_OpenDomain_QA/rerank/utils_rerank.py | rwei1218/transformers | 511e100c650b3f942c432d8f71eee3ea1c0005a8 | [
"Apache-2.0"
] | null | null | null | BIT_OpenDomain_QA/rerank/utils_rerank.py | rwei1218/transformers | 511e100c650b3f942c432d8f71eee3ea1c0005a8 | [
"Apache-2.0"
] | null | null | null | BIT_OpenDomain_QA/rerank/utils_rerank.py | rwei1218/transformers | 511e100c650b3f942c432d8f71eee3ea1c0005a8 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
""" Load Duqa labeled dataset. """
from __future__ import absolute_import, division, print_function
import collections
import json
import logging
import math
from io import open
from tqdm import tqdm
from transformers.tokenization_bert import BasicTokenizer, whitespace_tokenize
logger = log... | 31.655 | 113 | 0.59027 | 3,140 | 0.493944 | 0 | 0 | 232 | 0.036495 | 0 | 0 | 1,699 | 0.267264 |
8b59f06aa5c12c6a5c23df65ae4eee79a9122e69 | 1,973 | py | Python | LanguageConstructs/DataModel/MetaProgramming/Reflection/attribute_builtins.py | ha-khan/PythonPractice | 31366d0a3380b168b96cf2e90cef3960efee8a7e | [
"MIT"
] | null | null | null | LanguageConstructs/DataModel/MetaProgramming/Reflection/attribute_builtins.py | ha-khan/PythonPractice | 31366d0a3380b168b96cf2e90cef3960efee8a7e | [
"MIT"
] | null | null | null | LanguageConstructs/DataModel/MetaProgramming/Reflection/attribute_builtins.py | ha-khan/PythonPractice | 31366d0a3380b168b96cf2e90cef3960efee8a7e | [
"MIT"
] | null | null | null | from typing import Any
class Orchestrator:
# __class__ Reference to the object's class
#
# __dict__ Mapping that stores the writable attributes of an object or class
#
# __slots__ Attribute that may be defined in a class to limit the attributes its instances can have.
#
#
def __init_... | 25.294872 | 104 | 0.601115 | 943 | 0.477952 | 0 | 0 | 0 | 0 | 0 | 0 | 845 | 0.428282 |
8b5af6372e48aa5e412d730c4fca44191540f238 | 1,360 | py | Python | src/gui/components/weeklycolormesh.py | larashores/spotify-analyzer | 98022b178ce3ef1b07a8f005aeba2aeb573125ee | [
"MIT"
] | null | null | null | src/gui/components/weeklycolormesh.py | larashores/spotify-analyzer | 98022b178ce3ef1b07a8f005aeba2aeb573125ee | [
"MIT"
] | null | null | null | src/gui/components/weeklycolormesh.py | larashores/spotify-analyzer | 98022b178ce3ef1b07a8f005aeba2aeb573125ee | [
"MIT"
] | null | null | null | import collections
import colorsys
from typing import Iterable, List, Tuple
import matplotobjlib as plot
from backports import zoneinfo
from matplotlib.colors import ListedColormap
import utils
from gui.components import PlotComponent
from gui.options import ArtistChooser, ColorMap, Spinbox
from track import Track
... | 35.789474 | 137 | 0.627206 | 1,039 | 0.763971 | 0 | 0 | 0 | 0 | 0 | 0 | 172 | 0.126471 |
8b5b05fdbf74764959912c9444f946a0e9f8ee11 | 3,524 | py | Python | hard-gists/1558831/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 21 | 2019-07-08T08:26:45.000Z | 2022-01-24T23:53:25.000Z | hard-gists/1558831/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 5 | 2019-06-15T14:47:47.000Z | 2022-02-26T05:02:56.000Z | hard-gists/1558831/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 17 | 2019-05-16T03:50:34.000Z | 2021-01-14T14:35:12.000Z | # [h] interpolated nudge dialog
'''a simple RoboFont dialog for the famous "interpolated nudge" script'''
# Interpolated Nudge for RoboFont -- Travis Kochel
# http://tktype.tumblr.com/post/15254264845/interpolated-nudge-for-robofont
# Interpolated Nudge -- Christian Robertson
# http://betatype.com/node/18
from vani... | 31.464286 | 75 | 0.521566 | 3,130 | 0.888195 | 0 | 0 | 0 | 0 | 0 | 0 | 377 | 0.106981 |
8b5d964924108495e0cb8ad5afc9e9b8d784d6b3 | 1,547 | py | Python | django_query_profiler/django/db/backends/database_wrapper_mixin.py | sonej/django-query-profiler | 4afe3694ded26d7ba0b435f5666e990b668d85b5 | [
"BSD-3-Clause"
] | 97 | 2020-03-03T01:20:35.000Z | 2022-03-23T14:06:09.000Z | django_query_profiler/django/db/backends/database_wrapper_mixin.py | sonej/django-query-profiler | 4afe3694ded26d7ba0b435f5666e990b668d85b5 | [
"BSD-3-Clause"
] | 24 | 2020-03-06T17:35:08.000Z | 2022-02-09T20:06:05.000Z | django_query_profiler/django/db/backends/database_wrapper_mixin.py | sonej/django-query-profiler | 4afe3694ded26d7ba0b435f5666e990b668d85b5 | [
"BSD-3-Clause"
] | 9 | 2020-03-22T18:17:09.000Z | 2022-01-31T18:59:11.000Z | """
This module defines a mixin, which can be used by all implementations for all databases.
All the databases have a different hierarchy of DatabaseWrapper, but all of them derive from BaseDatabaseWrapper
"""
from abc import ABC
from typing import Optional
from django.db.backends.base.base import BaseDatabaseWrapper... | 39.666667 | 120 | 0.707822 | 1,047 | 0.676794 | 0 | 0 | 214 | 0.138332 | 0 | 0 | 518 | 0.334842 |
8b5e99254ec155e2d433487c1c07674f3203394e | 1,736 | py | Python | Demo/frontend-server.py | hlynch/Penguins_AIforEarth | bccedb68640b20c6c6849040ad57823e99dbd0c6 | [
"MIT"
] | 2 | 2019-06-17T14:09:45.000Z | 2020-08-17T00:20:44.000Z | Demo/frontend-server.py | hlynch/Penguins_AIforEarth | bccedb68640b20c6c6849040ad57823e99dbd0c6 | [
"MIT"
] | 6 | 2019-05-21T16:24:43.000Z | 2019-05-28T18:41:04.000Z | Demo/frontend-server.py | hlynch/Penguins_AIforEarth | bccedb68640b20c6c6849040ad57823e99dbd0c6 | [
"MIT"
] | null | null | null | '''
Webserver for the Penguin Guano Classification AI4Earth API
To run:
export FLASK_APP=frontend-server.py
python -m flask run --host=0.0.0.0
To access the website, enter your IP address:5000 into a browser.
e.g., http://127.0.0.1:5000/
'''
from flask import Flask, send_from_directory, request
import requests
pri... | 24.111111 | 88 | 0.711982 | 0 | 0 | 0 | 0 | 1,162 | 0.669355 | 0 | 0 | 813 | 0.468318 |
8b6038fb868f4e95b06475e6967de2992f3ee654 | 2,947 | py | Python | src/brouwers/shop/migrations/0021_payment.py | modelbrouwers/modelbrouwers | e0ba4819bf726d6144c0a648fdd4731cdc098a52 | [
"MIT"
] | 6 | 2015-03-03T13:23:07.000Z | 2021-12-19T18:12:41.000Z | src/brouwers/shop/migrations/0021_payment.py | modelbrouwers/modelbrouwers | e0ba4819bf726d6144c0a648fdd4731cdc098a52 | [
"MIT"
] | 95 | 2015-02-07T00:55:39.000Z | 2022-02-08T20:22:05.000Z | src/brouwers/shop/migrations/0021_payment.py | modelbrouwers/modelbrouwers | e0ba4819bf726d6144c0a648fdd4731cdc098a52 | [
"MIT"
] | 2 | 2016-03-22T16:53:26.000Z | 2019-02-09T22:46:04.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.20 on 2019-06-29 13:56
from __future__ import unicode_literals
import django.contrib.postgres.fields.jsonb
import django.db.models.deletion
from django.db import migrations, models
import brouwers.shop.models.utils
class Migration(migrations.Migration):
depend... | 33.11236 | 84 | 0.405836 | 2,676 | 0.908042 | 0 | 0 | 0 | 0 | 0 | 0 | 514 | 0.174415 |
8b620f703a95ef7c54125b1554d9a9e0de82f47e | 12,330 | py | Python | lib/rapi/auth/pam.py | regnauld/ganeti | c1d88461a964a5d0d89cd1ba0571429e01f0a1b5 | [
"BSD-2-Clause"
] | 2 | 2018-09-26T10:09:23.000Z | 2018-09-27T07:27:06.000Z | lib/rapi/auth/pam.py | regnauld/ganeti | c1d88461a964a5d0d89cd1ba0571429e01f0a1b5 | [
"BSD-2-Clause"
] | null | null | null | lib/rapi/auth/pam.py | regnauld/ganeti | c1d88461a964a5d0d89cd1ba0571429e01f0a1b5 | [
"BSD-2-Clause"
] | null | null | null | #
#
# Copyright (C) 2015, 2016 Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of condition... | 32.447368 | 79 | 0.701703 | 3,857 | 0.312814 | 0 | 0 | 0 | 0 | 0 | 0 | 4,601 | 0.373155 |
8b6521edee5c7a6f815e52a5b53c02dede9be866 | 918 | py | Python | iconparse/image_store.py | donk-project/pydonk | 50417ce9e655cdcab20918b474039426f583d6d3 | [
"MIT"
] | null | null | null | iconparse/image_store.py | donk-project/pydonk | 50417ce9e655cdcab20918b474039426f583d6d3 | [
"MIT"
] | null | null | null | iconparse/image_store.py | donk-project/pydonk | 50417ce9e655cdcab20918b474039426f583d6d3 | [
"MIT"
] | null | null | null | # Donk Project
# Copyright (c) 2021 Warriorstar Orion <orion@snowfrost.garden>
# SPDX-License-Identifier: MIT
import pathlib
from typing import Dict
from iconparse.reader import DmiData, Reader
from iconparse.extractor import Extractor
class ImageStore:
def __init__(self, root: pathlib.Path):
self.root: ... | 32.785714 | 69 | 0.676471 | 678 | 0.738562 | 0 | 0 | 0 | 0 | 0 | 0 | 107 | 0.116558 |
8b655e5cbdbfcf38233bc910318fcb6e68177e29 | 28 | py | Python | network/__init__.py | sveatlo/inpainting | 6870ee56beea7401aa97194f76487c391af9dd5d | [
"Unlicense"
] | 1 | 2021-08-08T03:17:17.000Z | 2021-08-08T03:17:17.000Z | network/__init__.py | sveatlo/inpainting | 6870ee56beea7401aa97194f76487c391af9dd5d | [
"Unlicense"
] | 6 | 2021-08-08T13:12:55.000Z | 2022-03-13T15:26:02.000Z | network/__init__.py | sveatlo/unmasked | 6870ee56beea7401aa97194f76487c391af9dd5d | [
"Unlicense"
] | null | null | null | from .gan import SNPatchGAN
| 14 | 27 | 0.821429 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8b666913019cd3ac664dfb714c512a8beb73daff | 10,601 | py | Python | mssql_backend/mssql_backend.py | Reposoft/trac-mssql | da8d8ae29ef81db39ca2d6af439d88f3d6ecfebd | [
"BSD-3-Clause"
] | 1 | 2021-01-27T00:21:47.000Z | 2021-01-27T00:21:47.000Z | mssql_backend/mssql_backend.py | Reposoft/trac-mssql | da8d8ae29ef81db39ca2d6af439d88f3d6ecfebd | [
"BSD-3-Clause"
] | 1 | 2015-05-11T18:34:46.000Z | 2017-02-12T07:07:06.000Z | mssql_backend/mssql_backend.py | Reposoft/trac-mssql | da8d8ae29ef81db39ca2d6af439d88f3d6ecfebd | [
"BSD-3-Clause"
] | 1 | 2021-01-27T00:21:50.000Z | 2021-01-27T00:21:50.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 MATOBA Akihiro <matobaa+trac-hacks@gmail.com>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
from trac.core import *
from trac.config imp... | 31.550595 | 111 | 0.647486 | 6,888 | 0.64975 | 2,204 | 0.207905 | 0 | 0 | 0 | 0 | 3,278 | 0.309216 |
8b668fce877fc1e0332e1fd014c47e5007f994ff | 6,767 | py | Python | CertifiableBayesianInference/BayesKeras/optimizers/adam.py | Hongchenglong/colab | 9cc5c15abde536493cc3f12008e791caa1d00070 | [
"Apache-2.0"
] | null | null | null | CertifiableBayesianInference/BayesKeras/optimizers/adam.py | Hongchenglong/colab | 9cc5c15abde536493cc3f12008e791caa1d00070 | [
"Apache-2.0"
] | null | null | null | CertifiableBayesianInference/BayesKeras/optimizers/adam.py | Hongchenglong/colab | 9cc5c15abde536493cc3f12008e791caa1d00070 | [
"Apache-2.0"
] | null | null | null | #Author: Matthew Wicker
# Impliments the BayesByBackprop optimizer for BayesKeras
import os
import math
import logging
import numpy as np
import tensorflow as tf
import tensorflow_probability as tfp
from tensorflow.keras.models import *
from tensorflow.keras.layers import *
from tqdm import tqdm
from tqdm import tran... | 42.031056 | 114 | 0.612827 | 6,178 | 0.91296 | 0 | 0 | 0 | 0 | 0 | 0 | 726 | 0.107285 |
8b66b9f64668e1a15163413263d5b63cdc824a7c | 1,435 | py | Python | Scripts/ExplicitInstantation.py | fbudin69500/calatk | 3cee90488feab7e3ef2ade1f791106aa7f11e404 | [
"Apache-2.0"
] | 2 | 2019-09-15T12:51:02.000Z | 2020-04-08T14:03:58.000Z | Scripts/ExplicitInstantation.py | cpatrick/calatk | 849c17919ac5084b5b067c7631bc2aa1efd650df | [
"Apache-2.0"
] | null | null | null | Scripts/ExplicitInstantation.py | cpatrick/calatk | 849c17919ac5084b5b067c7631bc2aa1efd650df | [
"Apache-2.0"
] | 1 | 2018-10-20T16:38:28.000Z | 2018-10-20T16:38:28.000Z | #!/usr/bin/env python
"""Create a .cxx file that performs explicit instantiation over float/double and
dimensions 1, 2, and 3. Writes the file to the current directory."""
usage = "ExplicitInstantiation.py <class_name>"
import sys
if len(sys.argv) < 2 or sys.argv[1] == '-h' or sys.argv[1] == '--help':
print(us... | 26.090909 | 80 | 0.694774 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,130 | 0.787456 |
8b67d69e37e542f410bab436a641c536c8c9539f | 3,231 | py | Python | aiopogo/auth_google.py | DennyLoko/aiopogo | 55a9efe13c51261c68ab2abe8efc4ac69e04eb01 | [
"MIT"
] | 14 | 2017-03-28T16:32:24.000Z | 2021-03-13T23:03:57.000Z | aiopogo/auth_google.py | ultrafunkamsterdam/aiopogo | 43444c994a400bc9bc8fd1ccaa6a1f79ff5df1fe | [
"MIT"
] | 8 | 2017-03-01T07:56:09.000Z | 2017-08-15T07:37:12.000Z | aiopogo/auth_google.py | ultrafunkamsterdam/aiopogo | 43444c994a400bc9bc8fd1ccaa6a1f79ff5df1fe | [
"MIT"
] | 14 | 2017-04-08T20:01:50.000Z | 2017-08-19T04:23:57.000Z | from concurrent.futures import ThreadPoolExecutor
from functools import partial
from time import time
try:
from gpsoauth import perform_master_login, perform_oauth
except ImportError:
def perform_master_login(*args, **kwargs):
raise ImportError('Must install gpsoauth to use Google accounts')
perfor... | 36.715909 | 127 | 0.662953 | 2,786 | 0.862272 | 0 | 0 | 0 | 0 | 2,259 | 0.699164 | 548 | 0.169607 |
8b6885de235e02a3261fb9ade6f0f1e6618cd36f | 86 | py | Python | samples/src/main/resources/datasets/python/88.py | sritchie/kotlingrad | 8165ed1cd77220a5347c58cded4c6f2bcf22ee30 | [
"Apache-2.0"
] | 11 | 2020-12-19T01:19:44.000Z | 2021-12-25T20:43:33.000Z | src/main/resources/datasets/python/88.py | breandan/katholic | 081c39f3acc73ff41f5865563debe78a36e1038f | [
"Apache-2.0"
] | null | null | null | src/main/resources/datasets/python/88.py | breandan/katholic | 081c39f3acc73ff41f5865563debe78a36e1038f | [
"Apache-2.0"
] | 2 | 2021-01-25T07:59:20.000Z | 2021-08-07T07:13:49.000Z | def test25(a, b):
(a) + (b.x)
(None) + (a[1])
def test0():
return 1, 2, 3
| 14.333333 | 19 | 0.430233 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8b68b894928fc1a47949be32739e5721fad32eb5 | 518 | py | Python | voluseg/_tools/evenly_parallelize.py | jingxlim/voluseg | 41429a73a481fbffc3a15457be262ec021304b51 | [
"MIT"
] | 10 | 2019-11-05T18:49:50.000Z | 2022-03-07T04:15:53.000Z | voluseg/_tools/evenly_parallelize.py | jingxlim/voluseg | 41429a73a481fbffc3a15457be262ec021304b51 | [
"MIT"
] | 5 | 2021-02-09T20:32:38.000Z | 2021-03-22T16:53:40.000Z | voluseg/_tools/evenly_parallelize.py | jingxlim/voluseg | 41429a73a481fbffc3a15457be262ec021304b51 | [
"MIT"
] | 3 | 2019-12-09T08:30:18.000Z | 2021-03-22T01:58:44.000Z | def evenly_parallelize(input_list):
'''return evenly partitioned spark resilient distributed dataset (RDD)'''
import numpy as np
from pyspark.sql.session import SparkSession
spark = SparkSession.builder.getOrCreate()
sc = spark.sparkContext
n_input = len(input_list)
n_parts = sc.paralleliz... | 37 | 87 | 0.747104 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 73 | 0.140927 |
8b6908539193ed05f7b55115e992b2c27664607d | 3,153 | py | Python | deepplats/models/utils.py | GuillaumeDMMarion/deep-plats | d1f58d9fe07a7e3e7560fd4b425234fd5512da1a | [
"MIT"
] | null | null | null | deepplats/models/utils.py | GuillaumeDMMarion/deep-plats | d1f58d9fe07a7e3e7560fd4b425234fd5512da1a | [
"MIT"
] | null | null | null | deepplats/models/utils.py | GuillaumeDMMarion/deep-plats | d1f58d9fe07a7e3e7560fd4b425234fd5512da1a | [
"MIT"
] | null | null | null | """Model helper module.
"""
from __future__ import annotations
from typing import Union
import numpy as np
import torch
class Scaler:
"""
Standardize features by removing the mean and scaling to unit variance.
Accepts both torch.Tensor and numpy.ndarray.
"""
def __init__(self, astype="float32"):
... | 29.745283 | 79 | 0.598795 | 3,024 | 0.959087 | 0 | 0 | 561 | 0.177926 | 0 | 0 | 450 | 0.142721 |
8b69509f22f3cb70d7f8b98551364109fc2064fa | 1,491 | py | Python | test/utils/test_utils.py | Chick-star/sagemaker-xgboost-container | e06e278b3a34515f79fa73ab770b574b9aafe5f0 | [
"Apache-2.0"
] | 1 | 2021-07-10T15:08:18.000Z | 2021-07-10T15:08:18.000Z | test/utils/test_utils.py | Chick-star/sagemaker-xgboost-container | e06e278b3a34515f79fa73ab770b574b9aafe5f0 | [
"Apache-2.0"
] | null | null | null | test/utils/test_utils.py | Chick-star/sagemaker-xgboost-container | e06e278b3a34515f79fa73ab770b574b9aafe5f0 | [
"Apache-2.0"
] | 1 | 2020-02-07T22:41:34.000Z | 2020-02-07T22:41:34.000Z | # Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the 'License'). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the 'license' file acc... | 35.5 | 84 | 0.7277 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 625 | 0.419182 |
8b6aace89e3d825b331240e13aabc132d611171f | 2,584 | py | Python | setup_extension.py | kuwayamamasayuki/FeedValidator-extension-for-GTFS-JP | af01375d0cf99c671a8a49f8f3a7aac2083424bc | [
"Apache-2.0"
] | 1 | 2020-04-03T09:18:53.000Z | 2020-04-03T09:18:53.000Z | setup_extension.py | kuwayamamasayuki/FeedValidator-extension-for-GTFS-JP | af01375d0cf99c671a8a49f8f3a7aac2083424bc | [
"Apache-2.0"
] | null | null | null | setup_extension.py | kuwayamamasayuki/FeedValidator-extension-for-GTFS-JP | af01375d0cf99c671a8a49f8f3a7aac2083424bc | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python2.5
# Copyright (C) 2019 KUWAYAMA, Masayuki
#
# 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 applic... | 28.711111 | 74 | 0.768576 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,618 | 0.626161 |
8b6bbd5a925b35697b012e2714a2cfeb198264c6 | 651 | py | Python | api/team_directory/questions/migrations/0003_auto_20200930_0947.py | Hipo/team-directory | dfc999a6b464e88c020cfebe3b569b960b5d7e3d | [
"MIT"
] | null | null | null | api/team_directory/questions/migrations/0003_auto_20200930_0947.py | Hipo/team-directory | dfc999a6b464e88c020cfebe3b569b960b5d7e3d | [
"MIT"
] | 2 | 2020-06-05T23:54:21.000Z | 2020-09-30T12:50:16.000Z | api/team_directory/questions/migrations/0003_auto_20200930_0947.py | Hipo/team-directory | dfc999a6b464e88c020cfebe3b569b960b5d7e3d | [
"MIT"
] | null | null | null | # Generated by Django 2.2.5 on 2020-09-30 09:47
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('questions', '0002_create_questions'),
]
operations = [
migrations.RemoveField(
model_name='question',
name='type',
... | 28.304348 | 208 | 0.58679 | 558 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 234 | 0.359447 |
8b6d14070d60a3432471d3e5b7787427ad3b6a3d | 565 | py | Python | CursoemVideo/Desafio076.py | davihonorato/Curso-python | 47e6b4b2f5b37ef520b8b31d37dba0b5d259a0b0 | [
"MIT"
] | null | null | null | CursoemVideo/Desafio076.py | davihonorato/Curso-python | 47e6b4b2f5b37ef520b8b31d37dba0b5d259a0b0 | [
"MIT"
] | null | null | null | CursoemVideo/Desafio076.py | davihonorato/Curso-python | 47e6b4b2f5b37ef520b8b31d37dba0b5d259a0b0 | [
"MIT"
] | null | null | null | # Exercício Python 076: Crie um programa que tenha uma tupla única com nomes de produtos e seus respectivos preços, na sequência.
# No final, mostre uma listagem de preços, organizando os dados em forma tabular.
produtos = ('LÁPIS', 1.75,
'BORRACHA', 2,
'CADERNO', 20,
'CANETAS', 7,
... | 31.388889 | 129 | 0.580531 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 335 | 0.58669 |
8b6db37566c6d60a2bd9e55330800dc0a7ad705e | 8,558 | py | Python | tests/test_simba.py | SIMBAChain/libsimba.py-platform | a815105a5ed84564c7eafbe01281473cebfb44e5 | [
"MIT"
] | null | null | null | tests/test_simba.py | SIMBAChain/libsimba.py-platform | a815105a5ed84564c7eafbe01281473cebfb44e5 | [
"MIT"
] | 2 | 2022-02-25T05:03:13.000Z | 2022-03-09T13:56:56.000Z | tests/test_simba.py | SIMBAChain/libsimba.py-platform | a815105a5ed84564c7eafbe01281473cebfb44e5 | [
"MIT"
] | null | null | null | import unittest
from unittest.mock import patch
from libsimba.simba import Simba
class TestSimba(unittest.TestCase):
def setUp(self):
self.simba = Simba()
patcher_send = patch("libsimba.simba_request.SimbaRequest.send")
patcher_init = patch("libsimba.simba_request.SimbaRequest.__init__")
... | 38.9 | 113 | 0.592545 | 8,470 | 0.989717 | 0 | 0 | 0 | 0 | 0 | 0 | 2,224 | 0.259874 |
8b6dc47fa5a53a344b6d3a7e96adce1b89de4411 | 521 | py | Python | projects/golem_integration/tests/actions/wait_for_element_enabled.py | kangchenwei/keyautotest2 | f980d46cabfc128b2099af3d33968f236923063f | [
"MIT"
] | null | null | null | projects/golem_integration/tests/actions/wait_for_element_enabled.py | kangchenwei/keyautotest2 | f980d46cabfc128b2099af3d33968f236923063f | [
"MIT"
] | null | null | null | projects/golem_integration/tests/actions/wait_for_element_enabled.py | kangchenwei/keyautotest2 | f980d46cabfc128b2099af3d33968f236923063f | [
"MIT"
] | null | null | null | from golem import actions
description = 'Verify wait_for_element_enabled action'
def test(data):
actions.navigate(data.env.url+'dynamic-elements/?delay=3')
actions.wait_for_element_enabled('#button-three', 10)
actions.verify_element_enabled('#button-three')
actions.navigate(data.env.url + 'dynamic-el... | 34.733333 | 85 | 0.729367 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 196 | 0.3762 |
8b6f0fc1892ec8aa8153dba6ca257fd87d9c6c75 | 4,263 | py | Python | Sketches/THF/3D/playground/SimpleCube.py | sparkslabs/kamaelia_orig | 24b5f855a63421a1f7c6c7a35a7f4629ed955316 | [
"Apache-2.0"
] | 12 | 2015-10-20T10:22:01.000Z | 2021-07-19T10:09:44.000Z | Sketches/THF/3D/playground/SimpleCube.py | sparkslabs/kamaelia_orig | 24b5f855a63421a1f7c6c7a35a7f4629ed955316 | [
"Apache-2.0"
] | 2 | 2015-10-20T10:22:55.000Z | 2017-02-13T11:05:25.000Z | Sketches/THF/3D/playground/SimpleCube.py | sparkslabs/kamaelia_orig | 24b5f855a63421a1f7c6c7a35a7f4629ed955316 | [
"Apache-2.0"
] | 6 | 2015-03-09T12:51:59.000Z | 2020-03-01T13:06:21.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1)
#
# (1) Kamaelia Contributors are listed in the AUTHORS file and at
# http://www.kamaelia.org/AUTHORS - please extend this file,
# not this notice.
#
# Licensed under the Apache License... | 31.577778 | 98 | 0.546798 | 2,572 | 0.603331 | 114 | 0.026742 | 0 | 0 | 0 | 0 | 1,646 | 0.386113 |
8b71d0b65eecf04d767d50cdc3d7516cf1940fbe | 236 | py | Python | routers.py | gabrielangelo/revelo-wallet | 3e91117b673e5aaf50773aa180af4117235965c9 | [
"BSD-3-Clause"
] | null | null | null | routers.py | gabrielangelo/revelo-wallet | 3e91117b673e5aaf50773aa180af4117235965c9 | [
"BSD-3-Clause"
] | 8 | 2020-02-11T23:50:12.000Z | 2022-03-14T22:51:54.000Z | routers.py | gabrielangelo/revelo-wallet | 3e91117b673e5aaf50773aa180af4117235965c9 | [
"BSD-3-Clause"
] | null | null | null | from rest_framework.routers import SimpleRouter
from transactions.api.views import TransactionsViewSet
router_v1 = SimpleRouter(trailing_slash=False)
router_v1.register(r'transactions', TransactionsViewSet, base_name='transactions')
| 33.714286 | 82 | 0.855932 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 29 | 0.122881 |
8b72e1cc46246e65f5c4487e4423aa24c3c70e6e | 8,480 | py | Python | plugins/modules/waf_domain.py | schrej/ansible-collection-cloud | 1fa1d18aaa06178616af17d8240e8fc5d13a370c | [
"Apache-2.0"
] | 16 | 2020-09-22T14:45:52.000Z | 2022-02-11T07:56:38.000Z | plugins/modules/waf_domain.py | schrej/ansible-collection-cloud | 1fa1d18aaa06178616af17d8240e8fc5d13a370c | [
"Apache-2.0"
] | 153 | 2020-08-20T14:00:55.000Z | 2022-03-30T13:48:51.000Z | plugins/modules/waf_domain.py | schrej/ansible-collection-cloud | 1fa1d18aaa06178616af17d8240e8fc5d13a370c | [
"Apache-2.0"
] | 11 | 2020-09-01T12:21:09.000Z | 2021-12-23T09:48:34.000Z | #!/usr/bin/python
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# di... | 33.254902 | 100 | 0.610024 | 4,891 | 0.576769 | 0 | 0 | 0 | 0 | 0 | 0 | 4,001 | 0.471816 |
8b73af8b167c0c808ac06e682936f0020d7644ea | 2,104 | py | Python | python/raft/NodeState.py | chenzhaoplus/vraft | 73fe880289061cfbb62aa33b8e5c7d012543bb9d | [
"Apache-2.0"
] | 23 | 2020-05-17T04:22:17.000Z | 2022-02-22T02:09:34.000Z | python/raft/NodeState.py | chenzhaoplus/vraft | 73fe880289061cfbb62aa33b8e5c7d012543bb9d | [
"Apache-2.0"
] | 1 | 2020-10-22T11:47:54.000Z | 2020-10-22T11:47:54.000Z | python/raft/NodeState.py | chenzhaoplus/vraft | 73fe880289061cfbb62aa33b8e5c7d012543bb9d | [
"Apache-2.0"
] | 11 | 2020-07-11T07:12:19.000Z | 2022-03-23T08:24:15.000Z | import collections
from cluster import Cluster
import logging
logging.basicConfig(format='%(asctime)s - %(levelname)s: %(message)s', datefmt='%H:%M:%S', level=logging.INFO)
VoteResult = collections.namedtuple('VoteResult', ['term', 'vote_granted', 'id'])
class NodeState:
def __init__(self, node=None):
... | 42.08 | 113 | 0.66635 | 1,843 | 0.875951 | 0 | 0 | 0 | 0 | 0 | 0 | 936 | 0.444867 |
8b73f4c7986a2f8c2bd94b366f876d38ceb6a037 | 303 | py | Python | 06source_code/service-center/language-service/bin/language_service.py | dumengnan/unicorn | 165330ff8e01bc18e3eca2d8ecf23b5d955f155b | [
"Apache-2.0"
] | null | null | null | 06source_code/service-center/language-service/bin/language_service.py | dumengnan/unicorn | 165330ff8e01bc18e3eca2d8ecf23b5d955f155b | [
"Apache-2.0"
] | 8 | 2020-01-28T22:31:03.000Z | 2022-03-02T03:37:47.000Z | 06source_code/service-center/language-service/bin/language_service.py | dumengnan/unicorn | 165330ff8e01bc18e3eca2d8ecf23b5d955f155b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
import _load_lib
import sys
import logging
import os
from unicorn.language.app\
import main as languae_main
if __name__ == '__main__':
try:
languae_main()
except Exception as ex:
logging.exception("main except")
os._exit(1)
| 16.833333 | 40 | 0.673267 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 61 | 0.20132 |
8b75a7eaacdb476c970a5cf2013b558edc778b20 | 10,303 | py | Python | incremental_evaluation_run.py | comrob/ensgendel | 4958d588a30a5bc60c6e7af5abb2b830b1265a25 | [
"BSD-3-Clause"
] | null | null | null | incremental_evaluation_run.py | comrob/ensgendel | 4958d588a30a5bc60c6e7af5abb2b830b1265a25 | [
"BSD-3-Clause"
] | null | null | null | incremental_evaluation_run.py | comrob/ensgendel | 4958d588a30a5bc60c6e7af5abb2b830b1265a25 | [
"BSD-3-Clause"
] | null | null | null | import incremental_evaluation.utils as IE
import incremental_evaluation.scenario_sets as SS
import incremental_evaluation.visualisation_helper as VH
import models.basic_predictor_interfaces
import models.ensgendel_interface
import incremental_evaluation.data_file_helper as DFH
import os
import argparse
SS_MNIST012 = "... | 54.803191 | 119 | 0.625837 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,752 | 0.267107 |
8b76c38f1e29d8bf142d3e3373941067e32aadc6 | 15,792 | py | Python | core/models.py | admariner/madewithwagtail | a43b3263c0f151ece4994fccd561b0575db4979f | [
"MIT"
] | null | null | null | core/models.py | admariner/madewithwagtail | a43b3263c0f151ece4994fccd561b0575db4979f | [
"MIT"
] | null | null | null | core/models.py | admariner/madewithwagtail | a43b3263c0f151ece4994fccd561b0575db4979f | [
"MIT"
] | null | null | null | import os
import re
from bs4 import BeautifulSoup
from django.core.exceptions import ObjectDoesNotExist
from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator
from django.db import models
from django.db.models import Case, Count, Q, Value, When
from django.utils.encoding import python_2_unicode_compa... | 31.967611 | 117 | 0.634435 | 14,748 | 0.933891 | 0 | 0 | 4,804 | 0.304205 | 0 | 0 | 3,876 | 0.245441 |
8b772e552dd2f4d89f3edbd1233977b33bf49895 | 542 | py | Python | solutions/593_valid_square.py | YiqunPeng/leetcode_pro | 7e6376984f9baec49a5e827d98330fe3d1b656f0 | [
"MIT"
] | null | null | null | solutions/593_valid_square.py | YiqunPeng/leetcode_pro | 7e6376984f9baec49a5e827d98330fe3d1b656f0 | [
"MIT"
] | null | null | null | solutions/593_valid_square.py | YiqunPeng/leetcode_pro | 7e6376984f9baec49a5e827d98330fe3d1b656f0 | [
"MIT"
] | null | null | null | class Solution:
def validSquare(self, p1: List[int], p2: List[int], p3: List[int], p4: List[int]) -> bool:
"""Math.
Running time: O(1)
"""
v = [p1, p2, p3, p4]
e = []
for i, p in enumerate(v):
for j, q in enumerate(v[i+1:]):
e.append(((p[0... | 36.133333 | 102 | 0.389299 | 533 | 0.983395 | 0 | 0 | 0 | 0 | 0 | 0 | 48 | 0.088561 |
8b77b588bbd23056762b56f743c2a98bf3afca31 | 868 | py | Python | calvin/runtime/south/plugins/storage/twistedimpl/securedht/tests/cert_script.py | josrolgil/exjobbCalvin | 976459eaa50246586360c049b9880d753623d574 | [
"Apache-2.0"
] | 1 | 2016-05-10T22:36:31.000Z | 2016-05-10T22:36:31.000Z | calvin/runtime/south/plugins/storage/twistedimpl/securedht/tests/cert_script.py | josrolgil/exjobbCalvin | 976459eaa50246586360c049b9880d753623d574 | [
"Apache-2.0"
] | null | null | null | calvin/runtime/south/plugins/storage/twistedimpl/securedht/tests/cert_script.py | josrolgil/exjobbCalvin | 976459eaa50246586360c049b9880d753623d574 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
from calvin.utilities import certificate
import os
print "Trying to create a new domain configuration."
testconfig = certificate.Config(domain="test")
# testconfig2 = certificate.Config(domain="evil")
print "Reading configuration successfull."
print "Creating new domain."
certificate.new_domain(test... | 36.166667 | 73 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 384 | 0.442396 |
8b78243e120efed83eabeee3ef9fab1fbb90cb9c | 2,526 | py | Python | users/migrations/0001_initial.py | bhaveshpraveen/VIT-Pugaar | 0a33b264939287071ddaffef4ab1f2ef9a38de87 | [
"MIT"
] | null | null | null | users/migrations/0001_initial.py | bhaveshpraveen/VIT-Pugaar | 0a33b264939287071ddaffef4ab1f2ef9a38de87 | [
"MIT"
] | 6 | 2017-11-11T08:43:55.000Z | 2021-06-10T19:38:24.000Z | users/migrations/0001_initial.py | bhaveshpraveen/VIT-Pugaar | 0a33b264939287071ddaffef4ab1f2ef9a38de87 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-10-23 05:30
from __future__ import unicode_literals
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('hostel', ... | 56.133333 | 266 | 0.641726 | 2,305 | 0.91251 | 0 | 0 | 0 | 0 | 0 | 0 | 729 | 0.288599 |
8b789e81aabae4e0b2a7953dacad2a13826e5a3e | 93 | py | Python | runoob100/032.py | GenweiWu/PythonDemo | 957bacb6fc0eb0bc37c4af7a64220d8aa58189ba | [
"MIT"
] | null | null | null | runoob100/032.py | GenweiWu/PythonDemo | 957bacb6fc0eb0bc37c4af7a64220d8aa58189ba | [
"MIT"
] | null | null | null | runoob100/032.py | GenweiWu/PythonDemo | 957bacb6fc0eb0bc37c4af7a64220d8aa58189ba | [
"MIT"
] | null | null | null | # _*_ coding:utf-8 _*_
#按相反的顺序输出列表的值。
arr=["aaa",True,100,"ccc"]
print arr
print arr[::-1] | 11.625 | 26 | 0.634409 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 72 | 0.605042 |
8b790365631a765420b493cba01b292fac4bc258 | 475 | py | Python | ArrangingCoins.py | Jcarlos0828/LeetCode-PracticeResults | 73566a131629038caf2555eaf4999379227ec369 | [
"MIT"
] | 1 | 2019-06-26T22:44:16.000Z | 2019-06-26T22:44:16.000Z | ArrangingCoins.py | Jcarlos0828/LeetCode-PracticeResults | 73566a131629038caf2555eaf4999379227ec369 | [
"MIT"
] | null | null | null | ArrangingCoins.py | Jcarlos0828/LeetCode-PracticeResults | 73566a131629038caf2555eaf4999379227ec369 | [
"MIT"
] | null | null | null | '''
EASY 441. Arranging Coins
You have a total of n coins that you want to form in
a staircase shape, where every k-th row must have exactly k coins.
'''
class Solution:
def arrangeCoins(self, n: int) -> int:
rows = [0]
count = 1
def recur(n, count):
if n - count >= 0:
... | 26.388889 | 66 | 0.511579 | 319 | 0.671579 | 0 | 0 | 0 | 0 | 0 | 0 | 155 | 0.326316 |
8b7cf31b94df4dc51935676b554357efa86d4611 | 1,167 | py | Python | stable_projects/predict_phenotypes/Nguyen2020_RNNAD/cbig/Nguyen2020/test_rnn.py | marielacour81/CBIG | 511af756c6ddabbd3a9681ce3514b79ef5aaaf3f | [
"MIT"
] | 6 | 2020-03-03T22:23:07.000Z | 2021-11-27T06:11:02.000Z | stable_projects/predict_phenotypes/Nguyen2020_RNNAD/cbig/Nguyen2020/test_rnn.py | marielacour81/CBIG | 511af756c6ddabbd3a9681ce3514b79ef5aaaf3f | [
"MIT"
] | null | null | null | stable_projects/predict_phenotypes/Nguyen2020_RNNAD/cbig/Nguyen2020/test_rnn.py | marielacour81/CBIG | 511af756c6ddabbd3a9681ce3514b79ef5aaaf3f | [
"MIT"
] | 2 | 2020-05-27T20:24:03.000Z | 2021-04-14T07:51:44.000Z | # Written by Minh Nguyen and CBIG under MIT license:
# https://github.com/ThomasYeoLab/CBIG/blob/master/LICENSE.md
import unittest
import torch
import cbig.Nguyen2020.rnn as rnn
class RnnCellTest(unittest.TestCase):
""" Unit tests for recurrent cells """
def setUp(self):
torch.manual_seed(0)
... | 33.342857 | 73 | 0.658098 | 986 | 0.844901 | 0 | 0 | 0 | 0 | 0 | 0 | 151 | 0.129392 |
8b7e0f2a1f8d7363c4a7045709aa260449c86b2e | 4,816 | py | Python | mysite/myapp/forms.py | MarkArren/PhotoSocial | bb401f465a464e7cf6a7fac184cef0d40e0a9525 | [
"MIT"
] | null | null | null | mysite/myapp/forms.py | MarkArren/PhotoSocial | bb401f465a464e7cf6a7fac184cef0d40e0a9525 | [
"MIT"
] | null | null | null | mysite/myapp/forms.py | MarkArren/PhotoSocial | bb401f465a464e7cf6a7fac184cef0d40e0a9525 | [
"MIT"
] | null | null | null | from django import forms
from django.forms import ModelForm
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
from django.core.validators import EmailValidator
from . import models
from .models import ProfileModel
from io import BytesIO
from PIL import Image, ExifTags
... | 28.163743 | 135 | 0.706811 | 1,686 | 0.350083 | 0 | 0 | 0 | 0 | 0 | 0 | 1,640 | 0.340532 |
8b80a8a516beaa5b7d7dde65eb8c098754473d58 | 1,442 | py | Python | up/tasks/sparse/models/heads/cls_head.py | ModelTC/EOD | 164bff80486e9ae6a095a97667b365c46ceabd86 | [
"Apache-2.0"
] | 196 | 2021-10-30T05:15:36.000Z | 2022-03-30T18:43:40.000Z | up/tasks/sparse/models/heads/cls_head.py | ModelTC/EOD | 164bff80486e9ae6a095a97667b365c46ceabd86 | [
"Apache-2.0"
] | 12 | 2021-10-30T11:33:28.000Z | 2022-03-31T14:22:58.000Z | up/tasks/sparse/models/heads/cls_head.py | ModelTC/EOD | 164bff80486e9ae6a095a97667b365c46ceabd86 | [
"Apache-2.0"
] | 23 | 2021-11-01T07:26:17.000Z | 2022-03-27T05:55:37.000Z | from up.utils.general.registry_factory import MODULE_ZOO_REGISTRY
from up.tasks.cls.models.heads import BaseClsHead, ConvNeXtHead
__all__ = ['SparseBaseClsHead', 'SparseConvNeXtHead']
@MODULE_ZOO_REGISTRY.register('sparse_base_cls_head')
class SparseBaseClsHead(BaseClsHead):
def __init__(self, num_classes, in_pl... | 36.974359 | 109 | 0.647018 | 1,143 | 0.792649 | 0 | 0 | 1,251 | 0.867545 | 0 | 0 | 119 | 0.082524 |
8b8159fcb82d3a08050148abdcf3102b1846cbb7 | 4,753 | py | Python | app/xl/long_runner.py | evgeniyabrosin/anfisa | ac4aef1a816de05ee2a45aa5b220e2baf93574de | [
"Apache-2.0"
] | 8 | 2019-03-26T16:07:46.000Z | 2021-12-30T13:38:06.000Z | app/xl/long_runner.py | evgeniyabrosin/anfisa | ac4aef1a816de05ee2a45aa5b220e2baf93574de | [
"Apache-2.0"
] | 13 | 2018-11-07T19:37:20.000Z | 2022-02-21T17:11:45.000Z | app/xl/long_runner.py | evgeniyabrosin/anfisa | ac4aef1a816de05ee2a45aa5b220e2baf93574de | [
"Apache-2.0"
] | 15 | 2018-10-16T08:15:11.000Z | 2022-02-21T14:07:29.000Z | # Copyright (c) 2019. Partners HealthCare and other members of
# Forome Association
#
# Developed by Sergey Trifonov based on contributions by Joel Krier,
# Michael Bouzinier, Shamil Sunyaev and other members of Division of
# Genetics, Brigham and Women's Hospital
#
# Licensed under the Apache License, Version 2.... | 39.608333 | 77 | 0.564696 | 3,672 | 0.772565 | 0 | 0 | 0 | 0 | 0 | 0 | 1,001 | 0.210604 |
8b8201f75514c47ff34e925027bea925196f4d34 | 23,209 | py | Python | cosmos_virtual_assistant_uf.py | Nishit014/COSMOS | 3042377715f6f4b0eb0a75b6b360415a965754df | [
"MIT"
] | 1 | 2021-06-27T11:53:43.000Z | 2021-06-27T11:53:43.000Z | cosmos_virtual_assistant_uf.py | Aayush9027/COSMOS_VIRTUAL_ASSISTANT | d02aa04a66b2acdfeaf9270607059182f54e78a5 | [
"MIT"
] | null | null | null | cosmos_virtual_assistant_uf.py | Aayush9027/COSMOS_VIRTUAL_ASSISTANT | d02aa04a66b2acdfeaf9270607059182f54e78a5 | [
"MIT"
] | 1 | 2021-06-25T12:04:24.000Z | 2021-06-25T12:04:24.000Z | import pyttsx3
import speech_recognition as sr
import os
import subprocess
#from requests import request , session
#from pprint import pprint as pp
import json
import requests
import datetime
from datetime import date
import time
import calendar
import warnings
import random
import wikipedia
import web... | 38.553156 | 186 | 0.550605 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8,882 | 0.382696 |
8b820e62535a256f6892582e2d661efa4be1b944 | 1,748 | py | Python | model.py | TilenHumar/Vislice | 5970fb4d887a5689b906a7190fabb5405b25bbc7 | [
"MIT"
] | null | null | null | model.py | TilenHumar/Vislice | 5970fb4d887a5689b906a7190fabb5405b25bbc7 | [
"MIT"
] | 2 | 2021-04-19T15:51:18.000Z | 2021-04-19T16:17:06.000Z | model.py | TilenHumar/Vislice | 5970fb4d887a5689b906a7190fabb5405b25bbc7 | [
"MIT"
] | null | null | null | import random
# najprej konstante
STEVILO_DOVOLJENIH_NAPAK = 10
PRAVILNA_CRKA = "+"
PONOVLJENA_CRKA = "o"
NAPACNA_CRKA = "-"
ZMAGA = "W"
PORAZ = "X"
class Igra:
def __init__(self, geslo, crke):
self.geslo = geslo.upper() # pravilno geslo
self.crke = crke.upper() # do sedaj ugibane črke
... | 23 | 69 | 0.582952 | 1,369 | 0.782733 | 0 | 0 | 0 | 0 | 0 | 0 | 131 | 0.0749 |
8b827211c6d78c4e03e51a44190d8e3f1cffc3db | 2,443 | py | Python | legacy/models/GAT.py | astrockragh/IceCube | eba09e9f9a3c351dbf05496821bcd7d29ac0261c | [
"MIT"
] | null | null | null | legacy/models/GAT.py | astrockragh/IceCube | eba09e9f9a3c351dbf05496821bcd7d29ac0261c | [
"MIT"
] | null | null | null | legacy/models/GAT.py | astrockragh/IceCube | eba09e9f9a3c351dbf05496821bcd7d29ac0261c | [
"MIT"
] | 2 | 2021-03-03T20:39:38.000Z | 2021-06-09T11:58:00.000Z | import numpy as np
import tensorflow as tf
from tensorflow.keras.callbacks import EarlyStopping
from tensorflow.keras.layers import Dropout, Input
from tensorflow.keras.models import Model
from tensorflow.keras.regularizers import l2
from tensorflow.random import set_seed
from spektral.transforms.layer_preprocess impor... | 46.09434 | 164 | 0.669668 | 1,758 | 0.719607 | 0 | 0 | 0 | 0 | 0 | 0 | 419 | 0.17151 |
8b83777c4cdb8551be6cb2f0840e3a838be9ce71 | 792 | py | Python | pyleecan/Methods/Slot/SlotUD2/get_surface_active.py | IrakozeFD/pyleecan | 5a93bd98755d880176c1ce8ac90f36ca1b907055 | [
"Apache-2.0"
] | 95 | 2019-01-23T04:19:45.000Z | 2022-03-17T18:22:10.000Z | pyleecan/Methods/Slot/SlotUD2/get_surface_active.py | IrakozeFD/pyleecan | 5a93bd98755d880176c1ce8ac90f36ca1b907055 | [
"Apache-2.0"
] | 366 | 2019-02-20T07:15:08.000Z | 2022-03-31T13:37:23.000Z | pyleecan/Methods/Slot/SlotUD2/get_surface_active.py | IrakozeFD/pyleecan | 5a93bd98755d880176c1ce8ac90f36ca1b907055 | [
"Apache-2.0"
] | 74 | 2019-01-24T01:47:31.000Z | 2022-02-25T05:44:42.000Z | from numpy import arcsin, exp
from ....Classes.Segment import Segment
from ....Classes.Arc1 import Arc1
from ....Classes.SurfLine import SurfLine
def get_surface_active(self, alpha=0, delta=0):
"""Return the full winding surface
Parameters
----------
self : SlotUD2
A SlotUD2 object
alpha... | 22.628571 | 59 | 0.64899 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 412 | 0.520202 |
8b849ac15aeae749f8a20c70f9517f14b9a20eb1 | 3,402 | py | Python | features/haralick.py | annaformaniuk/smoke-detection | 217014e9a2a5b9861f4cda3d4c1abce4aca34773 | [
"MIT"
] | 7 | 2019-05-29T07:43:40.000Z | 2022-02-10T07:44:11.000Z | features/haralick.py | annaformaniuk/smoke-detection | 217014e9a2a5b9861f4cda3d4c1abce4aca34773 | [
"MIT"
] | 1 | 2020-06-07T10:50:50.000Z | 2020-06-07T10:50:50.000Z | features/haralick.py | annaformaniuk/smoke-detection | 217014e9a2a5b9861f4cda3d4c1abce4aca34773 | [
"MIT"
] | 4 | 2019-11-26T15:05:03.000Z | 2021-05-10T13:41:15.000Z | # from https://gogul09.github.io/software/texture-recognition
import cv2
import numpy as np
import os
import glob
import mahotas as mt
from sklearn.svm import LinearSVC
from typing import List
import matplotlib.pyplot as plt
import pickle
# load the training dataset
train_path = "../inputs/for_texture_model/train"
tra... | 35.072165 | 77 | 0.581717 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,082 | 0.318048 |
8b85c3050d99d93fcfb7dcf610efc1fcee13814c | 6,645 | py | Python | src/werdich_cfr/code_not_used/Shinichi_3D_Inception_Model.py | awerdich/werdich-cfr | 39d9a7f05d0a92304a6dd60df0124068735222ad | [
"MIT"
] | null | null | null | src/werdich_cfr/code_not_used/Shinichi_3D_Inception_Model.py | awerdich/werdich-cfr | 39d9a7f05d0a92304a6dd60df0124068735222ad | [
"MIT"
] | null | null | null | src/werdich_cfr/code_not_used/Shinichi_3D_Inception_Model.py | awerdich/werdich-cfr | 39d9a7f05d0a92304a6dd60df0124068735222ad | [
"MIT"
] | null | null | null | def inception_module(x,filters_1x1,filters_3x3_reduce,filters_3x3,filters_5x5_reduce,filters_5x5,filters_pool_proj,trainable=True):
conv_1x1 = Conv3D(filters_1x1, (1,1,1), padding='same', activation='relu',kernel_initializer=kernel_init, bias_initializer=bias_init,trainable=trainable)(x)
conv_3x3 = Conv3D(filte... | 89.797297 | 224 | 0.78164 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 581 | 0.087434 |
8b87afec28b6e06554c41af8512eee6c2652795a | 4,441 | py | Python | asciidoxy/templates/helpers.py | lurch/asciidoxy | 9781ba696637fadbf62f1b7c5da843b0d292007d | [
"Apache-2.0"
] | null | null | null | asciidoxy/templates/helpers.py | lurch/asciidoxy | 9781ba696637fadbf62f1b7c5da843b0d292007d | [
"Apache-2.0"
] | null | null | null | asciidoxy/templates/helpers.py | lurch/asciidoxy | 9781ba696637fadbf62f1b7c5da843b0d292007d | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2019-2020, TomTom (http://tomtom.com).
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 33.390977 | 99 | 0.611124 | 0 | 0 | 112 | 0.02522 | 0 | 0 | 0 | 0 | 1,794 | 0.403963 |
8b88d9d29f78c551c398e16471317d51e96b8e76 | 2,511 | py | Python | fin_model_course/pltemplates/graphics/model_structure.py | whoopnip/fin-model-course | e6c5ae313bba601c4aca0f334818b61cc0393118 | [
"MIT"
] | 5 | 2020-08-29T15:28:39.000Z | 2021-12-01T16:53:25.000Z | fin_model_course/pltemplates/graphics/model_structure.py | whoopnip/fin-model-course | e6c5ae313bba601c4aca0f334818b61cc0393118 | [
"MIT"
] | 16 | 2020-02-26T16:03:47.000Z | 2021-06-15T15:17:37.000Z | fin_model_course/pltemplates/graphics/model_structure.py | whoopnip/fin-model-course | e6c5ae313bba601c4aca0f334818b61cc0393118 | [
"MIT"
] | 3 | 2021-01-22T19:38:36.000Z | 2021-09-28T08:14:00.000Z | import pyexlatex as pl
import pyexlatex.table as lt
import pyexlatex.presentation as lp
import pyexlatex.graphics as lg
import pyexlatex.layouts as ll
def get_model_structure_graphic() -> lg.TikZPicture:
inputs_block_options = [
'fill=orange!30'
]
model_block_options = [
'fill=blue!50'
... | 29.541176 | 112 | 0.560335 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 173 | 0.068897 |
8b898fc8f9613f97a1b09d6b849378dd2047f47d | 51 | py | Python | index.py | JaidevstudioRobot/hackoctober2021 | d5855ac4bc797d7abb85b76f8b4a28e4a0dafaea | [
"MIT"
] | null | null | null | index.py | JaidevstudioRobot/hackoctober2021 | d5855ac4bc797d7abb85b76f8b4a28e4a0dafaea | [
"MIT"
] | null | null | null | index.py | JaidevstudioRobot/hackoctober2021 | d5855ac4bc797d7abb85b76f8b4a28e4a0dafaea | [
"MIT"
] | 1 | 2021-10-04T18:16:06.000Z | 2021-10-04T18:16:06.000Z | # Hello python
a = "Hello I m Robot Jai"
print(a)
| 12.75 | 25 | 0.647059 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 36 | 0.705882 |
8b89b607196b90b61199e59cb3a2c777f0b348f7 | 1,748 | py | Python | calc.py | V-Perotto/Contador_NomeSobrenome_Decimal | 1e625306254c3f48e4c722e6ad04601f65af4c3c | [
"CC0-1.0"
] | null | null | null | calc.py | V-Perotto/Contador_NomeSobrenome_Decimal | 1e625306254c3f48e4c722e6ad04601f65af4c3c | [
"CC0-1.0"
] | null | null | null | calc.py | V-Perotto/Contador_NomeSobrenome_Decimal | 1e625306254c3f48e4c722e6ad04601f65af4c3c | [
"CC0-1.0"
] | null | null | null | from alfabeto import *
from main import nameSur
# Listas
letras = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v",
"w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R",
"S", "T", "U... | 31.214286 | 119 | 0.371854 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 406 | 0.232265 |
8b8bd5685a8cb00d4aca06f90e968e83f7055e18 | 10,174 | py | Python | ioflo/aio/proto/devicing.py | BradyHammond/ioflo | 177ac656d7c4ff801aebb0d8b401db365a5248ce | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 128 | 2015-01-14T12:26:56.000Z | 2021-11-06T07:09:29.000Z | ioflo/aio/proto/devicing.py | BradyHammond/ioflo | 177ac656d7c4ff801aebb0d8b401db365a5248ce | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 17 | 2015-01-28T18:26:50.000Z | 2020-11-19T22:08:06.000Z | ioflo/aio/proto/devicing.py | BradyHammond/ioflo | 177ac656d7c4ff801aebb0d8b401db365a5248ce | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 29 | 2015-01-27T23:28:31.000Z | 2021-05-04T16:37:30.000Z | """
Device Base Package
"""
from __future__ import absolute_import, division, print_function
import struct
from binascii import hexlify
from collections import deque, namedtuple
import enum
import socket
from ...aid.sixing import *
from ...aid.odicting import odict
from ...aid.byting import bytify, unbytify, packify... | 27.276139 | 91 | 0.548555 | 9,671 | 0.95056 | 0 | 0 | 648 | 0.063692 | 0 | 0 | 6,315 | 0.6207 |