hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5fa93ab13cf8fe87d0ea7523043ad07a4dd38b3c | 5,914 | py | Python | impl/stitchd/tensorflow-pipeline.py | hamersaw/stitch | cb53b4e0706a593bc0a5853618acd9e3abce167e | [
"MIT"
] | null | null | null | impl/stitchd/tensorflow-pipeline.py | hamersaw/stitch | cb53b4e0706a593bc0a5853618acd9e3abce167e | [
"MIT"
] | null | null | null | impl/stitchd/tensorflow-pipeline.py | hamersaw/stitch | cb53b4e0706a593bc0a5853618acd9e3abce167e | [
"MIT"
] | null | null | null | #!/bin/python3
import argparse
import multiprocessing as mp
import numpy as np
from sklearn.preprocessing import LabelEncoder
import socket
import sys
import time
import tensorflow as tf
import traceback
import impute
import serialize
# disable eager mode -> run in graph mode
tf.compat.v1.disable_eager_execution()
... | 30.642487 | 101 | 0.573723 |
0cbd8ac9b39036618b4031e8a9d4c5400bdab5be | 1,551 | py | Python | biothings/web/settings/validators.py | ravila4/biothings.api | 7c03d9abc172fe54697af39d78b96711b2c590a1 | [
"Apache-2.0"
] | null | null | null | biothings/web/settings/validators.py | ravila4/biothings.api | 7c03d9abc172fe54697af39d78b96711b2c590a1 | [
"Apache-2.0"
] | null | null | null | biothings/web/settings/validators.py | ravila4/biothings.api | 7c03d9abc172fe54697af39d78b96711b2c590a1 | [
"Apache-2.0"
] | null | null | null |
class WebAPIValidator():
def validate(self, config):
assert config.API_VERSION or config.API_PREFIX # TODO explain why
class DBParamValidator():
def validate(self, config):
assert isinstance(config.ES_INDICES, dict)
# compatibility settings
if getattr(config, "ES_INDEX",... | 31.653061 | 79 | 0.659574 |
c34674c78545a434f4ea333b615660d70fcf78ee | 2,280 | py | Python | Isite_extractor.py | Lamaw/Newzer | 28874a8f5bc08a142c087461a2e2c408af204913 | [
"MIT"
] | 1 | 2016-06-08T10:24:24.000Z | 2016-06-08T10:24:24.000Z | Isite_extractor.py | Lamaw/Newzer | 28874a8f5bc08a142c087461a2e2c408af204913 | [
"MIT"
] | 2 | 2015-12-11T16:02:28.000Z | 2016-06-06T10:36:26.000Z | Isite_extractor.py | Lamaw/Newzer | 28874a8f5bc08a142c087461a2e2c408af204913 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
This page defines the Interface for a web page analyzer in this app.
It stores top level functions that should be implemented for all websites supported by Newzer
"""
class ISiteExtractor():
"""
This class is the standard interface of a page analyzer, for any website supported by t... | 36.774194 | 100 | 0.651316 |
e0f228f373adfacc6c32368406636c2f4af60814 | 1,204 | py | Python | venv/Lib/site-packages/pybrain3/rl/agents/agent.py | ishatserka/MachineLearningAndDataAnalysisCoursera | e82e772df2f4aec162cb34ac6127df10d14a625a | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pybrain3/rl/agents/agent.py | ishatserka/MachineLearningAndDataAnalysisCoursera | e82e772df2f4aec162cb34ac6127df10d14a625a | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pybrain3/rl/agents/agent.py | ishatserka/MachineLearningAndDataAnalysisCoursera | e82e772df2f4aec162cb34ac6127df10d14a625a | [
"MIT"
] | null | null | null | __author__ = 'Tom Schaul, tom@idsia.ch'
from pybrain3.utilities import abstractMethod, Named
class Agent(Named):
""" An agent is an entity capable of producing actions, based on previous observations.
Generally it will also learn from experience. It can interact directly with a Task.
"""
def... | 35.411765 | 92 | 0.598007 |
c4ae48b923c250a1a461855e7c0c24aa2c7e3cc2 | 4,051 | py | Python | tests/test_couchpotato.py | Konubinix/Flexget | 1379e346370ef144b9a02f761fc187497b6097e2 | [
"MIT"
] | 1 | 2017-08-25T07:17:04.000Z | 2017-08-25T07:17:04.000Z | tests/test_couchpotato.py | Konubinix/Flexget | 1379e346370ef144b9a02f761fc187497b6097e2 | [
"MIT"
] | 1 | 2015-11-10T01:07:54.000Z | 2015-11-10T01:07:54.000Z | tests/test_couchpotato.py | Konubinix/Flexget | 1379e346370ef144b9a02f761fc187497b6097e2 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals, division, absolute_import
import json
import mock
from tests import FlexGetBase
movie_list_file = 'couchpotoato_movie_list_test_response.json'
qualities_profiles_file = 'couchpotoato_quality_profile_test_response.json'
with open(movie_list_file, "r") as data:
movie_list_re... | 40.108911 | 117 | 0.511479 |
135518f5999bda7261b79e8b1607733cfb5fab68 | 1,080 | py | Python | plugins/sentinelone/komand_sentinelone/actions/get_agent_details/action.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 46 | 2019-06-05T20:47:58.000Z | 2022-03-29T10:18:01.000Z | plugins/sentinelone/komand_sentinelone/actions/get_agent_details/action.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 386 | 2019-06-07T20:20:39.000Z | 2022-03-30T17:35:01.000Z | plugins/sentinelone/komand_sentinelone/actions/get_agent_details/action.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 43 | 2019-07-09T14:13:58.000Z | 2022-03-28T12:04:46.000Z | import insightconnect_plugin_runtime
from .schema import GetAgentDetailsInput, GetAgentDetailsOutput, Input, Output, Component
# Custom imports below
class GetAgentDetails(insightconnect_plugin_runtime.Action):
def __init__(self):
super(self.__class__, self).__init__(
name="get_agent_details"... | 31.764706 | 111 | 0.627778 |
7e25e798adf9bdf235ce11efe46fb4eca0573c21 | 1,077 | py | Python | examples/advertising.py | philippmwirth/simple-rec | 34162c52d0be31241620a23d761f941dacaf94eb | [
"MIT"
] | null | null | null | examples/advertising.py | philippmwirth/simple-rec | 34162c52d0be31241620a23d761f941dacaf94eb | [
"MIT"
] | null | null | null | examples/advertising.py | philippmwirth/simple-rec | 34162c52d0be31241620a23d761f941dacaf94eb | [
"MIT"
] | null | null | null | import simple_rec
users = []
items = []
ratings = []
def add_rating(user, item, rating):
"""Adds a (user, activity, rating) triple to the lists.
"""
users.append(user)
items.append(item)
ratings.append(rating)
# say Alice, Bob, and Carol have participated in a
# questionnaire about ice cream
# ... | 27.615385 | 67 | 0.723305 |
9be5e76ce1a56b371cffefeda2418401c92936c9 | 191 | py | Python | videos/067_you_should_put_this_in_all_your_python_scripts/if_name_main_pkg/bad_script.py | matthewstidham/VideosSampleCode | 122edfbf5a805930bb031dad584e79a6c487ba7a | [
"MIT"
] | 285 | 2021-02-16T21:08:57.000Z | 2022-03-31T10:58:41.000Z | videos/067_you_should_put_this_in_all_your_python_scripts/if_name_main_pkg/bad_script.py | hDmtP/VideosSampleCode | 46a898b5523dfed303af31be3e488e2d277c2ef8 | [
"MIT"
] | 10 | 2021-05-01T17:20:50.000Z | 2022-03-09T21:46:46.000Z | videos/067_you_should_put_this_in_all_your_python_scripts/if_name_main_pkg/bad_script.py | hDmtP/VideosSampleCode | 46a898b5523dfed303af31be3e488e2d277c2ef8 | [
"MIT"
] | 96 | 2021-02-15T14:23:15.000Z | 2022-03-31T10:58:50.000Z | print(f"imported bad script")
def useful_function(x):
return x * x
class UsefulClass:
def __init__(self, x):
self.x = x
for i in range(7):
print(useful_function(i))
| 12.733333 | 29 | 0.633508 |
51fa019d209161cecd32b7b8a410e53ac1274f7e | 241 | py | Python | ships/Battleship.py | Tafe20049646/battleships | cdef7571029fcd27ba70fb04cc1a029569701421 | [
"MIT"
] | null | null | null | ships/Battleship.py | Tafe20049646/battleships | cdef7571029fcd27ba70fb04cc1a029569701421 | [
"MIT"
] | null | null | null | ships/Battleship.py | Tafe20049646/battleships | cdef7571029fcd27ba70fb04cc1a029569701421 | [
"MIT"
] | null | null | null | from ships.Ships import Ships
class Battleship(Ships):
def __init__(self):
super().__init__()
self.name = 'Battleship'
self.shape = 4
# def set_position(self, position):
# self.position = position
| 18.538462 | 39 | 0.614108 |
eb6485be6b53bc6521af2e370f5182cbde0b43cd | 987 | py | Python | script.module.metahandler/lib/metahandler/common.py | bobbybark/tantrumrepo | 1451c481254d3fedec9f430139d18db7312a9b1a | [
"Beerware"
] | 3 | 2020-03-03T13:21:44.000Z | 2021-07-21T09:53:31.000Z | script.module.metahandler/lib/metahandler/common.py | parser4life/tantrumrepo | 3b37145f4772409e538cbddb0b7aa23be525772a | [
"Beerware"
] | null | null | null | script.module.metahandler/lib/metahandler/common.py | parser4life/tantrumrepo | 3b37145f4772409e538cbddb0b7aa23be525772a | [
"Beerware"
] | 2 | 2020-04-01T22:11:12.000Z | 2020-05-07T23:54:52.000Z | """
metahandler XBMC Addon
Copyright (C) 2012 Eldorado
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
... | 36.555556 | 73 | 0.742655 |
bf5f5b9d7b8ed0de3d55e41e5e137e00b21d9815 | 3,754 | py | Python | calculate_ML_score.py | mergenhan/tfsec | 1071e08d11d8d5cf24d44a7d04b2d18d1f900f82 | [
"MIT"
] | null | null | null | calculate_ML_score.py | mergenhan/tfsec | 1071e08d11d8d5cf24d44a7d04b2d18d1f900f82 | [
"MIT"
] | null | null | null | calculate_ML_score.py | mergenhan/tfsec | 1071e08d11d8d5cf24d44a7d04b2d18d1f900f82 | [
"MIT"
] | null | null | null | import pandas as pd
from sklearn.naive_bayes import GaussianNB
from sklearn.feature_extraction.text import TfidfVectorizer
list=[]
conf=input("enter configuration:\n")
#conf="Unencrypted SQ queue"
data = pd.read_csv("sample_dataset.csv", engine='python')
sentences_training = [doc for doc in data.iloc[:,0]]
classifica... | 37.168317 | 72 | 0.752531 |
55921621001e0d5c2416a0342715735cac67a5e9 | 8,386 | py | Python | agent/estimator/estimator_examples_standalone/Estimator1.py | intelligent-control-lab/Composable_Agent_Toolbox | 39d71cdc0475ae6901cb30b63d181737bea35889 | [
"MIT"
] | 4 | 2020-10-20T14:30:09.000Z | 2022-02-19T23:46:04.000Z | agent/estimator/estimator_examples_standalone/Estimator1.py | intelligent-control-lab/Composable_Agent_Toolbox | 39d71cdc0475ae6901cb30b63d181737bea35889 | [
"MIT"
] | null | null | null | agent/estimator/estimator_examples_standalone/Estimator1.py | intelligent-control-lab/Composable_Agent_Toolbox | 39d71cdc0475ae6901cb30b63d181737bea35889 | [
"MIT"
] | 1 | 2022-03-12T10:46:38.000Z | 2022-03-12T10:46:38.000Z | import math
import numpy as np
from abc import ABCMeta, abstractmethod
class Estimator_Base():
__metaclass__ = ABCMeta
estimator_name = ''
estimator_type = '' # EKF,UKF,RLS etc.
@abstractmethod
def __init__(self):
pass
@abstractmethod
def estimate(self):
'''
This function calculates the next state e... | 37.4375 | 160 | 0.605056 |
27a7de0bd291cd05b0f57b0f27f57f706f08892c | 2,069 | py | Python | conanfile.py | olivia76/cpp-sas7bdat | 1cd22561a13ee3df6bcec0b057f928de2014b81f | [
"Apache-2.0"
] | 4 | 2021-12-23T13:24:03.000Z | 2022-02-24T10:20:12.000Z | conanfile.py | olivia76/cpp-sas7bdat | 1cd22561a13ee3df6bcec0b057f928de2014b81f | [
"Apache-2.0"
] | 6 | 2022-02-23T14:05:53.000Z | 2022-03-17T13:47:46.000Z | conanfile.py | olivia76/cpp-sas7bdat | 1cd22561a13ee3df6bcec0b057f928de2014b81f | [
"Apache-2.0"
] | null | null | null | from conans import ConanFile
class CppSAS7BDATProject(ConanFile):
name = "CppSAS7BDAT"
version = "1.0"
requires = (
"catch2/2.13.6",
"docopt.cpp/0.6.3",
"fmt/8.0.1",
"spdlog/1.9.2",
"boost/1.71.0",
"nlohmann_json/3.10.4"
)
generators = "cmake", "gcc",... | 39.788462 | 60 | 0.636539 |
9163669b1c1088952bd5315686f27c3853558488 | 72,101 | py | Python | python/Lib/test/test_urllib.py | jasam/ciclo_vida_datos_scraping | 3f7cffc944a0a0752a502dc7868cf43c4144f16c | [
"MIT"
] | null | null | null | python/Lib/test/test_urllib.py | jasam/ciclo_vida_datos_scraping | 3f7cffc944a0a0752a502dc7868cf43c4144f16c | [
"MIT"
] | null | null | null | python/Lib/test/test_urllib.py | jasam/ciclo_vida_datos_scraping | 3f7cffc944a0a0752a502dc7868cf43c4144f16c | [
"MIT"
] | null | null | null | """Regression tests for what was in Python 2's "urllib" module"""
import urllib.parse
import urllib.request
import urllib.error
import http.client
import email.message
import io
import unittest
from unittest.mock import patch
from test import support
import os
try:
import ssl
except ImportError:
... | 42.688573 | 109 | 0.575873 |
24f34884dc077aaa582fe827b172193fbecb3be5 | 2,336 | py | Python | pandas/tests/arrays/test_datetimelike.py | henriqueribeiro/pandas | 996f361f8e6986ea1c65ccb164a4c585e1f4a027 | [
"BSD-3-Clause"
] | 1 | 2018-08-01T05:39:55.000Z | 2018-08-01T05:39:55.000Z | pandas/tests/arrays/test_datetimelike.py | henriqueribeiro/pandas | 996f361f8e6986ea1c65ccb164a4c585e1f4a027 | [
"BSD-3-Clause"
] | 3 | 2018-09-24T22:09:28.000Z | 2018-10-01T21:10:00.000Z | pandas/tests/arrays/test_datetimelike.py | henriqueribeiro/pandas | 996f361f8e6986ea1c65ccb164a4c585e1f4a027 | [
"BSD-3-Clause"
] | 1 | 2019-05-26T12:57:52.000Z | 2019-05-26T12:57:52.000Z | # -*- coding: utf-8 -*-
import numpy as np
import pandas as pd
from pandas.core.arrays.datetimes import DatetimeArrayMixin
from pandas.core.arrays.timedeltas import TimedeltaArrayMixin
from pandas.core.arrays.period import PeriodArrayMixin
class TestDatetimeArray(object):
def test_from_dti(self, tz_naive_fixtu... | 32 | 71 | 0.636558 |
a8d48e9efeee8aa39bb059c3ad64359b48da4f16 | 1,703 | py | Python | apps/users/pipeline.py | silverlogic/bit-tag-api | 22bc1d79b3d48493ff3880f4c976c4e7c8135973 | [
"MIT"
] | null | null | null | apps/users/pipeline.py | silverlogic/bit-tag-api | 22bc1d79b3d48493ff3880f4c976c4e7c8135973 | [
"MIT"
] | null | null | null | apps/users/pipeline.py | silverlogic/bit-tag-api | 22bc1d79b3d48493ff3880f4c976c4e7c8135973 | [
"MIT"
] | null | null | null | from io import BytesIO
from django.core.files.images import ImageFile
import requests
from avatar.models import Avatar
from apps.base.coinbase import coinbase_client
class EmailAlreadyExistsError(Exception):
pass
class EmailNotProvidedError(Exception):
pass
def get_username(strategy, details, response,... | 27.031746 | 100 | 0.674105 |
bea729ae5c2b5ef8a9d44bf0a5a469eb103e668a | 17,118 | py | Python | datadog_checks_dev/datadog_checks/dev/tooling/commands/validate/metadata.py | tcpatterson/integrations-core | 3692601de09f8db60f42612b0d623509415bbb53 | [
"BSD-3-Clause"
] | null | null | null | datadog_checks_dev/datadog_checks/dev/tooling/commands/validate/metadata.py | tcpatterson/integrations-core | 3692601de09f8db60f42612b0d623509415bbb53 | [
"BSD-3-Clause"
] | null | null | null | datadog_checks_dev/datadog_checks/dev/tooling/commands/validate/metadata.py | tcpatterson/integrations-core | 3692601de09f8db60f42612b0d623509415bbb53 | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import os
import re
from collections import defaultdict
import click
from ...manifest_utils import Manifest
from ...testing import process_checks_option
from ...utils import complete_valid_checks, get_me... | 32.237288 | 200 | 0.570277 |
99a88a4b00fd3d3b08ece6e87de4d515e8261539 | 29,453 | py | Python | grr/gui/api_plugins/vfs.py | ethicalhackeragnidhra/Grr | 9ff9178396d9d16575e42dded33627cb09ac3af1 | [
"Apache-2.0"
] | 1 | 2020-12-18T00:47:19.000Z | 2020-12-18T00:47:19.000Z | grr/gui/api_plugins/vfs.py | ethicalhackeragnidhra/Grr | 9ff9178396d9d16575e42dded33627cb09ac3af1 | [
"Apache-2.0"
] | null | null | null | grr/gui/api_plugins/vfs.py | ethicalhackeragnidhra/Grr | 9ff9178396d9d16575e42dded33627cb09ac3af1 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""API handlers for dealing with files in a client's virtual file system."""
import csv
import os
import re
import StringIO
import zipfile
import logging
from grr import config
from grr.gui import api_call_handler_base
from grr.gui.api_plugins import client
from grr.lib import aff4
from grr.li... | 31.003158 | 80 | 0.711303 |
0760b6e13264ae096763f034a8fd91c13ffeb9a9 | 1,679 | py | Python | stubs.min/Rhino/Geometry/__init___parts/RadialDimension.py | ricardyn/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | 1 | 2021-02-02T13:39:16.000Z | 2021-02-02T13:39:16.000Z | stubs.min/Rhino/Geometry/__init___parts/RadialDimension.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | stubs.min/Rhino/Geometry/__init___parts/RadialDimension.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | class RadialDimension(AnnotationBase,IDisposable,ISerializable):
"""
RadialDimension(center: Point3d,arrowTip: Point3d,xAxis: Vector3d,normal: Vector3d,offsetDistance: float)
RadialDimension(circle: Circle,arrowTip: Point3d,offsetDistance: float)
"""
def ConstructConstObject(self,*args):
""" ConstructCons... | 39.046512 | 215 | 0.722454 |
5604ffbb9b7c680e7f552240f1b8a52463e24c9c | 438 | py | Python | dynamic_programming/0494_target_sum/0494_target_sum.py | zdyxry/LeetCode | 33371285d0f3302158230f46e8b1b63b9f4639c4 | [
"Xnet",
"X11"
] | 6 | 2019-09-16T01:50:44.000Z | 2020-09-17T08:52:25.000Z | dynamic_programming/0494_target_sum/0494_target_sum.py | zdyxry/LeetCode | 33371285d0f3302158230f46e8b1b63b9f4639c4 | [
"Xnet",
"X11"
] | null | null | null | dynamic_programming/0494_target_sum/0494_target_sum.py | zdyxry/LeetCode | 33371285d0f3302158230f46e8b1b63b9f4639c4 | [
"Xnet",
"X11"
] | 4 | 2020-02-07T12:43:16.000Z | 2021-04-11T06:38:55.000Z |
class Solution(object):
def findTargetSumWays(self, nums, S):
from collections import defaultdict
memo = {0:1}
for x in nums:
m = defaultdict(int)
for s, n in memo.iteritems():
m[s + x] += n
m[s - x] += n
memo = m
... | 23.052632 | 43 | 0.493151 |
1d106e63e38083e2c7d281010d88b5c29617aa90 | 8,417 | py | Python | wave/compat.py | ronaldguillen/wave | 20bb979c917f7634d8257992e6d449dc751256a9 | [
"Apache-2.0"
] | null | null | null | wave/compat.py | ronaldguillen/wave | 20bb979c917f7634d8257992e6d449dc751256a9 | [
"Apache-2.0"
] | null | null | null | wave/compat.py | ronaldguillen/wave | 20bb979c917f7634d8257992e6d449dc751256a9 | [
"Apache-2.0"
] | null | null | null | """
The `compat` module provides support for backwards compatibility with older
versions of Django/Python, and compatibility wrappers around optional packages.
"""
# flake8: noqa
from __future__ import unicode_literals
import django
from django.conf import settings
from django.db import connection, transaction
from d... | 32.249042 | 107 | 0.700487 |
787dac125ece887072db5fb72a037374abe637b2 | 16,956 | py | Python | lib/lib/Cryptodome/SelfTest/Protocol/test_KDF.py | Zhangxi-Lam/alfred-google-keep | 9f8f891e103f33a7e749907fe5cbfcf779131c8e | [
"MIT"
] | null | null | null | lib/lib/Cryptodome/SelfTest/Protocol/test_KDF.py | Zhangxi-Lam/alfred-google-keep | 9f8f891e103f33a7e749907fe5cbfcf779131c8e | [
"MIT"
] | null | null | null | lib/lib/Cryptodome/SelfTest/Protocol/test_KDF.py | Zhangxi-Lam/alfred-google-keep | 9f8f891e103f33a7e749907fe5cbfcf779131c8e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# SelfTest/Protocol/test_KDF.py: Self-test for key derivation functions
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
# the extent that dedication to the public domain is not available,
# everyone is... | 36.543103 | 196 | 0.531139 |
34b4d08af2db66b7c119b0fc8d14b875ec6437d4 | 4,230 | py | Python | clients/python/generated/swaggyjenkins/models/string_parameter_value.py | PankTrue/swaggy-jenkins | aca35a7cca6e1fcc08bd399e05148942ac2f514b | [
"MIT"
] | 23 | 2017-08-01T12:25:26.000Z | 2022-01-25T03:44:11.000Z | clients/python/generated/swaggyjenkins/models/string_parameter_value.py | PankTrue/swaggy-jenkins | aca35a7cca6e1fcc08bd399e05148942ac2f514b | [
"MIT"
] | 35 | 2017-06-14T03:28:15.000Z | 2022-02-14T10:25:54.000Z | clients/python/generated/swaggyjenkins/models/string_parameter_value.py | PankTrue/swaggy-jenkins | aca35a7cca6e1fcc08bd399e05148942ac2f514b | [
"MIT"
] | 11 | 2017-08-31T19:00:20.000Z | 2021-12-19T12:04:12.000Z | # coding: utf-8
"""
Swaggy Jenkins
Jenkins API clients generated from Swagger / Open API specification # noqa: E501
OpenAPI spec version: 1.1.1
Contact: blah@cliffano.com
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class StringParameterV... | 25.481928 | 85 | 0.556028 |
40d992e18057711ecc0d8e14e8d346965b8e198a | 599 | py | Python | python/e55.py | patrickbryan/Project-Euler-Solutions | fee0871d2a4c47f9fdde15b639e898f4eff9e721 | [
"MIT"
] | null | null | null | python/e55.py | patrickbryan/Project-Euler-Solutions | fee0871d2a4c47f9fdde15b639e898f4eff9e721 | [
"MIT"
] | null | null | null | python/e55.py | patrickbryan/Project-Euler-Solutions | fee0871d2a4c47f9fdde15b639e898f4eff9e721 | [
"MIT"
] | null | null | null | def isPalindrome(n):
n = str(n)
isP = True
for i in range(int(len(n)/2)):
if n[i] != n[len(n) - 1 - i]:
isP = False
break
return isP
def revNum(n):
n = str(n)
n = n[::-1]
n = int(n)
return n
def isLychrel(n):
isL = True
for i in ... | 18.151515 | 38 | 0.444073 |
2498c3c5dcfb2459deb265c8dfb98fe3fec9255d | 429 | py | Python | libs/sqlobject/tests/test_asdict.py | scambra/HTPC-Manager | 1a1440db84ae1b6e7a2610c7f3bd5b6adf0aab1d | [
"MIT"
] | 422 | 2015-01-08T14:08:08.000Z | 2022-02-07T11:47:37.000Z | libs/sqlobject/tests/test_asdict.py | scambra/HTPC-Manager | 1a1440db84ae1b6e7a2610c7f3bd5b6adf0aab1d | [
"MIT"
] | 581 | 2015-01-01T08:07:16.000Z | 2022-02-23T11:44:37.000Z | libs/sqlobject/tests/test_asdict.py | scambra/HTPC-Manager | 1a1440db84ae1b6e7a2610c7f3bd5b6adf0aab1d | [
"MIT"
] | 115 | 2015-01-08T14:41:00.000Z | 2022-02-13T12:31:17.000Z | from sqlobject import *
from sqlobject.tests.dbtest import *
########################################
## sqlmeta.asDict()
########################################
class TestAsDict(SQLObject):
name = StringCol(length=10)
name2 = StringCol(length=10)
def test_asDict():
setupClass(TestAsDict, force=True)
... | 26.8125 | 67 | 0.554779 |
8d8db415bed03b879fbd2653ce20d873d1171ac3 | 5,940 | py | Python | Data_Viz_Component_1.py | mathurchandni94/project-fall2017-master | fa243edd02123f36252279ec819eb7f966fc7973 | [
"BSD-3-Clause"
] | null | null | null | Data_Viz_Component_1.py | mathurchandni94/project-fall2017-master | fa243edd02123f36252279ec819eb7f966fc7973 | [
"BSD-3-Clause"
] | null | null | null | Data_Viz_Component_1.py | mathurchandni94/project-fall2017-master | fa243edd02123f36252279ec819eb7f966fc7973 | [
"BSD-3-Clause"
] | null | null | null |
# coding: utf-8
# # DATA VISULIZATION FALL 17- COMPONENT 1
# In[1]:
get_ipython().magic('matplotlib inline')
import pandas as pd
import matplotlib.pyplot as plt
from haversine import haversine
# Reading the data from data_tohoku_norm_transpose.csv
# In[2]:
array_vals = pd.read_csv("Downloads/data_tohoku_norm_tr... | 23.571429 | 182 | 0.707407 |
dca22da197544a9cefaa8c76aff5fc940b9e48f8 | 8,634 | py | Python | smartcab/agent03_v2.py | Dima806/udacity-mlnd-smartcab | 9cd6913ebd6cfb99cb0bc8d912321e71766fe7dc | [
"Apache-2.0"
] | null | null | null | smartcab/agent03_v2.py | Dima806/udacity-mlnd-smartcab | 9cd6913ebd6cfb99cb0bc8d912321e71766fe7dc | [
"Apache-2.0"
] | null | null | null | smartcab/agent03_v2.py | Dima806/udacity-mlnd-smartcab | 9cd6913ebd6cfb99cb0bc8d912321e71766fe7dc | [
"Apache-2.0"
] | null | null | null | import random
#import math
from environment import Agent, Environment
from planner import RoutePlanner
from simulator import Simulator
class LearningAgent(Agent):
""" An agent that learns to drive in the Smartcab world.
This is the object you will be modifying. """
def __init__(self, env, learning=Fa... | 41.311005 | 191 | 0.605629 |
92c6c96a5ea145cb9a7e69b548229a2442f1f108 | 1,510 | py | Python | acshaproxy/main.py | cncolder/acs-haproxy-src | 11631299110aef4db4929d29442c8a5744b3be41 | [
"Apache-2.0"
] | null | null | null | acshaproxy/main.py | cncolder/acs-haproxy-src | 11631299110aef4db4929d29442c8a5744b3be41 | [
"Apache-2.0"
] | null | null | null | acshaproxy/main.py | cncolder/acs-haproxy-src | 11631299110aef4db4929d29442c8a5744b3be41 | [
"Apache-2.0"
] | null | null | null | from gevent import monkey
monkey.patch_all()
import logging
import os
import signal
import sys
import dockercloud
import config
from haproxy.eventhandler import on_user_reload
from haproxy import __version__
from acshaproxycfg import run_haproxy
from haproxy.utils import save_to_file
# do monkey patch before impor... | 22.878788 | 95 | 0.727152 |
4b6a7a378f0aebfd6d5f6919f0b392ef2f0b9e40 | 1,851 | py | Python | config.py | Harha/PyTwitch | ee9f38ea1aa11ed6f9935c3ce0b1917a863109d1 | [
"MIT"
] | 2 | 2015-10-12T22:21:43.000Z | 2017-01-15T14:42:51.000Z | config.py | Harha/PyTwitch | ee9f38ea1aa11ed6f9935c3ce0b1917a863109d1 | [
"MIT"
] | null | null | null | config.py | Harha/PyTwitch | ee9f38ea1aa11ed6f9935c3ce0b1917a863109d1 | [
"MIT"
] | null | null | null | # Library imports
import os
# Class imports
from fileutils import *
from twchannel import *
# Twitch chat server related constants
TWITCH_HOST = "irc.twitch.tv"
TWITCH_PORT = 6667
TWITCH_USER = "botusername"
TWITCH_AUTH = "oauth:xxxxxxxxxxxxxxxxxxxxxxxxxx"
TWITCH_MEMR = ":twitch.tv/membership"
TWITCH_CMDR = ":twitch.... | 29.854839 | 110 | 0.726094 |
6608767be83ce6e96f3de0af21599a0efb741ab6 | 962 | py | Python | checkout/views.py | GadirMirzayev/Django-E-commerce | 0ca289fdf584b29636a8fc9416319defad0be5a5 | [
"MIT"
] | 1 | 2021-08-20T07:44:39.000Z | 2021-08-20T07:44:39.000Z | checkout/views.py | GadirMirzayev/Django-E-commerce | 0ca289fdf584b29636a8fc9416319defad0be5a5 | [
"MIT"
] | null | null | null | checkout/views.py | GadirMirzayev/Django-E-commerce | 0ca289fdf584b29636a8fc9416319defad0be5a5 | [
"MIT"
] | null | null | null | from django.shortcuts import render, redirect
from django.contrib import messages
from index.forms import SubscriberForm
from checkout.models import *
from checkout.forms import *
from django.views.generic import (
TemplateView,
)
# Create your views here.
class CartView(TemplateView):
template_name = 'cart.... | 24.666667 | 92 | 0.661123 |
b0ceb0abe8523cefe022db7fd386201d5e634d04 | 6,593 | py | Python | data_steward/tools/fix_rdr_data.py | amcgrenera-vumc/curation | f30aa8cb3b8de4e5dfdc3c95a0d98ca21de7df08 | [
"MIT"
] | null | null | null | data_steward/tools/fix_rdr_data.py | amcgrenera-vumc/curation | f30aa8cb3b8de4e5dfdc3c95a0d98ca21de7df08 | [
"MIT"
] | null | null | null | data_steward/tools/fix_rdr_data.py | amcgrenera-vumc/curation | f30aa8cb3b8de4e5dfdc3c95a0d98ca21de7df08 | [
"MIT"
] | null | null | null | import argparse
import logging
from google.appengine.api.app_identity import app_identity
import bq_utils
OBSERVATION_TABLE_NAME = 'observation'
VOCABULARY_DATASET = 'vocabulary20190423'
UPDATE_PPI_QUERY = """
UPDATE
`{project}.{dataset}.observation` a
SET
a.value_as_concept_id = b.concept_id
... | 26.910204 | 116 | 0.690884 |
b07b84208b8d98dda4552d331a8670679f19319a | 5,579 | py | Python | huaweicloud-sdk-dns/huaweicloudsdkdns/v2/model/update_record_set_req.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 64 | 2020-06-12T07:05:07.000Z | 2022-03-30T03:32:50.000Z | huaweicloud-sdk-dns/huaweicloudsdkdns/v2/model/update_record_set_req.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 11 | 2020-07-06T07:56:54.000Z | 2022-01-11T11:14:40.000Z | huaweicloud-sdk-dns/huaweicloudsdkdns/v2/model/update_record_set_req.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 24 | 2020-06-08T11:42:13.000Z | 2022-03-04T06:44:08.000Z | # coding: utf-8
import re
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class UpdateRecordSetReq:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key... | 25.244344 | 87 | 0.555655 |
87a5fc0bcc1de13fa79acf67579b26dc0179bdd7 | 1,307 | py | Python | sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/current_spend_py3.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/current_spend_py3.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 226 | 2019-07-24T07:57:21.000Z | 2019-10-15T01:07:24.000Z | sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/current_spend_py3.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 2 | 2020-05-21T22:51:22.000Z | 2020-05-26T20:53:01.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 31.119048 | 76 | 0.578424 |
af5fe8bb7af2f04cecc5b6b24b8926ba176cf9bb | 491 | py | Python | autoloader.py | toutpuissantged/BestOfWeb | fa4b62d26ef7ae73bdd69c5d65f6bfab46232f10 | [
"MIT"
] | 4 | 2020-07-25T15:36:21.000Z | 2022-02-17T21:38:48.000Z | autoloader.py | toutpuissantged/BestOfWeb | fa4b62d26ef7ae73bdd69c5d65f6bfab46232f10 | [
"MIT"
] | null | null | null | autoloader.py | toutpuissantged/BestOfWeb | fa4b62d26ef7ae73bdd69c5d65f6bfab46232f10 | [
"MIT"
] | null | null | null | from tkinter import Button, Tk, Label, Entry , StringVar, IntVar, Radiobutton, messagebox, Menu
from tkinter.ttk import Frame
from data.store import Store
from core.FileInterface import *
from core.argparse import ArgsParse
from view.FileMenu import FileMenu
from view.EditMenu import EditMenu
from view.HelpMenu import... | 32.733333 | 95 | 0.830957 |
edeaa8815bc5e805819565307b260d08862843ea | 8,113 | py | Python | python/learning_launcher.py | tOba1357/kabu | 4af3ec659babc398d03bb13026687c6e89975a84 | [
"Apache-2.0"
] | null | null | null | python/learning_launcher.py | tOba1357/kabu | 4af3ec659babc398d03bb13026687c6e89975a84 | [
"Apache-2.0"
] | null | null | null | python/learning_launcher.py | tOba1357/kabu | 4af3ec659babc398d03bb13026687c6e89975a84 | [
"Apache-2.0"
] | null | null | null | import MySQLdb
import tensorflow as tf
from KabuModelV2 import KabuModelV2
# +---------------------+-----------------------+
# | stddev(change_rate) | avg(change_rate) |
# +---------------------+-----------------------+
# | 0.06494733817591199 | 0.0005248532996038034 |
# +---------------------+-------------------... | 37.215596 | 111 | 0.453346 |
117ab0d27e88ff01399c390cff0edb16280bb750 | 6,860 | py | Python | napalm_yang/models/openconfig/system/logging/console/selectors/__init__.py | ckishimo/napalm-yang | 8f2bd907bd3afcde3c2f8e985192de74748baf6c | [
"Apache-2.0"
] | 64 | 2016-10-20T15:47:18.000Z | 2021-11-11T11:57:32.000Z | napalm_yang/models/openconfig/system/logging/console/selectors/__init__.py | ckishimo/napalm-yang | 8f2bd907bd3afcde3c2f8e985192de74748baf6c | [
"Apache-2.0"
] | 126 | 2016-10-05T10:36:14.000Z | 2019-05-15T08:43:23.000Z | napalm_yang/models/openconfig/system/logging/console/selectors/__init__.py | ckishimo/napalm-yang | 8f2bd907bd3afcde3c2f8e985192de74748baf6c | [
"Apache-2.0"
] | 63 | 2016-11-07T15:23:08.000Z | 2021-09-22T14:41:16.000Z | # -*- coding: utf-8 -*-
from operator import attrgetter
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType
from pyangbind.lib.yangtypes import RestrictedClassType
from pyangbind.lib.yangtypes import TypedListType
from pyangbind.lib.yangtypes import YANGBool
from pyangbind.lib.yangtypes import YANGListTy... | 36.684492 | 542 | 0.587318 |
4315ac99e1b4024833f34b7b360898d5225d6e80 | 2,170 | py | Python | pyparsing-2.0.1/examples/apicheck.py | johannes-schuetze/ALTO-framework-sim | 7a8d1df549188684ad3636434ccd6cf064e82c4f | [
"MIT"
] | 1 | 2018-05-30T22:21:30.000Z | 2018-05-30T22:21:30.000Z | pyparsing-2.0.1/examples/apicheck.py | johannes-schuetze/ALTO-framework-sim | 7a8d1df549188684ad3636434ccd6cf064e82c4f | [
"MIT"
] | null | null | null | pyparsing-2.0.1/examples/apicheck.py | johannes-schuetze/ALTO-framework-sim | 7a8d1df549188684ad3636434ccd6cf064e82c4f | [
"MIT"
] | null | null | null | # apicheck.py
# A simple source code scanner for finding patterns of the form
# [ procname1 $arg1 $arg2 ]
# and verifying the number of arguments
from pyparsing import *
# define punctuation and simple tokens for locating API calls
LBRACK,RBRACK,LBRACE,RBRACE = map(Suppress,"[]{}")
ident = Word(alph... | 38.75 | 78 | 0.662673 |
6501bdfbf22873dd3c693aef6d103404e16261e5 | 30,094 | py | Python | plugins/Aka/plugin.py | joulez/Limnoria | aa89a2dd72ec6f593df4c5c281d915af456d5614 | [
"BSD-3-Clause"
] | null | null | null | plugins/Aka/plugin.py | joulez/Limnoria | aa89a2dd72ec6f593df4c5c281d915af456d5614 | [
"BSD-3-Clause"
] | null | null | null | plugins/Aka/plugin.py | joulez/Limnoria | aa89a2dd72ec6f593df4c5c281d915af456d5614 | [
"BSD-3-Clause"
] | null | null | null | ###
# Copyright (c) 2013, Valentin Lorentz
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditi... | 40.667568 | 109 | 0.552137 |
3efbc3d33bcad76793d3757301bfceb91aafd194 | 20,081 | py | Python | nova-19.0.1/nova/compute/multi_cell_list.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 1 | 2019-04-17T04:21:17.000Z | 2019-04-17T04:21:17.000Z | nova-19.0.1/nova/compute/multi_cell_list.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | nova-19.0.1/nova/compute/multi_cell_list.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 2 | 2020-03-15T01:24:15.000Z | 2020-07-22T20:34:26.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 44.723831 | 79 | 0.599273 |
34d6ff4377edfa018e5695858edb816e228b00f9 | 20,972 | py | Python | dpmModule/jobs/zero.py | kmsiapps/maplestory_dpm_calc | fbbc5384fdb6aefb58aa4d0d286a6c2972807d57 | [
"MIT"
] | null | null | null | dpmModule/jobs/zero.py | kmsiapps/maplestory_dpm_calc | fbbc5384fdb6aefb58aa4d0d286a6c2972807d57 | [
"MIT"
] | null | null | null | dpmModule/jobs/zero.py | kmsiapps/maplestory_dpm_calc | fbbc5384fdb6aefb58aa4d0d286a6c2972807d57 | [
"MIT"
] | null | null | null | from ..kernel import core
from ..kernel.core import VSkillModifier as V
from ..character import characterKernel as ck
from functools import partial
from ..status.ability import Ability_tool
from . import globalSkill
from .jobbranch import warriors
# TODO: 4카 5앱 적용, 리미트 막타 추가
# 현재로는 계산 알고리즘 작성 구문에서 연산과정에 접근을 할 수 없도록 ... | 57.457534 | 236 | 0.658163 |
bc4c55f56ec9e5e93eb7d0a81bd1d4958abb7430 | 1,128 | py | Python | nova/policies/create_backup.py | lixiaoy1/nova | 357b8b38e88300948bb2e07d1bbaabd1e9d7b60e | [
"Apache-2.0"
] | 2 | 2021-10-11T04:56:25.000Z | 2022-02-16T08:49:29.000Z | nova/policies/create_backup.py | woraser/nova | fc3890667e4971e3f0f35ac921c2a6c25f72adec | [
"Apache-2.0"
] | 132 | 2017-03-27T11:31:52.000Z | 2022-03-30T08:45:02.000Z | nova/policies/create_backup.py | woraser/nova | fc3890667e4971e3f0f35ac921c2a6c25f72adec | [
"Apache-2.0"
] | 8 | 2017-03-27T07:50:38.000Z | 2020-02-14T16:55:56.000Z | # Copyright 2016 Cloudbase Solutions Srl
# 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 r... | 28.2 | 78 | 0.676418 |
dc6c8cf2bfb72ca059606024269da212c1f5d0e9 | 2,880 | py | Python | simplezat/ratings/tests.py | parnpresso/simplezat | 5fbe00811e254f13bdbfe8026f404b1c239cb433 | [
"MIT"
] | null | null | null | simplezat/ratings/tests.py | parnpresso/simplezat | 5fbe00811e254f13bdbfe8026f404b1c239cb433 | [
"MIT"
] | null | null | null | simplezat/ratings/tests.py | parnpresso/simplezat | 5fbe00811e254f13bdbfe8026f404b1c239cb433 | [
"MIT"
] | null | null | null | from django.urls import reverse
from django.test import TestCase
class RatingViewTest(TestCase):
def setUp(self):
self.url = reverse('ratings')
def test_rating_view_should_have_question_text(self):
response = self.client.get(self.url)
expected = '<h1>How do we do?</h1>'
self.... | 37.894737 | 78 | 0.621528 |
c5b3b3968d43d8c763bd7dbc99c75b7ba3983654 | 25,014 | py | Python | wdl2cwl/main.py | common-workflow-language/wdl2cwl | 8880347e462ca513a74c2c17945700204483f8cc | [
"Apache-2.0"
] | 20 | 2016-01-26T14:46:25.000Z | 2018-12-20T23:50:44.000Z | wdl2cwl/main.py | common-workflow-language/wdl2cwl | 8880347e462ca513a74c2c17945700204483f8cc | [
"Apache-2.0"
] | 4 | 2017-06-14T16:23:32.000Z | 2018-12-19T20:51:35.000Z | wdl2cwl/main.py | common-workflow-lab/wdl2cwl | 8880347e462ca513a74c2c17945700204483f8cc | [
"Apache-2.0"
] | 3 | 2017-01-25T16:32:49.000Z | 2018-12-19T00:15:13.000Z | from __future__ import print_function
import argparse
import json
import logging
import os
import re
import sys
import wdl.parser
from jinja2 import Environment, FileSystemLoader
__version__ = '0.2'
handlers = {}
# set up logging
logger = logging.getLogger('Main')
logger.setLevel(logging.INFO)
ch = logging.StreamH... | 36.357558 | 120 | 0.533221 |
ab1d69ce7fcfc1daf0266f852c77fedce3ddc497 | 1,214 | py | Python | SDKs/CryCode/3.7.0/GameDll/GameDll.py | amrhead/FireNET | 34d439aa0157b0c895b20b2b664fddf4f9b84af1 | [
"BSD-2-Clause"
] | 4 | 2017-12-18T20:10:16.000Z | 2021-02-07T21:21:24.000Z | SDKs/CryCode/3.7.0/GameDll/GameDll.py | amrhead/FireNET | 34d439aa0157b0c895b20b2b664fddf4f9b84af1 | [
"BSD-2-Clause"
] | null | null | null | SDKs/CryCode/3.7.0/GameDll/GameDll.py | amrhead/FireNET | 34d439aa0157b0c895b20b2b664fddf4f9b84af1 | [
"BSD-2-Clause"
] | 3 | 2019-03-11T21:36:15.000Z | 2021-02-07T21:21:26.000Z | #############################################################################
## Crytek Source File
## Copyright (C) 2013, Crytek Studios
##
## Creator: Leander Beernaert
## Date: October 17, 2013
## Description: Makeomatic based build system
#############################################################################... | 39.16129 | 226 | 0.659802 |
82a5cb603eccb3f39a42d6e3aa6a927929f9ed48 | 3,865 | py | Python | aif360/datasets/compas_dataset.py | sumacm/fairattr | 72b56d718a6fbe695093d24715c75b9b485ab6b8 | [
"Apache-2.0"
] | 982 | 2018-09-12T17:19:11.000Z | 2020-07-13T21:26:24.000Z | aif360/datasets/compas_dataset.py | sumacm/fairattr | 72b56d718a6fbe695093d24715c75b9b485ab6b8 | [
"Apache-2.0"
] | 109 | 2018-09-12T20:39:43.000Z | 2020-07-09T20:12:00.000Z | aif360/datasets/compas_dataset.py | aridiosilva/AIF360 | f4c53dd28df0cc6c414dcf91396549615cfadf20 | [
"Apache-2.0"
] | 335 | 2018-09-13T15:35:09.000Z | 2020-07-06T10:56:12.000Z | import os
import pandas as pd
from aif360.datasets import StandardDataset
default_mappings = {
'label_maps': [{1.0: 'Did recid.', 0.0: 'No recid.'}],
'protected_attribute_maps': [{0.0: 'Male', 1.0: 'Female'},
{1.0: 'Caucasian', 0.0: 'Not Caucasian'}]
}
def default_preproces... | 43.920455 | 120 | 0.603622 |
6940a731704e4d21c1d310e3820bb1dfaa75e97c | 4,235 | py | Python | server/src/learn/evaluator.py | GaoleMeng/ActiveLearningAnnotationTool | 8070f6e77429ac68de29588b2c6c9549250974df | [
"CC-BY-3.0"
] | 17 | 2017-09-14T07:21:37.000Z | 2021-12-07T03:17:05.000Z | server/src/learn/evaluator.py | GaoleMeng/ActiveLearningAnnotationTool | 8070f6e77429ac68de29588b2c6c9549250974df | [
"CC-BY-3.0"
] | null | null | null | server/src/learn/evaluator.py | GaoleMeng/ActiveLearningAnnotationTool | 8070f6e77429ac68de29588b2c6c9549250974df | [
"CC-BY-3.0"
] | 5 | 2017-09-14T07:21:55.000Z | 2021-01-27T01:50:19.000Z | #!/usr/bin/env python
# -*- Mode: Python; tab-width: 4; indent-tabs-mode: nil; coding: utf-8; -*-
# vim:set ft=python ts=4 sw=4 sts=4 autoindent:
from copy import deepcopy
from constants import *
def get_avg_precs(label, pred):
# true_by_label[l][i] = 1
true_by_label = {}
for l in label.items()[0][1].keys():
tru... | 32.328244 | 118 | 0.646753 |
3d15c0a5dd6e4642fe764b50634e56f72f76a98c | 11,145 | py | Python | proteus/tests/test_equivalent_polynomials.py | AntoninoScala/proteus | 92e4b62fd8d9a38930f8315cd57ebd35e42f68ef | [
"MIT"
] | null | null | null | proteus/tests/test_equivalent_polynomials.py | AntoninoScala/proteus | 92e4b62fd8d9a38930f8315cd57ebd35e42f68ef | [
"MIT"
] | 13 | 2018-02-08T23:22:59.000Z | 2020-12-06T19:40:32.000Z | proteus/tests/test_equivalent_polynomials.py | AntoninoScala/proteus | 92e4b62fd8d9a38930f8315cd57ebd35e42f68ef | [
"MIT"
] | 1 | 2020-02-17T03:25:34.000Z | 2020-02-17T03:25:34.000Z | import numpy as np
from pytest import approx
from proteus import equivalent_polynomials as eqp
def test_1D():
from proteus.Quadrature import GaussEdge
polyOrders = [1,2,3]
quadOrderMax = 9
elements = [[0.,1.],[-2.,2.],[9.,10.]]
phiList = [[-1.,-1.],[1.,1.],[-1.,1.],[0.,1.],[1.,0.]]
for nP in p... | 44.939516 | 91 | 0.357649 |
795148dd80fc92a0199d6c5937f92fc2dab57954 | 3,666 | py | Python | second/builder/dataset_builder.py | zhb0920/second.pytorch | f980f3d18749b7a2830983222d1695b5cb321dae | [
"MIT"
] | null | null | null | second/builder/dataset_builder.py | zhb0920/second.pytorch | f980f3d18749b7a2830983222d1695b5cb321dae | [
"MIT"
] | null | null | null | second/builder/dataset_builder.py | zhb0920/second.pytorch | f980f3d18749b7a2830983222d1695b5cb321dae | [
"MIT"
] | null | null | null | from second.protos import input_reader_pb2
from second.data.dataset import KittiDataset
from second.data.preprocess import prep_pointcloud
import numpy as np
from second.builder import dbsampler_builder
from functools import partial
from second.utils import config_tool
def build(input_reader_config,
model_co... | 42.137931 | 111 | 0.743317 |
3cc3c435f2ec7fa15f4a3f8e998b108952210bd7 | 11,069 | py | Python | neutron/services/vpn/device_drivers/cisco_csr_rest_client.py | MatheMatrix/neutron | 5f50b972f9c31c4e558ed9486e742eacd8c115b7 | [
"Apache-2.0"
] | 1 | 2021-07-26T16:15:11.000Z | 2021-07-26T16:15:11.000Z | neutron/services/vpn/device_drivers/cisco_csr_rest_client.py | InfoHunter/neutron | 2acc53aa39b962640564b2c35252711995324eb7 | [
"Apache-2.0"
] | null | null | null | neutron/services/vpn/device_drivers/cisco_csr_rest_client.py | InfoHunter/neutron | 2acc53aa39b962640564b2c35252711995324eb7 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Cisco Systems, 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... | 43.407843 | 79 | 0.602493 |
b80c32312373c31caa2cb429a384e397ec6ba72a | 11,013 | py | Python | qiskit/unroll/_circuitbackend.py | niefermar/CuanticaProgramacion | cf066149b4bd769673e83fd774792e9965e5dbc0 | [
"Apache-2.0"
] | 3 | 2021-11-08T11:46:42.000Z | 2021-12-27T10:13:38.000Z | qiskit/unroll/_circuitbackend.py | niefermar/CuanticaProgramacion | cf066149b4bd769673e83fd774792e9965e5dbc0 | [
"Apache-2.0"
] | 2 | 2021-11-09T14:57:09.000Z | 2022-01-12T12:35:58.000Z | artifacts/old_dataset_versions/original_commits_v02/qiskit-terra/qiskit-terra#557/after/_circuitbackend.py | MattePalte/Bugs-Quantum-Computing-Platforms | 0c1c805fd5dfce465a8955ee3faf81037023a23e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
Backend for the unroller that produces a QuantumCircuit.
"""
from qiskit import QuantumCircuit
from qiskit import Classi... | 39.473118 | 83 | 0.494143 |
4f3300392f84bbd9a220ff31235528b4ee7e56f0 | 16,204 | py | Python | mmaction/datasets/pipelines/rand_augment.py | nbl97/vswin | c7f38f07238e6fa52ec3532946dc1ce78d892595 | [
"Apache-2.0"
] | 4 | 2021-10-09T08:25:29.000Z | 2022-02-21T13:47:17.000Z | mmaction/datasets/pipelines/rand_augment.py | nbl97/vswin | c7f38f07238e6fa52ec3532946dc1ce78d892595 | [
"Apache-2.0"
] | null | null | null | mmaction/datasets/pipelines/rand_augment.py | nbl97/vswin | c7f38f07238e6fa52ec3532946dc1ce78d892595 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
"""
This implementation is based on
https://github.com/rwightman/pytorch-image-models/blob/master/timm/data/auto_augment.py
pulished under an Apache License 2.0.
COMMENT FROM ORIGINAL:
AutoAugment, RandAugment, and AugMix for PyTorch
This code im... | 30.344569 | 119 | 0.656566 |
422754e080341d33c160b443a98eb04e34dc705a | 1,534 | py | Python | pytorch/.~c9_invoke_TwC5sf.py | TianyuDu/AnnEconForecast | 648bb05498f333811021c07b04000d5f81ddc7f8 | [
"MIT"
] | 7 | 2018-12-26T07:54:43.000Z | 2020-03-27T04:35:48.000Z | pytorch/.~c9_invoke_TwC5sf.py | TianyuDu/EFANN | 648bb05498f333811021c07b04000d5f81ddc7f8 | [
"MIT"
] | null | null | null | pytorch/.~c9_invoke_TwC5sf.py | TianyuDu/EFANN | 648bb05498f333811021c07b04000d5f81ddc7f8 | [
"MIT"
] | 2 | 2019-06-09T21:10:56.000Z | 2021-03-20T13:13:48.000Z | """
TODO: write documents
"""
from pprint import pprint
from datetime import datetime
import sys
sys.path.extend(["./core", "./core/tools"])
import matplotlib
c = input("Use Agg as matplotlib (avoid tkinter)[y/n]:")
if c.lower() == "y":
matplotlib.use("agg")
from matplotlib import pyplot as plt
import tqdm
import... | 29.5 | 86 | 0.654498 |
a39d623842157e5ba2e1df330c55caf680ac3e80 | 5,155 | py | Python | book_figures/chapter3/fig_clone_distribution.py | StKyr/astroML_figures | 45e9748335e0cd854d09319dff0e43ecd70e7b61 | [
"BSD-2-Clause"
] | 6 | 2019-08-31T16:43:43.000Z | 2021-07-10T06:06:20.000Z | book_figures/chapter3/fig_clone_distribution.py | StKyr/astroML_figures | 45e9748335e0cd854d09319dff0e43ecd70e7b61 | [
"BSD-2-Clause"
] | 34 | 2018-09-10T22:35:07.000Z | 2022-02-08T21:17:39.000Z | book_figures/chapter3/fig_clone_distribution.py | StKyr/astroML_figures | 45e9748335e0cd854d09319dff0e43ecd70e7b61 | [
"BSD-2-Clause"
] | 10 | 2017-06-22T09:21:19.000Z | 2020-01-26T03:54:26.000Z | r"""
Random Values from an Empirical Distribution
--------------------------------------------
Figure 3.25.
A demonstration of how to empirically clone a distribution, using a spline
interpolation to approximate the inverse of the observed cumulative
distribution. This allows us to nonparametrically select new random ... | 37.627737 | 79 | 0.687488 |
12109d26f923c46d1d822067d9e0d54400a769d7 | 11,530 | py | Python | tests/test_channels.py | sudoguy/rocketchat_API | 33266dde36eb5d4d797ac2c3714a717283265051 | [
"MIT"
] | 1 | 2021-03-19T06:47:47.000Z | 2021-03-19T06:47:47.000Z | tests/test_channels.py | sudoguy/rocketchat_API | 33266dde36eb5d4d797ac2c3714a717283265051 | [
"MIT"
] | null | null | null | tests/test_channels.py | sudoguy/rocketchat_API | 33266dde36eb5d4d797ac2c3714a717283265051 | [
"MIT"
] | 1 | 2019-12-23T03:52:04.000Z | 2019-12-23T03:52:04.000Z | import uuid
import pytest
from rocketchat_API.APIExceptions.RocketExceptions import RocketMissingParamException
@pytest.fixture(autouse=True)
def add_owner(logged_rocket, user):
"Add test user as owner in GENERAL channel in every test in this module"
logged_rocket.channels_add_owner("GENERAL", username=user... | 38.952703 | 104 | 0.744579 |
08ff73346d605d307b5171d895709fbb28ae8a72 | 443 | py | Python | src/sfctl/helps/__init__.py | vshan/service-fabric-cli | f491a301a03db3e0c11bb17b2a2315949ff40ba3 | [
"MIT"
] | 17 | 2019-07-01T05:03:02.000Z | 2022-03-12T11:22:55.000Z | src/sfctl/helps/__init__.py | vshan/service-fabric-cli | f491a301a03db3e0c11bb17b2a2315949ff40ba3 | [
"MIT"
] | 86 | 2018-05-30T13:31:54.000Z | 2019-04-04T22:08:22.000Z | src/sfctl/helps/__init__.py | vshan/service-fabric-cli | f491a301a03db3e0c11bb17b2a2315949ff40ba3 | [
"MIT"
] | 20 | 2019-05-16T22:55:08.000Z | 2021-09-13T12:31:19.000Z | # -----------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# -----------------------------------------------------------------------------
""... | 40.272727 | 79 | 0.501129 |
396a926d787314cc5de5a0119511b91b3bb5fa88 | 29,207 | py | Python | python/unitytrainers/ppo/trainer.py | Sohojoe/ActiveRagdollAssaultCourse | 01b8111fee5b4b33f4d7735cf83b804a1080d108 | [
"Apache-2.0"
] | 33 | 2018-07-08T17:04:54.000Z | 2021-11-25T23:19:44.000Z | python/unitytrainers/ppo/trainer.py | Sohojoe/ActiveRagdollControllers | 5d3a307ca378844c0974e190468c9492fd54197a | [
"Apache-2.0"
] | 1 | 2018-07-11T03:21:12.000Z | 2018-07-11T03:21:12.000Z | python/unitytrainers/ppo/trainer.py | Sohojoe/ActiveRagdollAssaultCourse | 01b8111fee5b4b33f4d7735cf83b804a1080d108 | [
"Apache-2.0"
] | 5 | 2018-07-08T17:05:10.000Z | 2021-03-02T13:24:23.000Z | # # Unity ML-Agents Toolkit
# ## ML-Agent Learning (PPO)
# Contains an implementation of PPO as described (https://arxiv.org/abs/1707.06347).
import logging
import os
import numpy as np
import tensorflow as tf
from unityagents import AllBrainInfo, BrainInfo
from unitytrainers.buffer import Buffer
from unitytrainers.... | 53.788214 | 120 | 0.611155 |
79388489a34bc75e07bfc728bc547f25e3a78242 | 3,211 | py | Python | openstack/tests/unit/block_store/v2/test_snapshot.py | teresa-ho/stx-openstacksdk | 7d723da3ffe9861e6e9abcaeadc1991689f782c5 | [
"Apache-2.0"
] | null | null | null | openstack/tests/unit/block_store/v2/test_snapshot.py | teresa-ho/stx-openstacksdk | 7d723da3ffe9861e6e9abcaeadc1991689f782c5 | [
"Apache-2.0"
] | null | null | null | openstack/tests/unit/block_store/v2/test_snapshot.py | teresa-ho/stx-openstacksdk | 7d723da3ffe9861e6e9abcaeadc1991689f782c5 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 35.285714 | 76 | 0.654002 |
2661d52e6146f1d593e12cebd879a620e5bb679d | 643 | py | Python | vb2py/PythonCard/tools/oneEditor/scriptlets/selectionWordCount.py | ceprio/xl_vb2py | 899fec0301140fd8bd313e8c80b3fa839b3f5ee4 | [
"BSD-3-Clause"
] | null | null | null | vb2py/PythonCard/tools/oneEditor/scriptlets/selectionWordCount.py | ceprio/xl_vb2py | 899fec0301140fd8bd313e8c80b3fa839b3f5ee4 | [
"BSD-3-Clause"
] | null | null | null | vb2py/PythonCard/tools/oneEditor/scriptlets/selectionWordCount.py | ceprio/xl_vb2py | 899fec0301140fd8bd313e8c80b3fa839b3f5ee4 | [
"BSD-3-Clause"
] | null | null | null | import wx
from PythonCard import dialog, util
def wordCount(text):
chars = len(text)
words = len(text.split())
# this doesn't always match the getNumberOfLines() method
# so this should probably be changed
lines = len(text.splitlines())
return chars, words, lines
if self.currentPage.documentPa... | 33.842105 | 149 | 0.718507 |
fc67f70635fdfe0b6318cefafd98e0369fa4dda0 | 7,371 | py | Python | sdk/python/kfp/_client.py | ggaaooppeenngg/pipelines | 9b77d4a8a67ab4fa2a10c4b70dd94ef2a83c6097 | [
"Apache-2.0"
] | null | null | null | sdk/python/kfp/_client.py | ggaaooppeenngg/pipelines | 9b77d4a8a67ab4fa2a10c4b70dd94ef2a83c6097 | [
"Apache-2.0"
] | null | null | null | sdk/python/kfp/_client.py | ggaaooppeenngg/pipelines | 9b77d4a8a67ab4fa2a10c4b70dd94ef2a83c6097 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 34.443925 | 99 | 0.690137 |
9b0cdb87da145870f212c580fcece4c2bb77ab48 | 71,781 | py | Python | pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py | jeaubin/genielibs | b4c9c4c0e7b85a7bef94ab77cc477a1c8592a0cb | [
"Apache-2.0"
] | null | null | null | pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py | jeaubin/genielibs | b4c9c4c0e7b85a7bef94ab77cc477a1c8592a0cb | [
"Apache-2.0"
] | 1 | 2020-08-01T00:59:29.000Z | 2020-08-01T00:59:32.000Z | pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py | jeaubin/genielibs | b4c9c4c0e7b85a7bef94ab77cc477a1c8592a0cb | [
"Apache-2.0"
] | null | null | null |
# Python
import re
import time
import shutil
import os.path
import logging
# pyATS
from pyats import aetest
from pyats.log.utils import banner
from pyats.utils.fileutils import FileUtils
# Unicon
from unicon.eal.dialogs import Statement, Dialog
from unicon.core.errors import SubCommandFailure, ConnectionError
# Gen... | 45.088568 | 164 | 0.493083 |
2ec53fd81441bad3409719d77c1275ca5210c541 | 10,727 | py | Python | cms/plugins/googlemap/migrations/0002_table_rename.py | DrMeers/django-cms-2.0 | d563d912c99f0c138a66d99829d8d0133226894e | [
"BSD-3-Clause"
] | 4 | 2016-05-07T11:50:25.000Z | 2017-12-04T10:30:20.000Z | cms/plugins/googlemap/migrations/0002_table_rename.py | gmurewa/django-cms-2.0 | 6fab9d93ddcea301a844996f5f0db7edc4883953 | [
"BSD-3-Clause"
] | 1 | 2015-06-08T08:27:11.000Z | 2015-06-08T10:40:27.000Z | cms/plugins/googlemap/migrations/0002_table_rename.py | gmurewa/django-cms-2.0 | 6fab9d93ddcea301a844996f5f0db7edc4883953 | [
"BSD-3-Clause"
] | null | null | null |
from south.db import db
from django.db import models
from cms.plugins.googlemap.models import *
class Migration:
depends_on = (
("cms", "0019_public_table_renames"),
)
def forwards(self, orm):
db.rename_table("googlemap_googlemap", "cmsplugin_googlemap")
db.rename_table("g... | 72.47973 | 188 | 0.546565 |
062d633ee44bd4a4b8733c0d15ba52a6a1d6fad7 | 1,570 | py | Python | python/ray/internal/internal_api.py | visatish/ray | dc76e51a60652b3210c93f81df6dafcf461d4431 | [
"Apache-2.0"
] | 1 | 2021-02-08T13:40:58.000Z | 2021-02-08T13:40:58.000Z | python/ray/internal/internal_api.py | visatish/ray | dc76e51a60652b3210c93f81df6dafcf461d4431 | [
"Apache-2.0"
] | null | null | null | python/ray/internal/internal_api.py | visatish/ray | dc76e51a60652b3210c93f81df6dafcf461d4431 | [
"Apache-2.0"
] | 2 | 2018-09-04T21:00:36.000Z | 2019-04-03T06:34:26.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import ray.local_scheduler
import ray.worker
from ray import profiling
__all__ = ["free"]
def free(object_ids, local_only=False, worker=None):
"""Free a list of IDs from object stores.
This function... | 32.040816 | 77 | 0.692994 |
6422522a74dc398a76c73a043ca148c7b7bb94e2 | 8,882 | py | Python | train_func_cross_domain.py | chohj1111/MoCoGAN-HD | 385ce6f8062f061908a54e51bc459cee8cc3acdf | [
"MIT"
] | null | null | null | train_func_cross_domain.py | chohj1111/MoCoGAN-HD | 385ce6f8062f061908a54e51bc459cee8cc3acdf | [
"MIT"
] | null | null | null | train_func_cross_domain.py | chohj1111/MoCoGAN-HD | 385ce6f8062f061908a54e51bc459cee8cc3acdf | [
"MIT"
] | null | null | null | """
Copyright Snap Inc. 2021. This sample code is made available by Snap Inc. for informational purposes only.
No license, whether implied or otherwise, is granted in or to such code (including any rights to copy, modify,
publish, distribute and/or commercialize such code), unless you have entered into a separate agree... | 31.608541 | 124 | 0.649516 |
c22d2529861cd0bb3096bb73f4c88f7d08cbc919 | 2,895 | py | Python | main.py | robertclaus/python-quickFOIL | edd4ebb737d0fe64d01ed8ef908107d00598587c | [
"Apache-2.0"
] | 3 | 2018-07-23T19:22:00.000Z | 2020-01-02T09:01:28.000Z | main.py | robertclaus/python-quickFOIL | edd4ebb737d0fe64d01ed8ef908107d00598587c | [
"Apache-2.0"
] | null | null | null | main.py | robertclaus/python-quickFOIL | edd4ebb737d0fe64d01ed8ef908107d00598587c | [
"Apache-2.0"
] | null | null | null | from helpers import *
from costFunctions import *
from queries import *
GenerateExample('Uncle')
##Figure out why Bp [1,3] is reporting ('TP', 4, 'FN', 1, 'FP', 3, 'TN', 1)
#The TN=1 is it hitting (Noah, but should that even be possible
Ep=getListOfTables(POSITIVE_EXAMPLE_TYPE)[0]
Em=getListOfTables(NEGATIVE_EXAMP... | 30.15625 | 131 | 0.728152 |
188fe814914563c5cee40ebdf41a33c8e4b1877b | 12,862 | py | Python | aldryn_blog/south_migrations/0006_date_to_datetime_step3.py | what-digital/aldryn-blog | d5868cabe80718b2c49bbc4cfa22bea475d69d8b | [
"BSD-3-Clause"
] | null | null | null | aldryn_blog/south_migrations/0006_date_to_datetime_step3.py | what-digital/aldryn-blog | d5868cabe80718b2c49bbc4cfa22bea475d69d8b | [
"BSD-3-Clause"
] | null | null | null | aldryn_blog/south_migrations/0006_date_to_datetime_step3.py | what-digital/aldryn-blog | d5868cabe80718b2c49bbc4cfa22bea475d69d8b | [
"BSD-3-Clause"
] | 2 | 2016-12-28T03:46:33.000Z | 2022-02-19T10:34:25.000Z | # -*- coding: 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):
# Deleting field 'Post.publication_date'
db.delete_column('aldryn_blog_post', 'publication_date')
def ... | 81.405063 | 191 | 0.567641 |
70465cfab965bb515be2f904d61048b3ccc9e81c | 1,947 | py | Python | changes/models/failurereason.py | vault-the/changes | 37e23c3141b75e4785cf398d015e3dbca41bdd56 | [
"Apache-2.0"
] | 443 | 2015-01-03T16:28:39.000Z | 2021-04-26T16:39:46.000Z | changes/models/failurereason.py | vault-the/changes | 37e23c3141b75e4785cf398d015e3dbca41bdd56 | [
"Apache-2.0"
] | 12 | 2015-07-30T19:07:16.000Z | 2016-11-07T23:11:21.000Z | changes/models/failurereason.py | vault-the/changes | 37e23c3141b75e4785cf398d015e3dbca41bdd56 | [
"Apache-2.0"
] | 47 | 2015-01-09T10:04:00.000Z | 2020-11-18T17:58:19.000Z | from __future__ import absolute_import, division
from uuid import uuid4
from datetime import datetime
from sqlalchemy import Column, DateTime, ForeignKey, String
from sqlalchemy.orm import relationship
from sqlalchemy.schema import Index, UniqueConstraint
from changes.config import db
from changes.db.types.guid impo... | 40.5625 | 100 | 0.723677 |
3189ff5072c937c6fb8af27244d0f11e903b02a0 | 1,976 | py | Python | dags/example_bash_operator.py | Fokko/airflow-training-skeleton | a4d6ef69b6361d3a5c6b627171768028ffa6669d | [
"Apache-2.0"
] | null | null | null | dags/example_bash_operator.py | Fokko/airflow-training-skeleton | a4d6ef69b6361d3a5c6b627171768028ffa6669d | [
"Apache-2.0"
] | null | null | null | dags/example_bash_operator.py | Fokko/airflow-training-skeleton | a4d6ef69b6361d3a5c6b627171768028ffa6669d | [
"Apache-2.0"
] | 1 | 2020-07-09T20:34:57.000Z | 2020-07-09T20:34:57.000Z | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | 31.870968 | 81 | 0.73836 |
a1da06a9dd8746ba77f4afd483648aa9249d298c | 6,234 | py | Python | src/gabbs/controls/MapToolAction.py | waneric/pymaplib | 66be80f5e35219d05f6e4341b715816f119a571f | [
"MIT"
] | null | null | null | src/gabbs/controls/MapToolAction.py | waneric/pymaplib | 66be80f5e35219d05f6e4341b715816f119a571f | [
"MIT"
] | null | null | null | src/gabbs/controls/MapToolAction.py | waneric/pymaplib | 66be80f5e35219d05f6e4341b715816f119a571f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
MapToolAction.py - map tool for user events
======================================================================
AUTHOR: Wei Wan, Purdue University
EMAIL: rcac-help@purdue.edu
Copyright (c) 2016 Purdue University
See the file "license.terms" for information on usage and
redistr... | 37.781818 | 118 | 0.614373 |
2d1580e3b7f5f710b197b3743a5654dd71602f01 | 2,809 | py | Python | lib/googlecloudsdk/core/console/style/text.py | bshaffer/google-cloud-sdk | f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9 | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/core/console/style/text.py | bshaffer/google-cloud-sdk | f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9 | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/core/console/style/text.py | bshaffer/google-cloud-sdk | f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*- #
# Copyright 2018 Google 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... | 26.752381 | 74 | 0.692417 |
a2d39147edcf4acf296f7a215930ef578477e64d | 4,112 | py | Python | pyvirchow/deep_model/random_forest.py | saketkc/pyvirchow | 00a639c461cb0905ec329738d6d499e17fdc2c0f | [
"BSD-3-Clause"
] | 4 | 2019-02-27T20:41:26.000Z | 2020-09-20T02:47:05.000Z | pyvirchow/deep_model/random_forest.py | saketkc/pyvirchow | 00a639c461cb0905ec329738d6d499e17fdc2c0f | [
"BSD-3-Clause"
] | null | null | null | pyvirchow/deep_model/random_forest.py | saketkc/pyvirchow | 00a639c461cb0905ec329738d6d499e17fdc2c0f | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import tensorflow as tf
import os
# os.environ["CUDA_VISIBLE_DEVICES"] = ""
from tensorflow.contrib.tensor_forest.python import tensor_forest
from tensorflow.python.ops import resources
BUFFER_SIZE = 1000
NUM_FEATURES = 46
NUM_COLUMNS = NUM_FEATURES + 1
def _parse_csv(rows_string_tensor):
"""... | 33.430894 | 88 | 0.666586 |
a8ad045a7e723ae5f451dd9c5d481288c095881e | 771 | py | Python | python/src/main/python/pyalink/alink/tests/examples/from_docs/test_typeconvertstreamop.py | wenwei8268/Alink | c00702538c95a32403985ebd344eb6aeb81749a7 | [
"Apache-2.0"
] | null | null | null | python/src/main/python/pyalink/alink/tests/examples/from_docs/test_typeconvertstreamop.py | wenwei8268/Alink | c00702538c95a32403985ebd344eb6aeb81749a7 | [
"Apache-2.0"
] | null | null | null | python/src/main/python/pyalink/alink/tests/examples/from_docs/test_typeconvertstreamop.py | wenwei8268/Alink | c00702538c95a32403985ebd344eb6aeb81749a7 | [
"Apache-2.0"
] | null | null | null | import unittest
from pyalink.alink import *
import numpy as np
import pandas as pd
class TestTypeConvertStreamOp(unittest.TestCase):
def test_typeconvertstreamop(self):
df_data = pd.DataFrame([
['Ohio', 2000, 1.5],
['Ohio', 2001, 1.7],
['Ohio', 2002, 3.6],
['... | 28.555556 | 104 | 0.529183 |
58a680dcd3ee1eb2cd66c09ea77fcee5a7287a21 | 3,334 | py | Python | services/web/server/src/simcore_service_webserver/login/storage.py | oetiker/osparc-simcore | 00918bf8f000840cc70cc49458780a55858d52ea | [
"MIT"
] | null | null | null | services/web/server/src/simcore_service_webserver/login/storage.py | oetiker/osparc-simcore | 00918bf8f000840cc70cc49458780a55858d52ea | [
"MIT"
] | 2 | 2018-05-13T09:10:57.000Z | 2019-03-06T08:10:40.000Z | services/web/server/src/simcore_service_webserver/login/storage.py | oetiker/osparc-simcore | 00918bf8f000840cc70cc49458780a55858d52ea | [
"MIT"
] | null | null | null | from logging import getLogger
from datetime import datetime
import enum
import asyncpg
from .utils import get_random_string
from . import sql
from ..db_models import UserRole, UserStatus, ConfirmationAction
log = getLogger(__name__)
class AsyncpgStorage:
def __init__(self, pool, *,
user_table_... | 34.729167 | 83 | 0.579184 |
53fe1d9cf66d1239bb938cc38f56d55e8cd53dd2 | 2,620 | py | Python | ros/src/tl_detector/light_classification/tl_classifier.py | UmbrellaSampler/carnd-term3-3_system_integration | 288f78e613d77a4d37013a521c77327ba9360de7 | [
"MIT"
] | null | null | null | ros/src/tl_detector/light_classification/tl_classifier.py | UmbrellaSampler/carnd-term3-3_system_integration | 288f78e613d77a4d37013a521c77327ba9360de7 | [
"MIT"
] | 7 | 2020-11-13T18:37:36.000Z | 2022-02-10T01:37:50.000Z | ros/src/tl_detector/light_classification/tl_classifier.py | UmbrellaSampler/carnd-term3-3_system_integration | 288f78e613d77a4d37013a521c77327ba9360de7 | [
"MIT"
] | null | null | null | from styx_msgs.msg import TrafficLight
import tensorflow as tf
import numpy as np
import datetime
class TLClassifier(object):
def __init__(self, is_site):
self.graph = tf.Graph()
# Threshold about how confident we need to be to trust the classification
self.threshold = 0.25
# Ch... | 36.388889 | 127 | 0.622519 |
9d04a94ab6a60f2baaf8d5eee2144b243986fa9a | 5,219 | py | Python | contrib/linearize/linearize-hashes.py | BitCoinB3/BitCoinB3 | 2f0c07247042ca4067d6e60e943d5293adf06dbd | [
"MIT"
] | null | null | null | contrib/linearize/linearize-hashes.py | BitCoinB3/BitCoinB3 | 2f0c07247042ca4067d6e60e943d5293adf06dbd | [
"MIT"
] | null | null | null | contrib/linearize/linearize-hashes.py | BitCoinB3/BitCoinB3 | 2f0c07247042ca4067d6e60e943d5293adf06dbd | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#
# linearize-hashes.py: List blocks in a linear, no-fork version of the chain.
#
# Copyright (c) 2013-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
from __future__ impo... | 33.242038 | 108 | 0.609887 |
cd96bf40314033641067d30735085e21da03dc1a | 147 | py | Python | image_loader/image/admin.py | PiochU19/image-loader | 7abec95f5d41e859fe65607ab7bd442a855bc2a0 | [
"MIT"
] | null | null | null | image_loader/image/admin.py | PiochU19/image-loader | 7abec95f5d41e859fe65607ab7bd442a855bc2a0 | [
"MIT"
] | null | null | null | image_loader/image/admin.py | PiochU19/image-loader | 7abec95f5d41e859fe65607ab7bd442a855bc2a0 | [
"MIT"
] | null | null | null | from django.contrib import admin
from image_loader.image.models import Image, MainImage
admin.site.register(Image)
admin.site.register(MainImage) | 24.5 | 54 | 0.836735 |
751b9637bb9ebb2b257b22256ab254d70f545eec | 27,617 | py | Python | addon.py | allejok96/plugin.video.jwb-unofficial | 3f7f7bc58c5d8695655eecaff9e0d4a9f4a6a4a8 | [
"Apache-2.0"
] | 10 | 2018-10-18T04:47:27.000Z | 2021-07-09T15:27:49.000Z | addon.py | allejok96/plugin.video.jwb-unofficial | 3f7f7bc58c5d8695655eecaff9e0d4a9f4a6a4a8 | [
"Apache-2.0"
] | 9 | 2019-01-26T19:00:05.000Z | 2021-08-02T19:34:10.000Z | addon.py | allejok96/plugin.video.jwb-unofficial | 3f7f7bc58c5d8695655eecaff9e0d4a9f4a6a4a8 | [
"Apache-2.0"
] | 8 | 2018-11-17T14:38:45.000Z | 2020-12-15T22:25:42.000Z | # Licensed under the Apache License, Version 2.0
from __future__ import unicode_literals, division, print_function, absolute_import
import sys
import os.path
import json
import random
import time
import traceback
from kodi_six import xbmc, xbmcaddon, xbmcgui, xbmcplugin, py2_decode, py2_encode
from resources.lib.con... | 36.530423 | 117 | 0.615997 |
5417c8561383c92ad465964c03d5fc9b5a4c203b | 25,770 | py | Python | scripts/plot.py | t1mm3/fluid_coprocessing | 2cec71e1b9cb52cccf6c29ccf7193b845e67bc48 | [
"BSD-3-Clause"
] | 2 | 2019-07-01T14:38:55.000Z | 2021-03-16T14:05:26.000Z | scripts/plot.py | t1mm3/fluid_coprocessing | 2cec71e1b9cb52cccf6c29ccf7193b845e67bc48 | [
"BSD-3-Clause"
] | null | null | null | scripts/plot.py | t1mm3/fluid_coprocessing | 2cec71e1b9cb52cccf6c29ccf7193b845e67bc48 | [
"BSD-3-Clause"
] | 1 | 2019-11-28T07:25:03.000Z | 2019-11-28T07:25:03.000Z | #!/bin/env python2
import matplotlib as mpl
mpl.use('pgf')
pgf_with_pgflatex = {
"pgf.texsystem": "pdflatex",
"pgf.rcfonts": False,
"pgf.preamble": [
r"\usepackage[utf8x]{inputenc}",
r"\usepackage[T1]{fontenc}",
# r"\usepackage{cmbright}",
]
}
mpl.rcParams.update(pgf_wit... | 35.742025 | 168 | 0.628483 |
15f6c15b7324f346a644f77be3b498fa95a0eb4f | 2,414 | py | Python | data/p4VQE/R4/benchmark/startQiskit_noisy243.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R4/benchmark/startQiskit_noisy243.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R4/benchmark/startQiskit_noisy243.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=3
# total number=11
import numpy as np
from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ
import networkx as nx
from qiskit.visualization import plot_histogram
from typing import *
from pprint import pprint
from math import log2
from collectio... | 26.822222 | 118 | 0.630489 |
d23740c39cbb54db780248456b896d0be772c490 | 275 | py | Python | sdk/python/pulumi_aws/elastictranscoder/__init__.py | johnktims/pulumi-aws | c838bc79043f5376c66fc66275a1e012edd3ab7d | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/elastictranscoder/__init__.py | johnktims/pulumi-aws | c838bc79043f5376c66fc66275a1e012edd3ab7d | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/elastictranscoder/__init__.py | johnktims/pulumi-aws | c838bc79043f5376c66fc66275a1e012edd3ab7d | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-03-08T15:05:29.000Z | 2021-03-08T15:05:29.000Z | # 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! ***
# Export this package's modules as members:
from .pipeline import *
from .preset import *
| 34.375 | 87 | 0.709091 |
5c9c98578e02e30ce326027dca93cbb61a9ba9b1 | 9,493 | py | Python | external/anomaly/ote_anomalib/data/create_mvtec_ad_json_annotations.py | opencv/training_toolbox_tensorflow | 0db418e3e20f6c64a4ea655e12983759100b7f8e | [
"Apache-2.0"
] | 44 | 2018-10-27T15:28:19.000Z | 2019-02-26T12:50:39.000Z | external/anomaly/ote_anomalib/data/create_mvtec_ad_json_annotations.py | opencv/training_toolbox_tensorflow | 0db418e3e20f6c64a4ea655e12983759100b7f8e | [
"Apache-2.0"
] | 31 | 2018-11-09T20:33:47.000Z | 2019-02-28T09:58:22.000Z | external/anomaly/ote_anomalib/data/create_mvtec_ad_json_annotations.py | opencv/training_toolbox_tensorflow | 0db418e3e20f6c64a4ea655e12983759100b7f8e | [
"Apache-2.0"
] | 27 | 2018-11-05T21:59:34.000Z | 2019-02-28T14:28:50.000Z | # Copyright (C) 2020-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
"""Create MVTec AD (CC BY-NC-SA 4.0) JSON Annotations for OTE CLI.
Description:
This script converts MVTec AD dataset masks to OTE CLI annotation format for
classification, detection and segmentation tasks.
License:
M... | 34.900735 | 117 | 0.674181 |
7be50e0551e81ba30cf3b12575eb194810b0be70 | 903 | py | Python | Python/Algorithms/Deep Learning Algorithms/ActivationFunction.py | ThunderZ007/Data-Structures-and-Algorithms | 148415faf6472115f6848b1a4e21b660b6d327da | [
"MIT"
] | 245 | 2020-10-05T14:52:37.000Z | 2022-03-29T07:40:38.000Z | Python/Algorithms/Deep Learning Algorithms/ActivationFunction.py | ThunderZ007/Data-Structures-and-Algorithms | 148415faf6472115f6848b1a4e21b660b6d327da | [
"MIT"
] | 521 | 2020-10-05T15:25:29.000Z | 2021-11-09T13:24:01.000Z | Python/Algorithms/Deep Learning Algorithms/ActivationFunction.py | ThunderZ007/Data-Structures-and-Algorithms | 148415faf6472115f6848b1a4e21b660b6d327da | [
"MIT"
] | 521 | 2020-10-05T15:29:42.000Z | 2022-03-27T10:22:00.000Z | """
__FileCreationDate__ : 4/5/2020
__Author__ : coder-dev-geek
__Package__ : Python 3
"""
import numpy as np
# Call Method : https://www.geeksforgeeks.org/__call__-in-python/
class Sigmoid:
""" Softmax gives the probability of output function
Range : 0 to 1
"""
def __call_... | 16.418182 | 65 | 0.58804 |
aa064e42d40590f79d258d9c878490ec6dcad097 | 3,719 | py | Python | ig_bot/scripts/gather_and_resize_user_images.py | simoncrowe/instagraph-bot | e786d214c531259b3a2e8150b4dc792ad75cea62 | [
"MIT"
] | null | null | null | ig_bot/scripts/gather_and_resize_user_images.py | simoncrowe/instagraph-bot | e786d214c531259b3a2e8150b4dc792ad75cea62 | [
"MIT"
] | 2 | 2021-12-05T14:03:31.000Z | 2022-03-20T13:19:25.000Z | ig_bot/scripts/gather_and_resize_user_images.py | simoncrowe/instagraph-bot | e786d214c531259b3a2e8150b4dc792ad75cea62 | [
"MIT"
] | null | null | null | from datetime import datetime
import json
import click
from os import path, walk
from PIL import Image, ImageOps
import yaml
from util import initialise_logger
def image_paths_and_ids(directory: str, oldest: datetime, logger):
for dirpath, _, filenames in walk(directory):
if "data.json" not in filenames... | 36.106796 | 119 | 0.657973 |
1595d23e19ccdcd4253350398940098779a2c582 | 482 | py | Python | YOYO.py | MohiMad/prayer_times_webscraper | 4a0d942938b567bed9407c176e7fdffc4af20f84 | [
"MIT"
] | null | null | null | YOYO.py | MohiMad/prayer_times_webscraper | 4a0d942938b567bed9407c176e7fdffc4af20f84 | [
"MIT"
] | null | null | null | YOYO.py | MohiMad/prayer_times_webscraper | 4a0d942938b567bed9407c176e7fdffc4af20f84 | [
"MIT"
] | null | null | null | import bluetooth
from playsound import playsound
class YOYO():
def __init__(self):
self.address = "00:75:58:1D:31:D7"
self.name = "YOYO"
self.nearby_devices = bluetooth.discover_devices(duration=1,lookup_names=True, flush_cache=True, lookup_class=False)
self.server_sock = bluetooth.... | 28.352941 | 124 | 0.661826 |
20dc2e693a7a99dd449a533c43f8b56dc7bc0be0 | 5,600 | py | Python | id/settings.py | argob/id-mi-argentina-distro | ba013f8a06d4b68464a599a1bfaad917e801eeef | [
"MIT"
] | 4 | 2019-12-12T21:40:08.000Z | 2020-03-07T05:13:41.000Z | id/settings.py | argob/id-mi-argentina-distro | ba013f8a06d4b68464a599a1bfaad917e801eeef | [
"MIT"
] | 7 | 2020-11-05T00:31:43.000Z | 2022-02-10T10:40:17.000Z | id/settings.py | argob/id-mi-argentina-distro | ba013f8a06d4b68464a599a1bfaad917e801eeef | [
"MIT"
] | 3 | 2019-12-09T19:53:34.000Z | 2020-10-30T02:15:09.000Z | # coding=utf-8
import os
from settings_custom import LOCAL_APPS, LOCAL_MIDDLEWARE
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
DEBUG = True
SITE_URL = 'http://localhost:8000'
MIAR_URL = 'http://localhost:3000'
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'... | 28.571429 | 95 | 0.635179 |
ac836539d9d8f639dbaa1fc6a8c33bcd2fcd1a1b | 494 | py | Python | data/scripts/templates/object/tangible/component/weapon/shared_projectile_rifle_barrel.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/tangible/component/weapon/shared_projectile_rifle_barrel.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/tangible/component/weapon/shared_projectile_rifle_barrel.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | 20 | 2015-04-04T16:35:59.000Z | 2022-03-24T14:54:37.000Z | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Tangible()
result.template = "object/tangible/component/weapon/shared_projectile_rifle_barrel.iff"
result.attribu... | 29.058824 | 88 | 0.751012 |
99152d7e2a1fb59625ee20732614a5d0d130c2f5 | 1,413 | py | Python | utils/middleware.py | Yuvv/mlpm-jobs | f907c2379aa1c743e6fe7eeec70e12f0e77292d9 | [
"MIT"
] | 2 | 2018-12-05T14:50:19.000Z | 2019-06-02T14:49:49.000Z | utils/middleware.py | wwwanjian/hte_jobs | 7899136f6d935e01c336b8ff20d54c599e748891 | [
"MIT"
] | 1 | 2020-04-12T14:21:35.000Z | 2020-04-12T14:21:35.000Z | utils/middleware.py | wwwanjian/hte_jobs | 7899136f6d935e01c336b8ff20d54c599e748891 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# @File : middleware.py
# @Author : Yuvv
# @Date : 2018/5/5
import hashlib
import base64
from datetime import datetime
import settings
from utils.error import MLPMJobErrorEnum, MLPMJobException
def check_authorization(timestamp, authorization):
utc_timestamp = datetime.utcnow().tim... | 32.860465 | 86 | 0.605096 |
942fc4938b5f3259b256e0d068346f8920467781 | 23,298 | py | Python | src/sage/categories/finite_posets.py | bopopescu/sage-5 | 9d85b34956ca2edd55af307f99c5d3859acd30bf | [
"BSL-1.0"
] | null | null | null | src/sage/categories/finite_posets.py | bopopescu/sage-5 | 9d85b34956ca2edd55af307f99c5d3859acd30bf | [
"BSL-1.0"
] | null | null | null | src/sage/categories/finite_posets.py | bopopescu/sage-5 | 9d85b34956ca2edd55af307f99c5d3859acd30bf | [
"BSL-1.0"
] | null | null | null | r"""
Finite posets
Here is some terminology used in this file:
- An *order filter* (or *upper set*) is a subset `S` such that if `x \leq y` and `x\in S` then `y\in S`.
- An *order ideal* (or *lower set*) is a subset `S` such that if `x \leq y` and `y\in S` then `x\in S`.
"""
#****************************************... | 37.76013 | 137 | 0.483733 |
e9db33a7821044bf3b7cd73b0f0d2171592929a5 | 2,582 | py | Python | sdk/python/pulumi_azure_nextgen/eventgrid/v20180501preview/list_topic_shared_access_keys.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/eventgrid/v20180501preview/list_topic_shared_access_keys.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/eventgrid/v20180501preview/list_topic_shared_access_keys.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** 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
from ... import _utilities, _tables
__a... | 32.683544 | 169 | 0.66615 |
95a4b3bd1e5266e8a5e6a4ee37724a9574b6c99e | 13,285 | py | Python | octavia-4.0.1/octavia/api/drivers/noop_driver/driver.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | null | null | null | octavia-4.0.1/octavia/api/drivers/noop_driver/driver.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | octavia-4.0.1/octavia/api/drivers/noop_driver/driver.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 2 | 2020-03-15T01:24:15.000Z | 2020-07-22T20:34:26.000Z | # Copyright 2018 Rackspace, US 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... | 39.53869 | 79 | 0.653745 |
e97e3af1344239ee12b46dddbb41594c43985a43 | 3,629 | py | Python | django_scripts_tracker/core_tracker.py | Krzysiek555/django-scripts-tracker | 2a7111e01753e85bfcb17d3665ab5330f9abf0b1 | [
"MIT"
] | 2 | 2018-07-04T03:35:06.000Z | 2020-03-23T07:57:35.000Z | django_scripts_tracker/core_tracker.py | Krzysiek555/django-scripts-tracker | 2a7111e01753e85bfcb17d3665ab5330f9abf0b1 | [
"MIT"
] | null | null | null | django_scripts_tracker/core_tracker.py | Krzysiek555/django-scripts-tracker | 2a7111e01753e85bfcb17d3665ab5330f9abf0b1 | [
"MIT"
] | null | null | null | import inspect
import os
from functools import wraps
from django_scripts_tracker.dependency_resolver import build_dependencies_dict, print_dependencies, run_scripts
from django_scripts_tracker.git_plugin import has_uncommited_changes
from django_scripts_tracker.models import AppliedManagementScripts
from django_script... | 41.712644 | 113 | 0.747864 |
8645ca6a7942cb0d47c89bfd687eabb0cf93be62 | 12,714 | py | Python | google/ads/googleads/v9/services/services/campaign_criterion_service/transports/grpc.py | JakobSteixner/google-ads-python | df2b802cc7e78295a4ece21cc7ef3787cd35dab0 | [
"Apache-2.0"
] | null | null | null | google/ads/googleads/v9/services/services/campaign_criterion_service/transports/grpc.py | JakobSteixner/google-ads-python | df2b802cc7e78295a4ece21cc7ef3787cd35dab0 | [
"Apache-2.0"
] | null | null | null | google/ads/googleads/v9/services/services/campaign_criterion_service/transports/grpc.py | JakobSteixner/google-ads-python | df2b802cc7e78295a4ece21cc7ef3787cd35dab0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 42.66443 | 108 | 0.630407 |
511691ada480d5b1ae5ea366a3ef0254ee85414e | 5,890 | py | Python | scripts/planning/chomp.py | adamheins/planar-playground | 24b2eb2e9f50d0ac803539f8860b10dd1a501314 | [
"MIT"
] | null | null | null | scripts/planning/chomp.py | adamheins/planar-playground | 24b2eb2e9f50d0ac803539f8860b10dd1a501314 | [
"MIT"
] | null | null | null | scripts/planning/chomp.py | adamheins/planar-playground | 24b2eb2e9f50d0ac803539f8860b10dd1a501314 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Basic implementation of CHOMP trajectory optimization algorithm.
Optimize over q1...qn, with q0 and qn+1 the fixed end points.
"""
import numpy as np
import matplotlib.pyplot as plt
from scipy import sparse
import IPython
from mm2d import models
class CircleField:
def __init__(self, c,... | 23.098039 | 85 | 0.544482 |
5466c5287d8eeaa7a36527dd7daee64903b4bf8b | 18,831 | py | Python | gslib/utils/posix_util.py | rebecca-pete/gsutil | 8ddd71377609669474427e9f5c2d5f66f1ed296f | [
"Apache-2.0"
] | null | null | null | gslib/utils/posix_util.py | rebecca-pete/gsutil | 8ddd71377609669474427e9f5c2d5f66f1ed296f | [
"Apache-2.0"
] | null | null | null | gslib/utils/posix_util.py | rebecca-pete/gsutil | 8ddd71377609669474427e9f5c2d5f66f1ed296f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2016 Google 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 require... | 34.743542 | 80 | 0.663268 |
5258357cbf0bb9f89e29bd07a3ba0d0e606dfa7b | 2,072 | py | Python | aliyun-python-sdk-ess/aliyunsdkess/request/v20140828/SuspendProcessesRequest.py | LittleJober/aliyun-openapi-python-sdk | f45cfa2248a5c8c47b2cebc1d4d1c2516b94df76 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-ess/aliyunsdkess/request/v20140828/SuspendProcessesRequest.py | LittleJober/aliyun-openapi-python-sdk | f45cfa2248a5c8c47b2cebc1d4d1c2516b94df76 | [
"Apache-2.0"
] | 1 | 2020-05-31T14:51:47.000Z | 2020-05-31T14:51:47.000Z | aliyun-python-sdk-ess/aliyunsdkess/request/v20140828/SuspendProcessesRequest.py | LittleJober/aliyun-openapi-python-sdk | f45cfa2248a5c8c47b2cebc1d4d1c2516b94df76 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 36.350877 | 74 | 0.763031 |
0e7de5d733e2e90dd69fff599ab3a9dda1a3b7d1 | 10,008 | py | Python | api_app/tests_ma/test_db/test_repositories/test_workpaces_repository.py | chboudry/AzureTRE | 79011378f19ce0e1030b05937bfb0f5f685bfab9 | [
"MIT"
] | null | null | null | api_app/tests_ma/test_db/test_repositories/test_workpaces_repository.py | chboudry/AzureTRE | 79011378f19ce0e1030b05937bfb0f5f685bfab9 | [
"MIT"
] | null | null | null | api_app/tests_ma/test_db/test_repositories/test_workpaces_repository.py | chboudry/AzureTRE | 79011378f19ce0e1030b05937bfb0f5f685bfab9 | [
"MIT"
] | null | null | null | import pytest
from mock import patch, MagicMock
import uuid
from db.errors import EntityDoesNotExist, InvalidInput, ResourceIsNotDeployed
from db.repositories.operations import OperationRepository
from db.repositories.workspaces import WorkspaceRepository
from models.domain.resource import ResourceType
from models.dom... | 45.490909 | 175 | 0.805955 |
3a66b47688c2ebf1cf24f9c0ea30d51c24c2d655 | 4,360 | py | Python | homeassistant/components/sht31/sensor.py | domwillcode/home-assistant | f170c80bea70c939c098b5c88320a1c789858958 | [
"Apache-2.0"
] | 7 | 2019-02-07T14:14:12.000Z | 2019-07-28T06:56:10.000Z | homeassistant/components/sht31/sensor.py | domwillcode/home-assistant | f170c80bea70c939c098b5c88320a1c789858958 | [
"Apache-2.0"
] | 47 | 2020-07-23T07:13:11.000Z | 2022-03-31T06:01:46.000Z | homeassistant/components/sht31/sensor.py | klauern/home-assistant-core | c18ba6aec0627e6afb6442c678edb5ff2bb17db6 | [
"Apache-2.0"
] | 5 | 2020-03-29T00:29:13.000Z | 2021-09-06T20:58:40.000Z | """Support for Sensirion SHT31 temperature and humidity sensor."""
from datetime import timedelta
import logging
import math
from Adafruit_SHT31 import SHT31
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import (
CONF_MONITORED_CONDITIONS,
CONF_... | 28.684211 | 85 | 0.676606 |
b7c229ea6f85794849e156524616647f4bc121ec | 40,276 | py | Python | python/pipeline/channel.py | avr248/Serving | bd12b303d3e490278dd94461fa8f70dc24c81ec0 | [
"Apache-2.0"
] | 789 | 2019-04-05T09:20:46.000Z | 2022-03-31T13:43:54.000Z | python/pipeline/channel.py | avr248/Serving | bd12b303d3e490278dd94461fa8f70dc24c81ec0 | [
"Apache-2.0"
] | 1,195 | 2019-04-08T10:05:28.000Z | 2022-03-31T03:43:42.000Z | python/pipeline/channel.py | avr248/Serving | bd12b303d3e490278dd94461fa8f70dc24c81ec0 | [
"Apache-2.0"
] | 229 | 2019-04-05T09:20:57.000Z | 2022-03-30T06:21:22.000Z | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 41.736788 | 133 | 0.516635 |
ea59a17c97b162c730a24a4b0ec287e83af69289 | 2,037 | py | Python | pytext/data/featurizer/featurizer.py | liaimi/pytext-1 | ac40f3956bb2ef0d05f07e2d6bf18bc808df82e4 | [
"BSD-3-Clause"
] | 2 | 2019-01-24T00:40:45.000Z | 2019-02-09T00:56:43.000Z | pytext/data/featurizer/featurizer.py | liaimi/pytext-1 | ac40f3956bb2ef0d05f07e2d6bf18bc808df82e4 | [
"BSD-3-Clause"
] | 1 | 2019-06-04T08:19:27.000Z | 2019-06-04T08:19:27.000Z | pytext/data/featurizer/featurizer.py | liaimi/pytext-1 | ac40f3956bb2ef0d05f07e2d6bf18bc808df82e4 | [
"BSD-3-Clause"
] | 1 | 2019-02-02T09:45:06.000Z | 2019-02-02T09:45:06.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
from typing import List, NamedTuple, Optional, Sequence, Tuple
from pytext.config.component import Component, ComponentType
from pytext.config.field_config import FeatureConfig
class InputRecord(NamedTuple):
"""Input da... | 34.525424 | 87 | 0.728522 |
aa01dfdd01df549407145496dc8acfae8ad78551 | 4,031 | py | Python | matching/migrations/0004_auto_20150407_0933.py | popara/jonny-api | 29d90c2c7bb6ac70e91bbaa7aad026d5d9229c55 | [
"MIT"
] | null | null | null | matching/migrations/0004_auto_20150407_0933.py | popara/jonny-api | 29d90c2c7bb6ac70e91bbaa7aad026d5d9229c55 | [
"MIT"
] | null | null | null | matching/migrations/0004_auto_20150407_0933.py | popara/jonny-api | 29d90c2c7bb6ac70e91bbaa7aad026d5d9229c55 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('matching', '0003_auto_20150407_0924'),
]
operations = [
migrations.AlterField(
model_name='beach',
n... | 31.248062 | 153 | 0.534111 |
eaa4a51dcfbe60bca70f6c7d1aa2a42220bdc3bf | 216 | py | Python | vega/core/search_algs/__init__.py | shaido987/vega | 14d5d49fb8bdf96bd1f3fcfac201ce6b6712c3b6 | [
"MIT"
] | 1 | 2021-05-08T07:47:44.000Z | 2021-05-08T07:47:44.000Z | vega/core/search_algs/__init__.py | WholeG/vega | d1ccf1c3ce68a118bdb6775594ceed0f895911e7 | [
"MIT"
] | null | null | null | vega/core/search_algs/__init__.py | WholeG/vega | d1ccf1c3ce68a118bdb6775594ceed0f895911e7 | [
"MIT"
] | null | null | null | from .search_algorithm import SearchAlgorithm
from .ea_conf import EAConfig
from .pareto_front_conf import ParetoFrontConfig
from .pareto_front import ParetoFront
# from .ps_differential import DifferentialAlgorithm
| 36 | 52 | 0.875 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.