hexsha
stringlengths
40
40
size
int64
4
1.02M
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
209
max_stars_repo_name
stringlengths
5
121
max_stars_repo_head_hexsha
stringlengths
40
40
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
4
209
max_issues_repo_name
stringlengths
5
121
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
209
max_forks_repo_name
stringlengths
5
121
max_forks_repo_head_hexsha
stringlengths
40
40
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
4
1.02M
avg_line_length
float64
1.07
66.1k
max_line_length
int64
4
266k
alphanum_fraction
float64
0.01
1
8ba078046387df1c709f426807177e2c976ba89d
2,100
py
Python
mal/parsers/anime/characters.py
Nearata/myanimelist-rest-api
f254e53e7f54415c6b11f5b2e9a8afe142975f70
[ "Unlicense" ]
1
2020-11-11T14:55:23.000Z
2020-11-11T14:55:23.000Z
mal/parsers/anime/characters.py
Nearata/myanimelist-rest-api
f254e53e7f54415c6b11f5b2e9a8afe142975f70
[ "Unlicense" ]
5
2021-03-31T19:26:31.000Z
2021-08-09T13:33:07.000Z
mal/parsers/anime/characters.py
Nearata/myanimelist-rest-api
f254e53e7f54415c6b11f5b2e9a8afe142975f70
[ "Unlicense" ]
null
null
null
from re import compile as re_compile from bs4 import BeautifulSoup from ...const import MAL_CDN_URL class Characters: def __init__(self, soup: BeautifulSoup) -> None: self.soup = soup def __call__(self) -> dict: return { "data": [ { "url": i.s...
38.181818
87
0.382381
5a45b2887d00b67602744b2637d42efbc3749b06
843
py
Python
covertutils/covertutils/payloads/linux/shellcode.py
aidden-laoch/sabre
0940aa51dfc5074291df9d29db827ddb4010566d
[ "MIT" ]
2
2020-11-23T23:54:32.000Z
2021-05-25T12:28:05.000Z
commander/thirdparty/covertutils/payloads/linux/shellcode.py
how2how/ToyHome
4457b1d28e21ed6fd4ab980a0f7fed345c570ae3
[ "Apache-2.0" ]
1
2021-03-20T05:43:02.000Z
2021-03-20T05:43:02.000Z
commander/thirdparty/covertutils/payloads/linux/shellcode.py
how2how/ToyHome
4457b1d28e21ed6fd4ab980a0f7fed345c570ae3
[ "Apache-2.0" ]
null
null
null
def work( storage, message ) : from ctypes import CDLL, c_char_p, c_void_p, memmove, cast, CFUNCTYPE, create_string_buffer from multiprocessing import Process shellcode = message size = len(shellcode) # print( len(shellcode) ) libc = CDLL('libc.so.6') sc = c_char_p(shellcode) addr = c_void_p(libc.valloc(siz...
27.193548
92
0.736655
1518201ce98fea4e3467c93689577aa38326e47d
1,603
py
Python
src/ses.py
dc-pm/cfn-ses-provider
f72ac887c37a779a571b41ea8aeef6f468230e1a
[ "Apache-2.0" ]
38
2018-03-08T12:06:03.000Z
2022-03-25T14:15:10.000Z
src/ses.py
dc-pm/cfn-ses-provider
f72ac887c37a779a571b41ea8aeef6f468230e1a
[ "Apache-2.0" ]
13
2018-12-22T10:49:33.000Z
2021-06-26T14:48:57.000Z
src/ses.py
dc-pm/cfn-ses-provider
f72ac887c37a779a571b41ea8aeef6f468230e1a
[ "Apache-2.0" ]
29
2018-11-05T10:52:23.000Z
2022-03-29T16:09:36.000Z
import os import logging import cfn_dkim_provider import dkim_tokens_provider import domain_identity_provider import mail_from_domain_provider import active_rule_set_provider import verified_identity_provider import verified_mail_from_domain_provider import identity_notifications_provider import identity_policy_provide...
43.324324
75
0.768559
2dd7522440b4fa236f41ad62b4379656ff3dfbef
3,336
py
Python
web2py-appliances-master/HotelManagementExample/models/db.py
wantsomechocolate/WantsomeBeanstalk
8c8a0a80490d04ea52661a3114fd3db8de65a01e
[ "BSD-3-Clause" ]
null
null
null
web2py-appliances-master/HotelManagementExample/models/db.py
wantsomechocolate/WantsomeBeanstalk
8c8a0a80490d04ea52661a3114fd3db8de65a01e
[ "BSD-3-Clause" ]
null
null
null
web2py-appliances-master/HotelManagementExample/models/db.py
wantsomechocolate/WantsomeBeanstalk
8c8a0a80490d04ea52661a3114fd3db8de65a01e
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- ######################################################################### ## This scaffolding model makes your app work on Google App Engine too ## File is released under public domain and you can use without limitations ######################################################################### ...
42.769231
78
0.63699
bd5cea031009ccd1e685e973934c20e7b017688a
7,203
py
Python
dcnn.py
jessejlt/cifar10
0be30b0bfdd294030376999da6f5b8ae473e5751
[ "MIT" ]
null
null
null
dcnn.py
jessejlt/cifar10
0be30b0bfdd294030376999da6f5b8ae473e5751
[ "MIT" ]
null
null
null
dcnn.py
jessejlt/cifar10
0be30b0bfdd294030376999da6f5b8ae473e5751
[ "MIT" ]
null
null
null
from __future__ import print_function import numpy as np from keras.datasets import cifar10 from keras.callbacks import TensorBoard from keras.models import Sequential from keras.layers import Dense, Dropout, Activation, Flatten from keras.layers import Convolution2D, MaxPooling2D from keras.utils import np_utils from ...
42.370588
79
0.752048
efd3bc46d53c055a47f6a771f835039587a04c59
16,074
py
Python
django_xsede_warehouse/warehouse_views/serializers.py
XSEDE/XSEDE_Information_Warehouse
8b3aab42b7afd70ce69b9bf44551a0ded4491831
[ "Apache-2.0" ]
1
2019-10-29T22:50:29.000Z
2019-10-29T22:50:29.000Z
django_xsede_warehouse/warehouse_views/serializers.py
XSEDE/XSEDE_Information_Warehouse
8b3aab42b7afd70ce69b9bf44551a0ded4491831
[ "Apache-2.0" ]
null
null
null
django_xsede_warehouse/warehouse_views/serializers.py
XSEDE/XSEDE_Information_Warehouse
8b3aab42b7afd70ce69b9bf44551a0ded4491831
[ "Apache-2.0" ]
null
null
null
from django.utils import timezone from rest_framework import serializers from rest_framework.relations import PrimaryKeyRelatedField from glue2_db.models import ApplicationEnvironment, ApplicationHandle, Endpoint, ComputingManager, ExecutionEnvironment from glue2_db.serializers import ApplicationHandle_DbSerializer fro...
42.188976
142
0.593629
f4437668a3edb84ac0420d5f83552363d7e9d974
67,653
py
Python
Lib/idlelib/editor.py
vahtras/cpython
a0bb51e44cd43a7d2836a96a3804162203e44514
[ "CNRI-Python-GPL-Compatible" ]
2
2019-09-02T14:20:59.000Z
2021-02-16T13:22:40.000Z
Lib/idlelib/editor.py
Exifers/cpython
a5b76167dedf4d15211a216c3ca7b98e3cec33b8
[ "CNRI-Python-GPL-Compatible" ]
2
2019-04-23T15:32:51.000Z
2019-05-10T20:32:32.000Z
Lib/idlelib/editor.py
Munyola/cpython
11303dd6035a7d7f78025ce5a3e3b9bdf7380c9a
[ "CNRI-Python-GPL-Compatible" ]
1
2019-05-20T14:20:34.000Z
2019-05-20T14:20:34.000Z
import importlib.abc import importlib.util import os import platform import string import tokenize import traceback import webbrowser from tkinter import * from tkinter.ttk import Scrollbar import tkinter.simpledialog as tkSimpleDialog import tkinter.messagebox as tkMessageBox from idlelib.config import idleConf from...
38.970622
95
0.568903
276666bce4fa21c7f07262b79b6a8c874f49d7c5
4,915
py
Python
src/flashkit/core/progress.py
akashdhruv/FlashKit
dac777c52795098b75ab4875440d232efa1b0973
[ "MIT" ]
2
2022-02-01T02:41:24.000Z
2022-02-11T20:58:03.000Z
src/flashkit/core/progress.py
akashdhruv/FlashKit
dac777c52795098b75ab4875440d232efa1b0973
[ "MIT" ]
39
2021-06-07T04:08:54.000Z
2022-01-14T14:50:52.000Z
src/flashkit/core/progress.py
akashdhruv/FlashKit
dac777c52795098b75ab4875440d232efa1b0973
[ "MIT" ]
1
2022-02-11T20:58:20.000Z
2022-02-11T20:58:20.000Z
"""Povides progress bar support for FlashKit library.""" # type annotations from __future__ import annotations from typing import TYPE_CHECKING # standard libraries import logging import pkg_resources import threading import time import sys from contextlib import AbstractContextManager, nullcontext # internal librar...
34.858156
157
0.646796
a022e1cf1b3cb88c4e83909831891354185952da
196
py
Python
washing_learning/vision/__init__.py
Lucas-rbnt/washing-learning
eb3e8bcc7c58dafc19bfb94779c681c1164524e7
[ "MIT" ]
8
2021-04-13T09:12:38.000Z
2021-11-02T08:50:29.000Z
washing_learning/vision/__init__.py
Lucas-rbnt/washing-learning
eb3e8bcc7c58dafc19bfb94779c681c1164524e7
[ "MIT" ]
null
null
null
washing_learning/vision/__init__.py
Lucas-rbnt/washing-learning
eb3e8bcc7c58dafc19bfb94779c681c1164524e7
[ "MIT" ]
null
null
null
""" This API implements the classes and functions to avoid having to do boilerplate code and simplify the code by making it higher-level. This module focuses solely on Computer Vision issues. """
39.2
119
0.790816
9548cfaffaf3d5f4342233503cea008afb609add
1,427
py
Python
option_pricer/black_scholes.py
tsengkasing/option-pricer
89fff55070834698d801f3a6eb10e16d40fc7762
[ "MIT" ]
null
null
null
option_pricer/black_scholes.py
tsengkasing/option-pricer
89fff55070834698d801f3a6eb10e16d40fc7762
[ "MIT" ]
null
null
null
option_pricer/black_scholes.py
tsengkasing/option-pricer
89fff55070834698d801f3a6eb10e16d40fc7762
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from math import log, sqrt, e import scipy.stats as si def black_scholes(option_type, S, K, T, sigma, r, q): """Calculate Black-Scholes Formulas :param option_type: string, 'call' | 'put'. :param S: int, spot price. :param K: int, strike price. :par...
37.552632
118
0.562018
d29723c3ea6e4036936f1deea104a22b602f7c21
977
py
Python
util/third_party/tensorflow_extra/tool/tflite/tflite/NonMaxSuppressionV5Options.py
PascalGuenther/gecko_sdk
2e82050dc8823c9fe0e8908c1b2666fb83056230
[ "Zlib" ]
82
2016-06-29T17:24:43.000Z
2021-04-16T06:49:17.000Z
util/third_party/tensorflow_extra/tool/tflite/tflite/NonMaxSuppressionV5Options.py
PascalGuenther/gecko_sdk
2e82050dc8823c9fe0e8908c1b2666fb83056230
[ "Zlib" ]
6
2022-01-12T18:22:08.000Z
2022-03-25T10:19:27.000Z
util/third_party/tensorflow_extra/tool/tflite/tflite/NonMaxSuppressionV5Options.py
PascalGuenther/gecko_sdk
2e82050dc8823c9fe0e8908c1b2666fb83056230
[ "Zlib" ]
56
2016-08-02T10:50:50.000Z
2021-07-19T08:57:34.000Z
# automatically generated by the FlatBuffers compiler, do not modify # namespace: tflite import flatbuffers from flatbuffers.compat import import_numpy np = import_numpy() class NonMaxSuppressionV5Options(object): __slots__ = ['_tab'] @classmethod def GetRootAsNonMaxSuppressionV5Options(cls, buf, offset...
33.689655
114
0.750256
6e463ce950c5ab89f5ca899c3ccb55194594d239
9,277
py
Python
arweave_nft_uploader/__init__.py
KultureElectric/arweave-nft-uploader
3b79229cb42d2c8d2f010bf7fa042a14ae05ebb9
[ "MIT" ]
1
2021-12-17T22:34:30.000Z
2021-12-17T22:34:30.000Z
arweave_nft_uploader/__init__.py
KultureElectric/arweave-nft-uploader-dynamicNFTs-patch
3b79229cb42d2c8d2f010bf7fa042a14ae05ebb9
[ "MIT" ]
null
null
null
arweave_nft_uploader/__init__.py
KultureElectric/arweave-nft-uploader-dynamicNFTs-patch
3b79229cb42d2c8d2f010bf7fa042a14ae05ebb9
[ "MIT" ]
null
null
null
import argparse import json import logging from arweave import Wallet, Transaction from arweave.transaction_uploader import get_uploader import os import sys import glob def main(): parser = argparse.ArgumentParser() parser.add_argument('-e', '--env', default='devnet', help='Solana cluster env name (default: ...
48.067358
116
0.572707
e19c19635ca289b81694000e80c426260fd170ad
14,658
py
Python
sim21/solver/langs/English.py
kpatvt/sim21
4cbbfcbef6371d3dc5404429545e003a48c69ba5
[ "Artistic-2.0" ]
7
2021-08-23T18:46:27.000Z
2022-01-26T07:10:22.000Z
sim21/solver/langs/English.py
kpatvt/sim21
4cbbfcbef6371d3dc5404429545e003a48c69ba5
[ "Artistic-2.0" ]
null
null
null
sim21/solver/langs/English.py
kpatvt/sim21
4cbbfcbef6371d3dc5404429545e003a48c69ba5
[ "Artistic-2.0" ]
null
null
null
def Messages(): """create dictionary of English messages""" m = {'AddCompoundError': "Thermo provider reports the following error when adding compound:\n%s", 'AdjustingFromOlderVersion': "Recalling case created in an older version. Updating from: FlowsheetVersion = " ...
85.22093
120
0.637331
833bb8f8372c0d90bf498190eabbce78609b69a9
5,098
py
Python
tests/error_handler_test.py
Pierre-Sassoulas/pre-commit
fd53cdea17ed17a1775fc5e23e75d6ecdbdb04b6
[ "MIT" ]
1
2020-07-25T12:34:17.000Z
2020-07-25T12:34:17.000Z
tests/error_handler_test.py
Pierre-Sassoulas/pre-commit
fd53cdea17ed17a1775fc5e23e75d6ecdbdb04b6
[ "MIT" ]
null
null
null
tests/error_handler_test.py
Pierre-Sassoulas/pre-commit
fd53cdea17ed17a1775fc5e23e75d6ecdbdb04b6
[ "MIT" ]
18
2020-06-20T07:52:16.000Z
2022-01-20T22:03:26.000Z
import os.path import re import sys from unittest import mock import pytest from pre_commit import error_handler from pre_commit.util import CalledProcessError from testing.util import cmd_output_mocked_pre_commit_home @pytest.fixture def mocked_log_and_exit(): with mock.patch.object(error_handler, '_log_and_ex...
29.812865
79
0.618086
0375d6a7e406b04bf04969ee7852cf83e447c249
11,257
py
Python
meerschaum/actions/start.py
bmeares/Meerschaum
37bd7a9923efce53e91c6a1d9c31f9533b9b4463
[ "Apache-2.0" ]
32
2020-09-14T16:29:19.000Z
2022-03-08T00:51:28.000Z
meerschaum/actions/start.py
bmeares/Meerschaum
37bd7a9923efce53e91c6a1d9c31f9533b9b4463
[ "Apache-2.0" ]
3
2020-10-04T20:03:30.000Z
2022-02-02T21:04:46.000Z
meerschaum/actions/start.py
bmeares/Meerschaum
37bd7a9923efce53e91c6a1d9c31f9533b9b4463
[ "Apache-2.0" ]
5
2021-04-22T23:49:21.000Z
2022-02-02T12:59:08.000Z
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 """ Start subsystems (API server, logging daemon, etc.). """ from __future__ import annotations from meerschaum.utils.typing import SuccessTuple, Optional, List, Any def start( action : Optional[List[str]] = None, **kw : Any, ) -> Su...
35.178125
99
0.561784
4ef6d9de4681ea32e4bdb6c04f2857d368edf988
1,260
py
Python
dataworkspaces/commands/add.py
jfischer/data-workspaces-python
5787fb2488d9dc407b6193a38d71aed955d7158c
[ "Apache-2.0" ]
6
2019-04-16T10:44:41.000Z
2021-02-24T09:34:10.000Z
dataworkspaces/commands/add.py
jfischer/data-workspaces-python
5787fb2488d9dc407b6193a38d71aed955d7158c
[ "Apache-2.0" ]
67
2019-03-08T13:32:31.000Z
2022-03-09T15:15:41.000Z
dataworkspaces/commands/add.py
jfischer/data-workspaces-python
5787fb2488d9dc407b6193a38d71aed955d7158c
[ "Apache-2.0" ]
2
2020-04-24T02:48:56.000Z
2022-01-14T01:07:48.000Z
# Copyright 2018,2019 by MPI-SWS and Data-ken Research. Licensed under Apache 2.0. See LICENSE.txt. import click from dataworkspaces.errors import ConfigurationError from dataworkspaces.workspace import Workspace def add_command(scheme: str, role: str, name: str, workspace: Workspace, *args): current_names = s...
39.375
99
0.651587
8573f739eb3c5ae02c4ec68682b029320e9b189e
2,261
py
Python
simdeblur/model/backbone/dblrnet/dblrnet.py
ljzycmd/SimDeblur
dd2f60c41176b75c4eaf80d740f547c206aa8227
[ "MIT" ]
190
2021-03-22T13:59:42.000Z
2022-03-08T21:14:41.000Z
simdeblur/model/backbone/dblrnet/dblrnet.py
Wang-jiahao/SimDeblur
31d88e1fbec91d5cc9062f4a46538e4ba806ab29
[ "MIT" ]
9
2021-04-26T06:44:40.000Z
2022-03-25T07:48:30.000Z
simdeblur/model/backbone/dblrnet/dblrnet.py
Wang-jiahao/SimDeblur
31d88e1fbec91d5cc9062f4a46538e4ba806ab29
[ "MIT" ]
27
2021-03-23T03:11:00.000Z
2022-03-19T21:26:02.000Z
""" Adversarial Spatio-Temporal Learning for Video Deblurring The DBLRNet adopts 3D convolution for spatio-temporal modeling, which serves as a generator for adversarial training. """ import torch import torch.nn as nn from ...build import BACKBONE_REGISTRY @BACKBONE_REGISTRY.register() class DBLRNet(nn.Module): ...
29.363636
117
0.576294
77654e12fc54fee139299f96319413aa82c8a133
7,778
py
Python
docs/conf.py
lucasb-eyer/highlight.js
a5f137457daa01677e475379f5d9ead184bcf3c4
[ "BSD-3-Clause" ]
null
null
null
docs/conf.py
lucasb-eyer/highlight.js
a5f137457daa01677e475379f5d9ead184bcf3c4
[ "BSD-3-Clause" ]
null
null
null
docs/conf.py
lucasb-eyer/highlight.js
a5f137457daa01677e475379f5d9ead184bcf3c4
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # highlight.js documentation build configuration file, created by # sphinx-quickstart on Wed Sep 12 23:48:27 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # ...
32.00823
80
0.714965
4e2f593adcc98c2355d46b879b5dfc2f15ae328d
4,740
py
Python
examples/Mechanics/Music/run.py
bremond/siconos
8deea56ff6779379f4f69e0376d24a81562a42d4
[ "Apache-2.0" ]
null
null
null
examples/Mechanics/Music/run.py
bremond/siconos
8deea56ff6779379f4f69e0376d24a81562a42d4
[ "Apache-2.0" ]
null
null
null
examples/Mechanics/Music/run.py
bremond/siconos
8deea56ff6779379f4f69e0376d24a81562a42d4
[ "Apache-2.0" ]
null
null
null
"""Implementation of vibrating string model, described in JSV paper (Issanchou 2017) and using Siconos for contact simulation. """ from guitar import StringDS, Fret, Guitar #import siconos.kernel as sk import time import numpy as np import scipy.io import sys,os visu=False if visu: import matplotlib.pyplot as plt...
30.980392
104
0.662869
194f7921374d383bb2e10c07822f7a203dcc1f2c
7,060
py
Python
O365/account.py
llange/python-o365
11c7e81c27c082a1169cce21ea7d3f45e4a5d47b
[ "Apache-2.0" ]
null
null
null
O365/account.py
llange/python-o365
11c7e81c27c082a1169cce21ea7d3f45e4a5d47b
[ "Apache-2.0" ]
null
null
null
O365/account.py
llange/python-o365
11c7e81c27c082a1169cce21ea7d3f45e4a5d47b
[ "Apache-2.0" ]
null
null
null
from .address_book import AddressBook, GlobalAddressList from .calendar import Schedule from .connection import Connection, Protocol, MSGraphProtocol from .connection import oauth_authentication_flow from .drive import Storage from .mailbox import MailBox from .message import Message from .sharepoint import Sharepoint ...
39.662921
81
0.649292
1bcfb1be64aefa847642b99db29a5ff5cfbc73b9
292
py
Python
client_code/routing/__init__.py
juanpaul101/anvil-extras
580bed42128653394494ed0f210a7a918278be30
[ "MIT" ]
null
null
null
client_code/routing/__init__.py
juanpaul101/anvil-extras
580bed42128653394494ed0f210a7a918278be30
[ "MIT" ]
null
null
null
client_code/routing/__init__.py
juanpaul101/anvil-extras
580bed42128653394494ed0f210a7a918278be30
[ "MIT" ]
null
null
null
# SPDX-License-Identifier: MIT # # Copyright (c) 2021 The Anvil Extras project team members listed at # https://github.com/anvilistas/anvil-extras/graphs/contributors # # This software is published at https://github.com/anvilistas/anvil-extras __version__ = "1.5.1" from ._routing import *
26.545455
74
0.763699
92ddb519b2f65c6f546e2bfbbe9999c6a45a9e5f
3,603
py
Python
scripts/testAllGrabs.py
Falcons-Robocup/code
2281a8569e7f11cbd3238b7cc7341c09e2e16249
[ "Apache-2.0" ]
2
2021-01-15T13:27:19.000Z
2021-08-04T08:40:52.000Z
scripts/testAllGrabs.py
Falcons-Robocup/code
2281a8569e7f11cbd3238b7cc7341c09e2e16249
[ "Apache-2.0" ]
null
null
null
scripts/testAllGrabs.py
Falcons-Robocup/code
2281a8569e7f11cbd3238b7cc7341c09e2e16249
[ "Apache-2.0" ]
5
2018-05-01T10:39:31.000Z
2022-03-25T03:02:35.000Z
#!/usr/bin/env python3 # # Jan Feitsma, december 2019 import sys, time import argparse from testGrabs import TestGrabs, report if __name__ == '__main__': # Argument parsing. descriptionTxt = """Regression-test the multiCam software on ALL available grabs. Write a small report. Example partial output: ...
50.041667
245
0.640577
b9deb4c16e0db60a9fb616d86411e9b44e1032c9
41,449
py
Python
appTools/ToolTransform.py
DannyPol/flatcam
25a8634d0658e98b7fae31a095f8bef40c1b3067
[ "MIT" ]
1
2022-02-11T06:19:34.000Z
2022-02-11T06:19:34.000Z
appTools/ToolTransform.py
MRemy2/FlatCam
d4f941335ca8a8d5351aab23b396f99da06a9029
[ "MIT" ]
null
null
null
appTools/ToolTransform.py
MRemy2/FlatCam
d4f941335ca8a8d5351aab23b396f99da06a9029
[ "MIT" ]
null
null
null
# ########################################################## # FlatCAM: 2D Post-processing for Manufacturing # # File Author: Marius Adrian Stanciu (c) # # Date: 3/10/2019 # # MIT Licence # # #############...
42.599178
119
0.553958
5dda636f1aa861540b9631bc41688824b15dc263
2,704
py
Python
simplemooc/courses/models.py
leorzz/simplemooc
8b1c5e939d534b1fd729596df4c59fc69708b896
[ "MIT" ]
null
null
null
simplemooc/courses/models.py
leorzz/simplemooc
8b1c5e939d534b1fd729596df4c59fc69708b896
[ "MIT" ]
null
null
null
simplemooc/courses/models.py
leorzz/simplemooc
8b1c5e939d534b1fd729596df4c59fc69708b896
[ "MIT" ]
null
null
null
# -*- coding: utf 8 -*- from django.db import models from django.conf import settings # Custom manager class CourseManager(models.Manager): # Filtro do batabase def search(self, query): return self.get_queryset().filter( #name__icontains=query, description__icontains=query # and ...
36.053333
138
0.640902
8bd389e140e7ad94a04704fe8a4c6d3a22ce8f70
15,467
py
Python
libs/networks/efficientnet/utils.py
graceon/R3Det_Tensorflow
5ff8e2505aacfb9107d2c41980374385dc0200ba
[ "MIT" ]
3
2020-04-29T11:55:23.000Z
2020-07-01T08:59:44.000Z
libs/networks/efficientnet/utils.py
graceon/R3Det_Tensorflow
5ff8e2505aacfb9107d2c41980374385dc0200ba
[ "MIT" ]
1
2021-02-06T15:50:57.000Z
2021-02-06T15:50:57.000Z
libs/networks/efficientnet/utils.py
graceon/R3Det_Tensorflow
5ff8e2505aacfb9107d2c41980374385dc0200ba
[ "MIT" ]
1
2020-11-24T05:23:56.000Z
2020-11-24T05:23:56.000Z
# Copyright 2019 The TensorFlow 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 applica...
38.861809
80
0.675309
9d89c7090a871e77c04906fb87c88929e1d0abc0
13,671
py
Python
analytics/views/support.py
BillyMagarali/zulip
9406c21340b6810c58388020c562d475b1e25b2e
[ "Apache-2.0" ]
1
2020-03-29T19:54:13.000Z
2020-03-29T19:54:13.000Z
analytics/views/support.py
BillyMagarali/zulip
9406c21340b6810c58388020c562d475b1e25b2e
[ "Apache-2.0" ]
null
null
null
analytics/views/support.py
BillyMagarali/zulip
9406c21340b6810c58388020c562d475b1e25b2e
[ "Apache-2.0" ]
1
2021-01-13T03:14:57.000Z
2021-01-13T03:14:57.000Z
import urllib from datetime import timedelta from decimal import Decimal from typing import Any, Dict, List, Optional from urllib.parse import urlencode from django.conf import settings from django.core.exceptions import ValidationError from django.core.validators import URLValidator from django.http import HttpReques...
41.935583
130
0.663448
d021a27ad5495fdcda5443b56b4683ac6ba7c923
1,148
py
Python
other/palindrome.py
18-2-SKKU-OSS/2018-2-OSS-E5--
8bb7e4c239f5bd95f4635b442bb8b2838e76fb36
[ "MIT" ]
4
2018-12-02T14:21:02.000Z
2019-02-28T04:15:42.000Z
other/palindrome.py
18-2-SKKU-OSS/2018-2-OSS-E5
8bb7e4c239f5bd95f4635b442bb8b2838e76fb36
[ "MIT" ]
25
2018-11-27T10:00:05.000Z
2018-12-11T01:58:46.000Z
other/palindrome.py
18-2-SKKU-OSS/2018-2-OSS-E5--
8bb7e4c239f5bd95f4635b442bb8b2838e76fb36
[ "MIT" ]
null
null
null
""" Palindrome : 회문으로, 앞에서부터 읽으나 뒤에서부터 읽으나 동일한 단어나 구를 의미한다. 이 코드에서 문자열을 입력받으면 그 문자열이 Palindrome 인지 아닌지를 테스트한다. """ # 인자로 받은 문자열이 회문인지 아닌지를 검사 def is_palindrome(str): start_i = 0 end_i = len(str) - 1 while start_i < end_i: # 증가하는 앞부분과 감소하는 뒷부분의 크기가 반전이 되면 회문의 발견. if str[start_i] == str[e...
31.888889
99
0.541812
797130522e525a58e85e7b3f848947aed4b21310
2,150
py
Python
detro/packages/circledet/network.py
Peiiii/detro
26d74468d7554dc20b2a2daf7ec5009302c820f2
[ "MIT" ]
null
null
null
detro/packages/circledet/network.py
Peiiii/detro
26d74468d7554dc20b2a2daf7ec5009302c820f2
[ "MIT" ]
null
null
null
detro/packages/circledet/network.py
Peiiii/detro
26d74468d7554dc20b2a2daf7ec5009302c820f2
[ "MIT" ]
null
null
null
from .resnet_backbone import resnet18 from torch import nn import torch import torch.nn.functional as F from detro.networks.components import BiFPN, Center_layer, Offset_layer, Reg_layer, Heatmap_layer from detro.networks.losslib import center_loss, distance_loss class FeatureFusionNetwork(nn.Module): def __init_...
33.59375
97
0.649767
b7c25049691eff112fc8f67645c526e58953697f
18,420
py
Python
train_re.py
carboncoo/UNITER
dfe007c2cea55430a847fd1cf318e88ae8ffe88f
[ "MIT" ]
612
2020-01-28T00:34:23.000Z
2022-03-31T00:40:06.000Z
train_re.py
carboncoo/UNITER
dfe007c2cea55430a847fd1cf318e88ae8ffe88f
[ "MIT" ]
90
2020-02-18T10:54:40.000Z
2022-03-17T07:36:35.000Z
train_re.py
carboncoo/UNITER
dfe007c2cea55430a847fd1cf318e88ae8ffe88f
[ "MIT" ]
114
2020-01-31T03:03:25.000Z
2022-03-17T15:53:51.000Z
""" Copyright (c) Microsoft Corporation. Licensed under the MIT license. UNITER finetuning for RE """ import argparse import json import os from os.path import exists, join from time import time import torch from torch.nn.utils import clip_grad_norm_ from torch.utils.data import DataLoader from torch.optim import Ada...
40.218341
79
0.562486
a4f469b6e432881fa2bd58668f0c11f0406d4ef9
3,706
py
Python
contrib/macdeploy/custom_dsstore.py
VeriConomy/Verium
c3534ab37a173328a152c1e5c13df83e458d3c24
[ "MIT" ]
null
null
null
contrib/macdeploy/custom_dsstore.py
VeriConomy/Verium
c3534ab37a173328a152c1e5c13df83e458d3c24
[ "MIT" ]
null
null
null
contrib/macdeploy/custom_dsstore.py
VeriConomy/Verium
c3534ab37a173328a152c1e5c13df83e458d3c24
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # 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. import biplist from ds_store import DSStore from mac_alias import Alias import sys output_file = sys.argv...
61.766667
1,820
0.723691
a4464a943ed2deb0b600e940a1d286456d4da3aa
5,837
py
Python
tests/test_send_recv.py
pentschev/ucx-py
d701a3facd85ef2deece619a4f707fdebee36e3c
[ "BSD-3-Clause" ]
76
2019-06-08T04:03:39.000Z
2022-01-07T20:34:23.000Z
tests/test_send_recv.py
rapidsai/ucx-py
e28d770aa0b47c0e63c2e7e61649f1b355560e8a
[ "BSD-3-Clause" ]
644
2019-06-04T23:06:02.000Z
2022-02-24T11:17:45.000Z
tests/test_send_recv.py
pentschev/ucx-py
d701a3facd85ef2deece619a4f707fdebee36e3c
[ "BSD-3-Clause" ]
32
2019-08-14T09:22:02.000Z
2022-01-21T20:17:50.000Z
import functools import pytest import ucp np = pytest.importorskip("numpy") msg_sizes = [2 ** i for i in range(0, 25, 4)] dtypes = ["|u1", "<i8", "f8"] def make_echo_server(create_empty_data): """ Returns an echo server that calls the function `create_empty_data(nbytes)` to create the data container.`...
32.608939
78
0.708583
965947a822d570e99792770294ad15d48fdadf3f
3,570
py
Python
zoo/globalsearch/views.py
aexvir/the-zoo
7816afb9a0a26c6058b030b4a987c73e952d92bd
[ "MIT" ]
90
2018-11-20T10:58:24.000Z
2022-02-19T16:12:46.000Z
zoo/globalsearch/views.py
kiwicom/the-zoo
fee0108ea7b65112e5b572a146cff4b1c54033fd
[ "MIT" ]
348
2018-11-21T09:22:31.000Z
2021-11-03T13:45:08.000Z
zoo/globalsearch/views.py
aexvir/the-zoo
7816afb9a0a26c6058b030b4a987c73e952d92bd
[ "MIT" ]
11
2018-12-08T18:42:07.000Z
2021-02-21T06:27:58.000Z
from math import ceil import structlog from django.apps import apps from django.views.generic import TemplateView from .meili_client import meili_client log = structlog.get_logger() class GlobalSearchView(TemplateView): template_name = "search_overview.html" context_object_name = "context" meili_limit ...
36.060606
88
0.585994
412cc350f91926b11214a936caeba1d04eff9918
61,023
py
Python
python/ccxt/huobipro.py
Cyril45/ccxt
4bd1fd9d35cd54cd71cb546288ab43d0e1586218
[ "MIT" ]
null
null
null
python/ccxt/huobipro.py
Cyril45/ccxt
4bd1fd9d35cd54cd71cb546288ab43d0e1586218
[ "MIT" ]
null
null
null
python/ccxt/huobipro.py
Cyril45/ccxt
4bd1fd9d35cd54cd71cb546288ab43d0e1586218
[ "MIT" ]
1
2021-05-14T22:47:10.000Z
2021-05-14T22:47:10.000Z
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange import hashlib import math from ccxt.base.errors import ExchangeError from ccxt.base.errors import ...
43.712751
355
0.48267
6d32a836d65abd1ee5d2fe4347e09f02459c9feb
2,097
py
Python
ALGO/05_Graph/SortIntByPowerValue.py
dushyantbhatt2007/DS-AND-ALGO
2d4639cab8ae5fc87ce93f23d2d557652f729d93
[ "MIT" ]
1
2021-01-03T23:06:41.000Z
2021-01-03T23:06:41.000Z
ALGO/05_Graph/SortIntByPowerValue.py
dushyantbhatt2007/data-structure-and-algo
2d4639cab8ae5fc87ce93f23d2d557652f729d93
[ "MIT" ]
null
null
null
ALGO/05_Graph/SortIntByPowerValue.py
dushyantbhatt2007/data-structure-and-algo
2d4639cab8ae5fc87ce93f23d2d557652f729d93
[ "MIT" ]
null
null
null
''' The power of an integer x is defined as the number of steps needed to transform x into 1 using the following steps: if x is even then x = x / 2 if x is odd then x = 3 * x + 1 For example, the power of x = 3 is 7 because 3 needs 7 steps to become 1 (3 --> 10 --> 5 --> 16 --> 8 --> 4 --> 2 --> 1). Given three integ...
26.544304
211
0.622794
527e0537f679f0ee56082913dd5a60d43513d58e
47,951
py
Python
language/bert_extraction/steal_bert_qa/models/run_squad.py
Xtuden-com/language
70c0328968d5ffa1201c6fdecde45bbc4fec19fc
[ "Apache-2.0" ]
1,199
2018-10-16T01:30:18.000Z
2022-03-31T21:05:24.000Z
language/bert_extraction/steal_bert_qa/models/run_squad.py
Xtuden-com/language
70c0328968d5ffa1201c6fdecde45bbc4fec19fc
[ "Apache-2.0" ]
116
2018-10-18T03:31:46.000Z
2022-03-24T13:40:50.000Z
language/bert_extraction/steal_bert_qa/models/run_squad.py
Xtuden-com/language
70c0328968d5ffa1201c6fdecde45bbc4fec19fc
[ "Apache-2.0" ]
303
2018-10-22T12:35:12.000Z
2022-03-27T17:38:17.000Z
# coding=utf-8 # Copyright 2018 The Google AI Language Team 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 ...
36.575896
82
0.67154
ec7ce51b5a9a800ec1e562ae9b96990ed424cf3c
2,783
py
Python
discovery-provider/src/queries/get_remixable_tracks.py
csjiang/audius-protocol
31fb3862ec5bc81f792f991268802d3dcc0ea9f4
[ "Apache-2.0" ]
429
2019-08-14T01:34:07.000Z
2022-03-30T06:31:38.000Z
discovery-provider/src/queries/get_remixable_tracks.py
SNOmad1/audius-protocol
3d5fc2bf688265eb529060f1f3234ef2b95ed231
[ "Apache-2.0" ]
998
2019-08-14T01:52:37.000Z
2022-03-31T23:17:22.000Z
discovery-provider/src/queries/get_remixable_tracks.py
SNOmad1/audius-protocol
3d5fc2bf688265eb529060f1f3234ef2b95ed231
[ "Apache-2.0" ]
73
2019-10-04T04:24:16.000Z
2022-03-24T16:27:30.000Z
from sqlalchemy import desc from sqlalchemy.orm import aliased from src.models import Track, Stem, AggregateTrack from src.queries.query_helpers import ( populate_track_metadata, add_users_to_tracks, decayed_score, ) from src.utils.db_session import get_db_read_replica from src.utils import helpers def ge...
32.360465
87
0.575278
4798b8138753f02d235e2640cb57a555f8610b60
888
py
Python
util/parser.py
zlasd/novelS
44905ec0477806f8aee377e098d4311d65aabd18
[ "MIT" ]
1
2021-06-07T08:18:56.000Z
2021-06-07T08:18:56.000Z
util/parser.py
zlasd/novelS
44905ec0477806f8aee377e098d4311d65aabd18
[ "MIT" ]
null
null
null
util/parser.py
zlasd/novelS
44905ec0477806f8aee377e098d4311d65aabd18
[ "MIT" ]
null
null
null
from bs4 import BeautifulSoup from util import log def find_chap_list(content: str, link_format="{}", format_map={}, list_class="listmain", ignore_chap=0): soup = BeautifulSoup(content, 'html.parser') tag_main_list = soup.find(class_=list_class) tag_chap_list = tag_main_list.find_all('a') ret = [] ...
28.645161
104
0.647523
7e103a70ea1927e93815205499d882c1be64e83d
921
py
Python
string/0227_basic_calculator_ii/0227_basic_calculator_ii.py
zdyxry/LeetCode
33371285d0f3302158230f46e8b1b63b9f4639c4
[ "Xnet", "X11" ]
6
2019-09-16T01:50:44.000Z
2020-09-17T08:52:25.000Z
string/0227_basic_calculator_ii/0227_basic_calculator_ii.py
zdyxry/LeetCode
33371285d0f3302158230f46e8b1b63b9f4639c4
[ "Xnet", "X11" ]
null
null
null
string/0227_basic_calculator_ii/0227_basic_calculator_ii.py
zdyxry/LeetCode
33371285d0f3302158230f46e8b1b63b9f4639c4
[ "Xnet", "X11" ]
4
2020-02-07T12:43:16.000Z
2021-04-11T06:38:55.000Z
class Solution(object): def calculate(self, s): if not s: return "0" stack, num, sign = [], 0, "+" for i in xrange(len(s)): if s[i].isdigit(): num = num*10 + ord(s[i])-ord("0") if (not s[i].isdigit() and not s[i].isspace()) or i == len(s) -...
31.758621
78
0.374593
01059c955ac21721c14181997735f11a9036368e
1,570
py
Python
util/util_imageIO.py
google/dynamic-video-depth
7dab8f9e156fa35735301695ea020aee7221fb31
[ "Apache-2.0" ]
144
2021-08-09T21:05:57.000Z
2022-03-30T17:37:43.000Z
util/util_imageIO.py
vedaldi/dynamic-video-depth
274f5f59604a10121a2445f7b30df4a9ff075946
[ "Apache-2.0" ]
11
2021-08-17T13:58:55.000Z
2022-03-28T08:12:29.000Z
util/util_imageIO.py
vedaldi/dynamic-video-depth
274f5f59604a10121a2445f7b30df4a9ff075946
[ "Apache-2.0" ]
20
2021-08-12T13:51:35.000Z
2022-03-13T22:33:50.000Z
# Copyright 2021 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, s...
28.035714
102
0.636306
d5435a10da95de18d3f3a53ad7e5e0597ac5b50e
6,950
py
Python
apps/groups/tests/test_views.py
storagebot/kitsune
613ba2ca09104f330ab77088b452391169096249
[ "BSD-3-Clause" ]
2
2019-08-19T17:08:47.000Z
2019-10-05T11:37:02.000Z
apps/groups/tests/test_views.py
taliasman/kitsune
f8085205eef143011adb4c52d1f183da06c1c58e
[ "BSD-3-Clause" ]
null
null
null
apps/groups/tests/test_views.py
taliasman/kitsune
f8085205eef143011adb4c52d1f183da06c1c58e
[ "BSD-3-Clause" ]
null
null
null
import os from django.core.files import File from nose.tools import eq_ from groups.models import GroupProfile from groups.tests import group_profile from sumo.helpers import urlparams from sumo.tests import TestCase from sumo.urlresolvers import reverse from users.tests import user, group, add_permission class Ed...
39.265537
78
0.63223
6765f3048b69f9823d05eedd7cc73f51d29a31bb
825
py
Python
bayes_nn/models/base_model.py
rnagumo/bayes_nn
3a6ee31d1dcc9a7f8d2dfb0aadf180c443915931
[ "MIT" ]
null
null
null
bayes_nn/models/base_model.py
rnagumo/bayes_nn
3a6ee31d1dcc9a7f8d2dfb0aadf180c443915931
[ "MIT" ]
null
null
null
bayes_nn/models/base_model.py
rnagumo/bayes_nn
3a6ee31d1dcc9a7f8d2dfb0aadf180c443915931
[ "MIT" ]
null
null
null
from torch import Tensor, nn class BaseModel(nn.Module): def forward(self, x: Tensor) -> tuple[Tensor, Tensor]: """Forward pass to calculate target. Args: x: Input features. Returns: Tuple of `(mean, var)` of prediction. """ raise NotImplementedEr...
21.710526
67
0.550303
5ea121614078a1b9eebec913039231eec7bed0a4
5,347
py
Python
pyltr/metrics/_metrics.py
rit-git/pyltr
c18e24fc18a1099ee3cac06b71d09f09545458bb
[ "BSD-3-Clause" ]
null
null
null
pyltr/metrics/_metrics.py
rit-git/pyltr
c18e24fc18a1099ee3cac06b71d09f09545458bb
[ "BSD-3-Clause" ]
null
null
null
pyltr/metrics/_metrics.py
rit-git/pyltr
c18e24fc18a1099ee3cac06b71d09f09545458bb
[ "BSD-3-Clause" ]
null
null
null
import numpy as np from sklearn.externals.six.moves import range from ..util.group import check_qids, get_groups from ..util.sort import get_sorted_y class Metric(object): """Base LTR metric class. Subclasses must override evaluate() and can optionally override various other methods. """ def eva...
30.20904
79
0.552459
c9ab3257341041275cba3422d1e31953485173c5
1,534
py
Python
vega/algorithms/nas/modnas/estim/dist_backend/base.py
shaido987/vega
14d5d49fb8bdf96bd1f3fcfac201ce6b6712c3b6
[ "MIT" ]
1
2021-05-08T07:47:44.000Z
2021-05-08T07:47:44.000Z
vega/algorithms/nas/modnas/estim/dist_backend/base.py
WholeG/vega
d1ccf1c3ce68a118bdb6775594ceed0f895911e7
[ "MIT" ]
null
null
null
vega/algorithms/nas/modnas/estim/dist_backend/base.py
WholeG/vega
d1ccf1c3ce68a118bdb6775594ceed0f895911e7
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved. # This program is free software; you can redistribute it and/or modify # it under the terms of the MIT License. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the ...
30.078431
91
0.656454
5deabb197de5178e0fc51d7afd905b317e49c586
2,446
py
Python
hocon/util.py
chris-martin/hocon-python
4d94595d531ef8cd69a086dbb5cb65550d8d456e
[ "Apache-2.0" ]
3
2017-01-23T09:16:09.000Z
2018-06-06T17:00:35.000Z
hocon/util.py
chris-martin/hocon-python
4d94595d531ef8cd69a086dbb5cb65550d8d456e
[ "Apache-2.0" ]
null
null
null
hocon/util.py
chris-martin/hocon-python
4d94595d531ef8cd69a086dbb5cb65550d8d456e
[ "Apache-2.0" ]
1
2019-03-21T01:55:47.000Z
2019-03-21T01:55:47.000Z
""" Contains static utility methods. """ from .impl import util as impl_util def quote_string(s): """ public static String quoteString(String s) * Quotes and escapes a string, as in the JSON specification. * * @param s * a string * @return the string quoted and escaped ...
31.358974
80
0.638185
c8024bb909c24855dbf1b7a05c149e764b775382
13,382
py
Python
livestyled/models/ticket.py
livestyled/python-sdk
e75263e8bbf7132e4ce0e69d0ca3ad19088661b2
[ "MIT" ]
null
null
null
livestyled/models/ticket.py
livestyled/python-sdk
e75263e8bbf7132e4ce0e69d0ca3ad19088661b2
[ "MIT" ]
1
2020-05-21T10:01:07.000Z
2020-05-21T10:01:07.000Z
livestyled/models/ticket.py
livestyled/python-sdk
e75263e8bbf7132e4ce0e69d0ca3ad19088661b2
[ "MIT" ]
null
null
null
from livestyled.models.app import Currency from livestyled.models.event import Event, EventDate from livestyled.models.ticket_integration import TicketIntegration from livestyled.models.user import User from livestyled.models.venue import Venue class Ticket: def __init__( self, id, ...
33.538847
119
0.555747
3b75c9e21a59f06a0a71ac339b153e617a2a809f
2,228
py
Python
Store/AuthStore.py
uscope-platform/uscope_server
d8679c1aea0210ed80375a2b071b5971ce7a7232
[ "Apache-2.0" ]
null
null
null
Store/AuthStore.py
uscope-platform/uscope_server
d8679c1aea0210ed80375a2b071b5971ce7a7232
[ "Apache-2.0" ]
null
null
null
Store/AuthStore.py
uscope-platform/uscope_server
d8679c1aea0210ed80375a2b071b5971ce7a7232
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 University of Nottingham Ningbo China # Author: Filippo Savi <filssavi@gmail.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICEN...
31.828571
109
0.714542
f176e0af78a2811b7765aecca020ed3f225299c3
3,134
py
Python
data/p2DJ/New/program/qiskit/class/startQiskit_Class199.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p2DJ/New/program/qiskit/class/startQiskit_Class199.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p2DJ/New/program/qiskit/class/startQiskit_Class199.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=2 # total number=11 import cirq import qiskit from qiskit import IBMQ from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2,floor, sqrt, pi import numpy a...
28.234234
80
0.619336
81b34f027b43532d60ef240b15a2b0a834d30265
4,135
py
Python
iquhack/admin.py
mwalsh161/iquise-website
ab674d7881e418fe02b533ae477982e328e8fec7
[ "MIT" ]
null
null
null
iquhack/admin.py
mwalsh161/iquise-website
ab674d7881e418fe02b533ae477982e328e8fec7
[ "MIT" ]
14
2018-08-23T23:54:37.000Z
2020-04-29T23:44:18.000Z
iquhack/admin.py
mwalsh161/iquise-website
ab674d7881e418fe02b533ae477982e328e8fec7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals import json from django.contrib import admin from django.urls import reverse from django.shortcuts import redirect from django.db import transaction from django.utils.safestring import mark_safe from .models import ( Hackathon, Sponsor, Tier...
32.81746
140
0.679807
0a571d96f60adf6a274a12cdee2a1205e32bb721
9,681
py
Python
example/redn_trainer.py
yjc9696/REDN
132c78ef290a30e93c0c4c6738ae9c1520241a2b
[ "MIT" ]
null
null
null
example/redn_trainer.py
yjc9696/REDN
132c78ef290a30e93c0c4c6738ae9c1520241a2b
[ "MIT" ]
1
2021-06-02T02:09:52.000Z
2021-06-02T02:09:52.000Z
example/redn_trainer.py
yjc9696/REDN
132c78ef290a30e93c0c4c6738ae9c1520241a2b
[ "MIT" ]
null
null
null
# coding:utf-8 import torch import json import sys from torch.utils.data import DataLoader import os import pickle import random sys.path.append("/") from opennre import encoder, model, framework from opennre.framework.data_loader import SentenceREDataset from opennre.framework.f1_metric import F1Metric from example ...
41.909091
126
0.551389
7c96ce015a2d667da4d24423f4c760b40a7162ed
5,460
py
Python
src/vak/models/teenytweetynet.py
jspaaks/vak
581ec4869d342e5d52bc057de54c10901f06d343
[ "BSD-3-Clause" ]
26
2019-03-04T20:08:57.000Z
2022-01-22T13:40:00.000Z
src/vak/models/teenytweetynet.py
jspaaks/vak
581ec4869d342e5d52bc057de54c10901f06d343
[ "BSD-3-Clause" ]
379
2019-03-03T12:16:05.000Z
2022-03-29T13:44:46.000Z
src/vak/models/teenytweetynet.py
jspaaks/vak
581ec4869d342e5d52bc057de54c10901f06d343
[ "BSD-3-Clause" ]
12
2019-11-22T21:19:19.000Z
2022-03-14T17:44:59.000Z
import torch from torch import nn from ..engine.model import Model # absolute import to avoid name clash in model def below import vak.metrics class TeenyTweetyNet(nn.Module): def __init__( self, num_classes, input_shape=(1, 513, 88), conv1_filters=8, conv1_kernel_size=(5...
40.147059
118
0.614469
3e2060b9f86ce24a2b67624846bb0789c28cde45
5,643
py
Python
exp1_bot_detection/Yang/Yang.py
GabrielHam/SATAR_Twitter_Bot_Detection_with_Self-supervised_User_Representation_Learning
ac73e5deb9d748f02d1396d1458e716408470cc9
[ "MIT" ]
5
2021-08-10T14:15:18.000Z
2022-03-09T07:06:19.000Z
exp1_bot_detection/Yang/Yang.py
GabrielHam/SATAR_Twitter_Bot_Detection_with_Self-supervised_User_Representation_Learning
ac73e5deb9d748f02d1396d1458e716408470cc9
[ "MIT" ]
null
null
null
exp1_bot_detection/Yang/Yang.py
GabrielHam/SATAR_Twitter_Bot_Detection_with_Self-supervised_User_Representation_Learning
ac73e5deb9d748f02d1396d1458e716408470cc9
[ "MIT" ]
null
null
null
import os from sklearn.ensemble import RandomForestClassifier import joblib import datetime import time IDList = [] labelList = [] with open('finalList.txt', 'r', encoding = 'utf-8') as f: for line in f: IDList.append(line.split()[1]) labelList.append(line.split()[2]) print('load done')...
33
103
0.551834
082e32c506a4a55180dcedb5a1c87f250b1bc07f
4,500
py
Python
stem_cell_hypothesis/zh_albert_base/single/dep.py
emorynlp/stem-cell-hypothesis
48a628093d93d653865fbac6409d179cddd99293
[ "Apache-2.0" ]
4
2021-09-17T15:23:31.000Z
2022-02-28T10:18:04.000Z
stem_cell_hypothesis/zh_albert_base/single/dep.py
emorynlp/stem-cell-hypothesis
48a628093d93d653865fbac6409d179cddd99293
[ "Apache-2.0" ]
null
null
null
stem_cell_hypothesis/zh_albert_base/single/dep.py
emorynlp/stem-cell-hypothesis
48a628093d93d653865fbac6409d179cddd99293
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- # Author: hankcs # Date: 2021-01-06 16:12 from typing import List from elit.common.dataset import SortingSamplerBuilder from elit.common.transform import NormalizeToken from elit.components.mtl.multi_task_learning import MultiTaskLearning from elit.components.mtl.tasks.constituency import CRFCon...
39.473684
121
0.625111
e3e7ec28a016ee91d719a0519faa7732691b69a1
15,723
py
Python
src/oscar/apps/customer/forms.py
coderedcorp/django-oscar
42856777fe34d88825280fd46b934ef9bb684fc5
[ "BSD-3-Clause" ]
null
null
null
src/oscar/apps/customer/forms.py
coderedcorp/django-oscar
42856777fe34d88825280fd46b934ef9bb684fc5
[ "BSD-3-Clause" ]
2
2019-03-13T16:15:54.000Z
2019-07-04T18:53:37.000Z
src/oscar/apps/customer/forms.py
coderedcorp/django-oscar
42856777fe34d88825280fd46b934ef9bb684fc5
[ "BSD-3-Clause" ]
null
null
null
import string from django import forms from django.conf import settings from django.contrib.auth import forms as auth_forms from django.contrib.auth.forms import AuthenticationForm from django.contrib.auth.password_validation import validate_password from django.contrib.sites.shortcuts import get_current_site from dja...
36.65035
84
0.614132
eb9d38220ad68777d0f10a5f1c841409c88c9d81
3,442
py
Python
platypush/plugins/lcd/i2c.py
RichardChiang/platypush
1777ebb0516118cdef20046a92caab496fa7c6cb
[ "MIT" ]
null
null
null
platypush/plugins/lcd/i2c.py
RichardChiang/platypush
1777ebb0516118cdef20046a92caab496fa7c6cb
[ "MIT" ]
null
null
null
platypush/plugins/lcd/i2c.py
RichardChiang/platypush
1777ebb0516118cdef20046a92caab496fa7c6cb
[ "MIT" ]
null
null
null
from typing import Optional from platypush.plugins.lcd import LcdPlugin class LcdI2cPlugin(LcdPlugin): """ Plugin to write to an LCD display connected via I2C. Adafruit I2C/SPI LCD Backback is supported. Warning: You might need a level shifter (that supports i2c) between the SCL/SDA connections ...
44.701299
140
0.620569
542587b7e30d26597562fb605d86bbaa45eb3584
5,265
py
Python
trainer2.py
YuanshengZhao/adiabaticbinary
2db98957e3d570a3d4fa94d25aed65810576b898
[ "MIT" ]
null
null
null
trainer2.py
YuanshengZhao/adiabaticbinary
2db98957e3d570a3d4fa94d25aed65810576b898
[ "MIT" ]
null
null
null
trainer2.py
YuanshengZhao/adiabaticbinary
2db98957e3d570a3d4fa94d25aed65810576b898
[ "MIT" ]
null
null
null
import tensorflow as tf import numpy as np class Trainer(object): def __init__(self, same_wts_ep, mode="b"): self.binbest=0.0 self.same_wts_ep=same_wts_ep self.sw_epc=0 self.tot_sw=0 self.mode=mode self.pmode="a" if mode=="a" else "w" self.prto=1.5...
42.459677
150
0.496676
5bb40c044702dfe8fd4e4e33915bf996bfeef9eb
7,404
py
Python
data_parallel_model.py
winwinJJiang/keras_multi_gpu_training
d156237217c54ba618c73c300f22e332f6b23b0e
[ "MIT" ]
76
2017-08-10T13:17:40.000Z
2021-12-20T19:28:41.000Z
data_parallel_model.py
winwinJJiang/keras_multi_gpu_training
d156237217c54ba618c73c300f22e332f6b23b0e
[ "MIT" ]
8
2017-08-10T13:04:20.000Z
2019-06-09T10:17:15.000Z
data_parallel_model.py
winwinJJiang/keras_multi_gpu_training
d156237217c54ba618c73c300f22e332f6b23b0e
[ "MIT" ]
20
2017-08-31T12:50:46.000Z
2021-12-20T19:28:41.000Z
import keras.backend as K from keras.layers import Lambda from keras.layers.merge import concatenate from keras.models import Model import keras.optimizers from keras.optimizers import clip_norm, Optimizer import tensorflow as tf # this should be fairly ready class DataParallelOptimizer(Optimizer): """ Wrapper...
43.046512
87
0.60913
8d1b66d04c044786e775b3d6349f0b1405e748bb
21,909
py
Python
python/ray/data/read_api.py
odp/ray
ab55b808c56f9e23af575fa1b1c1948e44c7e36a
[ "Apache-2.0" ]
null
null
null
python/ray/data/read_api.py
odp/ray
ab55b808c56f9e23af575fa1b1c1948e44c7e36a
[ "Apache-2.0" ]
24
2021-10-30T07:09:36.000Z
2022-03-12T08:09:04.000Z
python/ray/data/read_api.py
sasha-s/ray
635010d460ba266b56fc857e56af8272ae08df8c
[ "Apache-2.0" ]
null
null
null
import itertools import logging from typing import List, Any, Dict, Union, Optional, Tuple, Callable, \ TypeVar, TYPE_CHECKING import numpy as np if TYPE_CHECKING: import pyarrow import pandas import dask import mars import modin import pyspark import ray from ray.types import ObjectRef fr...
34.448113
79
0.644667
3d488364715b3cceb8377fa88b63fd3258c1b241
1,170
py
Python
examples/media_group.py
andrew-ld/aiogram
b55153ccf3ab9ef191bef6c20e467b92f3b270ed
[ "MIT" ]
2,744
2017-11-19T00:56:19.000Z
2022-03-31T15:48:23.000Z
examples/media_group.py
andrew-ld/aiogram
b55153ccf3ab9ef191bef6c20e467b92f3b270ed
[ "MIT" ]
513
2018-01-23T16:52:59.000Z
2022-03-27T01:50:30.000Z
examples/media_group.py
andrew-ld/aiogram
b55153ccf3ab9ef191bef6c20e467b92f3b270ed
[ "MIT" ]
813
2017-12-05T06:49:48.000Z
2022-03-29T15:47:50.000Z
import asyncio from aiogram import Bot, Dispatcher, executor, filters, types API_TOKEN = 'BOT_TOKEN_HERE' bot = Bot(token=API_TOKEN) dp = Dispatcher(bot) @dp.message_handler(filters.CommandStart()) async def send_welcome(message: types.Message): # So... At first I want to send something like this: await m...
26.590909
76
0.691453
604bcaa13f3d936d9e39424083f39d77064dbfec
887
py
Python
dynamicProgramming/knapsack/knapsack.py
G-MontaG/leetcode
444e8ee3f395c191a86eae0e42d028060ecd1686
[ "MIT" ]
1
2021-02-10T18:14:55.000Z
2021-02-10T18:14:55.000Z
dynamicProgramming/knapsack/knapsack.py
G-MontaG/leetcode
444e8ee3f395c191a86eae0e42d028060ecd1686
[ "MIT" ]
null
null
null
dynamicProgramming/knapsack/knapsack.py
G-MontaG/leetcode
444e8ee3f395c191a86eae0e42d028060ecd1686
[ "MIT" ]
null
null
null
# | Item | Weight | Value | # |------|--------|-------| # | 1 | 2 | 1 | # | 2 | 10 | 20 | # | 3 | 3 | 3 | # | 4 | 6 | 14 | # | 5 | 18 | 100 | # Put a placeholder 0 weight, 0 value item to max # these line up better with the 1D memoization table K item_weights = [0,...
24.638889
63
0.472379
24059c699a1309924ad46a76693e23c5834c66b6
35
py
Python
__init__.py
Robaina/filterSAM
e1a545296eb7826f7f61cef483bf228477d27ebe
[ "CC-BY-4.0" ]
2
2021-12-02T22:11:16.000Z
2022-01-24T14:04:02.000Z
__init__.py
Robaina/filterSAM
e1a545296eb7826f7f61cef483bf228477d27ebe
[ "CC-BY-4.0" ]
null
null
null
__init__.py
Robaina/filterSAM
e1a545296eb7826f7f61cef483bf228477d27ebe
[ "CC-BY-4.0" ]
null
null
null
from .filtersam.filtersam import *
17.5
34
0.8
b876136cee9df3622810faa47665a2c25c920a3a
6,344
py
Python
sdk/python/pulumi_azure_nextgen/cognitiveservices/v20160201preview/get_cognitive_services_account.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/cognitiveservices/v20160201preview/get_cognitive_services_account.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/cognitiveservices/v20160201preview/get_cognitive_services_account.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
# 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 from...
37.317647
312
0.64959
2259f597dffc0f6c955c10db971d41fb48ee5bd4
1,503
py
Python
kid_readout/measurement/io/easync.py
danielflanigan/kid_readout
07202090d468669200cab78297122880c1c03e87
[ "BSD-2-Clause" ]
1
2015-05-21T20:57:39.000Z
2015-05-21T20:57:39.000Z
kid_readout/utils/easync.py
braddober/kid_readout
1917960c761663227fa5b74fff34e38a03b80b4d
[ "BSD-2-Clause" ]
null
null
null
kid_readout/utils/easync.py
braddober/kid_readout
1917960c761663227fa5b74fff34e38a03b80b4d
[ "BSD-2-Clause" ]
null
null
null
""" easync.py - easier access to netCDF4 files """ import netCDF4 class EasyGroup(object): def __repr__(self): return "EasyNC: %s %s" % (self._filename,self.group.path) def __str__(self): return self.__repr__() def __init__(self,group,filename): self._filen...
34.159091
81
0.586826
013311bc9ab25f701b48f2903b1d44a7fceb261a
4,489
py
Python
platzigram/settings.py
chegrofelix/insta-clone
b0adb0050f8c9d5f9e40e152b65d9d68b60a3d74
[ "MIT" ]
1
2021-04-02T13:59:20.000Z
2021-04-02T13:59:20.000Z
platzigram/settings.py
chegrofelix/insta-clone
b0adb0050f8c9d5f9e40e152b65d9d68b60a3d74
[ "MIT" ]
null
null
null
platzigram/settings.py
chegrofelix/insta-clone
b0adb0050f8c9d5f9e40e152b65d9d68b60a3d74
[ "MIT" ]
null
null
null
""" Django settings for platzigram project. Generated by 'django-admin startproject' using Django 2.1.3. For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.1/ref/settings/ """ import os...
25.219101
91
0.692136
85a915ac57e82e13bc28c2b056ee878dc638aea0
2,167
py
Python
examples/python/pytorch/cifar10_cnn.py
sdalton1/FlexFlow
a08386df098aaa23195ba15af2d0e1c88ecc399c
[ "Apache-2.0" ]
null
null
null
examples/python/pytorch/cifar10_cnn.py
sdalton1/FlexFlow
a08386df098aaa23195ba15af2d0e1c88ecc399c
[ "Apache-2.0" ]
null
null
null
examples/python/pytorch/cifar10_cnn.py
sdalton1/FlexFlow
a08386df098aaa23195ba15af2d0e1c88ecc399c
[ "Apache-2.0" ]
null
null
null
from flexflow.core import * from flexflow.keras.datasets import cifar10 from flexflow.torch.model import PyTorchModel #from accuracy import ModelAccuracy def top_level_task(): ffconfig = FFConfig() print("Python API batchSize(%d) workersPerNodes(%d) numNodes(%d)" %(ffconfig.batch_size, ffconfig.workers_per_node, ...
30.957143
167
0.760037
a69fb6b4fa82c626ecffa034c6b7149eca785a14
3,685
py
Python
src/pretix/control/views/geo.py
fabm3n/pretix
520fb620888d5c434665a6a4a33cb2ab22dd42c7
[ "Apache-2.0" ]
1,248
2015-04-24T13:32:06.000Z
2022-03-29T07:01:36.000Z
src/pretix/control/views/geo.py
fabm3n/pretix
520fb620888d5c434665a6a4a33cb2ab22dd42c7
[ "Apache-2.0" ]
2,113
2015-02-18T18:58:16.000Z
2022-03-31T11:12:32.000Z
src/pretix/control/views/geo.py
fabm3n/pretix
520fb620888d5c434665a6a4a33cb2ab22dd42c7
[ "Apache-2.0" ]
453
2015-05-13T09:29:06.000Z
2022-03-24T13:39:16.000Z
# # This file is part of pretix (Community Edition). # # Copyright (C) 2014-2020 Raphael Michel and contributors # Copyright (C) 2020-2021 rami.io GmbH and contributors # # 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 ...
34.439252
118
0.59403
e0dc4f835734d7ee6335cf3f669e2b6a13c04e98
2,327
py
Python
project_utils.py
KieranXWang/HRS
3999cd036ee9da59f4d82619bd540e93d5258f7c
[ "MIT" ]
5
2019-09-05T15:18:52.000Z
2022-03-28T08:15:47.000Z
project_utils.py
VictoriaWSY/HRS
eb7061e225b3e647dc266a91fc473e0d98f3ea4e
[ "MIT" ]
1
2021-07-26T13:05:49.000Z
2021-07-26T13:05:49.000Z
project_utils.py
VictoriaWSY/HRS
eb7061e225b3e647dc266a91fc473e0d98f3ea4e
[ "MIT" ]
6
2019-09-18T02:11:12.000Z
2022-03-11T08:45:03.000Z
import numpy as np from keras.datasets import cifar10, mnist from keras.utils import np_utils def load_cifar_data(one_hot=True, scale1=True): (X_train, Y_train), (X_test, Y_test) = cifar10.load_data() if one_hot: Y_train = np_utils.to_categorical(Y_train, 10) Y_test = np_utils.to_categorical(...
28.728395
92
0.628706
3e4c82fa2f273b6624e4f2d09c2b801124c54aae
2,500
py
Python
zvt/factors/similarity_factor.py
stone64/zvt
19360b3f29992bc759709adfa90e32843147a807
[ "MIT" ]
1
2021-02-25T08:41:51.000Z
2021-02-25T08:41:51.000Z
zvt/factors/similarity_factor.py
stone64/zvt
19360b3f29992bc759709adfa90e32843147a807
[ "MIT" ]
null
null
null
zvt/factors/similarity_factor.py
stone64/zvt
19360b3f29992bc759709adfa90e32843147a807
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from typing import List, Union import numpy as np import pandas as pd from zvt.api import AdjustType, get_kdata, get_kdata_schema from zvt.contract import EntityMixin, IntervalLevel from zvt.domain import Stock from zvt.factors import TechnicalFactor, Transformer, Accumulator def get_ref_vec...
54.347826
118
0.6592
9b531db7c6e6b8fea84b02e97414e77dda5a2a51
4,572
py
Python
ocr/utils/denoiser_utils.py
georgeblu1/Logia
8a38ae3fd68fb6f4149f0ac7df804e3eb0bcf5d7
[ "MIT" ]
null
null
null
ocr/utils/denoiser_utils.py
georgeblu1/Logia
8a38ae3fd68fb6f4149f0ac7df804e3eb0bcf5d7
[ "MIT" ]
8
2020-03-24T17:17:06.000Z
2022-03-11T23:53:25.000Z
ocr/utils/denoiser_utils.py
georgeblu1/Logia
8a38ae3fd68fb6f4149f0ac7df804e3eb0bcf5d7
[ "MIT" ]
null
null
null
import gluonnlp as nlp import Levenshtein import mxnet as mx import numpy as np from ocr.utils.encoder_decoder import decode_char class SequenceGenerator: def __init__(self, sampler, language_model, vocab, ctx_nlp, tokenizer=nlp.data.SacreMosesTokenizer(), detokenizer=nlp.data.SacreMosesDetokenizer()): ...
41.189189
224
0.566273
04966c67237f3424e389b5e61b569f254418acb2
5,091
py
Python
pyatv/mrp/protobuf/NowPlayingClient_pb2.py
acheronfail/pyatv
9cb96ffcc49938c4b43c92b7b40ddcecae37e732
[ "MIT" ]
null
null
null
pyatv/mrp/protobuf/NowPlayingClient_pb2.py
acheronfail/pyatv
9cb96ffcc49938c4b43c92b7b40ddcecae37e732
[ "MIT" ]
null
null
null
pyatv/mrp/protobuf/NowPlayingClient_pb2.py
acheronfail/pyatv
9cb96ffcc49938c4b43c92b7b40ddcecae37e732
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: pyatv/mrp/protobuf/NowPlayingClient.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _re...
45.053097
456
0.768022
f3b25970ad94fed4000e50ef02b27e02db993edc
1,303
py
Python
tests/parser/exceptions/test_variable_declaration_exception.py
williamremor/vyper
4d33dc4140f7d0c339876afb6af7b417bd0ed8e0
[ "MIT" ]
1
2018-08-31T02:32:57.000Z
2018-08-31T02:32:57.000Z
tests/parser/exceptions/test_variable_declaration_exception.py
williamremor/vyper
4d33dc4140f7d0c339876afb6af7b417bd0ed8e0
[ "MIT" ]
null
null
null
tests/parser/exceptions/test_variable_declaration_exception.py
williamremor/vyper
4d33dc4140f7d0c339876afb6af7b417bd0ed8e0
[ "MIT" ]
null
null
null
import pytest from pytest import raises from vyper import compiler from vyper.exceptions import VariableDeclarationException fail_list = [ """ x: num x: num """, """ x: num @public def foo(x: num): pass """, """ @public def foo(x: num, x: num): pass """, """ @public def foo(num: num): ...
11.429825
57
0.504221
dbdc8d7ebd84f6d221cfd7cc1892af5d102ab039
2,660
py
Python
aiida_vasp/utils/extended_dicts.py
kavanase/aiida-vasp
3941447b398f2da1ff7ffd3f3a22e18a7f7252fc
[ "MIT" ]
1
2021-06-13T09:13:01.000Z
2021-06-13T09:13:01.000Z
aiida_vasp/utils/extended_dicts.py
pzarabadip/aiida-vasp
f9edc032fb0845622c5b0bbe7e1a5bf51205dae5
[ "MIT" ]
null
null
null
aiida_vasp/utils/extended_dicts.py
pzarabadip/aiida-vasp
f9edc032fb0845622c5b0bbe7e1a5bf51205dae5
[ "MIT" ]
null
null
null
""" Extensions of dictionaries. --------------------------- Extensions of Pythons standard dict as well as Aiida's AttributeDict. """ import collections from copy import deepcopy from aiida.common.extendeddicts import AttributeDict class DictWithAttributes(AttributeDict): """ Extension of the AttributeDict ...
32.439024
99
0.652256
88239a31c70435ee71c85a1dcd64de7e75c9ad3f
47
py
Python
irctest/scram/__init__.py
FiskFan1999/ergochat_irctest
da005d7d2492bf31c4bdeb46108240766c69d0ad
[ "MIT" ]
16
2015-12-20T16:24:54.000Z
2021-06-03T18:00:03.000Z
irctest/scram/__init__.py
FiskFan1999/ergochat_irctest
da005d7d2492bf31c4bdeb46108240766c69d0ad
[ "MIT" ]
66
2015-12-20T00:23:25.000Z
2021-08-14T09:57:04.000Z
irctest/scram/__init__.py
FiskFan1999/ergochat_irctest
da005d7d2492bf31c4bdeb46108240766c69d0ad
[ "MIT" ]
3
2021-12-04T21:18:41.000Z
2022-03-22T01:42:36.000Z
from .scram import * from .exceptions import *
15.666667
25
0.744681
771265915f53a909345a44e4ad5aa0615d77e60e
8,939
py
Python
tests/fetchers/test_discussion_fetcher.py
nightblade9/steam-review-checker
bfcc9c6ec93ab8a472cfd75e22ef33167c4dc3f9
[ "MIT" ]
null
null
null
tests/fetchers/test_discussion_fetcher.py
nightblade9/steam-review-checker
bfcc9c6ec93ab8a472cfd75e22ef33167c4dc3f9
[ "MIT" ]
2
2021-05-27T15:50:46.000Z
2021-10-31T23:01:58.000Z
tests/fetchers/test_discussion_fetcher.py
nightblade9/steam-review-checker
bfcc9c6ec93ab8a472cfd75e22ef33167c4dc3f9
[ "MIT" ]
2
2021-02-14T07:34:47.000Z
2021-05-27T15:20:57.000Z
import datetime import os import unittest from fetchers import discussion_fetcher class TestDicussionFetcher(unittest.TestCase): _MAX_DISCUSSIONS_PER_PAGE = 50 # use proper pagination please def test_parse_date_converts_empty_string_to_now(self): for test_case in ['', ' ']: ...
46.801047
165
0.547824
a6477b04ee0f1f2f55f06c5ffb636835b4dbe951
386
py
Python
.venv/lib/python3.8/site-packages/aws_cdk/aws_kms/_jsii/__init__.py
sandipganguly/cdkpipeline
aecde04724a99e55d20a62cd3ccded6ceedbe967
[ "MIT-0" ]
null
null
null
.venv/lib/python3.8/site-packages/aws_cdk/aws_kms/_jsii/__init__.py
sandipganguly/cdkpipeline
aecde04724a99e55d20a62cd3ccded6ceedbe967
[ "MIT-0" ]
null
null
null
.venv/lib/python3.8/site-packages/aws_cdk/aws_kms/_jsii/__init__.py
sandipganguly/cdkpipeline
aecde04724a99e55d20a62cd3ccded6ceedbe967
[ "MIT-0" ]
null
null
null
import abc import builtins import datetime import enum import typing import jsii import jsii.compat import publication import aws_cdk.aws_iam._jsii import aws_cdk.core._jsii import constructs._jsii __jsii_assembly__ = jsii.JSIIAssembly.load( "@aws-cdk/aws-kms", "1.56.0", __name__[0:-6], "aws-kms@1.56.0.jsii.tgz"...
16.083333
75
0.756477
d617ac4a894c0eaf8d75e238abe61954f653e261
700
py
Python
password.py
tonywh/es50w-project1
4a2e220741c780faaa8720fc10324f9428596f48
[ "MIT" ]
null
null
null
password.py
tonywh/es50w-project1
4a2e220741c780faaa8720fc10324f9428596f48
[ "MIT" ]
null
null
null
password.py
tonywh/es50w-project1
4a2e220741c780faaa8720fc10324f9428596f48
[ "MIT" ]
null
null
null
import hashlib, binascii, os # Returns salt + password-hash ready for storing. def hash_password(password): salt = hashlib.sha256(os.urandom(60)).hexdigest().encode('ascii') hash_bin = hashlib.pbkdf2_hmac('sha512', password.encode('utf-8'), salt, 100000) hash = binascii.hexlify(hash_bin) return (salt ...
43.75
109
0.725714
927f3300269a365ce1968262405aa19b12e88151
17,125
py
Python
source/pytessy.py
sydneyprovence/pytessy
f16ec8bf13f50e3b7bd1247f8785fbb64aa665c8
[ "BSL-1.0" ]
null
null
null
source/pytessy.py
sydneyprovence/pytessy
f16ec8bf13f50e3b7bd1247f8785fbb64aa665c8
[ "BSL-1.0" ]
null
null
null
source/pytessy.py
sydneyprovence/pytessy
f16ec8bf13f50e3b7bd1247f8785fbb64aa665c8
[ "BSL-1.0" ]
1
2021-06-08T20:25:19.000Z
2021-06-08T20:25:19.000Z
#!/usr/bin/python3 """ _ _ (_) | | _ __ _ __ __ ___ | | | '__| | | \ \/ / / _ \ | | | | | | > < | __/ | | |_| |_| /_/\_\ \___| |_| PyTessy ======= Tesseract-OCR, faster! This module allows faster access to Tesseract-OCR from Python scripts. This mod...
40.871122
103
0.494307
80e63538ce1e26fe44561622d70e2d7d02bb1455
206
py
Python
tile38/__init__.py
beyoung/tile38_py
1f5a064a3968d47bc30d59aa8c59b7d9270e11ed
[ "MIT" ]
null
null
null
tile38/__init__.py
beyoung/tile38_py
1f5a064a3968d47bc30d59aa8c59b7d9270e11ed
[ "MIT" ]
null
null
null
tile38/__init__.py
beyoung/tile38_py
1f5a064a3968d47bc30d59aa8c59b7d9270e11ed
[ "MIT" ]
null
null
null
# !/user/bin/env/python # -*- coding: utf-8 -*- # version: v0.0.1 # author: youth # contact: tuwenyoung@gmail.com # project: tile38_py # filename: __init__.py.py # datetime: 2017-01-13 22:20 # description:
22.888889
31
0.679612
719944bfa7bc74c200af87841562ae58ab7e9ee3
330
py
Python
bin/add_user.py
ryanrdetzel/Mental-Cache
d29219d543ca2a0003dd2e0410d16d2f3f9f19c5
[ "MIT" ]
1
2020-04-14T13:28:38.000Z
2020-04-14T13:28:38.000Z
bin/add_user.py
ryanrdetzel/Mental-Cache
d29219d543ca2a0003dd2e0410d16d2f3f9f19c5
[ "MIT" ]
null
null
null
bin/add_user.py
ryanrdetzel/Mental-Cache
d29219d543ca2a0003dd2e0410d16d2f3f9f19c5
[ "MIT" ]
null
null
null
#!/usr/bin/python import pytc import hashlib import pickle DBNAME="../mental_cache.hdb" db = pytc.HDB() db.open(DBNAME, pytc.HDBOWRITER | pytc.HDBOCREAT) profile = { 'pw':hashlib.md5("").hexdigest(), 'id':'ff5634', 'name': 'Ryan Detzel' } db.put('ryan',pickle.dumps(profile)) #print pickle.loads(db.get...
16.5
49
0.660606
8167d1f530ebf0ada04fcd6b33c9ad193d3a541c
56,228
py
Python
SimPEG/electromagnetics/frequency_domain/fields.py
Prithwijit-Chak/simpeg
d93145d768b5512621cdd75566b4a8175fee9ed3
[ "MIT" ]
358
2015-03-11T05:48:41.000Z
2022-03-26T02:04:12.000Z
SimPEG/electromagnetics/frequency_domain/fields.py
Prithwijit-Chak/simpeg
d93145d768b5512621cdd75566b4a8175fee9ed3
[ "MIT" ]
885
2015-01-19T09:23:48.000Z
2022-03-29T12:08:34.000Z
SimPEG/electromagnetics/frequency_domain/fields.py
Prithwijit-Chak/simpeg
d93145d768b5512621cdd75566b4a8175fee9ed3
[ "MIT" ]
214
2015-03-11T05:48:43.000Z
2022-03-02T01:05:11.000Z
import numpy as np import scipy.sparse as sp from ...fields import Fields from ...utils import mkvc, Zero, Identity, sdiag from ..utils import omega from ...utils.code_utils import deprecate_class class FieldsFDEM(Fields): """ Fancy Field Storage for a FDEM survey. Only one field type is stored for each ...
36.511688
88
0.603472
01c18461479785834fd44b4712cba45a68b60a96
246
py
Python
end-to-end/jget.py
tesserai/ambassador
70fadc62872be9b041b90cba54d3920a21777548
[ "Apache-2.0" ]
1
2019-01-22T05:36:23.000Z
2019-01-22T05:36:23.000Z
end-to-end/jget.py
tesserai/ambassador
70fadc62872be9b041b90cba54d3920a21777548
[ "Apache-2.0" ]
null
null
null
end-to-end/jget.py
tesserai/ambassador
70fadc62872be9b041b90cba54d3920a21777548
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import sys import json import dpath.util x = json.load(sys.stdin) y = None try: y = dpath.util.get(x, sys.argv[1]) print(json.dumps(y, sort_keys=True, indent=4)) sys.exit(0) except KeyError: sys.exit(1)
13.666667
50
0.654472
e33e7eda3109201c4cff3e74f10db30874ebb3a6
1,202
py
Python
migrations/0002_auto_20191118_0710.py
khaledboka/csv_manager
ed5659cacb68fa1f8a4fa474e4faf20703fbc76b
[ "BSD-2-Clause" ]
null
null
null
migrations/0002_auto_20191118_0710.py
khaledboka/csv_manager
ed5659cacb68fa1f8a4fa474e4faf20703fbc76b
[ "BSD-2-Clause" ]
4
2020-12-15T11:48:29.000Z
2020-12-15T11:56:45.000Z
migrations/0002_auto_20191118_0710.py
cartologic/csv_manager
ed5659cacb68fa1f8a4fa474e4faf20703fbc76b
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals import csv_manager.models from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('csv_manager', '0001_initial'), ] operations = [ migrations.AlterField( model_name='csv...
38.774194
403
0.630616
ff1605976c1595096c8665e4e3f2ab519ba6f059
8,566
py
Python
tests/utils/file_list_test.py
elifesciences/sciencebeam-utils
7d232885b52a80e0ffeb4ab25bdb3640bf009ba4
[ "MIT" ]
2
2019-07-17T14:53:07.000Z
2021-09-15T04:47:47.000Z
tests/utils/file_list_test.py
elifesciences/sciencebeam-utils
7d232885b52a80e0ffeb4ab25bdb3640bf009ba4
[ "MIT" ]
108
2018-07-24T15:20:54.000Z
2022-03-28T16:57:39.000Z
tests/utils/file_list_test.py
elifesciences/sciencebeam-utils
7d232885b52a80e0ffeb4ab25bdb3640bf009ba4
[ "MIT" ]
2
2020-02-07T10:58:48.000Z
2021-09-01T10:15:32.000Z
import os from tempfile import NamedTemporaryFile from unittest.mock import patch from backports.tempfile import TemporaryDirectory import pytest import sciencebeam_utils.utils.file_list as file_list_loader from sciencebeam_utils.utils.file_list import ( is_csv_or_tsv_file_list, load_plain_file_list, load...
39.657407
95
0.697175
c25eb9863d76a47e04a0349c62c58634066b728d
344
py
Python
_includes/code/algorithms/motor-controllers/sample-controller-class.py
xiaoxiae/Robotics-Simplified-Website
ab6c683695ecb758f746923bee3c2355ffbc76b9
[ "MIT" ]
3
2019-04-11T12:08:57.000Z
2019-04-15T09:35:57.000Z
_includes/code/algorithms/motor-controllers/sample-controller-class.py
xiaoxiae/Robotics-Simplified-Website
ab6c683695ecb758f746923bee3c2355ffbc76b9
[ "MIT" ]
null
null
null
_includes/code/algorithms/motor-controllers/sample-controller-class.py
xiaoxiae/Robotics-Simplified-Website
ab6c683695ecb758f746923bee3c2355ffbc76b9
[ "MIT" ]
null
null
null
class SampleControllerClass: """Description of the class.""" def __init__(self, ...): """Creates a controller object.""" pass def set_goal(self, goal): """Sets the goal of the controller.""" pass def get_value(self): """Returns the current controlle...
24.571429
51
0.555233
f3648aa474a0c222667afb4522d1faa64140865a
9,993
py
Python
operators/preview_fountain.py
b4zz4/Blender_Screenwriter
41538dcb5881f12c9c06324d6a932c8b981eac3a
[ "MIT" ]
null
null
null
operators/preview_fountain.py
b4zz4/Blender_Screenwriter
41538dcb5881f12c9c06324d6a932c8b981eac3a
[ "MIT" ]
null
null
null
operators/preview_fountain.py
b4zz4/Blender_Screenwriter
41538dcb5881f12c9c06324d6a932c8b981eac3a
[ "MIT" ]
null
null
null
import bpy, textwrap, os, sys from .. import fountain from pathlib import Path class SCREENWRITER_OT_preview_fountain(bpy.types.Operator): '''Updates the preview''' bl_idname = "scene.preview_fountain" bl_label = "Refresh" @classmethod def poll(cls, context): space = bpy.context.space_dat...
46.050691
118
0.550085
921f01e72586d12ccad9c482023901e328161e14
638
py
Python
qu/data/__init__.py
aarpon/qu
a842b25052e9e054beb4d4dcbd529b89de2ccbd6
[ "Apache-2.0" ]
6
2021-01-26T16:32:54.000Z
2022-01-18T15:34:13.000Z
qu/data/__init__.py
ciskoh/qu
a9f6903c34f9d21d632521f3e1eca763940c7711
[ "Apache-2.0" ]
2
2022-01-27T09:32:33.000Z
2022-01-27T19:43:02.000Z
qu/data/__init__.py
ciskoh/qu
a9f6903c34f9d21d632521f3e1eca763940c7711
[ "Apache-2.0" ]
1
2021-01-26T16:32:56.000Z
2021-01-26T16:32:56.000Z
# /******************************************************************************** # * Copyright © 2020-2021, ETH Zurich, D-BSSE, Aaron Ponti # * All rights reserved. This program and the accompanying materials # * are made available under the terms of the Apache License Version 2.0 # * which accompanies thi...
45.571429
85
0.526646
bca741a3bab4301f33747aa80bf11b305149d1a7
2,404
py
Python
Site_Visit_2.0/venv/bin/pilprint.py
opacichjj/FEMA-PDA-and-Route-Optimizer
d79468438f45216d5abeef5f5037d6a165f61140
[ "MIT" ]
null
null
null
Site_Visit_2.0/venv/bin/pilprint.py
opacichjj/FEMA-PDA-and-Route-Optimizer
d79468438f45216d5abeef5f5037d6a165f61140
[ "MIT" ]
null
null
null
Site_Visit_2.0/venv/bin/pilprint.py
opacichjj/FEMA-PDA-and-Route-Optimizer
d79468438f45216d5abeef5f5037d6a165f61140
[ "MIT" ]
2
2019-08-11T03:34:07.000Z
2019-10-25T16:57:48.000Z
#!/Users/JO/Desktop/microblog/venv/bin/python3 # # The Python Imaging Library. # $Id$ # # print image files to postscript printer # # History: # 0.1 1996-04-20 fl Created # 0.2 1996-10-04 fl Use draft mode when converting. # 0.3 2003-05-06 fl Fixed a typo or two. # from __future__ import print_function VE...
25.041667
67
0.56406
80a8b0bf822b23e8c65dd21801417d37c5b45670
11,956
py
Python
n2v/methods/pdeco.py
ymshi449/n2v
9427d97fed9daf303291b4fd9c533ee15b072710
[ "BSD-3-Clause" ]
null
null
null
n2v/methods/pdeco.py
ymshi449/n2v
9427d97fed9daf303291b4fd9c533ee15b072710
[ "BSD-3-Clause" ]
null
null
null
n2v/methods/pdeco.py
ymshi449/n2v
9427d97fed9daf303291b4fd9c533ee15b072710
[ "BSD-3-Clause" ]
1
2022-03-09T22:16:25.000Z
2022-03-09T22:16:25.000Z
""" pdeco.py Functions associated with PDE-Constrained Optimization. """ import numpy as np from opt_einsum import contract from scipy.optimize import minimize from psi4.core import BasisSet as psi4_basiset from psi4.core import MintsHelper as psi4_mintshelper class PDECO(): """ Performs Optimization as in: ...
41.370242
177
0.536467
c64312ddb70ba8f8ce87635a4cfec0eb6299ba71
6,658
py
Python
exporter/applications/views/documents.py
django-doctor/lite-frontend
330ff9575fd22d7c4c42698ac2d653244e6180d6
[ "MIT" ]
null
null
null
exporter/applications/views/documents.py
django-doctor/lite-frontend
330ff9575fd22d7c4c42698ac2d653244e6180d6
[ "MIT" ]
null
null
null
exporter/applications/views/documents.py
django-doctor/lite-frontend
330ff9575fd22d7c4c42698ac2d653244e6180d6
[ "MIT" ]
null
null
null
import logging from http import HTTPStatus from inspect import signature from django.conf import settings from django.shortcuts import redirect from django.urls import reverse, NoReverseMatch from django.utils.decorators import method_decorator from django.views.decorators.csrf import csrf_exempt from django.views.gen...
41.874214
120
0.685041
91a3ebe530010eb3dd73eaf919e939326ee87612
3,633
py
Python
hordak/views/statement_csv_import.py
audience-platform/django-hordak
aa3a18438136a020794b1c0b10603dd78fa7aa76
[ "MIT" ]
187
2016-12-12T10:58:11.000Z
2022-03-27T08:14:19.000Z
hordak/views/statement_csv_import.py
audience-platform/django-hordak
aa3a18438136a020794b1c0b10603dd78fa7aa76
[ "MIT" ]
62
2016-12-10T00:12:47.000Z
2022-03-16T09:23:05.000Z
hordak/views/statement_csv_import.py
audience-platform/django-hordak
aa3a18438136a020794b1c0b10603dd78fa7aa76
[ "MIT" ]
47
2016-12-12T11:07:31.000Z
2022-03-15T20:30:07.000Z
from django.contrib.auth.decorators import login_required from django.contrib.auth.mixins import LoginRequiredMixin from django.http import HttpResponseRedirect from django.urls import reverse from django.utils.decorators import method_decorator from django.views.generic import CreateView, UpdateView, DetailView from ...
34.273585
89
0.720066
f1c6bea1422eca8375292d8b462f9486a26220db
1,729
py
Python
uds/uds_communications/TransportProtocols/Can/CanConnection.py
J3rome/python-uds
fe0f7a9505cb7b87f693ab736d713d7871dff288
[ "MIT" ]
62
2019-02-13T20:26:12.000Z
2022-02-23T19:47:34.000Z
uds/uds_communications/TransportProtocols/Can/CanConnection.py
J3rome/python-uds
fe0f7a9505cb7b87f693ab736d713d7871dff288
[ "MIT" ]
58
2018-07-09T10:58:33.000Z
2022-01-31T20:27:13.000Z
uds/uds_communications/TransportProtocols/Can/CanConnection.py
J3rome/python-uds
fe0f7a9505cb7b87f693ab736d713d7871dff288
[ "MIT" ]
33
2019-03-25T07:30:34.000Z
2022-03-08T12:55:35.000Z
#!/usr/bin/env python __author__ = "David Hayward" __copyrights__ = "Copyright 2019, the python-uds project" __credits__ = ["David Hayward"] __license__ = "MIT" __maintainer__ = "Richard Clubb" __email__ = "richard.clubb@embeduk.com" __status__ = "Development" import can ## # @brief Small class to wrap the CAN Bus...
31.436364
109
0.669751
848dc4f670789138198f608f961f10b1f245ba77
448
py
Python
lib/spack/spack/__init__.py
HaochengLIU/spack
26e51ff1705a4d6234e2a0cf734f93f7f95df5cb
[ "ECL-2.0", "Apache-2.0", "MIT" ]
1
2021-03-19T13:12:47.000Z
2021-03-19T13:12:47.000Z
lib/spack/spack/__init__.py
HaochengLIU/spack
26e51ff1705a4d6234e2a0cf734f93f7f95df5cb
[ "ECL-2.0", "Apache-2.0", "MIT" ]
1
2019-01-11T20:11:52.000Z
2019-01-11T20:11:52.000Z
lib/spack/spack/__init__.py
HaochengLIU/spack
26e51ff1705a4d6234e2a0cf734f93f7f95df5cb
[ "ECL-2.0", "Apache-2.0", "MIT" ]
null
null
null
# Copyright 2013-2018 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) #: major, minor, patch version for Spack, in a tuple spack_version_info = (0, 12, 0) #: String containing Spack version ...
32
73
0.75
d36c1f411ca1b084e50c3a0cbd666161f971fb34
2,015
py
Python
docs/source/conf.py
Waztom/fragalysis-backend
1d7775740bc6d4cce3a846064fd57bb0fcdb8269
[ "Apache-2.0" ]
1
2021-02-09T03:27:24.000Z
2021-02-09T03:27:24.000Z
docs/source/conf.py
Waztom/fragalysis-backend
1d7775740bc6d4cce3a846064fd57bb0fcdb8269
[ "Apache-2.0" ]
128
2018-05-01T09:40:57.000Z
2022-03-31T12:55:01.000Z
docs/source/conf.py
duncanpeacock/fragalysis-backend
3684f1000d77ce291cdec6124c041b2570811d4c
[ "Apache-2.0" ]
17
2018-03-20T17:42:04.000Z
2022-02-02T11:42:39.000Z
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
34.152542
81
0.672953
088e7f546e802ab13c10a19ed5f8c7cbda30a152
1,894
py
Python
pendulum.py
phantomm88/dynamical
be57466c03402b7eeff92b8d1c71a3c622309800
[ "Apache-2.0" ]
null
null
null
pendulum.py
phantomm88/dynamical
be57466c03402b7eeff92b8d1c71a3c622309800
[ "Apache-2.0" ]
null
null
null
pendulum.py
phantomm88/dynamical
be57466c03402b7eeff92b8d1c71a3c622309800
[ "Apache-2.0" ]
null
null
null
# N-pendulum source file import numpy as np class Joint: def __init__(self, x, y, fix=False): self.x = x self.y = y self.forces = [] self.fixValue = fix self.beamCodes = [] def getX(self): return self.x def getY(self): return self.y def getForces(...
29.59375
127
0.601373
c4bbcab7553e4dd761245b7d7d206cb2f3b4ac77
122
py
Python
superhelp/displayers/cli_displayer.py
grantps/superhelp
d8e861bf1ad91571ac23b9c833a8cd461bb1952f
[ "MIT" ]
27
2020-05-17T20:48:43.000Z
2022-01-08T21:32:30.000Z
superhelp/displayers/cli_displayer.py
grantps/superhelp
d8e861bf1ad91571ac23b9c833a8cd461bb1952f
[ "MIT" ]
null
null
null
superhelp/displayers/cli_displayer.py
grantps/superhelp
d8e861bf1ad91571ac23b9c833a8cd461bb1952f
[ "MIT" ]
null
null
null
""" LOL - a bit underwhelming in the case of CLI output. """ def display(formatted_help: str): print(formatted_help)
17.428571
52
0.704918
164d08ce3ee2a82a474371752e92461bdcf36142
5,749
py
Python
pep517/check.py
uranusjr/pep517
5d25cfdf3caecd0e3c87d3b9788a891306df58e0
[ "MIT" ]
null
null
null
pep517/check.py
uranusjr/pep517
5d25cfdf3caecd0e3c87d3b9788a891306df58e0
[ "MIT" ]
null
null
null
pep517/check.py
uranusjr/pep517
5d25cfdf3caecd0e3c87d3b9788a891306df58e0
[ "MIT" ]
null
null
null
"""Check a project and backend by attempting to build using PEP 517 hooks. """ import argparse import logging import os from os.path import isfile, join as pjoin from pytoml import TomlError, load as toml_load import shutil from subprocess import CalledProcessError import sys import tarfile from tempfile import mkdtemp...
29.482051
81
0.586015
48baf003a0e2683ebc478c604abfd9fadb4ee4f0
10,632
py
Python
image_MER/image_MER.py
WangHongshuo/Image_Algorithms
67a4fd15d670f3f17e1a83123df28a740e821912
[ "MIT" ]
5
2020-03-22T14:50:54.000Z
2021-11-18T09:27:15.000Z
image_MER/image_MER.py
WangHongshuo/Image_Algorithms
67a4fd15d670f3f17e1a83123df28a740e821912
[ "MIT" ]
null
null
null
image_MER/image_MER.py
WangHongshuo/Image_Algorithms
67a4fd15d670f3f17e1a83123df28a740e821912
[ "MIT" ]
3
2019-04-05T19:43:39.000Z
2020-10-06T10:49:31.000Z
import cv2 as cv import numpy as np import copy import math from collections import OrderedDict # @class 二维点 # @member _x x坐标 # @member _y y坐标 class Point2: def __init__(self,_x,_y): self.x = _x self.y = _y ...
32.218182
119
0.491065
7afe24a90bc6663211ec3e0310eb4d5e8593c2b8
1,599
py
Python
boa3_test/examples/test_native/example_contract_for_wrapped_tokens.py
DanPopa46/neo3-boa
e4ef340744b5bd25ade26f847eac50789b97f3e9
[ "Apache-2.0" ]
null
null
null
boa3_test/examples/test_native/example_contract_for_wrapped_tokens.py
DanPopa46/neo3-boa
e4ef340744b5bd25ade26f847eac50789b97f3e9
[ "Apache-2.0" ]
null
null
null
boa3_test/examples/test_native/example_contract_for_wrapped_tokens.py
DanPopa46/neo3-boa
e4ef340744b5bd25ade26f847eac50789b97f3e9
[ "Apache-2.0" ]
null
null
null
from typing import Any from boa3.builtin import NeoMetadata, metadata, public from boa3.builtin.interop.contract import call_contract from boa3.builtin.type import UInt160 # This smart contract is being used to call wrapped_neo's methods. The method calling_scripthash is returning None when # the TestEngine is the o...
31.98
119
0.704816
bff14d3e789d4054f0974056e94ba7184e9a1da2
1,898
py
Python
bamboo/unit_tests/test_unit_layer_softsign.py
forsyth2/lbann
64fc0346f65353c2f7526a019da964914e539fb0
[ "Apache-2.0" ]
null
null
null
bamboo/unit_tests/test_unit_layer_softsign.py
forsyth2/lbann
64fc0346f65353c2f7526a019da964914e539fb0
[ "Apache-2.0" ]
null
null
null
bamboo/unit_tests/test_unit_layer_softsign.py
forsyth2/lbann
64fc0346f65353c2f7526a019da964914e539fb0
[ "Apache-2.0" ]
null
null
null
import sys sys.path.insert(0, '../common_python') import tools import pytest import os def skeleton_layer_softsign(cluster, executables, dir_name, compiler_name): if compiler_name not in executables: e = 'skeleton_layer_softsign: default_exes[%s] does not exist' % compiler_name print('Skip - ' + e) ...
37.96
111
0.739199
2cb9045112746fe61cfb05fce00c440afb3d77fa
3,127
py
Python
test/python/test_binary_stream.py
LBL-EESA/TECA
63923b8a12914f3758dc9525239bc48cd8864b39
[ "BSD-3-Clause-LBNL" ]
34
2017-03-28T14:22:25.000Z
2022-01-23T05:02:25.000Z
test/python/test_binary_stream.py
LBL-EESA/TECA
63923b8a12914f3758dc9525239bc48cd8864b39
[ "BSD-3-Clause-LBNL" ]
476
2016-11-28T18:06:06.000Z
2022-01-25T05:31:42.000Z
test/python/test_binary_stream.py
LBL-EESA/TECA
63923b8a12914f3758dc9525239bc48cd8864b39
[ "BSD-3-Clause-LBNL" ]
19
2017-04-25T18:15:04.000Z
2020-11-28T18:16:05.000Z
#!/usr/bin/env python import sys import os from mpi4py import MPI from teca import * from math import pi,e comm = MPI.COMM_WORLD rank = comm.Get_rank() n_ranks = comm.Get_size() if n_ranks < 2: sys.stderr.write('ERROR: test requires at least 2 ranks\n') sys.exit(-1) baseline = sys.argv[1] if len(sys.argv) !...
25.422764
73
0.637992
d705a6ca17d362db09c40bbfa7e38d4390ef09c7
1,103
py
Python
churchill/tests/api/v1/profile/test_profile_stats.py
manti-by/traugott
6ae05a53c14b29a08daa02a8de1624671f8f063a
[ "BSD-3-Clause" ]
null
null
null
churchill/tests/api/v1/profile/test_profile_stats.py
manti-by/traugott
6ae05a53c14b29a08daa02a8de1624671f8f063a
[ "BSD-3-Clause" ]
11
2021-01-11T20:52:04.000Z
2021-05-12T09:12:38.000Z
churchill/tests/api/v1/profile/test_profile_stats.py
manti-by/churchill
6ae05a53c14b29a08daa02a8de1624671f8f063a
[ "BSD-3-Clause" ]
null
null
null
from rest_framework import status from rest_framework.reverse import reverse from rest_framework.test import APIClient import pytest from churchill.tests.factories.shots import ShotFactory, ShotItemFactory from churchill.tests.factories.users import UserFactory @pytest.mark.django_db class TestProfileStatsView: ...
33.424242
77
0.721668