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
dfca4efc48ecc61af82c78e3147819cd10885599
295
py
Python
sortColors/sortColors00.py
tnkteja/notthisagain
85e2b2cbea1298a052986e9dfe5e73d022b537f3
[ "MIT" ]
null
null
null
sortColors/sortColors00.py
tnkteja/notthisagain
85e2b2cbea1298a052986e9dfe5e73d022b537f3
[ "MIT" ]
null
null
null
sortColors/sortColors00.py
tnkteja/notthisagain
85e2b2cbea1298a052986e9dfe5e73d022b537f3
[ "MIT" ]
null
null
null
from random import randint A=[ randint(0,2) for _ in xrange(10000)] print A def Solution(A): def swap(A,i,j): tmp=A[i] A[i]=A[j] A[j]=tmp i=0 k=len(A)-1 j=0 while j<k: if A[j]==0: swap(A,i,j) i+=1 if A[j]==2: swap(A,j,k) k-=1 j+=1 return A Solution(A) print A
10.535714
40
0.545763
084342e7f9ed6a380b11f86ca7eaac8753fe6132
1,900
py
Python
api/serializers/roleplay.py
oil-rope/oil-and-rope
6d59c87d4809f120417a90c1624952085486bb06
[ "MIT" ]
8
2019-08-27T20:08:22.000Z
2021-07-23T22:49:47.000Z
api/serializers/roleplay.py
oil-rope/oil-and-rope
6d59c87d4809f120417a90c1624952085486bb06
[ "MIT" ]
73
2020-03-11T18:07:29.000Z
2022-03-28T18:07:47.000Z
api/serializers/roleplay.py
oil-rope/oil-and-rope
6d59c87d4809f120417a90c1624952085486bb06
[ "MIT" ]
4
2020-02-22T19:44:17.000Z
2022-03-08T09:42:45.000Z
from django.apps import apps from rest_framework import serializers from common.constants import models from .chat import ChatSerializer from .common import MappedSerializerMixin Domain = apps.get_model(models.DOMAIN_MODEL) Place = apps.get_model(models.PLACE_MODEL) Race = apps.get_model(models.RACE_MODEL) Session =...
28.787879
119
0.661579
5d22ae78c20cfee4c9fff2a379aff924280485b3
143,912
py
Python
fbgemm_gpu/test/split_table_batched_embeddings_test.py
wfanzju/FBGEMM
a58ab65e27da27949ca0125683a6f83e1e464064
[ "BSD-3-Clause" ]
null
null
null
fbgemm_gpu/test/split_table_batched_embeddings_test.py
wfanzju/FBGEMM
a58ab65e27da27949ca0125683a6f83e1e464064
[ "BSD-3-Clause" ]
null
null
null
fbgemm_gpu/test/split_table_batched_embeddings_test.py
wfanzju/FBGEMM
a58ab65e27da27949ca0125683a6f83e1e464064
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # pyre-ignore-all-errors[56] # Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. import copy import pickle import random import unittest fro...
35.560168
96
0.543131
efcf839b959ddd8c3aff12ec1e709c1f0a57aba0
10,401
py
Python
day_08/main.py
tusharsadhwani/aoc2021
8780760208e40eb6bc64f0726b5b9c2559df0633
[ "MIT" ]
null
null
null
day_08/main.py
tusharsadhwani/aoc2021
8780760208e40eb6bc64f0726b5b9c2559df0633
[ "MIT" ]
null
null
null
day_08/main.py
tusharsadhwani/aoc2021
8780760208e40eb6bc64f0726b5b9c2559df0633
[ "MIT" ]
null
null
null
""" --- Day 8: Seven Segment Search --- You barely reach the safety of the cave when the whale smashes into the cave mouth, collapsing it. Sensors indicate another exit to this cave at a much greater depth, so you have no choice but to press on. As your submarine slowly makes its way through the cave system, you notic...
34.213816
86
0.680511
f7a579f1ca176702a9824450d79c0bd2e1cbde6e
853
py
Python
score_following_game/agents/optim_utils.py
CPJKU/score_following_game
f04e977b09cceb49588dcf8e216909d815a54519
[ "MIT" ]
43
2018-07-18T14:00:04.000Z
2022-01-10T07:34:35.000Z
score_following_game/agents/optim_utils.py
CPJKU/score_following_game
f04e977b09cceb49588dcf8e216909d815a54519
[ "MIT" ]
10
2019-05-08T07:38:26.000Z
2022-01-13T15:06:16.000Z
score_following_game/agents/optim_utils.py
CPJKU/score_following_game
f04e977b09cceb49588dcf8e216909d815a54519
[ "MIT" ]
12
2018-10-10T09:58:49.000Z
2021-12-02T16:45:44.000Z
import numpy as np import torch.optim as optim from ast import literal_eval as make_tuple def cast_optim_params(optim_params): """ :param optim_params: :return: """ for k in optim_params.keys(): # check if argument is a parameter tuple if isinstance(optim_params[k], str) and '(...
21.325
71
0.621336
b3ea6c8d4ab1549c4efb2f076ba0578bbbe33d0f
15,640
py
Python
avwx/service/scrape.py
avwx-rest/avwx-engine
af0ec16630d1d79bca19f2610b5d2b84a782333f
[ "MIT" ]
25
2019-11-27T05:33:04.000Z
2022-02-05T04:04:44.000Z
avwx/service/scrape.py
avwx-rest/avwx-engine
af0ec16630d1d79bca19f2610b5d2b84a782333f
[ "MIT" ]
13
2019-11-18T17:03:54.000Z
2021-09-04T03:53:55.000Z
avwx/service/scrape.py
avwx-rest/avwx-engine
af0ec16630d1d79bca19f2610b5d2b84a782333f
[ "MIT" ]
16
2019-11-18T01:55:49.000Z
2021-09-20T03:22:58.000Z
""" Classes for retrieving raw report strings via web scraping """ # pylint: disable=arguments-differ,invalid-name # stdlib import asyncio as aio import json import random from typing import Any, List, Optional, Tuple, Union # library from xmltodict import parse as parsexml # type: ignore # module from avwx.parsin...
35.30474
127
0.598146
9784f4fb0a748801f41e4829e067a2a2232dc788
1,158
py
Python
salt/_states/metalk8s_sysctl.py
SaintLoong/metalk8s
06fa3a731f35ab0f9ad8d3443fd8f8c4e7037432
[ "Apache-2.0" ]
255
2018-08-03T17:32:53.000Z
2022-03-25T21:51:00.000Z
salt/_states/metalk8s_sysctl.py
SaintLoong/metalk8s
06fa3a731f35ab0f9ad8d3443fd8f8c4e7037432
[ "Apache-2.0" ]
3,259
2018-08-03T00:25:56.000Z
2022-03-31T15:23:11.000Z
salt/_states/metalk8s_sysctl.py
SaintLoong/metalk8s
06fa3a731f35ab0f9ad8d3443fd8f8c4e7037432
[ "Apache-2.0" ]
43
2018-08-08T01:47:22.000Z
2022-03-12T17:49:41.000Z
# -*- coding: utf-8 -*- """ Custom state to handle MetalK8s sysctl. """ from salt.exceptions import CommandExecutionError __virtualname__ = "metalk8s_sysctl" def __virtual__(): if "sysctl.present" not in __states__: return (False, "sysctl state module could not be loaded") return __virtualname__ d...
29.692308
83
0.629534
1fcae82d2d853c8a3b17a3d00de7e0951a9718ff
92
py
Python
TexDBook/src/python/core/static_gzip.py
kkysen/TexDBook
61d9db5f00f04b00fd45ef50d0c8df417548d324
[ "MIT" ]
null
null
null
TexDBook/src/python/core/static_gzip.py
kkysen/TexDBook
61d9db5f00f04b00fd45ef50d0c8df417548d324
[ "MIT" ]
9
2018-05-18T16:19:27.000Z
2022-02-26T03:48:31.000Z
TexDBook/src/python/core/static_gzip.py
kkysen/TexDBook
61d9db5f00f04b00fd45ef50d0c8df417548d324
[ "MIT" ]
1
2018-06-14T04:06:14.000Z
2018-06-14T04:06:14.000Z
from TexDBook.src.python.core.init_app import default_init_app init_app = default_init_app
23
62
0.858696
5435df3090ba3f164d1685ab1d81a1d72ec1b0a5
10,065
py
Python
client-py/SessionTest.py
ljn55966005/iotdb
2788f4aa5450c207f6982d41d2377fcbf5b6f147
[ "Apache-2.0" ]
null
null
null
client-py/SessionTest.py
ljn55966005/iotdb
2788f4aa5450c207f6982d41d2377fcbf5b6f147
[ "Apache-2.0" ]
null
null
null
client-py/SessionTest.py
ljn55966005/iotdb
2788f4aa5450c207f6982d41d2377fcbf5b6f147
[ "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...
29.866469
104
0.695678
f95f89599bfd5570ee14d5db093a8966caff7673
10,874
py
Python
libcloud/compute/drivers/dummy.py
rgharris/libcloud
90971e17bfd7b6bb97b2489986472c531cc8e140
[ "Apache-2.0" ]
null
null
null
libcloud/compute/drivers/dummy.py
rgharris/libcloud
90971e17bfd7b6bb97b2489986472c531cc8e140
[ "Apache-2.0" ]
1
2021-12-06T12:29:13.000Z
2021-12-06T12:29:13.000Z
libcloud/compute/drivers/dummy.py
rgharris/libcloud
90971e17bfd7b6bb97b2489986472c531cc8e140
[ "Apache-2.0" ]
1
2019-08-05T10:12:02.000Z
2019-08-05T10:12:02.000Z
# 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 use ...
30.205556
88
0.536233
abadae2800484f587f23c8acbfd7ec0cc0f42800
15,389
py
Python
pepper/libpepper.py
bloomberg/pepper
c0cbfa6385c0bd6b36f4a352eb482bce87d817c5
[ "Apache-2.0" ]
1
2021-11-09T05:48:51.000Z
2021-11-09T05:48:51.000Z
pepper/libpepper.py
bloomberg/pepper
c0cbfa6385c0bd6b36f4a352eb482bce87d817c5
[ "Apache-2.0" ]
null
null
null
pepper/libpepper.py
bloomberg/pepper
c0cbfa6385c0bd6b36f4a352eb482bce87d817c5
[ "Apache-2.0" ]
2
2018-12-26T18:30:13.000Z
2021-11-09T05:48:29.000Z
''' A Python library for working with Salt's REST API (Specifically the rest_cherrypy netapi module.) ''' import json import logging import re import ssl from pepper.exceptions import PepperException try: ssl._create_default_https_context = ssl._create_stdlib_context except Exception: pass try: from ur...
30.11546
114
0.533303
e956da3f927a9b071dd35764c95c0b81bf8dec0d
4,039
py
Python
project/experiments/exp_017_generate_random_bodies/src/common/utils.py
liusida/thesis-bodies
dceb8a36efd2cefc611f6749a52b56b9d3572f7a
[ "MIT" ]
null
null
null
project/experiments/exp_017_generate_random_bodies/src/common/utils.py
liusida/thesis-bodies
dceb8a36efd2cefc611f6749a52b56b9d3572f7a
[ "MIT" ]
null
null
null
project/experiments/exp_017_generate_random_bodies/src/common/utils.py
liusida/thesis-bodies
dceb8a36efd2cefc611f6749a52b56b9d3572f7a
[ "MIT" ]
null
null
null
import os import pathlib import yaml import torch.nn as nn import numpy as np def get_exp_name(): """Return current experiment folder, such as exp0.""" _full_path = str(pathlib.Path().absolute()) _paths = _full_path.split('/') assert _paths[-1] == "src", f"Project structure has been changed. utils.get...
31.069231
134
0.649913
1d54d3159ceac8afcea6f64b58228dd0371c5710
4,282
py
Python
datagen.py
r-or/cnn-eyetrack
93a09f209aa8d34defc82c8734d35d5ce56b9060
[ "MIT" ]
null
null
null
datagen.py
r-or/cnn-eyetrack
93a09f209aa8d34defc82c8734d35d5ce56b9060
[ "MIT" ]
null
null
null
datagen.py
r-or/cnn-eyetrack
93a09f209aa8d34defc82c8734d35d5ce56b9060
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import sys import os import shutil import argparse from keras.preprocessing.image import ImageDataGenerator, array_to_img, img_to_array, load_img import random from multiprocessing import Pool import cv2 import json aparser = argparse.ArgumentParser() aparser.add_argument('-tSet', help='Choose sourc...
36.598291
118
0.629379
4af45ccb01dd89136ca52d9a90c9fb9a3e45dac9
2,081
py
Python
metro_spider/middlewares.py
xujl930/crawl_metro
99c52f183fbf52a43847d98c2d0e666197a73287
[ "MIT" ]
null
null
null
metro_spider/middlewares.py
xujl930/crawl_metro
99c52f183fbf52a43847d98c2d0e666197a73287
[ "MIT" ]
null
null
null
metro_spider/middlewares.py
xujl930/crawl_metro
99c52f183fbf52a43847d98c2d0e666197a73287
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Define here the models for your spider middleware # # See documentation in: # http://doc.scrapy.org/en/latest/topics/spider-middleware.html from scrapy import signals class SeleniumMiddleware(object): pass class ProxyMiddleware(object): def process_request(self, request, spider): ...
32.015385
78
0.675156
c306bd1ceb02abb80fd505d65bc08f9ef261fea5
2,307
py
Python
examples/time_frequency/plot_source_space_time_frequency.py
fmamashli/mne-python
52f064415e7c9fa8fe243d22108dcdf3d86505b9
[ "BSD-3-Clause" ]
3
2021-01-04T08:45:56.000Z
2021-05-19T12:25:59.000Z
examples/time_frequency/plot_source_space_time_frequency.py
fmamashli/mne-python
52f064415e7c9fa8fe243d22108dcdf3d86505b9
[ "BSD-3-Clause" ]
28
2020-05-07T00:58:34.000Z
2020-08-29T23:02:17.000Z
examples/time_frequency/plot_source_space_time_frequency.py
fmamashli/mne-python
52f064415e7c9fa8fe243d22108dcdf3d86505b9
[ "BSD-3-Clause" ]
3
2019-01-28T13:48:00.000Z
2019-07-10T16:02:11.000Z
""" =================================================== Compute induced power in the source space with dSPM =================================================== Returns STC files ie source estimates of induced power for different bands in the source space. The inverse method is linear based on dSPM inverse operator. "...
33.434783
79
0.625921
575d9e2fad526589921e6daa001d766b9256fb20
2,446
py
Python
setup.py
praveshtora/setup.py
2575104a3132355db74c35224571c00fe660b77e
[ "MIT" ]
null
null
null
setup.py
praveshtora/setup.py
2575104a3132355db74c35224571c00fe660b77e
[ "MIT" ]
1
2019-07-18T16:34:50.000Z
2019-07-18T16:34:50.000Z
setup.py
praveshtora/setup.py
2575104a3132355db74c35224571c00fe660b77e
[ "MIT" ]
null
null
null
try: from setuptools import setup except ImportError: from distutils.core import setup setup( author='Simon Davy', author_email='simon.davy@canonical.com', classifiers=[ 'License :: OSI Approved :: Apache Software License', 'Development Status :: 4 - Beta', 'Intended Audien...
29.829268
235
0.52453
9f1d35be0bf43fc73d090e84f418ac6bc9d8f663
2,253
py
Python
tutorials_for_myself/oop_python/simple_super.py
pestun/ultimate-utils
676002e80422067256c43172a78825ed12954bcb
[ "MIT" ]
5
2021-03-13T16:07:26.000Z
2021-09-09T17:00:36.000Z
tutorials_for_myself/oop_python/simple_super.py
pestun/ultimate-utils
676002e80422067256c43172a78825ed12954bcb
[ "MIT" ]
8
2021-03-09T21:52:09.000Z
2021-12-02T17:23:33.000Z
tutorials_for_myself/oop_python/simple_super.py
pestun/ultimate-utils
676002e80422067256c43172a78825ed12954bcb
[ "MIT" ]
5
2021-03-24T20:38:43.000Z
2022-03-17T07:54:12.000Z
#%% """ super: https://stackoverflow.com/questions/222877/what-does-super-do-in-python-difference-between-super-init-and-expl, https://realpython.com/python-super/#an-overview-of-pythons-super-function subclass = if Child is a subclass of SomeBaseClass then the code from SomeBaseClass will be given to Child. e.g. a Sq...
35.203125
251
0.691966
2d27ad7534a22939c1e34421115867179093f82b
848
py
Python
setup.py
NalbertLeal/pyloading
dd9f9788c961abb1d669dade8603a08be18053d9
[ "Apache-2.0" ]
1
2022-03-23T15:17:07.000Z
2022-03-23T15:17:07.000Z
setup.py
NalbertLeal/pyloading
dd9f9788c961abb1d669dade8603a08be18053d9
[ "Apache-2.0" ]
2
2022-03-23T15:27:36.000Z
2022-03-23T15:47:13.000Z
setup.py
NalbertLeal/pyloading
dd9f9788c961abb1d669dade8603a08be18053d9
[ "Apache-2.0" ]
1
2022-03-23T15:35:16.000Z
2022-03-23T15:35:16.000Z
import setuptools with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setuptools.setup( name="pyloading_bar", packages=['pyloading_bar'], version="0.0.2", author="Nalbert Gabriel Melo Leal", author_email="nalbertgml@gmail.com", description="A python loading bar to use in te...
31.407407
73
0.704009
51647238d25382bd642264723a4136102b0d9e79
1,109
py
Python
admin_resumable/conf.py
fdemmer/django-admin-resumable-js
8a99bd6c1757647d453df08b0391270b0007bb92
[ "MIT" ]
null
null
null
admin_resumable/conf.py
fdemmer/django-admin-resumable-js
8a99bd6c1757647d453df08b0391270b0007bb92
[ "MIT" ]
null
null
null
admin_resumable/conf.py
fdemmer/django-admin-resumable-js
8a99bd6c1757647d453df08b0391270b0007bb92
[ "MIT" ]
1
2019-01-28T18:50:42.000Z
2019-01-28T18:50:42.000Z
# -*- coding: utf-8 -*- from django.conf import settings # resumable.js settings # chunkSize ADMIN_RESUMABLE_CHUNKSIZE = getattr( settings, 'ADMIN_RESUMABLE_CHUNKSIZE', '1*1024*1024' ) # simultaneousUploads ADMIN_RESUMABLE_PARALLEL = getattr( settings, 'ADMIN_RESUMABLE_PARALLEL', 3 ) # priorit...
19.12069
56
0.743012
63959a844e63ec3f482799fcf7318a38acaba918
6,041
py
Python
nltk/classify/scikitlearn.py
dreamhost/nltk
7f1fad731d1bbaa9334a665221d68b86d8164dce
[ "Apache-2.0" ]
8
2015-10-09T03:37:18.000Z
2019-06-02T19:32:40.000Z
nltk/classify/scikitlearn.py
dreamhost/nltk
7f1fad731d1bbaa9334a665221d68b86d8164dce
[ "Apache-2.0" ]
null
null
null
nltk/classify/scikitlearn.py
dreamhost/nltk
7f1fad731d1bbaa9334a665221d68b86d8164dce
[ "Apache-2.0" ]
2
2017-06-02T12:07:23.000Z
2020-05-20T11:36:09.000Z
# Natural Language Toolkit: Interface to scikit-learn classifiers # # Author: Lars Buitinck <L.J.Buitinck@uva.nl> # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT """ scikit-learn (http://scikit-learn.org) is a machine learning library for Python, supporting most of the basic classification algo...
36.173653
83
0.648734
66ba492b520dcc520efaf310c157c0fba6d559c7
985
py
Python
recurce_13/p_part_sort.py
master-cim/algorithm
a57f473ceb32b96240989e31ac33154e55c00724
[ "MIT" ]
1
2022-03-31T07:30:53.000Z
2022-03-31T07:30:53.000Z
recurce_13/p_part_sort.py
master-cim/algorithm
a57f473ceb32b96240989e31ac33154e55c00724
[ "MIT" ]
null
null
null
recurce_13/p_part_sort.py
master-cim/algorithm
a57f473ceb32b96240989e31ac33154e55c00724
[ "MIT" ]
2
2022-03-04T09:42:03.000Z
2022-03-30T14:51:32.000Z
# P. Частичная сортировка # ID успешной посылки def subtraction_items(square): while square != []: i = square.pop() for item in square: yield item - i def partial_sorting(numb, arr): pr_less_bf = 0 pr_big_bf = 0 step = len(arr) - 1 zerr_ar = 1 print(arr) print...
22.386364
63
0.543147
ead2b7fa59348effa8ed51f4b676af53e1b3afe9
1,056
py
Python
demo/admin.py
peopledoc/django-agnocomplete
54cf0d2e63be31fef8d3220815d6e7c4d8594896
[ "MIT" ]
10
2017-12-11T23:33:00.000Z
2022-01-24T05:28:48.000Z
demo/admin.py
peopledoc/django-agnocomplete
54cf0d2e63be31fef8d3220815d6e7c4d8594896
[ "MIT" ]
26
2017-11-21T08:55:29.000Z
2022-02-04T13:44:27.000Z
demo/admin.py
peopledoc/django-agnocomplete
54cf0d2e63be31fef8d3220815d6e7c4d8594896
[ "MIT" ]
2
2018-01-10T09:06:49.000Z
2021-07-11T10:24:23.000Z
from django.contrib import admin from django import forms from agnocomplete import fields from .models import Person, FavoriteColor, Tag, PersonTag # Below, importing unused class from autocomplete.py to trigger # the registering of agnocomplete models from .autocomplete import logger __all__ = ['logger'] class P...
22.956522
64
0.696023
8868bc582e7ba866584143c55579d7fea66793de
2,193
py
Python
Gradient_descent/gradient.py
sadeedbari/DeepLearningNanodegreeU
f0808de900a2141bd1c181cb511c2e909b2ca959
[ "MIT" ]
null
null
null
Gradient_descent/gradient.py
sadeedbari/DeepLearningNanodegreeU
f0808de900a2141bd1c181cb511c2e909b2ca959
[ "MIT" ]
null
null
null
Gradient_descent/gradient.py
sadeedbari/DeepLearningNanodegreeU
f0808de900a2141bd1c181cb511c2e909b2ca959
[ "MIT" ]
null
null
null
import numpy as np from data_prep import features, targets, features_test, targets_test def sigmoid(x): """ Calculate sigmoid """ return 1 / (1 + np.exp(-x)) # TODO: We haven't provided the sigmoid_prime function like we did in # the previous lesson to encourage you to come up with a more # ...
31.328571
84
0.653899
92033d18a9390ed1e090f18483603009a3c5eb69
1,341
py
Python
ads/type_discovery/unknown_detector.py
oracle/accelerated-data-science
d594ed0c8c1365daf4cf9e860daebc760fa9a24b
[ "UPL-1.0", "Apache-2.0" ]
20
2022-02-22T19:07:09.000Z
2022-03-16T17:21:42.000Z
ads/type_discovery/unknown_detector.py
oracle/accelerated-data-science
d594ed0c8c1365daf4cf9e860daebc760fa9a24b
[ "UPL-1.0", "Apache-2.0" ]
null
null
null
ads/type_discovery/unknown_detector.py
oracle/accelerated-data-science
d594ed0c8c1365daf4cf9e860daebc760fa9a24b
[ "UPL-1.0", "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8; -*- # Copyright (c) 2020, 2022 Oracle and/or its affiliates. # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/ from __future__ import print_function, absolute_import, division import pandas as pd from ads.type_discove...
31.928571
104
0.658464
4fc8dd12a56ed039f4beffc8bc385b6f213179fa
606
py
Python
djangoum3/usuarios/forms.py
souluanf/django-essencial
95d4d6d85bbe590ae95c3b26fb9577b97c2f5e7c
[ "MIT" ]
null
null
null
djangoum3/usuarios/forms.py
souluanf/django-essencial
95d4d6d85bbe590ae95c3b26fb9577b97c2f5e7c
[ "MIT" ]
33
2020-08-04T00:46:16.000Z
2022-03-12T00:45:43.000Z
djangoum3/usuarios/forms.py
souluanf/django-essencial
95d4d6d85bbe590ae95c3b26fb9577b97c2f5e7c
[ "MIT" ]
null
null
null
from django.contrib.auth.forms import UserCreationForm, UserChangeForm from .models import CustomUsuario class CustomUsuarioCreateForm(UserCreationForm): model = CustomUsuario fields = ('first_name', 'last_name', 'fone') labels = {'username': 'Username/E-amil'} def save(self, commit=True): user = super().save...
24.24
70
0.742574
2c57b7c23a0afe384195e7aad85cf5f32eec72db
11,421
py
Python
src/icemac/addressbook/browser/search/result/handler/export/test_xls.py
icemac/icemac.addressbook
6197e6e01da922feb100dd0943576523050cd703
[ "BSD-2-Clause" ]
1
2020-03-26T20:16:44.000Z
2020-03-26T20:16:44.000Z
src/icemac/addressbook/browser/search/result/handler/export/test_xls.py
icemac/icemac.addressbook
6197e6e01da922feb100dd0943576523050cd703
[ "BSD-2-Clause" ]
2
2020-02-21T13:04:23.000Z
2020-02-21T13:06:10.000Z
src/icemac/addressbook/browser/search/result/handler/export/test_xls.py
icemac/icemac.addressbook
6197e6e01da922feb100dd0943576523050cd703
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import xlrd from icemac.addressbook.interfaces import IPerson def create_person( field_title, keyword_title, address_book, FieldFactory, FullPersonFactory, PostalAddressFactory): """Create a person in the address book as needed by the tests.""" field_name = FieldFactory...
28.33995
78
0.52456
9b062ee31ce7ce79c8035ca0bfec69b40d8fe30a
2,954
py
Python
tools/nntool/graph/matches/matchers/concat_split.py
mfkiwl/gap_sdk
642b798dfdc7b85ccabe6baba295033f0eadfcd4
[ "Apache-2.0" ]
null
null
null
tools/nntool/graph/matches/matchers/concat_split.py
mfkiwl/gap_sdk
642b798dfdc7b85ccabe6baba295033f0eadfcd4
[ "Apache-2.0" ]
null
null
null
tools/nntool/graph/matches/matchers/concat_split.py
mfkiwl/gap_sdk
642b798dfdc7b85ccabe6baba295033f0eadfcd4
[ "Apache-2.0" ]
1
2021-11-11T02:12:25.000Z
2021-11-11T02:12:25.000Z
# Copyright (C) 2020 GreenWaves Technologies, SAS # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # This progr...
44.089552
117
0.667569
970c5688b87800c968cdb10be770fa14220d07ad
13,880
py
Python
src/SFA.py
wangshansong1/SFA
5a838096ee33d9dc97269aba2fd95295b83ad4d8
[ "MIT" ]
10
2016-12-01T08:11:41.000Z
2022-01-03T11:59:29.000Z
src/SFA.py
wangshansong1/SFA
5a838096ee33d9dc97269aba2fd95295b83ad4d8
[ "MIT" ]
1
2018-10-29T04:03:11.000Z
2018-10-29T04:03:11.000Z
src/SFA.py
Bollegala/SFA
5a838096ee33d9dc97269aba2fd95295b83ad4d8
[ "MIT" ]
1
2018-11-01T01:36:51.000Z
2018-11-01T01:36:51.000Z
""" Peform Spectral Feature Alignment for Cross-Domain Sentiment Classification. @inproceedings{Pan:WWW:2010, Author = {Sinno Jialin Pan and Xiaochuan Ni and Jian-Tao Sun and Qiang Yang and Zheng Chen}, Booktitle = {WWW 2010}, Title = {Cross-Domain Sentiment Classification via Spectral Feature Alignment}, ...
32.429907
99
0.555908
9997540152d31940f55fa2c17dae9fbc9020b34f
1,030
py
Python
project_test/tests/conftest.py
xbello/crispy-forms-foundation
b66e7bf516f158539430b988ba22f2d2e0cb261d
[ "MIT" ]
null
null
null
project_test/tests/conftest.py
xbello/crispy-forms-foundation
b66e7bf516f158539430b988ba22f2d2e0cb261d
[ "MIT" ]
null
null
null
project_test/tests/conftest.py
xbello/crispy-forms-foundation
b66e7bf516f158539430b988ba22f2d2e0cb261d
[ "MIT" ]
null
null
null
""" Some fixture methods """ import os import pytest from crispy_forms.helper import FormHelper from project_test.tests.utils import (get_rendered_template, render_attempted_output) @pytest.fixture(scope='session') def output_test_path(pytestconfig): """Return absolute path...
21.914894
72
0.696117
697934777bce20535c7e719c6b4c0540c24b2b8d
12,016
py
Python
watcher/tests/api/base.py
mail2nsrajesh/watcher
5f179609d0ee145fc7957972c83593cce242884d
[ "Apache-2.0" ]
null
null
null
watcher/tests/api/base.py
mail2nsrajesh/watcher
5f179609d0ee145fc7957972c83593cce242884d
[ "Apache-2.0" ]
null
null
null
watcher/tests/api/base.py
mail2nsrajesh/watcher
5f179609d0ee145fc7957972c83593cce242884d
[ "Apache-2.0" ]
null
null
null
# -*- encoding: utf-8 -*- # # Copyright 2013 Hewlett-Packard Development Company, L.P. # 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.a...
41.150685
79
0.58264
21c8e0712145ce1edeaaf4267daa60c90d077e35
1,566
py
Python
tests/test_complex.py
SkyTruth/gpsdio-vector
fe0472d2304bb625a0a926810c014a01d0bc1b59
[ "Apache-2.0" ]
null
null
null
tests/test_complex.py
SkyTruth/gpsdio-vector
fe0472d2304bb625a0a926810c014a01d0bc1b59
[ "Apache-2.0" ]
2
2015-06-12T21:25:40.000Z
2015-06-15T20:20:15.000Z
tests/test_complex.py
SkyTruth/gpsdio-vector
fe0472d2304bb625a0a926810c014a01d0bc1b59
[ "Apache-2.0" ]
null
null
null
""" More complex tests """ from click.testing import CliRunner import fiona as fio import gpsdio.cli.main from gpsdio_vector_driver.core import Vector def test_additional_fields(tmpdir): p = tmpdir.mkdir('testfiles') testfile = str(p.join('out.shp')) result = CliRunner().invoke(gpsdio.cli.main.main_g...
25.672131
74
0.601533
01cf7e14f3b8f525f047842ca8f587466c5c04a2
59
py
Python
earlier-2020/python_mod_tutorials/mlutiprocess/rpc.py
transcendentsky/py_tutorials
fed8e6c8d79f854a1cebcfd5c37297a163846208
[ "Apache-2.0" ]
1
2018-06-18T12:09:33.000Z
2018-06-18T12:09:33.000Z
earlier-2020/python_mod_tutorials/mlutiprocess/rpc.py
transcendentsky/py_tutorials
fed8e6c8d79f854a1cebcfd5c37297a163846208
[ "Apache-2.0" ]
null
null
null
earlier-2020/python_mod_tutorials/mlutiprocess/rpc.py
transcendentsky/py_tutorials
fed8e6c8d79f854a1cebcfd5c37297a163846208
[ "Apache-2.0" ]
1
2018-06-18T12:13:21.000Z
2018-06-18T12:13:21.000Z
# -*- coding:utf-8 -*- # rpc 一般俗称,远程过程调用,把本地的函数,放到远端去调用。
11.8
33
0.610169
6bc751457c9fd5b3371759d642d9293d8aa78e3e
6,621
py
Python
geocachingapi/geocachingapi.py
Sholofly/geocachingapi-python
759d4da202975b5adda8a968eed10681f4c3d371
[ "MIT" ]
1
2021-04-21T19:24:41.000Z
2021-04-21T19:24:41.000Z
geocachingapi/geocachingapi.py
Sholofly/geocachingapi-python
759d4da202975b5adda8a968eed10681f4c3d371
[ "MIT" ]
1
2021-06-05T11:03:46.000Z
2021-06-05T11:03:46.000Z
geocachingapi/geocachingapi.py
Sholofly/geocachingapi-python
759d4da202975b5adda8a968eed10681f4c3d371
[ "MIT" ]
1
2021-06-05T09:34:25.000Z
2021-06-05T09:34:25.000Z
"""Class for managing one Geocaching API integration.""" from __future__ import annotations import asyncio import json import logging import socket import async_timeout import backoff from yarl import URL from aiohttp import ClientResponse, ClientSession, ClientError from typing import Any, Awaitable, Callable, Dict...
34.664921
109
0.599456
b192b004899e795b2f14f34fe215be5496650975
8,490
py
Python
mythril/leveldb/client.py
LoCorVin/mythril
3cdc86d4f91dc746632a74c3b662fdcd6cef8033
[ "MIT" ]
1
2018-09-07T10:17:35.000Z
2018-09-07T10:17:35.000Z
mythril/leveldb/client.py
LoCorVin/mythril
3cdc86d4f91dc746632a74c3b662fdcd6cef8033
[ "MIT" ]
null
null
null
mythril/leveldb/client.py
LoCorVin/mythril
3cdc86d4f91dc746632a74c3b662fdcd6cef8033
[ "MIT" ]
1
2018-06-14T08:36:03.000Z
2018-06-14T08:36:03.000Z
import binascii import rlp from mythril.leveldb.accountindexing import CountableList from mythril.leveldb.accountindexing import ReceiptForStorage, AccountIndexer import logging from ethereum import utils from ethereum.block import BlockHeader, Block from mythril.leveldb.state import State from mythril.leveldb.eth_db i...
31.679104
120
0.629918
793209c33cac5fdd6dfa29d3f9e9fff496d39815
897
py
Python
share/qt/clean_mac_info_plist.py
zebbra2014/lootcoin
a6bf4df4ce0e7df32e13b06ee19706fdf3c276a3
[ "MIT" ]
null
null
null
share/qt/clean_mac_info_plist.py
zebbra2014/lootcoin
a6bf4df4ce0e7df32e13b06ee19706fdf3c276a3
[ "MIT" ]
null
null
null
share/qt/clean_mac_info_plist.py
zebbra2014/lootcoin
a6bf4df4ce0e7df32e13b06ee19706fdf3c276a3
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Jonas Schnelli, 2013 # make sure the LootCoin-Qt.app contains the right plist (including the right version) # fix made because of serval bugs in Qt mac deployment (https://bugreports.qt-project.org/browse/QTBUG-21267) from string import Template from datetime import date bitcoinDir = "./"; in...
29.9
109
0.725753
2a3c585734cb1118f529718f1ddef64d25f52832
5,246
py
Python
neutron/services/l3_router/l3_router_plugin.py
brandonlogan/neutron
57364544aa8b0e7cd9d73550f287bcad574ba08c
[ "Apache-2.0" ]
1
2017-09-10T09:57:35.000Z
2017-09-10T09:57:35.000Z
neutron/services/l3_router/l3_router_plugin.py
brandonlogan/neutron
57364544aa8b0e7cd9d73550f287bcad574ba08c
[ "Apache-2.0" ]
null
null
null
neutron/services/l3_router/l3_router_plugin.py
brandonlogan/neutron
57364544aa8b0e7cd9d73550f287bcad574ba08c
[ "Apache-2.0" ]
1
2015-05-05T14:41:11.000Z
2015-05-05T14:41:11.000Z
# Copyright (c) 2013 OpenStack Foundation. # 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...
40.045802
78
0.70873
3dd5c2f247549877d77d66260769542b58f56fd9
22,022
py
Python
tortoise/models.py
ITgladiator/tortoise-orm
9a2bd0edd078ae12e5837c22f88c19f8cc84e7d7
[ "Apache-2.0" ]
null
null
null
tortoise/models.py
ITgladiator/tortoise-orm
9a2bd0edd078ae12e5837c22f88c19f8cc84e7d7
[ "Apache-2.0" ]
null
null
null
tortoise/models.py
ITgladiator/tortoise-orm
9a2bd0edd078ae12e5837c22f88c19f8cc84e7d7
[ "Apache-2.0" ]
null
null
null
from copy import copy, deepcopy from typing import Any, Dict, List, Optional, Set, Tuple, Type, TypeVar, Union from pypika import Query from tortoise import fields from tortoise.backends.base.client import BaseDBAsyncClient # noqa from tortoise.exceptions import ConfigurationError, OperationalError from tortoise.fie...
36.280066
99
0.572382
27f7f096092aefcd4db539903c33b89718e74563
1,996
py
Python
sscanss/core/math/misc.py
jfkcooper/SScanSS-2
ae50c1d065732a7742eaf1a7b9a9349907c29f8a
[ "BSD-3-Clause" ]
null
null
null
sscanss/core/math/misc.py
jfkcooper/SScanSS-2
ae50c1d065732a7742eaf1a7b9a9349907c29f8a
[ "BSD-3-Clause" ]
null
null
null
sscanss/core/math/misc.py
jfkcooper/SScanSS-2
ae50c1d065732a7742eaf1a7b9a9349907c29f8a
[ "BSD-3-Clause" ]
null
null
null
""" A collection of miscellaneous functions """ import math import numpy as np from .constants import VECTOR_EPS def clamp(value, min_value=0.0, max_value=1.0): """Clamps a value between a minimum and maximum value. Similar to ``numpy.clip`` but is faster for non-array :param value: number to clamp :...
27.342466
87
0.673347
d11f8be96301f2df52cf1eb085feb90e39e14161
1,002
py
Python
api/kubeops_api/models/credential.py
liqiang-fit2cloud/KubeOperator
cb9346b95d29919570cefa6bea1ce4e5c3f0ee6d
[ "Apache-2.0" ]
3
2019-11-29T03:49:08.000Z
2020-07-29T02:52:51.000Z
api/kubeops_api/models/credential.py
liqiang-fit2cloud/KubeOperator
cb9346b95d29919570cefa6bea1ce4e5c3f0ee6d
[ "Apache-2.0" ]
1
2019-09-09T07:27:51.000Z
2019-09-09T07:27:51.000Z
api/kubeops_api/models/credential.py
liqiang-fit2cloud/KubeOperator
cb9346b95d29919570cefa6bea1ce4e5c3f0ee6d
[ "Apache-2.0" ]
1
2020-03-04T00:29:29.000Z
2020-03-04T00:29:29.000Z
import uuid from django.db import models from django.utils.translation import ugettext_lazy as _ from common import models as common_models __all__ = ["Credential"] class Credential(models.Model): CREDENTIAL_TYPE_PASSWORD = "password" CREDENTIAL_TYPE_PRIVATE_KEY = "privateKey" CREDENTIAL_TYPE_CHOICES = ...
41.75
110
0.771457
741c8f4c5fd6199dbc7495862bdc07f926b62bf6
2,699
py
Python
src/testServer2.py
cyberjacob/caveman
4ee3ff557a6325d305f3ce44822042787f648e3b
[ "MIT" ]
null
null
null
src/testServer2.py
cyberjacob/caveman
4ee3ff557a6325d305f3ce44822042787f648e3b
[ "MIT" ]
null
null
null
src/testServer2.py
cyberjacob/caveman
4ee3ff557a6325d305f3ce44822042787f648e3b
[ "MIT" ]
null
null
null
import socket import threading def start(): sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) # listen for upto 50 cnxns on port 8000 sock.bind(('', 1337)) sock.listen(50) print '[L] Socket Opened, listening for connections' ...
29.988889
92
0.601704
600b3789d3e479a43cbfd1ea40eb0e340aefacc2
7,792
py
Python
trestle/core/validator_helper.py
PritamDutt/compliance-trestle
7edadde2bd2949e73a085bd78ef57995250fc9cb
[ "Apache-2.0" ]
null
null
null
trestle/core/validator_helper.py
PritamDutt/compliance-trestle
7edadde2bd2949e73a085bd78ef57995250fc9cb
[ "Apache-2.0" ]
null
null
null
trestle/core/validator_helper.py
PritamDutt/compliance-trestle
7edadde2bd2949e73a085bd78ef57995250fc9cb
[ "Apache-2.0" ]
null
null
null
# -*- mode:python; coding:utf-8 -*- # Copyright (c) 2020 IBM Corp. 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 # https://www.apache.org/licenses/LICENSE-2.0 # # ...
43.049724
112
0.681083
cb50e81555b89c6d1c894c64edfccfda6a6106cd
3,262
py
Python
jaseci_core/jaseci/tests/test_ll_proto.py
panikingginoo12/jaseci
6659ab3a3edde865e2ff9a8dc6f2c0f98588d05b
[ "MIT" ]
null
null
null
jaseci_core/jaseci/tests/test_ll_proto.py
panikingginoo12/jaseci
6659ab3a3edde865e2ff9a8dc6f2c0f98588d05b
[ "MIT" ]
null
null
null
jaseci_core/jaseci/tests/test_ll_proto.py
panikingginoo12/jaseci
6659ab3a3edde865e2ff9a8dc6f2c0f98588d05b
[ "MIT" ]
null
null
null
from jaseci.utils.mem_hook import mem_hook from jaseci.actor.sentinel import sentinel from jaseci.graph.graph import graph from jaseci.utils.utils import TestCaseHelper from unittest import TestCase import jaseci.tests.jac_test_code as jtc import uuid class jac_tests(TestCaseHelper, TestCase): """Unit tests for...
36.244444
69
0.643777
d2b6a9f7dd79c655a9660652c362663a58f9580a
4,277
py
Python
homeassistant/components/axis/binary_sensor.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
homeassistant/components/axis/binary_sensor.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
24,710
2016-04-13T08:27:26.000Z
2020-03-02T12:59:13.000Z
homeassistant/components/axis/binary_sensor.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""Support for Axis binary sensors.""" from datetime import timedelta from axis.event_stream import ( CLASS_INPUT, CLASS_LIGHT, CLASS_MOTION, CLASS_OUTPUT, CLASS_PTZ, CLASS_SOUND, FenceGuard, LoiteringGuard, MotionGuard, ObjectAnalytics, Vmd4, ) from homeassistant.component...
31.91791
99
0.658639
ab93b2085547833b423cda098819eb107c821fc8
1,055
py
Python
hacker/qqpy/bin/pilfont.py
sanyueyuxincao/web-crawling
dc134bd6e23572a3ebfd851d0ffb6dd84cb16c1f
[ "MIT" ]
null
null
null
hacker/qqpy/bin/pilfont.py
sanyueyuxincao/web-crawling
dc134bd6e23572a3ebfd851d0ffb6dd84cb16c1f
[ "MIT" ]
null
null
null
hacker/qqpy/bin/pilfont.py
sanyueyuxincao/web-crawling
dc134bd6e23572a3ebfd851d0ffb6dd84cb16c1f
[ "MIT" ]
2
2019-05-19T08:12:45.000Z
2021-08-28T07:16:42.000Z
#!/Users/het/Desktop/hacker/qqpy/bin/python3.6 # # The Python Imaging Library # $Id$ # # PIL raster font compiler # # history: # 1997-08-25 fl created # 2002-03-10 fl use "from PIL import" # from __future__ import print_function import glob import sys # drivers from PIL import BdfFontFile from PIL import PcfFont...
18.189655
68
0.603791
749f7a9d598282af633a0652fad7442d75c78cea
1,522
py
Python
data/train/python/749f7a9d598282af633a0652fad7442d75c78ceaurls.py
harshp8l/deep-learning-lang-detection
2a54293181c1c2b1a2b840ddee4d4d80177efb33
[ "MIT" ]
84
2017-10-25T15:49:21.000Z
2021-11-28T21:25:54.000Z
data/train/python/749f7a9d598282af633a0652fad7442d75c78ceaurls.py
vassalos/deep-learning-lang-detection
cbb00b3e81bed3a64553f9c6aa6138b2511e544e
[ "MIT" ]
5
2018-03-29T11:50:46.000Z
2021-04-26T13:33:18.000Z
data/train/python/749f7a9d598282af633a0652fad7442d75c78ceaurls.py
vassalos/deep-learning-lang-detection
cbb00b3e81bed3a64553f9c6aa6138b2511e544e
[ "MIT" ]
24
2017-11-22T08:31:00.000Z
2022-03-27T01:22:31.000Z
from django.conf.urls import patterns, include, url from django.contrib import admin from django.conf import settings from django.conf.urls.static import static from uploadFile.views import upload_file, search_file, my_reports, report_view from userAccount.views import create_account, auth_view, user_home, logout, man...
50.733333
115
0.532852
ea5374754678fb3f9d0949ba9f4625f1b130479a
9,271
py
Python
sysinv/sysinv/sysinv/sysinv/puppet/openstack.py
MarioCarrilloA/config
06a6f142d154970ce658e979822cd84ce447f612
[ "Apache-2.0" ]
null
null
null
sysinv/sysinv/sysinv/sysinv/puppet/openstack.py
MarioCarrilloA/config
06a6f142d154970ce658e979822cd84ce447f612
[ "Apache-2.0" ]
null
null
null
sysinv/sysinv/sysinv/sysinv/puppet/openstack.py
MarioCarrilloA/config
06a6f142d154970ce658e979822cd84ce447f612
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2017 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # import abc import keyring from sysinv.common import constants from sysinv.puppet import base from sysinv.helm import common class OpenstackBasePuppet(base.BasePuppet): def _get_service_config(self, service): conf...
37.383065
80
0.653328
97c2e0e9f5b016e2f11bf7b13558595494c840ad
2,219
py
Python
IPython/html/widgets/widget_int.py
ptone/ipython
b91d6a658d4526746dcbfb62e653d71c5d84eee9
[ "BSD-3-Clause-Clear" ]
null
null
null
IPython/html/widgets/widget_int.py
ptone/ipython
b91d6a658d4526746dcbfb62e653d71c5d84eee9
[ "BSD-3-Clause-Clear" ]
null
null
null
IPython/html/widgets/widget_int.py
ptone/ipython
b91d6a658d4526746dcbfb62e653d71c5d84eee9
[ "BSD-3-Clause-Clear" ]
null
null
null
"""IntWidget class. Represents an unbounded int using a widget. """ #----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distribu...
36.983333
98
0.547093
58b9876cad961b1de557b34b2cc972c55d636091
14,053
py
Python
SpoTwillio/lib/python3.6/site-packages/twilio/rest/api/v2010/account/transcription.py
Natfan/funlittlethings
80d5378b45b5c0ead725942ee50403bd057514a6
[ "MIT" ]
3
2019-11-12T07:55:51.000Z
2020-04-01T11:19:18.000Z
SpoTwillio/lib/python3.6/site-packages/twilio/rest/api/v2010/account/transcription.py
Natfan/funlittlethings
80d5378b45b5c0ead725942ee50403bd057514a6
[ "MIT" ]
7
2020-06-06T01:06:19.000Z
2022-02-10T11:15:14.000Z
SpoTwillio/lib/python3.6/site-packages/twilio/rest/api/v2010/account/transcription.py
Natfan/funlittlethings
80d5378b45b5c0ead725942ee50403bd057514a6
[ "MIT" ]
2
2019-10-20T14:54:47.000Z
2020-06-11T07:29:37.000Z
# coding=utf-8 """ This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import InstanceResource from twilio.base....
31.579775
96
0.611186
63d3491390bafef125136c3a96eb9b6a26127b0f
1,317
py
Python
flow/utils/runningstat.py
mepear/flow
4fc6ceaf64ca522b5a5c4104a3098b20cf207dd4
[ "MIT" ]
1
2021-03-05T07:39:51.000Z
2021-03-05T07:39:51.000Z
flow/utils/runningstat.py
mepear/flow
4fc6ceaf64ca522b5a5c4104a3098b20cf207dd4
[ "MIT" ]
1
2021-09-13T02:16:02.000Z
2021-09-13T02:16:02.000Z
flow/utils/runningstat.py
mepear/flow
4fc6ceaf64ca522b5a5c4104a3098b20cf207dd4
[ "MIT" ]
1
2021-08-21T13:58:30.000Z
2021-08-21T13:58:30.000Z
import numpy as np class RunningStat(object): ''' Keeps track of first and second moments (mean and variance) of a streaming time series. Taken from https://github.com/joschu/modular_rl Math in http://www.johndcook.com/blog/standard_deviation/ ''' def __init__(self, shape): self._...
29.931818
126
0.53303
d0b48b9b14b2fb44169bbe77948eefda93dfbc5b
5,062
py
Python
src/spaceone/inventory/libs/schema/metadata/dynamic_layout.py
jihyungSong/plugin-aws-personal-health-dashboard
5bef4e79d1ee7c27b9231bbe79389218951929c9
[ "Apache-2.0" ]
1
2020-11-16T10:52:02.000Z
2020-11-16T10:52:02.000Z
src/spaceone/inventory/libs/schema/metadata/dynamic_layout.py
jihyungSong/plugin-aws-personal-health-dashboard
5bef4e79d1ee7c27b9231bbe79389218951929c9
[ "Apache-2.0" ]
2
2022-03-24T05:09:23.000Z
2022-03-28T06:33:01.000Z
src/spaceone/inventory/libs/schema/metadata/dynamic_layout.py
jihyungSong/plugin-aws-personal-health-dashboard
5bef4e79d1ee7c27b9231bbe79389218951929c9
[ "Apache-2.0" ]
2
2021-02-18T07:56:17.000Z
2021-03-23T01:53:40.000Z
from schematics import Model from schematics.types import StringType, PolyModelType, ListType from spaceone.inventory.libs.schema.metadata.dynamic_field import BaseDynamicField, TextDyField class LayoutOptions(Model): class Options: serialize_when_none = False root_path = StringType(serialize_when_no...
31.440994
109
0.682537
718cfae0263f8452733b81f0338d1bc44555bfd9
5,642
py
Python
core/ycheck/bugs.py
aserdean/hotsos
a0f17a7ee2f08a4da0a269d478dec7ebb8f12493
[ "Apache-2.0" ]
null
null
null
core/ycheck/bugs.py
aserdean/hotsos
a0f17a7ee2f08a4da0a269d478dec7ebb8f12493
[ "Apache-2.0" ]
null
null
null
core/ycheck/bugs.py
aserdean/hotsos
a0f17a7ee2f08a4da0a269d478dec7ebb8f12493
[ "Apache-2.0" ]
null
null
null
from core import constants from core.log import log from core.checks import DPKGVersionCompare from core.known_bugs_utils import add_known_bug from core.ycheck import ( YDefsLoader, YDefsSection, AutoChecksBase, ) from core.searchtools import FileSearcher, SearchDef class YBugChecker(AutoChecksBase): ...
36.636364
79
0.546083
c39cb6a07546dd686e33bc6d24a298c2cde6bec0
2,620
py
Python
openpeerpower/components/epsonworkforce/sensor.py
pcaston/core
e74d946cef7a9d4e232ae9e0ba150d18018cfe33
[ "Apache-2.0" ]
1
2021-07-08T20:09:55.000Z
2021-07-08T20:09:55.000Z
openpeerpower/components/epsonworkforce/sensor.py
pcaston/core
e74d946cef7a9d4e232ae9e0ba150d18018cfe33
[ "Apache-2.0" ]
47
2021-02-21T23:43:07.000Z
2022-03-31T06:07:10.000Z
openpeerpower/components/epsonworkforce/sensor.py
OpenPeerPower/core
f673dfac9f2d0c48fa30af37b0a99df9dd6640ee
[ "Apache-2.0" ]
null
null
null
"""Support for Epson Workforce Printer.""" from datetime import timedelta from epsonprinter_pkg.epsonprinterapi import EpsonPrinterAPI import voluptuous as vol from openpeerpower.components.sensor import PLATFORM_SCHEMA, SensorEntity from openpeerpower.const import CONF_HOST, CONF_MONITORED_CONDITIONS, PERCENTAGE fro...
30.114943
80
0.674046
b01f4ded78db9a6b7ea6f76cc6ce4fd8e3006101
2,626
py
Python
uctt_cli/__init__.py
james-nesbitt/uc
6bbbdae03c523081e3c70e9514aa45ab539e49fe
[ "MIT" ]
1
2021-02-07T18:47:50.000Z
2021-02-07T18:47:50.000Z
uctt_cli/__init__.py
james-nesbitt/uctt
6bbbdae03c523081e3c70e9514aa45ab539e49fe
[ "MIT" ]
null
null
null
uctt_cli/__init__.py
james-nesbitt/uctt
6bbbdae03c523081e3c70e9514aa45ab539e49fe
[ "MIT" ]
null
null
null
""" UCTT Cli package """ import logging from uctt.plugin import Type, Factory from uctt.environment import Environment from .info import InfoCliPlugin from .config import ConfigCliPlugin from .environment import EnvironmentCliPlugin from .fixtures import FixturesCliPlugin from .output import OutputCliPlugin from ....
28.236559
65
0.760853
4d5496e966038e533f6f785c3c07d826424834fa
19,796
py
Python
sed_config.py
python-enthusiasm/c3po
d3cee842170659526c7a8463e17105d63af479a6
[ "MIT" ]
null
null
null
sed_config.py
python-enthusiasm/c3po
d3cee842170659526c7a8463e17105d63af479a6
[ "MIT" ]
null
null
null
sed_config.py
python-enthusiasm/c3po
d3cee842170659526c7a8463e17105d63af479a6
[ "MIT" ]
null
null
null
# Functions for SED fitting import os import pickle from time import time from string import ascii_uppercase as UPPERS import numpy as np from scipy import integrate from scipy import constants from scipy.interpolate import interp1d as interp from scipy.interpolate import UnivariateSpline as uni_spline import matplotli...
34.669002
87
0.577793
d79afe41e717c3d0bdbf260100e55afe23054ca9
23,952
py
Python
src/lava/lib/dl/slayer/neuron/adrf.py
valmat07/lava-dl
bc91ffbd8caa946afe0db6753ede4daf2bdeda2c
[ "BSD-3-Clause" ]
null
null
null
src/lava/lib/dl/slayer/neuron/adrf.py
valmat07/lava-dl
bc91ffbd8caa946afe0db6753ede4daf2bdeda2c
[ "BSD-3-Clause" ]
null
null
null
src/lava/lib/dl/slayer/neuron/adrf.py
valmat07/lava-dl
bc91ffbd8caa946afe0db6753ede4daf2bdeda2c
[ "BSD-3-Clause" ]
null
null
null
# Copyright (C) 2021 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause """Adaptive RF Izhikevich neuron.""" import numpy as np import torch from . import base from .dynamics import resonator, adaptive_phase_th from ..spike import complex from ..utils import quantize # These are tuned heuristically so that ...
38.261981
79
0.545633
2b612f600c443bc49f88406adfda0bb11e44a1f7
14,711
py
Python
aries_cloudagent/wallet/routes.py
ldej/aries-cloudagent-python
25b7a9c08921e67b0962c434102489884ac403b2
[ "Apache-2.0" ]
null
null
null
aries_cloudagent/wallet/routes.py
ldej/aries-cloudagent-python
25b7a9c08921e67b0962c434102489884ac403b2
[ "Apache-2.0" ]
1
2020-03-06T12:11:29.000Z
2020-03-06T12:11:29.000Z
aries_cloudagent/wallet/routes.py
ldej/aries-cloudagent-python
25b7a9c08921e67b0962c434102489884ac403b2
[ "Apache-2.0" ]
1
2020-04-30T08:22:22.000Z
2020-04-30T08:22:22.000Z
"""Wallet admin routes.""" from aiohttp import web from aiohttp_apispec import ( docs, # match_info_schema, querystring_schema, request_schema, response_schema, ) from marshmallow import fields from ..ledger.base import BaseLedger from ..ledger.endpoint_type import EndpointType from ..ledger.erro...
32.331868
87
0.653864
18fa58dd610ccbb4d20566e11d309b317b29cb93
3,692
py
Python
configs/top_down/resnet/jhmdb/res50_jhmdb_sub1_256x256.py
irvingzhang0512/mmpose
17557522ce3e41f830973079c5b4321935c41439
[ "Apache-2.0" ]
null
null
null
configs/top_down/resnet/jhmdb/res50_jhmdb_sub1_256x256.py
irvingzhang0512/mmpose
17557522ce3e41f830973079c5b4321935c41439
[ "Apache-2.0" ]
null
null
null
configs/top_down/resnet/jhmdb/res50_jhmdb_sub1_256x256.py
irvingzhang0512/mmpose
17557522ce3e41f830973079c5b4321935c41439
[ "Apache-2.0" ]
null
null
null
log_level = 'INFO' load_from = 'https://download.openmmlab.com/mmpose/top_down/resnet/res50_mpii_256x256-418ffc88_20200812.pth' # noqa: E501 resume_from = None dist_params = dict(backend='nccl') workflow = [('train', 1)] checkpoint_config = dict(interval=1) evaluation = dict(interval=1, metric=['PCK', 'tPCK'], key_ind...
27.147059
122
0.618364
795e9e4f2493c0c3db5247271e0247273b09c0e8
428
py
Python
tests/integrationTests/tests/json/__init__.py
hifiadi/Submitty
62a8239313cff7e3f841ff66aeda6b0557e9c15b
[ "BSD-3-Clause" ]
null
null
null
tests/integrationTests/tests/json/__init__.py
hifiadi/Submitty
62a8239313cff7e3f841ff66aeda6b0557e9c15b
[ "BSD-3-Clause" ]
null
null
null
tests/integrationTests/tests/json/__init__.py
hifiadi/Submitty
62a8239313cff7e3f841ff66aeda6b0557e9c15b
[ "BSD-3-Clause" ]
null
null
null
# Necessary imports. Provides library functions to ease writing tests. from lib import testcase @testcase def correct_json_output(test): test.run_validator() # Runs validator.out with default arguments # Check differences on output files. Files within the data directory are compared with # their counterpar...
38.909091
90
0.775701
9772dc66e1e665bee12a41cd09ece76252d51502
511
py
Python
pycritty/commands/__init__.py
binRick/pycritty
ae27e61fe597c22e6830d62533e11d64bf06a3ae
[ "MIT" ]
null
null
null
pycritty/commands/__init__.py
binRick/pycritty
ae27e61fe597c22e6830d62533e11d64bf06a3ae
[ "MIT" ]
null
null
null
pycritty/commands/__init__.py
binRick/pycritty
ae27e61fe597c22e6830d62533e11d64bf06a3ae
[ "MIT" ]
null
null
null
from .pycritty import Pycritty from .ls import ListResource from .save import SaveConfig from .profile import LoadProfile from .create import CreateBinary from .run import RunConfig from .ssh import SSH from .load import LoadConfig from .install import Install from .rm import Remove subcommands = { 'ls': ListResou...
22.217391
32
0.710372
694e5d10fde04e63c1766cf32d4e51d618737be8
25,614
py
Python
airflow/providers/google/cloud/operators/compute.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
3
2021-01-29T20:33:56.000Z
2021-08-06T17:35:16.000Z
airflow/providers/google/cloud/operators/compute.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
210
2021-07-17T00:25:52.000Z
2021-12-29T00:44:48.000Z
airflow/providers/google/cloud/operators/compute.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
3
2020-06-30T02:38:17.000Z
2022-01-19T06:14:08.000Z
# # 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...
42.477612
108
0.671274
6bfa7f2aaf82556910573e9d2d8ec775743def5f
634
py
Python
examples/open-floating-on-ws.py
Hi-Angel/i3ipc-python
93a8f0c39e5082751824b40b51680bcbc16bfce2
[ "BSD-3-Clause" ]
null
null
null
examples/open-floating-on-ws.py
Hi-Angel/i3ipc-python
93a8f0c39e5082751824b40b51680bcbc16bfce2
[ "BSD-3-Clause" ]
null
null
null
examples/open-floating-on-ws.py
Hi-Angel/i3ipc-python
93a8f0c39e5082751824b40b51680bcbc16bfce2
[ "BSD-3-Clause" ]
1
2020-04-24T04:23:12.000Z
2020-04-24T04:23:12.000Z
#!/usr/bin/env python3 # This example shows how to make any window that opens on a workspace floating # All workspaces that start with a string in this list will have their windows # open floating FLOATING_WORKSPACES = [ '3' ] def is_ws_floating(name): for floating_ws in FLOATING_WORKSPACES: if name.star...
22.642857
78
0.709779
afe5a0a4d26a3cc5584f0a93bcfb36e2e990cdec
999
py
Python
tests/test_logger.py
huykingsofm/hks_pylib
d73a896a395df301ef8082a358ec8e23f7bc708a
[ "MIT" ]
2
2021-04-06T07:01:27.000Z
2021-07-30T11:08:59.000Z
tests/test_logger.py
huykingsofm/hks_pylib
d73a896a395df301ef8082a358ec8e23f7bc708a
[ "MIT" ]
null
null
null
tests/test_logger.py
huykingsofm/hks_pylib
d73a896a395df301ef8082a358ec8e23f7bc708a
[ "MIT" ]
null
null
null
import threading from hks_pylib.logger.logger_generator import InvisibleLoggerGenerator, StandardLoggerGenerator from hks_pylib.logger.logger import Display, console_output from hks_pylib.logger.standard import StdLevels, StdUsers from hks_pylib.logger import acprint def test_logger(): invisible_logger_ge...
41.625
96
0.745746
176b55eae40006394d2987e0a8a8c45b8ca74988
2,522
py
Python
src/clustaar/webhook/middlewares/validate_signature_middleware.py
Clustaar/clustaar.webhook
81756ea7168e3281e17844829e6d98d89d372e54
[ "MIT" ]
4
2018-06-08T13:20:33.000Z
2022-01-03T17:00:13.000Z
src/clustaar/webhook/middlewares/validate_signature_middleware.py
Clustaar/clustaar.webhook
81756ea7168e3281e17844829e6d98d89d372e54
[ "MIT" ]
1
2020-08-18T16:10:04.000Z
2020-08-18T16:10:04.000Z
src/clustaar/webhook/middlewares/validate_signature_middleware.py
Clustaar/clustaar.webhook
81756ea7168e3281e17844829e6d98d89d372e54
[ "MIT" ]
2
2018-06-12T06:06:05.000Z
2021-03-04T16:55:37.000Z
import falcon import hashlib import hmac SIGNATURE_HEADER = "X-Hub-Signature" class ValidateSignatureMiddleware(object): """Middleware validating the request signature to prevent request forgery. If signature is invalid a HTTP 400 status code is returned. """ def __init__(self, private_key): ...
34.081081
100
0.619746
77358bad2ba634d05fa0cd9a53c42dff3de53077
1,216
py
Python
tests/test_merge_v4.py
mrtolkien/riotwatcher_dto
777455c45159f177d3a7ba3956043ff26f625c30
[ "MIT" ]
8
2020-10-01T18:01:15.000Z
2022-02-22T22:51:30.000Z
tests/test_merge_v4.py
mrtolkien/riotwatcher_dto
777455c45159f177d3a7ba3956043ff26f625c30
[ "MIT" ]
2
2021-12-15T23:02:02.000Z
2022-01-25T06:07:53.000Z
tests/test_merge_v4.py
mrtolkien/riotwatcher_dto
777455c45159f177d3a7ba3956043ff26f625c30
[ "MIT" ]
4
2020-07-30T23:24:06.000Z
2022-02-21T19:26:01.000Z
import os import lol_dto import roleml from riot_transmute import match_to_game, match_timeline_to_game from riot_transmute.merge_match_and_timeline import ( merge_games_from_riot_match_and_timeline, ) def test_full(match_v4_dto, timeline_game_id_platform_id): timeline, game_id, platform_id = timeline_game_...
28.27907
88
0.780428
73d3c78fc5fe15c84e1042aa75a2c23381f1743f
381
py
Python
Prime Genterator.py
cjw0621/Growing-Python
50d754ab0a9d32f2284b3732df046f1ce849eca4
[ "Unlicense" ]
1
2021-11-21T01:51:30.000Z
2021-11-21T01:51:30.000Z
Prime Genterator.py
cjw0621/Growing-Python
50d754ab0a9d32f2284b3732df046f1ce849eca4
[ "Unlicense" ]
null
null
null
Prime Genterator.py
cjw0621/Growing-Python
50d754ab0a9d32f2284b3732df046f1ce849eca4
[ "Unlicense" ]
null
null
null
def isPrime(x): if x < 2: return False elif x == 2: return True for n in range(2, x): if x % n ==0: return return True def primeGenerator(a, b): #your code goes here for i in range(a, b): if isPrime(i): yield i f = int(in...
19.05
33
0.480315
92252568c48360eeea114393f2168a63e0c79d6d
1,280
py
Python
python/tHome/sma/test/dcPower.py
ZigmundRat/T-Home
5dc8689f52d87dac890051e540b338b009293ced
[ "BSD-2-Clause" ]
18
2016-04-17T19:39:28.000Z
2020-11-19T06:55:20.000Z
python/tHome/sma/test/dcPower.py
ZigmundRat/T-Home
5dc8689f52d87dac890051e540b338b009293ced
[ "BSD-2-Clause" ]
6
2016-10-31T13:53:45.000Z
2019-03-20T20:47:03.000Z
python/tHome/sma/test/dcPower.py
ZigmundRat/T-Home
5dc8689f52d87dac890051e540b338b009293ced
[ "BSD-2-Clause" ]
12
2016-10-31T12:29:08.000Z
2021-12-28T12:18:28.000Z
import unittest from FakeSocket import FakeSocket import tHome as T #=========================================================================== #=========================================================================== class TestDcPower ( T.util.test.Case ) : def test_dcPower( self ): reply = """ 53 4D...
26.666667
76
0.452344
9b855f9637487340a666d4bfa656574793bcc8c9
5,906
py
Python
bahai_writings/documentengine.py
jlbradley1844/python-stuff
8cc65115600f15f11577b3392161b18aedafc663
[ "Apache-2.0" ]
null
null
null
bahai_writings/documentengine.py
jlbradley1844/python-stuff
8cc65115600f15f11577b3392161b18aedafc663
[ "Apache-2.0" ]
null
null
null
bahai_writings/documentengine.py
jlbradley1844/python-stuff
8cc65115600f15f11577b3392161b18aedafc663
[ "Apache-2.0" ]
null
null
null
from docmetadata import DOCUMENT_INDEX, CATEGORIES from documentcollection import DocumentCollection from docutility import DocUtility class DocumentEngine(object): """ The "engine" in the search framework. This is a management object that is used to dispatch searches and retrieve document information ...
41.886525
94
0.620894
b8be835c63b2fbd63c488bfb431e557843d49d69
321
py
Python
devices/api/views.py
ggidofalvy-tc/peering-manager
0c358b108494f51936264f3ec5d600c20827a745
[ "Apache-2.0" ]
173
2020-08-08T15:38:08.000Z
2022-03-21T11:35:25.000Z
devices/api/views.py
ggidofalvy-tc/peering-manager
0c358b108494f51936264f3ec5d600c20827a745
[ "Apache-2.0" ]
192
2020-08-08T22:03:45.000Z
2022-03-31T04:20:44.000Z
devices/api/views.py
ggidofalvy-tc/peering-manager
0c358b108494f51936264f3ec5d600c20827a745
[ "Apache-2.0" ]
33
2020-08-14T21:24:38.000Z
2022-03-06T14:55:13.000Z
from devices.filters import PlatformFilterSet from devices.models import Platform from utils.api import ModelViewSet from .serializers import PlatformSerializer class PlatformViewSet(ModelViewSet): queryset = Platform.objects.all() serializer_class = PlatformSerializer filterset_class = PlatformFilterSet...
26.75
45
0.825545
b00911ba6f15f4db9f06ab3f3a6b12d4bc67f2ce
97
py
Python
tinyq/constants.py
mozillazg/tinyq
fd9ecc593931c9b315c4aeb9150389b3e4ae670e
[ "MIT" ]
14
2017-08-02T23:30:16.000Z
2021-05-31T19:58:29.000Z
tinyq/constants.py
mozillazg/tinyq
fd9ecc593931c9b315c4aeb9150389b3e4ae670e
[ "MIT" ]
null
null
null
tinyq/constants.py
mozillazg/tinyq
fd9ecc593931c9b315c4aeb9150389b3e4ae670e
[ "MIT" ]
2
2017-03-13T09:36:05.000Z
2017-10-27T14:33:48.000Z
# -*- coding: utf-8 -*- DEFAULT_SCHEDULE_QUEUE_KEY = 'schedules' DEFAULT_JOB_QUEUE_KEY = 'jobs'
19.4
40
0.721649
b637e64b98840de93a7fe0a67583d8e680179b5e
2,365
py
Python
f5/bigip/tm/gtm/test/unit/test_topology.py
nghia-tran/f5-common-python
acb23a6e5830a119b460c19a578654113419f5c3
[ "Apache-2.0" ]
272
2016-02-23T06:05:44.000Z
2022-02-20T02:09:32.000Z
f5/bigip/tm/gtm/test/unit/test_topology.py
nghia-tran/f5-common-python
acb23a6e5830a119b460c19a578654113419f5c3
[ "Apache-2.0" ]
1,103
2016-02-11T17:48:03.000Z
2022-02-15T17:13:37.000Z
f5/bigip/tm/gtm/test/unit/test_topology.py
nghia-tran/f5-common-python
acb23a6e5830a119b460c19a578654113419f5c3
[ "Apache-2.0" ]
167
2016-02-11T17:48:21.000Z
2022-01-17T20:13:05.000Z
# Copyright 2014-2017 F5 Networks 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 ...
33.785714
74
0.728964
32d086de6b59c03cd1d45dc1f7ba72ec776da397
1,296
py
Python
djsniper/users/tests/test_admin.py
justdjango/django-nft-sniper
75306fa223493ec60cf621489c264b43110970c8
[ "MIT" ]
18
2021-12-24T05:45:35.000Z
2022-03-30T05:18:53.000Z
djsniper/users/tests/test_admin.py
zevcc-gh/nft-sniper
7ba41adffe7b5157b98a162aa72272a89fb9bda2
[ "MIT" ]
1
2022-03-05T05:58:27.000Z
2022-03-05T05:58:27.000Z
djsniper/users/tests/test_admin.py
zevcc-gh/nft-sniper
7ba41adffe7b5157b98a162aa72272a89fb9bda2
[ "MIT" ]
3
2022-01-09T16:58:02.000Z
2022-02-23T11:53:46.000Z
import pytest from django.urls import reverse from djsniper.users.models import User pytestmark = pytest.mark.django_db class TestUserAdmin: def test_changelist(self, admin_client): url = reverse("admin:users_user_changelist") response = admin_client.get(url) assert response.status_code ...
31.609756
79
0.627315
92344056812b06fc0e60d6715c64a2ff100f3231
10,247
py
Python
src/conan_app_launcher/ui/views/conan_search/conan_search.py
goszpeti/app_grid_conan
bd76c8528e6c6b839abd7a4d26d7194428faed7d
[ "MIT" ]
null
null
null
src/conan_app_launcher/ui/views/conan_search/conan_search.py
goszpeti/app_grid_conan
bd76c8528e6c6b839abd7a4d26d7194428faed7d
[ "MIT" ]
null
null
null
src/conan_app_launcher/ui/views/conan_search/conan_search.py
goszpeti/app_grid_conan
bd76c8528e6c6b839abd7a4d26d7194428faed7d
[ "MIT" ]
null
null
null
import pprint from typing import List, Optional import conan_app_launcher.app as app # using global module pattern from conan_app_launcher.core import open_file from conan_app_launcher.ui.common import AsyncLoader, get_themed_asset_image from conan_app_launcher.ui.dialogs import ConanInstallDialog from conan_a...
46.577273
126
0.684005
327f9d2937c86cfdd5e4bc7284870257183ce69a
16,477
py
Python
flask_unchained/commands/new.py
briancappello/flask-unchained
bff296b5c808f5b1db10f7dddb81054600545749
[ "MIT" ]
69
2018-10-10T01:59:11.000Z
2022-03-29T17:29:30.000Z
flask_unchained/commands/new.py
briancappello/flask-unchained
bff296b5c808f5b1db10f7dddb81054600545749
[ "MIT" ]
18
2018-11-17T12:42:02.000Z
2021-05-22T18:45:27.000Z
flask_unchained/commands/new.py
briancappello/flask-unchained
bff296b5c808f5b1db10f7dddb81054600545749
[ "MIT" ]
7
2018-10-12T16:20:25.000Z
2021-10-06T12:18:21.000Z
import os import re import shutil import sys from flask_unchained.cli import click from flask_unchained.click import default, should_prompt from flask_unchained.string_utils import right_replace from jinja2 import Environment from typing import * JINJA_START_STR = '{#!' JINJA_END_STR = '#}' OTHER_START_STR = '#! ' O...
38.769412
96
0.562906
4256068cff63730a9dd0cd8201382db87631f133
4,701
py
Python
src/cli.py
erick-dsnk/Electric
7e8aad1f792321d7839717ed97b641bee7a4a64e
[ "Apache-2.0" ]
null
null
null
src/cli.py
erick-dsnk/Electric
7e8aad1f792321d7839717ed97b641bee7a4a64e
[ "Apache-2.0" ]
null
null
null
src/cli.py
erick-dsnk/Electric
7e8aad1f792321d7839717ed97b641bee7a4a64e
[ "Apache-2.0" ]
null
null
null
###################################################################### # SUPERCHARGECLI (EXTENSIONS) # ###################################################################### # -*- coding: utf-8 -*- """ Extension for the python ``click`` module to provide a group with a ...
33.340426
127
0.563923
4c68e7e7bf9cc99e90ebe001029982a4c9edd544
10,450
py
Python
adminapp/models.py
utkuerol/ifs
1bd25ecabceeca58776eb3ff82aaaa370e5e157e
[ "MIT" ]
1
2021-09-27T10:56:25.000Z
2021-09-27T10:56:25.000Z
adminapp/models.py
utkuerol/ifs
1bd25ecabceeca58776eb3ff82aaaa370e5e157e
[ "MIT" ]
null
null
null
adminapp/models.py
utkuerol/ifs
1bd25ecabceeca58776eb3ff82aaaa370e5e157e
[ "MIT" ]
null
null
null
from datetime import datetime from django.contrib.auth.models import User from django.core.validators import MinValueValidator from django.db import models from django.urls import reverse from .validators import validate_files import django.utils.timezone as timezone class Dataset(models.Model): """ Model for...
46.035242
236
0.685455
1fc93a89f7883fce3d1a129472c7b324f1443e3a
77
py
Python
20170102_7.py
JaeGyu/PythonEx_1
e67053db6ca7431c3dd66351c190c53229e3f141
[ "MIT" ]
null
null
null
20170102_7.py
JaeGyu/PythonEx_1
e67053db6ca7431c3dd66351c190c53229e3f141
[ "MIT" ]
null
null
null
20170102_7.py
JaeGyu/PythonEx_1
e67053db6ca7431c3dd66351c190c53229e3f141
[ "MIT" ]
null
null
null
def func(a): return a() def func2(): print("test") func(func2)
6.416667
17
0.532468
495bd34d2028cf07547cf287f953b514ef0fa83a
331
py
Python
example/multi_process.py
nlp4faith/transformers-as-service
d47e8ab2a809623834d5aefb90c9339f6ea08541
[ "MIT" ]
1
2020-12-15T10:37:40.000Z
2020-12-15T10:37:40.000Z
example/multi_process.py
nlp4faith/transformers-as-service
d47e8ab2a809623834d5aefb90c9339f6ea08541
[ "MIT" ]
null
null
null
example/multi_process.py
nlp4faith/transformers-as-service
d47e8ab2a809623834d5aefb90c9339f6ea08541
[ "MIT" ]
null
null
null
from multiprocessing import Pool import time def f(x): return x*x if __name__ == '__main__': dicts = {'max_position_embeddings': 512} print(dicts) # with Pool(2) as pool: # # print(p.map(f, [1, 2, 3])) # time.sleep(1) # ret = pool.apply(f, (10,)) # print(ret) # prin...
20.6875
44
0.549849
a4842b2eae755bfa6dbca319f98197003a7e810e
5,254
py
Python
volume/bin/pythonpath/deprecated/classic.py
mottosso/docker
87c2870ed0fba482d3afe67034cd5baabae97dcc
[ "MIT" ]
5
2018-05-24T23:15:02.000Z
2020-01-02T06:53:15.000Z
volume/bin/pythonpath/deprecated/classic.py
mottosso/docker
87c2870ed0fba482d3afe67034cd5baabae97dcc
[ "MIT" ]
42
2018-05-25T15:57:08.000Z
2021-01-17T18:39:59.000Z
volume/bin/pythonpath/deprecated/classic.py
mottosso/docker
87c2870ed0fba482d3afe67034cd5baabae97dcc
[ "MIT" ]
2
2018-05-25T14:42:04.000Z
2018-06-28T10:10:40.000Z
# -*- coding: utf-8 -*- """ Classic deprecation warning =========================== Classic ``@deprecated`` decorator to deprecate old python classes, functions or methods. """ import functools import inspect import warnings import wrapt string_types = (type(b''), type(u'')) class ClassicAdapter(wrapt.AdapterFact...
30.905882
93
0.589265
43e22a4ad79e0f6f39bea750d69f48e7aff40dbe
989
py
Python
examples/calculate_compound_interest.py
mengguo2/accy
d99d9bbcaa80265f90101ce6bd20ad5788556def
[ "MIT" ]
null
null
null
examples/calculate_compound_interest.py
mengguo2/accy
d99d9bbcaa80265f90101ce6bd20ad5788556def
[ "MIT" ]
null
null
null
examples/calculate_compound_interest.py
mengguo2/accy
d99d9bbcaa80265f90101ce6bd20ad5788556def
[ "MIT" ]
1
2018-06-17T23:43:29.000Z
2018-06-17T23:43:29.000Z
from accy.accy_functions import cpd_int """ A. If a 15-year-old student deposits $500 to an online savings account, which offers a constant monthly interest rate of 1.6%, what would his savings be by the time he is 30 years old, assuming he does not add put in any extra money? """ initial_dep = 500 interest_ra...
30.90625
76
0.704752
80f389626a351c33407f350cd0c7784145e8539b
26,921
py
Python
wavefront_api_client/__init__.py
httpsgithu/python-client
f85a530367cdabe458a11919ad35609b9bc0606b
[ "Apache-2.0" ]
null
null
null
wavefront_api_client/__init__.py
httpsgithu/python-client
f85a530367cdabe458a11919ad35609b9bc0606b
[ "Apache-2.0" ]
null
null
null
wavefront_api_client/__init__.py
httpsgithu/python-client
f85a530367cdabe458a11919ad35609b9bc0606b
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # flake8: noqa """ Wavefront REST API Documentation <p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API cal...
82.07622
409
0.92504
701ab26dfe1e09245bf8832de7cb95b228e4ecaf
6,274
py
Python
sktime/tests/_config.py
khrapovs/sktime
1589d007ef5dbcdc1f42f2c8278919ebed516358
[ "BSD-3-Clause" ]
null
null
null
sktime/tests/_config.py
khrapovs/sktime
1589d007ef5dbcdc1f42f2c8278919ebed516358
[ "BSD-3-Clause" ]
null
null
null
sktime/tests/_config.py
khrapovs/sktime
1589d007ef5dbcdc1f42f2c8278919ebed516358
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- __author__ = ["mloning"] __all__ = ["ESTIMATOR_TEST_PARAMS", "EXCLUDE_ESTIMATORS", "EXCLUDED_TESTS"] import numpy as np from pyod.models.knn import KNN from sklearn.preprocessing import FunctionTransformer, StandardScaler from sktime.annotation.adapters import PyODAnnotator from sktime.annota...
36.690058
86
0.741792
a7e33c7b147a183b5c598f9eb3ee46a21886a9ea
889
py
Python
marketvalue.py
plooploops/rosterrun
3ee19392e358a6ee465dca36be7c4d903a64c36c
[ "Apache-2.0" ]
null
null
null
marketvalue.py
plooploops/rosterrun
3ee19392e358a6ee465dca36be7c4d903a64c36c
[ "Apache-2.0" ]
null
null
null
marketvalue.py
plooploops/rosterrun
3ee19392e358a6ee465dca36be7c4d903a64c36c
[ "Apache-2.0" ]
null
null
null
from mathutility import median, min, max def median_values(items = {}): if len(items) == 0: return None results = {} for k in items.keys(): results[k] = median(items[k]) return results def min_values(items = {}): if len(items) == 0: return None results = {} for k in items.keys(): ...
20.204545
149
0.605174
d2a231d343bb69f42dc7042696ed0f00569273e7
21,101
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_09_01/aio/operations/_express_route_circuit_authorizations_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
8
2021-01-13T23:44:08.000Z
2021-03-17T10:13:36.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_09_01/aio/operations/_express_route_circuit_authorizations_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
null
null
null
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_09_01/aio/operations/_express_route_circuit_authorizations_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
null
null
null
# 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 may ...
50.480861
232
0.678262
d197ae6c9d70e33cbdb00cc12f2fa324440ac59c
300
py
Python
pulsar/managers/util/__init__.py
jmchilton/pulsar
783b90cf0bce893a11c347fcaf6778b98e0bb062
[ "Apache-2.0" ]
6
2018-11-03T22:43:35.000Z
2022-02-15T17:51:33.000Z
pulsar/managers/util/__init__.py
jmchilton/pulsar
783b90cf0bce893a11c347fcaf6778b98e0bb062
[ "Apache-2.0" ]
3
2015-06-06T22:16:03.000Z
2015-11-12T00:22:45.000Z
pulsar/managers/util/__init__.py
jmchilton/pulsar
783b90cf0bce893a11c347fcaf6778b98e0bb062
[ "Apache-2.0" ]
10
2017-04-10T21:40:22.000Z
2022-02-21T16:50:10.000Z
""" This module and its submodules contains utilities for running external processes and interfacing with job managers. This module should contain functionality shared between Galaxy and the Pulsar. """ from galaxy.util.bunch import Bunch from .kill import kill_pid __all__ = ['kill_pid', 'Bunch']
27.272727
71
0.793333
37281bb7461981ccfbb3d459fcf0c95240fd0a1c
9,868
py
Python
ambari-agent/src/test/python/resource_management/TestContentSources.py
samyzh/ambari
ff73620da41697ed2ca9ece676f71ec9ba28a7d5
[ "Apache-2.0" ]
1,664
2015-01-03T09:35:21.000Z
2022-03-31T04:55:24.000Z
ambari-agent/src/test/python/resource_management/TestContentSources.py
samyzh/ambari
ff73620da41697ed2ca9ece676f71ec9ba28a7d5
[ "Apache-2.0" ]
3,018
2015-02-19T20:16:10.000Z
2021-11-13T20:47:48.000Z
ambari-agent/src/test/python/resource_management/TestContentSources.py
samyzh/ambari
ff73620da41697ed2ca9ece676f71ec9ba28a7d5
[ "Apache-2.0" ]
1,673
2015-01-06T14:14:42.000Z
2022-03-31T07:22:30.000Z
''' 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 use this ...
37.520913
148
0.733178
7ec73347d16bf59c0a32b51f0e6dd8e7a0d82751
23,097
py
Python
dev/run-tests.py
CS490-Knush/spark
1b6755756cf831b7d90e5516899ccd78bc338eb6
[ "PSF-2.0", "BSD-2-Clause", "Apache-2.0", "CC0-1.0", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
3
2018-11-17T07:51:24.000Z
2018-11-17T08:09:19.000Z
dev/run-tests.py
CS490-Knush/spark
1b6755756cf831b7d90e5516899ccd78bc338eb6
[ "PSF-2.0", "BSD-2-Clause", "Apache-2.0", "CC0-1.0", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
4
2018-12-11T13:53:39.000Z
2021-09-07T14:48:26.000Z
dev/run-tests.py
CS490-Knush/spark
1b6755756cf831b7d90e5516899ccd78bc338eb6
[ "PSF-2.0", "BSD-2-Clause", "Apache-2.0", "CC0-1.0", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2018-10-19T23:50:20.000Z
2018-10-19T23:50:20.000Z
#!/usr/bin/env python2 # # 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 "L...
37.740196
100
0.665714
588f8103e5e4f32c7219b611157b3898aae5a6a4
2,890
py
Python
examples/baremetal/nlp/sst2/distilbert_base_uncased/run_engine.py
intel/neural-compressor
16a4a12045fcb468da4d33769aff2c1a5e2ba6ba
[ "Apache-2.0" ]
172
2021-09-14T18:34:17.000Z
2022-03-30T06:49:53.000Z
examples/baremetal/nlp/sst2/distilbert_base_uncased/run_engine.py
intel/lp-opt-tool
130eefa3586b38df6c0ff78cc8807ae273f6a63f
[ "Apache-2.0" ]
40
2021-09-14T02:26:12.000Z
2022-03-29T08:34:04.000Z
examples/baremetal/nlp/sst2/distilbert_base_uncased/run_engine.py
intel/neural-compressor
16a4a12045fcb468da4d33769aff2c1a5e2ba6ba
[ "Apache-2.0" ]
33
2021-09-15T07:27:25.000Z
2022-03-25T08:30:57.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2021 Intel Corporation # # 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 # # Unl...
38.026316
120
0.716609
49cf7cb76f095a47b81c234c8342c2dbc094e726
1,872
py
Python
tools/harness-automation/cases_R140/sed_9_2_8.py
tpmanley/openthread
bc02c6c05cf52884bc6cd9fad8dc8fc16364a147
[ "BSD-3-Clause" ]
2
2018-08-24T05:14:27.000Z
2018-09-25T03:02:36.000Z
tools/harness-automation/cases_R140/sed_9_2_8.py
tpmanley/openthread
bc02c6c05cf52884bc6cd9fad8dc8fc16364a147
[ "BSD-3-Clause" ]
4
2016-09-09T17:10:04.000Z
2016-09-29T05:18:09.000Z
tools/harness-automation/cases_R140/sed_9_2_8.py
tpmanley/openthread
bc02c6c05cf52884bc6cd9fad8dc8fc16364a147
[ "BSD-3-Clause" ]
1
2020-10-22T16:33:36.000Z
2020-10-22T16:33:36.000Z
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # notic...
39.829787
77
0.769231
eb26f10337fd057e39d85b41734e9abc4be885ae
5,289
py
Python
source/tests/graph_test.py
staujd02/python-tsp
39047d17a8bd3f9bd2590ab40a0a3861646b76b9
[ "Apache-2.0" ]
null
null
null
source/tests/graph_test.py
staujd02/python-tsp
39047d17a8bd3f9bd2590ab40a0a3861646b76b9
[ "Apache-2.0" ]
null
null
null
source/tests/graph_test.py
staujd02/python-tsp
39047d17a8bd3f9bd2590ab40a0a3861646b76b9
[ "Apache-2.0" ]
null
null
null
from array import array from source.utilities.graphStringMuxer import GraphStringMuxer import unittest from source.utilities.solver import Solver from source.utilities.graph import Graph from source.utilities.graph import BranchingGraphError from source.dataStructures import Vector class Graph_test(unittest.TestCase...
37.778571
101
0.536964
439e05a4da9dd2b08b9248018fcdf8a5f00c9188
1,309
py
Python
deploy-agent/deployd/download/download_helper.py
brennentsmith/teletraan
55d05c6352591ed847e1f9edf63c9483897f2187
[ "Apache-2.0" ]
2,449
2016-02-11T23:53:25.000Z
2022-03-27T08:43:56.000Z
deploy-agent/deployd/download/download_helper.py
brennentsmith/teletraan
55d05c6352591ed847e1f9edf63c9483897f2187
[ "Apache-2.0" ]
360
2016-01-21T23:52:39.000Z
2022-03-25T01:24:54.000Z
deploy-agent/deployd/download/download_helper.py
brennentsmith/teletraan
55d05c6352591ed847e1f9edf63c9483897f2187
[ "Apache-2.0" ]
322
2016-01-21T16:50:59.000Z
2022-02-23T00:56:18.000Z
# Copyright 2016 Pinterest, 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...
28.456522
74
0.663102
f4ce0abd0d11c20ca4dfad78402642888f91641e
1,750
py
Python
watson_endpoint.py
jtizon001/ideahub
a2ff57192db22033089a8add423a2fe35dcf0101
[ "MIT" ]
null
null
null
watson_endpoint.py
jtizon001/ideahub
a2ff57192db22033089a8add423a2fe35dcf0101
[ "MIT" ]
null
null
null
watson_endpoint.py
jtizon001/ideahub
a2ff57192db22033089a8add423a2fe35dcf0101
[ "MIT" ]
3
2018-03-08T15:28:07.000Z
2018-03-21T16:24:23.000Z
import json from watson_developer_cloud import NaturalLanguageUnderstandingV1,WatsonException from watson_developer_cloud.natural_language_understanding_v1 import Features, EntitiesOptions, KeywordsOptions, SentimentOptions, EmotionOptions from csv_manipulator import TweetCsv import codecs # Communicates with Watson ...
31.25
145
0.684
baccd48017cbeb3e6aae0700b9104bb0a056b775
1,749
py
Python
explainaboard/utils/typing_utils.py
hwidjaja/ExplainaBoard
0e670ad2df9326eb6b4ad99ba435fd7b6806557a
[ "MIT" ]
null
null
null
explainaboard/utils/typing_utils.py
hwidjaja/ExplainaBoard
0e670ad2df9326eb6b4ad99ba435fd7b6806557a
[ "MIT" ]
null
null
null
explainaboard/utils/typing_utils.py
hwidjaja/ExplainaBoard
0e670ad2df9326eb6b4ad99ba435fd7b6806557a
[ "MIT" ]
null
null
null
"""Generic functions to manipulate type hints.""" from __future__ import annotations from collections.abc import Generator, Iterable from typing import Any, Optional, TypeVar T = TypeVar('T') def unwrap(obj: Optional[T]) -> T: '''Unwrap the ``Optional`` type hint. This function takes an object wrapped wit...
31.8
88
0.66781
cc41b8b81cbcfa8901e18363d778d033c4c77e16
5,621
py
Python
m_theory/m_theory_lib/tf_cexpm.py
rmitra/google-research
ddc22300c4cb3223654c9a981f892dc0f6286e35
[ "Apache-2.0" ]
1
2020-03-05T09:34:44.000Z
2020-03-05T09:34:44.000Z
m_theory/m_theory_lib/tf_cexpm.py
robot-ai-machinelearning/google-research
88481d10a87947ffb9305dc7665682e008b27391
[ "Apache-2.0" ]
null
null
null
m_theory/m_theory_lib/tf_cexpm.py
robot-ai-machinelearning/google-research
88481d10a87947ffb9305dc7665682e008b27391
[ "Apache-2.0" ]
1
2020-03-05T09:24:01.000Z
2020-03-05T09:24:01.000Z
# coding=utf-8 # Copyright 2019 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...
39.865248
79
0.652731
f9e00895bf7301daacbeb80b6103c41960823bc8
3,667
py
Python
circuits/core/helpers.py
spaceone/circuits
ed6d5464f1f83034109ed3d23d126c715450cfd2
[ "MIT" ]
null
null
null
circuits/core/helpers.py
spaceone/circuits
ed6d5464f1f83034109ed3d23d126c715450cfd2
[ "MIT" ]
null
null
null
circuits/core/helpers.py
spaceone/circuits
ed6d5464f1f83034109ed3d23d126c715450cfd2
[ "MIT" ]
null
null
null
""" .. codeauthor: mnl """ from signal import SIGINT, SIGTERM from sys import stderr from threading import Event from traceback import format_exception_only from circuits.core.handlers import reprhandler from .components import BaseComponent from .handlers import handler class FallBackGenerator(BaseComponent): ...
32.451327
77
0.623943
d145fdacde9ed462eb818d6d28af9a79a394ef78
135
py
Python
python_100/Level1/18.del_ele.py
relax-space/python-cy
eaf4650756e7ece5ec97894b65a7495b5c964eb3
[ "Apache-2.0" ]
1
2020-04-27T03:31:23.000Z
2020-04-27T03:31:23.000Z
python_100/Level1/18.del_ele.py
relax-space/python-cy
eaf4650756e7ece5ec97894b65a7495b5c964eb3
[ "Apache-2.0" ]
1
2020-04-14T23:55:19.000Z
2020-04-15T03:29:37.000Z
python_100/Level1/18.del_ele.py
relax-space/python-cy
eaf4650756e7ece5ec97894b65a7495b5c964eb3
[ "Apache-2.0" ]
null
null
null
# 18.Python-遍历列表时删除元素的正确做法 a = [1,2,3,4,5,6,7,8,9] # 删除元素5和8 for i in (a[:]): if i == 5 or i == 8: a.remove(i) print(a)
13.5
26
0.503704
f4214a6c32f25c0ed4b0e47231f76902eb60f8c8
3,564
py
Python
glance/async_/utils.py
bwLehrpool/glance
d4119be0543bdaefe78fc11e16c3a01b55aa9e3a
[ "Apache-2.0" ]
null
null
null
glance/async_/utils.py
bwLehrpool/glance
d4119be0543bdaefe78fc11e16c3a01b55aa9e3a
[ "Apache-2.0" ]
null
null
null
glance/async_/utils.py
bwLehrpool/glance
d4119be0543bdaefe78fc11e16c3a01b55aa9e3a
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 Red Hat, 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 required by...
44.55
79
0.667508
5ff3ad3bc04b36a0f6eb9d1dd40515b3c783c362
246
py
Python
python/min-val-get-positive-step-by-step-sum.py
alirezaghey/leetcode-solutions
676b71b4790c64d21af91dce02e97ee47e78d523
[ "MIT" ]
3
2020-10-10T00:14:23.000Z
2022-03-02T21:16:29.000Z
python/min-val-get-positive-step-by-step-sum.py
alirezaghey/leetcode-solutions
676b71b4790c64d21af91dce02e97ee47e78d523
[ "MIT" ]
null
null
null
python/min-val-get-positive-step-by-step-sum.py
alirezaghey/leetcode-solutions
676b71b4790c64d21af91dce02e97ee47e78d523
[ "MIT" ]
1
2021-09-14T05:16:54.000Z
2021-09-14T05:16:54.000Z
class Solution: def minStartValue(self, nums: List[int]) -> int: best = 1 curr = 0 for el in nums: curr += el if curr < 1: best = max(best, 1 - curr) return best
24.6
52
0.434959
4a0044af266cdd63c6169e023bf5c41c440685a0
8,091
py
Python
ICLR_2022/Cubic_10D/PI3NN/PI3NN_OOD.py
streeve/PI3NN
f7f08a195096e0388bb9230bc67c6acd6f41581a
[ "Apache-2.0" ]
11
2021-11-08T20:38:50.000Z
2022-01-30T02:46:39.000Z
ICLR_2022/Cubic_10D/PI3NN/PI3NN_OOD.py
streeve/PI3NN
f7f08a195096e0388bb9230bc67c6acd6f41581a
[ "Apache-2.0" ]
1
2022-01-13T19:46:32.000Z
2022-02-09T16:23:56.000Z
ICLR_2022/Cubic_10D/PI3NN/PI3NN_OOD.py
streeve/PI3NN
f7f08a195096e0388bb9230bc67c6acd6f41581a
[ "Apache-2.0" ]
1
2021-12-17T18:38:26.000Z
2021-12-17T18:38:26.000Z
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np import torch.optim as optim # from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt from sklearn.preprocessing import MinMaxScaler, StandardScaler from scipy import stats # torch.set_default_tensor_type(torch.Doubl...
26.880399
138
0.597701
47d1d091c9e3724e32d9327734d800975a6349dc
3,932
py
Python
tests/modules/encounters/resources/test_delete_encounter.py
WildMeOrg/houston
8102229421388e44234c07ee6cb73bf705b6fba0
[ "Apache-2.0" ]
6
2021-04-06T19:50:52.000Z
2022-01-19T17:42:33.000Z
tests/modules/encounters/resources/test_delete_encounter.py
WildMeOrg/houston
8102229421388e44234c07ee6cb73bf705b6fba0
[ "Apache-2.0" ]
491
2021-01-20T01:10:00.000Z
2022-03-31T19:30:48.000Z
tests/modules/encounters/resources/test_delete_encounter.py
WildMeOrg/houston
8102229421388e44234c07ee6cb73bf705b6fba0
[ "Apache-2.0" ]
2
2021-03-12T02:33:55.000Z
2021-03-16T20:18:43.000Z
# -*- coding: utf-8 -*- # pylint: disable=missing-docstring from tests.modules.sightings.resources import utils as sighting_utils from tests.modules.encounters.resources import utils as enc_utils from tests.modules.individuals.resources import utils as indiv_utils from tests import utils as test_utils import datetime ...
37.807692
90
0.694049
34e67e146e674aae93d1baaf31e8c124c840eaef
803
py
Python
python_script/pokemon_fact_writer.py
ReiiYuki/PokemonWeakDetector
ecf160ec660f518b150d0d09be8a5031c4f0d0aa
[ "MIT" ]
4
2016-10-18T15:15:50.000Z
2022-01-13T23:42:37.000Z
python_script/pokemon_fact_writer.py
ReiiYuki/PokemonWeakDetector
ecf160ec660f518b150d0d09be8a5031c4f0d0aa
[ "MIT" ]
1
2016-10-14T10:46:25.000Z
2016-10-14T10:46:25.000Z
python_script/pokemon_fact_writer.py
ReiiYuki/PokemonWeakDetector
ecf160ec660f518b150d0d09be8a5031c4f0d0aa
[ "MIT" ]
2
2018-11-27T02:18:29.000Z
2019-11-25T20:10:41.000Z
import json with open('pokemon_data.json') as poke_data: d = json.load(poke_data) pokemon_list = [] type_list = [] move_list = [] for i in d : name = i['name'] pokemon_fact = 'pokemon('+name.lower()+').' pokemon_list.append(pokemon_fact) moves = i['moves'] f...
28.678571
72
0.511831