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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a8a8041933930261f3a31462ef960ecbd49c2f5c | 461 | py | Python | demo/worlddata/migrations/0005_foods_hunger.py | MarsZone/DreamLand | 87455f421c1ba09cb6efd5fc0882fbc2a29ea1a5 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | demo/worlddata/migrations/0005_foods_hunger.py | MarsZone/DreamLand | 87455f421c1ba09cb6efd5fc0882fbc2a29ea1a5 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | demo/worlddata/migrations/0005_foods_hunger.py | MarsZone/DreamLand | 87455f421c1ba09cb6efd5fc0882fbc2a29ea1a5 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2017-07-06 08:03
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('worlddata', '0004_auto_20170628_1556'),
]
operations = [
migrations.AddFiel... | 21.952381 | 61 | 0.618221 | 303 | 0.657267 | 0 | 0 | 0 | 0 | 0 | 0 | 122 | 0.264642 |
a8a830fc1bf61dcb27f3d46222c49301867517cd | 1,216 | py | Python | woodstock/auth_backends.py | allink/woodstock | afafecb7c4454f96e51c051044ed8ed74853c048 | [
"BSD-3-Clause"
] | null | null | null | woodstock/auth_backends.py | allink/woodstock | afafecb7c4454f96e51c051044ed8ed74853c048 | [
"BSD-3-Clause"
] | null | null | null | woodstock/auth_backends.py | allink/woodstock | afafecb7c4454f96e51c051044ed8ed74853c048 | [
"BSD-3-Clause"
] | null | null | null | from woodstock.models import Invitee, Participant
from woodstock import settings
from django.core.exceptions import ObjectDoesNotExist
class PersonBackend(object):
supports_object_permissions = False
supports_anonymous_user = False
supports_inactive_user = False
def authenticate(self, username=None, ... | 27.636364 | 68 | 0.649671 | 1,072 | 0.881579 | 0 | 0 | 0 | 0 | 0 | 0 | 130 | 0.106908 |
a8a98856c914486131c71af74b19873a5711b4de | 198 | py | Python | Python_Orientacao_Objeto/teste2.py | carlosrjhoe/Python | 2df531b23ebbabc40539b09bb2bbdbe1ed1c2164 | [
"MIT"
] | null | null | null | Python_Orientacao_Objeto/teste2.py | carlosrjhoe/Python | 2df531b23ebbabc40539b09bb2bbdbe1ed1c2164 | [
"MIT"
] | null | null | null | Python_Orientacao_Objeto/teste2.py | carlosrjhoe/Python | 2df531b23ebbabc40539b09bb2bbdbe1ed1c2164 | [
"MIT"
] | null | null | null | def soma(x,y):
return print(x + y)
def sub(x,y):
return print(x - y)
def mult(x,y):
return print(x * y)
def div(x,y):
return print(x / y)
soma(3,8)
sub(10,5)
mult(3,9)
div(15,7) | 11.647059 | 23 | 0.555556 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a8aa4492ae02a02a4154bc910275a7278a6dce85 | 5,846 | py | Python | Greedy/HuffmanCompression.py | Jh123x/COMP-550-Algorithms-and-Analysis | 1bc0b7fb8c48dc52cf89704557795aa87290e88b | [
"MIT"
] | null | null | null | Greedy/HuffmanCompression.py | Jh123x/COMP-550-Algorithms-and-Analysis | 1bc0b7fb8c48dc52cf89704557795aa87290e88b | [
"MIT"
] | null | null | null | Greedy/HuffmanCompression.py | Jh123x/COMP-550-Algorithms-and-Analysis | 1bc0b7fb8c48dc52cf89704557795aa87290e88b | [
"MIT"
] | null | null | null | from math import log2
import time
from typing import Optional
from heapq import heapify, heappush, heappop
class Node(object):
def __init__(self, freq: int, value: Optional[str] = None, left: 'Node' = None, right: 'Node' = None) -> None:
"""Node object for representing the huffman tree"""
# Check... | 28.378641 | 114 | 0.614608 | 1,918 | 0.328088 | 0 | 0 | 0 | 0 | 0 | 0 | 1,502 | 0.256928 |
a8aaa18961285e591a10879305e552c35655d72a | 929 | py | Python | practice11.py | ikramulkayes/Python_season2 | d057460d07c5d2d218ecd52e08c1d355add44df2 | [
"MIT"
] | null | null | null | practice11.py | ikramulkayes/Python_season2 | d057460d07c5d2d218ecd52e08c1d355add44df2 | [
"MIT"
] | null | null | null | practice11.py | ikramulkayes/Python_season2 | d057460d07c5d2d218ecd52e08c1d355add44df2 | [
"MIT"
] | null | null | null |
import turtle as t
import time
import os #connected with practice10.py
path = 'F:\\Github\\Python_season2'
os.chdir(path)
from practice10 import Snake
from practice13 import Food
from practice14 import Score
screen = t.Screen()
screen.setup(width=600,height=600)
screen.bgcolor("black")
screen.title("My snake"... | 19.765957 | 47 | 0.682454 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 86 | 0.092573 |
a8ab1507e7422c2e6e8504b138f80c7c058d5661 | 118 | py | Python | Maths/__init__.py | NextLmabda/PyLambda | 5fb91062c4f9c493fcd3637c2aa4d786f8c387d0 | [
"MIT"
] | null | null | null | Maths/__init__.py | NextLmabda/PyLambda | 5fb91062c4f9c493fcd3637c2aa4d786f8c387d0 | [
"MIT"
] | null | null | null | Maths/__init__.py | NextLmabda/PyLambda | 5fb91062c4f9c493fcd3637c2aa4d786f8c387d0 | [
"MIT"
] | null | null | null | print('Omolewa is teaching a class')
print('Lanre is still making changes')
print('Omolewa has made a change too')
| 29.5 | 39 | 0.737288 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 91 | 0.771186 |
a8ad80bc38cd16df91c7f7717982ec487fa5e8c1 | 126 | py | Python | preprocessing_danych/dataset_config.py | MaciejKonieczka/gazspot-prediction | 55177d7b7ae39a01a2820cd79f0e74897418e522 | [
"MIT"
] | null | null | null | preprocessing_danych/dataset_config.py | MaciejKonieczka/gazspot-prediction | 55177d7b7ae39a01a2820cd79f0e74897418e522 | [
"MIT"
] | null | null | null | preprocessing_danych/dataset_config.py | MaciejKonieczka/gazspot-prediction | 55177d7b7ae39a01a2820cd79f0e74897418e522 | [
"MIT"
] | null | null | null | test_index = ("2019-05-01", "2020-04-30")
train_index = ("2016-01-02", "2019-04-30")
val_index = ("2018-10-01", "2019-04-30")
| 31.5 | 42 | 0.619048 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 72 | 0.571429 |
a8ada55f883fca697cc8b38ca817ca0714f36859 | 4,079 | py | Python | deployutils/apps/django/backends/jwt_session_store.py | knivets/djaodjin-deployutils | e3ce90152f1187dd1cd3d63aa14a1aaff924248f | [
"BSD-2-Clause"
] | null | null | null | deployutils/apps/django/backends/jwt_session_store.py | knivets/djaodjin-deployutils | e3ce90152f1187dd1cd3d63aa14a1aaff924248f | [
"BSD-2-Clause"
] | null | null | null | deployutils/apps/django/backends/jwt_session_store.py | knivets/djaodjin-deployutils | e3ce90152f1187dd1cd3d63aa14a1aaff924248f | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) 2018, DjaoDjin 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 conditions and t... | 38.847619 | 78 | 0.68963 | 2,296 | 0.562883 | 0 | 0 | 487 | 0.119392 | 0 | 0 | 2,148 | 0.5266 |
a8adb47f47c90b72537625f613641ed8ee04bd96 | 4,143 | py | Python | gnumber/game.py | robin-pt/learning_note_pyGuessNumber | 9692991c603aad14329a835305e59c2c1ff76874 | [
"Apache-2.0"
] | null | null | null | gnumber/game.py | robin-pt/learning_note_pyGuessNumber | 9692991c603aad14329a835305e59c2c1ff76874 | [
"Apache-2.0"
] | null | null | null | gnumber/game.py | robin-pt/learning_note_pyGuessNumber | 9692991c603aad14329a835305e59c2c1ff76874 | [
"Apache-2.0"
] | null | null | null | """ handle game's room """
import uuid
from django_redis import get_redis_connection
from . import rules
def roomExist(roomID):
""" retun true if room is exist """
conn = get_redis_connection("games")
result = conn.exists(roomID)
del conn
return result
def create(userID):
""" cr... | 26.388535 | 62 | 0.603427 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 636 | 0.153512 |
a8ae061feeba3985c2e2f3b0364a2da97ebf2e9e | 211 | py | Python | muscles/neo4j/read_py2neo.py | Spanarchian/measure_group | 45eb1f2420cda02611e454f9cd9e568ccba9a4e9 | [
"MIT"
] | null | null | null | muscles/neo4j/read_py2neo.py | Spanarchian/measure_group | 45eb1f2420cda02611e454f9cd9e568ccba9a4e9 | [
"MIT"
] | null | null | null | muscles/neo4j/read_py2neo.py | Spanarchian/measure_group | 45eb1f2420cda02611e454f9cd9e568ccba9a4e9 | [
"MIT"
] | null | null | null |
from py2neo import Graph
grapher = Graph("bolt://localhost:7687", auth=("neo4j", "changeme"))
x = grapher.run("MATCH (a :Person) RETURN a.name, a.city, a.age").to_data_frame()
print(f"To_data_frame() :\n{x}")
| 30.142857 | 81 | 0.682464 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 113 | 0.535545 |
a8ae7294dfc6a8d068a24cb267a4767b51987e41 | 5,687 | py | Python | core/levels/thunder/a2finance/a2finance.py | wwu-pdx/web-ctf | 82774af40f613e99568d44cd83ea564e4ee68711 | [
"MIT"
] | null | null | null | core/levels/thunder/a2finance/a2finance.py | wwu-pdx/web-ctf | 82774af40f613e99568d44cd83ea564e4ee68711 | [
"MIT"
] | null | null | null | core/levels/thunder/a2finance/a2finance.py | wwu-pdx/web-ctf | 82774af40f613e99568d44cd83ea564e4ee68711 | [
"MIT"
] | null | null | null | import random
import os
import subprocess
import shutil
from google.cloud import storage, logging as glogging
from core.framework import levels
from core.framework.cloudhelpers import deployments, iam, gcstorage, ssh_keys
LEVEL_PATH = 'thunder/a2finance'
RESOURCE_PREFIX = 'a2'
LOG_NAME = 'transactions'
def create(... | 40.913669 | 152 | 0.641639 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,286 | 0.401969 |
a8aef546c4ef288dfde3666fee31117f886756ad | 3,712 | py | Python | train.py | R4j4n/Travelling-salesman-problem-using-Genetic-Algorimthm | fe30575497d4851eb781225c66bd68ee22203d47 | [
"MIT"
] | 4 | 2020-11-19T12:41:33.000Z | 2021-02-24T03:08:32.000Z | train.py | R4j4n/Travelling-salesman-problem-using-Genetic-Algorimthm | fe30575497d4851eb781225c66bd68ee22203d47 | [
"MIT"
] | null | null | null | train.py | R4j4n/Travelling-salesman-problem-using-Genetic-Algorimthm | fe30575497d4851eb781225c66bd68ee22203d47 | [
"MIT"
] | 2 | 2020-11-24T01:01:53.000Z | 2021-02-18T16:10:04.000Z | import numpy as np
from environment import Environment
#~~~~~~~~CREATING THE BOTS~~~~~~~~~
class Route():
def __init__(self, dnaLength):
# dnaLength = num of planets........
self.dnaLength = dnaLength
self.dna = list()
self.distance = 0
# Initialize the rando... | 24.421053 | 106 | 0.53556 | 1,598 | 0.430496 | 0 | 0 | 0 | 0 | 0 | 0 | 500 | 0.134698 |
a8afaad49a2d75bdb21b22f68fd79476052c0537 | 7,002 | py | Python | PerFrameObjectDetector.py | SunBangjie/smartphone_pairing | 633f80961be1a213e82077d2e5fd08f0cdf2453b | [
"MIT"
] | null | null | null | PerFrameObjectDetector.py | SunBangjie/smartphone_pairing | 633f80961be1a213e82077d2e5fd08f0cdf2453b | [
"MIT"
] | null | null | null | PerFrameObjectDetector.py | SunBangjie/smartphone_pairing | 633f80961be1a213e82077d2e5fd08f0cdf2453b | [
"MIT"
] | null | null | null | import cv2
import os
from os import listdir, makedirs
from os.path import isfile, join, exists
import numpy as np
import time
import math
DEBUG = True
FACTOR = 2
RESO_X = int(576 / FACTOR)
RESO_Y = int(640 / FACTOR)
CONF_VAL = 0
THRESHOLD = 0
UPPER_BOUND = 230
LOWER_BOUND = 150
def get_file_index(filename):
i... | 35.363636 | 79 | 0.59126 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,988 | 0.283919 |
a8b12924de45222461a00e3c63814bfcde7cffa6 | 25,138 | py | Python | example/nsls2id.py | NSLS-II/aphla | ceb5410dc836a8fb16321b6dc5e10d442be765c5 | [
"BSD-3-Clause"
] | null | null | null | example/nsls2id.py | NSLS-II/aphla | ceb5410dc836a8fb16321b6dc5e10d442be765c5 | [
"BSD-3-Clause"
] | 1 | 2020-02-17T18:56:18.000Z | 2020-02-20T17:06:20.000Z | example/nsls2id.py | NSLS-II/aphla | ceb5410dc836a8fb16321b6dc5e10d442be765c5 | [
"BSD-3-Clause"
] | 1 | 2021-03-08T16:07:11.000Z | 2021-03-08T16:07:11.000Z | """
NSLS-II insertion device commissioning/operation
copyright (C) 2014, Yongjun Li, Yoshi Hidaka, Lingyun Yang
"""
import aphla as ap
import itertools
import numpy as np
import re
import h5py
_params = {
"dw100g1c08u":
{"unitsys": "phy",
"gap": (119.0, 147.0, 30, 0.1),
"cch": ("cch0", ... | 33.383798 | 105 | 0.584533 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9,484 | 0.377277 |
a8b1c17407c071201c3fa293959d5fdb12639e2e | 12,012 | py | Python | Tests/DimensionService.py | lapstue/tm1py | a71886b0f96a3e270d5a39ef999e45b413ba4232 | [
"MIT"
] | null | null | null | Tests/DimensionService.py | lapstue/tm1py | a71886b0f96a3e270d5a39ef999e45b413ba4232 | [
"MIT"
] | null | null | null | Tests/DimensionService.py | lapstue/tm1py | a71886b0f96a3e270d5a39ef999e45b413ba4232 | [
"MIT"
] | null | null | null | import configparser
import unittest
from pathlib import Path
from TM1py.Objects import Dimension, Hierarchy, Element
from TM1py.Objects import ElementAttribute
from TM1py.Services import TM1Service
class TestDimensionService(unittest.TestCase):
@classmethod
def setUpClass(cls):
"""
Establish... | 42.9 | 114 | 0.676157 | 11,761 | 0.979104 | 0 | 0 | 2,867 | 0.238678 | 0 | 0 | 1,674 | 0.139361 |
a8b203712862c05aef3aa6e6577ae93f4675e284 | 387 | py | Python | tests/test_version.py | datatags/pyCraft | 769d903e90a704ae860e16d74bc7c73437028ee8 | [
"Apache-2.0"
] | 759 | 2015-01-30T13:04:58.000Z | 2022-03-30T22:42:40.000Z | tests/test_version.py | datatags/pyCraft | 769d903e90a704ae860e16d74bc7c73437028ee8 | [
"Apache-2.0"
] | 220 | 2015-03-17T17:26:48.000Z | 2022-03-17T21:42:39.000Z | tests/test_version.py | datatags/pyCraft | 769d903e90a704ae860e16d74bc7c73437028ee8 | [
"Apache-2.0"
] | 284 | 2015-03-23T16:24:48.000Z | 2022-03-24T15:37:22.000Z | from distutils.version import StrictVersion as SV
import unittest
import minecraft
class VersionTest(unittest.TestCase):
def test_module_version_is_a_valid_pep_386_strict_version(self):
SV(minecraft.__version__)
def test_protocol_version_is_an_int(self):
for version in minecraft.SUPPORTED_PR... | 27.642857 | 68 | 0.780362 | 300 | 0.775194 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a8b29c236abc1337dcc504b9375143897ebfec61 | 1,276 | py | Python | td3/Twin_Delayed_DDPG/policy_network.py | Gregory-Eales/ml-reimplementations | ef2652224cc31ca3b569c9ccd9089a4053eb2b2f | [
"MIT"
] | 1 | 2019-05-03T21:48:26.000Z | 2019-05-03T21:48:26.000Z | td3/Twin_Delayed_DDPG/policy_network.py | Gregory-Eales/ML-Reimplementations | ef2652224cc31ca3b569c9ccd9089a4053eb2b2f | [
"MIT"
] | null | null | null | td3/Twin_Delayed_DDPG/policy_network.py | Gregory-Eales/ML-Reimplementations | ef2652224cc31ca3b569c9ccd9089a4053eb2b2f | [
"MIT"
] | null | null | null | import torch
from torch.nn import functional as F
from torch import optim
from torch import nn
class PolicyNetwork(torch.nn.Module):
def __init__(self, in_dim, out_dim, alpha=0.01):
super(PolicyNetwork, self).__init__()
self.in_dim = in_dim
self.out_dim = out_dim
self.l1 = nn.Linear(in_dim, 128)
self.l2... | 20.918033 | 80 | 0.673981 | 1,044 | 0.818182 | 0 | 0 | 0 | 0 | 0 | 0 | 25 | 0.019592 |
a8b302617db36ad0d8226865d1c39855fc3e1ea4 | 2,542 | py | Python | MoodyBeatsRecommenderAPI/api/serializers.py | labs12-music-stream-selector/DS | 8029556547c2478a647649c89cfb834893647795 | [
"MIT"
] | null | null | null | MoodyBeatsRecommenderAPI/api/serializers.py | labs12-music-stream-selector/DS | 8029556547c2478a647649c89cfb834893647795 | [
"MIT"
] | 19 | 2019-12-26T17:21:07.000Z | 2022-02-17T22:21:18.000Z | MoodyBeatsRecommenderAPI/api/serializers.py | labs12-music-stream-selector/DS | 8029556547c2478a647649c89cfb834893647795 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from songs.models import (
Song,
Tag,
NewVideo,
NewComment,
NewVideoTag,
NewVideoStats,
NewVideoCorrectMood,
)
class NewVideoStatsSerializer(serializers.ModelSerializer):
new_video = serializers.StringRelatedField()
class Meta:
model = NewVideoStats
fields = [
'v... | 17.652778 | 65 | 0.712038 | 2,147 | 0.844611 | 0 | 0 | 0 | 0 | 0 | 0 | 1,033 | 0.406373 |
a8b4ca0aa758fa6b9fa0e302dfe53d2794b1c6f8 | 2,107 | py | Python | lab/migrations/0003_auto_20191202_1534.py | jtdub/prod2lab | 054c922f731ad377b83714194ef806325f79336a | [
"MIT"
] | 11 | 2019-11-20T02:05:30.000Z | 2021-08-22T13:15:14.000Z | lab/migrations/0003_auto_20191202_1534.py | jtdub/prod2lab | 054c922f731ad377b83714194ef806325f79336a | [
"MIT"
] | 12 | 2019-11-20T02:07:54.000Z | 2019-12-11T14:57:59.000Z | lab/migrations/0003_auto_20191202_1534.py | jtdub/prod2lab | 054c922f731ad377b83714194ef806325f79336a | [
"MIT"
] | 2 | 2019-11-20T02:05:33.000Z | 2019-11-28T01:29:20.000Z | # Generated by Django 2.2.8 on 2019-12-02 15:34
from django.db import migrations, models
import django.db.models.deletion
from lab.models import OperatingSystem
def initial_os_data(app, schema_editor):
data = [
{"os": "ios", "os_type": "cisco_ios", "term_length": "terminal length 0", "fetch_config": "sho... | 41.313725 | 123 | 0.613669 | 899 | 0.426673 | 0 | 0 | 0 | 0 | 0 | 0 | 817 | 0.387755 |
a8b4f74502adf34f654e79bfc28668dafc30babc | 3,734 | py | Python | org.cohorte.eclipse.runner.basic/files/test/cohorte/composer/top/criteria/distance/configuration.py | isandlaTech/cohorte-devtools | 9ba9021369188d2f0ad5c845ef242fd5a7097b57 | [
"Apache-2.0"
] | 1 | 2017-03-04T14:37:15.000Z | 2017-03-04T14:37:15.000Z | org.cohorte.eclipse.runner.basic/files/test/cohorte/composer/top/criteria/distance/configuration.py | isandlaTech/cohorte-devtools | 9ba9021369188d2f0ad5c845ef242fd5a7097b57 | [
"Apache-2.0"
] | 4 | 2017-08-21T08:17:14.000Z | 2018-03-02T13:51:43.000Z | org.cohorte.eclipse.runner.basic/files/test/cohorte/composer/top/criteria/distance/configuration.py | isandlaTech/cohorte-devtools | 9ba9021369188d2f0ad5c845ef242fd5a7097b57 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -- Content-Encoding: UTF-8 --
"""
Top Composer: Group by configuration
:author: Thomas Calmant
:license: Apache Software License 2.0
:version: 3.0.0
..
This file is part of Cohorte.
Cohorte is free software: you can redistribute it and/or modify
it under the terms of the GNU Gene... | 30.606557 | 80 | 0.598822 | 2,166 | 0.580075 | 0 | 0 | 2,377 | 0.636583 | 0 | 0 | 2,118 | 0.56722 |
a8b59e7ec8b58b8d89bcd8526c562fd7f8d61a04 | 14,324 | py | Python | hask3/lang/lazylist.py | mvaled/hask | e2c8457552675c4f7953c596c5af30cb925233c6 | [
"BSD-2-Clause"
] | 7 | 2018-08-25T07:52:19.000Z | 2021-03-12T15:48:19.000Z | hask3/lang/lazylist.py | mvaled/hask | e2c8457552675c4f7953c596c5af30cb925233c6 | [
"BSD-2-Clause"
] | 2 | 2018-08-22T01:59:10.000Z | 2018-12-03T09:14:08.000Z | hask3/lang/lazylist.py | mvaled/hask | e2c8457552675c4f7953c596c5af30cb925233c6 | [
"BSD-2-Clause"
] | 1 | 2020-09-23T04:52:05.000Z | 2020-09-23T04:52:05.000Z | from collections import Sequence
from hask3.hack import objectify
from hask3.lang.type_system import Typeclass
from hask3.lang.type_system import Hask
from hask3.lang.typeclasses import Show
from hask3.lang.typeclasses import Eq
from hask3.lang.typeclasses import Ord
from hask3.lang.syntax import Syntax
from hask3.lang... | 30.155789 | 78 | 0.563809 | 11,882 | 0.829517 | 1,648 | 0.115052 | 5,145 | 0.359187 | 0 | 0 | 3,608 | 0.251885 |
a8b637cea2a69b4761c18bfab888fa45e412a121 | 3,603 | py | Python | code/test_dropout.py | lisa-1010/smart-tutor | 5453fff780d769c8011ee66cd4b30d9656e0d3db | [
"MIT"
] | 20 | 2017-02-01T19:09:56.000Z | 2021-11-14T20:39:13.000Z | code/test_dropout.py | lisa-1010/smart-tutor | 5453fff780d769c8011ee66cd4b30d9656e0d3db | [
"MIT"
] | 2 | 2019-06-04T17:40:56.000Z | 2019-07-01T11:17:03.000Z | code/test_dropout.py | lisa-1010/smart-tutor | 5453fff780d769c8011ee66cd4b30d9656e0d3db | [
"MIT"
] | 7 | 2018-05-31T22:21:04.000Z | 2021-11-14T20:39:17.000Z |
# coding: utf-8
# # Using Dropout
# Let's see how we can use dropout for early stopping
from concept_dependency_graph import ConceptDependencyGraph
import data_generator as dg
from student import *
import simple_mdp as sm
import dynamics_model_class as dmc
import numpy as np
import dataset_utils
import tensorflow a... | 33.672897 | 142 | 0.644185 | 215 | 0.059672 | 0 | 0 | 0 | 0 | 0 | 0 | 592 | 0.164308 |
a8b7116ef65af10b72e0c07da19900a3a9d62e85 | 48,908 | py | Python | deep_disfluency/corpus/tree_pos_map_writer.py | askender/deep_disfluency | bea8403ed954df8eadd3e2b9d98bb7c2b416a665 | [
"MIT"
] | null | null | null | deep_disfluency/corpus/tree_pos_map_writer.py | askender/deep_disfluency | bea8403ed954df8eadd3e2b9d98bb7c2b416a665 | [
"MIT"
] | null | null | null | deep_disfluency/corpus/tree_pos_map_writer.py | askender/deep_disfluency | bea8403ed954df8eadd3e2b9d98bb7c2b416a665 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from collections import defaultdict
import re
from nltk import tree
from swda import CorpusReader
from tree_pos_map import TreeMapCorpus
from tree_pos_map import POSMapCorpus
possibleMistranscription = [("its", "it's"),
("Its", "It's"),
(... | 53.393013 | 86 | 0.329598 | 47,452 | 0.97023 | 0 | 0 | 0 | 0 | 0 | 0 | 10,177 | 0.208085 |
a8b79a3e7277f7dbfdec484f93d81238ae19f3b6 | 2,650 | py | Python | account_ux/wizards/account_invoice_tax_wizard.py | odoo-mastercore/odoo-argentina | 58cdfe8610bae42f69ddb9d652a28eb3245f6a04 | [
"MIT"
] | 1 | 2021-01-25T15:57:58.000Z | 2021-01-25T15:57:58.000Z | account_ux/wizards/account_invoice_tax_wizard.py | odoo-mastercore/odoo-argentina | 58cdfe8610bae42f69ddb9d652a28eb3245f6a04 | [
"MIT"
] | null | null | null | account_ux/wizards/account_invoice_tax_wizard.py | odoo-mastercore/odoo-argentina | 58cdfe8610bae42f69ddb9d652a28eb3245f6a04 | [
"MIT"
] | 2 | 2020-10-17T16:36:02.000Z | 2021-01-24T10:20:05.000Z | ##############################################################################
# For copyright and license notices, see __manifest__.py file in module root
# directory
##############################################################################
from odoo import models, fields, api
class AccountInvoiceTaxWizard(mode... | 30.113636 | 78 | 0.54566 | 2,363 | 0.891698 | 0 | 0 | 618 | 0.233208 | 0 | 0 | 780 | 0.29434 |
a8b831c04a0da0348f5f1df321ba4849d4c19f2a | 7,428 | py | Python | dslogparser/dslogparser.py | brettle/dslogparser | 81c822fbbe487ed64fd5da54b8e2d39f7a713382 | [
"MIT"
] | null | null | null | dslogparser/dslogparser.py | brettle/dslogparser | 81c822fbbe487ed64fd5da54b8e2d39f7a713382 | [
"MIT"
] | null | null | null | dslogparser/dslogparser.py | brettle/dslogparser | 81c822fbbe487ed64fd5da54b8e2d39f7a713382 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Parse the FRC drive station logs which are packed binary data
# Notes on comparison to DSLog-Parse:
# D-P has packet_loss as a *signed* integer, which makes no sense. Unsigned looks sensible.
import datetime
import math
import re
import struct
import bitstring
MAX_... | 32.436681 | 116 | 0.585757 | 6,644 | 0.894453 | 556 | 0.074852 | 1,699 | 0.228729 | 0 | 0 | 1,757 | 0.236537 |
a8b9201f03e684e775e72ea44750cbcfe85144ef | 1,177 | py | Python | app/define/views.py | alejandro-mosso/language-service | 014377243d82174a3a4aeae398d1eb9100a079ac | [
"MIT"
] | null | null | null | app/define/views.py | alejandro-mosso/language-service | 014377243d82174a3a4aeae398d1eb9100a079ac | [
"MIT"
] | null | null | null | app/define/views.py | alejandro-mosso/language-service | 014377243d82174a3a4aeae398d1eb9100a079ac | [
"MIT"
] | null | null | null | from rest_framework.views import APIView
from rest_framework import status
from django.http import JsonResponse
from .services import DefineService
from .serializers import DefineSerializer
class DefineApiView(APIView):
service = DefineService()
"""
$ curl "http://localhost:9000/define?word=Hello"
"... | 37.967742 | 103 | 0.596432 | 984 | 0.836024 | 0 | 0 | 0 | 0 | 0 | 0 | 240 | 0.203908 |
a8bb48e45e4b0f9fb98a1e00d99c968055bb32df | 4,004 | py | Python | tango_shared/settings.py | doismellburning/tango-shared-core | f0f35a2d068ecd6bf02f663e0d9ba21b36e5b22b | [
"MIT"
] | null | null | null | tango_shared/settings.py | doismellburning/tango-shared-core | f0f35a2d068ecd6bf02f663e0d9ba21b36e5b22b | [
"MIT"
] | null | null | null | tango_shared/settings.py | doismellburning/tango-shared-core | f0f35a2d068ecd6bf02f663e0d9ba21b36e5b22b | [
"MIT"
] | null | null | null | import django.conf.global_settings as DEFAULT_SETTINGS
### Tango-unique settings
# Thumbnail aliases determines default image sizes for easy-thumbnails
THUMBNAIL_ALIASES = {
'': {
'thumb': {'size': (50, 50), 'autocrop': True, 'crop': 'smart', 'upscale': True},
'one_col': {'size': (60... | 35.122807 | 101 | 0.64985 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,526 | 0.630869 |
a8bbe7e825f46ffee0807079debe846ac5d0afca | 1,374 | py | Python | examples/mini_site/steps/stale_steps.py | xrg/behave_manners | 93cb570e04af870f3401048d26dd7f0e8350759e | [
"BSD-2-Clause"
] | 3 | 2020-02-02T11:11:44.000Z | 2021-11-17T22:21:18.000Z | examples/mini_site/steps/stale_steps.py | xrg/behave_manners | 93cb570e04af870f3401048d26dd7f0e8350759e | [
"BSD-2-Clause"
] | null | null | null | examples/mini_site/steps/stale_steps.py | xrg/behave_manners | 93cb570e04af870f3401048d26dd7f0e8350759e | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: UTF-8 -*-
from __future__ import print_function
from behave import given, when, then, step
from behave_manners.pagelems import DOMScope
from behave_manners.action_chains import ActionChains
from selenium.webdriver.common.keys import Keys
@when(u'I click to have the dropdown visible')
def click_dropdown1... | 33.512195 | 87 | 0.749636 | 0 | 0 | 0 | 0 | 1,109 | 0.807132 | 0 | 0 | 317 | 0.230713 |
a8bcb5a8054da5895bcfc5e72fd283ac76f8d6a9 | 4,418 | py | Python | django_sendfile/utils.py | ParikhKadam/django-sendfile2 | 6145876dae2ffb838a249a0090fc20897b868981 | [
"BSD-3-Clause"
] | 46 | 2018-05-15T14:41:25.000Z | 2022-03-24T08:10:13.000Z | django_sendfile/utils.py | ParikhKadam/django-sendfile2 | 6145876dae2ffb838a249a0090fc20897b868981 | [
"BSD-3-Clause"
] | 45 | 2018-03-20T16:55:48.000Z | 2022-03-04T02:34:30.000Z | django_sendfile/utils.py | ParikhKadam/django-sendfile2 | 6145876dae2ffb838a249a0090fc20897b868981 | [
"BSD-3-Clause"
] | 15 | 2018-04-05T17:32:09.000Z | 2022-03-06T13:36:09.000Z | from functools import lru_cache
from importlib import import_module
from mimetypes import guess_type
from pathlib import Path, PurePath
from urllib.parse import quote, quote_plus
import logging
import unicodedata
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.http ... | 34.248062 | 94 | 0.704391 | 0 | 0 | 0 | 0 | 270 | 0.061114 | 0 | 0 | 1,643 | 0.371888 |
a8bcfe7dd530695d5f14c79ff05aca1766647425 | 1,632 | py | Python | core/cmake_gens/tmake_cmake_generator_mac.py | tomken/tmake | ee4f2c709a3e021fb04427bd7ae72f99d2714176 | [
"MIT"
] | 2 | 2020-01-11T04:26:27.000Z | 2022-01-10T06:35:22.000Z | core/cmake_gens/tmake_cmake_generator_mac.py | tomken/tmake | ee4f2c709a3e021fb04427bd7ae72f99d2714176 | [
"MIT"
] | null | null | null | core/cmake_gens/tmake_cmake_generator_mac.py | tomken/tmake | ee4f2c709a3e021fb04427bd7ae72f99d2714176 | [
"MIT"
] | 1 | 2020-04-25T01:06:39.000Z | 2020-04-25T01:06:39.000Z | #!/usr/bin/python
# -*- coding: UTF-8 -*-
"""cmake generator mac file"""
import os
import core
from core.info.tmake_builtin import tmake_path
from .tmake_cmake_generator import CMakeGenerator, CMakeSourceItem
PLUGIN_VERSION = "1.0.0"
CMAKE_IOS_RESOURCE_TEMPLATE = """
set({} {})
set_source_files_properties(${{{}}} P... | 32 | 74 | 0.683824 | 1,173 | 0.71875 | 0 | 0 | 0 | 0 | 0 | 0 | 433 | 0.265319 |
a8be0db32e967cb0153586a373f4da4226c176be | 517 | py | Python | students/models.py | estudeplus/perfil | 58b847aa226b885ca6a7a128035f09de2322519f | [
"MIT"
] | null | null | null | students/models.py | estudeplus/perfil | 58b847aa226b885ca6a7a128035f09de2322519f | [
"MIT"
] | 21 | 2019-05-11T18:01:10.000Z | 2022-02-10T11:22:01.000Z | students/models.py | estudeplus/perfil | 58b847aa226b885ca6a7a128035f09de2322519f | [
"MIT"
] | null | null | null | from django.db import models
class Student(models.Model):
name = models.CharField(max_length=100)
student_id = models.CharField(max_length=10)
email = models.EmailField(max_length=254)
password = models.CharField(max_length=15)
def __str__(self):
return self.name
class InstitutionalEmail(... | 32.3125 | 93 | 0.742747 | 484 | 0.93617 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 0.034816 |
a8c0597a44875c6084c1bcd00b54ef0ec72bcfc2 | 1,087 | py | Python | essentials/oo-programming/device_log.py | iomegak12/intel-training-usecase-1 | 0d1ab6f6076f46f7fbb290ceb41d6b851da1af3a | [
"MIT"
] | null | null | null | essentials/oo-programming/device_log.py | iomegak12/intel-training-usecase-1 | 0d1ab6f6076f46f7fbb290ceb41d6b851da1af3a | [
"MIT"
] | null | null | null | essentials/oo-programming/device_log.py | iomegak12/intel-training-usecase-1 | 0d1ab6f6076f46f7fbb290ceb41d6b851da1af3a | [
"MIT"
] | null | null | null | class DeviceLog:
def __init__(self, deviceId, deviceName, temperature, location, recordDate):
self.deviceId = deviceId
self.deviceName = deviceName
self.temperature = temperature
self.location = location
self.recordDate = recordDate
def getStatus(self):
if self.t... | 31.057143 | 88 | 0.600736 | 809 | 0.74425 | 0 | 0 | 0 | 0 | 0 | 0 | 164 | 0.150874 |
a8c0d365f8b2270c4c27edb145a6a68f64309eca | 2,644 | py | Python | tigerline/management/commands/load_counties.py | adamfast/geodjango-tigerline | f071a49ec4c50955f4f5bcb40633a75fd53b9a3a | [
"BSD-3-Clause"
] | 11 | 2015-03-10T23:06:28.000Z | 2021-09-15T10:29:39.000Z | tigerline/management/commands/load_counties.py | adamfast/geodjango-tigerline | f071a49ec4c50955f4f5bcb40633a75fd53b9a3a | [
"BSD-3-Clause"
] | 2 | 2016-06-15T04:04:20.000Z | 2017-08-17T17:07:17.000Z | tigerline/management/commands/load_counties.py | adamfast/geodjango-tigerline | f071a49ec4c50955f4f5bcb40633a75fd53b9a3a | [
"BSD-3-Clause"
] | 7 | 2015-04-14T21:34:30.000Z | 2018-07-24T06:30:18.000Z | import datetime
import os
import sys
from optparse import make_option
from django.core.management.base import BaseCommand
from django.conf import settings
try:
from django.contrib.gis.utils import LayerMapping
except ImportError:
print("gdal is required")
sys.exit(1)
from tigerline.models import County
... | 31.855422 | 85 | 0.57829 | 1,226 | 0.463691 | 0 | 0 | 0 | 0 | 0 | 0 | 910 | 0.344175 |
a8c0f73f7ea21f51a4d844bc06568bc871e02184 | 14,318 | py | Python | nitorch/tools/registration/utils.py | balbasty/nitorch | d30c3125a8a66ea1434f2b39ed03338afd9724b4 | [
"MIT"
] | 46 | 2020-07-31T10:14:05.000Z | 2022-03-24T12:51:46.000Z | nitorch/tools/registration/utils.py | balbasty/nitorch | d30c3125a8a66ea1434f2b39ed03338afd9724b4 | [
"MIT"
] | 36 | 2020-10-06T19:01:38.000Z | 2022-02-03T18:07:35.000Z | nitorch/tools/registration/utils.py | balbasty/nitorch | d30c3125a8a66ea1434f2b39ed03338afd9724b4 | [
"MIT"
] | 6 | 2021-01-05T14:59:05.000Z | 2021-11-18T18:26:45.000Z | """Utility functions for registration algorithms.
Some (jg, jhj, affine_grid_backward) should maybe be moved to the `spatial`
module (?).
"""
from nitorch.core import py, utils, linalg
from nitorch import spatial
import torch
from . import optim as optm
def defaults_velocity(prm=None):
if prm is None:
pr... | 31.330416 | 141 | 0.547912 | 0 | 0 | 0 | 0 | 3,340 | 0.233208 | 0 | 0 | 3,990 | 0.278592 |
a8c1d8a918972ec6d7de78e07073b8569d788358 | 5,014 | py | Python | utils/The_Alchemist_Code/conceptcard.py | heboric/ouro | 5209a9946b39874ed02c2602baf39fd299de609b | [
"Apache-2.0"
] | 3 | 2019-04-25T22:24:22.000Z | 2019-11-21T08:39:33.000Z | utils/The_Alchemist_Code/conceptcard.py | heboric/ouro | 5209a9946b39874ed02c2602baf39fd299de609b | [
"Apache-2.0"
] | null | null | null | utils/The_Alchemist_Code/conceptcard.py | heboric/ouro | 5209a9946b39874ed02c2602baf39fd299de609b | [
"Apache-2.0"
] | 3 | 2018-08-13T17:49:34.000Z | 2019-02-14T22:30:09.000Z | from ._main import DIRS,LinkDB,ConvertFields,StrBuff,StrCondition,Embed, Rarity,GitLabLink
import copy
def Conceptcard(iname, page):
#get card dir
card=DIRS['Conceptcard'][iname]
#create basic embed
embed= Embed(
title='', #page name
url=LinkDB('card',iname,'',True,'jp') #page link
)
embed.set_author(name=... | 31.734177 | 182 | 0.64639 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,285 | 0.455724 |
a8c1f516c23fafb626557728f3570858f9201939 | 8,397 | py | Python | xdagtool/xdu_test.py | rulerson/xdagtool | 1eb7fb352dd7cadcd6611279720210e04a5ec3f6 | [
"MIT"
] | null | null | null | xdagtool/xdu_test.py | rulerson/xdagtool | 1eb7fb352dd7cadcd6611279720210e04a5ec3f6 | [
"MIT"
] | null | null | null | xdagtool/xdu_test.py | rulerson/xdagtool | 1eb7fb352dd7cadcd6611279720210e04a5ec3f6 | [
"MIT"
] | null | null | null | import uuid, os
from pathlib import Path
from xdagtool import xdu
class TestPathCopy:
def test_file_copy1(self, tmp_path: Path, capsys):
# file a
srcpath = tmp_path / 'srcpath-{}'.format(uuid.uuid4())
destpath = tmp_path / 'destpath-{}'.format(uuid.uuid4())
with capsys.disabled():... | 33.722892 | 127 | 0.519709 | 8,325 | 0.991426 | 0 | 0 | 0 | 0 | 0 | 0 | 1,365 | 0.162558 |
a8c4518ebd49ebea7566e47563f73c0667eeaa48 | 2,194 | py | Python | rnaseq.py | albertoriva/pipelines | cb7d89c44883c3ed43526b2e7079bcb233b5afd0 | [
"MIT"
] | null | null | null | rnaseq.py | albertoriva/pipelines | cb7d89c44883c3ed43526b2e7079bcb233b5afd0 | [
"MIT"
] | null | null | null | rnaseq.py | albertoriva/pipelines | cb7d89c44883c3ed43526b2e7079bcb233b5afd0 | [
"MIT"
] | null | null | null | # DibigActor
# (c) 2015, A. Riva, DiBiG
# RNAseq processing pipeline, v2.0
from SampleCollection import SampleCollection
from Logger import Logger
from Director import Director
D = Director(ACT)
## Initialization
ACT.loadConfiguration(ACT.Arguments[0])
ACT.bt2idx = ACT.getConf("bt2idx")
ACT.staridx = ACT.getConf("... | 32.746269 | 103 | 0.746126 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 924 | 0.421149 |
a8c4ef65d4167eae76cb55b333d7586f25c61d43 | 169 | py | Python | base/NeighborResult.py | Holly-Jiang/QCTSA | b90136b9df18fc21ae53b431f1e5e0c6ef786fae | [
"MIT"
] | null | null | null | base/NeighborResult.py | Holly-Jiang/QCTSA | b90136b9df18fc21ae53b431f1e5e0c6ef786fae | [
"MIT"
] | null | null | null | base/NeighborResult.py | Holly-Jiang/QCTSA | b90136b9df18fc21ae53b431f1e5e0c6ef786fae | [
"MIT"
] | null | null | null | class NeighborResult:
def __init__(self):
self.solutions = []
self.choose_path = []
self.current_num = 0
self.curr_solved_gates = []
| 24.142857 | 35 | 0.585799 | 168 | 0.994083 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a8c6a442acbe32317e2a13205457bfa40d84b691 | 5,098 | py | Python | src/models/sequence_predictor_model.py | rajatdiptabiswas/NN_compression | 1a2650ad897bcc1f32f3b63d0a6477b8f6be6e29 | [
"MIT"
] | 211 | 2017-04-05T15:37:37.000Z | 2022-03-03T16:17:02.000Z | src/models/sequence_predictor_model.py | Benjamin-Etheredge/NN_compression | 1ded955ac6069299a8fbe37e14373f9e173ad912 | [
"MIT"
] | 14 | 2017-08-31T02:40:29.000Z | 2020-04-29T06:26:19.000Z | src/models/sequence_predictor_model.py | Benjamin-Etheredge/NN_compression | 1ded955ac6069299a8fbe37e14373f9e173ad912 | [
"MIT"
] | 45 | 2017-07-08T10:19:21.000Z | 2021-05-15T07:35:35.000Z | from __future__ import print_function
import os
import time
import tensorflow as tf
import numpy as np
import sys
from zoneout_wrapper import ZoneoutWrapper
class SequencePredictor():
def add_placeholders(self):
"""Generates placeholder variables to represent the input tensors
"""
self.inp... | 42.840336 | 152 | 0.678501 | 4,938 | 0.968615 | 0 | 0 | 0 | 0 | 0 | 0 | 740 | 0.145155 |
a8c77d5a50c3e402e1747bc1dedba092e6e2fa50 | 4,131 | py | Python | machine/EventCase.py | technosvitman/sm_gene | 243d060fec7c642ce74843776a016ded13a68855 | [
"MIT"
] | null | null | null | machine/EventCase.py | technosvitman/sm_gene | 243d060fec7c642ce74843776a016ded13a68855 | [
"MIT"
] | 9 | 2021-08-11T07:25:53.000Z | 2021-09-01T11:10:33.000Z | machine/EventCase.py | technosvitman/sm_gene | 243d060fec7c642ce74843776a016ded13a68855 | [
"MIT"
] | null | null | null |
'''
@brief this class reflect action decision regarding condition
'''
class EventAction():
'''
@brief build event action
@param cond the conditions to perform the action
@param to the target state if any
@param job the job to do if any
'''
def __init__(self, cond="", to=... | 25.189024 | 107 | 0.487775 | 3,861 | 0.934641 | 0 | 0 | 0 | 0 | 0 | 0 | 1,683 | 0.407407 |
a8c7974a6483483179cdfc40e57d4d46564982cf | 1,995 | py | Python | tests/test_utils.py | initOS/dob-lib | a07ea11fb40d7bdc1714b96da52fbc89ed37fb7b | [
"Apache-2.0"
] | null | null | null | tests/test_utils.py | initOS/dob-lib | a07ea11fb40d7bdc1714b96da52fbc89ed37fb7b | [
"Apache-2.0"
] | null | null | null | tests/test_utils.py | initOS/dob-lib | a07ea11fb40d7bdc1714b96da52fbc89ed37fb7b | [
"Apache-2.0"
] | null | null | null | # © 2021 Florian Kantelberg (initOS GmbH)
# License Apache-2.0 (http://www.apache.org/licenses/).
import argparse
from unittest.mock import patch
import pytest
from doblib import utils
def test_merge():
assert utils.merge([1, 2], [3, 4]) == [1, 2, 3, 4]
assert utils.merge({1, 2}, {3, 4}) == {1, 2, 3, 4}
... | 27.708333 | 76 | 0.595489 | 0 | 0 | 0 | 0 | 450 | 0.225451 | 0 | 0 | 285 | 0.142786 |
a8c9e7922225b107156958f1d399ae85adb6a1dc | 1,721 | py | Python | quedex_api/keys.py | mchalapuk/python-api | 370e3536da69de4b26c241fb9ff32aa0f1f895f3 | [
"Apache-2.0"
] | 17 | 2017-07-13T12:06:01.000Z | 2022-02-07T01:37:36.000Z | quedex_api/keys.py | mchalapuk/python-api | 370e3536da69de4b26c241fb9ff32aa0f1f895f3 | [
"Apache-2.0"
] | 17 | 2017-07-13T09:09:40.000Z | 2022-02-11T03:38:06.000Z | quedex_api/keys.py | mchalapuk/python-api | 370e3536da69de4b26c241fb9ff32aa0f1f895f3 | [
"Apache-2.0"
] | 10 | 2017-07-12T17:56:02.000Z | 2020-02-21T12:58:32.000Z |
quedex_public_key = """-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mQENBFlPvjsBCACr/UfHzXAezskLqcq9NiiaNFDDT5A+biC8VrOglB0ZSQOYRira
NgQ2Cp8Jd+XU77F+J1012BjB5y87Z+hdnwBDsqF7CjkjeQzsE3PSvm9I+E3cneqx
UcinRaUD1wfwVytbg9Q9rpqQ7CTjVWY1UPYjs6dAo1WAp/ux/VTeOFbpO0R3D7if
ZGY1QeISRpLWiMpcG2YCOALnuazABVCNXLhVqa8Y7tt2I... | 53.78125 | 64 | 0.933178 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,699 | 0.987217 |
a8ca1caaa92e342ad9f0cb6b39795b9f66f38f5b | 1,918 | py | Python | main.py | Habejota/Osys2 | ba0ee692e19c007e5b219b7b4ad8bb1304a660f1 | [
"MIT"
] | null | null | null | main.py | Habejota/Osys2 | ba0ee692e19c007e5b219b7b4ad8bb1304a660f1 | [
"MIT"
] | null | null | null | main.py | Habejota/Osys2 | ba0ee692e19c007e5b219b7b4ad8bb1304a660f1 | [
"MIT"
] | null | null | null | # Importando as dependencias
from os import system, chdir, mkdir, rmdir
from time import sleep
from socket import gethostname, gethostbyname
# Informações
__version__ = "1.0"
__tag_version__ = "Osys2 Beta"
# Ethernet and Socket informations
hostname = gethostname()
host = gethostbyname(hostname)
# Modulos e funções ... | 27.014085 | 98 | 0.535454 | 1,487 | 0.773673 | 0 | 0 | 0 | 0 | 0 | 0 | 552 | 0.287201 |
a8ca966f580953fa3afc118449b17258788e105f | 9,349 | py | Python | src/mybot_pkg/scripts/imu_pub.py | leytpapas/thesis_project | eeac775c13d035c2d68a03e5b448617a70c65072 | [
"MIT"
] | null | null | null | src/mybot_pkg/scripts/imu_pub.py | leytpapas/thesis_project | eeac775c13d035c2d68a03e5b448617a70c65072 | [
"MIT"
] | null | null | null | src/mybot_pkg/scripts/imu_pub.py | leytpapas/thesis_project | eeac775c13d035c2d68a03e5b448617a70c65072 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import rospy
import sys
from sensor_msgs.msg import Imu, Temperature
from geometry_msgs.msg import Pose
from tf.transformations import quaternion_from_euler
from math import radians
import serial
import subprocess
class Imu_unit(object):
def __init__(self, imu_topic=rospy.get_param('/imu_t... | 42.303167 | 265 | 0.579099 | 8,964 | 0.958819 | 0 | 0 | 0 | 0 | 0 | 0 | 3,825 | 0.409135 |
a8caad8563cecc8db84796425abde40bb649818d | 385 | py | Python | Timbuchalka/Section-4/conditions.py | Advik-B/Learn-Python | 66ac57259764e8f2c3c6513a8de6c106800d8abe | [
"MIT"
] | 6 | 2021-07-26T14:21:25.000Z | 2021-07-26T14:32:01.000Z | Timbuchalka/Section-4/conditions.py | Advik-B/Learn-Python | 66ac57259764e8f2c3c6513a8de6c106800d8abe | [
"MIT"
] | 2 | 2021-12-10T10:25:19.000Z | 2021-12-10T10:27:15.000Z | Timbuchalka/Section-4/conditions.py | Advik-B/Learn-Python | 66ac57259764e8f2c3c6513a8de6c106800d8abe | [
"MIT"
] | null | null | null | age = int(input("How old are you ?"))
#if age >= 16 and age <= 65:
#if 16 <= age <= 65:
if age in range(16,66):
print ("Have a good day at work.")
elif age > 100 or age <= 0:
print ("Nice Try. This program is not dumb.")
endkey = input ("Press enter to exit")
else:
print (f"Enjoy your free time, ... | 20.263158 | 84 | 0.592208 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 226 | 0.587013 |
a8cc30af5264812a9ba73581c7d77ae45adcd522 | 2,847 | py | Python | agents/fundamentalist.py | anthonyozerov/market-des | 178f89cfa9d83407c7622ce3cc7a74c467916362 | [
"MIT"
] | null | null | null | agents/fundamentalist.py | anthonyozerov/market-des | 178f89cfa9d83407c7622ce3cc7a74c467916362 | [
"MIT"
] | null | null | null | agents/fundamentalist.py | anthonyozerov/market-des | 178f89cfa9d83407c7622ce3cc7a74c467916362 | [
"MIT"
] | null | null | null | import sys
sys.path.append('..')
from agent import Agent
from probability import Probability
import copy
import data
from random import sample
import numpy as np
class Trader(Agent):
def init_params(self,params):
self.next_trades = [0, 0, 0, 0]
self.belief_state =[ [0, 0, 0, 0], [0, 0, 0, 0], [0, ... | 37.96 | 155 | 0.5915 | 2,683 | 0.942396 | 0 | 0 | 0 | 0 | 0 | 0 | 363 | 0.127503 |
a8cce89c7aef767b4e56ec6d4bce5ee004bdf34e | 124 | py | Python | examples/src/python/misc/__init__.py | ajorgensen/heron | 6430c51a4a6030e93018e0ed40e5936a64317636 | [
"Apache-2.0"
] | 2 | 2016-07-04T07:10:31.000Z | 2018-03-28T16:59:02.000Z | examples/src/python/misc/__init__.py | ajorgensen/heron | 6430c51a4a6030e93018e0ed40e5936a64317636 | [
"Apache-2.0"
] | null | null | null | examples/src/python/misc/__init__.py | ajorgensen/heron | 6430c51a4a6030e93018e0ed40e5936a64317636 | [
"Apache-2.0"
] | 1 | 2017-06-05T17:55:45.000Z | 2017-06-05T17:55:45.000Z | """Miscellaneous example topology-related modules"""
__all__ = ['test_task_hook']
from .test_task_hook import TestTaskHook
| 24.8 | 52 | 0.798387 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 68 | 0.548387 |
a8ce6fc717b4afcfe60ede52c71a36ecb551cce6 | 747 | py | Python | src/banditplot.py | schmit/human_interaction | e08be9bf45cb0b9de40cb3bdbcfa5f029173c1c1 | [
"MIT"
] | 4 | 2017-03-05T21:14:53.000Z | 2020-12-01T10:32:16.000Z | src/banditplot.py | schmit/human_interaction | e08be9bf45cb0b9de40cb3bdbcfa5f029173c1c1 | [
"MIT"
] | null | null | null | src/banditplot.py | schmit/human_interaction | e08be9bf45cb0b9de40cb3bdbcfa5f029173c1c1 | [
"MIT"
] | 1 | 2021-01-16T06:14:30.000Z | 2021-01-16T06:14:30.000Z | import numpy as np
import toyplot as tp
from banditutil import create_running_ema
def selection_emas(simulation_output, alpha=0.99):
k = simulation_output["k"]
rema = create_running_ema(alpha, initial=1/k)
return [rema((a == i for a in simulation_output["selection"]), return_list=True)
for i i... | 28.730769 | 102 | 0.645248 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 46 | 0.06158 |
a8cfa6b65da313be457d7b1e85c1b549c3d118ce | 806 | py | Python | tests/test_reducer.py | nclarey/pyg-base | a7b90ea2ad4d740d8e7f8c4a7c9d341d36373862 | [
"MIT"
] | null | null | null | tests/test_reducer.py | nclarey/pyg-base | a7b90ea2ad4d740d8e7f8c4a7c9d341d36373862 | [
"MIT"
] | null | null | null | tests/test_reducer.py | nclarey/pyg-base | a7b90ea2ad4d740d8e7f8c4a7c9d341d36373862 | [
"MIT"
] | 1 | 2022-01-03T21:56:14.000Z | 2022-01-03T21:56:14.000Z | from pyg_base import reducer, reducing, dictable
import pytest
from operator import add, mul
from functools import reduce
def test_reducer():
assert reducer(add, [1,2,3,4]) == 10
assert reducer(mul, [1,2,3,4]) == 24
assert reducer(add, [1]) == 1
assert reducer(add, []) is None
with pytest.... | 26 | 48 | 0.580645 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 23 | 0.028536 |
a8d1e944180d38f03c0bd79f64abd10f90aee5c1 | 1,978 | py | Python | newsapp/scraper/parser.py | atahanyorganci/dailyspokesman | e8c980e8ce63a2bf0596c9126b580f1429efe05b | [
"MIT"
] | null | null | null | newsapp/scraper/parser.py | atahanyorganci/dailyspokesman | e8c980e8ce63a2bf0596c9126b580f1429efe05b | [
"MIT"
] | 3 | 2020-01-06T11:42:15.000Z | 2021-06-19T13:11:02.000Z | newsapp/scraper/parser.py | atahanyorganci/dailyspokesman | e8c980e8ce63a2bf0596c9126b580f1429efe05b | [
"MIT"
] | null | null | null | from datetime import datetime
from typing import Any
from yarl import URL
from newsapp.config import Config
from newsapp.models.article import Article
from newsapp.scraper import NewsItem, ScrapeError, scrape
def get_category_url(category: str) -> URL:
category_path = Config.CATEGORIES[category]["url... | 32.42623 | 87 | 0.646613 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 399 | 0.201719 |
a8d250efd6232e3b2ad01e4163fc3cd5e0932a48 | 1,066 | py | Python | programmingz3/code/subterm_simplify.py | Z3Prover/doc | 3b5c4275b6556df4a95aafca605fd42ae600f9a8 | [
"MIT"
] | 21 | 2018-10-01T08:10:17.000Z | 2022-02-09T17:07:31.000Z | programmingz3/code/subterm_simplify.py | Z3Prover/doc | 3b5c4275b6556df4a95aafca605fd42ae600f9a8 | [
"MIT"
] | 3 | 2018-10-01T12:29:25.000Z | 2019-12-03T11:21:42.000Z | programmingz3/code/subterm_simplify.py | Z3Prover/doc | 3b5c4275b6556df4a95aafca605fd42ae600f9a8 | [
"MIT"
] | 15 | 2018-10-01T12:19:25.000Z | 2022-02-23T10:44:25.000Z | from z3 import *
H = Int('H')
s = Solver()
t = 4 + 4 * (((H - 1) / 2) / 2)
s.add(H % 4 == 0)
s.check()
m = s.model()
def subterms(t):
seen = {}
def subterms_rec(t):
if is_app(t):
for ch in t.children():
if ch in seen:
continue
seen[ch] = ... | 24.227273 | 90 | 0.482176 | 0 | 0 | 347 | 0.325516 | 0 | 0 | 0 | 0 | 8 | 0.007505 |
a8d2869f1b9f1c0b78363d4c3113427c11c89cfc | 8,982 | py | Python | packages/robot/odahuflow/robot/libraries/sdk_wrapper.py | odahu/odahuflow | 58c3220a266a61bb893cf79c4b994569e3445097 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | packages/robot/odahuflow/robot/libraries/sdk_wrapper.py | odahu/odahuflow | 58c3220a266a61bb893cf79c4b994569e3445097 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | packages/robot/odahuflow/robot/libraries/sdk_wrapper.py | odahu/odahuflow | 58c3220a266a61bb893cf79c4b994569e3445097 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # for class Model
import json
from odahuflow.sdk import config
from odahuflow.sdk.clients.api_aggregated import parse_resources_file_with_one_item
from odahuflow.sdk.clients.configuration import ConfigurationClient
from odahuflow.sdk.clients.connection import ConnectionClient
from odahuflow.sdk.clients.deployment impo... | 29.352941 | 114 | 0.725006 | 7,934 | 0.883322 | 0 | 0 | 7,423 | 0.826431 | 0 | 0 | 99 | 0.011022 |
a8d39e7bc43d7332ddc41fbd99b4d1baa9f1a728 | 3,398 | py | Python | src/lh/service_directives.py | Plazmaz/LiquidHoney | eb983a3223b01e19a360132f9661d4c68cd3ae8c | [
"MIT"
] | 20 | 2019-03-24T19:27:59.000Z | 2021-06-11T18:03:02.000Z | src/lh/service_directives.py | Plazmaz/LiquidHoney | eb983a3223b01e19a360132f9661d4c68cd3ae8c | [
"MIT"
] | null | null | null | src/lh/service_directives.py | Plazmaz/LiquidHoney | eb983a3223b01e19a360132f9661d4c68cd3ae8c | [
"MIT"
] | 1 | 2020-04-10T17:12:37.000Z | 2020-04-10T17:12:37.000Z | from abc import ABC
class ProbeConfig(object):
def __init__(self):
self.directives = {}
def add_directive(self, directive):
name = directive.keyword
if name not in self.directives:
self.directives[name] = []
self.directives[name].append(directive)
def get_dire... | 26.546875 | 107 | 0.629488 | 3,351 | 0.986168 | 0 | 0 | 0 | 0 | 0 | 0 | 1,194 | 0.351383 |
a8d46736754468d2c17428db5889acddd766302d | 14,224 | py | Python | Dnaml.py | williamdlees/BioTools | 4aeb0e620c11437b746bee87023343db08f80b70 | [
"MIT"
] | null | null | null | Dnaml.py | williamdlees/BioTools | 4aeb0e620c11437b746bee87023343db08f80b70 | [
"MIT"
] | null | null | null | Dnaml.py | williamdlees/BioTools | 4aeb0e620c11437b746bee87023343db08f80b70 | [
"MIT"
] | null | null | null | # Copyright (c) 2015 William Lees
# 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, distribut... | 40.64 | 120 | 0.566437 | 12,865 | 0.904457 | 0 | 0 | 0 | 0 | 0 | 0 | 4,509 | 0.316999 |
a8d51fd115f735ca8b9bacde53faaf9aede7e370 | 4,699 | py | Python | gaia_project/communication_layer.py | yogurt-company/gaia_ai | 1885059e99a96f45e6cc082b87c189829c4eaed9 | [
"MIT"
] | null | null | null | gaia_project/communication_layer.py | yogurt-company/gaia_ai | 1885059e99a96f45e6cc082b87c189829c4eaed9 | [
"MIT"
] | null | null | null | gaia_project/communication_layer.py | yogurt-company/gaia_ai | 1885059e99a96f45e6cc082b87c189829c4eaed9 | [
"MIT"
] | null | null | null | from traits.api import (HasPrivateTraits, Instance, List, Dict)
from .player import Player
from .board import GameBoard
from .tech_board import TechBoard
from gaia_project.faction_board.player_panel import PlayerPanel
from .layout import Layout
from .constants import BASIC_4P_SETUP
import pygame
import sys
class C... | 27.319767 | 76 | 0.685678 | 4,376 | 0.931262 | 0 | 0 | 0 | 0 | 0 | 0 | 323 | 0.068738 |
a8d55f37a7ad9934a5f3c141465620693ff5ff0b | 2,710 | py | Python | dialogue-engine/test/programytest/security/linking/test_aiml.py | cotobadesign/cotoba-agent-oss | 3833d56e79dcd7529c3e8b3a3a8a782d513d9b12 | [
"MIT"
] | 104 | 2020-03-30T09:40:00.000Z | 2022-03-06T22:34:25.000Z | dialogue-engine/test/programytest/security/linking/test_aiml.py | cotobadesign/cotoba-agent-oss | 3833d56e79dcd7529c3e8b3a3a8a782d513d9b12 | [
"MIT"
] | 25 | 2020-06-12T01:36:35.000Z | 2022-02-19T07:30:44.000Z | dialogue-engine/test/programytest/security/linking/test_aiml.py | cotobadesign/cotoba-agent-oss | 3833d56e79dcd7529c3e8b3a3a8a782d513d9b12 | [
"MIT"
] | 10 | 2020-04-02T23:43:56.000Z | 2021-05-14T13:47:01.000Z | """
Copyright (c) 2020 COTOBA DESIGN, Inc.
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, distri... | 44.42623 | 126 | 0.761255 | 1,349 | 0.497786 | 0 | 0 | 0 | 0 | 0 | 0 | 1,245 | 0.45941 |
a8d5da5c788737a8cc6ea3c6e3295911495ac3e9 | 5,179 | py | Python | activity/activity_ApprovePublication.py | gnott/elife-bot | 584c315d15d1289e0d2c27c28aaaae31174812e4 | [
"MIT"
] | null | null | null | activity/activity_ApprovePublication.py | gnott/elife-bot | 584c315d15d1289e0d2c27c28aaaae31174812e4 | [
"MIT"
] | null | null | null | activity/activity_ApprovePublication.py | gnott/elife-bot | 584c315d15d1289e0d2c27c28aaaae31174812e4 | [
"MIT"
] | null | null | null | import base64
import json
import activity
import os
import requests
import boto.sqs
from boto.sqs.message import Message
from provider import eif
"""
ConvertJATS.py activity
"""
parentdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
os.sys.path.insert(0, parentdir)
class activity_ApprovePublication(... | 40.147287 | 100 | 0.583897 | 4,892 | 0.944584 | 0 | 0 | 0 | 0 | 0 | 0 | 777 | 0.150029 |
a8d7f2fc85888b5e64602a155d1dd889102580a5 | 3,479 | py | Python | density_estimation.py | agilevaluechain/100-page-ml | 9236ec87b0cf563e0998d723be19e58155003a9d | [
"MIT"
] | 3 | 2019-02-12T16:46:23.000Z | 2020-12-02T15:39:38.000Z | density_estimation.py | a272573094/theMLbook | 9236ec87b0cf563e0998d723be19e58155003a9d | [
"MIT"
] | null | null | null | density_estimation.py | a272573094/theMLbook | 9236ec87b0cf563e0998d723be19e58155003a9d | [
"MIT"
] | 2 | 2019-07-22T15:28:58.000Z | 2019-10-14T16:07:51.000Z | import numpy as np
import scipy as sp
import matplotlib
import matplotlib.pyplot as plt
import math
from sklearn.neighbors import KernelDensity
import scipy.integrate as integrate
from sklearn.kernel_ridge import KernelRidge
matplotlib.rcParams['mathtext.fontset'] = 'stix'
matplotlib.rcParams['font.family'] = 'STIXG... | 33.451923 | 144 | 0.635527 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 665 | 0.191147 |
a8d822b3f26b1178674db70984322334b870204a | 1,157 | py | Python | bot/modules/list.py | styloxyash1/mybot | 285efe23d8fa429738ff2198da684d846fe2bf6f | [
"MIT"
] | null | null | null | bot/modules/list.py | styloxyash1/mybot | 285efe23d8fa429738ff2198da684d846fe2bf6f | [
"MIT"
] | null | null | null | bot/modules/list.py | styloxyash1/mybot | 285efe23d8fa429738ff2198da684d846fe2bf6f | [
"MIT"
] | null | null | null | from telegram.ext import CommandHandler, run_async
from bot.helper.mirror_utils.upload_utils.gdriveTools import GoogleDriveHelper
from bot import LOGGER, dispatcher
from bot.helper.telegram_helper.message_utils import sendMessage, sendMarkup, editMessage
from bot.helper.telegram_helper.filters import CustomFilters
... | 41.321429 | 137 | 0.729473 | 0 | 0 | 0 | 0 | 584 | 0.504754 | 0 | 0 | 109 | 0.094209 |
a8d8c0ac90a58dbfc0b8d43c0093181c142ff0dc | 2,348 | py | Python | relational/scripts/comments.py | snspam/sn_spam | e0bb8e9c843e26e5f4be8a49a960ebf7a0d5bfd5 | [
"MIT"
] | null | null | null | relational/scripts/comments.py | snspam/sn_spam | e0bb8e9c843e26e5f4be8a49a960ebf7a0d5bfd5 | [
"MIT"
] | null | null | null | relational/scripts/comments.py | snspam/sn_spam | e0bb8e9c843e26e5f4be8a49a960ebf7a0d5bfd5 | [
"MIT"
] | null | null | null | """
Spam comments to be classified by the relational model.
"""
import os
import numpy as np
class Comments:
def __init__(self, config_obj, util_obj):
self.config_obj = config_obj
self.util_obj = util_obj
# public
def build(self, df, dset, data_f=None, tuffy=False, iden='0'):
"""... | 34.529412 | 73 | 0.572828 | 2,252 | 0.959114 | 0 | 0 | 0 | 0 | 0 | 0 | 533 | 0.227002 |
a8d8dcbf034882ed1303c2c3e7ff44cf31f5c09e | 2,216 | py | Python | offline_validate.py | akshaykr/oracle_cb | 68f10fce5eca8ebe3f57fd5a56a0ef8d82537ab4 | [
"MIT"
] | 26 | 2017-08-02T19:58:06.000Z | 2021-11-03T06:31:01.000Z | offline_validate.py | akshaykr/oracle_cb | 68f10fce5eca8ebe3f57fd5a56a0ef8d82537ab4 | [
"MIT"
] | 1 | 2020-03-03T06:06:32.000Z | 2020-03-03T06:06:32.000Z | offline_validate.py | akshaykr/oracle_cb | 68f10fce5eca8ebe3f57fd5a56a0ef8d82537ab4 | [
"MIT"
] | 10 | 2017-06-02T19:34:38.000Z | 2022-03-22T10:38:51.000Z | import numpy as np
import sklearn.ensemble
import sklearn.linear_model
import Simulators
import pickle
if __name__=='__main__':
L = 3
B = Simulators.DatasetBandit(dataset='mq2008', L=3, loop=True, metric=None)
Bval = Simulators.DatasetBandit(dataset='mq2008val', L=3, loop=True, metric=None)
fores... | 38.206897 | 157 | 0.557762 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 326 | 0.147112 |
a8d932ece02949d905ec995a8df044a8d62825fb | 4,755 | py | Python | yang_et_al/run_tasks.py | wagner-group/geoadex | 693856dc4537937fa09ec7a22e175f8243483b44 | [
"MIT"
] | 4 | 2021-11-01T18:18:28.000Z | 2022-02-14T05:58:57.000Z | yang_et_al/run_tasks.py | wagner-group/geoadex | 693856dc4537937fa09ec7a22e175f8243483b44 | [
"MIT"
] | null | null | null | yang_et_al/run_tasks.py | wagner-group/geoadex | 693856dc4537937fa09ec7a22e175f8243483b44 | [
"MIT"
] | null | null | null | import os
import logging
import json
from nnattack.variables import auto_var, get_file_name
from params import (
compare_attacks,
compare_defense,
#compare_nns,
nn_k1_robustness,
nn_k3_robustness,
nn_k1_approx_robustness_figs,
dt_robustness_figs,
rf_robustness_figs,
nn_k1_robustn... | 28.303571 | 91 | 0.647739 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 951 | 0.2 |
a8d9cfd29512a9bafa442afe772db196ced778d9 | 849 | py | Python | asyncio/asyncio02_libs/scrapli/ex01_scrapli_async_basic_factory.py | levs72/pyneng-examples | d6288292dcf9d1ebc5a9db4a0d620bd11b4a2df9 | [
"MIT"
] | 11 | 2021-04-05T09:30:23.000Z | 2022-03-09T13:27:56.000Z | asyncio/asyncio02_libs/scrapli/ex01_scrapli_async_basic_factory.py | levs72/pyneng-examples | d6288292dcf9d1ebc5a9db4a0d620bd11b4a2df9 | [
"MIT"
] | null | null | null | asyncio/asyncio02_libs/scrapli/ex01_scrapli_async_basic_factory.py | levs72/pyneng-examples | d6288292dcf9d1ebc5a9db4a0d620bd11b4a2df9 | [
"MIT"
] | 11 | 2021-04-06T03:44:35.000Z | 2022-03-04T21:20:40.000Z | import asyncio
from scrapli import AsyncScrapli
from scrapli.exceptions import ScrapliException
r1 = {
"host": "192.168.100.1",
"auth_username": "cisco",
"auth_password": "cisco",
"auth_secondary": "cisco",
"auth_strict_key": False,
"timeout_socket": 5, # timeout for establishing socket/initia... | 28.3 | 89 | 0.672556 | 0 | 0 | 0 | 0 | 0 | 0 | 259 | 0.305065 | 324 | 0.381625 |
a8da296b2bb797803ccea64d180cb52ee83c797e | 3,534 | py | Python | tests/test_nn/test_activations.py | VIVelev/nujo | 56c3058b14c4e0b7ae86d0f22dbe4c4dc81e8e71 | [
"MIT"
] | 5 | 2020-03-02T22:14:38.000Z | 2022-03-09T11:13:13.000Z | tests/test_nn/test_activations.py | VIVelev/nujo | 56c3058b14c4e0b7ae86d0f22dbe4c4dc81e8e71 | [
"MIT"
] | 30 | 2020-03-09T10:43:54.000Z | 2020-06-09T20:05:45.000Z | tests/test_nn/test_activations.py | VIVelev/nujo | 56c3058b14c4e0b7ae86d0f22dbe4c4dc81e8e71 | [
"MIT"
] | 3 | 2020-03-20T13:54:23.000Z | 2020-10-17T01:03:17.000Z | import pytest
from numpy import allclose, exp, maximum, sum
import nujo.nn.activations as activ
from nujo.autodiff.tensor import Tensor
# ====================================================================================================
# Test BinaryStep activation function
def test_binary_step(inputs):
# Tes... | 26.373134 | 102 | 0.47142 | 0 | 0 | 0 | 0 | 97 | 0.027448 | 0 | 0 | 1,487 | 0.42077 |
763395a4150fc73e36ef226e3bec1f8ba494db9b | 3,611 | py | Python | data/data_utils.py | csalt-research/OpenASR-py | 9aea6753689d87d321260d7eb0ea0544e1b3403a | [
"MIT"
] | 2 | 2019-11-29T15:46:14.000Z | 2021-05-28T06:54:41.000Z | data/data_utils.py | csalt-research/OpenASR-py | 9aea6753689d87d321260d7eb0ea0544e1b3403a | [
"MIT"
] | null | null | null | data/data_utils.py | csalt-research/OpenASR-py | 9aea6753689d87d321260d7eb0ea0544e1b3403a | [
"MIT"
] | null | null | null | import torch
import os
from tqdm import tqdm
import numpy as np
from multiprocessing.pool import Pool
from itertools import islice, cycle
from utils.logging import logger
from utils.misc import ensure_dir
class Vocab(object):
def __init__(self):
self.tok2idx = {}
self.idx2tok = []
self.ad... | 33.12844 | 93 | 0.577402 | 776 | 0.214899 | 300 | 0.083079 | 0 | 0 | 0 | 0 | 292 | 0.080864 |
7633bcef8f558a190b0edf5806df25a3b35e668d | 1,188 | py | Python | config/wsgi.py | poblouin/budgetme-rest-api | 74d9237bc7b0a118255a659029637c5ed1a8b7a1 | [
"MIT"
] | 2 | 2018-03-07T09:43:07.000Z | 2018-03-11T04:50:41.000Z | config/wsgi.py | poblouin/budgetme-rest-api | 74d9237bc7b0a118255a659029637c5ed1a8b7a1 | [
"MIT"
] | 13 | 2017-12-28T02:44:09.000Z | 2020-06-05T21:13:13.000Z | config/wsgi.py | poblouin/budgetme-rest-api | 74d9237bc7b0a118255a659029637c5ed1a8b7a1 | [
"MIT"
] | null | null | null | """
WSGI config for budgetme project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
from raven.contrib.django.raven_co... | 38.322581 | 78 | 0.795455 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 942 | 0.792929 |
76341c212af4ec1ae958c0839064e13798eee03d | 3,983 | py | Python | src/compas_ui/objects/networkobject.py | BlockResearchGroup/compas_ui | 8b5a6121eee837d306bf20c44c91f94a5c185f90 | [
"MIT"
] | null | null | null | src/compas_ui/objects/networkobject.py | BlockResearchGroup/compas_ui | 8b5a6121eee837d306bf20c44c91f94a5c185f90 | [
"MIT"
] | 3 | 2022-02-24T17:56:30.000Z | 2022-03-31T09:48:40.000Z | src/compas_ui/objects/networkobject.py | BlockResearchGroup/compas_ui | 8b5a6121eee837d306bf20c44c91f94a5c185f90 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from functools import reduce
from operator import mul
from compas.geometry import Point
from compas.geometry import Scale
from compas.geometry import Translation
from compas.geometry import Rotation
from compa... | 27.659722 | 81 | 0.615114 | 3,597 | 0.903088 | 0 | 0 | 1,878 | 0.471504 | 0 | 0 | 856 | 0.214913 |
7635bfe6eba52bcc67cdc83102f247a92f82a569 | 1,276 | py | Python | sa/profiles/NAG/SNR/profile.py | xUndero/noc | 9fb34627721149fcf7064860bd63887e38849131 | [
"BSD-3-Clause"
] | 1 | 2019-09-20T09:36:48.000Z | 2019-09-20T09:36:48.000Z | sa/profiles/NAG/SNR/profile.py | ewwwcha/noc | aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb | [
"BSD-3-Clause"
] | null | null | null | sa/profiles/NAG/SNR/profile.py | ewwwcha/noc | aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# Vendor: NAG
# OS: SNR
# ---------------------------------------------------------------------
# Copyright (C) 2007-2019 The NOC Project
# See LICENSE for details
# ------------------------------------------------------... | 30.380952 | 88 | 0.487461 | 876 | 0.68652 | 0 | 0 | 164 | 0.128527 | 0 | 0 | 683 | 0.535266 |
7636eeaae62c9c102a883b907b773aecc04889f1 | 754 | py | Python | src/common/views.py | danpercic86/e-notary | ba15a9a80e2091593fb088feacfaf9574c816d6e | [
"Apache-2.0"
] | 6 | 2020-12-25T20:46:51.000Z | 2022-01-27T20:52:13.000Z | src/common/views.py | danpercic86/e-notary | ba15a9a80e2091593fb088feacfaf9574c816d6e | [
"Apache-2.0"
] | 3 | 2021-01-26T12:20:14.000Z | 2022-01-27T20:45:28.000Z | src/common/views.py | danpercic86/e-notary | ba15a9a80e2091593fb088feacfaf9574c816d6e | [
"Apache-2.0"
] | null | null | null | from django.db.models import QuerySet
from drf_spectacular.utils import extend_schema
from rest_framework import status
from rest_framework.viewsets import ModelViewSet
from common.models import Example
from common.serializers import ExampleSerializer
from common.utils import create_swagger_info
@create_swagger_info... | 30.16 | 65 | 0.753316 | 134 | 0.177719 | 0 | 0 | 453 | 0.600796 | 0 | 0 | 70 | 0.092838 |
7637c23ca9d4d52673449e7efa95f66c10e2908c | 35,728 | py | Python | modpypes/pdu.py | JoelBender/modpypes | f6e33c48fdc70f873bc2823b1ac4111cafe2a700 | [
"MIT"
] | 8 | 2015-06-21T18:06:22.000Z | 2022-03-03T13:12:35.000Z | modpypes/pdu.py | JoelBender/modpypes | f6e33c48fdc70f873bc2823b1ac4111cafe2a700 | [
"MIT"
] | null | null | null | modpypes/pdu.py | JoelBender/modpypes | f6e33c48fdc70f873bc2823b1ac4111cafe2a700 | [
"MIT"
] | 3 | 2016-01-29T19:23:40.000Z | 2017-04-25T13:12:50.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Protocol Data Units
===================
"""
import struct
from bacpypes.debugging import bacpypes_debugging, DebugContents, ModuleLogger
from bacpypes.comm import PDUData, PCI
from bacpypes.errors import DecodingError
# some debugging
_debug = 0
_log = ModuleLogger... | 27.847233 | 144 | 0.637231 | 31,938 | 0.893921 | 0 | 0 | 32,196 | 0.901142 | 0 | 0 | 6,146 | 0.172022 |
763d00edb1aabcadb474534e123fc73d5db212cc | 2,650 | py | Python | rastervision/core/rv_pipeline/object_detection_config.py | jeromemaleski/raster-vision | 1b0c7c789afbe1db27da4bc2dd0f58a02fca9f01 | [
"Apache-2.0"
] | null | null | null | rastervision/core/rv_pipeline/object_detection_config.py | jeromemaleski/raster-vision | 1b0c7c789afbe1db27da4bc2dd0f58a02fca9f01 | [
"Apache-2.0"
] | null | null | null | rastervision/core/rv_pipeline/object_detection_config.py | jeromemaleski/raster-vision | 1b0c7c789afbe1db27da4bc2dd0f58a02fca9f01 | [
"Apache-2.0"
] | null | null | null | from enum import Enum
from rastervision.pipeline.config import register_config, Config, Field
from rastervision.core.rv_pipeline import RVPipelineConfig
from rastervision.core.data.label_store import ObjectDetectionGeoJSONStoreConfig
from rastervision.core.evaluation import ObjectDetectionEvaluatorConfig
class Objec... | 37.857143 | 89 | 0.718491 | 2,191 | 0.826792 | 0 | 0 | 2,184 | 0.824151 | 0 | 0 | 1,063 | 0.401132 |
763e6130c882fc4e05156ff0a6f93880ac497dc1 | 2,652 | py | Python | applications/terms_of_service/views.py | awwong1/apollo | 5571b5f222265bec3eed45b21e862636ccdc9a97 | [
"MIT"
] | null | null | null | applications/terms_of_service/views.py | awwong1/apollo | 5571b5f222265bec3eed45b21e862636ccdc9a97 | [
"MIT"
] | null | null | null | applications/terms_of_service/views.py | awwong1/apollo | 5571b5f222265bec3eed45b21e862636ccdc9a97 | [
"MIT"
] | null | null | null | from apollo.viewmixins import LoginRequiredMixin, StaffRequiredMixin, ActivitySendMixin
from applications.terms_of_service.models import TermsOfService
from django.contrib.messages.views import SuccessMessageMixin
from django.core.urlresolvers import reverse_lazy
from django.views.generic import ListView, DetailView, C... | 42.095238 | 123 | 0.77187 | 2,284 | 0.861237 | 0 | 0 | 0 | 0 | 0 | 0 | 577 | 0.217572 |
763f4b908722ffb161ebab1922f9c5497d86b5d9 | 748 | py | Python | gateway/helper/event_log.py | ehoefig/stout | 3c4fc75891665dc35f67ad84b6b86a02aeed4688 | [
"MIT"
] | null | null | null | gateway/helper/event_log.py | ehoefig/stout | 3c4fc75891665dc35f67ad84b6b86a02aeed4688 | [
"MIT"
] | null | null | null | gateway/helper/event_log.py | ehoefig/stout | 3c4fc75891665dc35f67ad84b6b86a02aeed4688 | [
"MIT"
] | null | null | null | import re
import logging
from pydispatch import dispatcher
__author__ = 'edzard'
logger = logging.getLogger(__name__)
_filters = {}
def _handler(sender, **kwargs):
global _filters
for parameter_name in kwargs:
if parameter_name in _filters:
data = kwargs[parameter_name]
if _... | 25.793103 | 84 | 0.677807 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 42 | 0.05615 |
763ffc0241362b9ed7c4968aba6ab05141e6413b | 106 | py | Python | olufekoscrumy/apps.py | olufekosamuel/scrumy | 8d93794bb04a3b3ec76ae41ae685f4e2c7b55730 | [
"MIT"
] | null | null | null | olufekoscrumy/apps.py | olufekosamuel/scrumy | 8d93794bb04a3b3ec76ae41ae685f4e2c7b55730 | [
"MIT"
] | null | null | null | olufekoscrumy/apps.py | olufekosamuel/scrumy | 8d93794bb04a3b3ec76ae41ae685f4e2c7b55730 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class OlufekoscrumyConfig(AppConfig):
name = 'olufekoscrumy'
| 17.666667 | 38 | 0.745283 | 65 | 0.613208 | 0 | 0 | 0 | 0 | 0 | 0 | 15 | 0.141509 |
7640076addca84aec71e6807681f274ca64228cc | 9,395 | py | Python | admin/tests/test_layers_vectortiles.py | rbovard/c2cgeoportal | 61b7a4fc98f686f9b7d4c5fda7bb4c5cc09f8de8 | [
"BSD-2-Clause-FreeBSD"
] | 43 | 2015-02-16T06:56:25.000Z | 2021-09-12T17:49:16.000Z | admin/tests/test_layers_vectortiles.py | rbovard/c2cgeoportal | 61b7a4fc98f686f9b7d4c5fda7bb4c5cc09f8de8 | [
"BSD-2-Clause-FreeBSD"
] | 3,227 | 2015-01-05T10:30:59.000Z | 2022-03-31T03:25:39.000Z | admin/tests/test_layers_vectortiles.py | rbovard/c2cgeoportal | 61b7a4fc98f686f9b7d4c5fda7bb4c5cc09f8de8 | [
"BSD-2-Clause-FreeBSD"
] | 57 | 2015-01-29T08:32:12.000Z | 2022-03-16T07:07:33.000Z | # pylint: disable=no-self-use
import re
import pytest
from . import AbstractViewsTests, factory_build_layers, get_test_default_layers
@pytest.fixture(scope="function")
@pytest.mark.usefixtures("dbsession", "transact")
def layer_vectortiles_test_data(dbsession, transact):
del transact
from c2cgeoportal_com... | 41.941964 | 103 | 0.640021 | 8,176 | 0.87025 | 924 | 0.09835 | 9,252 | 0.984779 | 0 | 0 | 1,951 | 0.207664 |
7641a3c782ad92dcb116db2b6333f07537b9c204 | 7,608 | py | Python | SSRF/dns.py | cxosmo/curated-wordlists | 0703f0aeb3d68ec1244e408e14823bf65a0fe270 | [
"BSD-3-Clause"
] | 2 | 2021-12-30T10:36:15.000Z | 2022-02-23T07:26:52.000Z | SSRF/dns.py | Funhity/curated-wordlists | e50900faeb18bc3071ff02b741408a90442c6e30 | [
"BSD-3-Clause"
] | null | null | null | SSRF/dns.py | Funhity/curated-wordlists | e50900faeb18bc3071ff02b741408a90442c6e30 | [
"BSD-3-Clause"
] | 2 | 2021-12-13T03:18:28.000Z | 2021-12-28T08:32:12.000Z | #encoding: utf-8
from __future__ import print_function
from builtins import str
import ipaddress
import datetime
import os
import sys
from twisted.names import client, dns, server, hosts as hosts_module, root, cache, resolve
from twisted.internet import reactor
from twisted.python.runtime import platform
TTL = 0
dict ... | 46.109091 | 137 | 0.511435 | 3,336 | 0.438486 | 0 | 0 | 0 | 0 | 0 | 0 | 2,612 | 0.343323 |
764337fd61b07695cb56126ab069e65c8c4a854d | 31 | py | Python | relevanceai/_api/endpoints/admin/__init__.py | RelevanceAI/RelevanceAI | a0542f35153d9c842f3d2cd0955d6b07f6dfc07b | [
"Apache-2.0"
] | 21 | 2021-11-23T13:01:36.000Z | 2022-03-23T03:45:30.000Z | relevanceai/_api/endpoints/admin/__init__.py | RelevanceAI/RelevanceAI | a0542f35153d9c842f3d2cd0955d6b07f6dfc07b | [
"Apache-2.0"
] | 217 | 2021-11-23T00:11:01.000Z | 2022-03-30T08:11:49.000Z | relevanceai/_api/endpoints/admin/__init__.py | RelevanceAI/RelevanceAI | a0542f35153d9c842f3d2cd0955d6b07f6dfc07b | [
"Apache-2.0"
] | 4 | 2022-01-04T01:48:30.000Z | 2022-02-11T03:19:32.000Z | from .admin import AdminClient
| 15.5 | 30 | 0.83871 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
76435f733479de6951b0abd9a686d53e6f3120f0 | 2,684 | py | Python | kotdbot.py | tvezet/KoTDBot | 8dff34420463be1bc3567bf20380d2f20cb35846 | [
"Apache-2.0"
] | null | null | null | kotdbot.py | tvezet/KoTDBot | 8dff34420463be1bc3567bf20380d2f20cb35846 | [
"Apache-2.0"
] | null | null | null | kotdbot.py | tvezet/KoTDBot | 8dff34420463be1bc3567bf20380d2f20cb35846 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#from difflib import SequenceMatcher
import discord
import numpy as np
from joblib import dump, load
import sys
import os
import math
helpText = "Tell me the sizes of two of your gems and i will calculate the optimal size of the third gem based on the current ritual bonus. If running a ritual wi... | 35.315789 | 321 | 0.679955 | 0 | 0 | 0 | 0 | 493 | 0.183681 | 465 | 0.173249 | 1,224 | 0.456036 |
764382ce910f9b78f0afeeafad12a7ae05b25d0c | 2,879 | py | Python | lib/ezdxf/sections/abstract.py | tapnair/DXFer | 8ec957d80c2f251bb78440147d1478106f99b3eb | [
"MIT"
] | 4 | 2019-03-31T00:41:13.000Z | 2021-07-31T05:09:07.000Z | lib/ezdxf/sections/abstract.py | tapnair/DXFer | 8ec957d80c2f251bb78440147d1478106f99b3eb | [
"MIT"
] | null | null | null | lib/ezdxf/sections/abstract.py | tapnair/DXFer | 8ec957d80c2f251bb78440147d1478106f99b3eb | [
"MIT"
] | 5 | 2018-03-29T06:28:07.000Z | 2021-07-31T05:09:08.000Z | # Purpose: entity section
# Created: 13.03.2011
# Copyright (C) 2011, Manfred Moitzi
# License: MIT License
from __future__ import unicode_literals
__author__ = "mozman <mozman@gmx.at>"
from itertools import islice
from ..lldxf.tags import TagGroups, DXFStructureError
from ..lldxf.classifiedtags import ClassifiedTags... | 31.293478 | 104 | 0.658909 | 2,506 | 0.870441 | 0 | 0 | 144 | 0.050017 | 0 | 0 | 544 | 0.188954 |
7644bc4bec765da9c73ffce65a56e216576e72d0 | 812 | py | Python | spacy-textdescriptives/subsetters.py | HLasse/spacy-textdescriptives | c079c6617ef266b54f28c51e619d2429a5dafb83 | [
"Apache-2.0"
] | null | null | null | spacy-textdescriptives/subsetters.py | HLasse/spacy-textdescriptives | c079c6617ef266b54f28c51e619d2429a5dafb83 | [
"Apache-2.0"
] | null | null | null | spacy-textdescriptives/subsetters.py | HLasse/spacy-textdescriptives | c079c6617ef266b54f28c51e619d2429a5dafb83 | [
"Apache-2.0"
] | null | null | null | """Helpers to subset an extracted dataframe"""
readability_cols = [
"flesch_reading_ease",
"flesch_kincaid_grade",
"smog",
"gunning_fog",
"automated_readability_index",
"coleman_liau_index",
"lix",
"rix",
]
dependency_cols = [
"dependency_distance_mean",
"dependency_distance_st... | 21.945946 | 46 | 0.699507 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 578 | 0.711823 |
7646049ee9e15471718b70b947f345973762d6d3 | 2,168 | py | Python | aoc/day22.py | martinhenstridge/adventofcode2020 | ffc34bbb6b8d8682a3bc9b16b7082b63adf3fc77 | [
"MIT"
] | null | null | null | aoc/day22.py | martinhenstridge/adventofcode2020 | ffc34bbb6b8d8682a3bc9b16b7082b63adf3fc77 | [
"MIT"
] | null | null | null | aoc/day22.py | martinhenstridge/adventofcode2020 | ffc34bbb6b8d8682a3bc9b16b7082b63adf3fc77 | [
"MIT"
] | null | null | null | from . import util
def get_decks(lines):
player = 0
cards = []
for line in lines:
if line.startswith("Player"):
player = int(line[-2])
elif line:
cards.append(int(line))
else:
yield player, cards
player = 0
cards = []
de... | 24.636364 | 75 | 0.541052 | 0 | 0 | 294 | 0.135609 | 0 | 0 | 0 | 0 | 130 | 0.059963 |
764616758280c2d006fdbc4717715cf4984760d6 | 3,434 | py | Python | src/test_trained_webcam.py | sumit-chavan/Face-Recognition-Model | 3d5c55d587fe1e8e66e6f47b3b4145e5ca8f13d6 | [
"MIT"
] | null | null | null | src/test_trained_webcam.py | sumit-chavan/Face-Recognition-Model | 3d5c55d587fe1e8e66e6f47b3b4145e5ca8f13d6 | [
"MIT"
] | null | null | null | src/test_trained_webcam.py | sumit-chavan/Face-Recognition-Model | 3d5c55d587fe1e8e66e6f47b3b4145e5ca8f13d6 | [
"MIT"
] | null | null | null | import math
from sklearn import neighbors
import os
import os.path
import pickle
from PIL import Image, ImageDraw
import face_recognition
from face_recognition.face_recognition_cli import image_files_in_folder
import cv2
#from webapp import db
#from DB import Actor
ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg'}
def pr... | 39.022727 | 173 | 0.684916 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,285 | 0.374199 |
764678c9c09ffe698c8ee2858f7d5376f8311d3c | 1,401 | py | Python | history/views.py | light-white/meeting | 464c1047d3cd9e620f9a4095f453186ef81cc854 | [
"Apache-2.0"
] | null | null | null | history/views.py | light-white/meeting | 464c1047d3cd9e620f9a4095f453186ef81cc854 | [
"Apache-2.0"
] | null | null | null | history/views.py | light-white/meeting | 464c1047d3cd9e620f9a4095f453186ef81cc854 | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render
from django.http import HttpResponseRedirect
from django.urls import reverse
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from history.models import *
# Create your views here.
def history(request):
historylist = History.objects.all()
paginator =... | 41.205882 | 95 | 0.711635 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 251 | 0.179158 |
76472899523719baf923d9a996ebdd4699f27a6a | 1,817 | py | Python | predictor.py | GlebovVL/Energo | 648154ff63799f553c453e8039f7c99c153bb846 | [
"MIT"
] | null | null | null | predictor.py | GlebovVL/Energo | 648154ff63799f553c453e8039f7c99c153bb846 | [
"MIT"
] | null | null | null | predictor.py | GlebovVL/Energo | 648154ff63799f553c453e8039f7c99c153bb846 | [
"MIT"
] | null | null | null | from datetime import timedelta
import random
import pandas as pd
class Predictor:
def __init__(self,avarii, coords):
self.avarii = avarii
self.coords=coords
pass
def got_prediction(self,date,length,where,probtype):
avarii_count = ((self.avarii.oblast==where)&\
(sel... | 42.255814 | 117 | 0.593836 | 1,751 | 0.963676 | 0 | 0 | 0 | 0 | 0 | 0 | 128 | 0.070446 |
764756cae57e53f40b2dff05b58adf03c8eceb89 | 9,210 | py | Python | predictit/market.py | harryposner/pypredictit | bce6f74440b271de7083f9c526a48508cfbd7bd7 | [
"MIT"
] | 4 | 2020-10-14T15:21:37.000Z | 2020-12-17T04:06:09.000Z | predictit/market.py | harryposner/pypredictit | bce6f74440b271de7083f9c526a48508cfbd7bd7 | [
"MIT"
] | 1 | 2020-12-24T04:28:09.000Z | 2020-12-24T04:28:09.000Z | predictit/market.py | harryposner/pypredictit | bce6f74440b271de7083f9c526a48508cfbd7bd7 | [
"MIT"
] | 2 | 2020-12-17T04:43:26.000Z | 2020-12-23T22:54:19.000Z | import datetime as dt
from decimal import Decimal
import pytz
from .utils import concurrent_get
class Market(object):
"""Interact with PredictIt markets
This class handles market-level transactions with PredictIt,
including getting market risk, payouts, and contract IDs.
Initializing this object wi... | 32.090592 | 84 | 0.610858 | 9,109 | 0.989034 | 0 | 0 | 3,045 | 0.330619 | 0 | 0 | 4,354 | 0.472747 |
76479217ff8176e027291b888d7a0e67882521eb | 8,614 | py | Python | prep_data/sketchycococrops_to_tfrecord.py | leosampaio/scene-designer | 8a7276067acfde1997d386942aabc44d92436a1a | [
"MIT"
] | 9 | 2021-08-18T17:49:42.000Z | 2022-02-22T02:15:07.000Z | prep_data/sketchycococrops_to_tfrecord.py | leosampaio/scene-designer | 8a7276067acfde1997d386942aabc44d92436a1a | [
"MIT"
] | null | null | null | prep_data/sketchycococrops_to_tfrecord.py | leosampaio/scene-designer | 8a7276067acfde1997d386942aabc44d92436a1a | [
"MIT"
] | 1 | 2021-10-02T19:53:03.000Z | 2021-10-02T19:53:03.000Z | import argparse
import json
import os
import re
import glob
import imageio
import skimage.transform as sk_transform
import numpy as np
import tensorflow as tf
import utils
def default_hparams():
hps = utils.hparams.HParams(
image_size=256,
min_object_size=0.05,
excluded_meta_file='prep_d... | 41.413462 | 133 | 0.683306 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,464 | 0.169956 |
764898f3a18040594993230d8331b7556afdb198 | 372 | py | Python | Solutions/String/L409_LongestPalindrome.py | ufolux/PythonLeetCodeSolution | df905526f1982ef4aa417f6fe060a66d44c18d07 | [
"MIT"
] | null | null | null | Solutions/String/L409_LongestPalindrome.py | ufolux/PythonLeetCodeSolution | df905526f1982ef4aa417f6fe060a66d44c18d07 | [
"MIT"
] | null | null | null | Solutions/String/L409_LongestPalindrome.py | ufolux/PythonLeetCodeSolution | df905526f1982ef4aa417f6fe060a66d44c18d07 | [
"MIT"
] | null | null | null | class Solution:
def longestPalindrome(self, s: str) -> int:
d = {}
for c in s:
if c not in d:
d[c] = 1
else:
d[c] = d[c] + 1
res = 0
for _, n in d.items():
res += n - (n & 1)
return res + 1 if res < len(s) e... | 20.666667 | 47 | 0.408602 | 327 | 0.879032 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0.013441 |
764937dbe3389486664886c5dde62290994457f4 | 551 | py | Python | lessweb/__init__.py | qorzj/lessweb | d21473d724216c3afa1101729137573ff21b7015 | [
"MIT"
] | 17 | 2017-11-02T02:07:35.000Z | 2020-07-23T06:33:36.000Z | lessweb/__init__.py | qorzj/lessweb | d21473d724216c3afa1101729137573ff21b7015 | [
"MIT"
] | 12 | 2018-02-06T05:52:04.000Z | 2021-02-07T14:43:35.000Z | lessweb/__init__.py | qorzj/lessweb | d21473d724216c3afa1101729137573ff21b7015 | [
"MIT"
] | 2 | 2018-06-06T09:30:44.000Z | 2018-09-19T02:03:16.000Z | """lessweb: 用最python3的方法创建web apps"""
__version__ = '0.3.3'
__author__ = [
'qorzj <inull@qq.com>',
]
__license__ = "MIT"
# from . import application, context, model, storage, webapi
from .application import interceptor, Application
from .context import Context, Request, Response
from .storage import Storage
fr... | 26.238095 | 84 | 0.771325 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 145 | 0.256637 |
764a1991418da83a2826386345ee15787a0bf609 | 759 | py | Python | notification/admin.py | horacexd/clist | 9759dfea97b86514bec9825d2430abc36decacf0 | [
"Apache-2.0"
] | 1 | 2020-04-28T09:10:53.000Z | 2020-04-28T09:10:53.000Z | notification/admin.py | horacexd/clist | 9759dfea97b86514bec9825d2430abc36decacf0 | [
"Apache-2.0"
] | 25 | 2021-03-28T15:20:02.000Z | 2021-03-28T16:02:48.000Z | notification/admin.py | VadVergasov/clist | 4afcdfe88250d224043b28efa511749347cec71c | [
"Apache-2.0"
] | null | null | null | from pyclist.admin import BaseModelAdmin, admin_register
from notification.models import Notification, Task
@admin_register(Notification)
class NotificationAdmin(BaseModelAdmin):
list_display = ['coder', 'method', 'before', 'period', 'last_time', 'modified']
list_filter = ['method']
search_fields = ['code... | 37.95 | 105 | 0.741765 | 593 | 0.781291 | 0 | 0 | 645 | 0.849802 | 0 | 0 | 249 | 0.328063 |
764a345d21e1234d5461a595f90e26c2e556c374 | 802 | py | Python | google_cloud_storage_cls/utils/gcp_constant.py | mayurdhamecha-crest/ta_cloud_exchange_plugins | 8d64c92909f28bcb2067587ec3361499de5d5723 | [
"BSD-3-Clause"
] | null | null | null | google_cloud_storage_cls/utils/gcp_constant.py | mayurdhamecha-crest/ta_cloud_exchange_plugins | 8d64c92909f28bcb2067587ec3361499de5d5723 | [
"BSD-3-Clause"
] | null | null | null | google_cloud_storage_cls/utils/gcp_constant.py | mayurdhamecha-crest/ta_cloud_exchange_plugins | 8d64c92909f28bcb2067587ec3361499de5d5723 | [
"BSD-3-Clause"
] | null | null | null | """GCP Storage Constant."""
locations_list = [
"US",
"EU",
"ASIA",
"ASIA1",
"EUR4",
"NAM4",
"NORTHAMERICA-NORTHEAST1",
"NORTHAMERICA-NORTHEAST2",
"US-CENTRAL1",
"US-EAST1",
"US-EAST4",
"US-WEST1",
"US-WEST2",
"US-WEST3",
"US-WEST4",
"SOUTHAMERICA-EAST1",
... | 17.434783 | 30 | 0.553616 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 523 | 0.65212 |
764dae1c165deea13176d04ddf5d9c3e1390137e | 643 | py | Python | lazytorch/layers/__init__.py | mgmalek/lazytorch | 9950b8841488471e147d5dbb86a446663b6c15dc | [
"MIT"
] | null | null | null | lazytorch/layers/__init__.py | mgmalek/lazytorch | 9950b8841488471e147d5dbb86a446663b6c15dc | [
"MIT"
] | null | null | null | lazytorch/layers/__init__.py | mgmalek/lazytorch | 9950b8841488471e147d5dbb86a446663b6c15dc | [
"MIT"
] | null | null | null | from .conv import LazyExpansionConv2d, LazyReductionConv2d
from .conv_norm_activ import ConvNormActivation, LazyConvNormActivation
from .depth_sep_conv import (
DepthwiseConv2d,
PointwiseConv2d,
DepthSepConv2d,
LazyDepthwiseConv2d,
LazyPointwiseConv2d,
LazyExpansionPointwiseConv2d,
LazyReduc... | 35.722222 | 75 | 0.839813 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
764ff5611043a9510a54937a0ad6a65d0156e951 | 845 | py | Python | functions_legacy/PathsCauchy.py | dpopadic/arpmRes | ddcc4de713b46e3e9dcb77cc08c502ce4df54f76 | [
"MIT"
] | 6 | 2021-04-10T13:24:30.000Z | 2022-03-26T08:20:42.000Z | functions_legacy/PathsCauchy.py | dpopadic/arpmRes | ddcc4de713b46e3e9dcb77cc08c502ce4df54f76 | [
"MIT"
] | null | null | null | functions_legacy/PathsCauchy.py | dpopadic/arpmRes | ddcc4de713b46e3e9dcb77cc08c502ce4df54f76 | [
"MIT"
] | 6 | 2019-08-13T22:02:17.000Z | 2022-02-09T17:49:12.000Z | from numpy import ones, cumsum, diff, tile, r_
from numpy.random import rand
from scipy.stats import t
def PathsCauchy(x0,mu,sigma,tau,j_):
# This function generates paths for the process x such that the increments
# dx are iid Cauchy distributed.
# INPUTS
# x0 :[scalar] initial value of process ... | 33.8 | 78 | 0.64142 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 463 | 0.547929 |
76501c0e0a4d032fa02c49003cd7b75a3d3f4eaf | 879 | py | Python | main.py | Elvira521feng/InfoNews | 5db22738446b1026db6479b91dc42c3aeba17060 | [
"MIT"
] | null | null | null | main.py | Elvira521feng/InfoNews | 5db22738446b1026db6479b91dc42c3aeba17060 | [
"MIT"
] | null | null | null | main.py | Elvira521feng/InfoNews | 5db22738446b1026db6479b91dc42c3aeba17060 | [
"MIT"
] | null | null | null | from flask import current_app
from flask_script import Manager
from flask_migrate import MigrateCommand
from info import create_app
# 创建应用
app = create_app("dev")
# 创建管理器
mgr = Manager(app)
# 添加迁移命令
mgr.add_command("mc", MigrateCommand)
# 生成超级管理员命令
@mgr.option("-u", dest="username")
@mgr.option("-p", dest="password"... | 21.439024 | 41 | 0.664391 | 0 | 0 | 0 | 0 | 620 | 0.643821 | 0 | 0 | 188 | 0.195223 |
76522c2bfc85d2b19b789e29bdbb4e4770d87e91 | 1,864 | py | Python | hwtHls/ssa/basicBlock.py | Nic30/hwtHls | 1fac6ed128318e698d51e15e9871249ddf243e1c | [
"MIT"
] | 8 | 2018-09-25T03:28:11.000Z | 2021-12-15T07:44:38.000Z | hwtHls/ssa/basicBlock.py | Nic30/hwtHls | 1fac6ed128318e698d51e15e9871249ddf243e1c | [
"MIT"
] | 1 | 2020-12-21T10:56:44.000Z | 2020-12-21T10:56:44.000Z | hwtHls/ssa/basicBlock.py | Nic30/hwtHls | 1fac6ed128318e698d51e15e9871249ddf243e1c | [
"MIT"
] | 2 | 2018-09-25T03:28:18.000Z | 2021-12-15T10:28:35.000Z | from typing import List
from hwtHls.ssa.context import SsaContext
from hwtHls.ssa.instr import SsaInstrBranch, SsaInstr
from hwtHls.ssa.phi import SsaPhi
class SsaBasicBlock():
"""
Basic Block from Static Single Assignment (SSA) normal form of code.
:ivar label: label for debug purposes
:ivar predec... | 35.846154 | 107 | 0.6647 | 1,706 | 0.915236 | 0 | 0 | 0 | 0 | 0 | 0 | 639 | 0.342811 |
765266b4bc6c376f8d781ac5b9e414a2c40c4c70 | 6,546 | py | Python | parser/team12/src/EXPRESION/EXPRESION_RELACIONAL/Expresion_Relacional.py | webdev188/tytus | 847071edb17b218f51bb969d335a8ec093d13f94 | [
"MIT"
] | 35 | 2020-12-07T03:11:43.000Z | 2021-04-15T17:38:16.000Z | parser/team12/src/EXPRESION/EXPRESION_RELACIONAL/Expresion_Relacional.py | webdev188/tytus | 847071edb17b218f51bb969d335a8ec093d13f94 | [
"MIT"
] | 47 | 2020-12-09T01:29:09.000Z | 2021-01-13T05:37:50.000Z | parser/team12/src/EXPRESION/EXPRESION_RELACIONAL/Expresion_Relacional.py | webdev188/tytus | 847071edb17b218f51bb969d335a8ec093d13f94 | [
"MIT"
] | 556 | 2020-12-07T03:13:31.000Z | 2021-06-17T17:41:10.000Z | import sys, os.path
import datetime
nodo_dir = (os.path.abspath(os.path.join(os.path.dirname(__file__), '..','..')) + '\\ENTORNO\\')
sys.path.append(nodo_dir)
from Tipo import Data_Type
# **************************************************************************************************************
def diferente(exp1... | 38.505882 | 112 | 0.540636 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,365 | 0.208524 |
7652996e6f5ffb51a7d0df902af01221997efaae | 728 | py | Python | app/models.py | evantoh/news-article | 54976a3b1b5f6a141bbe13e8ab3a49dfd46d8500 | [
"Unlicense"
] | null | null | null | app/models.py | evantoh/news-article | 54976a3b1b5f6a141bbe13e8ab3a49dfd46d8500 | [
"Unlicense"
] | null | null | null | app/models.py | evantoh/news-article | 54976a3b1b5f6a141bbe13e8ab3a49dfd46d8500 | [
"Unlicense"
] | null | null | null |
class Articles:
def __init__(self,id,name,author, title, description, url, urlToImage,publishedAt):
self.id = id
self.name = name
self.author = author
self.title = title
self.description = description
self.url = url
self.urlToImage = urlToImage
... | 21.411765 | 87 | 0.587912 | 708 | 0.972527 | 0 | 0 | 0 | 0 | 0 | 0 | 57 | 0.078297 |
7653939722f793ed976839ee4ae8d6af71343c7a | 810 | py | Python | fppv/cli.py | kdheepak/fppv | 5adfb5a6bc62ffcd56faa888ddfe173ae185656c | [
"BSD-3-Clause"
] | null | null | null | fppv/cli.py | kdheepak/fppv | 5adfb5a6bc62ffcd56faa888ddfe173ae185656c | [
"BSD-3-Clause"
] | null | null | null | fppv/cli.py | kdheepak/fppv | 5adfb5a6bc62ffcd56faa888ddfe173ae185656c | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
"""cli module."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import click
import traceback
import importlib
from . import version
CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'])
@click.command(context_settings=CONTE... | 23.142857 | 60 | 0.706173 | 0 | 0 | 0 | 0 | 486 | 0.6 | 0 | 0 | 127 | 0.15679 |
76544489acae36e149f993c55ba99cd6dec43dd9 | 17,134 | py | Python | main.py | kozistr/naver-movie-rate-prediction | 2c0a55c690e319fd4bbe49f23f80e405ed4881b3 | [
"MIT"
] | 4 | 2018-08-17T08:11:51.000Z | 2018-08-22T19:08:57.000Z | main.py | kozistr/naver-movie-rate-prediction | 2c0a55c690e319fd4bbe49f23f80e405ed4881b3 | [
"MIT"
] | 5 | 2018-08-25T18:51:55.000Z | 2018-09-09T08:55:29.000Z | main.py | kozistr/naver-movie-rate-prediction | 2c0a55c690e319fd4bbe49f23f80e405ed4881b3 | [
"MIT"
] | 1 | 2019-01-12T16:13:58.000Z | 2019-01-12T16:13:58.000Z | import os
import time
import argparse
import numpy as np
import tensorflow as tf
from tqdm import tqdm
from config import get_config, export_config
from model.textcnn import TextCNN
from model.textrnn import TextRNN
from sklearn.model_selection import train_test_split
from dataloader import Word2VecEmbeddings, Doc2Vec... | 39.662037 | 118 | 0.516867 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,373 | 0.138497 |
76560a250f0facbd8764ad7981ecd577c8321aaa | 2,278 | py | Python | tests/test_config.py | sidorov-as/flake8-adjustable-complexity | db46211b5ebeed7b73971c8e82132c8fd02f768b | [
"MIT"
] | 13 | 2019-04-25T12:51:45.000Z | 2021-09-03T09:58:30.000Z | tests/test_config.py | sidorov-as/flake8-adjustable-complexity | db46211b5ebeed7b73971c8e82132c8fd02f768b | [
"MIT"
] | 6 | 2019-04-21T08:11:24.000Z | 2020-05-04T10:57:29.000Z | tests/test_config.py | sidorov-as/flake8-adjustable-complexity | db46211b5ebeed7b73971c8e82132c8fd02f768b | [
"MIT"
] | 4 | 2019-09-06T23:09:10.000Z | 2021-01-27T14:53:43.000Z | import pytest
from flake8.exceptions import ExecutionError
from flake8_adjustable_complexity.config import DEFAULT_CONFIG
@pytest.mark.parametrize(
('args', 'max_mccabe_complexity'),
[
(['--max-mccabe-complexity=5'], 5),
(['--max-adjustable-complexity=10'], 10),
([], DEFAULT_CONFIG.ma... | 28.475 | 92 | 0.615891 | 0 | 0 | 0 | 0 | 1,810 | 0.794557 | 0 | 0 | 552 | 0.242318 |
76563bc9936580a8d4669bd7cefb4b1d15996d7b | 36 | py | Python | Allswap_djangoREST/backend/allswap/accounts/views.py | yds05238/AllSwap_Backend | 95429fe6c709feef6b9e4b2349921e1cc4dd4c18 | [
"MIT"
] | 2 | 2020-02-19T05:06:49.000Z | 2020-02-20T17:34:41.000Z | Allswap_djangoREST/backend/allswap/accounts/views.py | yds05238/AllSwap_Backend | 95429fe6c709feef6b9e4b2349921e1cc4dd4c18 | [
"MIT"
] | 28 | 2020-06-05T20:52:59.000Z | 2022-03-12T00:15:17.000Z | Allswap_djangoREST/backend/allswap/accounts/views.py | yds05238/AllSwap | 95429fe6c709feef6b9e4b2349921e1cc4dd4c18 | [
"MIT"
] | null | null | null | from rest_framework import generics
| 18 | 35 | 0.888889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |