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
0b6f137492d60a0b3775cc0ba5459dd0adf2273c
13,431
py
Python
script/hiro_ros_arm_controller/RobotController.py
HIRO-group/hiro_ros_arm_controller
2c9c3ef355bc4c1cf1943cfa48f4febb20d1eee9
[ "MIT" ]
2
2021-03-11T22:05:27.000Z
2021-05-12T23:51:23.000Z
script/hiro_ros_arm_controller/RobotController.py
HIRO-group/hiro_ros_arm_controller
2c9c3ef355bc4c1cf1943cfa48f4febb20d1eee9
[ "MIT" ]
6
2020-08-13T04:02:53.000Z
2021-07-16T01:59:33.000Z
script/hiro_ros_arm_controller/RobotController.py
HIRO-group/hiro_ros_arm_controller
2c9c3ef355bc4c1cf1943cfa48f4febb20d1eee9
[ "MIT" ]
1
2020-11-08T07:17:52.000Z
2020-11-08T07:17:52.000Z
#!/usr/bin/env python """ This code serves as the generic RobotController class. """ import rospy import numpy as np import intera_interface from RobotArm import RobotArm class RobotController(object): """ Robot controller object. """ def __init__(self, num_joints, is_sim=True, contr...
31.090278
102
0.591021
f5d6af9864681eb0fcddda7d4107c3c46b6af7d5
669
py
Python
python/pycascading/__init__.py
fakeNetflix/twitter-repo-pycascading
2b7228e953046c60ebabd7dfb9f30ef995b88be0
[ "Apache-2.0" ]
49
2015-02-10T13:42:39.000Z
2021-08-08T00:32:34.000Z
python/pycascading/__init__.py
fakeNetflix/twitter-repo-pycascading
2b7228e953046c60ebabd7dfb9f30ef995b88be0
[ "Apache-2.0" ]
2
2015-05-06T16:57:00.000Z
2018-08-16T21:30:29.000Z
python/pycascading/__init__.py
fakeNetflix/twitter-repo-pycascading
2b7228e953046c60ebabd7dfb9f30ef995b88be0
[ "Apache-2.0" ]
16
2015-05-06T20:12:20.000Z
2021-07-17T21:32:04.000Z
# # Copyright 2011 Twitter, 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 writing, s...
33.45
74
0.760837
695b2eac46daaece1db552119621683744f35a73
11,488
py
Python
openaset/dinkesuren/admin.py
muntaza/Open-Aset
f5eb6770a9f7184e3860a18cd655b35b248a9dd5
[ "BSD-2-Clause" ]
null
null
null
openaset/dinkesuren/admin.py
muntaza/Open-Aset
f5eb6770a9f7184e3860a18cd655b35b248a9dd5
[ "BSD-2-Clause" ]
null
null
null
openaset/dinkesuren/admin.py
muntaza/Open-Aset
f5eb6770a9f7184e3860a18cd655b35b248a9dd5
[ "BSD-2-Clause" ]
2
2019-02-18T05:25:23.000Z
2021-02-01T16:45:23.000Z
### $Id: admin.py,v 1.13 2017/12/04 08:16:37 muntaza Exp $ from django.contrib import admin from umum.models import Provinsi, Kabupaten, LokasiBidang, SKPD, SUBSKPD, KodeBarang, HakTanah, SatuanBarang, KeadaanBarang, SKPenghapusan, MutasiBerkurang, JenisPemanfaatan, AsalUsul, Tahun, GolonganBarang, Tanah, KontrakTanah...
39.477663
311
0.799356
69763de069dccd4cfc92dc668004a609e6bf17b9
962
py
Python
util/util.py
hudak/abides
8de7b17967705ed36b4de9dda152c16c7e5feafd
[ "BSD-3-Clause" ]
1
2021-08-18T04:34:54.000Z
2021-08-18T04:34:54.000Z
util/util.py
mliu420/abides
2dd249d5a045db5eec23d5b7b3fe2344c9d346dd
[ "BSD-3-Clause" ]
null
null
null
util/util.py
mliu420/abides
2dd249d5a045db5eec23d5b7b3fe2344c9d346dd
[ "BSD-3-Clause" ]
null
null
null
# General purpose utility functions for the simulator, attached to no particular class. # Available to any agent or other module/utility. Should not require references to # any simulator object (kernel, agent, etc). # Module level variable that can be changed by config files. silent_mode = False # This optional log...
37
87
0.772349
018a70ed65bdc444ed6bef69c46ef730c270f7db
4,652
py
Python
nere/kgg/neo4j_module.py
WangShengguang/NERE
4b8166aa348b9db207bb9a1e1da6eed5d567ae6f
[ "MIT" ]
null
null
null
nere/kgg/neo4j_module.py
WangShengguang/NERE
4b8166aa348b9db207bb9a1e1da6eed5d567ae6f
[ "MIT" ]
null
null
null
nere/kgg/neo4j_module.py
WangShengguang/NERE
4b8166aa348b9db207bb9a1e1da6eed5d567ae6f
[ "MIT" ]
1
2021-08-21T09:21:21.000Z
2021-08-21T09:21:21.000Z
from py2neo import Graph, Node, Relationship, NodeMatcher class ImportNeo4j: """Write the basic facts of the case on the structured text and the triples obtained on the unstructured text to Neo4j""" def __init__(self): self.graph = Graph( host='172.27.10.140', http_port=7...
41.90991
101
0.597163
a0125fd12c9363b4696247e303fa85d9152c58e4
1,899
py
Python
rio_tiler_pds/cbers/aws/cbers4.py
cogeotiff/rio-tiler-pds
52482c80baf7fd26cf06cd2af2961cca396b20e0
[ "BSD-3-Clause" ]
30
2020-07-21T23:32:14.000Z
2022-02-21T23:35:35.000Z
rio_tiler_pds/cbers/aws/cbers4.py
cogeotiff/rio-tiler-pds
52482c80baf7fd26cf06cd2af2961cca396b20e0
[ "BSD-3-Clause" ]
36
2020-07-21T20:48:51.000Z
2021-10-06T08:15:00.000Z
rio_tiler_pds/cbers/aws/cbers4.py
cogeotiff/rio-tiler-pds
52482c80baf7fd26cf06cd2af2961cca396b20e0
[ "BSD-3-Clause" ]
4
2020-07-23T06:19:30.000Z
2021-11-18T03:27:04.000Z
"""AWS CBERS 4 reader.""" from typing import Dict, Type import attr from morecantile import TileMatrixSet from rio_tiler.constants import WEB_MERCATOR_TMS from rio_tiler.errors import InvalidBandName from rio_tiler.io import COGReader, MultiBandReader from rio_tiler_pds.cbers.utils import sceneid_parser @attr.s cl...
32.186441
86
0.667193
4daeee6a9d4f9d064525c4b8f6a0f6612e10b7f0
13,773
py
Python
rest_api/limsdb/queries/factories.py
EdinburghGenomics/Reporting-App
dbcc152079152b06be275e7226eaffb4b6153e9b
[ "MIT" ]
4
2018-05-07T14:48:19.000Z
2020-12-27T10:55:05.000Z
rest_api/limsdb/queries/factories.py
EdinburghGenomics/Reporting-App
dbcc152079152b06be275e7226eaffb4b6153e9b
[ "MIT" ]
168
2015-11-12T14:34:33.000Z
2019-09-30T13:37:36.000Z
rest_api/limsdb/queries/factories.py
EdinburghGenomics/Reporting-App
dbcc152079152b06be275e7226eaffb4b6153e9b
[ "MIT" ]
1
2020-07-01T11:04:26.000Z
2020-07-01T11:04:26.000Z
from collections import defaultdict from egcg_core.util import query_dict from egcg_core.clarity import sanitize_user_id from flask import request from config import project_status as status_cfg from rest_api.common import retrieve_args from rest_api.limsdb import queries from rest_api.limsdb.queries import data_models...
47.493103
125
0.687214
d0d70fb75b1402b20c2fff32363854715e9c7f1c
1,706
py
Python
stackable/contrib/config/conf_postoffice.py
productaize/stackable
1172d255bfbf79a65a9509c04f470f1049d748bf
[ "MIT" ]
1
2017-10-19T09:21:54.000Z
2017-10-19T09:21:54.000Z
stackable/contrib/config/conf_postoffice.py
productaize/stackable
1172d255bfbf79a65a9509c04f470f1049d748bf
[ "MIT" ]
1
2017-10-28T17:51:36.000Z
2017-10-28T17:51:36.000Z
stackable/contrib/config/conf_postoffice.py
miraculixx/stackable
e21787077e004879a0a1f6fe46be61289794d8db
[ "MIT" ]
null
null
null
from stackable.stackable import EnvSettingsBase def setup_postoffice(globals, *args): """ this runs post any other email settings, so we can safely reconfigure post office to match whatever other email backend was set """ # get post office config po_config = globals['POST_OFFICE'] # get the cu...
34.12
77
0.640094
7b2c269aa70153e3a820483b604ef45c4bcc33df
903
py
Python
Dissasemble.py
PJB3005/Goonstation-Control-Unit-Assembler
952c1b1d19843cacb13d56a92b73a4da97fbc057
[ "MIT" ]
1
2015-12-12T03:46:37.000Z
2015-12-12T03:46:37.000Z
Dissasemble.py
PJB3005/Goonstation-Control-Unit-Assembler
952c1b1d19843cacb13d56a92b73a4da97fbc057
[ "MIT" ]
null
null
null
Dissasemble.py
PJB3005/Goonstation-Control-Unit-Assembler
952c1b1d19843cacb13d56a92b73a4da97fbc057
[ "MIT" ]
null
null
null
import sys opcodes = { "0": "NOP", "1": "LD", "2": "LDC", "3": "AND", "4": "ANDC", "5": "OR", "6": "ORC", "7": "XNOR", "8": "STO", "9": "STOC", "A": "IEN", "B": "OEN", "C": "JMP", "D": "RTN", "E": "SKZ", "F": "NOP" } no_operands = [ "0", "D", "E", "F" ] if len(sys.argv) == 1: print "No argument ...
14.333333
119
0.552602
291845f537e13cf3d7397976e8c2008c4f437451
8,265
py
Python
electrum/gui/stdio.py
fujicoin/electrum
f20fd202c1b6837adac7aa7903d5802ab11be7e4
[ "MIT" ]
null
null
null
electrum/gui/stdio.py
fujicoin/electrum
f20fd202c1b6837adac7aa7903d5802ab11be7e4
[ "MIT" ]
null
null
null
electrum/gui/stdio.py
fujicoin/electrum
f20fd202c1b6837adac7aa7903d5802ab11be7e4
[ "MIT" ]
1
2022-02-09T09:56:12.000Z
2022-02-09T09:56:12.000Z
from decimal import Decimal import getpass import datetime import logging from electrum import util from electrum import WalletStorage, Wallet from electrum.wallet_db import WalletDB from electrum.util import format_satoshis from electrum.bitcoin import is_address, COIN from electrum.transaction import PartialTxOutput...
33.461538
123
0.549304
6842d91c7d3327fde6ec37557735f7ea2721a4d3
488
py
Python
src/accounts/migrations/0006_alter_user_type.py
IkramKhan-DevOps/cws-post
2a242de51f640968d96fd947bed4aa4484afc52d
[ "MIT" ]
2
2022-02-04T07:45:57.000Z
2022-02-04T07:46:03.000Z
src/accounts/migrations/0006_alter_user_type.py
IkramKhan-DevOps/cws-post
2a242de51f640968d96fd947bed4aa4484afc52d
[ "MIT" ]
null
null
null
src/accounts/migrations/0006_alter_user_type.py
IkramKhan-DevOps/cws-post
2a242de51f640968d96fd947bed4aa4484afc52d
[ "MIT" ]
null
null
null
# Generated by Django 3.2.9 on 2022-02-15 15:15 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accounts', '0005_auto_20220215_2010'), ] operations = [ migrations.AlterField( model_name='user', name='type', ...
25.684211
155
0.602459
6e9bd80c3f42c694d40363fc2789eed56ed2fb9c
35,330
py
Python
twilio/rest/api/v2010/account/usage/trigger.py
nitinavasthi/twillio-whatsapp
182397b9e7d7270735756bbfc52cf78b9a5c1719
[ "MIT" ]
1
2020-01-18T08:06:57.000Z
2020-01-18T08:06:57.000Z
twilio/rest/api/v2010/account/usage/trigger.py
nitinavasthi/twillio-whatsapp
182397b9e7d7270735756bbfc52cf78b9a5c1719
[ "MIT" ]
1
2020-01-25T14:44:42.000Z
2020-01-25T14:44:42.000Z
twilio/rest/api/v2010/account/usage/trigger.py
hrishikeshdkakkad/WIDS
953965509fa43ef9c9befb5281ea0e0d173e9e2e
[ "MIT" ]
null
null
null
# coding=utf-8 r""" 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...
42.824242
121
0.675941
2aa8390e68fffa5c026dbcfbbb89486e2c43dfc0
2,598
py
Python
pythia.py
mofahmy/pythia
976fed52e6977c4cbb0dcf0482e481e04b2cbee1
[ "CC0-1.0" ]
null
null
null
pythia.py
mofahmy/pythia
976fed52e6977c4cbb0dcf0482e481e04b2cbee1
[ "CC0-1.0" ]
null
null
null
pythia.py
mofahmy/pythia
976fed52e6977c4cbb0dcf0482e481e04b2cbee1
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/python from sys import argv import re import random def read_file(file): f = open(file, 'r') content = f.read() f.close() return content def append_to_file(file, content): f = open(file, 'a') f.write(content) f.write("\n\n") f.close() def get_socrates_lines(text): line...
24.742857
101
0.58545
a72d2eac7025436fec5cc4d6991e4aed15dc3a43
4,176
py
Python
main_global.py
atcelen/BCI
0553b3c091ac31b943e4bc285fd0dc7a34ec99cf
[ "Apache-2.0" ]
null
null
null
main_global.py
atcelen/BCI
0553b3c091ac31b943e4bc285fd0dc7a34ec99cf
[ "Apache-2.0" ]
1
2022-03-09T17:22:41.000Z
2022-03-10T08:09:00.000Z
main_global.py
atcelen/BCI
0553b3c091ac31b943e4bc285fd0dc7a34ec99cf
[ "Apache-2.0" ]
null
null
null
#* Authors: Ata Celen, Deniz Yaralioglu ################################################# # # Global model training and validation # ################################################# import numpy as np import os import da...
30.26087
125
0.664272
abd0172d2d3b09e337d54380ec32e0af29cae330
2,736
py
Python
breakout/evaluate_model.py
gdanfx/agents
6ef1a7992fe22a299a7d470756142b567a0368c2
[ "Apache-2.0" ]
null
null
null
breakout/evaluate_model.py
gdanfx/agents
6ef1a7992fe22a299a7d470756142b567a0368c2
[ "Apache-2.0" ]
null
null
null
breakout/evaluate_model.py
gdanfx/agents
6ef1a7992fe22a299a7d470756142b567a0368c2
[ "Apache-2.0" ]
2
2019-10-23T23:31:30.000Z
2019-10-25T21:32:26.000Z
import argparse import time from tqdm import tqdm import numpy as np from google.oauth2 import service_account from breakout.dqn_model import DQN_Model from util.gcp_io import gcs_load_bucket, gcs_load_weights, cbt_global_iterator import gym SCOPES = ['https://www.googleapis.com/auth/cloud-platform'] SERVICE_ACCOU...
35.532468
108
0.654971
0a04592feb4934813f5454b15aab113aadc2aeaf
14,501
py
Python
mycity/mycity/deploy_tools/deploy_tools.py
EndyPremier/voiceapp311
168cf1665bd9a294823f82373e65c6c1d22b8831
[ "MIT" ]
null
null
null
mycity/mycity/deploy_tools/deploy_tools.py
EndyPremier/voiceapp311
168cf1665bd9a294823f82373e65c6c1d22b8831
[ "MIT" ]
null
null
null
mycity/mycity/deploy_tools/deploy_tools.py
EndyPremier/voiceapp311
168cf1665bd9a294823f82373e65c6c1d22b8831
[ "MIT" ]
null
null
null
""" Tools to package and deploy the lambda function for the mycity voice app. """ from __future__ import print_function from subprocess import run, PIPE import argparse import os import shutil import zipfile import stat import errno import time import re import json # path constants PROJECT_ROOT = os.path.join(os.get...
33.723256
84
0.611337
bc8683e3db2264bb85fff4a5731de8556fcedc7a
7,561
py
Python
retrogade.py
SBelkaid/NEDMED
6b7a3c6d8697cb07ab175eeec43d9e933bd33784
[ "BSD-4-Clause-UC" ]
null
null
null
retrogade.py
SBelkaid/NEDMED
6b7a3c6d8697cb07ab175eeec43d9e933bd33784
[ "BSD-4-Clause-UC" ]
null
null
null
retrogade.py
SBelkaid/NEDMED
6b7a3c6d8697cb07ab175eeec43d9e933bd33784
[ "BSD-4-Clause-UC" ]
null
null
null
""" A script to extract synonyms from mammograms. Using Word2Vec """ ############################################## # Author: Soufyan Belkaid # # VU University of Amsterdam # # Mail: s.belkaid@student.vu.nl # # Version: 2.0 # ##############...
38.974227
136
0.643037
d82aea86ac53734cbe54edc5d903a9c2b9592d3b
577
py
Python
pypeflow/__init__.py
pypeflow/pypeflow
69de9f6d41cfa62aab53fb242d141d8cfc1f84d3
[ "MIT" ]
2
2015-07-03T04:01:44.000Z
2016-02-04T13:39:06.000Z
pypeflow/__init__.py
pypeflow/pypeflow
69de9f6d41cfa62aab53fb242d141d8cfc1f84d3
[ "MIT" ]
null
null
null
pypeflow/__init__.py
pypeflow/pypeflow
69de9f6d41cfa62aab53fb242d141d8cfc1f84d3
[ "MIT" ]
null
null
null
# coding: utf-8 from .core import Pypeflow # Use 'dev', 'beta', or 'final' as the 4th element to indicate release type. VERSION = (1, 0, 0, 'final') def get_short_version(): return '%s.%s' % (VERSION[0], VERSION[1]) def get_version(): version = '%s.%s' % (VERSION[0], VERSION[1]) # Append 3rd digit if >...
26.227273
76
0.563258
2ddb4fc3d27a32b0e52ecd3408a3185f610ec47a
492
py
Python
aspen/simplates/renderers/stdlib_format.py
jaraco/aspen
ec0f6d5bef5e7100ac2374b38349a51f8394eabb
[ "MIT" ]
1
2016-08-23T16:13:22.000Z
2016-08-23T16:13:22.000Z
aspen/simplates/renderers/stdlib_format.py
jaraco/aspen
ec0f6d5bef5e7100ac2374b38349a51f8394eabb
[ "MIT" ]
null
null
null
aspen/simplates/renderers/stdlib_format.py
jaraco/aspen
ec0f6d5bef5e7100ac2374b38349a51f8394eabb
[ "MIT" ]
null
null
null
""" aspen.simplates.renderers.stdlib_format ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from . import Renderer, Factory class Renderer(Renderer): def compile(self, ...
21.391304
46
0.697154
11bc09909fd7e80ae60ac7af7b663f9be7794e5f
2,843
py
Python
src/so3.py
alexklwong/learning-topology-synthetic-data
fa4759a1c1c274d26251905185c867210b504e58
[ "CNRI-Python" ]
22
2021-05-31T22:16:21.000Z
2022-02-17T07:12:12.000Z
src/so3.py
alexklwong/learning-topology-synthetic-data
fa4759a1c1c274d26251905185c867210b504e58
[ "CNRI-Python" ]
1
2022-01-05T14:57:09.000Z
2022-01-05T18:18:28.000Z
src/so3.py
alexklwong/learning-topology-synthetic-data
fa4759a1c1c274d26251905185c867210b504e58
[ "CNRI-Python" ]
4
2021-07-05T01:18:44.000Z
2021-09-17T03:29:07.000Z
''' Authors: Alex Wong <alexw@cs.ucla.edu>, Safa Cicek <safacicek@ucla.edu> If this code is useful to you, please cite the following paper: A. Wong, S. Cicek, and S. Soatto. Learning topology from synthetic data for unsupervised depth completion. In the Robotics and Automation Letters (RA-L) 2021 and Proceedings of In...
25.383929
133
0.563138
e3e6248106263a2bf3fecd9913a27b4370c88b04
4,207
py
Python
test/IECore/TimePeriodDataTest.py
gcodebackups/cortex-vfx
72fa6c6eb3327fce4faf01361c8fcc2e1e892672
[ "BSD-3-Clause" ]
5
2016-07-26T06:09:28.000Z
2022-03-07T03:58:51.000Z
test/IECore/TimePeriodDataTest.py
turbosun/cortex
4bdc01a692652cd562f3bfa85f3dae99d07c0b15
[ "BSD-3-Clause" ]
null
null
null
test/IECore/TimePeriodDataTest.py
turbosun/cortex
4bdc01a692652cd562f3bfa85f3dae99d07c0b15
[ "BSD-3-Clause" ]
3
2015-03-25T18:45:24.000Z
2020-02-15T15:37:18.000Z
########################################################################## # # Copyright (c) 2009-2011, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redis...
35.957265
123
0.688377
ff25b557b2b5be3e111057845bb41056f8d75cb6
3,192
py
Python
whatshap/utils.py
Hufsah-Ashraf/whatshap-old-
f5251c2f9c76a4d8843505ee86d2cfb919ca0a50
[ "MIT" ]
174
2018-07-04T06:59:02.000Z
2022-03-29T03:30:18.000Z
whatshap/utils.py
Hufsah-Ashraf/whatshap-old-
f5251c2f9c76a4d8843505ee86d2cfb919ca0a50
[ "MIT" ]
132
2018-07-21T01:16:15.000Z
2022-03-30T14:25:45.000Z
whatshap/utils.py
Hufsah-Ashraf/whatshap-old-
f5251c2f9c76a4d8843505ee86d2cfb919ca0a50
[ "MIT" ]
21
2018-07-05T14:37:10.000Z
2022-03-10T08:02:37.000Z
import gzip import logging from collections import defaultdict from typing import Optional, DefaultDict import pyfaidx from dataclasses import dataclass class FastaNotIndexedError(Exception): pass class InvalidRegion(Exception): pass def detect_file_format(path): """ Detect file format and return...
29.018182
97
0.578321
955231e63fbff36ad8601f161f98440ad3a247cb
1,746
py
Python
base/env/test_processStrategy.py
stevenchen521/quant_ml
f7d5efc49c934724f97fcafacc560f4a35b24551
[ "MIT" ]
5
2019-02-14T03:12:22.000Z
2022-01-24T18:43:07.000Z
base/env/test_processStrategy.py
stevenchen521/quant_ml
f7d5efc49c934724f97fcafacc560f4a35b24551
[ "MIT" ]
null
null
null
base/env/test_processStrategy.py
stevenchen521/quant_ml
f7d5efc49c934724f97fcafacc560f4a35b24551
[ "MIT" ]
2
2019-11-13T18:56:13.000Z
2021-12-31T01:25:22.000Z
from unittest import TestCase import base.env.pre_process as pre_process import pandas as pd from sklearn.preprocessing import MinMaxScaler from helper.util import get_attribute from base.env.pre_process_conf import active_stragery, get_strategy_analyze import base.env.pre_process class TestProcessStrategy(TestCase)...
38.8
143
0.708477
6b1b01a12fbf46900ff1eb5851e87b5b48edf92c
3,788
py
Python
wbia/algo/graph/mixin_groundtruth.py
dylanirion/wildbook-ia
3b7c30a6e123d87999950bfbb5035c4d9c1a6f5d
[ "Apache-2.0" ]
6
2020-06-21T11:45:08.000Z
2020-11-18T16:43:15.000Z
wbia/algo/graph/mixin_groundtruth.py
dylanirion/wildbook-ia
3b7c30a6e123d87999950bfbb5035c4d9c1a6f5d
[ "Apache-2.0" ]
58
2020-06-05T19:02:48.000Z
2021-01-14T15:27:33.000Z
wbia/algo/graph/mixin_groundtruth.py
dylanirion/wildbook-ia
3b7c30a6e123d87999950bfbb5035c4d9c1a6f5d
[ "Apache-2.0" ]
3
2020-08-05T17:46:08.000Z
2020-11-11T05:27:01.000Z
# -*- coding: utf-8 -*- import logging import utool as ut import numpy as np import vtool as vt import pandas as pd from wbia.algo.graph.nx_utils import ensure_multi_index from wbia.algo.graph.state import POSTV, NEGTV, INCMP print, rrr, profile = ut.inject2(__name__) logger = logging.getLogger('wbia') class Groundt...
35.735849
84
0.581309
fc4d2f42236274dc6a3cf277dcdad58bb2b5801f
3,518
py
Python
src/robot/utils/__init__.py
iAob19/robotframework
461b1240814970b59ebfe7d75b2a116d70546f47
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/robot/utils/__init__.py
iAob19/robotframework
461b1240814970b59ebfe7d75b2a116d70546f47
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/robot/utils/__init__.py
iAob19/robotframework
461b1240814970b59ebfe7d75b2a116d70546f47
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright 2008-2015 Nokia Networks # Copyright 2016- Robot Framework Foundation # # 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 ...
45.688312
79
0.756111
33ec22e1d199eb5c0514213635815612e0899593
3,180
py
Python
features.py
ashutoshns/ue-audio-classifier
6acec7f6997d82ca778a1c7aeb78913bf148068f
[ "MIT" ]
null
null
null
features.py
ashutoshns/ue-audio-classifier
6acec7f6997d82ca778a1c7aeb78913bf148068f
[ "MIT" ]
null
null
null
features.py
ashutoshns/ue-audio-classifier
6acec7f6997d82ca778a1c7aeb78913bf148068f
[ "MIT" ]
null
null
null
""" Feature fold generation code """ import numpy as np import glob import os import librosa import stft_gen as FT import chroma_gen as CH import mfcc_gen as MF import spectral_contrast_gen as SP parent_path = 'audio/' def extract_feature(file_name): X, sample_rate = librosa.load(file_name) pr...
37.411765
104
0.619497
b90502e2f22c44c5a17af4a9362704b80c43ae86
5,443
py
Python
aid_coordinator/settings.py
nogalliance/aid_coordinator
9af6413982e6f56914440c227949ce2f1cb4ebcf
[ "BSD-3-Clause" ]
null
null
null
aid_coordinator/settings.py
nogalliance/aid_coordinator
9af6413982e6f56914440c227949ce2f1cb4ebcf
[ "BSD-3-Clause" ]
null
null
null
aid_coordinator/settings.py
nogalliance/aid_coordinator
9af6413982e6f56914440c227949ce2f1cb4ebcf
[ "BSD-3-Clause" ]
null
null
null
""" Django settings for aid_coordinator project. Generated by 'django-admin startproject' using Django 4.0.3. For more information on this file, see https://docs.djangoproject.com/en/4.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/4.0/ref/settings/ """ from...
28.348958
91
0.711372
380089f446ab344dc1b834c77edf0ee88e77c3ca
27,210
py
Python
tests/python-opcua/tests/tests_server.py
iit-danieli-joint-lab/opcua-modeling-tool
f8c3d940a61334b0e6deda9099844a6b429d7c08
[ "MIT" ]
32
2018-03-27T12:25:24.000Z
2022-01-11T21:20:06.000Z
tests/python-opcua/tests/tests_server.py
iit-danieli-joint-lab/opcua-modeling-tool
f8c3d940a61334b0e6deda9099844a6b429d7c08
[ "MIT" ]
5
2018-04-09T07:35:54.000Z
2020-03-10T11:04:45.000Z
tests/python-opcua/tests/tests_server.py
iit-danieli-joint-lab/opcua-modeling-tool
f8c3d940a61334b0e6deda9099844a6b429d7c08
[ "MIT" ]
12
2018-06-04T20:06:06.000Z
2021-07-02T22:09:53.000Z
import unittest import os import shelve import time from tests_common import CommonTests, add_server_methods from tests_xml import XmlTests from tests_subscriptions import SubscriptionTests from datetime import timedelta, datetime from tempfile import NamedTemporaryFile import opcua from opcua import Server from opcu...
46.672384
225
0.705807
71c307754b444baccaf397b11ab6fd312e889c41
882
py
Python
test/test_nstx/test_signal.py
Fusion-Data-Platform/fdp
d87a52207238f168ed69b9f96dc8f20f4481366d
[ "MIT" ]
10
2015-12-18T22:38:07.000Z
2020-03-02T09:15:50.000Z
test/test_nstx/test_signal.py
Fusion-Data-Platform/fdp
d87a52207238f168ed69b9f96dc8f20f4481366d
[ "MIT" ]
14
2015-12-07T16:41:48.000Z
2019-01-18T17:48:55.000Z
test/test_nstx/test_signal.py
Fusion-Data-Platform/fdp
d87a52207238f168ed69b9f96dc8f20f4481366d
[ "MIT" ]
5
2016-05-20T17:35:23.000Z
2019-01-17T19:00:06.000Z
from __future__ import print_function def test_1d_signals(setup_shot): shot = setup_shot signals = [shot.bes.ch01, shot.magnetics.highn.ch15, shot.usxr.hdown.ch08, shot.equilibria.efit01.ipmeas, shot.mpts.ld, shot.nbi.total_power, ...
27.5625
45
0.549887
979d5c704799c462b1442b2063d2c1c0ed7a6a2a
301
py
Python
pyaz/provider/permission/__init__.py
py-az-cli/py-az-cli
9a7dc44e360c096a5a2f15595353e9dad88a9792
[ "MIT" ]
null
null
null
pyaz/provider/permission/__init__.py
py-az-cli/py-az-cli
9a7dc44e360c096a5a2f15595353e9dad88a9792
[ "MIT" ]
null
null
null
pyaz/provider/permission/__init__.py
py-az-cli/py-az-cli
9a7dc44e360c096a5a2f15595353e9dad88a9792
[ "MIT" ]
1
2022-02-03T09:12:01.000Z
2022-02-03T09:12:01.000Z
''' Manage permissions for a provider. ''' from ... pyaz_utils import _call_az def list(namespace): ''' List permissions from a provider. Required Parameters: - namespace -- the resource namespace, aka 'provider' ''' return _call_az("az provider permission list", locals())
20.066667
60
0.674419
077022d523e2691a81e8a5dc5c17960c3c4dcb11
7,532
py
Python
step3_recommendations/model_creative.py
andrebola/creative-recsys-cocoplaya
0006305217687895c4f28962ef4c6a98372c6680
[ "Apache-2.0" ]
6
2018-10-08T15:20:24.000Z
2021-06-28T02:09:38.000Z
step3_recommendations/model_creative.py
andrebola/creative-recsys-cocoplaya
0006305217687895c4f28962ef4c6a98372c6680
[ "Apache-2.0" ]
null
null
null
step3_recommendations/model_creative.py
andrebola/creative-recsys-cocoplaya
0006305217687895c4f28962ef4c6a98372c6680
[ "Apache-2.0" ]
null
null
null
import pickle import os import re import json import numpy as np import datetime from sklearn.feature_extraction.text import CountVectorizer, HashingVectorizer from sklearn.feature_extraction import DictVectorizer from sklearn.preprocessing import MinMaxScaler, QuantileTransformer, LabelBinarizer from sklearn.decompos...
43.790698
134
0.639405
97ad80ef8215df166dc82981ed05d5197c06f3df
1,400
py
Python
tools/squeezy/tests/squeezy_tests.py
abfeldman/lydia
03b220cd7fb743f341086ae2d950d97d17f7073f
[ "MIT" ]
null
null
null
tools/squeezy/tests/squeezy_tests.py
abfeldman/lydia
03b220cd7fb743f341086ae2d950d97d17f7073f
[ "MIT" ]
null
null
null
tools/squeezy/tests/squeezy_tests.py
abfeldman/lydia
03b220cd7fb743f341086ae2d950d97d17f7073f
[ "MIT" ]
null
null
null
#!/usr/bin/env python2.4 # # squeezy_tests.py """ Script for running lc tests. """ import sys import os import os.path import subprocess import time squeezy = "../squeezy" srcdir = os.getenv("SRCDIR", "") topsrcdir = os.getenv("TOPSRCDIR", "") sys.path.append(os.path.join(topsrcdir, "testsuite")) try: from l...
22.95082
59
0.602857
965a0c68374d5d73bb234be59cdd4ad21468fa36
983
py
Python
data/activitynet_feature_cuhk/ldb_process.py
cxqj/44-BMN
507c6df651c987e721246ebd1366ce103c840a4d
[ "MIT" ]
242
2019-08-09T09:41:25.000Z
2022-03-31T08:21:08.000Z
data/activitynet_feature_cuhk/ldb_process.py
cxqj/44-BMN
507c6df651c987e721246ebd1366ce103c840a4d
[ "MIT" ]
47
2019-08-19T14:16:43.000Z
2022-03-18T08:57:43.000Z
data/activitynet_feature_cuhk/ldb_process.py
cxqj/44-BMN
507c6df651c987e721246ebd1366ce103c840a4d
[ "MIT" ]
65
2019-08-09T09:41:26.000Z
2022-03-15T10:46:09.000Z
# -*- coding: utf-8 -*- """ Created on Mon May 15 22:31:31 2017 @author: wzmsltw """ import caffe import leveldb import numpy as np from caffe.proto import caffe_pb2 import pandas as pd col_names=[] for i in range(200): col_names.append("f"+str(i)) df=pd.read_table("./input_spatial_list.txt",names=['image','fram...
22.860465
84
0.667345
f513625a88767fa1d28892c0482d3ad0361e0aa3
348
py
Python
v1/backend_movies/project/repository/mongo_connection.py
icod/testautomation_casus
c55fc1a75f76aae500cdd57217e050364a7d5436
[ "MIT" ]
null
null
null
v1/backend_movies/project/repository/mongo_connection.py
icod/testautomation_casus
c55fc1a75f76aae500cdd57217e050364a7d5436
[ "MIT" ]
3
2020-04-02T13:45:23.000Z
2021-01-09T09:41:50.000Z
v1/backend_movies/project/repository/mongo_connection.py
joerivrij/testautomation_workshop
1fb3479fd9e74055233c996eece5cd7e1cabdafa
[ "MIT" ]
2
2021-10-31T18:59:55.000Z
2022-02-01T16:01:52.000Z
from pymongo import MongoClient import project import os class MongoConnection: @staticmethod def connect_to_mongo(): app_settings = os.getenv('APP_SETTINGS') env = getattr(project.config, app_settings) print(env.CONNECTION) client = MongoClient(env.CONNECTION) db = cl...
23.2
51
0.678161
1158b51c984e9c5d90b499722b7ee5fdb0aa9205
2,338
py
Python
s5_r2/local/vm1_read_corpus.py
protofy/kaldi-tuda-de
4c4aa9ff970ddee229a121771f3a3f64110a3f23
[ "Apache-2.0" ]
1
2020-09-01T09:31:58.000Z
2020-09-01T09:31:58.000Z
s5_r2/local/vm1_read_corpus.py
protofy/kaldi-tuda-de
4c4aa9ff970ddee229a121771f3a3f64110a3f23
[ "Apache-2.0" ]
null
null
null
s5_r2/local/vm1_read_corpus.py
protofy/kaldi-tuda-de
4c4aa9ff970ddee229a121771f3a3f64110a3f23
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu May 24 23:25:35 2018 @author: Benjamin Milde """ def read_vm_ids(vm_filename, vm_prefix='data/wav/VM1/'): myids = [] with open(vm_prefix + vm_filename) as vm1_dev: for line in vm1_dev: myid = line.split()[0] myi...
38.327869
233
0.475192
a460b658f053011847275b0de2649fe78b18ab2c
1,187
py
Python
final_project/machinetranslation/translator.py
cabreltchoffo/xzceb-flask_eng_fr
835053f0af376abd9a275bb1930f0f044687725a
[ "Apache-2.0" ]
null
null
null
final_project/machinetranslation/translator.py
cabreltchoffo/xzceb-flask_eng_fr
835053f0af376abd9a275bb1930f0f044687725a
[ "Apache-2.0" ]
null
null
null
final_project/machinetranslation/translator.py
cabreltchoffo/xzceb-flask_eng_fr
835053f0af376abd9a275bb1930f0f044687725a
[ "Apache-2.0" ]
null
null
null
# Import dependencies, we are going to import the necessary tools from IBM Watson Package import json import os from ibm_watson import LanguageTranslatorV3 from ibm_cloud_sdk_core.authenticators import IAMAuthenticator from dotenv import load_dotenv load_dotenv() apikey = os.environ['apikey'] url = os.environ['url'] ...
31.236842
97
0.792755
eb1f524e9d4ecb3efdd913a25d4529a66395c7d6
22,915
py
Python
SNACC/network/Instascrape.py
emariwileslee/SNACC
02bd1826eb77b6a397446d7db503d449dc2102a7
[ "MIT" ]
null
null
null
SNACC/network/Instascrape.py
emariwileslee/SNACC
02bd1826eb77b6a397446d7db503d449dc2102a7
[ "MIT" ]
null
null
null
SNACC/network/Instascrape.py
emariwileslee/SNACC
02bd1826eb77b6a397446d7db503d449dc2102a7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Wed Apr 7 10:00:54 2021 @author: emari """ import sys import string import numpy as np from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.support import expected_cond...
48.859275
316
0.603011
debdaffd83d944c8d52bd59c545890f6d862d1d0
3,237
py
Python
models/ouy/wzm_improved_1.py
lover-520/wzm_landform_scene_model
1bc8894d99b76213ca2544e540dccab2ad52be00
[ "MIT" ]
4
2021-01-23T15:47:49.000Z
2021-05-05T17:03:12.000Z
models/ouy/wzm_improved_1.py
lover-520/wzm_landform_scene_model
1bc8894d99b76213ca2544e540dccab2ad52be00
[ "MIT" ]
null
null
null
models/ouy/wzm_improved_1.py
lover-520/wzm_landform_scene_model
1bc8894d99b76213ca2544e540dccab2ad52be00
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ @author: WZM @time: 2021/3/31 20:24 @function: 采用类似fcn结构进行特征融合 """ import torch import torch.nn as nn import torch.nn.functional as F from models.ouy.wzm_improved_model import FCN8s, FCN16s, FCN32s class WzmModel1(nn.Module): def __init__(self, num_classes=3): super(WzmModel...
35.966667
108
0.565029
3eb01e6cc237b3924e966eb65a7d438d6df33cd9
3,688
py
Python
chb/mips/opcodes/MIPSBranchGEZeroLink.py
orinatic/CodeHawk-Binary
8b4fd728213e629736d5ece840ea3b43cea53f30
[ "MIT" ]
null
null
null
chb/mips/opcodes/MIPSBranchGEZeroLink.py
orinatic/CodeHawk-Binary
8b4fd728213e629736d5ece840ea3b43cea53f30
[ "MIT" ]
null
null
null
chb/mips/opcodes/MIPSBranchGEZeroLink.py
orinatic/CodeHawk-Binary
8b4fd728213e629736d5ece840ea3b43cea53f30
[ "MIT" ]
null
null
null
# ------------------------------------------------------------------------------ # CodeHawk Binary Analyzer # Author: Henny Sipma # ------------------------------------------------------------------------------ # The MIT License (MIT) # # Copyright (c) 2016-2020 Kestrel Technology LLC # Copyright (c) 2020-2021 Henny Si...
36.514851
80
0.678145
dead83b5de2f4534df5fed4971adf90d7c98fe5c
222
py
Python
snippets/forms.py
rangertaha/django-snippets-db
f8178b65df5389ee0e9e5eca72d615cb7f863b7b
[ "MIT" ]
null
null
null
snippets/forms.py
rangertaha/django-snippets-db
f8178b65df5389ee0e9e5eca72d615cb7f863b7b
[ "MIT" ]
null
null
null
snippets/forms.py
rangertaha/django-snippets-db
f8178b65df5389ee0e9e5eca72d615cb7f863b7b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from django.forms import ModelForm from .models import Snippet class SnippetForm(ModelForm): class Meta: model = Snippet fields = ['title', 'code', 'description', 'categories']
24.666667
63
0.653153
baaa3bb3d8d3f1954e3887ca03e59db2c4686195
25,021
py
Python
tests/beem/test_testnet.py
anthonyadavisii/beem
2ddb62073e608c78391de4517f24a7858c5d74db
[ "MIT" ]
1
2020-04-27T09:18:35.000Z
2020-04-27T09:18:35.000Z
tests/beem/test_testnet.py
oldas1/beem
d0b9642bfe5f5df3004a59d4923ea497e3a944b3
[ "MIT" ]
null
null
null
tests/beem/test_testnet.py
oldas1/beem
d0b9642bfe5f5df3004a59d4923ea497e3a944b3
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from builtins import range from builtins import super import string import unittest import random from pprint import pprint from beem import Steem from beem.exceptions imp...
38.912908
132
0.584429
c275b9b2e09c6022b6930bafb671fa020b9ae84a
5,701
py
Python
tensorflow_graphics/math/vector.py
riyadhuddin/graphics
07e6c59d5ffcec3a0009807a67aff5d35543ba91
[ "Apache-2.0" ]
2,759
2019-01-08T10:40:34.000Z
2022-03-28T13:49:37.000Z
tensorflow_graphics/math/vector.py
riyadhuddin/graphics
07e6c59d5ffcec3a0009807a67aff5d35543ba91
[ "Apache-2.0" ]
262
2019-04-28T12:25:49.000Z
2022-03-24T19:35:15.000Z
tensorflow_graphics/math/vector.py
riyadhuddin/graphics
07e6c59d5ffcec3a0009807a67aff5d35543ba91
[ "Apache-2.0" ]
380
2019-05-09T00:14:45.000Z
2022-03-31T12:48:25.000Z
# Copyright 2020 The TensorFlow 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
37.754967
80
0.690931
fea641c66491484e65f782cfffb74efefc26878b
8,360
py
Python
perftracker/models/regression.py
piterkey/perftracker
3240089f05afe9cc855829d9ad3d02f1cf454bc5
[ "Apache-2.0" ]
null
null
null
perftracker/models/regression.py
piterkey/perftracker
3240089f05afe9cc855829d9ad3d02f1cf454bc5
[ "Apache-2.0" ]
null
null
null
perftracker/models/regression.py
piterkey/perftracker
3240089f05afe9cc855829d9ad3d02f1cf454bc5
[ "Apache-2.0" ]
null
null
null
import uuid import itertools import json import numpy from datetime import timedelta from datetime import datetime from collections import OrderedDict from scipy import stats from django.db import models from rest_framework import serializers from perftracker.models.project import ProjectModel from perftracker.mod...
33.44
146
0.615431
bdef1e7a2b329fc218d831cb5f1b59e24a87d3e4
2,640
py
Python
lib/rapidsms/backends/newhttp/forms.py
unicefuganda/rapidsms
132f27e7a0d733dae44989d2907678652eb03121
[ "BSD-3-Clause" ]
null
null
null
lib/rapidsms/backends/newhttp/forms.py
unicefuganda/rapidsms
132f27e7a0d733dae44989d2907678652eb03121
[ "BSD-3-Clause" ]
null
null
null
lib/rapidsms/backends/newhttp/forms.py
unicefuganda/rapidsms
132f27e7a0d733dae44989d2907678652eb03121
[ "BSD-3-Clause" ]
1
2020-11-17T10:35:22.000Z
2020-11-17T10:35:22.000Z
from django import forms from rapidsms.models import Backend def lookup_connections(backend, identities): """ Find connections associated with backend and identities. A new connection object will be created for every backend/identity pair not found. :param backend: backend name (as a string) or ...
36.666667
79
0.671212
9b057009e89804ce8c9bba2d11ede921c152eaac
5,606
py
Python
tests/test_sieve.py
gregversteeg/discrete_sieve
edd1691f3102f1d8523580fa2a989be6d5c17df1
[ "Apache-2.0" ]
36
2016-04-29T18:12:50.000Z
2021-04-20T08:59:08.000Z
tests/test_sieve.py
gregversteeg/discrete_sieve
edd1691f3102f1d8523580fa2a989be6d5c17df1
[ "Apache-2.0" ]
null
null
null
tests/test_sieve.py
gregversteeg/discrete_sieve
edd1691f3102f1d8523580fa2a989be6d5c17df1
[ "Apache-2.0" ]
11
2016-05-08T16:54:05.000Z
2018-07-03T10:15:27.000Z
import sys sys.path.append('..') import sieve import vis_sieve as vis import numpy as np verbose = True seed = 2 def test_invertibility(): np.random.seed(seed) n, ns = 3, 7 x_count_a = np.random.randint(0, 5, (ns, 1)) + np.random.randint(0, 1, (ns, n)) x_count_b = np.random.randint(0, 5, (ns, 1)) + np...
50.053571
161
0.590796
3d30b6f802de9e930b99608b6f79ef025e1ef5a2
1,457
py
Python
thucydides/pipelines/news_jsonl_untyped_to_news_jsonl_pipeline.py
MacarielAerial/thucydides
7bc659070a168e1161fd03e4dd5605efde8a0c99
[ "MIT" ]
null
null
null
thucydides/pipelines/news_jsonl_untyped_to_news_jsonl_pipeline.py
MacarielAerial/thucydides
7bc659070a168e1161fd03e4dd5605efde8a0c99
[ "MIT" ]
null
null
null
thucydides/pipelines/news_jsonl_untyped_to_news_jsonl_pipeline.py
MacarielAerial/thucydides
7bc659070a168e1161fd03e4dd5605efde8a0c99
[ "MIT" ]
null
null
null
""" Types a JSONL object with the corresponding dataclass """ from pathlib import Path from thucydides.datasets.news_jsonl_dataset import NewsJSONL, NewsJSONLDataSet def news_jsonl_untyped_to_news_jsonl_pipeline( path_news_jsonl_untyped: Path, path_news_jsonl: Path ) -> None: """Loads untyped news articles,...
26.490909
82
0.7035
97190c3a2e022718e03ccdd085bd49727997a35c
982
py
Python
convolut/constants/ansi_color.py
convolut/convolut
e7168ace62f70f9df084a652a2b8fa70a6902e55
[ "Apache-2.0" ]
9
2020-01-07T06:05:58.000Z
2020-07-03T12:24:31.000Z
convolut/constants/ansi_color.py
convolut/convolut
e7168ace62f70f9df084a652a2b8fa70a6902e55
[ "Apache-2.0" ]
null
null
null
convolut/constants/ansi_color.py
convolut/convolut
e7168ace62f70f9df084a652a2b8fa70a6902e55
[ "Apache-2.0" ]
null
null
null
class AnsiColor: # Foreground F_Default = "\x1b[39m" F_Black = "\x1b[30m" F_Red = "\x1b[31m" F_Green = "\x1b[32m" F_Yellow = "\x1b[33m" F_Blue = "\x1b[34m" F_Magenta = "\x1b[35m" F_Cyan = "\x1b[36m" F_LightGray = "\x1b[37m" F_DarkGray = "\x1b[90m" F_LightRed = "\x1b[91m" ...
26.540541
32
0.568228
e2568be895dee8e24adc1448a97eaf3ef1f25a6b
9,266
py
Python
scripts/show-capabilities-by-function.py
psifertex/capa
f547ca0faef49e3a98b52ec0b14433f6eb354e93
[ "Apache-2.0" ]
1
2021-02-28T22:18:55.000Z
2021-02-28T22:18:55.000Z
scripts/show-capabilities-by-function.py
psifertex/capa
f547ca0faef49e3a98b52ec0b14433f6eb354e93
[ "Apache-2.0" ]
null
null
null
scripts/show-capabilities-by-function.py
psifertex/capa
f547ca0faef49e3a98b52ec0b14433f6eb354e93
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python2 """ show-capabilities-by-function Invoke capa to extract the capabilities of the given sample and emit the results grouped by function. This is useful to identify "complex functions" - that is, functions that implement a lot of different types of logic. Example:: $ python scripts/show-cap...
37.212851
117
0.595295
0ddd98148fd93bae192b19f406477a0a2a8b294e
149
py
Python
reddit2telegram/channels/~inactive/r_christmascake/app.py
mainyordle/reddit2telegram
1163e15aed3b6ff0fba65b222d3d9798f644c386
[ "MIT" ]
187
2016-09-20T09:15:54.000Z
2022-03-29T12:22:33.000Z
reddit2telegram/channels/~inactive/r_christmascake/app.py
mainyordle/reddit2telegram
1163e15aed3b6ff0fba65b222d3d9798f644c386
[ "MIT" ]
84
2016-09-22T14:25:07.000Z
2022-03-19T01:26:17.000Z
reddit2telegram/channels/~inactive/r_christmascake/app.py
mainyordle/reddit2telegram
1163e15aed3b6ff0fba65b222d3d9798f644c386
[ "MIT" ]
172
2016-09-21T15:39:39.000Z
2022-03-16T15:15:58.000Z
#encoding:utf-8 subreddit = 'ChristmasCake' t_channel = '@r_christmascake' def send_post(submission, r2t): return r2t.send_simple(submission)
16.555556
38
0.758389
859b8e3bcc712d78ed4527c2da2ffb28a6a35176
496
py
Python
backends/migrations/0004_itemcategory_item_category_image.py
ViktorAxelsen/E-commerce-Django-Backend
fd0c4d1764e8cfcf183c8033e1193e03ec001105
[ "Apache-2.0" ]
null
null
null
backends/migrations/0004_itemcategory_item_category_image.py
ViktorAxelsen/E-commerce-Django-Backend
fd0c4d1764e8cfcf183c8033e1193e03ec001105
[ "Apache-2.0" ]
null
null
null
backends/migrations/0004_itemcategory_item_category_image.py
ViktorAxelsen/E-commerce-Django-Backend
fd0c4d1764e8cfcf183c8033e1193e03ec001105
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.2 on 2019-09-01 10:26 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('backends', '0003_user_user_password'), ] operations = [ migrations.AddField( model_name='itemcategory', name='item_cat...
26.105263
144
0.657258
b23f65fc22c7754704db7a16c2ce8e5e0d46c5a7
4,481
py
Python
examples/publish_card_from_client_side.py
VirgilSecurity/sdk-python
1e9a784f04683af6cc3e293600686981cb0e6b8a
[ "BSD-3-Clause" ]
10
2016-02-24T17:08:52.000Z
2022-02-16T18:18:40.000Z
examples/publish_card_from_client_side.py
VirgilSecurity/sdk-python
1e9a784f04683af6cc3e293600686981cb0e6b8a
[ "BSD-3-Clause" ]
4
2018-04-20T10:42:09.000Z
2019-04-04T01:55:42.000Z
examples/publish_card_from_client_side.py
VirgilSecurity/sdk-python
1e9a784f04683af6cc3e293600686981cb0e6b8a
[ "BSD-3-Clause" ]
5
2016-07-01T10:28:37.000Z
2020-04-09T13:05:49.000Z
# Copyright (C) 2016-2019 Virgil Security Inc. # # Lead Maintainer: Virgil Security Inc. <support@virgilsecurity.com> # # 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) Redistribution...
32.23741
102
0.733542
ce8953d0875dc6f31bee5aa9327973c6c433c792
549
py
Python
django_select2/cache.py
dbramwell/django-select2
f0a10a1c203cbdc082c8cc27e8ceff49eb90b673
[ "MIT" ]
433
2015-01-08T10:42:28.000Z
2022-03-01T10:19:16.000Z
django_select2/cache.py
dbramwell/django-select2
f0a10a1c203cbdc082c8cc27e8ceff49eb90b673
[ "MIT" ]
414
2015-01-07T11:21:35.000Z
2021-09-13T09:42:23.000Z
django_select2/cache.py
dbramwell/django-select2
f0a10a1c203cbdc082c8cc27e8ceff49eb90b673
[ "MIT" ]
228
2015-01-25T19:58:00.000Z
2021-08-29T23:00:52.000Z
""" Shared memory across multiple machines to the heavy AJAX lookups. Select2 uses django.core.cache_ to share fields across multiple threads and even machines. Select2 uses the cache backend defined in the setting ``SELECT2_CACHE_BACKEND`` [default=``default``]. It is advised to always setup a separate cache server...
26.142857
74
0.777778
76a64502c67a5c0ae6489010dfa65b354d44488c
17,451
py
Python
webapp/views.py
mrigeshpriyadarshi/bwc_orchestrator
e07aa269f396d0fba3f6c09f1c77d251bf43c9e9
[ "Apache-2.0" ]
null
null
null
webapp/views.py
mrigeshpriyadarshi/bwc_orchestrator
e07aa269f396d0fba3f6c09f1c77d251bf43c9e9
[ "Apache-2.0" ]
null
null
null
webapp/views.py
mrigeshpriyadarshi/bwc_orchestrator
e07aa269f396d0fba3f6c09f1c77d251bf43c9e9
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import requests from requests.auth import HTTPBasicAuth import json, os, time, sys from requests.packages.urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(InsecureRequestWarning) # from __future__ import unicode_literals # from django.shortcuts import...
45.093023
164
0.643344
581bf23a21cf9297098102c34fc7e4dc75f146c5
3,775
py
Python
salt/modules/win_repo.py
kaithar/salt
8a53c925ea4c05414894f0baca4502a9f1d786ba
[ "Apache-2.0" ]
null
null
null
salt/modules/win_repo.py
kaithar/salt
8a53c925ea4c05414894f0baca4502a9f1d786ba
[ "Apache-2.0" ]
null
null
null
salt/modules/win_repo.py
kaithar/salt
8a53c925ea4c05414894f0baca4502a9f1d786ba
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- r''' Module to manage Windows software repo on a Standalone Minion The following options must be set in the Minion config: file_client: local win_repo_cachefile: c:\salt\file_roots\winrepo\winrepo.p win_repo: c:\salt\file_roots\winrepo Place all Windows package files in the 'win_repo' di...
32.543103
96
0.579603
85dace81892ad494cc315f73b25d2ecb832ede2b
745
py
Python
Python/270 ClosestBSTValue.py
Fiona08/leetcode
cee3da122e1703cfde811a8f69c207d5ae780d37
[ "MIT" ]
null
null
null
Python/270 ClosestBSTValue.py
Fiona08/leetcode
cee3da122e1703cfde811a8f69c207d5ae780d37
[ "MIT" ]
null
null
null
Python/270 ClosestBSTValue.py
Fiona08/leetcode
cee3da122e1703cfde811a8f69c207d5ae780d37
[ "MIT" ]
null
null
null
#270 # Time: O(h) height of BST # Space: O(1) # Given a non-empty binary search tree and a target value, # find the value in the BST that is closest to the target. class TreeNode(): def __init__(self,val): self.val=val; self.right=None self.left=None class binarySearchTree(): de...
23.28125
59
0.567785
3fe2ec2c721a73f60b9c8d1a70610696589e6c88
2,515
py
Python
strategic_exploration/hrl/data.py
shaun95/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
1
2022-03-13T21:48:52.000Z
2022-03-13T21:48:52.000Z
strategic_exploration/hrl/data.py
shaun95/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
null
null
null
strategic_exploration/hrl/data.py
shaun95/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
1
2022-03-30T07:20:29.000Z
2022-03-30T07:20:29.000Z
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
32.24359
74
0.753082
2557e17e41a99b2332e1dd93254f91f440bb436a
4,601
py
Python
exps/sampler.py
windweller/nlplab
aac33ff17036bbf00bd3118953db08ae98da9d36
[ "MIT" ]
null
null
null
exps/sampler.py
windweller/nlplab
aac33ff17036bbf00bd3118953db08ae98da9d36
[ "MIT" ]
null
null
null
exps/sampler.py
windweller/nlplab
aac33ff17036bbf00bd3118953db08ae98da9d36
[ "MIT" ]
null
null
null
import pickle import tensorflow as tf from rllab.sampler.base import BaseSampler from sandbox.rocky.tf.envs.parallel_vec_env_executor import ParallelVecEnvExecutor from sandbox.rocky.tf.envs.vec_env_executor import VecEnvExecutor from rllab.misc import tensor_utils import numpy as np from rllab.sampler.stateful_pool i...
41.827273
118
0.58183
b5ea1aa795f7d5ff6c38d5f7b30902b4970fb41d
807
py
Python
ssh_client.py
the07/Networking
254253388223ed5973b631d5f9e08daa2bdcf115
[ "MIT" ]
null
null
null
ssh_client.py
the07/Networking
254253388223ed5973b631d5f9e08daa2bdcf115
[ "MIT" ]
null
null
null
ssh_client.py
the07/Networking
254253388223ed5973b631d5f9e08daa2bdcf115
[ "MIT" ]
null
null
null
""" A simple module to ssh to a specific machine and execute ls command. Before running the program ensure that the ssh server daemon is ruuning using netstat. """ #! /usr/bin/env python3 import getpass import paramiko HOSTNAME = 'localhost' PORT = 22 def run_ssh_cmd(username, password, cmd, hostname=HOSTNAME, por...
27.827586
86
0.733581
50ef909dcb597bd1349e38dfd6b3e533d243a0c6
4,665
py
Python
futu/examples/tiny_quant/tiny_quant_frame/FutuMarketEvent.py
liteself/py-futu-api
a78f5b46f56d30fb82a42951823afea4b5ed1307
[ "Apache-2.0" ]
2
2020-03-18T09:54:03.000Z
2020-05-15T08:13:33.000Z
futu/examples/tiny_quant/tiny_quant_frame/FutuMarketEvent.py
faruto/py-futu-api
cb274d5ab5387dca190b739d161f2bc8eabe073d
[ "Apache-2.0" ]
null
null
null
futu/examples/tiny_quant/tiny_quant_frame/FutuMarketEvent.py
faruto/py-futu-api
cb274d5ab5387dca190b739d161f2bc8eabe073d
[ "Apache-2.0" ]
1
2022-03-26T08:59:12.000Z
2022-03-26T08:59:12.000Z
# encoding: UTF-8 ''' ''' from .TinyDefine import * from datetime import datetime import futu as ft from .event.eventEngine import * # 简化市场状态 class Futu_Market_State: MARKET_NONE = "none" MARKET_PRE_OPEN = 'pre_open' MARKET_OPEN = 'open' MARKET_REST = 'rest' MARKET_MID_OPEN = 'mid open' MARKE...
40.921053
106
0.656592
c9594e670ca76d6cfdd0a653ee57051af605589d
913
py
Python
homura/modules/functional/grad_approximation.py
forkbabu/homura
3c2ba10593831af09ca7e5812c6471884cb4ec50
[ "Apache-2.0" ]
102
2018-05-25T05:59:09.000Z
2022-03-08T22:38:44.000Z
homura/modules/functional/grad_approximation.py
forkbabu/homura
3c2ba10593831af09ca7e5812c6471884cb4ec50
[ "Apache-2.0" ]
31
2018-04-22T17:35:40.000Z
2021-12-07T19:06:18.000Z
homura/modules/functional/grad_approximation.py
forkbabu/homura
3c2ba10593831af09ca7e5812c6471884cb4ec50
[ "Apache-2.0" ]
24
2019-02-05T11:39:37.000Z
2022-02-09T01:01:25.000Z
from __future__ import annotations import torch from torch.autograd import Function class _CustomSTE(Function): """ An efficient alternatives for >>> input_forward.requires_grad is False >>> input_backward.requires_grad is True >>> input_forward + (input_backward - input_backward.detach()) """ ...
29.451613
84
0.668127
cba3541f8b976652fd75a499b194dbcb8b870073
649
py
Python
alembic_dvc/versions/3bda3115a662_add_sample_prep_choices.py
ASUPychron/pychron
dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76
[ "Apache-2.0" ]
31
2016-03-07T02:38:17.000Z
2022-02-14T18:23:43.000Z
alembic_dvc/versions/3bda3115a662_add_sample_prep_choices.py
ASUPychron/pychron
dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76
[ "Apache-2.0" ]
1,626
2015-01-07T04:52:35.000Z
2022-03-25T19:15:59.000Z
alembic_dvc/versions/3bda3115a662_add_sample_prep_choices.py
UIllinoisHALPychron/pychron
f21b79f4592a9fb9dc9a4cb2e4e943a3885ededc
[ "Apache-2.0" ]
26
2015-05-23T00:10:06.000Z
2022-03-07T16:51:57.000Z
"""add sample prep choices Revision ID: 3bda3115a662 Revises: 45f4b2dbc41a Create Date: 2018-07-19 16:02:41.060054 """ # revision identifiers, used by Alembic. revision = '3bda3115a662' down_revision = '45f4b2dbc41a' import sqlalchemy as sa from alembic import op def upgrade(): try: op.create_table('S...
22.37931
66
0.628659
d33964b840a138676614d87b5545d43fe002a7ca
3,248
py
Python
MyBlog/settings.py
debajyotiroyc/BlogPlatform_with_Django
564b1632a6e867e5bc7502571cc8196496a877c9
[ "MIT" ]
null
null
null
MyBlog/settings.py
debajyotiroyc/BlogPlatform_with_Django
564b1632a6e867e5bc7502571cc8196496a877c9
[ "MIT" ]
null
null
null
MyBlog/settings.py
debajyotiroyc/BlogPlatform_with_Django
564b1632a6e867e5bc7502571cc8196496a877c9
[ "MIT" ]
null
null
null
""" Django settings for MyBlog project. Generated by 'django-admin startproject' using Django 3.1.2. For more information on this file, see https://docs.djangoproject.com/en/3.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.1/ref/settings/ """ f...
26.193548
92
0.669951
08886c7f66b40157052eb07cd6dea965a2aefd77
3,751
py
Python
app/recipe/tests/test_tag_api.py
jeremy2918/recipe-app-api
7dcf420141271892b4a6aeb9c2115a1a1b8a84f4
[ "MIT" ]
null
null
null
app/recipe/tests/test_tag_api.py
jeremy2918/recipe-app-api
7dcf420141271892b4a6aeb9c2115a1a1b8a84f4
[ "MIT" ]
null
null
null
app/recipe/tests/test_tag_api.py
jeremy2918/recipe-app-api
7dcf420141271892b4a6aeb9c2115a1a1b8a84f4
[ "MIT" ]
null
null
null
from django.contrib.auth import get_user_model from django.test import TestCase from django.urls import reverse from rest_framework.test import APIClient from core.models import Tag, Recipe from recipe.serializers import TagSerializer TAGS_URL = reverse('recipe:tag-list') class TestPublicTagAPI(TestCase): """Te...
32.617391
76
0.634497
67746fc66c3675d5751151290eface45eebd0c1c
624
py
Python
web/migrations/0002_news.py
imu-hupeng/ClassMate
5a4e7ffd5e6ef873308550a6ccfd7b051017c2be
[ "Apache-2.0" ]
3
2018-05-17T02:11:08.000Z
2020-06-09T11:24:43.000Z
web/migrations/0002_news.py
imu-hupeng/ClassMate
5a4e7ffd5e6ef873308550a6ccfd7b051017c2be
[ "Apache-2.0" ]
null
null
null
web/migrations/0002_news.py
imu-hupeng/ClassMate
5a4e7ffd5e6ef873308550a6ccfd7b051017c2be
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.0 on 2018-01-01 11:39 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('web', '0001_initial'), ] operations = [ migrations.CreateModel( name='News', fields=[ ('id', models.Au...
27.130435
114
0.565705
09c67631f3253dd11290d802c55bb126856f7387
580
py
Python
integration_tests/test_version.py
FlexiGroBots-H2020/datacube-ows
8e3e1343582c00ae46b498247ac98d8e98bd000f
[ "Apache-2.0" ]
4
2017-11-02T04:22:30.000Z
2018-05-01T14:16:23.000Z
integration_tests/test_version.py
FlexiGroBots-H2020/datacube-ows
8e3e1343582c00ae46b498247ac98d8e98bd000f
[ "Apache-2.0" ]
33
2018-05-23T01:32:06.000Z
2018-11-05T01:07:09.000Z
integration_tests/test_version.py
FlexiGroBots-H2020/datacube-ows
8e3e1343582c00ae46b498247ac98d8e98bd000f
[ "Apache-2.0" ]
7
2017-10-09T00:09:44.000Z
2018-07-27T00:41:19.000Z
# This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # # Copyright (c) 2017-2021 OWS Contributors # SPDX-License-Identifier: Apache-2.0 """Test update ranges on DB using Click testing https://click.palletsprojects.com/en/7.x/testing/ """ from data...
34.117647
72
0.767241
b491cf29df73485cf46f10051d00c7001b22389d
660
py
Python
test/test_convert_xml_to_parquet.py
Manu58/xml_to_parquet
38d7c38bae485ef5a452090e102722b71f45496d
[ "MIT" ]
null
null
null
test/test_convert_xml_to_parquet.py
Manu58/xml_to_parquet
38d7c38bae485ef5a452090e102722b71f45496d
[ "MIT" ]
null
null
null
test/test_convert_xml_to_parquet.py
Manu58/xml_to_parquet
38d7c38bae485ef5a452090e102722b71f45496d
[ "MIT" ]
null
null
null
import unittest import os import tempfile from xml_to_parquet.convert_xml_to_parquet import parse_file class MyTest(unittest.TestCase): def test_parquet(self): realpath = os.path.dirname(os.path.realpath(__file__)) input_file = os.path.join(realpath, "PurchaseOrder.xml") output_file = o...
25.384615
86
0.683333
5a83b6d66fa01254487b5a3b4ccc9780830a3b9f
15,000
py
Python
server/web/callbacks.py
blackadar/shepherd
65ce887c5d3f388d235cf2342890289f2ab92daa
[ "MIT" ]
2
2021-05-26T05:27:16.000Z
2021-08-12T00:02:04.000Z
server/web/callbacks.py
blackadar/shepherd
65ce887c5d3f388d235cf2342890289f2ab92daa
[ "MIT" ]
null
null
null
server/web/callbacks.py
blackadar/shepherd
65ce887c5d3f388d235cf2342890289f2ab92daa
[ "MIT" ]
null
null
null
import datetime import dash_bootstrap_components as dbc import dash_html_components as html import plotly import plotly.graph_objs as go from dash.dependencies import Input, Output, State from dash.exceptions import PreventUpdate from server.web.app import app, connection from server.web.connector import format_disks...
35.885167
164
0.4888
91c19b16c50220443e985ec964c609026dd8242d
602
py
Python
gokinjo/preprocessing.py
momijiame/gokinjo
5ab16e306c9fb8908963a569341686eb0720891f
[ "Apache-2.0" ]
20
2019-02-09T04:11:09.000Z
2021-11-10T02:13:01.000Z
gokinjo/preprocessing.py
diegushko/gokinjo
5ab16e306c9fb8908963a569341686eb0720891f
[ "Apache-2.0" ]
2
2019-02-09T12:58:14.000Z
2019-02-14T14:14:32.000Z
gokinjo/preprocessing.py
diegushko/gokinjo
5ab16e306c9fb8908963a569341686eb0720891f
[ "Apache-2.0" ]
2
2020-06-03T08:57:19.000Z
2021-06-26T19:12:14.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from sklearn.preprocessing import StandardScaler from sklearn.preprocessing import MinMaxScaler SCALERS = { 'standard': StandardScaler, 'minmax': MinMaxScaler, } def normalize(scaler, xtr, xte): # look up scaler scaler_class = SCALERS.get(scaler) if ...
24.08
90
0.697674
e8fe5472a2f65dc9b9d7dd819ac0c6bd70b7704a
789
py
Python
Tensorflow/Courses/0_Intro_to_tf/a11_week4_load_image.py
maxcurie1996/Artificial_Intelligence
f49ccb28165736950a8c800be8e6d01dde1fd3e9
[ "MIT" ]
null
null
null
Tensorflow/Courses/0_Intro_to_tf/a11_week4_load_image.py
maxcurie1996/Artificial_Intelligence
f49ccb28165736950a8c800be8e6d01dde1fd3e9
[ "MIT" ]
null
null
null
Tensorflow/Courses/0_Intro_to_tf/a11_week4_load_image.py
maxcurie1996/Artificial_Intelligence
f49ccb28165736950a8c800be8e6d01dde1fd3e9
[ "MIT" ]
null
null
null
import numpy as np from goolge.colab import files from keras.preprocessing import image #upload the files uploaded = files.upload() for fn in uploaded.keys(): path='/content/'+fn img=image.load_img(path,target_size=(300,300)) x=image.img_to_array(img) #https://numpy.org/doc/stable/reference/generated/numpy.e...
28.178571
130
0.735108
71bd67b108b9109b6cbaa06a89e13e2275072df0
4,069
py
Python
tests/test_cdf.py
eTuDpy/phuzzy
77b3f30a199907d2f97511179cdce21a45bf3068
[ "MIT" ]
2
2018-04-12T22:46:16.000Z
2018-09-05T08:01:20.000Z
tests/test_cdf.py
eTuDpy/phuzzy
77b3f30a199907d2f97511179cdce21a45bf3068
[ "MIT" ]
92
2018-04-13T09:39:40.000Z
2020-12-07T17:22:06.000Z
tests/test_cdf.py
eTuDpy/phuzzy
77b3f30a199907d2f97511179cdce21a45bf3068
[ "MIT" ]
3
2018-04-14T22:02:09.000Z
2020-11-28T19:45:15.000Z
import phuzzy import numpy as np from phuzzy.mpl import mix_mpl def test_trapz(): x = np.linspace(-2, 5, 11) p = phuzzy.Trapezoid(alpha0=[1, 4], alpha1=[2, 3], number_of_alpha_levels=5) P = p.cdf(x) print(P) def test_uniform(): p = phuzzy.Uniform(alpha0=[1, 2], number_of_alpha_levels=200) pp...
26.94702
101
0.564758
36a76c048e8201b0e919fdd0dd1af8a8715c3850
7,486
py
Python
drfpasswordless/utils.py
InzGIBA/django-rest-framework-passwordless
40d96eb9e59561a890c0f79eebd0adcd0eb33492
[ "MIT" ]
null
null
null
drfpasswordless/utils.py
InzGIBA/django-rest-framework-passwordless
40d96eb9e59561a890c0f79eebd0adcd0eb33492
[ "MIT" ]
null
null
null
drfpasswordless/utils.py
InzGIBA/django-rest-framework-passwordless
40d96eb9e59561a890c0f79eebd0adcd0eb33492
[ "MIT" ]
null
null
null
import logging from django.contrib.auth import get_user_model from django.core.exceptions import PermissionDenied from django.core.mail import send_mail from django.template import loader from django.utils import timezone from django.utils.module_loading import import_string from rest_framework.authtoken.models import ...
38
123
0.656425
4f2960633be5fb2609fb29ac06a216070f0165ed
1,088
py
Python
code/run.py
KirillDogadin-std/Lab-Semantic
d04e592cd540dd5dcd537cd7df7ee6619af3d67f
[ "MIT" ]
null
null
null
code/run.py
KirillDogadin-std/Lab-Semantic
d04e592cd540dd5dcd537cd7df7ee6619af3d67f
[ "MIT" ]
11
2020-11-30T14:28:20.000Z
2021-01-13T19:55:44.000Z
code/run.py
KirillDogadin-std/Lab-Semantic
d04e592cd540dd5dcd537cd7df7ee6619af3d67f
[ "MIT" ]
1
2021-03-23T07:22:03.000Z
2021-03-23T07:22:03.000Z
import os import argparse from utils import load_args from data_model import DataModel from predicate_alignment import PredicateAlignModel from MultiKE_CSL import MultiKE_CV from MultiKE_Late import MultiKE_Late parser = argparse.ArgumentParser(description='run') parser.add_argument('--method', type=str, default='IT...
32.969697
74
0.727022
09e836f7a50a95455f579afcee0d018cb7c71b53
2,434
py
Python
openapi_genclient/models/operation_interval.py
NikitaMelnikov/open-api-python-client
c45579b9fdb3c4e62c45590fb6b2f12321596b2a
[ "Unlicense" ]
102
2019-09-27T12:18:37.000Z
2022-02-02T21:01:44.000Z
openapi_genclient/models/operation_interval.py
NikitaMelnikov/open-api-python-client
c45579b9fdb3c4e62c45590fb6b2f12321596b2a
[ "Unlicense" ]
27
2019-12-05T13:19:44.000Z
2021-12-20T08:17:28.000Z
openapi_genclient/models/operation_interval.py
NikitaMelnikov/open-api-python-client
c45579b9fdb3c4e62c45590fb6b2f12321596b2a
[ "Unlicense" ]
23
2019-10-03T13:17:55.000Z
2022-01-30T06:43:02.000Z
# coding: utf-8 """ OpenAPI tinkoff.ru/invest OpenAPI. # noqa: E501 The version of the OpenAPI document: 1.0.0 Contact: n.v.melnikov@tinkoff.ru Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six class OperationInterval(object): """NOTE: Thi...
25.893617
74
0.548069
6c746af79929a796a599f68f6826ac9cb084f4dc
4,322
py
Python
msticpy/sectools/tiproviders/alienvault_otx.py
kinow/msticpy
82ad94bb7a6024e4c4e8ac50fde80df327c9f55b
[ "MIT" ]
null
null
null
msticpy/sectools/tiproviders/alienvault_otx.py
kinow/msticpy
82ad94bb7a6024e4c4e8ac50fde80df327c9f55b
[ "MIT" ]
null
null
null
msticpy/sectools/tiproviders/alienvault_otx.py
kinow/msticpy
82ad94bb7a6024e4c4e8ac50fde80df327c9f55b
[ "MIT" ]
null
null
null
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- """ AlienV...
36.016667
88
0.585609
b719ca448cfeb9e70111dc3fdf81e5b2a81a962b
8,278
py
Python
Chapter05/cgan.py
arifmudi/Advanced-Deep-Learning-with-Python
180cae0ec62857670bfc2a4d566857030adc4905
[ "MIT" ]
107
2019-12-09T13:49:33.000Z
2021-08-31T03:23:39.000Z
Chapter05/cgan.py
bwantan/Advanced-Deep-Learning-with-Python
083f63dfc0c5f404143552ea20d560b06ec303f5
[ "MIT" ]
null
null
null
Chapter05/cgan.py
bwantan/Advanced-Deep-Learning-with-Python
083f63dfc0c5f404143552ea20d560b06ec303f5
[ "MIT" ]
48
2019-12-05T05:30:51.000Z
2022-03-22T02:03:00.000Z
""" MIT License This example is based on https://github.com/eriklindernoren/Keras-GAN Copyright (c) 2017 Erik Linder-Norén Copyright (c) 2019 Ivan Vasilev Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the S...
33.92623
96
0.687002
5cc7108aca058f986e0068ac097748a2789a7ae7
1,493
py
Python
aliyun-python-sdk-ehpc/aliyunsdkehpc/request/v20180412/ListCloudMetricProfilingsRequest.py
liumihust/aliyun-openapi-python-sdk
c7b5dd4befae4b9c59181654289f9272531207ef
[ "Apache-2.0" ]
1
2019-12-23T12:36:43.000Z
2019-12-23T12:36:43.000Z
aliyun-python-sdk-ehpc/aliyunsdkehpc/request/v20180412/ListCloudMetricProfilingsRequest.py
liumihust/aliyun-openapi-python-sdk
c7b5dd4befae4b9c59181654289f9272531207ef
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-ehpc/aliyunsdkehpc/request/v20180412/ListCloudMetricProfilingsRequest.py
liumihust/aliyun-openapi-python-sdk
c7b5dd4befae4b9c59181654289f9272531207ef
[ "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...
35.547619
85
0.765573
be239152f4e7fe100d50bf019127a45cd91bb07f
6,801
py
Python
gitarootools/archive/xgmitem.py
boringhexi/gitarootools
430387b4f8c30b6d586f1a860e8d8fb5f6507da6
[ "MIT" ]
2
2020-08-01T22:22:59.000Z
2021-10-08T05:09:21.000Z
gitarootools/archive/xgmitem.py
boringhexi/gitarootools
430387b4f8c30b6d586f1a860e8d8fb5f6507da6
[ "MIT" ]
3
2019-12-16T07:37:36.000Z
2020-10-20T12:55:52.000Z
gitarootools/archive/xgmitem.py
boringhexi/gitarootools
430387b4f8c30b6d586f1a860e8d8fb5f6507da6
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2019, 2020 boringhexi """xgmitem.py - read/write the contents of an XGM container""" import struct from typing import BinaryIO # data of a single blank animation entry, used by models without animations BLANK_ANIMDATA = struct.pack("<3f20x", 2, 1, 60) class XgmItemError(Excep...
33.014563
85
0.64667
7234c3d3030ea4f8663054c4e56c130fedbdea43
477
py
Python
L1Trigger/Configuration/python/L1Emulator_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
L1Trigger/Configuration/python/L1Emulator_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
L1Trigger/Configuration/python/L1Emulator_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
import FWCore.ParameterSet.Config as cms # this file is still used by FastSim # no-one else should use it!!! # Configuration (use Fake/Frontier in future) from L1Trigger.Configuration.L1Config_cff import * # Emulator modules from L1Trigger.Configuration.L1MuonEmulator_cff import * from L1Trigger.Configuration.L1CaloE...
31.8
64
0.823899
68e7c6bcad389978d43c40ea487191c8ac1755e2
9,300
py
Python
process.py
LollyBomb-hub/ProcessWrap
d1baffdeb498c5d7da522af8739df3e7083156cb
[ "MIT" ]
null
null
null
process.py
LollyBomb-hub/ProcessWrap
d1baffdeb498c5d7da522af8739df3e7083156cb
[ "MIT" ]
null
null
null
process.py
LollyBomb-hub/ProcessWrap
d1baffdeb498c5d7da522af8739df3e7083156cb
[ "MIT" ]
null
null
null
from sys import platform from shutil import rmtree, copyfile from random import randint from os import system, getcwd, path, curdir, chdir, mkdir from time import sleep, time from multiprocessing import Process as p mswin = (platform == "win32") if mswin: from subprocess import Popen, REALTIME_PRIORITY_CLASS else:...
32.179931
290
0.540753
57af3364cdc8792655a6ee6f410550a0255ae92c
46,621
py
Python
addons/blender_mmd_tools-main/mmd_tools/core/pmx/importer.py
V-Sekai/V-Sekai-Blender-tools
3473ad4abb737756290a9007273519460742960d
[ "MIT" ]
2
2021-12-21T16:38:58.000Z
2022-01-08T00:56:35.000Z
addons/blender_mmd_tools-main/mmd_tools/core/pmx/importer.py
V-Sekai/V-Sekai-Blender-game-tools
3473ad4abb737756290a9007273519460742960d
[ "MIT" ]
1
2022-01-29T05:46:50.000Z
2022-01-29T05:46:50.000Z
addons/blender_mmd_tools-main/mmd_tools/core/pmx/importer.py
V-Sekai/V-Sekai-Blender-game-tools
3473ad4abb737756290a9007273519460742960d
[ "MIT" ]
1
2021-11-07T19:41:34.000Z
2021-11-07T19:41:34.000Z
# -*- coding: utf-8 -*- import os import collections import logging import time import bpy from mathutils import Vector, Matrix import mmd_tools.core.model as mmd_model from mmd_tools import utils from mmd_tools import bpyutils from mmd_tools.core import pmx from mmd_tools.core.bone import FnBone from mmd_tools.core....
45.395326
151
0.593574
4d5b78bb9564be18c18578fdb0d8aaf726828250
732
py
Python
integration/test_examples.py
VRGhost/jsJson
d9deb9692044b303e6b3dd7e5487f06c2e6cd466
[ "MIT" ]
null
null
null
integration/test_examples.py
VRGhost/jsJson
d9deb9692044b303e6b3dd7e5487f06c2e6cd466
[ "MIT" ]
null
null
null
integration/test_examples.py
VRGhost/jsJson
d9deb9692044b303e6b3dd7e5487f06c2e6cd466
[ "MIT" ]
null
null
null
import json import pathlib import pytest import ex_struct @pytest.fixture def examples_dir(fs) -> pathlib.Path: path = (pathlib.Path(__file__).parent.parent / "examples").resolve() fs.add_real_directory(path) return path @pytest.mark.parametrize( "inp_fname, out_fname", [ ("ref.json", ...
21.529412
75
0.669399
d5253e519c1fe834f334b23665168243b04c6c95
5,898
py
Python
server.py
Sentimentron/Dracula
878f81c1c56a8ac12cf02d8f15bd93c544e29611
[ "BSD-3-Clause" ]
100
2016-04-25T17:48:50.000Z
2021-02-11T04:11:54.000Z
server.py
Sentimentron/Dracula
878f81c1c56a8ac12cf02d8f15bd93c544e29611
[ "BSD-3-Clause" ]
1
2017-02-25T21:26:40.000Z
2017-02-27T18:04:51.000Z
server.py
Sentimentron/Dracula
878f81c1c56a8ac12cf02d8f15bd93c544e29611
[ "BSD-3-Clause" ]
25
2016-07-27T23:11:44.000Z
2020-01-21T01:55:36.000Z
__author__ = 'rtownsend' from lstm import build_model from modelio import * from nn_params import * from nn_optimizers import * from nn_serialization import load_params import string from flask import Flask, request, jsonify app = Flask(__name__) from collections import defaultdict, Counter model = None max_word_co...
33.511364
154
0.644795
b95e61989dbc7f3232f6c01a7f171918ae63df9a
552
py
Python
doc/examples/nodeid.py
barraponto/pytest-dependency
cab2f65ced816939a9041b9e67169073ef0ee412
[ "Apache-2.0" ]
91
2017-01-30T16:05:13.000Z
2022-03-29T12:17:35.000Z
doc/examples/nodeid.py
ftesser/pytest-dependency
1e01358b272ef7d1b2bae0eb7c9d4e33f657da35
[ "Apache-2.0" ]
63
2016-04-21T19:30:32.000Z
2022-03-30T13:17:42.000Z
doc/examples/nodeid.py
ftesser/pytest-dependency
1e01358b272ef7d1b2bae0eb7c9d4e33f657da35
[ "Apache-2.0" ]
29
2017-09-24T17:22:02.000Z
2022-03-30T20:39:49.000Z
import random import pytest def test_a(): pass @pytest.mark.parametrize("i,b", [ (7, True), (0, False), pytest.param(-1, False, marks=pytest.mark.xfail(reason="nonsense")) ]) def test_b(i, b): assert bool(i) == b ordered = list(range(10)) unordered = random.sample(ordered, k=len(ordered)) class ...
20.444444
71
0.581522
ebd409b1ead05bf4e9ff1c95f74b0eaaadb44186
1,453
py
Python
parsers/psd.py
cugu-stars/mitra
02f06f98369872e07c23186b324898e004cfef12
[ "MIT" ]
1
2021-08-10T05:34:32.000Z
2021-08-10T05:34:32.000Z
parsers/psd.py
x00x00/mitra
77cb8807e051d6433a925315e397d462ada9b44e
[ "MIT" ]
null
null
null
parsers/psd.py
x00x00/mitra
77cb8807e051d6433a925315e397d462ada9b44e
[ "MIT" ]
2
2021-09-04T13:30:58.000Z
2021-11-14T20:37:09.000Z
#!/usr/bin/env python3 # Adobe Photoshop from parsers import FType from helpers import * class parser(FType): DESC = "PSD / Photoshop" TYPE = "PSD" MAGIC = b"8BPS" COLOR_MODE_DATA_o = 0x1a # Size:4 Data:Size IMAGE_RESOURCE_BLOCK_s = 12 def __init__(self, data=""): FType.__init__(self, data) self.data = ...
20.757143
64
0.687543
eb693f8480b5c2cbfffc6cf9a76cf5f885e1140b
25,731
py
Python
tests/mongo/test_mongo.py
ToucanToco/toucan-connectors
ca7e551f728bb5350d550eb099cab569c9238550
[ "BSD-3-Clause" ]
15
2018-04-24T08:14:19.000Z
2021-08-01T17:48:56.000Z
tests/mongo/test_mongo.py
ToucanToco/toucan-connectors
ca7e551f728bb5350d550eb099cab569c9238550
[ "BSD-3-Clause" ]
281
2018-03-29T23:11:26.000Z
2022-02-15T17:29:11.000Z
tests/mongo/test_mongo.py
ToucanToco/toucan-connectors
ca7e551f728bb5350d550eb099cab569c9238550
[ "BSD-3-Clause" ]
14
2019-02-07T14:55:22.000Z
2021-11-25T09:12:23.000Z
import os import re from datetime import datetime import pandas as pd import pymongo import pymongo.errors import pytest from bson.son import SON from toucan_connectors.common import ConnectorStatus from toucan_connectors.json_wrapper import JsonWrapper from toucan_connectors.mongo.mongo_connector import ( MongoC...
36.240845
100
0.62858
b236720adc2a20060902e1e945e27295220cb516
399
py
Python
SiF/vaskelister/migrations/0009_vaskeliste_name.py
karendahlaarhus/TDT4140-programvareutvikling
f966ff3f2286c4875edbb5c77d1f9073a10b56c6
[ "MIT" ]
null
null
null
SiF/vaskelister/migrations/0009_vaskeliste_name.py
karendahlaarhus/TDT4140-programvareutvikling
f966ff3f2286c4875edbb5c77d1f9073a10b56c6
[ "MIT" ]
null
null
null
SiF/vaskelister/migrations/0009_vaskeliste_name.py
karendahlaarhus/TDT4140-programvareutvikling
f966ff3f2286c4875edbb5c77d1f9073a10b56c6
[ "MIT" ]
null
null
null
# Generated by Django 2.2 on 2020-04-02 18:41 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('vaskelister', '0008_auto_20200323_1531'), ] operations = [ migrations.AddField( model_name='vaskeliste', name='name', ...
21
61
0.606516
f3569a4a54b6a06061231c775c69a065b00096d4
3,475
py
Python
src/api/func.py
jiangyt2112/NetworkMonitor
f59944add504c6a081a4434b7f027472e6679e29
[ "Apache-2.0" ]
null
null
null
src/api/func.py
jiangyt2112/NetworkMonitor
f59944add504c6a081a4434b7f027472e6679e29
[ "Apache-2.0" ]
null
null
null
src/api/func.py
jiangyt2112/NetworkMonitor
f59944add504c6a081a4434b7f027472e6679e29
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python2 import __init__ from comm.client import api_to_server_msg from utils.conf import CONF from openstackapi.auth import check_auth as os_check_auth from comm.client import api_to_server_msg from database.manager import Manager def check_auth(msg): auth_url = CONF.openstack_conf['auth_url'] retur...
29.201681
108
0.585036
9d2657c9917980095c6c1dae8807d591aca85e6a
751
py
Python
modules/exploitation/brutex.py
nimert007/The-Penetration-Testers-Framework-PTF-
d8f7ae02b6655df93e1cabbca8481b5df55bd4c0
[ "FTL" ]
4
2020-09-03T02:26:23.000Z
2022-02-25T06:57:25.000Z
modules/exploitation/brutex.py
Ben0xA/ptf
ebcc7a192c1286b962a826ec8e6f48334926b675
[ "FTL" ]
null
null
null
modules/exploitation/brutex.py
Ben0xA/ptf
ebcc7a192c1286b962a826ec8e6f48334926b675
[ "FTL" ]
3
2016-03-22T11:24:57.000Z
2019-03-28T11:31:25.000Z
#!/usr/bin/env python ##################################### # Installation module for brutex ##################################### # AUTHOR OF MODULE NAME AUTHOR="David Kennedy (ReL1K)" # DESCRIPTION OF THE MODULE DESCRIPTION="This module will install/update BruteX - a brute forcing tool" # INSTALL TYPE GIT, SVN, FI...
22.757576
75
0.684421
a5b171df924804e66304d76ba5d5c07def83771d
1,527
py
Python
snakemake/configs/hg38_ERP021735.py
saketkc/re-ribo-smk
c9326cbafdfa060e22e9af692d9146c37f5035ba
[ "BSD-2-Clause" ]
1
2019-09-11T17:09:48.000Z
2019-09-11T17:09:48.000Z
snakemake/configs/hg38_ERP021735.py
saketkc/re-ribo-smk
c9326cbafdfa060e22e9af692d9146c37f5035ba
[ "BSD-2-Clause" ]
null
null
null
snakemake/configs/hg38_ERP021735.py
saketkc/re-ribo-smk
c9326cbafdfa060e22e9af692d9146c37f5035ba
[ "BSD-2-Clause" ]
null
null
null
RAWDATA_DIR = '/staging/as/skchoudh/re-ribo-datasets/hg38/ERP021735' OUT_DIR = '/staging/as/skchoudh/re-ribo-analysis/hg38/ERP021735' GENOME_FASTA = '/home/cmb-06/as/skchoudh/genomes/hg38/fasta/Homo_sapiens.GRCh38.dna_sm.primary_assembly.fa' CHROM_SIZES = '/home/cmb-06/as/skchoudh/genomes/hg38/fasta/Homo_sapiens.GRCh38...
80.368421
120
0.806811
97d5a64801a3baa1f07c5d8552aacaede34bac05
3,110
py
Python
5-tests/tests/user/test_views.py
rcmgn/kts-school-backend
8a895043b7f0156ec49554504198b631df41d2cd
[ "MIT" ]
9
2021-02-04T07:00:59.000Z
2022-03-21T06:28:27.000Z
5-tests/tests/user/test_views.py
rcmgn/kts-school-backend
8a895043b7f0156ec49554504198b631df41d2cd
[ "MIT" ]
null
null
null
5-tests/tests/user/test_views.py
rcmgn/kts-school-backend
8a895043b7f0156ec49554504198b631df41d2cd
[ "MIT" ]
4
2021-10-20T18:44:22.000Z
2022-02-16T19:11:49.000Z
import datetime import uuid from freezegun import freeze_time from blog_app.user.models import User, Session from tests.conftest import DEFAULT_TIME, authenticate def user2dict(user: User): return { "username": user.username, "created": user.created.isoformat(), "id": user.id, } cl...
36.162791
78
0.633762
40f5b6f345ce15833debf6716c2ef1c526829ad9
837
py
Python
applications/examples/controllers/layout_examples.py
trosa/listool
f175c6e30bcc788a381a92c3a8b818a1f1a88de6
[ "BSD-3-Clause" ]
1
2017-08-11T20:37:21.000Z
2017-08-11T20:37:21.000Z
applications/examples/controllers/layout_examples.py
trosa/listool
f175c6e30bcc788a381a92c3a8b818a1f1a88de6
[ "BSD-3-Clause" ]
null
null
null
applications/examples/controllers/layout_examples.py
trosa/listool
f175c6e30bcc788a381a92c3a8b818a1f1a88de6
[ "BSD-3-Clause" ]
null
null
null
def civilized(): response.menu = [['civilized', True, URL('civilized' )], ['slick', False, URL('slick')], ['basic', False, URL('basic')]] response.flash = 'you clicked on civilized' return dict(message='you clicked on civilized') def slick(): response.menu ...
29.892857
57
0.53405
a084c2391445f29cb8993f04e534aff47b58e73b
395
py
Python
SyarifUts/wsgi.py
syarif09/syarif181028
f1b3b2338a0362a268bc11ad8b84aa9999dd4aec
[ "Unlicense" ]
null
null
null
SyarifUts/wsgi.py
syarif09/syarif181028
f1b3b2338a0362a268bc11ad8b84aa9999dd4aec
[ "Unlicense" ]
null
null
null
SyarifUts/wsgi.py
syarif09/syarif181028
f1b3b2338a0362a268bc11ad8b84aa9999dd4aec
[ "Unlicense" ]
null
null
null
""" WSGI config for SyarifUts project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SET...
23.235294
78
0.787342
d7153152b14646ab5fda5359f51e03eed63bdc0c
14,164
py
Python
captum/attr/_core/integrated_gradients.py
ngduduong/captum
6fe5f0f23ea975e73e0c0dee79bdc01b4223d283
[ "BSD-3-Clause" ]
null
null
null
captum/attr/_core/integrated_gradients.py
ngduduong/captum
6fe5f0f23ea975e73e0c0dee79bdc01b4223d283
[ "BSD-3-Clause" ]
null
null
null
captum/attr/_core/integrated_gradients.py
ngduduong/captum
6fe5f0f23ea975e73e0c0dee79bdc01b4223d283
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 from typing import Callable, List, Optional, Tuple, Union, Any import torch from torch import Tensor from .._utils.approximation_methods import approximation_parameters from .._utils.batching import _batched_operator from .._utils.common import ( _validate_input, _format_additional_forw...
49.351916
84
0.589523
1d6c1c3072445b25e1df07cace3a7c1c004eb3c6
4,428
py
Python
util/primes.py
Tenebrar/codebase
59c9a35289fb29afedad0e3edd0519b67372ef9f
[ "Unlicense" ]
1
2020-04-21T11:39:25.000Z
2020-04-21T11:39:25.000Z
util/primes.py
Tenebrar/codebase
59c9a35289fb29afedad0e3edd0519b67372ef9f
[ "Unlicense" ]
7
2020-02-12T01:08:01.000Z
2022-02-10T11:56:56.000Z
util/primes.py
Tenebrar/codebase
59c9a35289fb29afedad0e3edd0519b67372ef9f
[ "Unlicense" ]
null
null
null
from itertools import chain, count from math import sqrt from random import randrange, getrandbits from typing import Iterable def is_prime(number): """ Returns whether the passed integer is a prime number """ if number < 2: return False if number == 2: return True if number % 2 == 0: ...
34.325581
117
0.658988
6d3b7c76e5e2ef1b3d6da69735e2455ada9a8244
3,267
py
Python
coupons/forms.py
Amurmurmur/django-coupons
9373357549b1be2d2384344b65350f95bece3bed
[ "BSD-3-Clause" ]
null
null
null
coupons/forms.py
Amurmurmur/django-coupons
9373357549b1be2d2384344b65350f95bece3bed
[ "BSD-3-Clause" ]
null
null
null
coupons/forms.py
Amurmurmur/django-coupons
9373357549b1be2d2384344b65350f95bece3bed
[ "BSD-3-Clause" ]
null
null
null
from django import forms from django.utils.translation import ugettext_lazy as _ from .models import Coupon, CouponUser, Campaign from .settings import COUPON_TYPES class CouponAdminForm(forms.ModelForm): type = forms.ChoiceField(label=_("Type"), choices=COUPON_TYPES) class Meta: fields = '__all__' ...
41.884615
120
0.64371
2c66447306f1a2e89c53916408bf623ddc989913
10,077
py
Python
feat/networks/amdimnet.py
nessessence/SSL-FEW-SHOT
29cb65568f21c51e01eae0230ca4882cbdfbaf5f
[ "MIT" ]
170
2019-11-15T02:41:42.000Z
2021-12-20T02:45:21.000Z
feat/networks/amdimnet.py
nessessence/SSL-FEW-SHOT
29cb65568f21c51e01eae0230ca4882cbdfbaf5f
[ "MIT" ]
16
2019-11-19T13:24:50.000Z
2021-12-02T14:04:15.000Z
feat/networks/amdimnet.py
nessessence/SSL-FEW-SHOT
29cb65568f21c51e01eae0230ca4882cbdfbaf5f
[ "MIT" ]
33
2019-11-19T04:47:30.000Z
2022-02-09T05:50:33.000Z
import math import numpy as np import torch import torch.nn as nn import torch.nn.functional as F def flatten(x): return x.reshape(x.size(0), -1) class Flatten(nn.Module): def __init__(self): super(Flatten, self).__init__() def forward(self, input_tensor): return input_tensor.view(input_...
36.11828
78
0.583408
edf3a3d5a07648b4ecdaebc95d83a1f40dbbf723
3,387
py
Python
python/examples/detectnet.py
saifurrehman4114/Walking-Aid-for-Visually-Impaired-People-using-Jetson-Nano---SSD-MobileNet-Algo-Final-Year-Project-
624af581ddf99ed447e54e84475d5826732746d9
[ "MIT" ]
8
2021-06-27T14:12:16.000Z
2021-12-26T07:38:25.000Z
python/examples/detectnet.py
saifurrehman4114/Walking-Aid-for-Visually-Impaired-People-using-Jetson-Nano---SSD-MobileNet-Algo-Final-Year-Project-
624af581ddf99ed447e54e84475d5826732746d9
[ "MIT" ]
null
null
null
python/examples/detectnet.py
saifurrehman4114/Walking-Aid-for-Visually-Impaired-People-using-Jetson-Nano---SSD-MobileNet-Algo-Final-Year-Project-
624af581ddf99ed447e54e84475d5826732746d9
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the r...
36.031915
192
0.728373
e6f1edb9a854e36eb9369b6afab36d3312d4a797
1,089
py
Python
open_cv_course/libs/four_points.py
TRBaldim/projectx
9702a22870fa5769a08b0737e0c67b9eea03edd6
[ "Apache-2.0" ]
null
null
null
open_cv_course/libs/four_points.py
TRBaldim/projectx
9702a22870fa5769a08b0737e0c67b9eea03edd6
[ "Apache-2.0" ]
null
null
null
open_cv_course/libs/four_points.py
TRBaldim/projectx
9702a22870fa5769a08b0737e0c67b9eea03edd6
[ "Apache-2.0" ]
null
null
null
import numpy as np import cv2 def order_points(pts): rect = np.zeros((4, 2), dtype="float32") s = pts.sum(axis=1) rect[0] = pts[np.argmin(s)] rect[2] = pts[np.argmax(s)] diff = np.diff(pts, axis=1) rect[1] = pts[np.argmin(diff)] rect[3] = pts[np.argmax(diff)] return rect def four...
24.75
71
0.535354
31ffa1417749e6c15a9eb883962751c66a962156
2,451
py
Python
ansible/utils/module_docs_fragments/dellos9.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
1
2022-01-25T22:52:58.000Z
2022-01-25T22:52:58.000Z
ansible/utils/module_docs_fragments/dellos9.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
ansible/utils/module_docs_fragments/dellos9.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
1
2020-02-13T14:24:57.000Z
2020-02-13T14:24:57.000Z
# # (c) 2015, Peter Sprygada <psprygada@ansible.com> # # Copyright (c) 2016 Dell Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Licens...
37.136364
81
0.676051
f95f44124a6f252d86f442d434ba8184d6b05266
5,168
py
Python
src/pgpbs.py
rebryant/pgpbs-artifact
6bfdfcf3bd7aa3ffdfb1b145decc5640920b6260
[ "MIT" ]
1
2021-10-03T11:43:24.000Z
2021-10-03T11:43:24.000Z
src/pgpbs.py
rebryant/pgpbs-artifact
6bfdfcf3bd7aa3ffdfb1b145decc5640920b6260
[ "MIT" ]
null
null
null
src/pgpbs.py
rebryant/pgpbs-artifact
6bfdfcf3bd7aa3ffdfb1b145decc5640920b6260
[ "MIT" ]
null
null
null
#!/usr/bin/python # Simple, proof-generating SAT solver based on BDDs ##################################################################################### # Copyright (c) 2021 Marijn Heule, Randal E. Bryant, Carnegie Mellon University # # Permission is hereby granted, free of charge, to any person obtaining a copy o...
37.722628
159
0.611649