hexsha
stringlengths
40
40
size
int64
5
2.06M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
248
max_stars_repo_name
stringlengths
5
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
248
max_issues_repo_name
stringlengths
5
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
248
max_forks_repo_name
stringlengths
5
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
5
2.06M
avg_line_length
float64
1
1.02M
max_line_length
int64
3
1.03M
alphanum_fraction
float64
0
1
count_classes
int64
0
1.6M
score_classes
float64
0
1
count_generators
int64
0
651k
score_generators
float64
0
1
count_decorators
int64
0
990k
score_decorators
float64
0
1
count_async_functions
int64
0
235k
score_async_functions
float64
0
1
count_documentation
int64
0
1.04M
score_documentation
float64
0
1
6a2a3c06f511758a8f808e719520fdb3ebac69cd
15,015
py
Python
examples/elCmd.py
mark-nicholson/python-editline
c23f1071c4b832a92f66e2f49142e5c5f00e500d
[ "BSD-3-Clause" ]
4
2017-10-05T19:34:32.000Z
2021-05-18T23:29:44.000Z
examples/elCmd.py
mark-nicholson/python-editline
c23f1071c4b832a92f66e2f49142e5c5f00e500d
[ "BSD-3-Clause" ]
2
2018-03-30T22:38:17.000Z
2018-03-30T22:39:13.000Z
examples/elCmd.py
mark-nicholson/python-editline
c23f1071c4b832a92f66e2f49142e5c5f00e500d
[ "BSD-3-Clause" ]
null
null
null
"""A generic class to build line-oriented command interpreters. Interpreters constructed with this class obey the following conventions: 1. End of file on input is processed as the command 'EOF'. 2. A command is parsed out of each line by collecting the prefix composed of characters in the identchars member. 3. A ...
35.75
79
0.556777
12,517
0.833633
0
0
0
0
0
0
6,117
0.407393
6a2bc3b1189d8cb91dbce9466649429945439058
1,127
py
Python
ecommerce-website/orders/admin.py
Shanu85/FCS_Project
def3437d58b4d2ff00e26c0a5ca769af66eccfad
[ "MIT" ]
null
null
null
ecommerce-website/orders/admin.py
Shanu85/FCS_Project
def3437d58b4d2ff00e26c0a5ca769af66eccfad
[ "MIT" ]
null
null
null
ecommerce-website/orders/admin.py
Shanu85/FCS_Project
def3437d58b4d2ff00e26c0a5ca769af66eccfad
[ "MIT" ]
1
2022-01-03T13:40:11.000Z
2022-01-03T13:40:11.000Z
from django.contrib import admin from .models import Order, receiverInfo @admin.register(Order) class OrderAdmin(admin.ModelAdmin): date_hierarchy = 'created_at' list_display = ('user', 'code', 'total_price', 'shipping_status', 'created_at') list_display_links = ('user',) list_editable = ('shipping_s...
35.21875
92
0.696539
995
0.882875
0
0
1,048
0.929902
0
0
387
0.34339
6a2bdc47419473e5c8f04286a711270211d71607
2,513
py
Python
data_structures/linked_lists/ll-kth-from-end/ll_kth.py
jeremyCtown/data-structures-and-algorithms
d4ba8741f858fb5298f8ce560240373fb7742e20
[ "MIT" ]
null
null
null
data_structures/linked_lists/ll-kth-from-end/ll_kth.py
jeremyCtown/data-structures-and-algorithms
d4ba8741f858fb5298f8ce560240373fb7742e20
[ "MIT" ]
null
null
null
data_structures/linked_lists/ll-kth-from-end/ll_kth.py
jeremyCtown/data-structures-and-algorithms
d4ba8741f858fb5298f8ce560240373fb7742e20
[ "MIT" ]
null
null
null
from node import Node class LinkedList: """ initializes LL """ def __init__(self, iter=[]): self.head = None self._size = 0 for item in reversed(iter): self.insert(item) def __repr__(self): """ assumes head will have a val and we will need this...
25.383838
58
0.512933
2,487
0.989654
0
0
0
0
0
0
526
0.209312
6a2be20f58b11b8306e1cbf1b9ec46cf140c201d
1,559
py
Python
MuonAnalysis/MomentumScaleCalibration/test/LikelihoodPdfDBReader_cfg.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
MuonAnalysis/MomentumScaleCalibration/test/LikelihoodPdfDBReader_cfg.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
MuonAnalysis/MomentumScaleCalibration/test/LikelihoodPdfDBReader_cfg.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 process = cms.Process("LIKELIHOODPDFDBREADER") # process.load("MuonAnalysis.MomentumScaleCalibration.local_CSA08_Y_cff") process.source = cms.Source("EmptySource", numberEventsInRun = cms.untracked.uint32(1), firstRun = cms.untracked.uint32(1) ) process.load("Configur...
30.568627
79
0.76331
0
0
0
0
0
0
0
0
683
0.438101
6a2c1076d5d797f1927b5d8d8d4594e8e5c92647
9,615
py
Python
fast_fine_tuna/fast_fine_tuna.py
vinid/fast_fine_tuna
2d128f58df0407448cdb2e179972573afa7ac636
[ "MIT" ]
null
null
null
fast_fine_tuna/fast_fine_tuna.py
vinid/fast_fine_tuna
2d128f58df0407448cdb2e179972573afa7ac636
[ "MIT" ]
null
null
null
fast_fine_tuna/fast_fine_tuna.py
vinid/fast_fine_tuna
2d128f58df0407448cdb2e179972573afa7ac636
[ "MIT" ]
null
null
null
from transformers import AutoModel, AutoModelForSequenceClassification, AutoTokenizer, AutoConfig from sklearn.model_selection import StratifiedKFold import numpy as np import torch from fast_fine_tuna.dataset import MainDatasetDouble, MainDataset from transformers import AdamW from torch.utils.data import DataLoader i...
40.914894
114
0.615081
9,194
0.956214
0
0
0
0
0
0
372
0.03869
6a2c58ba82079e0bdc04e7b2c1c567a97cd9075d
451
py
Python
Message/Message.py
gauravyeole/KVstoreDB
1c7c83b158e95daec998fba62a89fa1211a05089
[ "MIT" ]
1
2019-10-01T12:22:38.000Z
2019-10-01T12:22:38.000Z
Message/Message.py
gauravyeole/KVstoreDB
1c7c83b158e95daec998fba62a89fa1211a05089
[ "MIT" ]
null
null
null
Message/Message.py
gauravyeole/KVstoreDB
1c7c83b158e95daec998fba62a89fa1211a05089
[ "MIT" ]
null
null
null
# Message class Implementation # @author: Gaurav Yeole <[email protected]> class Message: class Request: def __init__(self, action="", data=None): self.action = action self.data = data class Rsponse: def __init__(self): self.status = False se...
20.5
49
0.569845
371
0.822616
0
0
0
0
0
0
79
0.175166
6a2db7981b57ab2addb91eebdfdaf255263aca79
230
py
Python
wpt/websockets/websock_handlers/open_delay_wsh.py
gsnedders/presto-testo
a0acfbef13a3f8cae67cc7145216d31b67aa8eb4
[ "BSD-3-Clause" ]
null
null
null
wpt/websockets/websock_handlers/open_delay_wsh.py
gsnedders/presto-testo
a0acfbef13a3f8cae67cc7145216d31b67aa8eb4
[ "BSD-3-Clause" ]
null
null
null
wpt/websockets/websock_handlers/open_delay_wsh.py
gsnedders/presto-testo
a0acfbef13a3f8cae67cc7145216d31b67aa8eb4
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python from mod_pywebsocket import msgutil import time def web_socket_do_extra_handshake(request): pass # Always accept. def web_socket_transfer_data(request): time.sleep(3) msgutil.send_message(request, "line")
19.166667
43
0.795652
0
0
0
0
0
0
0
0
39
0.169565
6a2f97206c5b9ec5564b46970658837924dcfae3
2,404
py
Python
airflow/providers/microsoft/psrp/operators/psrp.py
augusto-herrmann/airflow
7ee4295dd3f7dba4fcd763286c7823bb1707fe99
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
4
2021-06-26T13:37:35.000Z
2022-01-11T15:49:44.000Z
airflow/providers/microsoft/psrp/operators/psrp.py
augusto-herrmann/airflow
7ee4295dd3f7dba4fcd763286c7823bb1707fe99
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
33
2021-07-25T10:29:30.000Z
2022-03-30T04:39:06.000Z
airflow/providers/microsoft/psrp/operators/psrp.py
augusto-herrmann/airflow
7ee4295dd3f7dba4fcd763286c7823bb1707fe99
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
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...
34.342857
89
0.687604
1,335
0.555324
0
0
0
0
0
0
1,259
0.52371
6a2fb0bff9f0be5443177122a457a61eac9dfba3
17,104
py
Python
appengine/monorail/services/api_pb2_v1_helpers.py
mithro/chromium-infra
d27ac0b230bedae4bc968515b02927cf9e17c2b7
[ "BSD-3-Clause" ]
1
2018-01-02T05:47:07.000Z
2018-01-02T05:47:07.000Z
appengine/monorail/services/api_pb2_v1_helpers.py
mithro/chromium-infra
d27ac0b230bedae4bc968515b02927cf9e17c2b7
[ "BSD-3-Clause" ]
null
null
null
appengine/monorail/services/api_pb2_v1_helpers.py
mithro/chromium-infra
d27ac0b230bedae4bc968515b02927cf9e17c2b7
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is govered by a BSD-style # license that can be found in the LICENSE file or at # https://developers.google.com/open-source/licenses/bsd """Convert Monorail PB objects to API PB objects""" import datetime import logging import time ...
35.485477
78
0.716265
0
0
0
0
0
0
0
0
2,054
0.120089
6a2fe9fc55d86e49bc69dd057bc5f300e14dbe22
10,782
py
Python
excut/feedback/rulebased_deduction/deduction_engine_extended.py
mhmgad/ExCut
09e943a23207381de3c3a9e6f70015882b8ec4af
[ "Apache-2.0" ]
5
2020-11-17T19:59:49.000Z
2021-09-23T23:10:39.000Z
excut/feedback/rulebased_deduction/deduction_engine_extended.py
mhmgad/ExCut
09e943a23207381de3c3a9e6f70015882b8ec4af
[ "Apache-2.0" ]
null
null
null
excut/feedback/rulebased_deduction/deduction_engine_extended.py
mhmgad/ExCut
09e943a23207381de3c3a9e6f70015882b8ec4af
[ "Apache-2.0" ]
null
null
null
""" This module contains the rule-based inference (rulebased_deduction engine) """ import itertools from collections import defaultdict from itertools import chain from excut.explanations_mining.descriptions import dump_explanations_to_file from excut.explanations_mining.descriptions_new import Description2, Atom, loa...
42.785714
147
0.667501
7,245
0.671953
0
0
0
0
0
0
3,430
0.318123
6a3060eba97a54372d78e04129b03dceb1e1d40e
916
py
Python
dataloader/viperlist_train.py
urasakikeisuke/rigidmask
4bb781102218dfd11efa767e2d0ba987d9949fd1
[ "MIT" ]
138
2021-01-12T03:02:04.000Z
2022-03-30T07:14:15.000Z
dataloader/viperlist_train.py
urasakikeisuke/rigidmask
4bb781102218dfd11efa767e2d0ba987d9949fd1
[ "MIT" ]
12
2021-02-02T14:19:30.000Z
2022-03-28T01:23:44.000Z
dataloader/viperlist_train.py
urasakikeisuke/rigidmask
4bb781102218dfd11efa767e2d0ba987d9949fd1
[ "MIT" ]
14
2021-01-13T01:31:34.000Z
2022-01-30T14:48:06.000Z
import torch.utils.data as data from PIL import Image import os import os.path import numpy as np import pdb import glob IMG_EXTENSIONS = [ '.jpg', '.JPG', '.jpeg', '.JPEG', '.png', '.PNG', '.ppm', '.PPM', '.bmp', '.BMP', ] def is_image_file(filename): return any(filename.endswith(extension) for extensi...
24.756757
97
0.634279
0
0
0
0
0
0
0
0
145
0.158297
6a30d65ddcf953ceadcc9809b51e37283b427dac
49
py
Python
floodcomparison/__init__.py
jsosa/floodcomparison
c6662ae9142b4e89c6c05f93adaba49c5d8e4314
[ "Apache-2.0" ]
null
null
null
floodcomparison/__init__.py
jsosa/floodcomparison
c6662ae9142b4e89c6c05f93adaba49c5d8e4314
[ "Apache-2.0" ]
null
null
null
floodcomparison/__init__.py
jsosa/floodcomparison
c6662ae9142b4e89c6c05f93adaba49c5d8e4314
[ "Apache-2.0" ]
null
null
null
from floodcomparison.core import floodcomparison
24.5
48
0.897959
0
0
0
0
0
0
0
0
0
0
6a315f9411feef2bef3f2cfb2fab79f19fe80e02
7,842
py
Python
weaver/wps_restapi/quotation/quotes.py
crim-ca/weaver
107fec5e19f20b77061b9405a764da911d2db8a2
[ "Apache-2.0" ]
16
2019-03-18T12:23:05.000Z
2022-02-25T00:39:11.000Z
weaver/wps_restapi/quotation/quotes.py
crim-ca/weaver
107fec5e19f20b77061b9405a764da911d2db8a2
[ "Apache-2.0" ]
346
2019-03-06T21:05:04.000Z
2022-03-31T13:38:37.000Z
weaver/wps_restapi/quotation/quotes.py
crim-ca/weaver
107fec5e19f20b77061b9405a764da911d2db8a2
[ "Apache-2.0" ]
5
2019-03-15T01:38:28.000Z
2021-11-11T15:38:43.000Z
import logging import random from datetime import timedelta from typing import TYPE_CHECKING from duration import to_iso8601 from pyramid.httpexceptions import HTTPBadRequest, HTTPCreated, HTTPNotFound, HTTPOk from weaver import sort from weaver.config import WEAVER_CONFIGURATION_ADES, WEAVER_CONFIGURATION_EMS, get_w...
43.810056
119
0.718822
0
0
0
0
6,120
0.780413
0
0
1,309
0.166922
6a31701fc7c063904134f212988d1c0c79559f82
6,722
py
Python
pysnmp/CISCO-VSI-CONTROLLER-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/CISCO-VSI-CONTROLLER-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/CISCO-VSI-CONTROLLER-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module CISCO-VSI-CONTROLLER-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-VSI-CONTROLLER-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 18:03:33 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7....
105.03125
883
0.759298
473
0.070366
0
0
0
0
0
0
1,715
0.255132
6a328e84b47f7a5de237d63ba7bea1c7be663611
6,282
py
Python
strava.py
AartGoossens/streamlit-activity-viewer
b43f157d8bee596908c4f2222be9bb0d8bd9b9e8
[ "MIT" ]
4
2021-05-21T11:34:00.000Z
2022-02-17T18:22:06.000Z
strava.py
AartGoossens/streamlit-activity-viewer
b43f157d8bee596908c4f2222be9bb0d8bd9b9e8
[ "MIT" ]
null
null
null
strava.py
AartGoossens/streamlit-activity-viewer
b43f157d8bee596908c4f2222be9bb0d8bd9b9e8
[ "MIT" ]
null
null
null
import base64 import os import arrow import httpx import streamlit as st import sweat from bokeh.models.widgets import Div APP_URL = os.environ["APP_URL"] STRAVA_CLIENT_ID = os.environ["STRAVA_CLIENT_ID"] STRAVA_CLIENT_SECRET = os.environ["STRAVA_CLIENT_SECRET"] STRAVA_AUTHORIZATION_URL = "https://www.strava.com/oau...
27.552632
120
0.641356
0
0
0
0
1,529
0.243394
0
0
1,602
0.255014
6a3376e3801e88076e88946747dfd57658118979
3,395
py
Python
appliance/src/ufw_interface.py
reap3r/nmfta-bouncer
a178244dbf0b8a165aabc02a5d1ba05006f9ec22
[ "Apache-2.0" ]
1
2019-01-10T00:31:09.000Z
2019-01-10T00:31:09.000Z
appliance/src/ufw_interface.py
nmfta-repo/nmfta-bouncer
a178244dbf0b8a165aabc02a5d1ba05006f9ec22
[ "Apache-2.0" ]
21
2019-02-28T14:23:11.000Z
2020-07-07T20:46:37.000Z
appliance/src/ufw_interface.py
nmfta-repo/nmfta-bouncer
a178244dbf0b8a165aabc02a5d1ba05006f9ec22
[ "Apache-2.0" ]
2
2019-05-07T13:16:49.000Z
2020-06-23T13:49:01.000Z
#!/usr/bin/env python #shamelessy stolen from: https://gitlab.com/dhj/easyufw # A thin wrapper over the thin wrapper that is ufw # Usage: # import easyufw as ufw # ufw.disable() # disable firewall # ufw.enable() # enable firewall # ufw.allow() # default allow -- allow all # ufw.allow...
29.267241
77
0.620619
0
0
0
0
0
0
0
0
1,666
0.490722
6a33b81f30e4d4f06b72174eedd941785bd5b519
1,325
py
Python
test/libsalt/test_vehicle.py
etri-city-traffic-brain/traffic-simulator
6d5061febeaef484388b2b5aee14d9894099d98a
[ "Apache-2.0" ]
8
2020-08-27T05:44:05.000Z
2021-12-27T05:11:17.000Z
test/libsalt/test_vehicle.py
etri-city-traffic-brain/traffic-simulator
6d5061febeaef484388b2b5aee14d9894099d98a
[ "Apache-2.0" ]
null
null
null
test/libsalt/test_vehicle.py
etri-city-traffic-brain/traffic-simulator
6d5061febeaef484388b2b5aee14d9894099d98a
[ "Apache-2.0" ]
1
2020-11-27T05:17:29.000Z
2020-11-27T05:17:29.000Z
import libsalt def test(salt_scenario): libsalt.start(salt_scenario) libsalt.setCurrentStep(25200) step = libsalt.getCurrentStep() while step <= 36000: if (step % 100 == 0): print("Simulation Step: ", step) test_funcs() libsalt.simulationStep() step = li...
33.125
101
0.648302
0
0
0
0
0
0
0
0
692
0.522264
6a35d2e3dec4c05f542fce0db1d5d23465661584
8,348
py
Python
Masters/Copy Layer to Layer.py
davidtahim/Glyphs-Scripts
5ed28805b5fe03c63d904ad2f79117844c22aa44
[ "Apache-2.0" ]
1
2021-09-04T18:41:30.000Z
2021-09-04T18:41:30.000Z
Masters/Copy Layer to Layer.py
davidtahim/Glyphs-Scripts
5ed28805b5fe03c63d904ad2f79117844c22aa44
[ "Apache-2.0" ]
null
null
null
Masters/Copy Layer to Layer.py
davidtahim/Glyphs-Scripts
5ed28805b5fe03c63d904ad2f79117844c22aa44
[ "Apache-2.0" ]
null
null
null
#MenuTitle: Copy Layer to Layer # -*- coding: utf-8 -*- __doc__=""" Copies one master to another master in selected glyphs. """ import GlyphsApp import vanilla import math def getComponentScaleX_scaleY_rotation( self ): a = self.transform[0] b = self.transform[1] c = self.transform[2] d = self.transform[3] ...
36.295652
152
0.713464
7,770
0.930762
0
0
0
0
0
0
1,923
0.230355
6a362d5ac32fdf3188152eb3fc2c0b00c7db0458
3,080
py
Python
vunit/test/unit/test_tokenizer.py
bjacobs1/vunit
a7f7717a172855ea7852296bb768370d50cfc992
[ "Artistic-2.0" ]
1
2020-08-30T08:30:02.000Z
2020-08-30T08:30:02.000Z
vunit/test/unit/test_tokenizer.py
smgl9/vunit
9933d9a1ae600cc241894244361282dd7f7227d7
[ "Artistic-2.0" ]
null
null
null
vunit/test/unit/test_tokenizer.py
smgl9/vunit
9933d9a1ae600cc241894244361282dd7f7227d7
[ "Artistic-2.0" ]
null
null
null
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright (c) 2014-2018, Lars Asplund [email protected] """ Test of the general tokenizer """ from unit...
24.64
98
0.622727
1,629
0.528896
0
0
0
0
0
0
935
0.303571
6a3682a6dc34888138320be2d7fc9fac096c4fc7
1,962
py
Python
modules/star_se_SP.py
tbersez/Allmine
092fb1f5abcb4fd4e40b4a25386f05ecb2dea55b
[ "MIT" ]
5
2019-02-13T13:47:24.000Z
2019-04-27T18:27:03.000Z
modules/star_se_SP.py
tbersez/Allmine
092fb1f5abcb4fd4e40b4a25386f05ecb2dea55b
[ "MIT" ]
null
null
null
modules/star_se_SP.py
tbersez/Allmine
092fb1f5abcb4fd4e40b4a25386f05ecb2dea55b
[ "MIT" ]
null
null
null
# STAR aligner single end mode, second pass # # This module runs the second pass of the STAR aligner 2 path # strategy. The goal is to align reads taking in account splice # junction found in the fist pass.. # # Inputs: # - sample_trim.fastq.gz # - splicing junction files (.tab) # # Output: # ...
34.421053
73
0.5316
0
0
0
0
0
0
0
0
1,521
0.775229
6a36b0c35f3000da705fd087f744d451ba48d8fd
531
py
Python
Udemy/REST-Django-VueJS/C3-practice/03-demo/job_board/jobs/models.py
runzezhang/MOOCs
8df8c7adc5af3d7b085be01ae9b6963fe33acd68
[ "Apache-2.0" ]
3
2019-04-05T18:59:53.000Z
2020-09-24T09:05:46.000Z
Udemy/REST-Django-VueJS/C3-practice/03-demo/job_board/jobs/models.py
runzezhang/MOOCs
8df8c7adc5af3d7b085be01ae9b6963fe33acd68
[ "Apache-2.0" ]
null
null
null
Udemy/REST-Django-VueJS/C3-practice/03-demo/job_board/jobs/models.py
runzezhang/MOOCs
8df8c7adc5af3d7b085be01ae9b6963fe33acd68
[ "Apache-2.0" ]
1
2019-02-10T13:35:36.000Z
2019-02-10T13:35:36.000Z
from django.db import models class JobOffer(models.Model): company_name = models.CharField(max_length=50) company_email = models.EmailField() job_title = models.CharField(max_length=60) job_description = models.TextField() salary = models.PositiveIntegerField() city = models.CharField(max_leng...
31.235294
52
0.73823
499
0.939736
0
0
0
0
0
0
0
0
6a3701a8c1a4900d3599d12821235a51d12e4737
4,926
py
Python
memeapp/views.py
barbaramootian/Memes-app
4ffa2da997758ee4f35dc21e755e3db242b8654f
[ "MIT", "Unlicense" ]
null
null
null
memeapp/views.py
barbaramootian/Memes-app
4ffa2da997758ee4f35dc21e755e3db242b8654f
[ "MIT", "Unlicense" ]
null
null
null
memeapp/views.py
barbaramootian/Memes-app
4ffa2da997758ee4f35dc21e755e3db242b8654f
[ "MIT", "Unlicense" ]
null
null
null
from django.shortcuts import render,redirect from django.contrib.auth.models import User from django.contrib import messages from .forms import PictureUploadForm,CommentForm from .models import Image,Profile,Likes,Comments from django.contrib.auth.decorators import login_required from django.contrib .auth import authen...
35.695652
108
0.664434
0
0
0
0
2,374
0.481933
0
0
692
0.140479
6a3712991b980a6711c1dba6adf131ce5c5af892
4,997
py
Python
sparv/modules/hist/diapivot.py
spraakbanken/sparv-pipeline
7293d42c577afdaf01ce8a936743f8b83d6eb962
[ "MIT" ]
17
2018-09-21T07:01:45.000Z
2022-02-24T23:26:49.000Z
sparv/modules/hist/diapivot.py
spraakbanken/sparv-pipeline
7293d42c577afdaf01ce8a936743f8b83d6eb962
[ "MIT" ]
146
2018-11-13T19:13:25.000Z
2022-03-31T09:57:56.000Z
sparv/modules/hist/diapivot.py
spraakbanken/sparv-pipeline
7293d42c577afdaf01ce8a936743f8b83d6eb962
[ "MIT" ]
5
2019-02-14T00:50:38.000Z
2021-03-29T15:37:41.000Z
"""Create diapivot annotation.""" import logging import pickle import xml.etree.ElementTree as etree import sparv.util as util from sparv import Annotation, Model, ModelOutput, Output, annotator, modelbuilder log = logging.getLogger(__name__) PART_DELIM1 = "^1" # @annotator("Diapivot annotation", language=["swe-1...
33.313333
119
0.58295
965
0.193077
0
0
0
0
0
0
1,792
0.358543
6a37f82fb39de7a27271cf8fb84d1b4b6b384c9f
534
py
Python
src/xbot/util/path.py
xinyang178/xbot
dad1fc67062dc6fd21802899fd68f7eb91c96569
[ "MIT" ]
77
2020-10-27T12:19:01.000Z
2022-03-16T09:13:17.000Z
src/xbot/util/path.py
xinyang178/xbot
dad1fc67062dc6fd21802899fd68f7eb91c96569
[ "MIT" ]
7
2020-12-09T14:05:07.000Z
2021-04-28T02:37:05.000Z
src/xbot/util/path.py
xinyang178/xbot
dad1fc67062dc6fd21802899fd68f7eb91c96569
[ "MIT" ]
45
2020-09-24T07:28:32.000Z
2022-03-03T17:09:04.000Z
import os def get_root_path(): current_path = os.path.abspath(os.path.dirname(__file__)) root_path = os.path.dirname( os.path.dirname(os.path.dirname(os.path.dirname(current_path))) ) return os.path.join(root_path, "xbot") def get_config_path(): config_path = os.path.abspath(os.path.join...
24.272727
87
0.666667
0
0
0
0
0
0
0
0
33
0.061798
6a3848493b2b327c8b213a833273765a92b0f3b9
274
py
Python
home/website/wagtail_hooks.py
HackSoftware/hackconf.bg
ab3cc9fcdccf8991098553e0374103e3a241ce50
[ "MIT" ]
12
2017-03-29T11:55:20.000Z
2022-03-29T20:03:41.000Z
kdl_wagtail/wagtail_hooks.py
kingsdigitallab/archetype-django
6315c8f38e873e2d3b2d99fcfd47d01ce0ae35bc
[ "MIT" ]
8
2020-06-05T18:16:24.000Z
2021-09-07T23:53:11.000Z
kdl_wagtail/wagtail_hooks.py
kingsdigitallab/archetype-django
6315c8f38e873e2d3b2d99fcfd47d01ce0ae35bc
[ "MIT" ]
2
2018-03-31T15:06:55.000Z
2019-06-25T16:22:08.000Z
from django.utils.html import format_html from wagtail.wagtailcore import hooks @hooks.register('insert_editor_js') def enable_source(): return format_html( """ <script> registerHalloPlugin('hallohtml'); </script> """ )
19.571429
45
0.624088
0
0
0
0
191
0.69708
0
0
114
0.416058
6a388679dce82d3f7e5c312799aab790d1280f39
440
py
Python
src/reporter/tests/test_api.py
msgis/ngsi-timeseries-api
5cc7a8beab748cecfd5fba61740f3730361d4e31
[ "MIT" ]
null
null
null
src/reporter/tests/test_api.py
msgis/ngsi-timeseries-api
5cc7a8beab748cecfd5fba61740f3730361d4e31
[ "MIT" ]
null
null
null
src/reporter/tests/test_api.py
msgis/ngsi-timeseries-api
5cc7a8beab748cecfd5fba61740f3730361d4e31
[ "MIT" ]
null
null
null
from conftest import QL_URL import requests def test_api(): api_url = "{}/".format(QL_URL) r = requests.get('{}'.format(api_url)) assert r.status_code == 200, r.text assert r.json() == { "notify_url": "/v2/notify", "subscriptions_url": "/v2/subscriptions", "entities_...
29.333333
53
0.543182
0
0
0
0
0
0
0
0
148
0.336364
6a38ce0ec26e60d5ad5f137d860bd186bef4c8e7
1,981
py
Python
zorg/buildbot/conditions/FileConditions.py
dyung/llvm-zorg
42cd139968388b14323975647faf322c99945986
[ "Apache-2.0" ]
27
2019-01-15T03:03:58.000Z
2022-03-22T23:31:36.000Z
zorg/buildbot/conditions/FileConditions.py
dyung/llvm-zorg
42cd139968388b14323975647faf322c99945986
[ "Apache-2.0" ]
21
2020-05-29T01:12:26.000Z
2022-03-29T20:06:22.000Z
zorg/buildbot/conditions/FileConditions.py
dyung/llvm-zorg
42cd139968388b14323975647faf322c99945986
[ "Apache-2.0" ]
38
2019-02-10T02:46:33.000Z
2022-03-26T10:27:29.000Z
from buildbot.process.remotecommand import RemoteCommand from buildbot.interfaces import WorkerTooOldError import stat class FileExists(object): """I check a file existence on the worker. I return True if the file with the given name exists, False if the file does not exist or that is a directory. Us...
30.476923
78
0.655729
1,856
0.936901
0
0
0
0
0
0
819
0.413428
6a39601bd5d34aa0ef10ce85dcff9883e1a2620c
6,349
py
Python
gym_combat/gym_combat/envs/main.py
refaev/combat_gym
f02fcf98e95a1dda29cdddd4ae271de3e18ea3bf
[ "MIT" ]
null
null
null
gym_combat/gym_combat/envs/main.py
refaev/combat_gym
f02fcf98e95a1dda29cdddd4ae271de3e18ea3bf
[ "MIT" ]
null
null
null
gym_combat/gym_combat/envs/main.py
refaev/combat_gym
f02fcf98e95a1dda29cdddd4ae271de3e18ea3bf
[ "MIT" ]
null
null
null
from matplotlib import style from tqdm import tqdm style.use("ggplot") from gym_combat.envs.Arena.CState import State from gym_combat.envs.Arena.Entity import Entity from gym_combat.envs.Arena.Environment import Environment, Episode from gym_combat.envs.Common.constants import * from gym_combat.envs.Qtable import Qtab...
42.326667
229
0.723106
0
0
0
0
0
0
0
0
1,201
0.189164
6a3afdedc7e9000d89eef5155bbd1cbb9eab9c08
4,132
py
Python
libqif/core/hyper.py
ramongonze/libqif
57be74a2342a303da5415a3d787855b8115e58f8
[ "MIT" ]
2
2021-10-16T17:34:58.000Z
2021-11-16T16:15:13.000Z
libqif/core/hyper.py
ramongonze/libqif
57be74a2342a303da5415a3d787855b8115e58f8
[ "MIT" ]
null
null
null
libqif/core/hyper.py
ramongonze/libqif
57be74a2342a303da5415a3d787855b8115e58f8
[ "MIT" ]
null
null
null
"""Hyper-distributions.""" from libqif.core.secrets import Secrets from libqif.core.channel import Channel from numpy import array, arange, zeros from numpy import delete as npdelete class Hyper: def __init__(self, channel): """Hyper-distribution. To create an instance of this class it is class i...
37.225225
114
0.609874
3,938
0.953049
0
0
0
0
0
0
1,895
0.458616
6a3b1a3262144d987829d88570c7ef9a23bfd4a5
53,568
py
Python
ansible/venv/lib/python2.7/site-packages/ansible/modules/network/fortios/fortios_system_virtual_wan_link.py
gvashchenkolineate/gvashchenkolineate_infra_trytravis
0fb18850afe0d8609693ba4b23f29c7cda17d97f
[ "MIT" ]
17
2017-06-07T23:15:01.000Z
2021-08-30T14:32:36.000Z
ansible/venv/lib/python2.7/site-packages/ansible/modules/network/fortios/fortios_system_virtual_wan_link.py
gvashchenkolineate/gvashchenkolineate_infra_trytravis
0fb18850afe0d8609693ba4b23f29c7cda17d97f
[ "MIT" ]
32
2018-10-09T04:13:42.000Z
2020-05-11T07:20:28.000Z
ansible/venv/lib/python2.7/site-packages/ansible/modules/network/fortios/fortios_system_virtual_wan_link.py
gvashchenkolineate/gvashchenkolineate_infra_trytravis
0fb18850afe0d8609693ba4b23f29c7cda17d97f
[ "MIT" ]
11
2018-10-09T00:14:53.000Z
2021-11-03T10:54:09.000Z
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
45.823781
158
0.396823
0
0
0
0
0
0
0
0
40,661
0.759054
6a3d5a0b8814fbb4a8dcce839502382dcb8efe0a
1,120
py
Python
src/Puerta.py
victorlujan/Dise-odeSoftwarePatrones
b9845cc1c4abdc44867c90b9e9784246e57f16b3
[ "MIT" ]
null
null
null
src/Puerta.py
victorlujan/Dise-odeSoftwarePatrones
b9845cc1c4abdc44867c90b9e9784246e57f16b3
[ "MIT" ]
null
null
null
src/Puerta.py
victorlujan/Dise-odeSoftwarePatrones
b9845cc1c4abdc44867c90b9e9784246e57f16b3
[ "MIT" ]
null
null
null
from ElementoMapa import ElementoMapa class Puerta (ElementoMapa): def __init__(self): self.abierta= True self.lado2=None self.lado1=None def get_abierta(self): return self.abierta def print_cosas(self): print("hola") def set_abierta(self, value): self.ab...
24.347826
101
0.583036
1,078
0.9625
0
0
0
0
0
0
83
0.074107
6a3f937a42b26dd8a8d5325705ad3a6b2426f5e8
2,421
py
Python
pong.py
Teenahshe/ponggame
5e4032753894ce1e1ebeb51841676aac24aa22df
[ "MIT" ]
null
null
null
pong.py
Teenahshe/ponggame
5e4032753894ce1e1ebeb51841676aac24aa22df
[ "MIT" ]
null
null
null
pong.py
Teenahshe/ponggame
5e4032753894ce1e1ebeb51841676aac24aa22df
[ "MIT" ]
null
null
null
""" # Step 1 - Create the App # Step 2 - Create the Game # Step 3 - Build the Game # Step 4 - Run the App """ from kivy.app import App from kivy.uix.widget import Widget from kivy.properties import NumericProperty, ReferenceListProperty, ObjectProperty from kivy.vector import Vector from kivy.clock import C...
28.482353
83
0.620818
1,750
0.722842
0
0
0
0
0
0
573
0.236679
6a3f9be772e906ade3549d2b743f072bfd37aa55
245
py
Python
get_block_data/relation.py
cyclone923/blocks-world
808127e6b4fde2a9cb499cf6934db7ff73e2f534
[ "Apache-2.0", "BSD-3-Clause" ]
1
2021-05-19T10:58:54.000Z
2021-05-19T10:58:54.000Z
get_block_data/relation.py
cyclone923/blocks-world
808127e6b4fde2a9cb499cf6934db7ff73e2f534
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
get_block_data/relation.py
cyclone923/blocks-world
808127e6b4fde2a9cb499cf6934db7ff73e2f534
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
class SceneRelation: def __init__(self): self.on_ground = set() self.on_block = {} self.clear = set() def print_relation(self): print(self.on_ground) print(self.on_block) print(self.clear)
24.5
30
0.583673
245
1
0
0
0
0
0
0
0
0
6a3fb6dff04d4cee8ea3de55fdb86c079b4a97dc
18,713
py
Python
bridge_RL_agent_v16.py
EricZLou/BridgeRLAgent
78329eec5fcf320d2850f44dc33b138919fba82d
[ "MIT" ]
null
null
null
bridge_RL_agent_v16.py
EricZLou/BridgeRLAgent
78329eec5fcf320d2850f44dc33b138919fba82d
[ "MIT" ]
null
null
null
bridge_RL_agent_v16.py
EricZLou/BridgeRLAgent
78329eec5fcf320d2850f44dc33b138919fba82d
[ "MIT" ]
null
null
null
""" CS 238 Final Project: Bridge RL Agent Eric Lou & Kimberly Tran """ import copy import datetime import numpy as np import random from collections import namedtuple """''''''''''''''''''''''''''''''''''''''''''''''''''''''''' REPRESENTATIONS OF BRIDGE Representing a "Card" as an integer: Cards 0 -> 12 are Club...
37.880567
141
0.579276
7,510
0.401325
0
0
0
0
0
0
7,038
0.376102
6a40e4db387ff19b81d94d3c6d3164793744fc01
1,411
py
Python
tests/hacsbase/test_hacsbase_data.py
chbonkie/hacs
81db513a0d3d1af1acf25da7b706ae62d8fdb6fa
[ "MIT" ]
2
2019-06-18T11:30:53.000Z
2019-10-03T21:34:11.000Z
tests/hacsbase/test_hacsbase_data.py
chbonkie/hacs
81db513a0d3d1af1acf25da7b706ae62d8fdb6fa
[ "MIT" ]
341
2019-06-18T11:30:55.000Z
2021-07-15T05:38:46.000Z
tests/hacsbase/test_hacsbase_data.py
chbonkie/hacs
81db513a0d3d1af1acf25da7b706ae62d8fdb6fa
[ "MIT" ]
null
null
null
"""Data Test Suite.""" from aiogithubapi.objects import repository import pytest import os from homeassistant.core import HomeAssistant from custom_components.hacs.hacsbase.data import HacsData from custom_components.hacs.helpers.classes.repository import HacsRepository from custom_components.hacs.hacsbase.configuratio...
30.021277
76
0.763997
0
0
0
0
951
0.67399
888
0.629341
25
0.017718
6a415615b9b2bc4e4bdf10ab3d417314a169e277
44,836
py
Python
phi/math/backend/_backend.py
marc-gav/PhiFlow
b6186fd1503d040997b52d49aa18cd875267c27e
[ "MIT" ]
null
null
null
phi/math/backend/_backend.py
marc-gav/PhiFlow
b6186fd1503d040997b52d49aa18cd875267c27e
[ "MIT" ]
null
null
null
phi/math/backend/_backend.py
marc-gav/PhiFlow
b6186fd1503d040997b52d49aa18cd875267c27e
[ "MIT" ]
null
null
null
from collections import namedtuple from contextlib import contextmanager from threading import Barrier from typing import List, Callable import numpy from ._dtype import DType, combine_types SolveResult = namedtuple('SolveResult', [ 'method', 'x', 'residual', 'iterations', 'function_evaluations', 'converged', '...
37.677311
216
0.629293
38,547
0.859676
413
0.009211
1,074
0.023952
0
0
18,379
0.409889
6a42b37643b67ad750eaa6bdb4b138eb04976787
2,736
py
Python
bpython/curtsiesfrontend/parse.py
dtrodrigues/bpython
143e4e55d8f5227149528a5880a32a516a40f14d
[ "PSF-2.0" ]
2,168
2015-01-01T11:41:40.000Z
2022-03-29T07:44:48.000Z
bpython/curtsiesfrontend/parse.py
dtrodrigues/bpython
143e4e55d8f5227149528a5880a32a516a40f14d
[ "PSF-2.0" ]
521
2015-01-02T16:43:44.000Z
2022-03-31T12:37:55.000Z
bpython/curtsiesfrontend/parse.py
dtrodrigues/bpython
143e4e55d8f5227149528a5880a32a516a40f14d
[ "PSF-2.0" ]
250
2015-01-08T21:28:18.000Z
2022-02-28T16:07:43.000Z
import re from curtsies.formatstring import fmtstr, FmtStr from curtsies.termformatconstants import ( FG_COLORS, BG_COLORS, colors as CURTSIES_COLORS, ) from functools import partial from ..lazyre import LazyReCompile COLORS = CURTSIES_COLORS + ("default",) CNAMES = dict(zip("krgybmcwd", COLORS)) # hack...
25.811321
75
0.592105
0
0
0
0
0
0
0
0
665
0.243056
6a42bb37de5c18887c2934162db7f55a1fffd8c4
1,277
py
Python
sarpy/io/general/nitf_elements/tres/unclass/BANDSA.py
pressler-vsc/sarpy
fa6c951c42b9a7d9df2edfa53c771494cb0246fb
[ "MIT" ]
1
2021-02-04T08:44:18.000Z
2021-02-04T08:44:18.000Z
sarpy/io/general/nitf_elements/tres/unclass/BANDSA.py
pressler-vsc/sarpy
fa6c951c42b9a7d9df2edfa53c771494cb0246fb
[ "MIT" ]
null
null
null
sarpy/io/general/nitf_elements/tres/unclass/BANDSA.py
pressler-vsc/sarpy
fa6c951c42b9a7d9df2edfa53c771494cb0246fb
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from ..tre_elements import TREExtension, TREElement __classification__ = "UNCLASSIFIED" __author__ = "Thomas McCullough" class BAND(TREElement): def __init__(self, value): super(BAND, self).__init__() self.add_field('BANDPEAK', 's', 5, value) self.add_field('BANDL...
33.605263
59
0.623336
1,121
0.877839
0
0
0
0
0
0
302
0.236492
6a4363b0709ea506c58a60f1aaca731beda241f8
5,631
py
Python
ktrain/graph/learner.py
husmen/ktrain
4147b0bd146deb513c6f94505908294a5163efac
[ "Apache-2.0" ]
1,013
2019-06-04T14:25:24.000Z
2022-03-26T05:52:00.000Z
ktrain/graph/learner.py
husmen/ktrain
4147b0bd146deb513c6f94505908294a5163efac
[ "Apache-2.0" ]
427
2019-06-17T13:45:50.000Z
2022-03-25T16:23:49.000Z
ktrain/graph/learner.py
husmen/ktrain
4147b0bd146deb513c6f94505908294a5163efac
[ "Apache-2.0" ]
272
2019-06-05T03:19:07.000Z
2022-03-28T02:23:37.000Z
from ..imports import * from .. import utils as U from ..core import GenLearner class NodeClassLearner(GenLearner): """ ``` Main class used to tune and train Keras models for node classification Main parameters are: model (Model): A compiled instance of keras.engine.training.Model train_dat...
35.19375
96
0.582845
5,541
0.984017
0
0
0
0
0
0
3,208
0.569703
6a448dff56ffb800e61093b735c0b738b7008227
12,168
py
Python
VegaZero2VegaLite.py
Thanksyy/Vega-Zero
dd25cb145faec047b01ca54c69ba96c56adb99f4
[ "MIT" ]
5
2021-09-16T11:55:12.000Z
2022-03-03T12:20:22.000Z
VegaZero2VegaLite.py
Thanksyy/Vega-Zero
dd25cb145faec047b01ca54c69ba96c56adb99f4
[ "MIT" ]
1
2021-11-22T09:41:52.000Z
2021-11-24T02:25:49.000Z
VegaZero2VegaLite.py
Thanksyy/Vega-Zero
dd25cb145faec047b01ca54c69ba96c56adb99f4
[ "MIT" ]
2
2021-09-17T09:44:18.000Z
2022-03-05T19:14:45.000Z
__author__ = "Yuyu Luo" import json import pandas class VegaZero2VegaLite(object): def __init__(self): pass def parse_vegaZero(self, vega_zero): self.parsed_vegaZero = { 'mark': '', 'data': '', 'encoding': { 'x': '', 'y': { ...
48.094862
123
0.469921
12,122
0.995565
0
0
0
0
0
0
3,207
0.263387
6a452a7c2c457bc63abb482a8725d53337bd5e88
6,254
py
Python
utils/dancer.py
kmzbrnoI/ac-python
383802734e17d2a00c0b86083cf923517db02acd
[ "Apache-2.0" ]
null
null
null
utils/dancer.py
kmzbrnoI/ac-python
383802734e17d2a00c0b86083cf923517db02acd
[ "Apache-2.0" ]
2
2020-04-12T11:31:24.000Z
2020-04-14T17:17:00.000Z
utils/dancer.py
kmzbrnoI/ac-python
383802734e17d2a00c0b86083cf923517db02acd
[ "Apache-2.0" ]
null
null
null
"""Library for executing user-defined dance.""" import logging from typing import Any, Dict, Optional, Callable import datetime import ac import ac.blocks from ac import ACs, AC JC = Dict[str, Any] class DanceStartException(Exception): pass class Step: """Base class for all specific dance steps.""" ...
28.820276
79
0.570675
5,748
0.917332
0
0
180
0.028726
0
0
840
0.134057
6a46dce57aefdfdd686c732c07a762fc3d1085f3
780
py
Python
praw/models/reddit/mixins/reportable.py
zachwylde00/praw
ad1d73e6a4a33397bbd983bdfde1a4f99ce5607d
[ "BSD-2-Clause" ]
38
2020-03-14T22:22:40.000Z
2022-02-24T18:05:45.000Z
praw/models/reddit/mixins/reportable.py
zachwylde00/praw
ad1d73e6a4a33397bbd983bdfde1a4f99ce5607d
[ "BSD-2-Clause" ]
3
2021-03-30T13:15:12.000Z
2021-09-22T18:55:59.000Z
praw/models/reddit/mixins/reportable.py
zachwylde00/praw
ad1d73e6a4a33397bbd983bdfde1a4f99ce5607d
[ "BSD-2-Clause" ]
9
2020-02-21T23:55:13.000Z
2021-03-22T07:48:23.000Z
"""Provide the ReportableMixin class.""" from ....const import API_PATH class ReportableMixin: """Interface for RedditBase classes that can be reported.""" def report(self, reason): """Report this object to the moderators of its subreddit. :param reason: The reason for reporting. Ra...
26
76
0.60641
705
0.903846
0
0
0
0
0
0
584
0.748718
6a49a67108b03dc7cb60670594dde145fc227190
218
py
Python
defense/jpeg_compress.py
TrustworthyDL/LeBA
3289c1330585f438dc5b931951cbb682c5513053
[ "Apache-2.0" ]
19
2020-10-20T10:17:50.000Z
2022-03-27T10:56:08.000Z
defense/jpeg_compress.py
TrustworthyDL/LeBA
3289c1330585f438dc5b931951cbb682c5513053
[ "Apache-2.0" ]
3
2020-11-03T03:08:54.000Z
2021-01-08T02:38:09.000Z
defense/jpeg_compress.py
TrustworthyDL/LeBA
3289c1330585f438dc5b931951cbb682c5513053
[ "Apache-2.0" ]
4
2020-12-14T06:52:00.000Z
2022-01-25T07:58:22.000Z
def _jpeg_compression(im): assert torch.is_tensor(im) im = ToPILImage()(im) savepath = BytesIO() im.save(savepath, 'JPEG', quality=75) im = Image.open(savepath) im = ToTensor()(im) return im
27.25
41
0.637615
0
0
0
0
0
0
0
0
6
0.027523
6a49b924a41db77163a887ba4fb25f3e874556fc
3,158
py
Python
mellon/factories/filesystem/file.py
LaudateCorpus1/mellon
a7a9f6d8abf1dd03b63a94ddb4439c6cc6c2e272
[ "MIT" ]
5
2016-12-20T19:39:01.000Z
2021-01-08T16:19:17.000Z
mellon/factories/filesystem/file.py
CrowdStrike/mellon
7216f255d397a41b1c2777a1b02f1c085d07ddfe
[ "MIT" ]
1
2018-03-21T17:05:13.000Z
2018-03-21T17:05:13.000Z
mellon/factories/filesystem/file.py
LaudateCorpus1/mellon
a7a9f6d8abf1dd03b63a94ddb4439c6cc6c2e272
[ "MIT" ]
2
2017-11-01T15:03:27.000Z
2018-11-13T03:04:44.000Z
import collections import os.path from zope import component from zope import interface from zope.component.factory import Factory from sparc.configuration import container import mellon @interface.implementer(mellon.IByteMellonFile) class MellonByteFileFromFilePathAndConfig(object): def __init__(self, file_p...
39.974684
111
0.662445
2,404
0.761241
1,414
0.447752
2,552
0.808106
0
0
609
0.192844
6a49d502d09956cefd00c54538889163bfebf8f9
1,157
py
Python
dltb/thirdparty/datasource/__init__.py
CogSciUOS/DeepLearningToolbox
bf07578b9486d8c48e25df357bc4b9963b513b46
[ "MIT" ]
2
2019-09-01T01:38:59.000Z
2020-02-13T19:25:51.000Z
dltb/thirdparty/datasource/__init__.py
CogSciUOS/DeepLearningToolbox
bf07578b9486d8c48e25df357bc4b9963b513b46
[ "MIT" ]
null
null
null
dltb/thirdparty/datasource/__init__.py
CogSciUOS/DeepLearningToolbox
bf07578b9486d8c48e25df357bc4b9963b513b46
[ "MIT" ]
null
null
null
"""Predefined Datasources. """ # toolbox imports from ...datasource import Datasource Datasource.register_instance('imagenet-val', __name__ + '.imagenet', 'ImageNet', section='val') # section='train' Datasource.register_instance('dogsandcats', __name__ + '.dogsandcats', ...
48.208333
79
0.679343
0
0
0
0
0
0
0
0
426
0.368194
6a4a66b1a2f63505cf706ff9fb8521db9d0bf0ee
2,127
py
Python
tests/test_results.py
babinyurii/RECAN
b49326b47bae22316c3776fee2f398e09a98ba96
[ "MIT" ]
7
2019-09-23T12:46:03.000Z
2022-02-16T11:32:58.000Z
tests/test_results.py
babinyurii/RECAN
b49326b47bae22316c3776fee2f398e09a98ba96
[ "MIT" ]
14
2020-01-28T16:20:15.000Z
2021-04-13T17:24:00.000Z
tests/test_results.py
babinyurii/RECAN
b49326b47bae22316c3776fee2f398e09a98ba96
[ "MIT" ]
8
2020-01-03T11:47:51.000Z
2021-09-17T03:43:43.000Z
# -*- coding: utf-8 -*- """ Created on Tue Oct 22 15:58:44 2019 @author: babin """ posits_def = [251, 501, 751, 1001, 1251, 1501, 1751, 2001, 2251, 2501, 2751, 3001, 3215] dist_whole_align_ref = {'AB048704.1_genotype_C_': [0.88, 0.938, 0.914, 0.886, 0.89, 0.908, 0.938, 0.948, 0.948, 0.886, 0.8...
15.302158
88
0.608839
0
0
0
0
0
0
0
0
199
0.093559
6a4a72c7391f2894d44f2f4cea661cdcb3c4d282
4,999
py
Python
lxmls/readers/simple_data_set.py
SimonSuster/lxmls-toolkit
6a57884f8b7c98da816a60eb88593e0a1585d434
[ "MIT" ]
1
2015-09-20T05:16:38.000Z
2015-09-20T05:16:38.000Z
lxmls/readers/simple_data_set.py
daviddao/LxMLS-labs-solution
78413c1ee61752ca33988c454e3b2c27326e7063
[ "MIT" ]
null
null
null
lxmls/readers/simple_data_set.py
daviddao/LxMLS-labs-solution
78413c1ee61752ca33988c454e3b2c27326e7063
[ "MIT" ]
null
null
null
import numpy as np # This class generates a 2D dataset with two classes, "positive" and "negative". # Each class follows a Gaussian distribution. class SimpleDataSet(): ''' A simple two dimentional dataset for visualization purposes. The date set contains points from two gaussians with mean u_i and std_i''' d...
43.469565
327
0.595319
4,139
0.827966
0
0
0
0
0
0
720
0.144029
6a4a8d86cea615c452f20cba99db27d3430077bf
4,840
py
Python
set1/c06_attack_repeating_key_xor.py
kangtastic/cryptopals
7014a08b836b3f9ebfdc889123ccf67406738dac
[ "WTFPL" ]
1
2021-07-05T09:13:48.000Z
2021-07-05T09:13:48.000Z
set1/c06_attack_repeating_key_xor.py
kangtastic/cryptopals
7014a08b836b3f9ebfdc889123ccf67406738dac
[ "WTFPL" ]
null
null
null
set1/c06_attack_repeating_key_xor.py
kangtastic/cryptopals
7014a08b836b3f9ebfdc889123ccf67406738dac
[ "WTFPL" ]
1
2020-04-18T19:53:02.000Z
2020-04-18T19:53:02.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Break repeating-key XOR # # It is officially on, now. # # This challenge isn't conceptually hard, but it involves actual # error-prone coding. The other challenges in this set are there to bring # you up to speed. This one is there to qualify you. If you can do t...
32.266667
94
0.667355
0
0
0
0
0
0
0
0
3,070
0.634166
6a4a939ebfe3446641070ee1531f5dae14b39a3f
26,798
py
Python
c2nl/models/transformer.py
kopf-yhs/ncscos
8248aaad32d4d19c01d070bf0dfba7aab849ba1d
[ "MIT" ]
22
2021-05-22T19:58:39.000Z
2022-03-20T03:43:51.000Z
c2nl/models/transformer.py
kopf-yhs/ncscos
8248aaad32d4d19c01d070bf0dfba7aab849ba1d
[ "MIT" ]
1
2021-07-17T13:15:33.000Z
2022-02-24T13:59:14.000Z
c2nl/models/transformer.py
kopf-yhs/ncscos
8248aaad32d4d19c01d070bf0dfba7aab849ba1d
[ "MIT" ]
2
2021-05-10T05:18:00.000Z
2022-02-24T19:01:50.000Z
import torch import torch.nn as nn import torch.nn.functional as f from prettytable import PrettyTable from c2nl.modules.char_embedding import CharEmbedding from c2nl.modules.embeddings import Embeddings from c2nl.modules.highway import Highway from c2nl.encoders.transformer import TransformerEncoder from c2nl.decoder...
42.334913
98
0.504926
26,211
0.978095
0
0
0
0
0
0
2,275
0.084894
6a4c4690f289d0da27d1fd0d344a2302e88669f6
3,344
py
Python
cattle/plugins/docker/delegate.py
cjellick/python-agent
6991369e309d050a43cba770df6e8ddd758f671d
[ "Apache-2.0" ]
8
2015-07-20T15:29:25.000Z
2018-06-27T13:30:13.000Z
cattle/plugins/docker/delegate.py
cjellick/python-agent
6991369e309d050a43cba770df6e8ddd758f671d
[ "Apache-2.0" ]
47
2015-07-13T23:47:35.000Z
2020-07-31T16:06:34.000Z
cattle/plugins/docker/delegate.py
cjellick/python-agent
6991369e309d050a43cba770df6e8ddd758f671d
[ "Apache-2.0" ]
21
2015-08-21T01:58:47.000Z
2021-01-24T11:59:25.000Z
import logging from cattle import Config from cattle.utils import reply, popen from .compute import DockerCompute from cattle.agent.handler import BaseHandler from cattle.progress import Progress from cattle.type_manager import get_type, MARSHALLER from . import docker_client import subprocess import os import time ...
27.636364
78
0.535287
1,453
0.43451
0
0
0
0
0
0
413
0.123505
6a4da8a95b67b63d32309af5c23df6977103484a
6,391
py
Python
bitraider/strategy.py
ehickox2012/bitraider
dcc695b93dc1c22415780e3f5ff9f7ee29d6988c
[ "MIT" ]
2
2015-03-05T22:28:43.000Z
2015-03-12T23:07:54.000Z
bitraider/strategy.py
ehickox/bitraider
dcc695b93dc1c22415780e3f5ff9f7ee29d6988c
[ "MIT" ]
2
2015-04-05T21:13:59.000Z
2015-04-05T21:16:05.000Z
bitraider/strategy.py
ehickox/bitraider
dcc695b93dc1c22415780e3f5ff9f7ee29d6988c
[ "MIT" ]
1
2015-08-16T18:53:00.000Z
2015-08-16T18:53:00.000Z
import sys import pytz #import xml.utils.iso8601 import time import numpy from datetime import date, datetime, timedelta from matplotlib import pyplot as plt from exchange import cb_exchange as cb_exchange from exchange import CoinbaseExchangeAuth from abc import ABCMeta, abstractmethod class strategy(object): """...
42.324503
267
0.636833
6,101
0.954624
0
0
2,918
0.45658
0
0
2,149
0.336254
dbde179232e6a3f834cec05a67d959715c486849
715
py
Python
neural-networks.py
PacktPublishing/Python-Deep-Learning-for-Beginners-
90f110158cbf0ce02fd4d5d09e3b2034428d9992
[ "MIT" ]
7
2019-02-16T02:52:12.000Z
2021-11-08T13:10:46.000Z
neural-networks.py
PacktPublishing/Python-Deep-Learning-for-Beginners-
90f110158cbf0ce02fd4d5d09e3b2034428d9992
[ "MIT" ]
null
null
null
neural-networks.py
PacktPublishing/Python-Deep-Learning-for-Beginners-
90f110158cbf0ce02fd4d5d09e3b2034428d9992
[ "MIT" ]
14
2018-11-18T04:33:38.000Z
2021-08-14T03:29:18.000Z
import numpy as np # Perceptron def predict_perceptron(inputs, weights): if np.dot(inputs, weights) > 0: return 1 else: return 0 def predict_perceptron_proper(inputs, weights): def step_function(input): return 1 if input > 0 else 0 def linear_model(inputs, weights): r...
23.064516
59
0.682517
0
0
0
0
0
0
0
0
12
0.016783
dbde2669ec80772673d5f19711266d806c399444
7,303
py
Python
biggan_discovery/orojar_discover.py
andreasjansson/OroJaR
ebb8c0333bbd33c063b6dd4a21a0559eb86d13e9
[ "BSD-2-Clause" ]
47
2021-07-26T07:54:06.000Z
2022-02-07T16:37:40.000Z
biggan_discovery/orojar_discover.py
andreasjansson/OroJaR
ebb8c0333bbd33c063b6dd4a21a0559eb86d13e9
[ "BSD-2-Clause" ]
1
2021-09-14T07:26:15.000Z
2021-09-14T07:45:59.000Z
biggan_discovery/orojar_discover.py
andreasjansson/OroJaR
ebb8c0333bbd33c063b6dd4a21a0559eb86d13e9
[ "BSD-2-Clause" ]
7
2021-08-21T07:33:35.000Z
2022-03-16T23:21:29.000Z
""" Learns a matrix of Z-Space directions using a pre-trained BigGAN Generator. Modified from train.py in the PyTorch BigGAN repo. """ import os from tqdm import tqdm import torch import torch.nn as nn import torch.optim import utils import train_fns from sync_batchnorm import patch_replication_callback from torch.u...
41.259887
113
0.633301
377
0.051623
0
0
0
0
0
0
2,144
0.293578
dbde5b0dbcab23e1ef72b1961f7810d2ab8cc002
6,452
py
Python
file_importer0.py
Alva789ro/Regional-Comprehensive-Economic-Partnership-RCEP-Economic-Default-Risk-Analysis
454583f47883edae17391f101b10b38b68c9834f
[ "MIT" ]
1
2021-03-15T19:44:36.000Z
2021-03-15T19:44:36.000Z
file_importer0.py
Alva789ro/Regional-Comprehensive-Economic-Partnership-RCEP-Economic-Default-Risk-Analysis
454583f47883edae17391f101b10b38b68c9834f
[ "MIT" ]
null
null
null
file_importer0.py
Alva789ro/Regional-Comprehensive-Economic-Partnership-RCEP-Economic-Default-Risk-Analysis
454583f47883edae17391f101b10b38b68c9834f
[ "MIT" ]
1
2022-02-06T01:33:41.000Z
2022-02-06T01:33:41.000Z
import xlsxwriter import pandas as pd import numpy as np import mysql.connector australia=pd.read_excel(r'\Users\jesica\Desktop\RCEP_economic_analysis.xlsx', sheet_name='Australia') brunei=pd.read_excel(r'\Users\jesica\Desktop\RCEP_economic_analysis.xlsx', sheet_name='Brunei') cambodia=pd.read_excel(r'\Users\jesica\De...
72.494382
227
0.67359
0
0
0
0
0
0
0
0
5,844
0.905766
dbde9d29ec27efc6184d1b64557b595e4c3e0755
6,837
py
Python
packer/resources/bootstrap_node.py
VIOOH/nile
893802387b3891ea02aae05f39ff4aa051354f18
[ "Apache-2.0" ]
4
2021-07-09T15:55:04.000Z
2021-12-28T10:34:12.000Z
packer/resources/bootstrap_node.py
Kishore88/nile
893802387b3891ea02aae05f39ff4aa051354f18
[ "Apache-2.0" ]
null
null
null
packer/resources/bootstrap_node.py
Kishore88/nile
893802387b3891ea02aae05f39ff4aa051354f18
[ "Apache-2.0" ]
3
2021-07-09T15:55:09.000Z
2021-07-10T10:24:02.000Z
#!/usr/bin/env python3 import os import re import glob import boto3 import requests import subprocess from time import sleep AWS_REGION = os.environ['AWS_REGION'] DEPLOY_UUID = os.environ['DEPLOY_UUID'] SERVICE_NAME = os.environ['SERVICE_NAME'] MOUNT_POINT = "/var/lib/" + SERVICE_NAME...
27.130952
111
0.584321
0
0
0
0
0
0
0
0
1,232
0.180196
dbdf10789c79bc37376b7fcca6ae9a0b284ccf83
4,412
py
Python
parsers/srum_parser.py
otoriocyber/Chronos
d70e22afed723c0ad4b7e449bd253e15351bada6
[ "MIT" ]
12
2021-04-20T23:08:28.000Z
2022-02-18T01:23:42.000Z
parsers/srum_parser.py
otoriocyber/chronos
d70e22afed723c0ad4b7e449bd253e15351bada6
[ "MIT" ]
null
null
null
parsers/srum_parser.py
otoriocyber/chronos
d70e22afed723c0ad4b7e449bd253e15351bada6
[ "MIT" ]
null
null
null
import csv import datetime import random import os from parsers.parser_base import ParserBase FILE_TIME_EPOCH = datetime.datetime(1601, 1, 1) FILE_TIME_MICROSECOND = 10 def filetime_to_epoch_datetime(file_time): if isinstance(file_time, int): microseconds_since_file_time_epoch = file_time / FILE_TIME_MIC...
45.020408
122
0.522439
3,889
0.88146
0
0
0
0
0
0
790
0.179057
dbdfe8bd7432ddafe572e5360642d04fff53f125
593
py
Python
tests/csrf_tests/test_context_processor.py
Yoann-Vie/esgi-hearthstone
115d03426c7e8e80d89883b78ac72114c29bed12
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
tests/csrf_tests/test_context_processor.py
Yoann-Vie/esgi-hearthstone
115d03426c7e8e80d89883b78ac72114c29bed12
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
tests/csrf_tests/test_context_processor.py
Yoann-Vie/esgi-hearthstone
115d03426c7e8e80d89883b78ac72114c29bed12
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
from django.http import HttpRequest from django.middleware.csrf import _compare_salted_tokens as equivalent_tokens from django.template.context_processors import csrf from django.test import SimpleTestCase class TestContextProcessor(SimpleTestCase): def test_force_token_to_string(self): request ...
39.533333
88
0.768971
377
0.63575
0
0
0
0
0
0
91
0.153457
dbe03e42e9b3d1f6b76452c08db25467c63f6175
30,141
py
Python
python/das/types.py
marza-animation-planet/das
1c7460dfdd5f138d8317c72900e90b23c0c28c7b
[ "MIT" ]
4
2018-11-19T01:36:01.000Z
2022-02-28T03:41:12.000Z
python/das/types.py
marza-animation-planet/das
1c7460dfdd5f138d8317c72900e90b23c0c28c7b
[ "MIT" ]
1
2021-12-26T11:57:07.000Z
2022-03-16T07:18:01.000Z
python/das/types.py
marza-animation-planet/das
1c7460dfdd5f138d8317c72900e90b23c0c28c7b
[ "MIT" ]
2
2019-03-30T10:28:12.000Z
2022-03-04T17:58:39.000Z
import sys import das import traceback class ReservedNameError(Exception): def __init__(self, name): super(ReservedNameError, self).__init__("'%s' is a reserved name" % name) class VersionError(Exception): def __init__(self, msg=None, current_version=None, required_version=None): fullmsg = "ersion...
30.945585
146
0.563883
30,074
0.997777
753
0.024983
322
0.010683
0
0
4,577
0.151853
dbe088a01c052a1745bf75ba9a62254a5f03f63b
4,829
py
Python
track.py
AliabbasMerchant/fileTrackAndBackup
8cdf97be58c69061e1f60c08f89b524d91f8c17d
[ "MIT" ]
6
2018-08-11T12:00:11.000Z
2021-06-15T09:11:34.000Z
track.py
AliabbasMerchant/fileTrackAndBackup
8cdf97be58c69061e1f60c08f89b524d91f8c17d
[ "MIT" ]
null
null
null
track.py
AliabbasMerchant/fileTrackAndBackup
8cdf97be58c69061e1f60c08f89b524d91f8c17d
[ "MIT" ]
null
null
null
#! /usr/bin/python3 from help import * import time # short-forms are used, so as to reduce the .json file size # t : type - d or f # d : directory # f : file # ts : timestamp # dirs : The dictionary containing info about directory contents # time : edit time of the file/folder # s : size of the file/folder # p : full ...
40.923729
120
0.57631
0
0
0
0
0
0
0
0
1,456
0.301512
dbe08be9b24ad6685aafe893f7f5de89e33519df
31,693
py
Python
clang/tools/scan-build-py/libscanbuild/analyze.py
Kvarnefalk/llvm-project
8b5f5798aaa24074609d151ea906d114cf5337c2
[ "Apache-2.0" ]
1
2021-02-17T04:40:38.000Z
2021-02-17T04:40:38.000Z
clang/tools/scan-build-py/libscanbuild/analyze.py
Kvarnefalk/llvm-project
8b5f5798aaa24074609d151ea906d114cf5337c2
[ "Apache-2.0" ]
null
null
null
clang/tools/scan-build-py/libscanbuild/analyze.py
Kvarnefalk/llvm-project
8b5f5798aaa24074609d151ea906d114cf5337c2
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception """ This module implements the 'scan-build' command API. To run the static analyzer against a bui...
39.175525
96
0.63686
0
0
3,148
0.099328
15,689
0.49503
0
0
12,918
0.407598
dbe1408e84afa0a04966d9f60dcf8a3847bfc25f
1,460
py
Python
tableborder.py
PIRXrav/pyhack
af5c86fb721053d8a3e819ab772c8144a23b86bf
[ "MIT" ]
null
null
null
tableborder.py
PIRXrav/pyhack
af5c86fb721053d8a3e819ab772c8144a23b86bf
[ "MIT" ]
null
null
null
tableborder.py
PIRXrav/pyhack
af5c86fb721053d8a3e819ab772c8144a23b86bf
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # pylint: disable=C0103 # pylint: disable=R0902 # pylint: disable=R0903 # pylint: disable=R0913 """ Définie la classe TableBorder """ class TableBorder: """ Facillite l'usage de l'UNICODE """ def __init__(self, top_left, top_split, top_right, mi...
30.416667
56
0.469863
703
0.481177
0
0
0
0
0
0
465
0.318275
dbe1aa3b9d736d93221a08965b3b705efeef3804
216
py
Python
app/urls.py
tkf2019/Vue-Django-SAST-Search
385af9819c608ce2d0845ed3e786777ff52b52b3
[ "MIT" ]
null
null
null
app/urls.py
tkf2019/Vue-Django-SAST-Search
385af9819c608ce2d0845ed3e786777ff52b52b3
[ "MIT" ]
null
null
null
app/urls.py
tkf2019/Vue-Django-SAST-Search
385af9819c608ce2d0845ed3e786777ff52b52b3
[ "MIT" ]
null
null
null
from django.conf.urls import url from . import views urlpatterns = [ url(r'^register/', views.register), url(r'^login/', views.login), url(r'logout/', views.logout), url(r'search/', views.search) ]
19.636364
39
0.643519
0
0
0
0
0
0
0
0
43
0.199074
dbe1d984552acfc78008a25befd61632a445f85d
28,508
py
Python
custom_components/hasl/sensor.py
Ziqqo/hasl-platform
27386314bf58626538d59c38d89249b07ed9256a
[ "Apache-2.0" ]
null
null
null
custom_components/hasl/sensor.py
Ziqqo/hasl-platform
27386314bf58626538d59c38d89249b07ed9256a
[ "Apache-2.0" ]
null
null
null
custom_components/hasl/sensor.py
Ziqqo/hasl-platform
27386314bf58626538d59c38d89249b07ed9256a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- """Simple service for SL (Storstockholms Lokaltrafik).""" import datetime import json import logging from datetime import timedelta import homeassistant.helpers.config_validation as cv import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from ho...
35.369727
79
0.542058
21,675
0.760313
0
0
5,003
0.175495
0
0
5,522
0.1937
dbe25f137db8fdda41fdc3006d42e7f6d84f1a1d
2,067
py
Python
simbad_tools.py
ishivvers/astro
ff3f3b9f8ef4013157c277bbb5bf82ac1bd3287d
[ "MIT" ]
1
2015-12-06T00:19:35.000Z
2015-12-06T00:19:35.000Z
simbad_tools.py
ishivvers/astro
ff3f3b9f8ef4013157c277bbb5bf82ac1bd3287d
[ "MIT" ]
null
null
null
simbad_tools.py
ishivvers/astro
ff3f3b9f8ef4013157c277bbb5bf82ac1bd3287d
[ "MIT" ]
null
null
null
""" A quick library to deal with searching simbad for info about a SN and parsing the results. Author: Isaac Shivvers, [email protected], 2014 example SIMBAD uri query: http://simbad.u-strasbg.fr/simbad/sim-id?output.format=ASCII&Ident=sn%201998S """ import re from urllib2 import urlopen def get_SN_info( nam...
32.296875
88
0.610063
0
0
0
0
0
0
0
0
839
0.405902
dbe3699b610c3c766074b1340770c91698f9123b
15,647
py
Python
robots/environments.py
StanfordASL/soft-robot-control
29ade9b7b952e25e639b42767a4f09c87a0e824a
[ "MIT" ]
5
2021-03-07T11:42:11.000Z
2022-02-28T09:46:05.000Z
robots/environments.py
StanfordASL/soft-robot-control
29ade9b7b952e25e639b42767a4f09c87a0e824a
[ "MIT" ]
null
null
null
robots/environments.py
StanfordASL/soft-robot-control
29ade9b7b952e25e639b42767a4f09c87a0e824a
[ "MIT" ]
3
2021-01-23T11:09:40.000Z
2022-03-02T11:54:57.000Z
import os from math import cos from math import sin import Sofa.Core from splib.numerics import Quat, Vec3 from sofacontrol import measurement_models path = os.path.dirname(os.path.abspath(__file__)) class TemplateEnvironment: def __init__(self, name='Template', rayleighMass=0.1, rayleighStiffness=0.1, dt=0.01...
49.83121
148
0.547964
15,434
0.986072
0
0
0
0
0
0
5,167
0.330118
dbe3e139f969d2b0c02202b763923425574d8d2e
2,764
py
Python
default.py
SimonPreissner/get-shifty
aff49220932921c77e419a34ca472b51e0b26b72
[ "MIT" ]
null
null
null
default.py
SimonPreissner/get-shifty
aff49220932921c77e419a34ca472b51e0b26b72
[ "MIT" ]
null
null
null
default.py
SimonPreissner/get-shifty
aff49220932921c77e419a34ca472b51e0b26b72
[ "MIT" ]
null
null
null
""" This file contains meta information and default configurations of the project """ RSC_YEARS = [1660, 1670, 1680, 1690, 1700, 1710, 1720, 1730, 1740, 1750, 1760, 1770, 1780, 1790, 1800, 1810, 1820, 1830, 1840, 1850, 1860, 1870, 1880, 1890, 1900, 1910, 1920] # cf. Chapter 4....
52.150943
119
0.458032
0
0
0
0
0
0
0
0
1,204
0.435601
dbe3f5f2703d36ffae51f8561d55eb622bc98049
21,019
py
Python
generate_training_data_drb.py
SimonTopp/Graph-WaveNet
ef63a80cc397744667a5d27f7c410c10e3e03a4c
[ "MIT" ]
null
null
null
generate_training_data_drb.py
SimonTopp/Graph-WaveNet
ef63a80cc397744667a5d27f7c410c10e3e03a4c
[ "MIT" ]
null
null
null
generate_training_data_drb.py
SimonTopp/Graph-WaveNet
ef63a80cc397744667a5d27f7c410c10e3e03a4c
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import argparse import numpy as np import os import pandas as pd import util import os.path import pandas as pd import numpy as np import yaml import xa...
39.658491
120
0.63709
0
0
0
0
0
0
0
0
11,680
0.555688
dbe414ec11ed223b8f3b005ec5b7199d7a73066f
3,737
py
Python
Phase-1/Python Basic 1/Day-3.py
CodedLadiesInnovateTech/python-challenges
22ce26c68fea6c7c243ada831e47c52e27a62127
[ "MIT" ]
11
2020-05-11T08:41:21.000Z
2022-02-27T08:21:37.000Z
Phase-1/Python Basic 1/Day-3.py
CodedLadiesInnovateTech/python-challenges
22ce26c68fea6c7c243ada831e47c52e27a62127
[ "MIT" ]
9
2020-05-12T10:46:06.000Z
2020-05-28T17:37:19.000Z
Phase-1/Python Basic 1/Day-3.py
CodedLadiesInnovateTech/python-challenges
22ce26c68fea6c7c243ada831e47c52e27a62127
[ "MIT" ]
44
2020-05-10T20:53:32.000Z
2021-04-25T18:47:08.000Z
<<<<<<< HEAD """ 1. Write a Python program to print the documents (syntax, description etc.) of Python built-in function(s). Sample function : abs() Expected Result : abs(number) -> number Return the absolute value of the argument. Tools: help function 2. Write a Python program to p...
35.932692
185
0.690393
0
0
0
0
0
0
0
0
1,843
0.493176
dbe44f6e05680f0d1dad7aaee47f96f07f3de643
2,128
py
Python
tests/python/metaclass_inheritance.py
gmgunter/pyre
e9ff3f8c04661f8b2cd2ba0caded08b6fe8054e2
[ "BSD-3-Clause" ]
25
2018-04-23T01:45:39.000Z
2021-12-10T06:01:23.000Z
tests/python/metaclass_inheritance.py
gmgunter/pyre
e9ff3f8c04661f8b2cd2ba0caded08b6fe8054e2
[ "BSD-3-Clause" ]
53
2018-05-31T04:55:00.000Z
2021-10-07T21:41:32.000Z
tests/python/metaclass_inheritance.py
gmgunter/pyre
e9ff3f8c04661f8b2cd2ba0caded08b6fe8054e2
[ "BSD-3-Clause" ]
12
2018-04-23T22:50:40.000Z
2022-02-20T17:27:23.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # michael a.g. aïvázis # orthologue # (c) 1998-2021 all rights reserved # # """ When a metaclass understands the extra keywords that can be passed during class declaration, it has to override all these to accommodate the change in signature """ class meta(type): ...
25.035294
92
0.56156
1,702
0.799061
0
0
441
0.207042
0
0
505
0.237089
dbe6b1bbfa7c8868231f9a2e70cb8975c45626ee
434
py
Python
cs101/module8/8-1/chroma1.py
idsdlab/basicai_sp21
af9acba34c0417fed830de1b61753c50fd303169
[ "MIT" ]
1
2021-03-23T16:18:00.000Z
2021-03-23T16:18:00.000Z
cs101/module8/8-1/chroma1.py
idsdlab/basicai_sp21
af9acba34c0417fed830de1b61753c50fd303169
[ "MIT" ]
null
null
null
cs101/module8/8-1/chroma1.py
idsdlab/basicai_sp21
af9acba34c0417fed830de1b61753c50fd303169
[ "MIT" ]
null
null
null
from cs1media import * import math def dist(c1, c2): r1, g1, b1 = c1 r2, g2, b2 = c2 return math.sqrt((r1-r2)**2 + (g1-g2)**2 + (b1-b2)**2) def chroma(img, key, threshold): w, h = img.size() for y in range(h): for x in range(w): p = img.get(x, y) if dist(p, key) < threshold: img.set...
20.666667
56
0.582949
0
0
0
0
0
0
0
0
20
0.046083
dbe72fbf88b8bf3f7bd1a038ff09959ccc113054
3,433
py
Python
wfirst_stars/mklc.py
RuthAngus/wfirst_stars
60989fc56488ac915082e76c3088c6133909985b
[ "MIT" ]
null
null
null
wfirst_stars/mklc.py
RuthAngus/wfirst_stars
60989fc56488ac915082e76c3088c6133909985b
[ "MIT" ]
null
null
null
wfirst_stars/mklc.py
RuthAngus/wfirst_stars
60989fc56488ac915082e76c3088c6133909985b
[ "MIT" ]
null
null
null
import numpy as np import scipy import scipy.io import pylab import numpy import glob import pyfits def mklc(t, nspot=200, incl=(scipy.pi)*5./12., amp=1., tau=30.5, p=10.0): diffrot = 0. ''' This is a simplified version of the class-based routines in spot_model.py. It generates a light curves for dark, p...
31.787037
82
0.605884
0
0
0
0
0
0
0
0
1,433
0.417419
dbe7a0b13a437a6e05e68098ff2efe008a915ee9
862
py
Python
bin/sort.py
pelavarre/pybashish
03f74356fb0a2a0ef7106f09c059fd9b375ce89a
[ "CNRI-Python" ]
4
2020-07-10T20:16:13.000Z
2022-02-16T02:11:20.000Z
bin/sort.py
pelavarre/pybashish
03f74356fb0a2a0ef7106f09c059fd9b375ce89a
[ "CNRI-Python" ]
null
null
null
bin/sort.py
pelavarre/pybashish
03f74356fb0a2a0ef7106f09c059fd9b375ce89a
[ "CNRI-Python" ]
2
2020-06-24T20:37:36.000Z
2020-07-10T20:16:17.000Z
#!/usr/bin/env python3 """ usage: sort.py [-h] sort lines options: -h, --help show this help message and exit quirks: sorts tabs as different than spaces sorts some spaces ending a line as different than none ending a line examples: Oh no! No examples disclosed!! 💥 💔 💥 """ # FIXME: doc -k$N,$N and -n a...
21.02439
70
0.678654
0
0
0
0
0
0
0
0
620
0.711825
dbe8f2379002738c1c16e7f2d3cd857e1c75e38f
10,561
py
Python
davan/http/service/telldus/tdtool.py
davandev/davanserver
0be914268c8e34d4092251508bae213cff3ef621
[ "MIT" ]
null
null
null
davan/http/service/telldus/tdtool.py
davandev/davanserver
0be914268c8e34d4092251508bae213cff3ef621
[ "MIT" ]
null
null
null
davan/http/service/telldus/tdtool.py
davandev/davanserver
0be914268c8e34d4092251508bae213cff3ef621
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys, getopt, httplib, urllib, json, os import oauth.oauth as oauth import datetime from configobj import ConfigObj import logging global logger logger = logging.getLogger(os.path.basename(__file__)) import davan.util.application_logger as log_manager #insert your ...
35.921769
170
0.670675
0
0
0
0
0
0
0
0
4,077
0.386043
dbe91e2d448902d1659cd842f7d5834596d34306
16,286
py
Python
ichnaea/data/export.py
rajreet/ichnaea
7bd2eaa9568f9004e566b802623299625c29f5ae
[ "Apache-2.0" ]
348
2015-01-13T11:48:07.000Z
2022-03-31T08:33:07.000Z
ichnaea/data/export.py
rajreet/ichnaea
7bd2eaa9568f9004e566b802623299625c29f5ae
[ "Apache-2.0" ]
1,274
2015-01-02T18:15:56.000Z
2022-03-23T15:29:08.000Z
ichnaea/data/export.py
rajreet/ichnaea
7bd2eaa9568f9004e566b802623299625c29f5ae
[ "Apache-2.0" ]
149
2015-01-04T21:15:07.000Z
2021-12-10T06:05:09.000Z
from collections import defaultdict import json import re import time from urllib.parse import urlparse import uuid import boto3 import boto3.exceptions import botocore.exceptions import markus import redis.exceptions import requests import requests.exceptions from sqlalchemy import select import sqlalchemy.exc from ...
31.933333
86
0.560666
15,499
0.951676
0
0
499
0.03064
0
0
2,875
0.176532
dbe92a131f4e410b11bc7e2f634cf6f5bfadbd7f
6,636
py
Python
test/inference_correctness/dcn_multi_hot.py
x-y-z/HugeCTR
17bf942215df60827ece9dc015af5191ef9219b7
[ "Apache-2.0" ]
130
2021-10-11T11:55:28.000Z
2022-03-31T21:53:07.000Z
test/inference_correctness/dcn_multi_hot.py
Teora/HugeCTR
c55a63401ad350669ccfcd374aefd7a5fc879ca2
[ "Apache-2.0" ]
72
2021-10-09T04:59:09.000Z
2022-03-31T11:27:54.000Z
test/inference_correctness/dcn_multi_hot.py
Teora/HugeCTR
c55a63401ad350669ccfcd374aefd7a5fc879ca2
[ "Apache-2.0" ]
29
2021-11-03T22:35:01.000Z
2022-03-30T13:11:59.000Z
import hugectr from mpi4py import MPI solver = hugectr.CreateSolver(model_name = "dcn", max_eval_batches = 1, batchsize_eval = 16384, batchsize = 16384, lr = 0.001, vvgpu...
56.717949
117
0.517179
0
0
0
0
0
0
0
0
758
0.114225
dbeaa0d47dcb9a56338a2f94ede14d6545fab66f
4,437
py
Python
bindings/pydrake/systems/perception.py
RobotLocomotion/drake-python3.7
ae397a4c6985262d23e9675b9bf3927c08d027f5
[ "BSD-3-Clause" ]
2
2021-02-25T02:01:02.000Z
2021-03-17T04:52:04.000Z
bindings/pydrake/systems/perception.py
RobotLocomotion/drake-python3.7
ae397a4c6985262d23e9675b9bf3927c08d027f5
[ "BSD-3-Clause" ]
null
null
null
bindings/pydrake/systems/perception.py
RobotLocomotion/drake-python3.7
ae397a4c6985262d23e9675b9bf3927c08d027f5
[ "BSD-3-Clause" ]
1
2021-06-13T12:05:39.000Z
2021-06-13T12:05:39.000Z
import numpy as np from pydrake.common.value import AbstractValue from pydrake.math import RigidTransform from pydrake.perception import BaseField, Fields, PointCloud from pydrake.systems.framework import LeafSystem def _TransformPoints(points_Ci, X_CiSi): # Make homogeneous copy of points. points_h_Ci = np....
34.664063
79
0.626549
3,209
0.723236
0
0
0
0
0
0
1,217
0.274284
dbeb68c7ee7ea08f9d92285ea9d761b3aba02878
5,115
py
Python
experiments/db_test.py
mit-ll/CATAN
7cc6f7e8af459c0f6bcf325f0754db1ba5b591ac
[ "BSD-3-Clause" ]
15
2015-06-05T20:13:40.000Z
2020-12-24T05:16:57.000Z
experiments/db_test.py
mit-ll/CATAN
7cc6f7e8af459c0f6bcf325f0754db1ba5b591ac
[ "BSD-3-Clause" ]
10
2016-03-04T23:05:56.000Z
2016-05-18T18:14:13.000Z
experiments/db_test.py
mit-ll/CATAN
7cc6f7e8af459c0f6bcf325f0754db1ba5b591ac
[ "BSD-3-Clause" ]
6
2015-10-15T19:23:58.000Z
2021-06-29T07:36:16.000Z
#!/usr/bin/env python """ @author Hongyi Hu © 2015 Massachusetts Institute of Technology """ import argparse import random import catan.db from catan.data import NodeMessage # test data STATUS_LIST = ['ok', 'injured', 'deceased'] # nodes def gen_nodes(n, db, start_lat, stop_lat, start_long, stop_long): assert...
31.189024
111
0.634018
0
0
0
0
0
0
0
0
1,623
0.31724
dbebfc8120396c97668055085f91d5e5e0b1e5af
2,183
py
Python
Medium/200.py
Hellofafar/Leetcode
7a459e9742958e63be8886874904e5ab2489411a
[ "CNRI-Python" ]
6
2017-09-25T18:05:50.000Z
2019-03-27T00:23:15.000Z
Medium/200.py
Hellofafar/Leetcode
7a459e9742958e63be8886874904e5ab2489411a
[ "CNRI-Python" ]
1
2017-10-29T12:04:41.000Z
2018-08-16T18:00:37.000Z
Medium/200.py
Hellofafar/Leetcode
7a459e9742958e63be8886874904e5ab2489411a
[ "CNRI-Python" ]
null
null
null
# ------------------------------ # 200. Number of Islands # # Description: # Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrou...
29.106667
258
0.44022
478
0.218965
0
0
0
0
0
0
1,713
0.7847
dbec13a8be9b82963156b2e9e29130d14a7c09eb
975
py
Python
tests/formatters/fseventsd.py
SamuelePilleri/plaso
f5687f12a89c7309797ccc285da78e855c120579
[ "Apache-2.0" ]
null
null
null
tests/formatters/fseventsd.py
SamuelePilleri/plaso
f5687f12a89c7309797ccc285da78e855c120579
[ "Apache-2.0" ]
null
null
null
tests/formatters/fseventsd.py
SamuelePilleri/plaso
f5687f12a89c7309797ccc285da78e855c120579
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for the fseventsd record event formatter.""" from __future__ import unicode_literals import unittest from plaso.formatters import fseventsd from tests.formatters import test_lib class FseventsdFormatterTest(test_lib.EventFormatterTestCase): """Tests for the...
26.351351
67
0.756923
688
0.705641
0
0
0
0
0
0
330
0.338462
dbec8e855b885f99aff4e865947ea4c6e652c177
2,415
py
Python
train.py
Farzin-Negahbani/PathoNet
b467a255fb356e64129b7942261e972ae15a2d2b
[ "MIT" ]
null
null
null
train.py
Farzin-Negahbani/PathoNet
b467a255fb356e64129b7942261e972ae15a2d2b
[ "MIT" ]
null
null
null
train.py
Farzin-Negahbani/PathoNet
b467a255fb356e64129b7942261e972ae15a2d2b
[ "MIT" ]
null
null
null
from keras.callbacks import ModelCheckpoint,Callback,LearningRateScheduler,TensorBoard from keras.models import load_model import random import numpy as np from scipy import misc import gc from keras.optimizers import Adam from imageio import imread from datetime import datetime import os import json import models from...
41.637931
180
0.708075
0
0
0
0
0
0
0
0
202
0.083644
dbed1f6b6c1523d648a1c00ecfbe4157990ceba2
1,445
py
Python
tests/chainer_tests/functions_tests/array_tests/test_flatten.py
mingxiaoh/chainer-v3
815ff00f5eaf7944d6e8a75662ff64a2fe046a4d
[ "BSD-3-Clause" ]
7
2017-05-08T07:02:40.000Z
2018-12-02T18:35:39.000Z
tests/chainer_tests/functions_tests/array_tests/test_flatten.py
mingxiaoh/chainer-v3
815ff00f5eaf7944d6e8a75662ff64a2fe046a4d
[ "BSD-3-Clause" ]
null
null
null
tests/chainer_tests/functions_tests/array_tests/test_flatten.py
mingxiaoh/chainer-v3
815ff00f5eaf7944d6e8a75662ff64a2fe046a4d
[ "BSD-3-Clause" ]
null
null
null
import unittest import numpy import chainer from chainer import cuda from chainer import functions from chainer import gradient_check from chainer import testing from chainer.testing import attr @testing.parameterize(*testing.product({ 'shape': [(3, 4), ()], 'dtype': [numpy.float16, numpy.float32, numpy.flo...
26.759259
77
0.680969
1,072
0.741869
0
0
1,204
0.833218
0
0
14
0.009689
dbed5bb534715e304b67cd5a82e6d1e8cca605fa
1,693
py
Python
categories/migrations/0001_initial.py
snoop2head/exercise_curation_django
ba35bd32d8bc203d318cb8b6e0a1722f3aa26eda
[ "MIT" ]
3
2020-09-30T04:44:39.000Z
2021-07-30T08:20:18.000Z
categories/migrations/0001_initial.py
snoop2head/exercise_curation_django
ba35bd32d8bc203d318cb8b6e0a1722f3aa26eda
[ "MIT" ]
7
2021-03-30T13:09:55.000Z
2022-01-13T02:33:34.000Z
categories/migrations/0001_initial.py
snoop2head/exercise_curation_django
ba35bd32d8bc203d318cb8b6e0a1722f3aa26eda
[ "MIT" ]
1
2022-03-31T12:01:38.000Z
2022-03-31T12:01:38.000Z
# Generated by Django 3.0.3 on 2020-03-24 09:59 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('exercises', '0018_photo_file'), ] operations = [ migrations.CreateModel( na...
37.622222
158
0.569403
1,567
0.925576
0
0
0
0
0
0
291
0.171884
dbed62851d59b2fa6655d17b726752f0c24c4682
2,773
py
Python
src/metarl/envs/dm_control/dm_control_env.py
neurips2020submission11699/metarl
ae4825d21478fa1fd0aa6b116941ea40caa152a5
[ "MIT" ]
2
2021-02-07T12:14:52.000Z
2021-07-29T08:07:22.000Z
src/metarl/envs/dm_control/dm_control_env.py
neurips2020submission11699/metarl
ae4825d21478fa1fd0aa6b116941ea40caa152a5
[ "MIT" ]
null
null
null
src/metarl/envs/dm_control/dm_control_env.py
neurips2020submission11699/metarl
ae4825d21478fa1fd0aa6b116941ea40caa152a5
[ "MIT" ]
null
null
null
from dm_control import suite from dm_control.rl.control import flatten_observation from dm_env import StepType import gym import numpy as np from metarl.envs import Step from metarl.envs.dm_control.dm_control_viewer import DmControlViewer class DmControlEnv(gym.Env): """ Binding for `dm_control <https://arxi...
33.011905
79
0.586729
2,530
0.912369
0
0
954
0.344032
0
0
212
0.076451
dbef5ddea825a12fdea28a38b148d831f47bd566
1,446
py
Python
python_modules/lakehouse/lakehouse/snowflake_table.py
vatervonacht/dagster
595d78c883ef20618052ac1575fe46cde51fd541
[ "Apache-2.0" ]
3
2020-04-28T16:27:33.000Z
2020-07-22T07:43:30.000Z
python_modules/lakehouse/lakehouse/snowflake_table.py
vatervonacht/dagster
595d78c883ef20618052ac1575fe46cde51fd541
[ "Apache-2.0" ]
2
2021-05-11T13:36:27.000Z
2021-09-03T01:53:11.000Z
python_modules/lakehouse/lakehouse/snowflake_table.py
vatervonacht/dagster
595d78c883ef20618052ac1575fe46cde51fd541
[ "Apache-2.0" ]
1
2021-02-21T12:16:47.000Z
2021-02-21T12:16:47.000Z
from dagster import check from .house import Lakehouse from .table import create_lakehouse_table_def class SnowflakeLakehouse(Lakehouse): def __init__(self): pass def hydrate(self, _context, _table_type, _table_metadata, table_handle, _dest_metadata): return None def materialize(self, c...
26.777778
98
0.670816
285
0.197095
0
0
0
0
0
0
91
0.062932
dbef871a16cf470112cb22aef95e471326a91ea8
1,976
py
Python
pype/plugins/maya/publish/validate_look_no_default_shaders.py
tokejepsen/pype
8f2b2b631cc5d3ad93eeb5ad3bc6110d32466ed3
[ "MIT" ]
null
null
null
pype/plugins/maya/publish/validate_look_no_default_shaders.py
tokejepsen/pype
8f2b2b631cc5d3ad93eeb5ad3bc6110d32466ed3
[ "MIT" ]
null
null
null
pype/plugins/maya/publish/validate_look_no_default_shaders.py
tokejepsen/pype
8f2b2b631cc5d3ad93eeb5ad3bc6110d32466ed3
[ "MIT" ]
null
null
null
from maya import cmds import pyblish.api import pype.api import pype.maya.action class ValidateLookNoDefaultShaders(pyblish.api.InstancePlugin): """Validate if any node has a connection to a default shader. This checks whether the look has any members of: - lambert1 - initialShadingGroup - initi...
31.365079
76
0.619433
1,891
0.956984
0
0
713
0.36083
0
0
907
0.459008
dbeff0d906fdca4fe34a55902305e858b8a7efb0
446
py
Python
data_science_app/app.py
Johne-DuChene/data_science_learning_app
40bafce85a27155766950806b5b32a2d1f6753c4
[ "MIT" ]
null
null
null
data_science_app/app.py
Johne-DuChene/data_science_learning_app
40bafce85a27155766950806b5b32a2d1f6753c4
[ "MIT" ]
null
null
null
data_science_app/app.py
Johne-DuChene/data_science_learning_app
40bafce85a27155766950806b5b32a2d1f6753c4
[ "MIT" ]
null
null
null
from flask import Flask # initialize the app app = Flask(__name__) # execute iris function at /iris route @app.route("/iris") def iris(): from sklearn.datasets import load_iris from sklearn.linear_model import LogisticRegression X, y = load_iris(return_X_y=True) clf = LogisticRegression( rando...
24.777778
55
0.674888
0
0
0
0
338
0.757848
0
0
85
0.190583
dbf02afc10d2a9ad48452a7e76a2ad7a46bdd3f5
10,714
py
Python
vbdiar/scoring/normalization.py
VarunSrivastava19/VBDiarization
2a460b4fc11b3a5ff73d0534cadb182be1a9d882
[ "Apache-2.0" ]
101
2017-12-19T21:55:59.000Z
2022-03-15T06:56:06.000Z
vbdiar/scoring/normalization.py
VarunSrivastava19/VBDiarization
2a460b4fc11b3a5ff73d0534cadb182be1a9d882
[ "Apache-2.0" ]
27
2017-07-20T06:10:42.000Z
2020-11-22T14:15:16.000Z
vbdiar/scoring/normalization.py
VarunSrivastava19/VBDiarization
2a460b4fc11b3a5ff73d0534cadb182be1a9d882
[ "Apache-2.0" ]
30
2017-07-17T08:53:44.000Z
2021-05-18T07:37:46.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2018 Brno University of Technology FIT # Author: Jan Profant <[email protected]> # All Rights Reserved import os import logging import pickle import multiprocessing import numpy as np from sklearn.metrics.pairwise import cosine_similarity from vb...
39.10219
119
0.614243
6,761
0.631043
153
0.01428
0
0
0
0
2,968
0.277021
dbf19789118428ff5f8d3aa59b32b64fa444b8b7
984
py
Python
agent_based_models/abm_allelopathy/plot_data.py
mattsmart/biomodels
237f87489553fa1ebf5c676fab563166dd0c39e9
[ "MIT" ]
null
null
null
agent_based_models/abm_allelopathy/plot_data.py
mattsmart/biomodels
237f87489553fa1ebf5c676fab563166dd0c39e9
[ "MIT" ]
null
null
null
agent_based_models/abm_allelopathy/plot_data.py
mattsmart/biomodels
237f87489553fa1ebf5c676fab563166dd0c39e9
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import os def data_plotter(lattice_dict, datafile_dir, plot_dir): # total spaces on grid implies grid size total_cells = lattice_dict['E'][0] + lattice_dict['D_a'][0] + lattice_dict['D_b'][0] + lattice_dict['B'][0] n = int(total_cells**0.5) plt.figure(1) plt.plot...
30.75
111
0.650407
0
0
0
0
0
0
0
0
272
0.276423
dbf1c54ca3fd34dfbf7ce18d8d98a14afb9379e4
1,056
py
Python
azure-mgmt-network/azure/mgmt/network/v2018_10_01/models/virtual_wan_security_providers.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2021-09-07T18:36:04.000Z
2021-09-07T18:36:04.000Z
azure-mgmt-network/azure/mgmt/network/v2018_10_01/models/virtual_wan_security_providers.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
2
2019-10-02T23:37:38.000Z
2020-10-02T01:17:31.000Z
azure-mgmt-network/azure/mgmt/network/v2018_10_01/models/virtual_wan_security_providers.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
35.2
101
0.630682
540
0.511364
0
0
0
0
0
0
750
0.710227
dbf2e984865e076aaf055509509eac8230a5a7d1
438
py
Python
jsonresume_theme_stackoverflow/filters.py
flowgunso/jsonresume-theme-stackoverflow
5fcadcf41a93478a09e95d79fd62d8ac3402b33b
[ "MIT" ]
null
null
null
jsonresume_theme_stackoverflow/filters.py
flowgunso/jsonresume-theme-stackoverflow
5fcadcf41a93478a09e95d79fd62d8ac3402b33b
[ "MIT" ]
4
2020-12-29T14:04:48.000Z
2021-01-01T20:23:37.000Z
jsonresume_theme_stackoverflow/filters.py
flowgunso/jsonresume-theme-stackoverflow
5fcadcf41a93478a09e95d79fd62d8ac3402b33b
[ "MIT" ]
null
null
null
import datetime import re from .exceptions import ObjectIsNotADate def format_date(value, format="%d %M %Y"): regex = re.match(r"(?P<year>\d{4})-(?P<month>\d{2})-(?P<day>\d{2})", value) if regex is not None: date = datetime.date( int(regex.group("year")), int(regex.group("mont...
24.333333
79
0.586758
0
0
0
0
0
0
0
0
78
0.178082
dbf349d5a69e925a415de30492c1747e358368f6
3,966
py
Python
ipec/data/core.py
wwwbbb8510/ippso
fa20d23cd8edba5908e65a0ab0ab990d7ce3d5d5
[ "MIT" ]
9
2018-05-10T01:04:34.000Z
2019-06-28T07:47:37.000Z
ipec/data/core.py
wwwbbb8510/ippso
fa20d23cd8edba5908e65a0ab0ab990d7ce3d5d5
[ "MIT" ]
null
null
null
ipec/data/core.py
wwwbbb8510/ippso
fa20d23cd8edba5908e65a0ab0ab990d7ce3d5d5
[ "MIT" ]
2
2020-10-12T03:54:30.000Z
2021-09-08T14:10:21.000Z
import numpy as np import os import logging from sklearn.model_selection import train_test_split DATASET_ROOT_FOLDER = os.path.abspath('datasets') class DataLoader: train = None validation = None test = None mode = None partial_dataset = None @staticmethod def load(train_path=None, valid...
36.054545
150
0.614977
3,815
0.961926
0
0
3,669
0.925113
0
0
600
0.151286
dbf3d541561ba11217ad33d7f2e880d8ae1b4729
1,567
py
Python
FOR/Analisador-completo/main.py
lucasf5/Python
c5649121e2af42922e2d9c19cec98322e132bdab
[ "MIT" ]
1
2021-09-28T13:11:56.000Z
2021-09-28T13:11:56.000Z
FOR/Analisador-completo/main.py
lucasf5/Python
c5649121e2af42922e2d9c19cec98322e132bdab
[ "MIT" ]
null
null
null
FOR/Analisador-completo/main.py
lucasf5/Python
c5649121e2af42922e2d9c19cec98322e132bdab
[ "MIT" ]
null
null
null
# Exercício Python 56: Desenvolva um programa que leia o nome, idade e sexo de 4 pessoas. No final do programa, mostre: a média de idade do grupo, qual é o nome do homem mais velho e quantas mulheres têm menos de 20 anos. mediaidade = '' nomelista = [] idadelista = [] sexolista = [] homens = [] mulherescommenosde20 =...
27.982143
221
0.612636
0
0
0
0
0
0
0
0
997
0.632213
dbf566f5e271a38bb7effb6c5cb9d1b3bcf1fdab
22,131
py
Python
test/python/quantum_info/operators/test_operator.py
EnriqueL8/qiskit-terra
08b801f1f8598c4e44680b4a75c232ed92db0262
[ "Apache-2.0" ]
2
2019-06-28T19:58:42.000Z
2019-07-26T05:04:02.000Z
test/python/quantum_info/operators/test_operator.py
EnriqueL8/qiskit-terra
08b801f1f8598c4e44680b4a75c232ed92db0262
[ "Apache-2.0" ]
null
null
null
test/python/quantum_info/operators/test_operator.py
EnriqueL8/qiskit-terra
08b801f1f8598c4e44680b4a75c232ed92db0262
[ "Apache-2.0" ]
1
2020-01-24T21:01:06.000Z
2020-01-24T21:01:06.000Z
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any...
38.826316
90
0.592246
20,983
0.948127
0
0
840
0.037956
0
0
2,913
0.131625
dbf638d5301c89db06eb944d0fa138829b04d587
243
py
Python
pages/feature_modal.py
jack-skerrett-bluefruit/Python-ScreenPlay
045486bdf441fa3a7a6cde59e7b7e12a7d53fbed
[ "MIT" ]
null
null
null
pages/feature_modal.py
jack-skerrett-bluefruit/Python-ScreenPlay
045486bdf441fa3a7a6cde59e7b7e12a7d53fbed
[ "MIT" ]
null
null
null
pages/feature_modal.py
jack-skerrett-bluefruit/Python-ScreenPlay
045486bdf441fa3a7a6cde59e7b7e12a7d53fbed
[ "MIT" ]
null
null
null
from selenium.webdriver.common.by import By class feature_modal: title_textbox = (By.ID, "feature-name") description_textbox = (By.ID, "description") save_button = (By.XPATH, "/html/body/app/div[3]/div[2]/div/div/div/button[1]")
30.375
82
0.699588
196
0.806584
0
0
0
0
0
0
79
0.325103
dbf65821c57bcbfbc7d857dacc3de5d4175d7481
1,101
py
Python
liststations.py
CrookedY/AirPollutionBot
ce79037d6dddd1f297fce04a694b49f8b9a1bfad
[ "Apache-2.0" ]
1
2018-08-10T14:06:07.000Z
2018-08-10T14:06:07.000Z
liststations.py
CrookedY/AirPollutionBot
ce79037d6dddd1f297fce04a694b49f8b9a1bfad
[ "Apache-2.0" ]
2
2017-08-09T11:24:31.000Z
2018-03-01T22:50:04.000Z
liststations.py
CrookedY/AirPollutionBot
ce79037d6dddd1f297fce04a694b49f8b9a1bfad
[ "Apache-2.0" ]
null
null
null
from urllib2 import Request, urlopen, URLError import json request = Request('https://uk-air.defra.gov.uk/sos-ukair/api/v1/stations/') try: response = urlopen(request) data = response.read() except URLError, e: print 'error:', e stations= json.loads (data) #extract out station 2 stations2 = stations [7] prope...
23.934783
85
0.719346
0
0
0
0
0
0
0
0
430
0.390554
dbf72e3ca9c0760ca6777e329e27075106a7a7eb
73
py
Python
pyfinancials/engine.py
kmiller96/PyFinancials
73a89b0fd3a3d501b8f8c770f73473e9a2d18fdf
[ "MIT" ]
1
2019-02-09T21:28:27.000Z
2019-02-09T21:28:27.000Z
pyfinancials/engine.py
kmiller96/PyFinancials
73a89b0fd3a3d501b8f8c770f73473e9a2d18fdf
[ "MIT" ]
null
null
null
pyfinancials/engine.py
kmiller96/PyFinancials
73a89b0fd3a3d501b8f8c770f73473e9a2d18fdf
[ "MIT" ]
null
null
null
def hello_world(): """Tests the import.""" return "Hello world!"
18.25
27
0.60274
0
0
0
0
0
0
0
0
37
0.506849
dbf810a25b7c035adf73121054a304443a683fb0
748
py
Python
core/migrations/0002_auto_20180702_1913.py
mertyildiran/echo
805db64e3fa9d31fd3c24390fac2e9bf7c91ad57
[ "Apache-2.0" ]
5
2018-07-26T22:48:00.000Z
2021-05-02T01:59:51.000Z
core/migrations/0002_auto_20180702_1913.py
mertyildiran/echo
805db64e3fa9d31fd3c24390fac2e9bf7c91ad57
[ "Apache-2.0" ]
null
null
null
core/migrations/0002_auto_20180702_1913.py
mertyildiran/echo
805db64e3fa9d31fd3c24390fac2e9bf7c91ad57
[ "Apache-2.0" ]
1
2018-08-04T14:07:53.000Z
2018-08-04T14:07:53.000Z
# Generated by Django 2.0.6 on 2018-07-02 19:13 import core.models from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0001_initial'), ] operations = [ migrations.RenameField( model_name='echo', old_name='own...
24.933333
99
0.57754
636
0.850267
0
0
0
0
0
0
117
0.156417
dbf954bdb4324156034054e74ee082a9dc8b9157
6,151
py
Python
tests/test_helpers.py
ajdavis/aiohttp
d5138978f3e82aa82a2f003b00d38112c58a40c1
[ "Apache-2.0" ]
1
2021-07-07T06:36:57.000Z
2021-07-07T06:36:57.000Z
tests/test_helpers.py
ajdavis/aiohttp
d5138978f3e82aa82a2f003b00d38112c58a40c1
[ "Apache-2.0" ]
null
null
null
tests/test_helpers.py
ajdavis/aiohttp
d5138978f3e82aa82a2f003b00d38112c58a40c1
[ "Apache-2.0" ]
null
null
null
import pytest from unittest import mock from aiohttp import helpers import datetime def test_parse_mimetype_1(): assert helpers.parse_mimetype('') == ('', '', '', {}) def test_parse_mimetype_2(): assert helpers.parse_mimetype('*') == ('*', '*', '', {}) def test_parse_mimetype_3(): assert (helpers.pars...
29.572115
79
0.643635
257
0.041782
0
0
1,218
0.198017
0
0
1,210
0.196716
dbf96ddd90a5808166e52168da5cadf7b4bb5c35
372
py
Python
GenConfigs.py
truls/faas-profiler
d54ca0d9926f38c693f616ba4d08414aea823f51
[ "MIT" ]
null
null
null
GenConfigs.py
truls/faas-profiler
d54ca0d9926f38c693f616ba4d08414aea823f51
[ "MIT" ]
null
null
null
GenConfigs.py
truls/faas-profiler
d54ca0d9926f38c693f616ba4d08414aea823f51
[ "MIT" ]
null
null
null
from os.path import join FAAS_ROOT="/lhome/trulsas/faas-profiler" WORKLOAD_SPECS=join(FAAS_ROOT, "specs", "workloads") #FAAS_ROOT="/home/truls/uni/phd/faas-profiler" WSK_PATH = "wsk" OPENWHISK_PATH = "/lhome/trulsas/openwhisk" #: Location of output data DATA_DIR = join(FAAS_ROOT, "..", "profiler_results") SYSTEM_CPU...
28.615385
61
0.736559
0
0
0
0
0
0
0
0
217
0.583333
dbfb34040aab0e7552b68ecebacb85f0a1f7a601
211
py
Python
Chapter09/calc.py
LuisPereda/Learning_Python
e89e69346c5584be10d991010f39b59329793ba5
[ "MIT" ]
null
null
null
Chapter09/calc.py
LuisPereda/Learning_Python
e89e69346c5584be10d991010f39b59329793ba5
[ "MIT" ]
null
null
null
Chapter09/calc.py
LuisPereda/Learning_Python
e89e69346c5584be10d991010f39b59329793ba5
[ "MIT" ]
null
null
null
def sum1(a,b): try: c = a+b return c except : print "Error in sum1 function" def divide(a,b): try: c = a/b return c except : print "Error in divide function" print divide(10,0) print sum1(10,0)
13.1875
34
0.635071
0
0
0
0
0
0
0
0
50
0.236967