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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c43704aafbacbc4c468d75623400e2f129cb8ef2 | 6,544 | py | Python | panku/lambdaCollect.py | mccartney/panku-gdzie-jestes | 50a677170162c5255a24eacdbf8062ad876bee3f | [
"MIT"
] | null | null | null | panku/lambdaCollect.py | mccartney/panku-gdzie-jestes | 50a677170162c5255a24eacdbf8062ad876bee3f | [
"MIT"
] | null | null | null | panku/lambdaCollect.py | mccartney/panku-gdzie-jestes | 50a677170162c5255a24eacdbf8062ad876bee3f | [
"MIT"
] | null | null | null | #!/usr/bin/python
import requests
import boto3
import time
import geopy.distance
import xml.etree.ElementTree as ET
import itertools
import sys
import pickle
S3_BUCKET = "panku-gdzie-jestes-latest-storage"
class LatestPositionStorage(object):
def __init__(self, service):
self.objectName = "%s.latest" % service... | 38.046512 | 137 | 0.636461 | 6,134 | 0.937347 | 0 | 0 | 0 | 0 | 0 | 0 | 1,850 | 0.282702 |
c4372286ca07457197e0279205b6dabde1342c8d | 1,412 | py | Python | data/migrations/0039_2_data_update_questionnaires_vmsettings.py | Duke-GCB/bespin-api | cea5c20fb2ff592adabe6ebb7ca934939aa11a34 | [
"MIT"
] | null | null | null | data/migrations/0039_2_data_update_questionnaires_vmsettings.py | Duke-GCB/bespin-api | cea5c20fb2ff592adabe6ebb7ca934939aa11a34 | [
"MIT"
] | 137 | 2016-12-09T18:59:45.000Z | 2021-06-10T18:55:47.000Z | data/migrations/0039_2_data_update_questionnaires_vmsettings.py | Duke-GCB/bespin-api | cea5c20fb2ff592adabe6ebb7ca934939aa11a34 | [
"MIT"
] | 3 | 2017-11-14T16:05:58.000Z | 2018-12-28T18:07:43.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2017-12-08 18:42
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
def update_questionnaires(apps, schema_editor):
"""
Forward migration function to normalize settings into VMSettings and C... | 36.205128 | 112 | 0.71813 | 287 | 0.203258 | 0 | 0 | 0 | 0 | 0 | 0 | 581 | 0.411473 |
c438178586df87a3168fc1363cc17cdd53b3728e | 4,872 | py | Python | app/models.py | maxnovais/Flapy_Blog | e543faa4c8f99ef3a2cdb1470de507d9cfb330bf | [
"Apache-2.0"
] | null | null | null | app/models.py | maxnovais/Flapy_Blog | e543faa4c8f99ef3a2cdb1470de507d9cfb330bf | [
"Apache-2.0"
] | null | null | null | app/models.py | maxnovais/Flapy_Blog | e543faa4c8f99ef3a2cdb1470de507d9cfb330bf | [
"Apache-2.0"
] | null | null | null | from datetime import datetime
from . import db
from config import COMMENTS_INITIAL_ENABLED
from flask.ext.security import UserMixin, RoleMixin
from markdown import markdown
import bleach
# Define models
roles_users = db.Table(
'roles_users',
db.Column('user_id', db.Integer(), db.ForeignKey('user.id')),
db.... | 36.909091 | 77 | 0.632389 | 4,118 | 0.845238 | 0 | 0 | 1,199 | 0.2461 | 0 | 0 | 560 | 0.114943 |
c43aafbe58eb02eba9cd936508eecb607d118824 | 751 | py | Python | 8.1-triple-step.py | rithvikp1998/ctci | 52068e94449e61aef6bac9646a7863260acc7a05 | [
"MIT"
] | null | null | null | 8.1-triple-step.py | rithvikp1998/ctci | 52068e94449e61aef6bac9646a7863260acc7a05 | [
"MIT"
] | null | null | null | 8.1-triple-step.py | rithvikp1998/ctci | 52068e94449e61aef6bac9646a7863260acc7a05 | [
"MIT"
] | null | null | null | '''
If the child is currently on the nth step,
then there are three possibilites as to how
it reached there:
1. Reached (n-3)th step and hopped 3 steps in one time
2. Reached (n-2)th step and hopped 2 steps in one time
3. Reached (n-1)th step and hopped 2 steps in one time
The total number of possibilities is the sum... | 25.896552 | 79 | 0.701731 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 384 | 0.511318 |
c43e6b9c823f200efcc9e2b9380194f0c4a67a27 | 9,604 | py | Python | terrain_relative_navigation/peak_extractor_algorithm.py | rschwa6308/Landmark-Based-TRN | 5d712221138ec6250ed5bd19caed49810f17014e | [
"Apache-2.0"
] | null | null | null | terrain_relative_navigation/peak_extractor_algorithm.py | rschwa6308/Landmark-Based-TRN | 5d712221138ec6250ed5bd19caed49810f17014e | [
"Apache-2.0"
] | null | null | null | terrain_relative_navigation/peak_extractor_algorithm.py | rschwa6308/Landmark-Based-TRN | 5d712221138ec6250ed5bd19caed49810f17014e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
/***************************************************************************
PeakExtractor
A QGIS plugin
This plugin procedurally extracts morphological peaks from a given DEM.
Generated by Plugin Builder: http://g-sherman.github.io/Qgis-Plugin-Builder/
... | 32.890411 | 138 | 0.570596 | 8,233 | 0.857247 | 0 | 0 | 0 | 0 | 0 | 0 | 3,816 | 0.397334 |
c43f47ff2e792fe2c4acc6424f3c4c0fdde3ecb2 | 3,657 | py | Python | manila/tests/api/views/test_quota_class_sets.py | openstack/manila | 1ebae738c235c6f1874ac7b11307e0d5fb567dba | [
"Apache-2.0"
] | 159 | 2015-01-02T09:35:15.000Z | 2022-01-04T11:51:34.000Z | manila/tests/api/views/test_quota_class_sets.py | openstack/manila | 1ebae738c235c6f1874ac7b11307e0d5fb567dba | [
"Apache-2.0"
] | 5 | 2015-07-24T09:28:21.000Z | 2020-11-20T04:33:51.000Z | manila/tests/api/views/test_quota_class_sets.py | openstack/manila | 1ebae738c235c6f1874ac7b11307e0d5fb567dba | [
"Apache-2.0"
] | 128 | 2015-01-05T22:52:28.000Z | 2021-12-29T14:00:58.000Z | # Copyright (c) 2017 Mirantis, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 41.089888 | 79 | 0.654908 | 2,826 | 0.772765 | 0 | 0 | 2,835 | 0.775226 | 0 | 0 | 1,212 | 0.331419 |
c4401d23a46ea6a328e85a6fd337eb170ed7e08b | 212 | py | Python | P1480.py | Muntaha-Islam0019/Leetcode-Solutions | 0bc56ce43a6d8ad10461b69078166a2a5b913e7f | [
"MIT"
] | null | null | null | P1480.py | Muntaha-Islam0019/Leetcode-Solutions | 0bc56ce43a6d8ad10461b69078166a2a5b913e7f | [
"MIT"
] | null | null | null | P1480.py | Muntaha-Islam0019/Leetcode-Solutions | 0bc56ce43a6d8ad10461b69078166a2a5b913e7f | [
"MIT"
] | null | null | null | class Solution:
def runningSum(self, nums: List[int]) -> List[int]:
for index in range(1, len(nums)):
nums[index] = nums[index - 1] + nums[index]
return nums
| 26.5 | 55 | 0.514151 | 211 | 0.995283 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c441a8d53ebaea6e35e7d68f0992cf2efeee375b | 2,429 | py | Python | tests/sequence_utils_test.py | rmcolq/genofunk | ffa031fb361fc736e839d0e36d36f8ed7ade30dc | [
"MIT"
] | 1 | 2021-01-09T23:25:02.000Z | 2021-01-09T23:25:02.000Z | tests/sequence_utils_test.py | rmcolq/genofunk | ffa031fb361fc736e839d0e36d36f8ed7ade30dc | [
"MIT"
] | null | null | null | tests/sequence_utils_test.py | rmcolq/genofunk | ffa031fb361fc736e839d0e36d36f8ed7ade30dc | [
"MIT"
] | null | null | null | import os
import unittest
import json
import filecmp
from genofunk.sequence_utils import *
this_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
class TestSequenceUtils(unittest.TestCase):
def test_get_coordinates_from_json_simple_pairs(self):
json_value = {
"start": 30,
... | 34.211268 | 94 | 0.645533 | 2,264 | 0.932071 | 0 | 0 | 0 | 0 | 0 | 0 | 172 | 0.070811 |
c442b7615909101f05f7c648d2d237c13e312b98 | 1,630 | py | Python | Modules/Biophotonics/python/iMC/msi/test/test_nrrdwriter.py | SVRTK/MITK | 52252d60e42702e292d188e30f6717fe50c23962 | [
"BSD-3-Clause"
] | 5 | 2015-02-05T10:58:41.000Z | 2019-04-17T15:04:07.000Z | Modules/Biophotonics/python/iMC/msi/test/test_nrrdwriter.py | wyyrepo/MITK | d0837f3d0d44f477b888ec498e9a2ed407e79f20 | [
"BSD-3-Clause"
] | 141 | 2015-03-03T06:52:01.000Z | 2020-12-10T07:28:14.000Z | Modules/Biophotonics/python/iMC/msi/test/test_nrrdwriter.py | wyyrepo/MITK | d0837f3d0d44f477b888ec498e9a2ed407e79f20 | [
"BSD-3-Clause"
] | 4 | 2015-02-19T06:48:13.000Z | 2020-06-19T16:20:25.000Z | # -*- coding: utf-8 -*-
"""
Created on Thu Aug 13 09:52:47 2015
@author: wirkert
"""
import unittest
import os
import numpy as np
import msi.msimanipulations as msimani
from msi.io.nrrdreader import NrrdReader
from msi.io.nrrdwriter import NrrdWriter
from msi.test import helpers
class TestNrrdWriter(unittest.TestC... | 29.636364 | 76 | 0.633129 | 1,344 | 0.82454 | 0 | 0 | 0 | 0 | 0 | 0 | 285 | 0.174847 |
c4438dbc98a70b3fe8296d0282cdfe5e4623856b | 3,369 | py | Python | crossplatformshell/__init__.py | ryanpdwyer/crossplatformshell | d6239ae362cff42faffc85714f7a5e1b56dc6463 | [
"MIT"
] | null | null | null | crossplatformshell/__init__.py | ryanpdwyer/crossplatformshell | d6239ae362cff42faffc85714f7a5e1b56dc6463 | [
"MIT"
] | null | null | null | crossplatformshell/__init__.py | ryanpdwyer/crossplatformshell | d6239ae362cff42faffc85714f7a5e1b56dc6463 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
============================
crossplatformshell
============================
"""
from __future__ import (print_function, division, absolute_import,
unicode_literals)
import pathlib
import io
import os
import shutil
import distutils.dir_util
import platform
# Use subp... | 23.234483 | 74 | 0.62808 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 933 | 0.276937 |
c444346fedeae3b1a36842a83b1d34e2d12fa382 | 28,857 | py | Python | collections/nemo_nlp/nemo_nlp/data/data_layers.py | Giuseppe5/NeMo | f946aca100c9a1bf22e6bd25fba9f80299722112 | [
"Apache-2.0"
] | 2 | 2020-05-12T05:16:10.000Z | 2021-12-01T02:30:45.000Z | collections/nemo_nlp/nemo_nlp/data/data_layers.py | Giuseppe5/NeMo | f946aca100c9a1bf22e6bd25fba9f80299722112 | [
"Apache-2.0"
] | 3 | 2020-11-13T17:45:41.000Z | 2022-03-12T00:28:59.000Z | collections/nemo_nlp/nemo_nlp/data/data_layers.py | Giuseppe5/NeMo | f946aca100c9a1bf22e6bd25fba9f80299722112 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019 NVIDIA Corporation
# If you want to add your own data layer, you should put its name in
# __all__ so that it can be imported with 'from text_data_layers import *'
__all__ = ['TextDataLayer',
'BertSentenceClassificationDataLayer',
'BertJointIntentSlotDataLayer',
'... | 34.851449 | 79 | 0.537547 | 27,845 | 0.964931 | 901 | 0.031223 | 11,834 | 0.410091 | 0 | 0 | 8,924 | 0.309249 |
c446129e206d55ad3a8c2ed465762b2ddf662a3e | 12,208 | py | Python | h2o-py/h2o/automl/_base.py | vishalbelsare/h2o-3 | 9322fb0f4c0e2358449e339a434f607d524c69fa | [
"Apache-2.0"
] | null | null | null | h2o-py/h2o/automl/_base.py | vishalbelsare/h2o-3 | 9322fb0f4c0e2358449e339a434f607d524c69fa | [
"Apache-2.0"
] | 58 | 2021-10-01T12:43:37.000Z | 2021-12-08T22:58:43.000Z | h2o-py/h2o/automl/_base.py | vishalbelsare/h2o-3 | 9322fb0f4c0e2358449e339a434f607d524c69fa | [
"Apache-2.0"
] | null | null | null | import h2o
from h2o.base import Keyed
from h2o.exceptions import H2OValueError
from h2o.job import H2OJob
from h2o.model import ModelBase
from h2o.utils.typechecks import assert_is_type, is_type
class H2OAutoMLBaseMixin:
def predict(self, test_data):
"""
Predict on a dataset.
:param ... | 42.096552 | 173 | 0.63442 | 9,531 | 0.780718 | 0 | 0 | 2,236 | 0.183159 | 0 | 0 | 7,351 | 0.602146 |
c44725a87dd7a0e5d3208fe6f2ccd197531d2ad1 | 2,687 | py | Python | Pistol.py | KRHS-GameProgramming-2014/survival-island | 375b2710a2bc29551170b18638e2c00c6b2dc7c5 | [
"BSD-3-Clause"
] | 1 | 2015-04-01T12:46:26.000Z | 2015-04-01T12:46:26.000Z | Pistol.py | KRHS-GameProgramming-2014/survival-island | 375b2710a2bc29551170b18638e2c00c6b2dc7c5 | [
"BSD-3-Clause"
] | null | null | null | Pistol.py | KRHS-GameProgramming-2014/survival-island | 375b2710a2bc29551170b18638e2c00c6b2dc7c5 | [
"BSD-3-Clause"
] | null | null | null | import math,sys,pygame
class Pistol(pygame.sprite.Sprite):
def __init__(self,player):
self.facing = player.facing
if self.facing == "up":
self.image = pygame.image.load("rsc/Projectiles/gustu.png")
self.speed = [0, -5]
elif self.facing == "down":
s... | 33.17284 | 79 | 0.519166 | 2,662 | 0.990696 | 0 | 0 | 0 | 0 | 0 | 0 | 212 | 0.078898 |
c447c656ac034795409e4bb710eaaca13a84688c | 3,388 | py | Python | appdaemon/apps/common/common.py | Mithras/ha | d37f8673eed27a85f76c97ee3e924d2ddc033ee5 | [
"MIT"
] | 3 | 2019-10-27T06:10:26.000Z | 2020-07-21T01:27:11.000Z | appdaemon/apps/common/common.py | Mithras/ha | d37f8673eed27a85f76c97ee3e924d2ddc033ee5 | [
"MIT"
] | null | null | null | appdaemon/apps/common/common.py | Mithras/ha | d37f8673eed27a85f76c97ee3e924d2ddc033ee5 | [
"MIT"
] | null | null | null | import hassapi as hass
import csv
from collections import namedtuple
Profile = namedtuple(
"Profile", ["profile", "x_color", "y_color", "brightness"])
with open("/config/light_profiles.csv") as profiles_file:
profiles_reader = csv.reader(profiles_file)
next(profiles_reader)
LIGHT_PROFILES = [Profile(r... | 41.317073 | 80 | 0.602715 | 2,978 | 0.878985 | 0 | 0 | 0 | 0 | 2,866 | 0.845927 | 477 | 0.140791 |
c448522cb4d655aac706a30087c1d285bd8f1d0f | 3,133 | py | Python | src/mongo_model.py | zxteloiv/curated-geokb-subsearcher | 8f42dca4cb293ccf3baf25bb31ba9b6cd6a76c8d | [
"MIT"
] | null | null | null | src/mongo_model.py | zxteloiv/curated-geokb-subsearcher | 8f42dca4cb293ccf3baf25bb31ba9b6cd6a76c8d | [
"MIT"
] | null | null | null | src/mongo_model.py | zxteloiv/curated-geokb-subsearcher | 8f42dca4cb293ccf3baf25bb31ba9b6cd6a76c8d | [
"MIT"
] | null | null | null | # coding: utf-8
from pymongo import MongoClient
import conf
class MongoQuery(object):
def __init__(self):
self._conn = MongoClient(conf.mongodb_conn_str)
self._db = self._conn.geokb
def query(self, grounded, limit=15, sort_keys=None):
col = self._db[grounded['from']]
docs = co... | 34.054348 | 99 | 0.452601 | 3,080 | 0.979332 | 0 | 0 | 405 | 0.128776 | 0 | 0 | 482 | 0.153259 |
c448639417746f765b5ac2d5c6459142e8c6a83b | 8,809 | py | Python | src/dcm/agent/plugins/builtin/configure_server.py | JPWKU/unix-agent | 8f1278fc8c2768a8d4d54af642a881bace43652f | [
"Apache-2.0"
] | null | null | null | src/dcm/agent/plugins/builtin/configure_server.py | JPWKU/unix-agent | 8f1278fc8c2768a8d4d54af642a881bace43652f | [
"Apache-2.0"
] | 22 | 2015-09-15T20:52:34.000Z | 2016-03-11T22:44:24.000Z | src/dcm/agent/plugins/builtin/configure_server.py | JPWKU/unix-agent | 8f1278fc8c2768a8d4d54af642a881bace43652f | [
"Apache-2.0"
] | 3 | 2015-09-11T20:21:33.000Z | 2016-09-30T08:30:19.000Z | #
# Copyright (C) 2014 Dell, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 38.635965 | 79 | 0.595187 | 7,700 | 0.874106 | 0 | 0 | 0 | 0 | 0 | 0 | 1,661 | 0.188557 |
c44957a976ba959e51bd70f903dcac90438fe807 | 17,184 | py | Python | phy/plot/interact.py | ycanerol/phy | 7a247f926dd5bf5d8ab95fe138e8f4a0db11b068 | [
"BSD-3-Clause"
] | 118 | 2019-06-03T06:19:43.000Z | 2022-03-25T00:05:26.000Z | phy/plot/interact.py | ycanerol/phy | 7a247f926dd5bf5d8ab95fe138e8f4a0db11b068 | [
"BSD-3-Clause"
] | 761 | 2015-01-08T11:17:41.000Z | 2019-05-27T16:12:08.000Z | phy/plot/interact.py | ycanerol/phy | 7a247f926dd5bf5d8ab95fe138e8f4a0db11b068 | [
"BSD-3-Clause"
] | 70 | 2019-05-30T11:05:26.000Z | 2022-03-30T11:51:23.000Z | # -*- coding: utf-8 -*-
"""Common layouts."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
import logging
import numpy as np
from phylib.utils import emit
from phylib.utils.geometry import g... | 33.694118 | 97 | 0.557437 | 16,076 | 0.935521 | 0 | 0 | 1,827 | 0.10632 | 0 | 0 | 6,447 | 0.375175 |
c44cda7d547bb9bf0fd8879defc0c14046119449 | 623 | py | Python | AutocompleteHandler.py | codeforamerica/sheltraustin | a07ffd4b328a9d961347a85b49c95d8bf5ec1046 | [
"BSD-3-Clause"
] | null | null | null | AutocompleteHandler.py | codeforamerica/sheltraustin | a07ffd4b328a9d961347a85b49c95d8bf5ec1046 | [
"BSD-3-Clause"
] | 1 | 2015-08-03T21:27:36.000Z | 2015-08-03T21:27:36.000Z | AutocompleteHandler.py | codeforamerica/sheltraustin | a07ffd4b328a9d961347a85b49c95d8bf5ec1046 | [
"BSD-3-Clause"
] | 1 | 2021-04-17T10:13:29.000Z | 2021-04-17T10:13:29.000Z |
import tornado.httpserver
import tornado.ioloop
import tornado.options
import tornado.web
import simplejson
from QueryHandler import QueryHandler
class AutocompleteHandler(tornado.web.RequestHandler):
@tornado.web.asynchronous
def get(self):
if not self.request.arguments or self.request.arguments=={}:
self.re... | 23.074074 | 62 | 0.746388 | 474 | 0.760835 | 0 | 0 | 418 | 0.670947 | 0 | 0 | 51 | 0.081862 |
c44d0eafae3c92e64f9041228d582ce1a1b6ed30 | 1,869 | py | Python | mirari/SV/migrations/0052_auto_20190428_1522.py | gcastellan0s/mirariapp | 24a9db06d10f96c894d817ef7ccfeec2a25788b7 | [
"MIT"
] | null | null | null | mirari/SV/migrations/0052_auto_20190428_1522.py | gcastellan0s/mirariapp | 24a9db06d10f96c894d817ef7ccfeec2a25788b7 | [
"MIT"
] | 18 | 2019-12-27T19:58:20.000Z | 2022-02-27T08:17:49.000Z | mirari/SV/migrations/0052_auto_20190428_1522.py | gcastellan0s/mirariapp | 24a9db06d10f96c894d817ef7ccfeec2a25788b7 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.5 on 2019-04-28 20:22
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('SV', '0051_ticketproducts_offerprice'),
]
operations = [
migrations.AddField(
model_name='produ... | 37.38 | 147 | 0.604066 | 1,745 | 0.932656 | 0 | 0 | 0 | 0 | 0 | 0 | 499 | 0.266702 |
c44d2937a78223f5c0f6b30adbd02a5949d5f2e6 | 3,339 | py | Python | svl/compiler/plot_validators.py | timothyrenner/svl | a74c09c49f2e14046acd4b0eeb861f8fef6bca96 | [
"MIT"
] | 8 | 2019-03-27T12:49:21.000Z | 2020-10-10T11:16:25.000Z | svl/compiler/plot_validators.py | timothyrenner/svl | a74c09c49f2e14046acd4b0eeb861f8fef6bca96 | [
"MIT"
] | 65 | 2018-08-26T14:48:45.000Z | 2020-03-17T12:24:42.000Z | svl/compiler/plot_validators.py | timothyrenner/svl | a74c09c49f2e14046acd4b0eeb861f8fef6bca96 | [
"MIT"
] | 1 | 2019-09-13T19:39:07.000Z | 2019-09-13T19:39:07.000Z | from toolz import get
PLOT_VALIDATORS = [
(
{"line", "scatter", "bar"},
lambda x: ("x" not in x) or ("y" not in x),
"XY plot does not have X and Y.",
),
(
{"histogram"},
lambda x: ("step" in x) and ("bins" in x),
"Histogram cannot have STEP and BINS.",
),... | 29.289474 | 77 | 0.481881 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,590 | 0.47619 |
c44dbf415c5fb9329410760b9f9c0e517b6fdb6f | 7,421 | py | Python | decision_tree.py | cjbayron/ml-models | b3171c9a82fe5ecdcdc5abcdc20af7c18f9f8ec4 | [
"MIT"
] | 1 | 2018-12-15T16:36:41.000Z | 2018-12-15T16:36:41.000Z | decision_tree.py | cjbayron/ml-models | b3171c9a82fe5ecdcdc5abcdc20af7c18f9f8ec4 | [
"MIT"
] | null | null | null | decision_tree.py | cjbayron/ml-models | b3171c9a82fe5ecdcdc5abcdc20af7c18f9f8ec4 | [
"MIT"
] | null | null | null | '''
Building a Decision Tree using CART (from scratch)
Note: Code was tested only on dataset with numerical features.
Categorical features are not yet fully supported.
'''
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from sklearn.model_selection import train_test_split
from sklearn.metrics im... | 31.849785 | 87 | 0.597898 | 2,277 | 0.306832 | 0 | 0 | 0 | 0 | 0 | 0 | 1,392 | 0.187576 |
c44e49588a5ae8bdc21c7e3ab11388f043afd9f0 | 8,816 | py | Python | codegen/codegen/fblas_routine.py | spcl/fblas | 96425fbdbaeab6f43997d839836b8224a04f3b53 | [
"BSD-3-Clause"
] | 68 | 2019-02-07T21:30:21.000Z | 2022-02-16T20:09:27.000Z | codegen/codegen/fblas_routine.py | spcl/fblas | 96425fbdbaeab6f43997d839836b8224a04f3b53 | [
"BSD-3-Clause"
] | 2 | 2019-03-15T17:49:03.000Z | 2019-07-24T14:05:35.000Z | codegen/codegen/fblas_routine.py | spcl/fblas | 96425fbdbaeab6f43997d839836b8224a04f3b53 | [
"BSD-3-Clause"
] | 25 | 2019-03-15T03:00:15.000Z | 2021-08-04T10:21:43.000Z | """
FBlas Routine class: it used to represent a routine definition, specified by the user using JSON file.
It is used by the Host and Module Codegen (specified by the _codegen variable). Accordingly,
some class members could be invalid.
"""
from codegen import fblas_types
from codegen import generator_def... | 27.810726 | 153 | 0.678993 | 8,484 | 0.962341 | 0 | 0 | 3,613 | 0.409823 | 0 | 0 | 1,614 | 0.183076 |
c450bd09aaf8a942b6ab2b24bef1d3ae022e6398 | 485 | py | Python | lib/prefab/errors.py | lexsca/docker-prefab | bb34f1382e307346d0a0a95bde56861c28e56ec9 | [
"MIT"
] | 1 | 2021-04-06T21:37:59.000Z | 2021-04-06T21:37:59.000Z | lib/prefab/errors.py | lexsca/docker-prefab | bb34f1382e307346d0a0a95bde56861c28e56ec9 | [
"MIT"
] | 1 | 2020-11-03T01:12:06.000Z | 2020-11-03T03:55:28.000Z | lib/prefab/errors.py | lexsca/prefab | bb34f1382e307346d0a0a95bde56861c28e56ec9 | [
"MIT"
] | null | null | null | class PrefabError(Exception):
pass
class HashAlgorithmNotFound(PrefabError):
pass
class ImageAccessError(PrefabError):
pass
class ImageBuildError(PrefabError):
pass
class ImageNotFoundError(PrefabError):
pass
class ImagePushError(PrefabError):
pass
class ImageValidationError(PrefabEr... | 12.435897 | 41 | 0.756701 | 457 | 0.942268 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c451451a751c9fd2575b893cf89c5f54e2fd8166 | 840 | py | Python | test_hoyolab.py | c3kay/hoyolab-json-feed | 43839194a253271c9c2fcbb564eb4b3e6179c01e | [
"Unlicense"
] | 1 | 2021-09-17T12:40:40.000Z | 2021-09-17T12:40:40.000Z | test_hoyolab.py | c3kay/hoyolab-json-feed | 43839194a253271c9c2fcbb564eb4b3e6179c01e | [
"Unlicense"
] | null | null | null | test_hoyolab.py | c3kay/hoyolab-json-feed | 43839194a253271c9c2fcbb564eb4b3e6179c01e | [
"Unlicense"
] | null | null | null | from hoyolab import main
from os import environ
from os.path import exists
import atoma
def init_environ(d):
environ['HOYOLAB_JSON_PATH'] = '{}/hoyolab.json'.format(d)
environ['HOYOLAB_ATOM_PATH'] = '{}/hoyolab.xml'.format(d)
environ['HOYOLAB_JSON_URL'] = 'hoyolab.json'
environ['HOYOLAB_ATOM_URL'] = '... | 24.705882 | 62 | 0.713095 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 209 | 0.24881 |
c453263bed6e1f5fabe0695622acd9caad9d7447 | 194,112 | py | Python | thirdweb/abi/nft_collection/__init__.py | princetonwong/python-sdk | f35181d97620e29d055498fca75f3702f3bb2449 | [
"Apache-2.0"
] | 1 | 2022-02-18T16:59:12.000Z | 2022-02-18T16:59:12.000Z | thirdweb/abi/nft_collection/__init__.py | princetonwong/python-sdk | f35181d97620e29d055498fca75f3702f3bb2449 | [
"Apache-2.0"
] | null | null | null | thirdweb/abi/nft_collection/__init__.py | princetonwong/python-sdk | f35181d97620e29d055498fca75f3702f3bb2449 | [
"Apache-2.0"
] | null | null | null | """Generated wrapper for NFTCollection Solidity contract."""
# pylint: disable=too-many-arguments
import json
from typing import ( # pylint: disable=unused-import
Any,
List,
Optional,
Tuple,
Union,
)
from eth_utils import to_checksum_address
from mypy_extensions import TypedDict # pylint: disab... | 37.684333 | 17,643 | 0.634865 | 192,613 | 0.992278 | 0 | 0 | 17,766 | 0.091524 | 0 | 0 | 56,492 | 0.291028 |
c45419a203ad566f8ae9d52cc297219542ecf9f1 | 237 | py | Python | sausage_grinder/urls.py | jesseerdmann/audiobonsai | ec1edcdbadc6b2aff3b743b5c42515f4d5638830 | [
"Apache-2.0"
] | null | null | null | sausage_grinder/urls.py | jesseerdmann/audiobonsai | ec1edcdbadc6b2aff3b743b5c42515f4d5638830 | [
"Apache-2.0"
] | null | null | null | sausage_grinder/urls.py | jesseerdmann/audiobonsai | ec1edcdbadc6b2aff3b743b5c42515f4d5638830 | [
"Apache-2.0"
] | null | null | null | from django.urls import path
from . import views as sg
urlpatterns = [
path('artist', sg.artist),
path('genre', sg.genre),
path('release', sg.release),
path('track', sg.track),
path('', sg.sausage_grinder_index),
]
| 19.75 | 39 | 0.637131 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 33 | 0.139241 |
c45577ce768212873fbaadfacdbe638ce864abf9 | 1,194 | py | Python | sails/ui/mmck/parameters/string.py | metrasynth/solar-sails | 3a10774dad29d85834d3acb38171741b3a11ef91 | [
"MIT"
] | 6 | 2016-11-22T14:32:55.000Z | 2021-08-15T01:35:33.000Z | sails/ui/mmck/parameters/string.py | metrasynth/solar-sails | 3a10774dad29d85834d3acb38171741b3a11ef91 | [
"MIT"
] | 2 | 2022-03-18T16:47:43.000Z | 2022-03-18T16:47:44.000Z | sails/ui/mmck/parameters/string.py | metrasynth/solar-sails | 3a10774dad29d85834d3acb38171741b3a11ef91 | [
"MIT"
] | 2 | 2019-07-09T23:44:08.000Z | 2021-08-15T01:35:37.000Z | from PyQt5.QtCore import pyqtSlot
from PyQt5.QtWidgets import QComboBox
from PyQt5.QtWidgets import QLineEdit
from sf.mmck.parameters import String
from .manager import widget_class_for
from .widget import ParameterWidget
@widget_class_for(String)
class StringParameterWidget(ParameterWidget):
def setUp(self, ui)... | 35.117647 | 89 | 0.707705 | 943 | 0.789782 | 0 | 0 | 969 | 0.811558 | 0 | 0 | 0 | 0 |
c455ef3791cf634263613f0736425fbda6d62c4c | 550 | py | Python | plot_top_performers.py | jmphil09/mario_rl | 6e93c1318e9957d679a5ec8d29687756ac7fc4b1 | [
"MIT"
] | null | null | null | plot_top_performers.py | jmphil09/mario_rl | 6e93c1318e9957d679a5ec8d29687756ac7fc4b1 | [
"MIT"
] | null | null | null | plot_top_performers.py | jmphil09/mario_rl | 6e93c1318e9957d679a5ec8d29687756ac7fc4b1 | [
"MIT"
] | null | null | null | from FitnessPlot import FitnessPlot
'''
for n in range(1,6):
plot = FitnessPlot(folder_prefix='data_top{}'.format(n))
plot.plot_all_workers()
plot.plot_workers_as_average()
'''
plot = FitnessPlot(folder_prefix='data_top1', num_workers=16)
worker_dict = plot.create_worker_dict()
#plot.plot_all_workers()
#... | 23.913043 | 61 | 0.703636 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 291 | 0.529091 |
c456582b3a99628d95abc79fe354227dac957e3b | 3,696 | py | Python | test/PySrc/tests/test_code_tracer_width.py | lifubang/live-py-plugin | 38a3cf447fd7d9c4e6014b71134e178b0d8a01de | [
"MIT"
] | 224 | 2015-03-22T23:40:52.000Z | 2022-03-01T21:45:51.000Z | test/PySrc/tests/test_code_tracer_width.py | lifubang/live-py-plugin | 38a3cf447fd7d9c4e6014b71134e178b0d8a01de | [
"MIT"
] | 371 | 2015-04-28T05:14:00.000Z | 2022-03-28T01:31:22.000Z | test/PySrc/tests/test_code_tracer_width.py | lifubang/live-py-plugin | 38a3cf447fd7d9c4e6014b71134e178b0d8a01de | [
"MIT"
] | 53 | 2015-10-30T07:52:07.000Z | 2022-02-28T12:56:35.000Z | from space_tracer.main import replace_input, TraceRunner
def test_source_width_positive():
code = """\
i = 1 + 1
"""
expected_report = """\
i = 1 + | i = 2"""
with replace_input(code):
report = TraceRunner().trace_command(['space_tracer',
'--source_w... | 25.666667 | 73 | 0.446699 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,012 | 0.27381 |
c45760cde68ead756aaeedf9a4958bde55f0fdc2 | 458 | py | Python | benchmark/src/benchmark/bench_logging.py | lwanfuturewei/QFlock | 90d6875d9adc8fe2968694904f8421d41e30e189 | [
"Apache-2.0"
] | null | null | null | benchmark/src/benchmark/bench_logging.py | lwanfuturewei/QFlock | 90d6875d9adc8fe2968694904f8421d41e30e189 | [
"Apache-2.0"
] | null | null | null | benchmark/src/benchmark/bench_logging.py | lwanfuturewei/QFlock | 90d6875d9adc8fe2968694904f8421d41e30e189 | [
"Apache-2.0"
] | 2 | 2022-03-03T15:28:23.000Z | 2022-03-04T15:33:19.000Z |
import logging
def setup_logger():
formatter = logging.Formatter('%(asctime)s.%(msecs)03d %(levelname)s %(message)s',
'%Y-%m-%d %H:%M:%S')
logging.basicConfig(level=logging.INFO,
format='%(asctime)s.%(msecs)03d %(levelname)-8s %(message)s',
... | 26.941176 | 86 | 0.530568 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 142 | 0.310044 |
c45814f676d4f4897bba48b176daa7d8a452554e | 6,921 | py | Python | tools/configure-gateway/threescale/proxies.py | jparsai/f8a-3scale-connect-api | a782753d662eee5d450da3c20e9ae9eb13b8b560 | [
"Apache-2.0"
] | 1 | 2018-09-14T05:18:52.000Z | 2018-09-14T05:18:52.000Z | tools/configure-gateway/threescale/proxies.py | jparsai/f8a-3scale-connect-api | a782753d662eee5d450da3c20e9ae9eb13b8b560 | [
"Apache-2.0"
] | 48 | 2017-12-05T12:05:56.000Z | 2021-03-25T22:09:29.000Z | tools/configure-gateway/threescale/proxies.py | jparsai/f8a-3scale-connect-api | a782753d662eee5d450da3c20e9ae9eb13b8b560 | [
"Apache-2.0"
] | 5 | 2018-01-29T04:53:13.000Z | 2020-04-16T13:59:42.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""ThreeScale Proxies Rule interface for APIs."""
from .base import ThreeScale
import logging
import requests
import xmltodict
import json
logger = logging.getLogger(__name__)
class Proxies(ThreeScale):
"""ThreeScale Proxies create, update."""
response = None... | 38.237569 | 91 | 0.566681 | 6,692 | 0.966912 | 0 | 0 | 0 | 0 | 0 | 0 | 1,482 | 0.214131 |
c458cb4e772b1e30729560fd59117cb1dab40b05 | 241 | py | Python | src/__main__.py | Grox2006/Kayambot | a49cf7fd16fdc049500ae645784cc671b04edf87 | [
"MIT"
] | null | null | null | src/__main__.py | Grox2006/Kayambot | a49cf7fd16fdc049500ae645784cc671b04edf87 | [
"MIT"
] | null | null | null | src/__main__.py | Grox2006/Kayambot | a49cf7fd16fdc049500ae645784cc671b04edf87 | [
"MIT"
] | null | null | null | import sys
from __init__ import Bot
MESSAGE_USAGE = "Usage is python %s [name] [token]"
if __name__ == "__main__":
if len(sys.argv) == 3:
Bot(sys.argv[1], sys.argv[2])
else:
print(MESSAGE_USAGE.format(sys.argv[0]))
| 21.909091 | 51 | 0.630705 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.186722 |
c45a35a45e18477dcb0c3a971fc4e41ecd533922 | 985 | py | Python | app/__init__.py | logicalicy/flask-react-boilerplate | 2a999c969a7fc7d244830ebba02a00f0feca79dd | [
"MIT"
] | 2 | 2017-02-27T16:48:08.000Z | 2019-05-10T11:22:07.000Z | app/__init__.py | logicalicy/flask-react-boilerplate | 2a999c969a7fc7d244830ebba02a00f0feca79dd | [
"MIT"
] | null | null | null | app/__init__.py | logicalicy/flask-react-boilerplate | 2a999c969a7fc7d244830ebba02a00f0feca79dd | [
"MIT"
] | null | null | null | # Created with tutorials:
# https://www.digitalocean.com/community/tutorials/how-to-structure-large-flask-applications
# http://flask.pocoo.org/docs/0.12/tutorial
from flask import Flask, g, render_template
from flask_sqlalchemy import SQLAlchemy
import sqlite3
# Define WSGI application object.
app = Flask(__name__... | 25.921053 | 92 | 0.792893 | 0 | 0 | 0 | 0 | 88 | 0.08934 | 0 | 0 | 474 | 0.481218 |
c45c0b6aabc6d08c2689d66882739d5b4c1b5f06 | 19,075 | py | Python | dumpcode/cpiter.py | gkfthddk/keras | 46d96c65d69c39df298800336bbb4d867a2561fb | [
"MIT"
] | null | null | null | dumpcode/cpiter.py | gkfthddk/keras | 46d96c65d69c39df298800336bbb4d867a2561fb | [
"MIT"
] | null | null | null | dumpcode/cpiter.py | gkfthddk/keras | 46d96c65d69c39df298800336bbb4d867a2561fb | [
"MIT"
] | null | null | null | import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
import subprocess
import numpy as np
import datetime
import random
import warnings
import ROOT as rt
import math
from keras.preprocessing.sequence import pad_sequences
from keras.callbacks import Callback
from array import array
from sklearn.metrics import roc_auc_sco... | 39.739583 | 841 | 0.654522 | 18,731 | 0.981966 | 1,151 | 0.060341 | 132 | 0.00692 | 0 | 0 | 1,874 | 0.098244 |
c45c12b0519ee7503fa9f8fb44c7b896a2082873 | 210 | py | Python | tools/opt.py | hmtrii/tirg | e404020795bb46fb01b6bd82a2618f9370174012 | [
"Apache-2.0"
] | null | null | null | tools/opt.py | hmtrii/tirg | e404020795bb46fb01b6bd82a2618f9370174012 | [
"Apache-2.0"
] | null | null | null | tools/opt.py | hmtrii/tirg | e404020795bb46fb01b6bd82a2618f9370174012 | [
"Apache-2.0"
] | null | null | null | class Opt:
def __init__(self):
self.dataset = "fashion200k"
self.dataset_path = "./dataset/Fashion200k"
self.batch_size = 32
self.embed_dim = 512
self.hashing = False
self.retrieve_by_random = True | 26.25 | 45 | 0.728571 | 210 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 36 | 0.171429 |
c45d9da847d632f929a40311d340ee5e03a9dfff | 287 | py | Python | addons/iap_crm/models/crm_lead.py | SHIVJITH/Odoo_Machine_Test | 310497a9872db7844b521e6dab5f7a9f61d365a4 | [
"Apache-2.0"
] | null | null | null | addons/iap_crm/models/crm_lead.py | SHIVJITH/Odoo_Machine_Test | 310497a9872db7844b521e6dab5f7a9f61d365a4 | [
"Apache-2.0"
] | null | null | null | addons/iap_crm/models/crm_lead.py | SHIVJITH/Odoo_Machine_Test | 310497a9872db7844b521e6dab5f7a9f61d365a4 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class Lead(models.Model):
_inherit = 'crm.lead'
reveal_id = fields.Char(string='Reveal ID', help="Technical ID of reveal request done by IAP.")
| 26.090909 | 99 | 0.703833 | 152 | 0.529617 | 0 | 0 | 0 | 0 | 0 | 0 | 163 | 0.567944 |
c45f0b40e801dd329eac9e771b4dd170e217817c | 6,600 | py | Python | vitrage/tests/unit/datasources/kubernetes/test_kubernetes_transformer.py | openstack/vitrage | 95b33dbf39b040e23915882a2879c87aec239ca9 | [
"Apache-2.0"
] | 89 | 2015-09-30T21:42:17.000Z | 2022-03-28T16:31:19.000Z | vitrage/tests/unit/datasources/kubernetes/test_kubernetes_transformer.py | openstack/vitrage | 95b33dbf39b040e23915882a2879c87aec239ca9 | [
"Apache-2.0"
] | 4 | 2015-12-13T13:06:53.000Z | 2016-01-03T19:51:28.000Z | vitrage/tests/unit/datasources/kubernetes/test_kubernetes_transformer.py | openstack/vitrage | 95b33dbf39b040e23915882a2879c87aec239ca9 | [
"Apache-2.0"
] | 43 | 2015-11-04T15:54:27.000Z | 2021-12-10T14:24:03.000Z | # Copyright 2018 - Nokia
#
# 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, sof... | 39.759036 | 79 | 0.700455 | 4,820 | 0.730303 | 0 | 0 | 334 | 0.050606 | 0 | 0 | 1,021 | 0.154697 |
c45fabb5527e1d2513cfd056db4a65258232ae26 | 1,058 | py | Python | two_children.py | daniel2019-max/HackerRank-preparation-month | 400f8c0cfaa9fc8e13a683c15ecb5d2341d9c209 | [
"MIT"
] | null | null | null | two_children.py | daniel2019-max/HackerRank-preparation-month | 400f8c0cfaa9fc8e13a683c15ecb5d2341d9c209 | [
"MIT"
] | null | null | null | two_children.py | daniel2019-max/HackerRank-preparation-month | 400f8c0cfaa9fc8e13a683c15ecb5d2341d9c209 | [
"MIT"
] | null | null | null | # Two children, Lily and Ron, want to share a chocolate bar. Each of the squares has an integer on it.
# Lily decides to share a contiguous segment of the bar selected such that:
# The length of the segment matches Ron's birth month, and,
# The sum of the integers on the squares is equal to his birth day.
# Determine... | 31.117647 | 102 | 0.670132 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 550 | 0.519849 |
c46046acfa73778c21a31da519b8cdbcc2cefaef | 3,517 | py | Python | sdk/python/pulumi_sonarqube/get_users.py | jshield/pulumi-sonarqube | 53664a97903af3ecdf4f613117d83d0acae8e53e | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_sonarqube/get_users.py | jshield/pulumi-sonarqube | 53664a97903af3ecdf4f613117d83d0acae8e53e | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_sonarqube/get_users.py | jshield/pulumi-sonarqube | 53664a97903af3ecdf4f613117d83d0acae8e53e | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import ... | 31.972727 | 119 | 0.644868 | 2,007 | 0.570657 | 250 | 0.071083 | 1,991 | 0.566107 | 0 | 0 | 946 | 0.268979 |
c460565d7c12782c020979637ad1d6a595e59cab | 504 | py | Python | rl/valuefunction/FeatureExtractor.py | nickswalker/counterpoint-reinforcement-learning | 1d0481bd2c9976533175339e411a41f4eb1650aa | [
"MIT"
] | 1 | 2016-12-09T18:29:30.000Z | 2016-12-09T18:29:30.000Z | rl/valuefunction/FeatureExtractor.py | nickswalker/counterpoint-reinforcement-learning | 1d0481bd2c9976533175339e411a41f4eb1650aa | [
"MIT"
] | null | null | null | rl/valuefunction/FeatureExtractor.py | nickswalker/counterpoint-reinforcement-learning | 1d0481bd2c9976533175339e411a41f4eb1650aa | [
"MIT"
] | null | null | null | from abc import abstractmethod
from typing import List
from rl.action import Action
from rl.state import State
class StateActionFeatureExtractor:
@abstractmethod
def num_features(self) -> int:
pass
@abstractmethod
def extract(self, state: State, action: Action) -> List[float]:
pass
... | 19.384615 | 67 | 0.684524 | 386 | 0.765873 | 0 | 0 | 302 | 0.599206 | 0 | 0 | 0 | 0 |
c4606fc8327fb668e73c4a4c899e2f956318eefb | 563 | py | Python | yxf_utils/jsonx.py | yanyaming/yxf_utils | c1e1f7012f089374088210e55a953548b3c4da8b | [
"MIT"
] | null | null | null | yxf_utils/jsonx.py | yanyaming/yxf_utils | c1e1f7012f089374088210e55a953548b3c4da8b | [
"MIT"
] | null | null | null | yxf_utils/jsonx.py | yanyaming/yxf_utils | c1e1f7012f089374088210e55a953548b3c4da8b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
通用json处理接口
"""
import json
# 输入单引号为边界的类json字符串(内部可能还有双引号),返回单引号为边界的python字典or列表对象。
def singleQuoteJsonStr_to_PythonObj(strr):
jsonObj = eval(strr) # 不能用内置函数解析。只能模拟执行。
return jsonObj # dict or list
# 输入完全正规的json字符串(键-值边界为双引号),返回单引号为边界的python字典or列表对象。
def... | 20.851852 | 58 | 0.735346 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 566 | 0.666667 |
c4611f97e3d7c75a5d43b772cd3ffe6b29e5f96b | 1,044 | py | Python | ggshield/scan/scannable_errors.py | rgajason/gg-shield | 45c3534bdd174880710b97aedac068f6ddd52eaf | [
"MIT"
] | null | null | null | ggshield/scan/scannable_errors.py | rgajason/gg-shield | 45c3534bdd174880710b97aedac068f6ddd52eaf | [
"MIT"
] | 1 | 2021-06-02T04:28:09.000Z | 2021-06-02T04:28:09.000Z | ggshield/scan/scannable_errors.py | rgajason/gg-shield | 45c3534bdd174880710b97aedac068f6ddd52eaf | [
"MIT"
] | null | null | null | from ast import literal_eval
from typing import Dict, List
import click
from pygitguardian.models import Detail
from ggshield.text_utils import STYLE, display_error, format_text, pluralize
def handle_scan_error(detail: Detail, chunk: List[Dict[str, str]]) -> None:
if detail.status_code == 401:
raise cli... | 32.625 | 80 | 0.598659 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 227 | 0.217433 |
c461b7cff1ea76d96382e29fc4f6db6ef1e4b933 | 18,049 | py | Python | Packs/Base/Scripts/DBotPreprocessTextData/DBotPreprocessTextData.py | matan-xmcyber/content | 7f02301c140b35956af3cd20cb8dfc64f34afb3e | [
"MIT"
] | 1 | 2021-08-07T00:21:58.000Z | 2021-08-07T00:21:58.000Z | Packs/Base/Scripts/DBotPreprocessTextData/DBotPreprocessTextData.py | matan-xmcyber/content | 7f02301c140b35956af3cd20cb8dfc64f34afb3e | [
"MIT"
] | 48 | 2022-03-08T13:45:00.000Z | 2022-03-31T14:32:05.000Z | Packs/Base/Scripts/DBotPreprocessTextData/DBotPreprocessTextData.py | matan-xmcyber/content | 7f02301c140b35956af3cd20cb8dfc64f34afb3e | [
"MIT"
] | 2 | 2020-12-10T12:02:45.000Z | 2020-12-15T09:20:01.000Z | # pylint: disable=no-member
from CommonServerUserPython import *
from CommonServerPython import *
from sklearn.feature_extraction.text import TfidfVectorizer
import pickle
import uuid
import spacy
import string
from html.parser import HTMLParser
from html import unescape
from re import compile as _Re
import pandas as p... | 40.559551 | 120 | 0.633165 | 7,880 | 0.436589 | 0 | 0 | 0 | 0 | 0 | 0 | 2,134 | 0.118234 |
c464ae6c792d78df3c469e563d6a59248c7a5e64 | 2,799 | py | Python | punc_recover/tester/punc_tester.py | Z-yq/audioSamples.github.io | 53c474288f0db1a3acfe40ba57a4cd5f2aecbcd3 | [
"Apache-2.0"
] | 1 | 2022-03-03T02:51:55.000Z | 2022-03-03T02:51:55.000Z | punc_recover/tester/punc_tester.py | RapidAI/TensorflowASR | 084519b5a0464f465e1d72c24cba07c1ec55cd26 | [
"Apache-2.0"
] | null | null | null | punc_recover/tester/punc_tester.py | RapidAI/TensorflowASR | 084519b5a0464f465e1d72c24cba07c1ec55cd26 | [
"Apache-2.0"
] | null | null | null | import logging
import os
import tensorflow as tf
from punc_recover.models.punc_transformer import PuncTransformer
from punc_recover.tester.base_tester import BaseTester
from utils.text_featurizers import TextFeaturizer
class PuncTester(BaseTester):
""" Trainer for CTC Models """
def __init__(self,
... | 36.350649 | 94 | 0.599857 | 2,577 | 0.920686 | 0 | 0 | 0 | 0 | 0 | 0 | 292 | 0.104323 |
c464fcd2cef62b8d92f36f587767dd193dd32e2a | 13,293 | py | Python | moztrap/model/core/migrations/0003_auto__add_field_productversion_cc_version__add_field_product.py | mbeko/moztrap | db75e1f8756ef2c0c39652a66302b19c8afa0256 | [
"BSD-2-Clause"
] | null | null | null | moztrap/model/core/migrations/0003_auto__add_field_productversion_cc_version__add_field_product.py | mbeko/moztrap | db75e1f8756ef2c0c39652a66302b19c8afa0256 | [
"BSD-2-Clause"
] | null | null | null | moztrap/model/core/migrations/0003_auto__add_field_productversion_cc_version__add_field_product.py | mbeko/moztrap | db75e1f8756ef2c0c39652a66302b19c8afa0256 | [
"BSD-2-Clause"
] | null | null | null | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'ProductVersion.cc_version'
db.add_column('core_productversion', 'cc_version', self.gf('django.db.... | 85.76129 | 187 | 0.568871 | 13,166 | 0.990446 | 0 | 0 | 0 | 0 | 0 | 0 | 9,412 | 0.708042 |
c4667c374455b11e101ec3e8d25bd29cd21c3a81 | 3,965 | py | Python | tests/downloader_test.py | jkawamoto/roadie-gcp | 96394a47d375bd01e167f351fc86a03905e98395 | [
"MIT"
] | 1 | 2018-09-20T01:51:23.000Z | 2018-09-20T01:51:23.000Z | tests/downloader_test.py | jkawamoto/roadie-gcp | 96394a47d375bd01e167f351fc86a03905e98395 | [
"MIT"
] | 9 | 2016-01-31T11:28:12.000Z | 2021-04-30T20:43:39.000Z | tests/downloader_test.py | jkawamoto/roadie-gcp | 96394a47d375bd01e167f351fc86a03905e98395 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
#
# downloader_test.py
#
# Copyright (c) 2015-2016 Junpei Kawamoto
#
# This software is released under the MIT License.
#
# http://opensource.org/licenses/mit-license.php
#
""" Test for downloader module.
"""
import logging
import shutil
import sys
import unittest
import os
from os import path
im... | 30.037879 | 95 | 0.642371 | 3,066 | 0.773266 | 0 | 0 | 246 | 0.062043 | 0 | 0 | 1,477 | 0.372509 |
c466ca50010615bb02d62529ff22d41f7530666b | 1,800 | py | Python | ticle/plotters/plot_phase.py | muma7490/TICLE | bffa64ee488abac17809d02dfc176fe80128541a | [
"MIT"
] | null | null | null | ticle/plotters/plot_phase.py | muma7490/TICLE | bffa64ee488abac17809d02dfc176fe80128541a | [
"MIT"
] | null | null | null | ticle/plotters/plot_phase.py | muma7490/TICLE | bffa64ee488abac17809d02dfc176fe80128541a | [
"MIT"
] | null | null | null | import matplotlib.pyplot as pl
import os
import numpy as np
from ticle.data.dataHandler import normalizeData,load_file
from ticle.analysis.analysis import get_phases,normalize_phase
pl.rc('xtick', labelsize='x-small')
pl.rc('ytick', labelsize='x-small')
pl.rc('font', family='serif')
pl.rcParams.update({'font.size': 2... | 27.692308 | 82 | 0.648889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 453 | 0.251667 |
c467d3e82cd1949de48c0e1eac654f4ecca276b3 | 7,267 | py | Python | src/putil/rabbitmq/rabbit_util.py | scionrep/scioncc_new | 086be085b69711ee24c4c86ed42f2109ca0db027 | [
"BSD-2-Clause"
] | 2 | 2015-10-05T20:36:35.000Z | 2018-11-21T11:45:24.000Z | src/putil/rabbitmq/rabbit_util.py | scionrep/scioncc_new | 086be085b69711ee24c4c86ed42f2109ca0db027 | [
"BSD-2-Clause"
] | 21 | 2015-03-18T14:39:32.000Z | 2016-07-01T17:16:29.000Z | src/putil/rabbitmq/rabbit_util.py | scionrep/scioncc_new | 086be085b69711ee24c4c86ed42f2109ca0db027 | [
"BSD-2-Clause"
] | 12 | 2015-03-18T10:53:49.000Z | 2018-06-21T11:19:57.000Z | #!/usr/bin/python
import shlex
import simplejson
from putil.rabbitmq.rabbitmqadmin import Management, make_parser, LISTABLE, DELETABLE
class RabbitManagementUtil(object):
def __init__(self, config, options=None, sysname=None):
"""
Given a config object (system CFG or rabbit mgmt config), extra... | 42.00578 | 126 | 0.610706 | 7,125 | 0.98046 | 0 | 0 | 2,190 | 0.301362 | 0 | 0 | 2,144 | 0.295032 |
c4692b2cd0fdba89e13d15c53467b6b2f916be48 | 5,362 | py | Python | gaternet/main.py | gunpowder78/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | 1 | 2022-03-13T21:48:52.000Z | 2022-03-13T21:48:52.000Z | gaternet/main.py | gunpowder78/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | null | null | null | gaternet/main.py | gunpowder78/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | 1 | 2022-03-30T07:20:29.000Z | 2022-03-30T07:20:29.000Z | # coding=utf-8
# Copyright 2022 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 35.276316 | 79 | 0.693398 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,785 | 0.332898 |
c46ae74020d50b1e15aaa99acf255cf154208cb8 | 251 | pyw | Python | client.pyw | thatfuckingbird/hydrus-websocket-server | b55454740dca5101448bf92224432f8bdbec7e77 | [
"WTFPL"
] | 1,417 | 2015-01-22T00:50:30.000Z | 2022-03-30T18:44:55.000Z | client.pyw | thatfuckingbird/hydrus-websocket-server | b55454740dca5101448bf92224432f8bdbec7e77 | [
"WTFPL"
] | 975 | 2015-01-05T01:41:40.000Z | 2022-03-31T06:01:50.000Z | client.pyw | thatfuckingbird/hydrus-websocket-server | b55454740dca5101448bf92224432f8bdbec7e77 | [
"WTFPL"
] | 163 | 2015-02-04T13:09:35.000Z | 2022-03-23T01:00:05.000Z | #!/usr/bin/env python3
# Hydrus is released under WTFPL
# You just DO WHAT THE FUCK YOU WANT TO.
# https://github.com/sirkris/WTFPL/blob/master/WTFPL.md
from hydrus import hydrus_client
if __name__ == '__main__':
hydrus_client.boot()
| 19.307692 | 55 | 0.709163 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 159 | 0.633466 |
c46b9bf38daa8aa62af17faaff944dc07ddd1de9 | 5,776 | py | Python | fixEngine/fixEngine.py | HNGlez/ExchangeConnector | 5176437963a3e9e671bb059c599c79f39439f4d4 | [
"MIT"
] | null | null | null | fixEngine/fixEngine.py | HNGlez/ExchangeConnector | 5176437963a3e9e671bb059c599c79f39439f4d4 | [
"MIT"
] | null | null | null | fixEngine/fixEngine.py | HNGlez/ExchangeConnector | 5176437963a3e9e671bb059c599c79f39439f4d4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ExchangeConnector fixEngine
Copyright (c) 2020 Hugo Nistal Gonzalez
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, includi... | 46.208 | 179 | 0.691136 | 4,381 | 0.758483 | 0 | 0 | 0 | 0 | 3,082 | 0.533587 | 1,935 | 0.335007 |
c46bcfd7797c21307852fe37265fa68fac0dbbc3 | 570 | py | Python | plugins/session_list/views.py | farazkhanfk7/ajenti | ff51635bea0d29bf9f35dd7912f145398040541d | [
"MIT"
] | 1 | 2021-04-27T07:16:01.000Z | 2021-04-27T07:16:01.000Z | plugins/session_list/views.py | farazkhanfk7/ajenti | ff51635bea0d29bf9f35dd7912f145398040541d | [
"MIT"
] | null | null | null | plugins/session_list/views.py | farazkhanfk7/ajenti | ff51635bea0d29bf9f35dd7912f145398040541d | [
"MIT"
] | null | null | null | from jadi import component
from aj.api.http import url, HttpPlugin
from aj.auth import authorize
from aj.api.endpoint import endpoint, EndpointError
import aj
import gevent
@component(HttpPlugin)
class Handler(HttpPlugin):
def __init__(self, context):
self.context = context
@url(r'/api/session_list/l... | 25.909091 | 53 | 0.687719 | 358 | 0.62807 | 0 | 0 | 381 | 0.668421 | 0 | 0 | 30 | 0.052632 |
c46cb76d02d71b063cedf52c09eb7f327cd308da | 10,606 | py | Python | now/collection/prov_execution/argument_captors.py | CrystalMei/Prov_Build | 695576c36b7d5615f1cc568954658f8a7ce9eeba | [
"MIT"
] | 2 | 2017-11-10T16:17:11.000Z | 2021-12-19T18:43:22.000Z | now/collection/prov_execution/argument_captors.py | CrystalMei/Prov_Build | 695576c36b7d5615f1cc568954658f8a7ce9eeba | [
"MIT"
] | null | null | null | now/collection/prov_execution/argument_captors.py | CrystalMei/Prov_Build | 695576c36b7d5615f1cc568954658f8a7ce9eeba | [
"MIT"
] | null | null | null | # Copyright (c) 2016 Universidade Federal Fluminense (UFF)
# Copyright (c) 2016 Polytechnic Institute of New York University.
# Copyright (c) 2018, 2019, 2020 President and Fellows of Harvard College.
# This file is part of ProvBuild.
"""Capture arguments from calls"""
from __future__ import (absolute_import, print_f... | 36.826389 | 127 | 0.581463 | 9,973 | 0.940317 | 0 | 0 | 0 | 0 | 0 | 0 | 2,669 | 0.25165 |
c46dc4849d73685f3bf2bf7edc6ed45dee20d695 | 307 | py | Python | Python/Day8 DictionariesAndMaps.py | codePerfectPlus/30-DaysOfCode-With-Python-And-JavaScript | 570fa12ed30659fa394d86e12583b69f35a2e7a7 | [
"MIT"
] | 8 | 2020-08-03T01:53:13.000Z | 2022-01-09T14:47:58.000Z | Python/Day8 DictionariesAndMaps.py | codePerfectPlus/30-DaysOfCode-With-Python-And-JavaScript | 570fa12ed30659fa394d86e12583b69f35a2e7a7 | [
"MIT"
] | null | null | null | Python/Day8 DictionariesAndMaps.py | codePerfectPlus/30-DaysOfCode-With-Python-And-JavaScript | 570fa12ed30659fa394d86e12583b69f35a2e7a7 | [
"MIT"
] | 4 | 2020-09-29T11:28:53.000Z | 2021-06-02T15:34:55.000Z | N = int(input())
entry = [input().split() for _ in range(N)]
phoneBook = {name: number for name, number in entry}
while True:
try:
name = input()
if name in phoneBook:
print(f"{name}={phoneBook[name]}")
else:
print("Not found")
except:
break
| 21.928571 | 52 | 0.534202 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 38 | 0.123779 |
c46f3c278fa8309cddd52d6eeccf2dae6ea924e2 | 1,850 | py | Python | 10. Recurrent Neural Network/10-1) Recurrent Neural Network, RNN.py | choijiwoong/-ROKA-torch-tutorial-files | c298fdf911cd64757895c3ab9f71ae7c3467c545 | [
"Unlicense"
] | null | null | null | 10. Recurrent Neural Network/10-1) Recurrent Neural Network, RNN.py | choijiwoong/-ROKA-torch-tutorial-files | c298fdf911cd64757895c3ab9f71ae7c3467c545 | [
"Unlicense"
] | null | null | null | 10. Recurrent Neural Network/10-1) Recurrent Neural Network, RNN.py | choijiwoong/-ROKA-torch-tutorial-files | c298fdf911cd64757895c3ab9f71ae7c3467c545 | [
"Unlicense"
] | null | null | null | #Sequence model. != Recursive Neural Network
#memory cell or RNN cell
#hidden state
#one-to-many_image captioning, many-to-one_sentiment classfication || spam detection, many-to-many_chat bot
#2) create RNN in python
import numpy as np
timesteps=10#시점의 수 _문장의 길이
input_size=4#입력의 차원_단어벡터의 차원
hidden_size=8#메모리 셀의 용량(은닉... | 30.327869 | 107 | 0.778378 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,001 | 0.447674 |
c46f42400056a3b7b9402bc800d3e92633345822 | 720 | py | Python | WeLearn/M3-Python/L3-Python_Object/pet.py | munoz196/moonyosCSSIrep | cdfcd2ae061293471ecdf2d370a27f163efeba97 | [
"Apache-2.0"
] | null | null | null | WeLearn/M3-Python/L3-Python_Object/pet.py | munoz196/moonyosCSSIrep | cdfcd2ae061293471ecdf2d370a27f163efeba97 | [
"Apache-2.0"
] | null | null | null | WeLearn/M3-Python/L3-Python_Object/pet.py | munoz196/moonyosCSSIrep | cdfcd2ae061293471ecdf2d370a27f163efeba97 | [
"Apache-2.0"
] | null | null | null | pet = {
"name":"Doggo",
"animal":"dog",
"species":"labrador",
"age":"5"
}
class Pet(object):
def __init__(self, name, age, animal):
self.name = name
self.age = age
self.animal = animal
self.hungry = False
self.mood= "happy"
def eat(self):
print("> %s is eating.... | 22.5 | 62 | 0.566667 | 437 | 0.606944 | 0 | 0 | 0 | 0 | 0 | 0 | 196 | 0.272222 |
c470769346abfe53705868b77ccb1792faae0816 | 1,260 | py | Python | src/repositories/example_repo.py | pybokeh/dagster-examples | 459cfbe00585f1d123e49058685c74149efb867d | [
"MIT"
] | null | null | null | src/repositories/example_repo.py | pybokeh/dagster-examples | 459cfbe00585f1d123e49058685c74149efb867d | [
"MIT"
] | null | null | null | src/repositories/example_repo.py | pybokeh/dagster-examples | 459cfbe00585f1d123e49058685c74149efb867d | [
"MIT"
] | null | null | null | from dagster import job, repository
from ops.sklearn_ops import (
fetch_freehand_text_to_generic_data,
separate_features_from_target_label,
label_encode_target,
count_tfid_transform_train,
count_tfid_transform_test,
create_sgd_classifier_model,
predict
)
@ job(
description... | 33.157895 | 141 | 0.768254 | 0 | 0 | 0 | 0 | 955 | 0.757937 | 0 | 0 | 247 | 0.196032 |
c4721b4a3c1999fdb50a16efbe7e2d5c42d79e86 | 551 | py | Python | exercicios/Maior_e_Menor_Valores.py | jeversonneves/Python | c31779d8db64b22711fe612cc943da8c5e51788b | [
"MIT"
] | null | null | null | exercicios/Maior_e_Menor_Valores.py | jeversonneves/Python | c31779d8db64b22711fe612cc943da8c5e51788b | [
"MIT"
] | null | null | null | exercicios/Maior_e_Menor_Valores.py | jeversonneves/Python | c31779d8db64b22711fe612cc943da8c5e51788b | [
"MIT"
] | null | null | null | resposta = 'S'
soma = quant = media = maior = menor = 0
while resposta in 'Ss':
n = int(input('Digite um número: '))
soma += n
quant += 1
if quant == 1:
maior = menor = n
else:
if n > maior:
maior = n
elif n < menor:
menor = n
resposta = str(input(... | 30.611111 | 93 | 0.548094 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 156 | 0.280576 |
c472af02ddcb4584d404fd75d6b5093bc3a9b31d | 554 | py | Python | rbc/opening/opening.py | rebuildingcode/hardware | df38d4b955047fdea69dda6b662c56ac301799a2 | [
"BSD-3-Clause"
] | null | null | null | rbc/opening/opening.py | rebuildingcode/hardware | df38d4b955047fdea69dda6b662c56ac301799a2 | [
"BSD-3-Clause"
] | 27 | 2019-09-04T06:29:34.000Z | 2020-04-19T19:41:44.000Z | rbc/opening/opening.py | rebuildingcode/hardware | df38d4b955047fdea69dda6b662c56ac301799a2 | [
"BSD-3-Clause"
] | 2 | 2020-02-28T02:56:31.000Z | 2020-02-28T03:12:07.000Z |
from shapely.geometry import Polygon
from ..point import Point
class Opening(Polygon):
"""
Openings are rectangular only.
"""
def __init__(self, width, height):
self.width = width
self.height = height
points = [
Point(0, 0), Point(0, height), Point(width, height... | 20.518519 | 80 | 0.539711 | 487 | 0.879061 | 0 | 0 | 0 | 0 | 0 | 0 | 142 | 0.256318 |
c47376723d72b33e6ef5ded0c99f0808db10a51e | 4,252 | py | Python | AI/Housing Prices Prediction/HousePricesNN.py | n0rel/self | f9f44af42aa652f9a72279e44ffd8d4387a4bdae | [
"MIT"
] | null | null | null | AI/Housing Prices Prediction/HousePricesNN.py | n0rel/self | f9f44af42aa652f9a72279e44ffd8d4387a4bdae | [
"MIT"
] | null | null | null | AI/Housing Prices Prediction/HousePricesNN.py | n0rel/self | f9f44af42aa652f9a72279e44ffd8d4387a4bdae | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
from sklearn.preprocessing import LabelEncoder, MinMaxScaler
from numpy.random import uniform
import matplotlib.pyplot as plt
def relu(x):
return x * (x > 0)
def relu_deriv(x):
return 1 * (x > 0)
class NeuralNetwork:
"""
Our NN will predict a housing price gi... | 33.480315 | 149 | 0.63476 | 2,302 | 0.541392 | 0 | 0 | 0 | 0 | 0 | 0 | 1,480 | 0.348071 |
c4737a166e262dfedd58077027d802632dac9651 | 7,829 | py | Python | tests/test_export_keyword_template_catalina_10_15_4.py | PabloKohan/osxphotos | 2cf3b6bb674c312240c4b12c5d7b558f15be7c85 | [
"MIT"
] | null | null | null | tests/test_export_keyword_template_catalina_10_15_4.py | PabloKohan/osxphotos | 2cf3b6bb674c312240c4b12c5d7b558f15be7c85 | [
"MIT"
] | null | null | null | tests/test_export_keyword_template_catalina_10_15_4.py | PabloKohan/osxphotos | 2cf3b6bb674c312240c4b12c5d7b558f15be7c85 | [
"MIT"
] | null | null | null | import pytest
from osxphotos._constants import _UNKNOWN_PERSON
PHOTOS_DB = "./tests/Test-10.15.4.photoslibrary/database/photos.db"
TOP_LEVEL_FOLDERS = ["Folder1"]
TOP_LEVEL_CHILDREN = ["SubFolder1", "SubFolder2"]
FOLDER_ALBUM_DICT = {"Folder1": [], "SubFolder1": [], "SubFolder2": ["AlbumInFolder"]}
ALBUM_NAMES = ... | 35.107623 | 107 | 0.606463 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,434 | 0.566356 |
c47490ec669bdd7c9794f49ba2d2ebd89aed558a | 32,808 | py | Python | video_level_models.py | pomonam/youtube-8m | 2d0b9b361785743ec397c6104feb30bb581700e5 | [
"Apache-2.0"
] | 43 | 2018-10-03T13:29:45.000Z | 2020-10-12T09:33:44.000Z | video_level_models.py | pomonam/LearnablePoolingMethodsForVideoClassification | 2d0b9b361785743ec397c6104feb30bb581700e5 | [
"Apache-2.0"
] | 1 | 2018-10-01T01:50:56.000Z | 2019-01-07T17:53:37.000Z | video_level_models.py | pomonam/LearnablePoolingMethodsForVideoClassification | 2d0b9b361785743ec397c6104feb30bb581700e5 | [
"Apache-2.0"
] | 3 | 2018-11-20T14:43:17.000Z | 2019-07-26T13:25:14.000Z | # Copyright 2018 Deep Topology All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 43.802403 | 119 | 0.596745 | 31,214 | 0.951414 | 0 | 0 | 0 | 0 | 0 | 0 | 9,976 | 0.304072 |
c474a170eb0e1f1c4fbbb4250190b02bde10d265 | 4,537 | py | Python | tests/test_refinement.py | qfardet/Pandora2D | 9b36d29a199f2acc67499d22b796c7dd6867bc5f | [
"Apache-2.0"
] | 4 | 2022-02-09T10:07:03.000Z | 2022-03-08T05:16:30.000Z | tests/test_refinement.py | qfardet/Pandora2D | 9b36d29a199f2acc67499d22b796c7dd6867bc5f | [
"Apache-2.0"
] | null | null | null | tests/test_refinement.py | qfardet/Pandora2D | 9b36d29a199f2acc67499d22b796c7dd6867bc5f | [
"Apache-2.0"
] | 4 | 2022-02-03T09:21:28.000Z | 2022-03-25T07:32:13.000Z | #!/usr/bin/env python
# coding: utf8
#
# Copyright (c) 2021 Centre National d'Etudes Spatiales (CNES).
#
# This file is part of PANDORA2D
#
# https://github.com/CNES/Pandora2D
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You... | 32.407143 | 120 | 0.60745 | 3,664 | 0.807582 | 0 | 0 | 3,528 | 0.777606 | 0 | 0 | 1,535 | 0.338329 |
c474f216680e6a9b4d600c4b0a1221fea638bba3 | 9,353 | py | Python | goblet/tests/test_scheduler.py | Aaron-Gill/goblet | 30c0dd73b2f39e443adb2ccda6f9009e980c53ee | [
"Apache-2.0"
] | null | null | null | goblet/tests/test_scheduler.py | Aaron-Gill/goblet | 30c0dd73b2f39e443adb2ccda6f9009e980c53ee | [
"Apache-2.0"
] | null | null | null | goblet/tests/test_scheduler.py | Aaron-Gill/goblet | 30c0dd73b2f39e443adb2ccda6f9009e980c53ee | [
"Apache-2.0"
] | null | null | null | from unittest.mock import Mock
from goblet import Goblet
from goblet.resources.scheduler import Scheduler
from goblet.test_utils import (
get_responses,
get_response,
mock_dummy_function,
dummy_function,
)
class TestScheduler:
def test_add_schedule(self, monkeypatch):
app = Goblet(function... | 36.678431 | 101 | 0.5626 | 9,128 | 0.975944 | 0 | 0 | 0 | 0 | 0 | 0 | 3,303 | 0.353149 |
c475cdfc5c22b9c5d0eee35b59b44abcb5b1b364 | 1,027 | py | Python | arachnado/rpc/sites.py | wigginzz/arachnado | 8de92625262958e886263b4ccb189f4fc62d7400 | [
"MIT"
] | 2 | 2017-12-26T14:50:14.000Z | 2018-06-12T07:04:08.000Z | arachnado/rpc/sites.py | wigginzz/arachnado | 8de92625262958e886263b4ccb189f4fc62d7400 | [
"MIT"
] | null | null | null | arachnado/rpc/sites.py | wigginzz/arachnado | 8de92625262958e886263b4ccb189f4fc62d7400 | [
"MIT"
] | null | null | null | import logging
from functools import partial
from arachnado.storages.mongotail import MongoTailStorage
class Sites(object):
""" 'Known sites' object exposed via JSON-RPC """
logger = logging.getLogger(__name__)
def __init__(self, handler, site_storage, **kwargs):
self.handler = handler
s... | 26.333333 | 64 | 0.650438 | 920 | 0.895813 | 0 | 0 | 0 | 0 | 0 | 0 | 83 | 0.080818 |
c476f31483a0cfb0e93a77ded50e7c656f3f727f | 16,628 | py | Python | src/players.py | deacona/the-ball-is-round | 8e91a72084d13d754deb82e4852fa37a86a77084 | [
"MIT"
] | null | null | null | src/players.py | deacona/the-ball-is-round | 8e91a72084d13d754deb82e4852fa37a86a77084 | [
"MIT"
] | null | null | null | src/players.py | deacona/the-ball-is-round | 8e91a72084d13d754deb82e4852fa37a86a77084 | [
"MIT"
] | null | null | null | """players module.
Used for players data processes
"""
import numpy as np
import pandas as pd
import src.config as config
import src.utilities as utilities
from src.utilities import logging
pd.set_option("display.max_columns", 500)
pd.set_option("display.expand_frame_repr", False)
# master_file = config.MASTER_FILE... | 31.793499 | 580 | 0.53446 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10,830 | 0.651272 |
c47739874e06f42c7eb96ea82d6382fed8af2e9d | 2,035 | py | Python | Z_ALL_FILE/Py/code_qry.py | omikabir/omEngin | b8c04a5c2c12ffc3d0b67c2ceba9e5741d3f9195 | [
"Apache-2.0"
] | null | null | null | Z_ALL_FILE/Py/code_qry.py | omikabir/omEngin | b8c04a5c2c12ffc3d0b67c2ceba9e5741d3f9195 | [
"Apache-2.0"
] | null | null | null | Z_ALL_FILE/Py/code_qry.py | omikabir/omEngin | b8c04a5c2c12ffc3d0b67c2ceba9e5741d3f9195 | [
"Apache-2.0"
] | 1 | 2021-04-29T21:46:02.000Z | 2021-04-29T21:46:02.000Z | import pandas as pd
import os
#opt = itertools.islice(ls, len(ls))
#st = map(lambda x : )
def parsecode(txt):
df = pd.read_csv(os.getcwd() + '\\OMDB.csv')
ls = df['Code'].to_list()
code = []
q = 0
for i in range(len(ls)):
text = txt
if ls[i] in text:
n = text.find(ls[... | 28.263889 | 200 | 0.456511 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 455 | 0.223587 |
c478a3bd10411c7f1ec8a901267dc3442748c724 | 1,463 | py | Python | eats/tests/common/base_test_setup.py | Etiqa/eats | 8c8e2da93d0014f6fbb208185712c5526dba1174 | [
"BSD-2-Clause"
] | null | null | null | eats/tests/common/base_test_setup.py | Etiqa/eats | 8c8e2da93d0014f6fbb208185712c5526dba1174 | [
"BSD-2-Clause"
] | 5 | 2021-03-18T21:34:44.000Z | 2022-03-11T23:35:23.000Z | eats/tests/common/base_test_setup.py | Etiqa/eats | 8c8e2da93d0014f6fbb208185712c5526dba1174 | [
"BSD-2-Clause"
] | null | null | null | import socket
import unittest
from eats.webdriver import PytractorWebDriver
from eats.tests.common import SimpleWebServerProcess as SimpleServer
def _get_local_ip_addr():
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect(("gmail.com",80))
local_ip_addr = s.getsockname()[0]
s.close()
re... | 30.479167 | 93 | 0.663705 | 1,119 | 0.764867 | 0 | 0 | 167 | 0.114149 | 0 | 0 | 166 | 0.113465 |
c47907817d94beb66a4ec9f0e248f596065c0464 | 231 | py | Python | autoprep/service/sqlite_project_service.py | haginot/auto-prep | b1de3eceba5b82432e7042e7e62270df467ed828 | [
"Apache-2.0"
] | null | null | null | autoprep/service/sqlite_project_service.py | haginot/auto-prep | b1de3eceba5b82432e7042e7e62270df467ed828 | [
"Apache-2.0"
] | 4 | 2019-01-15T01:55:46.000Z | 2019-02-21T04:15:25.000Z | autoprep/service/sqlite_project_service.py | haginot/auto-prep | b1de3eceba5b82432e7042e7e62270df467ed828 | [
"Apache-2.0"
] | null | null | null | from autoprep.service.project_service import ProjectService
class SQLiteProjectService(ProjectService):
def get_projects(self):
pass
def get_project(self):
pass
def save_project(self):
pass
| 16.5 | 59 | 0.69697 | 168 | 0.727273 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c479ce0c9f3fb47a8ec7bf6ff4db304b73d1a05c | 2,262 | py | Python | p1_navigation/model.py | Alexandr0s93/deep-reinforcement-learning | 02a508d25d2ba3c76c76a8410b3ae27f0d14e13f | [
"MIT"
] | null | null | null | p1_navigation/model.py | Alexandr0s93/deep-reinforcement-learning | 02a508d25d2ba3c76c76a8410b3ae27f0d14e13f | [
"MIT"
] | null | null | null | p1_navigation/model.py | Alexandr0s93/deep-reinforcement-learning | 02a508d25d2ba3c76c76a8410b3ae27f0d14e13f | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
class QNetwork(nn.Module):
"""Actor (Policy) Model using a Single DQN."""
def __init__(self, state_size, action_size, seed):
"""Initialize parameters and build model.
Params
======
state_size (int): Dimension of each state
acti... | 30.16 | 63 | 0.545977 | 2,219 | 0.98099 | 0 | 0 | 0 | 0 | 0 | 0 | 757 | 0.33466 |
c479cee1b61267e6a98fae5c6efa9dd6f54fec33 | 74 | py | Python | const.py | TakosukeGH/pmx_bone_importer | 412cc066867cb0e0fd889101630277f9f9ba3a6a | [
"MIT"
] | null | null | null | const.py | TakosukeGH/pmx_bone_importer | 412cc066867cb0e0fd889101630277f9f9ba3a6a | [
"MIT"
] | null | null | null | const.py | TakosukeGH/pmx_bone_importer | 412cc066867cb0e0fd889101630277f9f9ba3a6a | [
"MIT"
] | 1 | 2019-10-05T01:18:54.000Z | 2019-10-05T01:18:54.000Z | ADDON_NAME = "pmx_bone_importer"
LOG_FILE_NAME = "pmx_bone_importer.log"
| 18.5 | 39 | 0.810811 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 42 | 0.567568 |
c47bf0eadf4438f1d2983cdc88c09d3954cd62d8 | 17,789 | py | Python | pox/lib/interfaceio/__init__.py | korrigans84/pox_network | cd58d95d97c94b3d139bc2026fd1be0a30987911 | [
"Apache-2.0"
] | 416 | 2015-01-05T18:16:36.000Z | 2022-03-28T21:44:26.000Z | pox/lib/interfaceio/__init__.py | korrigans84/pox_network | cd58d95d97c94b3d139bc2026fd1be0a30987911 | [
"Apache-2.0"
] | 140 | 2015-01-18T23:32:34.000Z | 2022-03-17T05:40:24.000Z | pox/lib/interfaceio/__init__.py | korrigans84/pox_network | cd58d95d97c94b3d139bc2026fd1be0a30987911 | [
"Apache-2.0"
] | 344 | 2015-01-08T06:44:23.000Z | 2022-03-26T04:06:27.000Z | # Copyright 2017 James McCauley
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 27.034954 | 78 | 0.652426 | 15,027 | 0.844736 | 0 | 0 | 4,902 | 0.275564 | 0 | 0 | 3,910 | 0.219799 |
c47c240782affe27a9180c58c326bd1012c03ca6 | 5,754 | py | Python | icarus_simulator/strategies/atk_geo_constraint/geo_constr_strat.py | RubenFr/ICARUS-framework | e57a1f50c3bb9522b2a279fee6b625628afd056f | [
"MIT"
] | 5 | 2021-08-31T08:07:41.000Z | 2022-01-04T02:09:25.000Z | icarus_simulator/strategies/atk_geo_constraint/geo_constr_strat.py | RubenFr/ICARUS-framework | e57a1f50c3bb9522b2a279fee6b625628afd056f | [
"MIT"
] | 3 | 2021-09-23T09:06:35.000Z | 2021-12-08T04:53:01.000Z | icarus_simulator/strategies/atk_geo_constraint/geo_constr_strat.py | RubenFr/ICARUS-framework | e57a1f50c3bb9522b2a279fee6b625628afd056f | [
"MIT"
] | 2 | 2022-01-19T17:50:56.000Z | 2022-03-06T18:59:41.000Z | # 2020 Tommaso Ciussani and Giacomo Giuliari
import os
import json
import numpy as np
from typing import Set, List
from geopy.distance import great_circle
from scipy.spatial.ckdtree import cKDTree
from shapely.geometry import Polygon, shape, Point
from icarus_simulator.sat_core.coordinate_util import geo2cart
from i... | 38.36 | 115 | 0.616093 | 656 | 0.114008 | 0 | 0 | 146 | 0.025374 | 0 | 0 | 1,395 | 0.24244 |
c47c8df17ea394b09ef2defebfcd36f91bad20ef | 8,861 | py | Python | grafeas/models/deployable_deployment_details.py | nyc/client-python | e73eab8953abf239305080673f7c96a54b776f72 | [
"Apache-2.0"
] | null | null | null | grafeas/models/deployable_deployment_details.py | nyc/client-python | e73eab8953abf239305080673f7c96a54b776f72 | [
"Apache-2.0"
] | null | null | null | grafeas/models/deployable_deployment_details.py | nyc/client-python | e73eab8953abf239305080673f7c96a54b776f72 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Grafeas API
An API to insert and retrieve annotations on cloud artifacts. # noqa: E501
OpenAPI spec version: v1alpha1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from grafeas.models.deployment_deta... | 31.091228 | 153 | 0.623632 | 8,473 | 0.956213 | 0 | 0 | 5,003 | 0.564609 | 0 | 0 | 5,055 | 0.570477 |
c47e515541dd250050db71c9315d649403e7ce2b | 1,575 | py | Python | lib/python/test/test_trans.py | qxo/cat | 08170af3c8e2ae3724036833d67312964721c99b | [
"Apache-2.0"
] | 5 | 2018-12-13T17:46:39.000Z | 2022-03-29T02:07:47.000Z | lib/python/test/test_trans.py | qxo/cat | 08170af3c8e2ae3724036833d67312964721c99b | [
"Apache-2.0"
] | 42 | 2019-12-08T18:41:13.000Z | 2021-08-28T13:08:55.000Z | lib/python/test/test_trans.py | qxo/cat | 08170af3c8e2ae3724036833d67312964721c99b | [
"Apache-2.0"
] | 8 | 2018-12-25T04:19:01.000Z | 2021-03-24T17:02:44.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: stdrickforce (Tengyuan Fan)
# Email: <[email protected]> <[email protected]>
import cat
import time
def ignore_exception(func):
def wraps(*args, **kwargs):
try:
return func(*args, **kwargs)
except Exception:
... | 22.183099 | 64 | 0.572698 | 0 | 0 | 0 | 0 | 158 | 0.100317 | 0 | 0 | 429 | 0.272381 |
c47eb0be6f206f7a309aab7d8baf760825081212 | 19,781 | py | Python | src/ui/ui_hw_recovery_wdg.py | frosted97/dash-masternode-tool | d824740309ab878d745e41d39f274e952111542f | [
"MIT"
] | 75 | 2017-03-20T06:33:14.000Z | 2022-02-15T16:16:45.000Z | src/ui/ui_hw_recovery_wdg.py | frosted97/dash-masternode-tool | d824740309ab878d745e41d39f274e952111542f | [
"MIT"
] | 42 | 2017-10-25T06:34:54.000Z | 2022-02-10T20:53:46.000Z | src/ui/ui_hw_recovery_wdg.py | frosted97/dash-masternode-tool | d824740309ab878d745e41d39f274e952111542f | [
"MIT"
] | 98 | 2017-03-20T05:27:36.000Z | 2022-03-20T05:03:08.000Z | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file ui_hw_recovery_wdg.ui
#
# Created by: PyQt5 UI code generator
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, Qt... | 64.016181 | 222 | 0.745008 | 19,443 | 0.982913 | 0 | 0 | 0 | 0 | 0 | 0 | 2,711 | 0.137051 |
c47ed8028e53c0742399199be9ea4ca791d59010 | 1,108 | py | Python | datahandler/analyser.py | ameliecordier/IIK | 57b40d6b851a1c2369604049d1820e5b572c6227 | [
"MIT"
] | null | null | null | datahandler/analyser.py | ameliecordier/IIK | 57b40d6b851a1c2369604049d1820e5b572c6227 | [
"MIT"
] | null | null | null | datahandler/analyser.py | ameliecordier/IIK | 57b40d6b851a1c2369604049d1820e5b572c6227 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import csv
from matplotlib import pyplot as plt
from matplotlib.backends.backend_pdf import PdfPages
def isValid(p, ep):
return p in ep.patterns
# CLASS ANALYSER
class Analyser:
"""
Représentation d'un résultat d'analyse
"""
def __init__(self):
"""
:para... | 25.181818 | 104 | 0.598375 | 921 | 0.82453 | 0 | 0 | 0 | 0 | 0 | 0 | 484 | 0.433303 |
c47ef70151ad606b1f9596045a1960c4c4dec6a6 | 1,948 | py | Python | binary_trees/next_right.py | xxaxdxcxx/miscellaneous-code | cdb88783f39e1b9a89fdb12f7cddfe62619e4357 | [
"MIT"
] | null | null | null | binary_trees/next_right.py | xxaxdxcxx/miscellaneous-code | cdb88783f39e1b9a89fdb12f7cddfe62619e4357 | [
"MIT"
] | null | null | null | binary_trees/next_right.py | xxaxdxcxx/miscellaneous-code | cdb88783f39e1b9a89fdb12f7cddfe62619e4357 | [
"MIT"
] | null | null | null | # Definition for binary tree with next pointer.
class TreeLinkNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
self.next = None
class Solution:
# @param root, a tree link node
# @return nothing
def connect(self, root):
node = root
... | 31.419355 | 63 | 0.464579 | 1,896 | 0.973306 | 0 | 0 | 0 | 0 | 0 | 0 | 353 | 0.181211 |
c47f26765a0cb339776a2ad95fc385826831ad79 | 982 | py | Python | 6.all_species/species_data/merge_species_data.py | oaxiom/episcan | b6616536d621ff02b92a7678f80b5bfbd38c6dc8 | [
"MIT"
] | null | null | null | 6.all_species/species_data/merge_species_data.py | oaxiom/episcan | b6616536d621ff02b92a7678f80b5bfbd38c6dc8 | [
"MIT"
] | null | null | null | 6.all_species/species_data/merge_species_data.py | oaxiom/episcan | b6616536d621ff02b92a7678f80b5bfbd38c6dc8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys, os, glob
from glbase3 import *
all_species = glload('species_annotations/species.glb')
newl = []
for file in glob.glob('pep_counts/*.txt'):
oh = open(file, 'rt')
count = int(oh.readline().split()[0])
oh.close()
species_name = os.path.split(file)[1].split('.')[0].l... | 25.179487 | 97 | 0.701629 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 290 | 0.295316 |
c481812f6f75096a79bbca57dd3f97e48ea22078 | 3,845 | py | Python | modules/lex_managers/lex_intent_manager.py | adamhamden/lex-bot | 3c21b8d60607950c707b97ff5ba8491d40e31592 | [
"MIT"
] | null | null | null | modules/lex_managers/lex_intent_manager.py | adamhamden/lex-bot | 3c21b8d60607950c707b97ff5ba8491d40e31592 | [
"MIT"
] | null | null | null | modules/lex_managers/lex_intent_manager.py | adamhamden/lex-bot | 3c21b8d60607950c707b97ff5ba8491d40e31592 | [
"MIT"
] | null | null | null | import boto3
from prettytable import PrettyTable
class LexIntentManager:
def __init__(self):
self.client = boto3.client('lex-models')
def create_new_intent(self, intent_name, description="n/a", sample_utterances=[], slot_types=[]):
intent_info = {'name': intent_name,
... | 39.639175 | 129 | 0.490507 | 3,792 | 0.986216 | 0 | 0 | 2,255 | 0.586476 | 0 | 0 | 783 | 0.203641 |
c4819144b63cb938bdc3a631c3adcbd846e22f52 | 80 | py | Python | src/__init__.py | Victorpc98/CE888-Project | 99c20adc78eb53ac4d3c87543ef8da1ef4d10adc | [
"MIT"
] | 1 | 2020-04-18T21:03:28.000Z | 2020-04-18T21:03:28.000Z | src/__init__.py | Victorpc98/CE888-Project | 99c20adc78eb53ac4d3c87543ef8da1ef4d10adc | [
"MIT"
] | null | null | null | src/__init__.py | Victorpc98/CE888-Project | 99c20adc78eb53ac4d3c87543ef8da1ef4d10adc | [
"MIT"
] | null | null | null | import sys
sys.path.append("..") # Adds higher directory to python modules path. | 40 | 69 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 51 | 0.6375 |
c4821b9a95d728a178a666ea50065578f645972b | 7,025 | py | Python | wxtbx/wx4_compatibility.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | 155 | 2016-11-23T12:52:16.000Z | 2022-03-31T15:35:44.000Z | wxtbx/wx4_compatibility.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | 590 | 2016-12-10T11:31:18.000Z | 2022-03-30T23:10:09.000Z | wxtbx/wx4_compatibility.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | 115 | 2016-11-15T08:17:28.000Z | 2022-02-09T15:30:14.000Z | from __future__ import absolute_import, division, print_function
'''
Author : Lyubimov, A.Y.
Created : 04/14/2014
Last Changed: 11/05/2018
Description : wxPython 3-4 compatibility tools
The context managers, classes, and other tools below can be used to make the
GUI code compatible with wxPython 3 and 4. Mos... | 32.981221 | 96 | 0.691103 | 1,841 | 0.262064 | 588 | 0.083701 | 700 | 0.099644 | 0 | 0 | 2,739 | 0.389893 |
c483b92cbfbdabe1b45008c539e6179a5bd43a9f | 1,548 | py | Python | BMVC_version/utils.py | ZhengyuZhao/ACE | 5065cde807fe689115849c55d440783d8a471901 | [
"MIT"
] | 19 | 2020-05-13T07:51:00.000Z | 2021-06-13T11:03:47.000Z | BMVC_version/utils.py | ZhengyuZhao/AdvCF | 5065cde807fe689115849c55d440783d8a471901 | [
"MIT"
] | 1 | 2020-09-09T09:39:28.000Z | 2020-09-10T20:30:02.000Z | BMVC_version/utils.py | ZhengyuZhao/AdvCF | 5065cde807fe689115849c55d440783d8a471901 | [
"MIT"
] | 3 | 2020-09-05T11:32:23.000Z | 2021-03-30T01:41:07.000Z | import torch
import torch.nn as nn
import csv
#image quantization
def quantization(x):
x_quan=torch.round(x*255)/255
return x_quan
#picecwise-linear color filter
def CF(img, param,pieces):
param=param[:,:,None,None]
color_curve_sum = torch.sum(param, 4) + 1e-30
total_image = img * 0
f... | 29.769231 | 99 | 0.660207 | 306 | 0.197674 | 0 | 0 | 0 | 0 | 0 | 0 | 278 | 0.179587 |
c4844ed8e45f32c88606465081cf2391a8999d1d | 4,849 | py | Python | lemonpie/_nbdev.py | corazonlabs/ehr_preprocessing | 5bf3be1f04d9dc6db002b58331800b30cf668e69 | [
"Apache-2.0"
] | 3 | 2021-04-03T01:16:18.000Z | 2021-07-31T20:44:47.000Z | lemonpie/_nbdev.py | corazonlabs/ehr_preprocessing | 5bf3be1f04d9dc6db002b58331800b30cf668e69 | [
"Apache-2.0"
] | 5 | 2021-03-30T21:23:47.000Z | 2022-02-26T10:17:12.000Z | lemonpie/_nbdev.py | vin00d/lemonpie | 5bf3be1f04d9dc6db002b58331800b30cf668e69 | [
"Apache-2.0"
] | 1 | 2020-11-26T00:35:28.000Z | 2020-11-26T00:35:28.000Z | # AUTOGENERATED BY NBDEV! DO NOT EDIT!
__all__ = ["index", "modules", "custom_doc_links", "git_url"]
index = {"get_device": "00_basics.ipynb",
"settings_template": "00_basics.ipynb",
"read_settings": "00_basics.ipynb",
"DEVICE": "00_basics.ipynb",
"settings": "00_basics.ipynb",
... | 44.486239 | 70 | 0.630852 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,500 | 0.721798 |
c4847cc6bababbdf22257962d4c32b15d776c5ed | 8,277 | py | Python | tensorboard/plugins/graph_edit/c2graph_util.py | qzhong0605/tensorboardplugins | 92bfc7ca96b933cdbdf074a08f26f5c715d8421d | [
"Apache-2.0"
] | null | null | null | tensorboard/plugins/graph_edit/c2graph_util.py | qzhong0605/tensorboardplugins | 92bfc7ca96b933cdbdf074a08f26f5c715d8421d | [
"Apache-2.0"
] | null | null | null | tensorboard/plugins/graph_edit/c2graph_util.py | qzhong0605/tensorboardplugins | 92bfc7ca96b933cdbdf074a08f26f5c715d8421d | [
"Apache-2.0"
] | null | null | null | # Convert the caffe2 model into tensorboard GraphDef
#
# The details of caffe2 model is on the compat/proto/caffe2/caffe2.proto
# And the details of GraphDef model is on the compat/proto/graph.proto
#
################################################################################
from tensorboard.compat.proto import ... | 44.5 | 106 | 0.618461 | 7,467 | 0.902138 | 0 | 0 | 0 | 0 | 0 | 0 | 2,241 | 0.27075 |
c4852e08624ac34e2478471564d3403491679e03 | 1,251 | py | Python | src/Homework2_1.py | alexaquino/TUM-AUTONAVx | 95c6829fa2e31e1a11bf2c7726386593e7adbdce | [
"MIT"
] | null | null | null | src/Homework2_1.py | alexaquino/TUM-AUTONAVx | 95c6829fa2e31e1a11bf2c7726386593e7adbdce | [
"MIT"
] | null | null | null | src/Homework2_1.py | alexaquino/TUM-AUTONAVx | 95c6829fa2e31e1a11bf2c7726386593e7adbdce | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# The MIT License (MIT)
# Copyright (c) 2014 Alex Aquino dos Santos
# Technische Universität München (TUM)
# Autonomous Navigation for Flying Robots
# Homework 2.1
from plot import plot
class UserCode:
def __init__(self):
# initialize data you want to store in this object between c... | 34.75 | 109 | 0.686651 | 1,038 | 0.828412 | 0 | 0 | 0 | 0 | 0 | 0 | 542 | 0.432562 |
c4855377edb8f2377a14569ead5ae6f4b477315f | 1,651 | py | Python | src_tf/templates/tf_estimator_template/model/example.py | ashishpatel26/finch | bf2958c0f268575e5d51ad08fbc08b151cbea962 | [
"MIT"
] | 1 | 2019-02-12T09:22:00.000Z | 2019-02-12T09:22:00.000Z | src_tf/templates/tf_estimator_template/model/example.py | loopzxl/finch | bf2958c0f268575e5d51ad08fbc08b151cbea962 | [
"MIT"
] | null | null | null | src_tf/templates/tf_estimator_template/model/example.py | loopzxl/finch | bf2958c0f268575e5d51ad08fbc08b151cbea962 | [
"MIT"
] | 1 | 2020-10-15T21:34:17.000Z | 2020-10-15T21:34:17.000Z | from configs import args
import tensorflow as tf
def forward(x, mode):
is_training = (mode == tf.estimator.ModeKeys.TRAIN)
x = tf.contrib.layers.embed_sequence(x, args.vocab_size, args.embed_dim)
x = tf.layers.dropout(x, 0.2, training=is_training)
feat_map = []
for k_size in [3, 4, 5]:
_... | 34.395833 | 80 | 0.637795 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 0.029679 |
c485ee350fbe503865765122e5205b0c6d84fd8d | 1,300 | py | Python | {{cookiecutter.project_slug}}/core/management/commands/snippets/fastapi_project/core/security.py | claysllanxavier/django-cookiecutter | 97de7ff4ed3dc94c32bf756a57aee0664a888cbc | [
"BSD-3-Clause"
] | 8 | 2021-08-13T17:48:27.000Z | 2022-02-22T02:34:15.000Z | {{cookiecutter.project_slug}}/core/management/commands/snippets/fastapi_project/core/security.py | claysllanxavier/django-cookiecutter | 97de7ff4ed3dc94c32bf756a57aee0664a888cbc | [
"BSD-3-Clause"
] | 2 | 2022-03-24T20:39:00.000Z | 2022-03-24T20:39:48.000Z | {{cookiecutter.project_slug}}/core/management/commands/snippets/fastapi_project/core/security.py | claysllanxavier/django-cookiecutter | 97de7ff4ed3dc94c32bf756a57aee0664a888cbc | [
"BSD-3-Clause"
] | 2 | 2021-09-21T00:05:27.000Z | 2022-01-03T10:50:05.000Z | from datetime import datetime, timedelta
from typing import Any, Union
from jose import jwt
from passlib.context import CryptContext
from .config import settings
pwd_context = CryptContext(
default="django_pbkdf2_sha256",
schemes=["django_argon2", "django_bcrypt", "django_bcrypt_sha256",
... | 29.545455 | 81 | 0.713077 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 319 | 0.243511 |
c487c6e672ed0de9246b310bca5ef690e836e2e6 | 10,241 | py | Python | margarita/main.py | w0de/margarita | 50c7c07b8ee3d5d6c801833be7c147533c33fd70 | [
"Unlicense"
] | 3 | 2018-07-27T22:19:02.000Z | 2019-09-06T18:08:58.000Z | margarita/main.py | w0de/margarita | 50c7c07b8ee3d5d6c801833be7c147533c33fd70 | [
"Unlicense"
] | null | null | null | margarita/main.py | w0de/margarita | 50c7c07b8ee3d5d6c801833be7c147533c33fd70 | [
"Unlicense"
] | 1 | 2019-05-21T18:07:46.000Z | 2019-05-21T18:07:46.000Z | #!/usr/bin/env python
from flask import Flask
from flask import jsonify, render_template, redirect
from flask import request, Response
from saml_auth import BaseAuth, SamlAuth
import os, sys
try:
import json
except ImportError:
# couldn't find json, try simplejson library
import simplejson as json
import getopt
fro... | 31.804348 | 128 | 0.721023 | 0 | 0 | 0 | 0 | 6,308 | 0.615955 | 0 | 0 | 3,054 | 0.298213 |
c48919ef78498ed664eb6156c8117a86edb141da | 3,344 | py | Python | python/pato/transport/uart.py | kloper/pato | bfbbee4109227735934f990c5909616a6e8af0b9 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | python/pato/transport/uart.py | kloper/pato | bfbbee4109227735934f990c5909616a6e8af0b9 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | python/pato/transport/uart.py | kloper/pato | bfbbee4109227735934f990c5909616a6e8af0b9 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | # -*- python -*-
"""@file
@brief pyserial transport for pato
Copyright (c) 2014-2015 Dimitry Kloper <[email protected]>.
All rights reserved.
@page License
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistribut... | 34.122449 | 79 | 0.712022 | 1,658 | 0.495813 | 0 | 0 | 0 | 0 | 0 | 0 | 2,707 | 0.80951 |
c489ac681275868dff6ed544c5b85d56c81ef128 | 4,072 | py | Python | PYQT5/Games/RockPapperScissorsGame.py | Amara-Manikanta/Python-GUI | 0356e7cae7f1c51d0781bf431c386ee7262608b1 | [
"MIT"
] | null | null | null | PYQT5/Games/RockPapperScissorsGame.py | Amara-Manikanta/Python-GUI | 0356e7cae7f1c51d0781bf431c386ee7262608b1 | [
"MIT"
] | null | null | null | PYQT5/Games/RockPapperScissorsGame.py | Amara-Manikanta/Python-GUI | 0356e7cae7f1c51d0781bf431c386ee7262608b1 | [
"MIT"
] | null | null | null | import sys
from PyQt5.QtWidgets import *
from PyQt5.QtGui import QFont, QPixmap
from PyQt5.QtCore import QTimer
from random import randint
font = QFont("Times", 14)
buttonFont = QFont("Arial", 12)
computerScore = 0
playerScore = 0
class Windows(QWidget):
def __init__(self):
super().__init__()
sel... | 34.218487 | 116 | 0.590128 | 3,699 | 0.908399 | 0 | 0 | 0 | 0 | 0 | 0 | 619 | 0.152014 |
c489f0bb6aee13c77e0b4caf8c6ecbaa282336f5 | 539 | py | Python | services/neural/traindatabase.py | vitorecomp/hackaton-deep-learn | 962eac133ac92d56d8a55136773c2afe4da2e0b5 | [
"MIT"
] | null | null | null | services/neural/traindatabase.py | vitorecomp/hackaton-deep-learn | 962eac133ac92d56d8a55136773c2afe4da2e0b5 | [
"MIT"
] | null | null | null | services/neural/traindatabase.py | vitorecomp/hackaton-deep-learn | 962eac133ac92d56d8a55136773c2afe4da2e0b5 | [
"MIT"
] | null | null | null | from os import walk
import h5py
import numpy as np
from config.Database import Base
from config.Database import engine
from config.Database import Session
from models.Music import Music
from kmeans.kmeans import Kmeans
mypath = './dataset/datatr/'
def main():
files = []
# 2 - generate database schema
Base.meta... | 15.852941 | 41 | 0.736549 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 85 | 0.157699 |
c48abebb839f713d689a09683874c38aef9511d6 | 1,128 | py | Python | projects/TGS_salt/binary_classifier/model.py | liaopeiyuan/ml-arsenal-public | f8938ce3cb58b35fc7cc20d096c39a85ec9780b2 | [
"Apache-2.0"
] | 280 | 2018-10-21T01:07:18.000Z | 2021-12-30T11:29:48.000Z | projects/TGS_salt/binary_classifier/model.py | liaopeiyuan/ml-arsenal-public | f8938ce3cb58b35fc7cc20d096c39a85ec9780b2 | [
"Apache-2.0"
] | 3 | 2018-11-13T08:04:48.000Z | 2020-04-17T09:20:03.000Z | projects/TGS_salt/binary_classifier/model.py | liaopeiyuan/ml-arsenal-public | f8938ce3cb58b35fc7cc20d096c39a85ec9780b2 | [
"Apache-2.0"
] | 59 | 2018-10-21T04:38:23.000Z | 2021-03-29T07:58:47.000Z | import torch.nn as nn
import pretrainedmodels
class classifier(nn.Module):
def __init__(self, model_name='resnet32'):
super(classifier, self).__init__()
# Load pretrained ImageNet model
self.model = pretrainedmodels.__dict__[model_name](num_classes=1000, pretrained='imagenet')
... | 31.333333 | 109 | 0.60461 | 1,074 | 0.952128 | 0 | 0 | 0 | 0 | 0 | 0 | 160 | 0.141844 |
6700a5bb5f070e2573ae2cc0040f1d1a36a7e4ca | 13,050 | py | Python | code/algorithm/assr.py | ShuhuaGao/bcn_opt_dc | 93234f6b799670bc80daf83794c51841f1a24715 | [
"MIT"
] | null | null | null | code/algorithm/assr.py | ShuhuaGao/bcn_opt_dc | 93234f6b799670bc80daf83794c51841f1a24715 | [
"MIT"
] | null | null | null | code/algorithm/assr.py | ShuhuaGao/bcn_opt_dc | 93234f6b799670bc80daf83794c51841f1a24715 | [
"MIT"
] | null | null | null | """
Given a Boolean function/network, get its algebraic state-space representation.
A logical vector `\delta_n^i` is represented by an integer `i` for space efficiency. Consequently, a logical matrix
is represented by a list, each element for one column, (also known as the "condensed form").
[1] Conversion from an in... | 39.071856 | 144 | 0.604828 | 865 | 0.066284 | 0 | 0 | 0 | 0 | 0 | 0 | 5,316 | 0.407356 |
6701184b0bdf306dd90792d6a104891f22b55364 | 4,953 | py | Python | datasets/voc_dataset.py | ming71/DAL | 48cd29fdbf5eeea1b5b642bd1f04bbf1863b31e3 | [
"Apache-2.0"
] | 206 | 2020-09-12T06:17:00.000Z | 2022-03-28T08:05:51.000Z | datasets/voc_dataset.py | JOOCHANN/DAL | 0f379de70ba01c6c9162f4e980a8bd2491976e9c | [
"Apache-2.0"
] | 47 | 2020-10-21T06:14:18.000Z | 2022-03-16T01:54:28.000Z | datasets/voc_dataset.py | JOOCHANN/DAL | 0f379de70ba01c6c9162f4e980a8bd2491976e9c | [
"Apache-2.0"
] | 38 | 2020-10-22T10:39:51.000Z | 2022-03-17T12:36:46.000Z | # --------------------------------------------------------
# Fast R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick
# Extended by Linjie Deng
# --------------------------------------------------------
import os
import cv2
import numpy as np
import... | 37.240602 | 93 | 0.557238 | 4,484 | 0.90531 | 0 | 0 | 0 | 0 | 0 | 0 | 1,166 | 0.235413 |
67046e56ceee4d6e7815e597ff49d092a5c53d48 | 1,907 | py | Python | neploid.py | GravityI/neploid | 4b68e682fcda97a95d155bea288aa90740842b66 | [
"MIT"
] | null | null | null | neploid.py | GravityI/neploid | 4b68e682fcda97a95d155bea288aa90740842b66 | [
"MIT"
] | null | null | null | neploid.py | GravityI/neploid | 4b68e682fcda97a95d155bea288aa90740842b66 | [
"MIT"
] | null | null | null | import discord
import random
import asyncio
import logging
import urllib.request
from discord.ext import commands
bot = commands.Bot(command_prefix='nep ', description= "Nep Nep")
counter = 0
countTask = None
@bot.event
async def on_ready():
print('Logged in as')
print(bot.user.name)
# print(bot.user.id)
... | 28.893939 | 153 | 0.681699 | 0 | 0 | 0 | 0 | 1,448 | 0.759308 | 1,391 | 0.729418 | 387 | 0.202937 |
6706396f498d795e0d71e25c46fb2f83e80c424d | 1,025 | py | Python | odoo/base-addons/l10n_tr/__manifest__.py | LucasBorges-Santos/docker-odoo | 53987bbd61f6119669b5f801ee2ad54695084a21 | [
"MIT"
] | null | null | null | odoo/base-addons/l10n_tr/__manifest__.py | LucasBorges-Santos/docker-odoo | 53987bbd61f6119669b5f801ee2ad54695084a21 | [
"MIT"
] | null | null | null | odoo/base-addons/l10n_tr/__manifest__.py | LucasBorges-Santos/docker-odoo | 53987bbd61f6119669b5f801ee2ad54695084a21 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Turkey - Accounting',
'version': '1.0',
'category': 'Localization',
'description': """
Türkiye için Tek düzen hesap planı şablonu Odoo Modülü.
==================================================... | 33.064516 | 82 | 0.61561 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 888 | 0.845714 |
6706ffad81c03f382360a4810c2bf16d4cc561bb | 4,364 | py | Python | Source Codes/SMF_Python/smf_main.py | mmaher22/iCV-SBR | 72effab621a9f8f5cee0d584b5a2f0e98524ffd6 | [
"MIT"
] | 20 | 2020-08-25T06:10:14.000Z | 2022-03-27T15:42:55.000Z | Source Codes/SMF_Python/smf_main.py | mmaher22/iCV-SBR | 72effab621a9f8f5cee0d584b5a2f0e98524ffd6 | [
"MIT"
] | null | null | null | Source Codes/SMF_Python/smf_main.py | mmaher22/iCV-SBR | 72effab621a9f8f5cee0d584b5a2f0e98524ffd6 | [
"MIT"
] | 7 | 2020-09-25T15:12:53.000Z | 2022-03-25T15:23:43.000Z | import os
import time
import argparse
import pandas as pd
from smf import SessionMF
parser = argparse.ArgumentParser()
parser.add_argument('--K', type=int, default=20, help="K items to be used in Recall@K and MRR@K")
parser.add_argument('--factors', type=int, default=100, help="Number of latent factors.")
parser.add_a... | 47.956044 | 182 | 0.695921 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,353 | 0.310037 |
6707397442e36941efca1b5ee8ee3696d4dcdf31 | 25,163 | py | Python | sdks/python/appcenter_sdk/models/Device.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/appcenter_sdk/models/Device.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/appcenter_sdk/models/Device.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 2 | 2019-10-23T06:31:05.000Z | 2021-08-21T17:32:47.000Z | # coding: utf-8
"""
App Center Client
Microsoft Visual Studio App Center API # noqa: E501
OpenAPI spec version: preview
Contact: [email protected]
Project Repository: https://github.com/b3nab/appcenter-sdks
"""
import pprint
import re # noqa: F401
import six
class Device(object)... | 32.21895 | 505 | 0.632953 | 24,862 | 0.988038 | 0 | 0 | 17,863 | 0.709892 | 0 | 0 | 14,871 | 0.590987 |
6707b1d92879723bb590b117c8481d4a309bdf74 | 5,591 | py | Python | src/providers/snmp.py | tcuthbert/napi | 12ea1a4fb1075749b40b2d93c3d4ab7fb75db8b5 | [
"MIT"
] | null | null | null | src/providers/snmp.py | tcuthbert/napi | 12ea1a4fb1075749b40b2d93c3d4ab7fb75db8b5 | [
"MIT"
] | null | null | null | src/providers/snmp.py | tcuthbert/napi | 12ea1a4fb1075749b40b2d93c3d4ab7fb75db8b5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# author : Thomas Cuthbert
import os, sys
from providers.provider import Provider
from config.config import Config
sys.path.append('../')
def _reverse_dict(d):
ret = {}
for key, val in d.items():
if ret.has_key(val):
ret[val].append(key)
... | 31.587571 | 137 | 0.603291 | 2,652 | 0.474334 | 893 | 0.159721 | 0 | 0 | 0 | 0 | 1,411 | 0.25237 |