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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
866be250cb91ad06867da752bf60c3e580b71448 | 1,687 | py | Python | openstack_dashboard/test/integration_tests/regions/messages.py | ankur-gupta91/block_storage | 938548a3d4507dc56c1c26b442767eb41aa2e610 | [
"Apache-2.0"
] | 1 | 2021-01-02T03:34:19.000Z | 2021-01-02T03:34:19.000Z | openstack_dashboard/test/integration_tests/regions/messages.py | ankur-gupta91/block_storage | 938548a3d4507dc56c1c26b442767eb41aa2e610 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/test/integration_tests/regions/messages.py | ankur-gupta91/block_storage | 938548a3d4507dc56c1c26b442767eb41aa2e610 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 36.673913 | 79 | 0.711322 | 863 | 0.511559 | 0 | 0 | 0 | 0 | 0 | 0 | 765 | 0.453468 |
866d362b7d20329b9a8556ff353eba1624b11b05 | 8,175 | py | Python | model_input.py | bgarbin/GUIDE | 06bca4e696b97ca14c11d74844d3b3ab7287f8f1 | [
"MIT"
] | null | null | null | model_input.py | bgarbin/GUIDE | 06bca4e696b97ca14c11d74844d3b3ab7287f8f1 | [
"MIT"
] | null | null | null | model_input.py | bgarbin/GUIDE | 06bca4e696b97ca14c11d74844d3b3ab7287f8f1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import numpy as np
#import cmath as cm
# Main parameters for window
# 'record_every': number of time_steps one between two consecutive record events
window_params = {'kernel': 'RK4','nstep_update_plot': 100, 'step_size': 0.01, 'array_size': 10000, 'streaming': True, 'record_state':False, ... | 65.4 | 761 | 0.651865 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,481 | 0.670459 |
866eb114075c78f8e3231df363ccab857402a80e | 1,464 | py | Python | input/EnvEq/pairwise/Tneg-Tpro/u_lim_o2Tpro-u_lim_o2Tneg/parallelizer.py | Harshavardhan-BV/Cancer-compe-strat | e4decacd5779e85a68c81d0ce3bedf42dea2964f | [
"MIT"
] | 1 | 2020-10-18T15:54:26.000Z | 2020-10-18T15:54:26.000Z | input/EnvEq/pairwise/Tneg-Tpro/u_lim_o2Tpro-u_lim_o2Tneg/parallelizer.py | Harshavardhan-BV/Cancer-compe-strat | e4decacd5779e85a68c81d0ce3bedf42dea2964f | [
"MIT"
] | null | null | null | input/EnvEq/pairwise/Tneg-Tpro/u_lim_o2Tpro-u_lim_o2Tneg/parallelizer.py | Harshavardhan-BV/Cancer-compe-strat | e4decacd5779e85a68c81d0ce3bedf42dea2964f | [
"MIT"
] | null | null | null | from multiprocessing import Pool
import EnvEq as ee
import numpy as np
import itertools as it
import os
#parsing input into numpy arrays
from input import *
y0=np.array([y0_Tpos,y0_Tpro,y0_Tneg,y0_o2,y0_test])
p=np.array([p_o2,p_test])
mu=np.array([[mu_o2Tpos,mu_o2Tpro,mu_o2Tneg],[mu_testTpos,mu_testTpro,0]])
lam=np.a... | 34.046512 | 190 | 0.733607 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 242 | 0.165301 |
866f56e685c4eea3f8e5c6a81ebbf185f955f32d | 4,495 | py | Python | task1_makeTrainingDataset.py | 1985312383/contest | c4734647ad436cf5884075f906a3e9f10fc4dcfa | [
"Apache-2.0"
] | 2 | 2021-12-10T08:38:47.000Z | 2021-12-31T08:44:18.000Z | task1_makeTrainingDataset.py | huxiaoyi0625/Mathematical_Modeling_Contest_E_2021 | 40293aa2375daa46d2351870c72394d4e1114081 | [
"Apache-2.0"
] | null | null | null | task1_makeTrainingDataset.py | huxiaoyi0625/Mathematical_Modeling_Contest_E_2021 | 40293aa2375daa46d2351870c72394d4e1114081 | [
"Apache-2.0"
] | null | null | null | import csv
import re
import numpy as np
thre = 1.5 # 要调整的参数,这个是阈值
iteration_num = 2 # 要调整的参数,这个是迭代次数
def KalmanFilter(z, n_iter=20):
# 卡尔曼滤波
# 这里是假设A=1,H=1的情况
# intial parameters
sz = (n_iter,) # size of array
# Q = 1e-5 # process variance
Q = 1e-6 # process variance
# allocate space... | 36.544715 | 117 | 0.602447 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,610 | 0.323618 |
866fc71e2531405289f44f8b89f61a0e57369c55 | 321 | py | Python | checkmate/contrib/plugins/all/progpilot/setup.py | marcinguy/checkmate-ce | fc33c7c27bc640ab4db5dbda274a0edd3b3db218 | [
"MIT"
] | null | null | null | checkmate/contrib/plugins/all/progpilot/setup.py | marcinguy/checkmate-ce | fc33c7c27bc640ab4db5dbda274a0edd3b3db218 | [
"MIT"
] | null | null | null | checkmate/contrib/plugins/all/progpilot/setup.py | marcinguy/checkmate-ce | fc33c7c27bc640ab4db5dbda274a0edd3b3db218 | [
"MIT"
] | null | null | null | from .analyzer import ProgpilotAnalyzer
from .issues_data import issues_data
analyzers = {
'phpanlyzer' :
{
'name' : 'phpanalyzer',
'title' : 'phpanalyzer',
'class' : ProgpilotAnalyzer,
'language' : 'all',
'issues_data' : issues_data,
},
}... | 22.928571 | 40 | 0.535826 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 86 | 0.267913 |
8671b6a372caa3589eb77dcc566a9b3713aa80a9 | 6,499 | py | Python | genlist.py | truckli/technotes | 11d3cc0a1bd33141a22eaa2247cac1be1d74718a | [
"Apache-2.0"
] | null | null | null | genlist.py | truckli/technotes | 11d3cc0a1bd33141a22eaa2247cac1be1d74718a | [
"Apache-2.0"
] | null | null | null | genlist.py | truckli/technotes | 11d3cc0a1bd33141a22eaa2247cac1be1d74718a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import shutil, re, os, sys
file_model = "Model.template"
bookname = "TechNotes"
file_bibtex = "thebib.bib"
folder_target = "../pdf/"
#if name is a chapter, return its sections
def get_sections(name):
if not os.path.isdir(name):
return []
files = os.listdir(name)
sections = ... | 27.892704 | 82 | 0.610248 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,624 | 0.249885 |
86720b27c369fdf8140425890d2127c46b5bc111 | 24,252 | py | Python | editing files/Portable Python 3.2.5.1/App/Lib/site-packages/serial/serialposix.py | mattl1598/testing | cd8124773b83a07301c507ffbb9ccaafbfe7a274 | [
"Unlicense"
] | null | null | null | editing files/Portable Python 3.2.5.1/App/Lib/site-packages/serial/serialposix.py | mattl1598/testing | cd8124773b83a07301c507ffbb9ccaafbfe7a274 | [
"Unlicense"
] | 1 | 2018-04-15T22:59:15.000Z | 2018-04-15T22:59:15.000Z | editing files/Portable Python 3.2.5.1/App/Lib/site-packages/serial/serialposix.py | mattl1598/Project-Mochachino | cd8124773b83a07301c507ffbb9ccaafbfe7a274 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
#
# Python Serial Port Extension for Win32, Linux, BSD, Jython
# module for serial IO for POSIX compatible systems, like Linux
# see __init__.py
#
# (C) 2001-2010 Chris Liechti <cliechti@gmx.net>
# this is distributed under a free software license, see license.txt
#
# parts based on code from Gran... | 37.253456 | 117 | 0.601023 | 14,653 | 0.604198 | 0 | 0 | 0 | 0 | 0 | 0 | 8,487 | 0.349951 |
86735b1546f055d4c408acb184f9fb83f843ede1 | 2,272 | py | Python | Older Examples - enter at your own risk/lavender_pos/app/models.py | electricimp/examples | ebdd01baf64f3aa67f027194457432c7d7501d37 | [
"MIT"
] | 26 | 2015-01-17T23:43:06.000Z | 2021-09-28T18:24:28.000Z | Older Examples - enter at your own risk/lavender_pos/app/models.py | silver2row/examples | 0ef3bd4b4a875364db883c7c387f1f175a3ce61e | [
"MIT"
] | 5 | 2015-02-27T22:23:39.000Z | 2020-10-19T23:58:55.000Z | Older Examples - enter at your own risk/lavender_pos/app/models.py | silver2row/examples | 0ef3bd4b4a875364db883c7c387f1f175a3ce61e | [
"MIT"
] | 42 | 2015-01-22T16:33:12.000Z | 2021-01-14T02:33:15.000Z | import datetime
from database import Base
from sqlalchemy import Column, String, Integer, ForeignKey, DateTime, Float
class User(Base):
__tablename__ = 'users'
id = Column(Integer, primary_key=True)
first_name = Column(String(255))
last_name = Column(String(255))
email = Column(String(255), index... | 28.049383 | 81 | 0.652729 | 2,143 | 0.943222 | 0 | 0 | 0 | 0 | 0 | 0 | 815 | 0.358715 |
8674487bc14ab6d974246602ccaa1b9927159028 | 4,724 | py | Python | rr_ml/nodes/end_to_end/train.py | ebretl/roboracing-software | 8803c97a885500069d04e70894b19f807ae5baf9 | [
"MIT"
] | null | null | null | rr_ml/nodes/end_to_end/train.py | ebretl/roboracing-software | 8803c97a885500069d04e70894b19f807ae5baf9 | [
"MIT"
] | null | null | null | rr_ml/nodes/end_to_end/train.py | ebretl/roboracing-software | 8803c97a885500069d04e70894b19f807ae5baf9 | [
"MIT"
] | null | null | null | import os
import math
import string
import numpy as np
import rospy
import keras
from keras.models import Sequential
from keras.layers import Dense, Dropout, Flatten, Conv2D, MaxPooling2D, \
GaussianNoise, BatchNormalization
import cv2
import collections
import random
import time
from example_s... | 33.503546 | 94 | 0.622777 | 0 | 0 | 2,989 | 0.632727 | 0 | 0 | 0 | 0 | 432 | 0.091448 |
86748acfd2e2d6f503ac8703ff17fb7002cb2fc1 | 252 | py | Python | build/lib/Kronos_heureka_code/Zeit/__init__.py | heureka-code/Kronos-heureka-code | 0ddbc93ec69f0bc50075071e6a3e406c9cc97737 | [
"MIT"
] | null | null | null | build/lib/Kronos_heureka_code/Zeit/__init__.py | heureka-code/Kronos-heureka-code | 0ddbc93ec69f0bc50075071e6a3e406c9cc97737 | [
"MIT"
] | null | null | null | build/lib/Kronos_heureka_code/Zeit/__init__.py | heureka-code/Kronos-heureka-code | 0ddbc93ec69f0bc50075071e6a3e406c9cc97737 | [
"MIT"
] | null | null | null | from Kronos_heureka_code.Zeit.Uhrzeit import Uhrzeit, Stunde, Minute, Sekunde
from Kronos_heureka_code.Zeit.Datum.Monat import Monate
from Kronos_heureka_code.Zeit.Datum.Jahr import Jahr, Zeitrechnung
from Kronos_heureka_code.Zeit.Datum.Tag import Tag
| 50.4 | 77 | 0.861111 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
867600e9a45eebd6cdfd857a6ba6c53cc063cb70 | 845 | py | Python | retro_star/utils/logger.py | cthoyt/retro_star | 280231eb2f5dffc0e14bed300d770977b323205a | [
"MIT"
] | 65 | 2020-06-27T04:28:21.000Z | 2022-03-30T11:18:22.000Z | retro_star/utils/logger.py | cthoyt/retro_star | 280231eb2f5dffc0e14bed300d770977b323205a | [
"MIT"
] | 15 | 2020-07-07T13:17:05.000Z | 2022-03-22T12:52:29.000Z | retro_star/utils/logger.py | cthoyt/retro_star | 280231eb2f5dffc0e14bed300d770977b323205a | [
"MIT"
] | 14 | 2020-06-30T09:22:13.000Z | 2022-03-30T11:18:28.000Z | import logging
def setup_logger(fname=None, silent=False):
if fname is None:
logging.basicConfig(
level=logging.INFO if not silent else logging.CRITICAL,
format='%(name)-12s: %(levelname)-8s %(message)s',
datefmt='%m-%d %H:%M',
filemode='w'
)
els... | 33.8 | 81 | 0.571598 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 171 | 0.202367 |
86760e9869adb9d8e359c444118b7fb153ad2c74 | 63,014 | py | Python | Packs/MISP/Integrations/MISPV3/MISPV3.py | hiep4hiep/content | f609c4c9548fe2188e8e2e00b2c9e80a74e24427 | [
"MIT"
] | null | null | null | Packs/MISP/Integrations/MISPV3/MISPV3.py | hiep4hiep/content | f609c4c9548fe2188e8e2e00b2c9e80a74e24427 | [
"MIT"
] | 42 | 2022-03-11T10:52:26.000Z | 2022-03-31T01:50:42.000Z | Packs/MISP/Integrations/MISPV3/MISPV3.py | hiep4hiep/content | f609c4c9548fe2188e8e2e00b2c9e80a74e24427 | [
"MIT"
] | null | null | null | # type: ignore
from typing import Union, List, Dict
from urllib.parse import urlparse
import urllib3
from pymisp import ExpandedPyMISP, PyMISPError, MISPObject, MISPSighting, MISPEvent, MISPAttribute
from pymisp.tools import GenericObjectGenerator
import copy
from pymisp.tools import FileObject
from CommonServerPytho... | 41.869767 | 120 | 0.674295 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 21,379 | 0.339247 |
867722c3f684f02eb3e24dffeab626e5a7b8bb2c | 19,936 | py | Python | pycle/bicycle-scrapes/epey-scrape/downLink5.py | fusuyfusuy/School-Projects | 8e38f19da90f63ac9c9ec91e550fc5aaab3d0234 | [
"MIT"
] | null | null | null | pycle/bicycle-scrapes/epey-scrape/downLink5.py | fusuyfusuy/School-Projects | 8e38f19da90f63ac9c9ec91e550fc5aaab3d0234 | [
"MIT"
] | null | null | null | pycle/bicycle-scrapes/epey-scrape/downLink5.py | fusuyfusuy/School-Projects | 8e38f19da90f63ac9c9ec91e550fc5aaab3d0234 | [
"MIT"
] | null | null | null |
from bs4 import BeautifulSoup
import os
import wget
from urllib.request import Request, urlopen
bicycles=[{'name': 'Kron XC150 27.5 HD Bisiklet', 'link': 'https://www.epey.com/bisiklet/kron-xc150-27-5-hd.html'}, {'name': 'Corelli Trivor 3 Bisiklet', 'link': 'https://www.epey.com/bisiklet/corelli-trivor-3-0.html'}, {'... | 906.181818 | 19,356 | 0.688353 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 17,761 | 0.88983 |
86789c8feaa8d10751a8b27ad6e7fc323ebc39ff | 956 | py | Python | redmine/__init__.py | hugoseabra/redmine-task-generator | b5ce1764f1c7588a7c82b25f7dd4bf07d1c105cf | [
"MIT"
] | null | null | null | redmine/__init__.py | hugoseabra/redmine-task-generator | b5ce1764f1c7588a7c82b25f7dd4bf07d1c105cf | [
"MIT"
] | 4 | 2021-03-30T14:04:56.000Z | 2021-06-10T19:40:52.000Z | redmine/__init__.py | hugoseabra/redmine-task-generator | b5ce1764f1c7588a7c82b25f7dd4bf07d1c105cf | [
"MIT"
] | null | null | null | from django.conf import settings
from redminelib import Redmine as DefaultRedmine
from .validator import RedmineInstanceValidator
class Redmine(DefaultRedmine):
def __init__(self, url=None, key=None):
url = url or settings.REDMINE_BASE_URL
key = key or settings.REDMINE_API_KEY
super().__i... | 28.117647 | 62 | 0.696653 | 822 | 0.859833 | 0 | 0 | 78 | 0.08159 | 0 | 0 | 0 | 0 |
8678e0fdfc11399c75f91f8ec0af910ceb4aab00 | 3,212 | py | Python | python_survey/finished_files/main.py | trenton3983/PyCharmProjects | fae8653a25e07e7384eb0ddf6ea191adeb44face | [
"MIT"
] | null | null | null | python_survey/finished_files/main.py | trenton3983/PyCharmProjects | fae8653a25e07e7384eb0ddf6ea191adeb44face | [
"MIT"
] | null | null | null | python_survey/finished_files/main.py | trenton3983/PyCharmProjects | fae8653a25e07e7384eb0ddf6ea191adeb44face | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import scipy.stats
from finished_files.survey_data_dictionary import DATA_DICTIONARY
# Load data
# We want to take the names list from our data dictionary
names = [x.name for x in DATA_DICTIONARY]
# Generate the list of names to import
usecols =... | 31.184466 | 79 | 0.699253 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,644 | 0.511512 |
8679399f0ab155a65d5523949359b9a4e0752af4 | 4,918 | py | Python | adet/modeling/embedmask/mask_pred.py | yinghdb/AdelaiDet | 94a9b7cde92fb039852f876964d991a1f3e15af4 | [
"BSD-2-Clause"
] | 3 | 2021-05-21T08:02:48.000Z | 2021-11-05T11:06:40.000Z | adet/modeling/embedmask/mask_pred.py | yinghdb/AdelaiDet | 94a9b7cde92fb039852f876964d991a1f3e15af4 | [
"BSD-2-Clause"
] | null | null | null | adet/modeling/embedmask/mask_pred.py | yinghdb/AdelaiDet | 94a9b7cde92fb039852f876964d991a1f3e15af4 | [
"BSD-2-Clause"
] | 1 | 2021-05-24T06:53:32.000Z | 2021-05-24T06:53:32.000Z | import torch
from torch.nn import functional as F
from torch import nn
from torch.autograd import Variable
from adet.utils.comm import compute_locations, aligned_bilinear
def dice_coefficient(x, target):
eps = 1e-5
n_inst = x.size(0)
x = x.reshape(n_inst, -1)
target = target.reshape(n_inst, -1)
in... | 36.42963 | 135 | 0.637861 | 2,923 | 0.594347 | 0 | 0 | 0 | 0 | 0 | 0 | 418 | 0.084994 |
86798d0504dd04df9298eafb92e49de14fb4653a | 3,804 | py | Python | cloudferry/actions/prechecks/check_vmax_prerequisites.py | SVilgelm/CloudFerry | 4459c0d21ba7ccffe51176932197b352e426ba63 | [
"Apache-2.0"
] | 6 | 2017-04-20T00:49:49.000Z | 2020-12-20T16:27:10.000Z | cloudferry/actions/prechecks/check_vmax_prerequisites.py | SVilgelm/CloudFerry | 4459c0d21ba7ccffe51176932197b352e426ba63 | [
"Apache-2.0"
] | 3 | 2017-04-08T15:47:16.000Z | 2017-05-18T17:40:59.000Z | cloudferry/actions/prechecks/check_vmax_prerequisites.py | SVilgelm/CloudFerry | 4459c0d21ba7ccffe51176932197b352e426ba63 | [
"Apache-2.0"
] | 8 | 2017-04-07T23:42:36.000Z | 2021-08-10T11:05:10.000Z | # Copyright 2016 Mirantis 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,... | 41.347826 | 79 | 0.624869 | 2,984 | 0.784437 | 0 | 0 | 0 | 0 | 0 | 0 | 1,546 | 0.406414 |
8679dfd086b9b3768ebf7c42ebcbb01fc263b720 | 2,569 | py | Python | bongo/core.py | codeforamerica/bongo | a1b162c54fc51630ae1cfac16e1c136b0ff320a3 | [
"BSD-3-Clause"
] | null | null | null | bongo/core.py | codeforamerica/bongo | a1b162c54fc51630ae1cfac16e1c136b0ff320a3 | [
"BSD-3-Clause"
] | null | null | null | bongo/core.py | codeforamerica/bongo | a1b162c54fc51630ae1cfac16e1c136b0ff320a3 | [
"BSD-3-Clause"
] | 1 | 2021-04-17T10:21:05.000Z | 2021-04-17T10:21:05.000Z | """
A simple wrapper for the Bongo Iowa City bus API.
"""
import requests as req
class Bongo(object):
"""
A simple Python wrapper for the Bongo Iowa City bus API.
"""
def __init__(self, format='json'):
self.format = format
def get(self, endpoint, **kwargs):
"""Perform a HTTP GET... | 27.623656 | 72 | 0.534838 | 2,484 | 0.966913 | 0 | 0 | 0 | 0 | 0 | 0 | 1,214 | 0.472557 |
867a45f315cdcc7854ea80a22125e3ed4f3423db | 1,671 | py | Python | src/security/tcp_flooding.py | janaSunrise/useful-python-snippets | f03285b8f0b44f87326ca982129dab80a18697f5 | [
"Apache-2.0"
] | 1 | 2021-03-15T16:48:05.000Z | 2021-03-15T16:48:05.000Z | src/security/tcp_flooding.py | janaSunrise/useful-python-snippets | f03285b8f0b44f87326ca982129dab80a18697f5 | [
"Apache-2.0"
] | null | null | null | src/security/tcp_flooding.py | janaSunrise/useful-python-snippets | f03285b8f0b44f87326ca982129dab80a18697f5 | [
"Apache-2.0"
] | null | null | null | import random
import socket
import string
import sys
import threading
import time
def attack(host: str, port: int = 80, request_count: int = 10 ** 10) -> None:
# Threading support
thread_num = 0
thread_num_mutex = threading.Lock()
# Utility function
def print_status() -> None:
global thre... | 26.109375 | 88 | 0.591263 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 282 | 0.168761 |
867a66ae5d5de251f9ea678d34a2cd01a411db2e | 443 | py | Python | src/ml_final_project/utils/evaluators/default.py | yuvalot/ml_final_project | fefb67c92504ceeb7999e49daa8a8aa5a60f1c61 | [
"MIT"
] | null | null | null | src/ml_final_project/utils/evaluators/default.py | yuvalot/ml_final_project | fefb67c92504ceeb7999e49daa8a8aa5a60f1c61 | [
"MIT"
] | null | null | null | src/ml_final_project/utils/evaluators/default.py | yuvalot/ml_final_project | fefb67c92504ceeb7999e49daa8a8aa5a60f1c61 | [
"MIT"
] | null | null | null | def default_evaluator(model, X_test, y_test):
"""A simple evaluator that takes in a model,
and a test set, and returns the loss.
Args:
model: The model to evaluate.
X_test: The features matrix of the test set.
y_test: The one-hot labels matrix of the test set.
... | 31.642857 | 61 | 0.598194 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 333 | 0.751693 |
867addf71ccf4a2d2cc021bb3410dbc784317269 | 319 | py | Python | test.py | wangjm12138/Yolov3_wang | 3d143c7cd863dec796edede3faedacc6590cab5e | [
"MIT"
] | null | null | null | test.py | wangjm12138/Yolov3_wang | 3d143c7cd863dec796edede3faedacc6590cab5e | [
"MIT"
] | 8 | 2020-01-28T22:17:25.000Z | 2022-03-12T00:04:30.000Z | test.py | wangjm12138/Yolov3_wang | 3d143c7cd863dec796edede3faedacc6590cab5e | [
"MIT"
] | null | null | null | import random
class Yolov3(object):
def __init__(self):
self.num=0
self.input_size=[8,16,32]
def __iter__(self):
return self
def __next__(self):
a = random.choice(self.input_size)
self.num=self.num+1
if self.num<3:
return a
else:
raise StopIteration
yolo=Yolov3()
for data in yolo:
print(data)
| 16.789474 | 36 | 0.702194 | 259 | 0.811912 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
867af3eaf92e62e8468d18b191fba31f6c76639c | 2,836 | py | Python | utils/dsp.py | huchenxucs/WaveRNN | 6d5805d54b8a3db99aa190083b550236f2c15d28 | [
"MIT"
] | null | null | null | utils/dsp.py | huchenxucs/WaveRNN | 6d5805d54b8a3db99aa190083b550236f2c15d28 | [
"MIT"
] | null | null | null | utils/dsp.py | huchenxucs/WaveRNN | 6d5805d54b8a3db99aa190083b550236f2c15d28 | [
"MIT"
] | null | null | null | import math
import numpy as np
import librosa
from utils import hparams as hp
from scipy.signal import lfilter
import soundfile as sf
def label_2_float(x, bits):
return 2 * x / (2**bits - 1.) - 1.
def float_2_label(x, bits):
assert abs(x).max() <= 1.0
x = (x + 1.) * (2**bits - 1) / 2
return x.clip(0... | 23.831933 | 91 | 0.645275 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 348 | 0.122708 |
867b8e99cfbed437050f3b3f92884ccf95f2bf33 | 6,407 | py | Python | loldib/getratings/models/NA/na_talon/na_talon_jng.py | koliupy/loldib | c9ab94deb07213cdc42b5a7c26467cdafaf81b7f | [
"Apache-2.0"
] | null | null | null | loldib/getratings/models/NA/na_talon/na_talon_jng.py | koliupy/loldib | c9ab94deb07213cdc42b5a7c26467cdafaf81b7f | [
"Apache-2.0"
] | null | null | null | loldib/getratings/models/NA/na_talon/na_talon_jng.py | koliupy/loldib | c9ab94deb07213cdc42b5a7c26467cdafaf81b7f | [
"Apache-2.0"
] | null | null | null | from getratings.models.ratings import Ratings
class NA_Talon_Jng_Aatrox(Ratings):
pass
class NA_Talon_Jng_Ahri(Ratings):
pass
class NA_Talon_Jng_Akali(Ratings):
pass
class NA_Talon_Jng_Alistar(Ratings):
pass
class NA_Talon_Jng_Amumu(Ratings):
pass
class NA_Talon_Jng_Anivia(Ratings):
pass
... | 15.364508 | 46 | 0.761667 | 5,806 | 0.906196 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
867b9f7391f64037b68d280aea495bc5295d4119 | 1,256 | py | Python | utils/turkish.py | derenyilmaz/personality-analysis-framework | 9e1f3ac1047b1df07498159de23f88f87644d195 | [
"MIT"
] | 1 | 2021-09-15T14:44:45.000Z | 2021-09-15T14:44:45.000Z | utils/turkish.py | derenyilmaz/personality-analysis-framework | 9e1f3ac1047b1df07498159de23f88f87644d195 | [
"MIT"
] | 1 | 2022-03-12T00:48:01.000Z | 2022-03-12T00:48:01.000Z | utils/turkish.py | derenyilmaz/personality-analysis-framework | 9e1f3ac1047b1df07498159de23f88f87644d195 | [
"MIT"
] | null | null | null | class TurkishText():
"""Class for handling lowercase/uppercase conversions of Turkish characters..
Attributes:
text -- Turkish text to be handled
"""
text = ""
l = ['ı', 'ğ', 'ü', 'ş', 'i', 'ö', 'ç']
u = ['I', 'Ğ', 'Ü', 'Ş', 'İ', 'Ö', 'Ç']
def __init__(self, text):
self.te... | 26.166667 | 86 | 0.468153 | 1,267 | 0.999211 | 0 | 0 | 0 | 0 | 0 | 0 | 484 | 0.381703 |
867bbaa4b747400e8e0dce95ef2502b3a1d6e3df | 188 | py | Python | app/helpers/geocode.py | Soumya117/finnazureflaskapp | 794f82596a329ff1a2e4dc23d49903a0ef474f95 | [
"MIT"
] | null | null | null | app/helpers/geocode.py | Soumya117/finnazureflaskapp | 794f82596a329ff1a2e4dc23d49903a0ef474f95 | [
"MIT"
] | 2 | 2021-03-31T20:43:02.000Z | 2021-12-13T20:13:40.000Z | app/helpers/geocode.py | Soumya117/finnparser | e89ff6e1a0c08b57a1b2f971d5f7bb888c2f4a05 | [
"MIT"
] | null | null | null | import googlemaps
gmaps = googlemaps.Client(key='google_key')
def get_markers(address):
geocode_result = gmaps.geocode(address)
return geocode_result[0]['geometry']['location']
| 20.888889 | 52 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 32 | 0.170213 |
868018c92dba01d6288623e8f84851ac57ade115 | 3,427 | py | Python | tf/estimators/keras_estimator.py | aspratyush/dl_utils | c067831f3c72aba88223c231c7fbc249d997e222 | [
"Apache-2.0"
] | null | null | null | tf/estimators/keras_estimator.py | aspratyush/dl_utils | c067831f3c72aba88223c231c7fbc249d997e222 | [
"Apache-2.0"
] | null | null | null | tf/estimators/keras_estimator.py | aspratyush/dl_utils | c067831f3c72aba88223c231c7fbc249d997e222 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
# Imports
import os
import numpy as np
import tensorflow as tf
def run(model, X, Y, optimizer=None, nb_epochs=30, nb_batches=128):
"""
Run the estimator
"""
if optimizer is None:
optim... | 31.731481 | 85 | 0.66443 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,106 | 0.322731 |
8681c3c33618ecd1ae623aef1502da24ff44d7f8 | 15,279 | py | Python | isign/archive.py | l0ui3/isign | c0730ac1ce1b32defe8c6016e19b9701184b0f5a | [
"Apache-2.0"
] | 1 | 2020-03-24T14:22:17.000Z | 2020-03-24T14:22:17.000Z | isign/archive.py | l0ui3/isign | c0730ac1ce1b32defe8c6016e19b9701184b0f5a | [
"Apache-2.0"
] | null | null | null | isign/archive.py | l0ui3/isign | c0730ac1ce1b32defe8c6016e19b9701184b0f5a | [
"Apache-2.0"
] | 1 | 2021-08-16T04:03:25.000Z | 2021-08-16T04:03:25.000Z | """ Represents an app archive. This is an app at rest, whether it's a naked
app bundle in a directory, or a zipped app bundle, or an IPA. We have a
common interface to extract these apps to a temp file, then resign them,
and create an archive of the same type """
import abc
import biplist
from bundle impor... | 37.540541 | 97 | 0.638458 | 9,902 | 0.648079 | 0 | 0 | 5,877 | 0.384646 | 0 | 0 | 5,218 | 0.341514 |
8681dc9beb7ce1fcfe008337221dc6feb16aedb5 | 1,888 | py | Python | conan/tools/env/virtualrunenv.py | dscole/conan | ff7b8e6703e8407773968517d68424b9ec59aa30 | [
"MIT"
] | null | null | null | conan/tools/env/virtualrunenv.py | dscole/conan | ff7b8e6703e8407773968517d68424b9ec59aa30 | [
"MIT"
] | 1 | 2019-06-07T03:02:02.000Z | 2019-06-07T03:02:02.000Z | conan/tools/env/virtualrunenv.py | dscole/conan | ff7b8e6703e8407773968517d68424b9ec59aa30 | [
"MIT"
] | 1 | 2021-08-20T19:47:51.000Z | 2021-08-20T19:47:51.000Z | from conan.tools.env import Environment
def runenv_from_cpp_info(conanfile, cpp_info):
""" return an Environment deducing the runtime information from a cpp_info
"""
dyn_runenv = Environment(conanfile)
if cpp_info is None: # This happens when the dependency is a private one = BINARY_SKIP
retu... | 37.76 | 94 | 0.697034 | 1,030 | 0.545551 | 0 | 0 | 0 | 0 | 0 | 0 | 627 | 0.332097 |
868508f96e8daab66111c1b9c301708733421f4d | 652 | py | Python | src/api/api_lists/models/list.py | rrickgauer/lists | 371de6af332789ef386392fd24857702794d05a6 | [
"Apache-2.0"
] | null | null | null | src/api/api_lists/models/list.py | rrickgauer/lists | 371de6af332789ef386392fd24857702794d05a6 | [
"Apache-2.0"
] | 67 | 2021-12-14T22:30:56.000Z | 2022-03-15T18:28:27.000Z | src/api/api_lists/models/list.py | rrickgauer/lists | 371de6af332789ef386392fd24857702794d05a6 | [
"Apache-2.0"
] | null | null | null | """
**********************************************************************************
List model
**********************************************************************************
"""
from enum import Enum
from dataclasses import dataclass
from uuid import UUID
from datetime import datetime
class ListType(str, Enum... | 23.285714 | 82 | 0.460123 | 342 | 0.52454 | 0 | 0 | 263 | 0.403374 | 0 | 0 | 200 | 0.306748 |
86852eaa353d7f71b07181e8c40327dffa81fc7f | 12,985 | py | Python | config/appdaemon/apps/power_alarm.py | azogue/hassio_config | 591f158794c173d6391179ab2f52348d58c49aad | [
"MIT"
] | 18 | 2018-07-22T15:19:20.000Z | 2022-01-09T20:57:43.000Z | config/appdaemon/apps/power_alarm.py | azogue/hassio_config | 591f158794c173d6391179ab2f52348d58c49aad | [
"MIT"
] | 1 | 2020-04-30T08:33:36.000Z | 2020-05-03T08:25:00.000Z | config/appdaemon/apps/power_alarm.py | azogue/hassio_config | 591f158794c173d6391179ab2f52348d58c49aad | [
"MIT"
] | 8 | 2018-07-21T09:29:53.000Z | 2021-11-10T19:06:32.000Z | # -*- coding: utf-8 -*-
"""
Automation task as a AppDaemon App for Home Assistant -
current meter PEAK POWER notifications
"""
import datetime as dt
from enum import IntEnum
import appdaemon.plugins.hass.hassapi as hass
LOG_LEVEL = "INFO"
LOG_LEVEL_ALERT = "WARNING"
LOGGER = "special_event_log"
COEF_CRITICAL_LIMIT ... | 35.285326 | 79 | 0.5196 | 12,315 | 0.947891 | 0 | 0 | 0 | 0 | 0 | 0 | 2,966 | 0.228294 |
86857d42e426b63b37d2aa71caa37b9b57dd862e | 13,391 | py | Python | mailmynet/Maildir/proxy_postfix/Twisted-11.0.0/build/lib.linux-x86_64-2.6/twisted/internet/gtk2reactor.py | SPIN-UMass/SWEET | 1b0f39222e7064f70812e3293ca023619295741d | [
"MIT"
] | 3 | 2020-04-02T06:23:44.000Z | 2020-08-13T20:32:31.000Z | mailmynet/Maildir/proxy_postfix/Twisted-11.0.0/twisted/internet/gtk2reactor.py | SPIN-UMass/SWEET | 1b0f39222e7064f70812e3293ca023619295741d | [
"MIT"
] | null | null | null | mailmynet/Maildir/proxy_postfix/Twisted-11.0.0/twisted/internet/gtk2reactor.py | SPIN-UMass/SWEET | 1b0f39222e7064f70812e3293ca023619295741d | [
"MIT"
] | 1 | 2020-04-02T06:26:10.000Z | 2020-04-02T06:26:10.000Z | # -*- test-case-name: twisted.internet.test -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
This module provides support for Twisted to interact with the glib/gtk2
mainloop.
In order to use this support, simply do the following::
| from twisted.internet import gtk2reactor
| ... | 33.394015 | 92 | 0.633933 | 10,514 | 0.785154 | 0 | 0 | 0 | 0 | 0 | 0 | 5,364 | 0.400568 |
86864787ee128fda8f0e696df8fc12952938543c | 4,356 | py | Python | run_mod.py | fpl-analytics/gr_crypto | 2b0ab451c9c205a9f572c4bca23fffbb68ca188f | [
"MIT"
] | null | null | null | run_mod.py | fpl-analytics/gr_crypto | 2b0ab451c9c205a9f572c4bca23fffbb68ca188f | [
"MIT"
] | null | null | null | run_mod.py | fpl-analytics/gr_crypto | 2b0ab451c9c205a9f572c4bca23fffbb68ca188f | [
"MIT"
] | null | null | null | """
Setup:
- Import Libraries
- Setup tf on multiple cores
- Import Data
"""
import pandas as pd
import numpy as np
import tensorflow as tf
import seaborn as sns
from time import time
import multiprocessing
import random
import os
from tensorflow.keras.models import Sequential
from tensorflow.keras.layer... | 25.623529 | 93 | 0.677456 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,044 | 0.239669 |
8687420e46b4f12f33134641d5dcf6986b995994 | 4,012 | py | Python | bot.py | menlen/one | e24f1489d98faa9b548ebd668f2860c8d671b489 | [
"Apache-2.0"
] | null | null | null | bot.py | menlen/one | e24f1489d98faa9b548ebd668f2860c8d671b489 | [
"Apache-2.0"
] | null | null | null | bot.py | menlen/one | e24f1489d98faa9b548ebd668f2860c8d671b489 | [
"Apache-2.0"
] | null | null | null | # This example show how to use inline keyboards and process button presses
import telebot
import time
from telebot.types import InlineKeyboardMarkup, InlineKeyboardButton
import os, sys
from PIL import Image, ImageDraw, ImageFont
import random
TELEGRAM_TOKEN = '1425859530:AAF5MQE87Zg_bv3B2RLe3Vl2A5rMz6vYpsA'
... | 30.861538 | 181 | 0.592722 | 0 | 0 | 0 | 0 | 1,195 | 0.297856 | 0 | 0 | 1,269 | 0.316301 |
86878499d4795f1de654ad30bc93467d3e84cd3c | 261 | py | Python | novice/python-unit-testing/answers/test_rectangle2.py | Southampton-RSG/2019-03-13-southampton-swc | 1f07d82c1bd1f237a19fa7a17bb4765e0364dc88 | [
"CC-BY-4.0"
] | 1 | 2021-06-20T11:51:37.000Z | 2021-06-20T11:51:37.000Z | novice/python-unit-testing/answers/test_rectangle2.py | Southampton-RSG/2019-03-13-southampton-swc | 1f07d82c1bd1f237a19fa7a17bb4765e0364dc88 | [
"CC-BY-4.0"
] | 1 | 2019-09-30T21:15:32.000Z | 2019-09-30T21:15:32.000Z | novice/python-unit-testing/answers/test_rectangle2.py | Southampton-RSG/2019-03-13-southampton-swc | 1f07d82c1bd1f237a19fa7a17bb4765e0364dc88 | [
"CC-BY-4.0"
] | null | null | null | from rectangle2 import rectangle_area
def test_unit_square():
assert rectangle_area([0, 0, 1, 1]) == 1.0
def test_large_square():
assert rectangle_area([1, 1, 4, 4]) == 9.0
def test_actual_rectangle():
assert rectangle_area([0, 1, 4, 7]) == 24.0
| 23.727273 | 47 | 0.67433 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8687b3a09f22f924b0323932d63831d4c09242d4 | 3,081 | py | Python | tests/requestreply.py | unclechu/py-radio-class | 8f96d8bcb398693d18a4ebd732415a879047edee | [
"MIT"
] | null | null | null | tests/requestreply.py | unclechu/py-radio-class | 8f96d8bcb398693d18a4ebd732415a879047edee | [
"MIT"
] | null | null | null | tests/requestreply.py | unclechu/py-radio-class | 8f96d8bcb398693d18a4ebd732415a879047edee | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from unittest import TestCase, TestLoader
from radio import (Radio, ListenerNotFound, ReplyHandlerAlreadyBound,
HandlerAlreadyBound)
def init_radio(f):
def wrap(self, *args):
self.radio = Radio()
return f(self, *args)
return wrap
class TestRadio... | 28.794393 | 75 | 0.627069 | 2,700 | 0.876339 | 0 | 0 | 2,619 | 0.850049 | 0 | 0 | 678 | 0.220058 |
8687c290ea5275e332a8f9c623d8f42da0525b01 | 244 | py | Python | mayan/apps/rest_api/exceptions.py | sophiawa/Mayan-EDMS | 42f20576d0c690b645a60bf53c5169cda4264231 | [
"Apache-2.0"
] | 1 | 2021-02-24T15:03:23.000Z | 2021-02-24T15:03:23.000Z | mayan/apps/rest_api/exceptions.py | sophiawa/Mayan-EDMS | 42f20576d0c690b645a60bf53c5169cda4264231 | [
"Apache-2.0"
] | 10 | 2021-03-20T00:01:17.000Z | 2022-03-12T00:48:43.000Z | mayan/apps/rest_api/exceptions.py | sophiawa/Mayan-EDMS | 42f20576d0c690b645a60bf53c5169cda4264231 | [
"Apache-2.0"
] | 1 | 2020-08-09T09:06:59.000Z | 2020-08-09T09:06:59.000Z |
class APIError(Exception):
"""
Base exception for the API app
"""
pass
class APIResourcePatternError(APIError):
"""
Raised when an app tries to override an existing URL regular expression
pattern
"""
pass
| 16.266667 | 75 | 0.647541 | 239 | 0.979508 | 0 | 0 | 0 | 0 | 0 | 0 | 145 | 0.594262 |
86880b5b73b7634f999e8879e1b07c2360a00ae8 | 6,256 | py | Python | tests/unit/types/message/test_message.py | Immich/jina | 1f5f7cf4d82029d76ab41df157526fe6f6e0da50 | [
"Apache-2.0"
] | 1 | 2021-02-25T19:28:50.000Z | 2021-02-25T19:28:50.000Z | tests/unit/types/message/test_message.py | Immich/jina | 1f5f7cf4d82029d76ab41df157526fe6f6e0da50 | [
"Apache-2.0"
] | 4 | 2020-09-01T17:47:27.000Z | 2021-04-16T23:11:57.000Z | tests/unit/types/message/test_message.py | Immich/jina | 1f5f7cf4d82029d76ab41df157526fe6f6e0da50 | [
"Apache-2.0"
] | null | null | null | import sys
from typing import Sequence
import pytest
from jina import Request, QueryLang, Document
from jina.clients.request import request_generator
from jina.proto import jina_pb2
from jina.proto.jina_pb2 import EnvelopeProto
from jina.types.message import Message
from jina.types.request import _trigger_fields
from... | 32.082051 | 111 | 0.634431 | 0 | 0 | 0 | 0 | 1,441 | 0.230339 | 0 | 0 | 550 | 0.087916 |
8688ffb74b8525b0642bda0ae7e8535617771ade | 243 | py | Python | tabnine-vim/third_party/ycmd/ycmd/tests/python/testdata/project/settings_extra_conf.py | MrMonk3y/vimrc | 950230fb3fd7991d1234c2ab516ec03245945677 | [
"MIT"
] | 10 | 2020-07-21T21:59:54.000Z | 2021-07-19T11:01:47.000Z | tabnine-vim/third_party/ycmd/ycmd/tests/python/testdata/project/settings_extra_conf.py | MrMonk3y/vimrc | 950230fb3fd7991d1234c2ab516ec03245945677 | [
"MIT"
] | null | null | null | tabnine-vim/third_party/ycmd/ycmd/tests/python/testdata/project/settings_extra_conf.py | MrMonk3y/vimrc | 950230fb3fd7991d1234c2ab516ec03245945677 | [
"MIT"
] | 1 | 2021-01-30T18:17:01.000Z | 2021-01-30T18:17:01.000Z | import os
import sys
DIR_OF_THIS_SCRIPT = os.path.abspath( os.path.dirname( __file__ ) )
def Settings( **kwargs ):
return {
'interpreter_path': sys.executable,
'sys_path': [ os.path.join( DIR_OF_THIS_SCRIPT, 'third_party' ) ]
}
| 20.25 | 69 | 0.691358 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 41 | 0.168724 |
868928ba8707be83d375694167add597b520a225 | 616 | py | Python | SmartCache/sim/Utilities/setup.py | Cloud-PG/smart-cache | 467987abece3fd4830fd615288046359761229f8 | [
"Apache-2.0"
] | 1 | 2019-10-13T09:05:24.000Z | 2019-10-13T09:05:24.000Z | SmartCache/sim/Utilities/setup.py | Cloud-PG/smart-cache | 467987abece3fd4830fd615288046359761229f8 | [
"Apache-2.0"
] | null | null | null | SmartCache/sim/Utilities/setup.py | Cloud-PG/smart-cache | 467987abece3fd4830fd615288046359761229f8 | [
"Apache-2.0"
] | 1 | 2019-05-16T11:53:38.000Z | 2019-05-16T11:53:38.000Z | from distutils.core import setup
setup(
name='utils',
version='1.0.0',
author='Mirco Tracolli',
author_email='mirco.tracolli@pg.infn.it',
packages=[
'utils',
],
scripts=[],
url='https://github.com/Cloud-PG/smart-cache',
license='Apache 2.0 License',
description='Utils fo... | 26.782609 | 56 | 0.61039 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 315 | 0.511364 |
868a5177cfe7a43dcc855371fdd275a394644658 | 2,074 | py | Python | homeassistant/components/eight_sleep/binary_sensor.py | liangleslie/core | cc807b4d597daaaadc92df4a93c6e30da4f570c6 | [
"Apache-2.0"
] | 2 | 2020-01-03T17:06:33.000Z | 2020-01-13T18:57:32.000Z | homeassistant/components/eight_sleep/binary_sensor.py | liangleslie/core | cc807b4d597daaaadc92df4a93c6e30da4f570c6 | [
"Apache-2.0"
] | 1,016 | 2019-06-18T21:27:47.000Z | 2020-03-06T11:09:58.000Z | homeassistant/components/eight_sleep/binary_sensor.py | liangleslie/core | cc807b4d597daaaadc92df4a93c6e30da4f570c6 | [
"Apache-2.0"
] | null | null | null | """Support for Eight Sleep binary sensors."""
from __future__ import annotations
import logging
from pyeight.eight import EightSleep
from homeassistant.components.binary_sensor import (
BinarySensorDeviceClass,
BinarySensorEntity,
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.enti... | 28.805556 | 81 | 0.700579 | 822 | 0.396336 | 0 | 0 | 171 | 0.082449 | 619 | 0.298457 | 272 | 0.131148 |
868c6ea160dd2c056e7da123714e1987646a86cf | 9,215 | py | Python | ravem/tests/util_test.py | bpedersen2/indico-plugins-cern | c4f06d11d981c316fc8de2892758484deb58e2f5 | [
"MIT"
] | null | null | null | ravem/tests/util_test.py | bpedersen2/indico-plugins-cern | c4f06d11d981c316fc8de2892758484deb58e2f5 | [
"MIT"
] | null | null | null | ravem/tests/util_test.py | bpedersen2/indico-plugins-cern | c4f06d11d981c316fc8de2892758484deb58e2f5 | [
"MIT"
] | null | null | null | # This file is part of the CERN Indico plugins.
# Copyright (C) 2014 - 2022 CERN
#
# The CERN Indico plugins are free software; you can redistribute
# them and/or modify them under the terms of the MIT License; see
# the LICENSE file for more details.
from unittest.mock import MagicMock
import pytest
from requests.ex... | 39.549356 | 112 | 0.703527 | 0 | 0 | 0 | 0 | 8,676 | 0.941508 | 0 | 0 | 3,203 | 0.347585 |
868d3680b0c2bd4371570ee9b629404359f69eee | 1,220 | py | Python | apps/organization/urls.py | stormsha/StormOnline | 10983b7a9ee09958927731ee3fd74178d7534ff6 | [
"Apache-2.0"
] | 18 | 2018-03-16T07:11:01.000Z | 2021-11-18T08:42:11.000Z | apps/organization/urls.py | stormsha/StormOnline | 10983b7a9ee09958927731ee3fd74178d7534ff6 | [
"Apache-2.0"
] | 1 | 2018-03-15T11:40:25.000Z | 2018-03-15T11:40:25.000Z | apps/organization/urls.py | stormsha/StormOnline | 10983b7a9ee09958927731ee3fd74178d7534ff6 | [
"Apache-2.0"
] | 13 | 2018-03-16T07:11:05.000Z | 2020-06-23T09:27:49.000Z | # _*_ coding: utf-8 _*_
# ---------------------------
__author__ = 'StormSha'
__date__ = '2018/3/28 18:01'
# ---------------------------
# -------------------------django----------------------
from django.conf.urls import url
from .views import OrgView, AddUserAskView, OrgHomeView, OrgCourseView, OrgDescView, OrgTeach... | 48.8 | 111 | 0.566393 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 588 | 0.478827 |
868dd694341f559c01703d972c3b261cb6620ffe | 571 | py | Python | tech_project/lib/python2.7/site-packages/filer/migrations/0010_auto_20180414_2058.py | priyamshah112/Project-Descripton-Blog | 8e01016c6be79776c4f5ca75563fa3daa839e39e | [
"MIT"
] | null | null | null | tech_project/lib/python2.7/site-packages/filer/migrations/0010_auto_20180414_2058.py | priyamshah112/Project-Descripton-Blog | 8e01016c6be79776c4f5ca75563fa3daa839e39e | [
"MIT"
] | 11 | 2019-11-02T20:57:52.000Z | 2020-09-27T09:08:33.000Z | tech_project/lib/python2.7/site-packages/filer/migrations/0010_auto_20180414_2058.py | priyamshah112/Project-Descripton-Blog | 8e01016c6be79776c4f5ca75563fa3daa839e39e | [
"MIT"
] | 4 | 2018-08-07T17:13:48.000Z | 2019-06-13T11:09:32.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('filer', '0009_auto_20171220_1635'),
]
operations = [
migrations.AlterField(
mod... | 27.190476 | 187 | 0.670753 | 429 | 0.751313 | 0 | 0 | 0 | 0 | 0 | 0 | 102 | 0.178634 |
868dd7b75196bf80f589754ce91dc36872de638a | 12,166 | py | Python | SLHCUpgradeSimulations/Configuration/python/aging.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | SLHCUpgradeSimulations/Configuration/python/aging.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | SLHCUpgradeSimulations/Configuration/python/aging.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
# handle normal mixing or premixing
def getHcalDigitizer(process):
if hasattr(process,'mixData'):
return process.mixData
if hasattr(process,'mix') and hasattr(process.mix,'digitizers') and hasattr(process.mix.digitizers,'hcal'):
return process.mix.digiti... | 44.40146 | 176 | 0.715025 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,171 | 0.178448 |
868de8e68215f41c7a22fbffe3549ae81cd16557 | 10,106 | py | Python | xml_parser.py | cbschaff/nlimb | f0564b00bab1b3367aaa88163e49bebc88f349bb | [
"MIT"
] | 12 | 2018-10-26T19:33:05.000Z | 2022-01-17T11:47:59.000Z | xml_parser.py | cbschaff/nlimb | f0564b00bab1b3367aaa88163e49bebc88f349bb | [
"MIT"
] | 9 | 2020-01-28T22:30:55.000Z | 2022-03-11T23:32:04.000Z | xml_parser.py | cbschaff/nlimb | f0564b00bab1b3367aaa88163e49bebc88f349bb | [
"MIT"
] | 3 | 2019-07-09T14:56:01.000Z | 2019-11-18T06:58:41.000Z | import numpy as np
import xml.etree.ElementTree as ET
class Geom(object):
def __init__(self, geom):
self.xml = geom
self.params = []
def get_params(self):
return self.params.copy()
def set_params(self, new_params):
self.params = new_params
def update_point(self, p, ne... | 33.574751 | 169 | 0.608351 | 7,898 | 0.781516 | 0 | 0 | 0 | 0 | 0 | 0 | 922 | 0.091233 |
868e31d3b6d09c73dfd001c290d85e56d3f9bb45 | 672 | py | Python | app/http/middleware/LoadUserMiddleware.py | josephmancuso/masonite-forum | a91c7386f3e0b02b0ac71623eb295a7543cb60fd | [
"MIT"
] | 11 | 2018-07-08T17:44:28.000Z | 2020-03-02T10:45:37.000Z | app/http/middleware/LoadUserMiddleware.py | josephmancuso/masonite-forum | a91c7386f3e0b02b0ac71623eb295a7543cb60fd | [
"MIT"
] | 2 | 2018-07-21T07:49:09.000Z | 2019-05-29T14:34:42.000Z | app/http/middleware/LoadUserMiddleware.py | josephmancuso/masonite-forum | a91c7386f3e0b02b0ac71623eb295a7543cb60fd | [
"MIT"
] | 5 | 2018-07-12T02:36:14.000Z | 2020-04-05T21:10:30.000Z | ''' Load User Middleware'''
from masonite.facades.Auth import Auth
class LoadUserMiddleware:
''' Middleware class which loads the current user into the request '''
def __init__(self, Request):
''' Inject Any Dependencies From The Service Container '''
self.request = Request
def before(sel... | 29.217391 | 74 | 0.644345 | 603 | 0.897321 | 0 | 0 | 0 | 0 | 0 | 0 | 294 | 0.4375 |
868eb825011495edcc58f16f21e6e75e8ab1abc6 | 22,691 | py | Python | src/unittest/python/merciful_elo_limit_tests.py | mgaertne/minqlx-plugin-tests | 10a827fe063c86481560dcc00a8a3ce2ba60861b | [
"BSD-3-Clause"
] | 4 | 2017-11-01T04:49:27.000Z | 2020-08-08T12:11:51.000Z | src/unittest/python/merciful_elo_limit_tests.py | mgaertne/minqlx-plugin-tests | 10a827fe063c86481560dcc00a8a3ce2ba60861b | [
"BSD-3-Clause"
] | null | null | null | src/unittest/python/merciful_elo_limit_tests.py | mgaertne/minqlx-plugin-tests | 10a827fe063c86481560dcc00a8a3ce2ba60861b | [
"BSD-3-Clause"
] | 1 | 2021-04-26T09:04:36.000Z | 2021-04-26T09:04:36.000Z | from minqlx_plugin_test import *
import logging
import unittest
from mockito import *
from mockito.matchers import *
from hamcrest import *
from redis import Redis
from merciful_elo_limit import *
class MercifulEloLimitTests(unittest.TestCase):
def setUp(self):
setup_plugin()
setup_cvars({
... | 44.932673 | 117 | 0.677493 | 22,487 | 0.99101 | 0 | 0 | 0 | 0 | 0 | 0 | 3,206 | 0.141289 |
868f0e1cedcadcbc2d277dd9469765ca291fed6d | 689 | py | Python | meiduo_mall/celery_tasks/sms/tasks.py | Vent-Any/meiduo_mall_cangku | 5b3b7f029be267cb5d2d3666f99be166d27213f1 | [
"MIT"
] | null | null | null | meiduo_mall/celery_tasks/sms/tasks.py | Vent-Any/meiduo_mall_cangku | 5b3b7f029be267cb5d2d3666f99be166d27213f1 | [
"MIT"
] | null | null | null | meiduo_mall/celery_tasks/sms/tasks.py | Vent-Any/meiduo_mall_cangku | 5b3b7f029be267cb5d2d3666f99be166d27213f1 | [
"MIT"
] | null | null | null | from ronglian_sms_sdk import SmsSDK
from celery_tasks.main import app
# 写我们的任务(函数)
# 任务必须要celery的实例对象装饰器task装饰
# 任务包的任务需要celery调用自检检查函数。(在main里面写。)
@app.task
def celery_send_sms_code(mobile, sms_code):
accId = '8a216da8762cb4570176c60593ba35ec'
accToken = '514a8783b8c2481ebbeb6a814434796f'
appId = '8a216da... | 32.809524 | 65 | 0.703919 | 0 | 0 | 0 | 0 | 736 | 0.751788 | 0 | 0 | 641 | 0.65475 |
868f63854096baf68c5ff8cc2009603138d30b30 | 5,195 | py | Python | delphiIDE.py | JeisonJHA/Plugins-Development | cccb58908eed6114c569e53d5710e70b8d53f5c5 | [
"MIT"
] | null | null | null | delphiIDE.py | JeisonJHA/Plugins-Development | cccb58908eed6114c569e53d5710e70b8d53f5c5 | [
"MIT"
] | null | null | null | delphiIDE.py | JeisonJHA/Plugins-Development | cccb58908eed6114c569e53d5710e70b8d53f5c5 | [
"MIT"
] | null | null | null | import sublime_plugin
class MethodDeclaration(object):
"""docstring for MethodDeclaration"""
def __init__(self):
self._methodclass = None
self.has_implementation = False
self.has_interface = False
@property
def has_implementation(self):
return self._has_implementation... | 26.237374 | 99 | 0.609047 | 5,164 | 0.994033 | 0 | 0 | 2,088 | 0.401925 | 0 | 0 | 600 | 0.115496 |
86920ec1c0159b8548b81683e13e218d1875aaf1 | 33,860 | py | Python | python/test_pip_package.py | syt123450/tfjs-converter | a90fa59a44d9425beb7b1584fe753c62d62bbc4d | [
"Apache-2.0"
] | null | null | null | python/test_pip_package.py | syt123450/tfjs-converter | a90fa59a44d9425beb7b1584fe753c62d62bbc4d | [
"Apache-2.0"
] | null | null | null | python/test_pip_package.py | syt123450/tfjs-converter | a90fa59a44d9425beb7b1584fe753c62d62bbc4d | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 38.741419 | 88 | 0.674778 | 28,953 | 0.85508 | 0 | 0 | 584 | 0.017247 | 0 | 0 | 10,321 | 0.304814 |
869310d00b7b8dcf8e18a56efd569e5ae8396471 | 7,195 | py | Python | script.ezclean/resources/lib/modules/skinz.py | rrosajp/script.ezclean | ed6fbe6441713a3c96ce15a595cdd5c69291355f | [
"MIT"
] | 5 | 2019-03-12T23:10:48.000Z | 2021-05-06T05:31:26.000Z | script.ezclean/resources/lib/modules/skinz.py | rrosajp/script.ezclean-1 | ed6fbe6441713a3c96ce15a595cdd5c69291355f | [
"MIT"
] | 3 | 2019-03-17T21:53:29.000Z | 2019-04-22T16:44:38.000Z | script.ezclean/resources/lib/modules/skinz.py | rrosajp/script.ezclean-1 | ed6fbe6441713a3c96ce15a595cdd5c69291355f | [
"MIT"
] | 4 | 2019-03-17T21:17:19.000Z | 2020-03-30T12:45:33.000Z | # -*- coding: UTF-8 -*-
import os, re, shutil, time, xbmc
from resources.lib.modules import control
try: import json as simplejson
except: import simplejson
ADDONS = os.path.join(control.HOMEPATH, 'addons')
def currSkin():
return control.skin
def getOld(old):
try:
old = '"%s"' % old
quer... | 46.720779 | 254 | 0.580542 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,297 | 0.319249 |
86939231df10a74a6b6c8263b5d61c5806d7e19e | 10,360 | py | Python | pyhap/characteristic.py | bdraco/HAP-python | a2a5ce109d08af2f4f5bda4075f2176a98123806 | [
"Apache-2.0"
] | null | null | null | pyhap/characteristic.py | bdraco/HAP-python | a2a5ce109d08af2f4f5bda4075f2176a98123806 | [
"Apache-2.0"
] | null | null | null | pyhap/characteristic.py | bdraco/HAP-python | a2a5ce109d08af2f4f5bda4075f2176a98123806 | [
"Apache-2.0"
] | null | null | null | """
All things for a HAP characteristic.
A Characteristic is the smallest unit of the smart home, e.g.
a temperature measuring or a device status.
"""
import logging
from pyhap.const import (
HAP_PERMISSION_READ,
HAP_REPR_DESC,
HAP_REPR_FORMAT,
HAP_REPR_IID,
HAP_REPR_MAX_LEN,
HAP_REPR_PERM,
... | 33.099042 | 86 | 0.643629 | 8,562 | 0.826448 | 0 | 0 | 571 | 0.055116 | 0 | 0 | 3,992 | 0.385328 |
8693c080676cb2787d00c99c4612bc9e39e2bff8 | 1,767 | py | Python | configs/_base_/datasets/uniter/vqa_dataset_uniter.py | linxi1158/iMIX | af87a17275f02c94932bb2e29f132a84db812002 | [
"Apache-2.0"
] | 23 | 2021-06-26T08:45:19.000Z | 2022-03-02T02:13:33.000Z | configs/_base_/datasets/uniter/vqa_dataset_uniter.py | XChuanLee/iMIX | 99898de97ef8b45462ca1d6bf2542e423a73d769 | [
"Apache-2.0"
] | null | null | null | configs/_base_/datasets/uniter/vqa_dataset_uniter.py | XChuanLee/iMIX | 99898de97ef8b45462ca1d6bf2542e423a73d769 | [
"Apache-2.0"
] | 9 | 2021-06-10T02:36:20.000Z | 2021-11-09T02:18:16.000Z | dataset_type = 'UNITER_VqaDataset'
data_root = '/home/datasets/mix_data/UNITER/VQA/'
train_datasets = ['train']
test_datasets = ['minival'] # name not in use, but have defined one to run
vqa_cfg = dict(
train_txt_dbs=[
data_root + 'vqa_train.db',
data_root + 'vqa_trainval.db',
data_root +... | 24.205479 | 75 | 0.63837 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 424 | 0.239955 |
869425b882c792777c4c9df4c4e4ede390b45006 | 752 | py | Python | students/k3340/laboratory_works/laboratory_works/Arlakov_Denis/laboratiry_work_2_and_3/lab/django-react-ecommerce-master/home/urls.py | TonikX/ITMO_ICT_-WebProgramming_2020 | ba566c1b3ab04585665c69860b713741906935a0 | [
"MIT"
] | 10 | 2020-03-20T09:06:12.000Z | 2021-07-27T13:06:02.000Z | students/k3340/laboratory_works/laboratory_works/Arlakov_Denis/laboratiry_work_2_and_3/lab/django-react-ecommerce-master/home/urls.py | TonikX/ITMO_ICT_-WebProgramming_2020 | ba566c1b3ab04585665c69860b713741906935a0 | [
"MIT"
] | 134 | 2020-03-23T09:47:48.000Z | 2022-03-12T01:05:19.000Z | students/k3340/laboratory_works/laboratory_works/Arlakov_Denis/laboratiry_work_2_and_3/lab/django-react-ecommerce-master/home/urls.py | TonikX/ITMO_ICT_-WebProgramming_2020 | ba566c1b3ab04585665c69860b713741906935a0 | [
"MIT"
] | 71 | 2020-03-20T12:45:56.000Z | 2021-10-31T19:22:25.000Z | from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import path, include, re_path
from django.views.generic import TemplateView
urlpatterns = [
path('api-auth/', include('rest_framework.urls')),
path('rest-auth/', include('rest_auth.urls... | 32.695652 | 78 | 0.678191 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 161 | 0.214096 |
869447ef2f6a217e512b23fd0c00a4c4fa0f87a0 | 22,881 | py | Python | 20200416_Socialmail/mailserverUi.py | karta1782310/python-docx-automated-report-generation | f0e02a50a9e9547d131e583be0711aad72f08b51 | [
"MIT"
] | null | null | null | 20200416_Socialmail/mailserverUi.py | karta1782310/python-docx-automated-report-generation | f0e02a50a9e9547d131e583be0711aad72f08b51 | [
"MIT"
] | null | null | null | 20200416_Socialmail/mailserverUi.py | karta1782310/python-docx-automated-report-generation | f0e02a50a9e9547d131e583be0711aad72f08b51 | [
"MIT"
] | null | null | null | #!/bin/bash
# -*- coding: UTF-8 -*-
# 基本控件都在这里面
from PyQt5.QtWebEngineWidgets import QWebEngineView
from PyQt5.QtWidgets import (QApplication, QMainWindow, QWidget, QGridLayout, QMessageBox, QFileDialog,
QLabel, QLineEdit, QPushButton, QComboBox, QCheckBox, QDateTimeEdit,
... | 41.75365 | 151 | 0.617193 | 22,835 | 0.957081 | 0 | 0 | 0 | 0 | 0 | 0 | 2,868 | 0.120206 |
86947b6782d353d9c52f3c8165971a18131a9c5c | 3,869 | py | Python | nntools/layers/corrmm.py | 317070/nntools | 00e2865b1f8246254b3adc22c37989a8b77718d5 | [
"MIT"
] | null | null | null | nntools/layers/corrmm.py | 317070/nntools | 00e2865b1f8246254b3adc22c37989a8b77718d5 | [
"MIT"
] | null | null | null | nntools/layers/corrmm.py | 317070/nntools | 00e2865b1f8246254b3adc22c37989a8b77718d5 | [
"MIT"
] | null | null | null | """
GpuCorrMM-based convolutional layers
"""
import numpy as np
import theano
import theano.tensor as T
from theano.sandbox.cuda.basic_ops import gpu_contiguous
from theano.sandbox.cuda.blas import GpuCorrMM
from .. import init
from .. import nonlinearities
from . import base
# base class for all layers that rely ... | 37.931373 | 135 | 0.632205 | 3,522 | 0.910313 | 0 | 0 | 0 | 0 | 0 | 0 | 445 | 0.115017 |
8695dfaa20d2f47de4c76bf66aa5cf33728fae34 | 3,292 | py | Python | tests/python/correctness/simple_test_aux_index.py | dubey/weaver | 56a42fd2d0bbb14867ba792ca5461d16310a7387 | [
"BSD-3-Clause"
] | 163 | 2015-01-02T03:51:38.000Z | 2022-03-21T23:06:39.000Z | tests/python/correctness/simple_test_aux_index.py | dubey/weaver | 56a42fd2d0bbb14867ba792ca5461d16310a7387 | [
"BSD-3-Clause"
] | 1 | 2015-04-08T23:17:06.000Z | 2015-04-24T15:25:26.000Z | tests/python/correctness/simple_test_aux_index.py | dubey/weaver | 56a42fd2d0bbb14867ba792ca5461d16310a7387 | [
"BSD-3-Clause"
] | 20 | 2015-02-17T19:24:05.000Z | 2020-10-29T01:59:18.000Z | #! /usr/bin/env python
#
# ===============================================================
# Description: Sanity check for fresh install.
#
# Created: 2014-08-12 16:42:52
#
# Author: Ayush Dubey, dubey@cs.cornell.edu
#
# Copyright (C) 2013, Cornell University, see the LICENSE file
# ... | 28.626087 | 173 | 0.663123 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,740 | 0.528554 |
8696b91ed345a9efbc515a25e28bfe35f30846c8 | 3,831 | py | Python | ldtools/helpers.py | dmr/Ldtools | 9cc5474404a07bd4b7ad756d31306dfc37a39c7b | [
"BSD-2-Clause"
] | 3 | 2015-12-24T15:18:46.000Z | 2022-02-09T06:56:40.000Z | ldtools/helpers.py | dmr/Ldtools | 9cc5474404a07bd4b7ad756d31306dfc37a39c7b | [
"BSD-2-Clause"
] | 1 | 2016-10-10T17:26:05.000Z | 2016-10-10T17:26:05.000Z | ldtools/helpers.py | dmr/Ldtools | 9cc5474404a07bd4b7ad756d31306dfc37a39c7b | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import print_function, unicode_literals
try:
unicode
except NameError:
basestring = unicode = str # Python 3
import logging
import rdflib
from rdflib import compare
logger = logging.getLogger("ldtools")
RESET_SEQ = "\033[0m"
COLOR_SEQ = "\033[1;%dm"
BOLD_SEQ = "\033[... | 30.895161 | 79 | 0.631689 | 422 | 0.110154 | 0 | 0 | 0 | 0 | 0 | 0 | 713 | 0.186113 |
8696be28bebb97248ddd7aa9ff8ffc4d35ce9393 | 1,420 | py | Python | fakenet/diverters/debuglevels.py | AzzOnFire/flare-fakenet-ng | bafd7e97b61cd43190dee7f1d2c3f4388488af76 | [
"Apache-2.0"
] | null | null | null | fakenet/diverters/debuglevels.py | AzzOnFire/flare-fakenet-ng | bafd7e97b61cd43190dee7f1d2c3f4388488af76 | [
"Apache-2.0"
] | null | null | null | fakenet/diverters/debuglevels.py | AzzOnFire/flare-fakenet-ng | bafd7e97b61cd43190dee7f1d2c3f4388488af76 | [
"Apache-2.0"
] | null | null | null | # Debug print levels for fine-grained debug trace output control
DNFQUEUE = (1 << 0) # netfilterqueue
DGENPKT = (1 << 1) # Generic packet handling
DGENPKTV = (1 << 2) # Generic packet handling with TCP analysis
DCB = (1 << 3) # Packet handlign callbacks
DPROCFS = (1 << 4) # procfs
DIPTBLS = (... | 33.023256 | 72 | 0.592958 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 644 | 0.453521 |
869714958dec93fb87488625f1ab7000485c9fb2 | 3,175 | py | Python | multichannel_lstm/train.py | zhr1201/Multi-channel-speech-extraction-using-DNN | 4e48869e02b815a8b094acc9251ac6586fda350c | [
"MIT"
] | 65 | 2017-08-04T03:36:56.000Z | 2022-03-10T07:25:17.000Z | multichannel_lstm/train.py | zhr1201/Multi-channel-speech-extraction-using-DNN | 4e48869e02b815a8b094acc9251ac6586fda350c | [
"MIT"
] | 7 | 2017-10-10T02:34:08.000Z | 2019-09-27T08:59:27.000Z | multichannel_lstm/train.py | zhr1201/Multi-channel-speech-extraction-using-DNN | 4e48869e02b815a8b094acc9251ac6586fda350c | [
"MIT"
] | 39 | 2017-08-02T04:27:37.000Z | 2021-11-03T06:43:25.000Z | '''
Script for training the model
'''
import tensorflow as tf
import numpy as np
from input import BatchGenerator
from model import MultiRnn
import time
from datetime import datetime
import os
import matplotlib as mpl
mpl.use('Agg')
from matplotlib import pyplot as plt
sum_dir = 'sum' # dir to write summary
train_di... | 33.776596 | 83 | 0.624252 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 407 | 0.128189 |
8697573e23a0bff4599f9e6ef4bcf4db3b6b315f | 4,002 | py | Python | python_modules/dagster/dagster/daemon/cli/__init__.py | elsenorbw/dagster | b38822d7463812624dab0b2dae7c62e2a8d59828 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster/daemon/cli/__init__.py | elsenorbw/dagster | b38822d7463812624dab0b2dae7c62e2a8d59828 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster/daemon/cli/__init__.py | elsenorbw/dagster | b38822d7463812624dab0b2dae7c62e2a8d59828 | [
"Apache-2.0"
] | null | null | null | import os
import sys
import threading
import time
import warnings
from contextlib import ExitStack
import click
import pendulum
from dagster import __version__
from dagster.core.instance import DagsterInstance
from dagster.daemon.controller import (
DEFAULT_DAEMON_HEARTBEAT_TOLERANCE_SECONDS,
DagsterDaemonCont... | 28.183099 | 121 | 0.696902 | 0 | 0 | 0 | 0 | 2,882 | 0.72014 | 0 | 0 | 981 | 0.245127 |
869758494ec4227a029bca8c4e214109b3aea62a | 331 | py | Python | tests/exhaustive/nfl_tests.py | atklaus/sportsreference | 22a45ea83ce1608c3176f00d4f414d5b9463605c | [
"MIT"
] | 1 | 2020-03-08T20:17:39.000Z | 2020-03-08T20:17:39.000Z | tests/exhaustive/nfl_tests.py | atklaus/sportsreference | 22a45ea83ce1608c3176f00d4f414d5b9463605c | [
"MIT"
] | null | null | null | tests/exhaustive/nfl_tests.py | atklaus/sportsreference | 22a45ea83ce1608c3176f00d4f414d5b9463605c | [
"MIT"
] | null | null | null | import sys, os
sys.path.append(os.path.dirname(os.path.dirname(sys.path[0])))
from sportsreference.nfl.teams import Teams
for team in Teams():
print(team.name)
for player in team.roster.players:
print(player.name)
for game in team.schedule:
print(game.dataframe)
print(game.dataframe... | 27.583333 | 62 | 0.700906 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
86979f732a31535e5210a87577515eada4d424aa | 1,116 | py | Python | rust-old/python/examples/map_fields.py | SerebryakovMA/quelea | 4bac70d60852a454ad6533d08a02e018c75dc377 | [
"MIT"
] | 3 | 2021-03-01T15:35:49.000Z | 2021-04-04T17:24:48.000Z | rust-old/python/examples/map_fields.py | SerebryakovMA/quelea | 4bac70d60852a454ad6533d08a02e018c75dc377 | [
"MIT"
] | null | null | null | rust-old/python/examples/map_fields.py | SerebryakovMA/quelea | 4bac70d60852a454ad6533d08a02e018c75dc377 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import sys
sys.path.append("../")
from quelea import *
nx = 217
ny = 133
x0 = 0
x1 = 30 # lambdas
y0 = 0
y1 = 20 # lambdas
xs = np.linspace(x0, x1, nx)
ys = np.linspace(y0, y1, ny)
# 2d array of (x, y, z, t)
coords = np.array( [ [x, y, 0, 0] for ... | 21.882353 | 76 | 0.641577 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 257 | 0.230287 |
86981ef4c2dc9e662bd6493203efcef25a7c5284 | 4,709 | py | Python | test.py | t-kaichi/hyperspoof | 6effdf03be8489ba74154a12416c69948681aa51 | [
"MIT"
] | 10 | 2021-06-23T09:42:30.000Z | 2022-03-31T22:26:17.000Z | test.py | t-kaichi/hyperspoof | 6effdf03be8489ba74154a12416c69948681aa51 | [
"MIT"
] | null | null | null | test.py | t-kaichi/hyperspoof | 6effdf03be8489ba74154a12416c69948681aa51 | [
"MIT"
] | null | null | null | import os
from absl import app
from absl import flags
import numpy as np
import tqdm
from tensorflow.keras import Model
from albumentations import (
Compose, HorizontalFlip, RandomBrightness,RandomContrast,
ShiftScaleRotate, ToFloat, VerticalFlip)
from utils import reset_tf
from eval_utils import calc_score_v... | 36.503876 | 84 | 0.660437 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 498 | 0.105755 |
8698961278b2541aa172b54c8053ea36ceff0d54 | 4,612 | py | Python | generator/apps.py | TheJacksonLaboratory/jaxid_generator | be5222d9c5ce57a169b94b0afd1ae9f7f10a66c1 | [
"Apache-2.0"
] | 2 | 2020-10-19T17:21:09.000Z | 2020-10-20T14:27:25.000Z | generator/apps.py | cometsong/jaxid_generator | be5222d9c5ce57a169b94b0afd1ae9f7f10a66c1 | [
"Apache-2.0"
] | null | null | null | generator/apps.py | cometsong/jaxid_generator | be5222d9c5ce57a169b94b0afd1ae9f7f10a66c1 | [
"Apache-2.0"
] | null | null | null | from django.conf import settings
from suit import apps
from suit.apps import DjangoSuitConfig
from suit.menu import ParentItem, ChildItem
APP_NAME = settings.APP_NAME
WIKI_URL = settings.WIKI_URL
class SuitConfig(DjangoSuitConfig):
name = 'suit'
verbose_name = 'Mbiome Core JAXid Generator'
site_title = '... | 37.803279 | 198 | 0.550954 | 4,412 | 0.956635 | 0 | 0 | 0 | 0 | 0 | 0 | 2,202 | 0.47745 |
869a0bbbdd3ad540b61675d429b25b1caee7f14d | 38,519 | py | Python | tiled-lutnet/training-software/MNIST-CIFAR-SVHN/models/MNIST/scripts/lutnet_init.py | awai54st/LUTNet | 81b044f31d1131bee1a7fae41fc4d2fb102ea73a | [
"BSD-2-Clause"
] | 38 | 2019-10-28T10:06:33.000Z | 2022-02-21T21:38:39.000Z | tiled-lutnet/training-software/MNIST-CIFAR-SVHN/models/MNIST/scripts/lutnet_init.py | awai54st/LUTNet | 81b044f31d1131bee1a7fae41fc4d2fb102ea73a | [
"BSD-2-Clause"
] | null | null | null | tiled-lutnet/training-software/MNIST-CIFAR-SVHN/models/MNIST/scripts/lutnet_init.py | awai54st/LUTNet | 81b044f31d1131bee1a7fae41fc4d2fb102ea73a | [
"BSD-2-Clause"
] | 13 | 2019-10-28T10:17:48.000Z | 2021-08-10T21:37:11.000Z | import h5py
import numpy as np
np.set_printoptions(threshold=np.nan)
from shutil import copyfile
copyfile("dummy_lutnet.h5", "pretrained_bin.h5") # create pretrained.h5 using datastructure from dummy.h5
bl = h5py.File("baseline_pruned.h5", 'r')
#dummy = h5py.File("dummy.h5", 'r')
pretrained = h5py.File("pretrained_b... | 47.731103 | 192 | 0.749708 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 15,542 | 0.403489 |
869a42d471e5a0264cf98babfcdd88a6669b3cbc | 12,970 | py | Python | pkgs/nltk-3.2-py27_0/lib/python2.7/site-packages/nltk/classify/weka.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | pkgs/nltk-3.2-py27_0/lib/python2.7/site-packages/nltk/classify/weka.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | pkgs/nltk-3.2-py27_0/lib/python2.7/site-packages/nltk/classify/weka.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # Natural Language Toolkit: Interface to Weka Classsifiers
#
# Copyright (C) 2001-2015 NLTK Project
# Author: Edward Loper <edloper@gmail.com>
# URL: <http://nltk.org/>
# For license information, see LICENSE.TXT
"""
Classifiers that make use of the external 'Weka' package.
"""
from __future__ import print_fu... | 37.485549 | 85 | 0.562606 | 10,284 | 0.792907 | 0 | 0 | 2,700 | 0.208173 | 0 | 0 | 4,493 | 0.346415 |
869a8a31a260884a519f22c5d9a29b22876f051f | 5,502 | py | Python | src/si/data/dataset.py | pg428/SIB | b887c2011eb3a04d119a93b3932785d182e331d3 | [
"Apache-2.0"
] | null | null | null | src/si/data/dataset.py | pg428/SIB | b887c2011eb3a04d119a93b3932785d182e331d3 | [
"Apache-2.0"
] | null | null | null | src/si/data/dataset.py | pg428/SIB | b887c2011eb3a04d119a93b3932785d182e331d3 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
import numpy as np
from src.si.util.util import label_gen
__all__ = ['Dataset']
class Dataset:
def __init__(self, X=None, Y=None,
xnames: list = None,
yname: str = None):
""" Tabular Dataset"""
if X is None:
raise Exception("Trying ... | 32.364706 | 166 | 0.526172 | 3,262 | 0.592875 | 0 | 0 | 1,473 | 0.267721 | 0 | 0 | 2,025 | 0.368048 |
869b1718c19f9cae150c01d7070087f780577bf0 | 3,357 | py | Python | stubs/m5stack_flowui-1_4_0-beta/display.py | RonaldHiemstra/micropython-stubs | d97f879b01f6687baaebef1c7e26a80909c3cff3 | [
"MIT"
] | 38 | 2020-10-18T21:59:44.000Z | 2022-03-17T03:03:28.000Z | stubs/m5stack_flowui-1_4_0-beta/display.py | RonaldHiemstra/micropython-stubs | d97f879b01f6687baaebef1c7e26a80909c3cff3 | [
"MIT"
] | 176 | 2020-10-18T14:31:03.000Z | 2022-03-30T23:22:39.000Z | stubs/m5stack_flowui-1_4_0-beta/display.py | RonaldHiemstra/micropython-stubs | d97f879b01f6687baaebef1c7e26a80909c3cff3 | [
"MIT"
] | 6 | 2020-12-28T21:11:12.000Z | 2022-02-06T04:07:50.000Z | """
Module: 'display' on M5 FlowUI v1.4.0-beta
"""
# MCU: (sysname='esp32', nodename='esp32', release='1.11.0', version='v1.11-284-g5d8e1c867 on 2019-08-30', machine='ESP32 module with ESP32')
# Stubber: 1.3.1
class TFT:
''
BLACK = 0
BLUE = 255
BMP = 2
BOTTOM = -9004
CENTER = -9003
COLOR_BI... | 13.481928 | 141 | 0.49866 | 3,144 | 0.93655 | 0 | 0 | 0 | 0 | 0 | 0 | 209 | 0.062258 |
869c4c6a792894e8eb7116f05f76e9950b851051 | 364 | py | Python | dbclient/__init__.py | dmoore247/db-migration | cc75d491d7dd7e9e24b5a35dd3d1080317b25520 | [
"Apache-2.0"
] | null | null | null | dbclient/__init__.py | dmoore247/db-migration | cc75d491d7dd7e9e24b5a35dd3d1080317b25520 | [
"Apache-2.0"
] | null | null | null | dbclient/__init__.py | dmoore247/db-migration | cc75d491d7dd7e9e24b5a35dd3d1080317b25520 | [
"Apache-2.0"
] | null | null | null | import json, requests, datetime
from cron_descriptor import get_description
from .dbclient import dbclient
from .JobsClient import JobsClient
from .ClustersClient import ClustersClient
from .WorkspaceClient import WorkspaceClient
from .ScimClient import ScimClient
from .LibraryClient import LibraryClient
from .HiveCli... | 30.333333 | 44 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
869cca1a77b5e47ef9d5c83e59910c957d0e0eeb | 1,145 | py | Python | UI/ControlSlider/__init__.py | peerke88/SkinningTools | db761f569ba179231dc64183ebfca1684429ab96 | [
"MIT"
] | 7 | 2021-12-16T06:03:18.000Z | 2022-02-15T01:49:37.000Z | UI/weightEditor/__init__.py | peerke88/SkinningTools | db761f569ba179231dc64183ebfca1684429ab96 | [
"MIT"
] | null | null | null | UI/weightEditor/__init__.py | peerke88/SkinningTools | db761f569ba179231dc64183ebfca1684429ab96 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# SkinWeights command and component editor
# Copyright (C) 2018 Trevor van Hoof
# Website: http://www.trevorius.com
#
# pyqt attribute sliders
# Copyright (C) 2018 Daniele Niero
# Website: http://danieleniero.com/
#
# neighbour finding algorythm
# Copyright (C) 2018 Jan Pijpers
# Webs... | 36.935484 | 89 | 0.672489 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,115 | 0.973799 |
869e135c2c869c0e98bb08d38ef8fc9d0c3c1530 | 11,744 | py | Python | homeassistant/components/fritz/sensor.py | EuleMitKeule/core | 3af54d96c7dcc3f7087d1196e6ab0db029301ee7 | [
"Apache-2.0"
] | 3 | 2022-02-18T14:03:39.000Z | 2022-03-26T20:26:55.000Z | homeassistant/components/fritz/sensor.py | EuleMitKeule/core | 3af54d96c7dcc3f7087d1196e6ab0db029301ee7 | [
"Apache-2.0"
] | 74 | 2020-08-05T07:20:27.000Z | 2022-03-23T12:47:28.000Z | homeassistant/components/fritz/sensor.py | marecabo/home-assistant | e33774a61e7fcc88aff752dfa4618dd26a746872 | [
"Apache-2.0"
] | 2 | 2020-06-06T21:55:32.000Z | 2022-03-06T04:18:21.000Z | """AVM FRITZ!Box binary sensors."""
from __future__ import annotations
from collections.abc import Callable
from dataclasses import dataclass
from datetime import datetime, timedelta
import logging
from typing import Any, Literal
from fritzconnection.core.exceptions import (
FritzActionError,
FritzActionFaile... | 33.458689 | 94 | 0.712364 | 1,582 | 0.134707 | 0 | 0 | 309 | 0.026311 | 1,087 | 0.092558 | 2,252 | 0.191757 |
869e772414d99f560741ba4d5f3b4440b61ae41b | 2,931 | py | Python | Ifc/IfcBase.py | gsimon75/IFC_parser | f9fbe2afa48795bbb502530bc9ab5c4db842e10f | [
"BSD-2-Clause"
] | 28 | 2019-12-02T11:41:14.000Z | 2022-03-02T22:53:24.000Z | Ifc/IfcBase.py | gsimon75/IFC_parser | f9fbe2afa48795bbb502530bc9ab5c4db842e10f | [
"BSD-2-Clause"
] | 4 | 2019-08-30T13:52:40.000Z | 2022-02-02T02:31:31.000Z | Ifc/IfcBase.py | gsimon75/IFC_parser | f9fbe2afa48795bbb502530bc9ab5c4db842e10f | [
"BSD-2-Clause"
] | 6 | 2020-07-11T22:35:07.000Z | 2022-03-18T15:12:46.000Z | from Ifc.ClassRegistry import ifc_class, ifc_abstract_class, ifc_fallback_class
@ifc_abstract_class
class IfcEntity:
"""
Generic IFC entity, only for subclassing from it
"""
def __init__(self, rtype, args):
"""
rtype: Resource type
args: Arguments in *reverse* order, so you can... | 21.23913 | 132 | 0.624701 | 2,536 | 0.865234 | 0 | 0 | 1,717 | 0.585807 | 0 | 0 | 837 | 0.285568 |
869e8784f6deaecfb703cc98502b159dc7530a96 | 5,330 | py | Python | middleware/io-monitor/recipes-common/io-monitor/io-monitor/io_monitor/utils/data_collector.py | xe1gyq/stx-utils | 93b7f7dc2c6732db8c8ae0eb3f52ace4df714dc9 | [
"Apache-2.0"
] | null | null | null | middleware/io-monitor/recipes-common/io-monitor/io-monitor/io_monitor/utils/data_collector.py | xe1gyq/stx-utils | 93b7f7dc2c6732db8c8ae0eb3f52ace4df714dc9 | [
"Apache-2.0"
] | null | null | null | middleware/io-monitor/recipes-common/io-monitor/io-monitor/io_monitor/utils/data_collector.py | xe1gyq/stx-utils | 93b7f7dc2c6732db8c8ae0eb3f52ace4df714dc9 | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (c) 2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
import logging
import os
from io_monitor.constants import DOMAIN
from io_monitor.utils.data_window import DataCollectionWindow
LOG = logging.getLogger(DOMAIN)
class DeviceDataCollec... | 36.013514 | 77 | 0.630206 | 5,031 | 0.943902 | 0 | 0 | 0 | 0 | 0 | 0 | 628 | 0.117824 |
869e8ff896779ff36d9b024ced2d268e80c7682a | 19,793 | py | Python | examples/language-modeling/debias_lm_hps_tune.py | SoumyaBarikeri/transformers | 996c6e113404000f50444287aa8a31a174ebd92f | [
"Apache-2.0"
] | 1 | 2021-08-07T06:06:45.000Z | 2021-08-07T06:06:45.000Z | examples/language-modeling/debias_lm_hps_tune.py | SoumyaBarikeri/transformers | 996c6e113404000f50444287aa8a31a174ebd92f | [
"Apache-2.0"
] | null | null | null | examples/language-modeling/debias_lm_hps_tune.py | SoumyaBarikeri/transformers | 996c6e113404000f50444287aa8a31a174ebd92f | [
"Apache-2.0"
] | 2 | 2021-05-31T08:50:50.000Z | 2022-01-26T13:14:58.000Z | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | 38.210425 | 175 | 0.664477 | 5,524 | 0.279089 | 0 | 0 | 3,187 | 0.161017 | 0 | 0 | 7,779 | 0.393018 |
869ee02cc744c1a084a226d08c1391e0d7881239 | 1,373 | py | Python | checksums.py | pgp/RootHelperClientTestInteractions | 6b9e9cc9f10eb2bf9b9dafa851ed56005f7666b5 | [
"Apache-2.0"
] | 1 | 2019-05-04T12:29:41.000Z | 2019-05-04T12:29:41.000Z | checksums.py | pgp/RootHelperClientTestInteractions | 6b9e9cc9f10eb2bf9b9dafa851ed56005f7666b5 | [
"Apache-2.0"
] | null | null | null | checksums.py | pgp/RootHelperClientTestInteractions | 6b9e9cc9f10eb2bf9b9dafa851ed56005f7666b5 | [
"Apache-2.0"
] | null | null | null | from net_common import *
import struct
import sys
def getDirHashOpts(withNames=False,
ignoreThumbsFiles=True,
ignoreUnixHiddenFiles=True,
ignoreEmptyDirs=True):
return bytearray([((1 if withNames else 0) +
(2 if ignoreThumbsFiles else ... | 40.382353 | 128 | 0.627822 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 455 | 0.331391 |
869f105dabe3ba66d48901d5ab1ef89fe7052f2e | 624 | py | Python | investment_report/migrations/0020_auto_20180911_1005.py | uktrade/pir-api | 79747ceab042c42c287e2b7471f6dade70f68693 | [
"MIT"
] | 1 | 2021-02-02T19:08:55.000Z | 2021-02-02T19:08:55.000Z | investment_report/migrations/0020_auto_20180911_1005.py | uktrade/invest-pir-api | be56efddf9dfdf81c8557441a9a54d9a4dd4bab1 | [
"MIT"
] | 21 | 2018-07-10T10:20:47.000Z | 2022-03-24T09:36:29.000Z | investment_report/migrations/0020_auto_20180911_1005.py | uktrade/pir-api | 79747ceab042c42c287e2b7471f6dade70f68693 | [
"MIT"
] | 1 | 2021-02-04T11:28:37.000Z | 2021-02-04T11:28:37.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-09-11 10:05
from __future__ import unicode_literals
import config.s3
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('investment_report', '0019_auto_20180820_1304'),
]
operations = [
... | 27.130435 | 155 | 0.653846 | 448 | 0.717949 | 0 | 0 | 0 | 0 | 0 | 0 | 222 | 0.355769 |
86a0198d73981242105ec1cd9a6582cfdecf35e4 | 317 | py | Python | tests/test-scripts/threadpools.py | whalesalad/filprofiler | 9c12cbe62ad1fed5d59d923013739bb3377bc24c | [
"Apache-2.0"
] | 521 | 2020-06-18T14:27:22.000Z | 2022-03-30T08:29:10.000Z | tests/test-scripts/threadpools.py | whalesalad/filprofiler | 9c12cbe62ad1fed5d59d923013739bb3377bc24c | [
"Apache-2.0"
] | 277 | 2020-06-18T14:11:36.000Z | 2022-03-28T09:51:11.000Z | tests/test-scripts/threadpools.py | sthagen/python-filprofiler | 5efe9fcca539d31f5423bbfa39a3f49176925350 | [
"Apache-2.0"
] | 17 | 2020-06-26T05:29:43.000Z | 2022-03-28T09:57:08.000Z | """Validate that number of threads in thread pools is set to 1."""
import numexpr
import blosc
import threadpoolctl
# APIs that return previous number of threads:
assert numexpr.set_num_threads(2) == 1
assert blosc.set_nthreads(2) == 1
for d in threadpoolctl.threadpool_info():
assert d["num_threads"] == 1, d
| 24.384615 | 66 | 0.747634 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 125 | 0.394322 |
86a15534f296338602eb17c7dad23025e0241a4e | 3,208 | py | Python | scripts/viewStokespat.py | David-McKenna/AntPat | 45618659994b27e2654f1effd6d9baa15867b6d3 | [
"ISC"
] | 5 | 2016-06-21T14:54:23.000Z | 2021-04-06T06:23:25.000Z | scripts/viewStokespat.py | David-McKenna/AntPat | 45618659994b27e2654f1effd6d9baa15867b6d3 | [
"ISC"
] | null | null | null | scripts/viewStokespat.py | David-McKenna/AntPat | 45618659994b27e2654f1effd6d9baa15867b6d3 | [
"ISC"
] | 2 | 2019-10-25T03:16:06.000Z | 2020-11-15T14:18:46.000Z | #!/usr/bin/env python
"""A simple viewer for Stokes patterns based on two far-field pattern files.
(Possibly based on one FF pattern files if it has two requests: one for each
polarization channel.)"""
import os
import argparse
import numpy
import matplotlib.pyplot as plt
from antpat.reps.sphgridfun.tvecfun import TVec... | 36.044944 | 102 | 0.674564 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 760 | 0.236908 |
86a15d2cf1ab721951e4abf4f4b561d571ed4d1c | 2,141 | py | Python | utils.py | lingjiao10/Facial-Expression-Recognition.Pytorch | f5ba0e527347af3778d44eb7045e4970d01641a6 | [
"MIT"
] | null | null | null | utils.py | lingjiao10/Facial-Expression-Recognition.Pytorch | f5ba0e527347af3778d44eb7045e4970d01641a6 | [
"MIT"
] | null | null | null | utils.py | lingjiao10/Facial-Expression-Recognition.Pytorch | f5ba0e527347af3778d44eb7045e4970d01641a6 | [
"MIT"
] | 1 | 2019-10-02T02:26:39.000Z | 2019-10-02T02:26:39.000Z | '''Some helper functions for PyTorch, including:
- progress_bar: progress bar mimic xlua.progress.
- set_lr : set the learning rate
- clip_gradient : clip gradient
'''
import os
import sys
import time
import math
import torch
import torch.nn as nn
import torch.nn.init as init
from torch.autogr... | 27.101266 | 76 | 0.604858 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 468 | 0.216767 |
86a1bd490fa794c86a7ba173a9dce9709f3eb600 | 2,236 | py | Python | string-method/src/analysis/FE_analysis/index_converter.py | delemottelab/gpcr-string-method-2019 | b50786a4a8747d56ad04ede525592eb31f1890fd | [
"MIT"
] | null | null | null | string-method/src/analysis/FE_analysis/index_converter.py | delemottelab/gpcr-string-method-2019 | b50786a4a8747d56ad04ede525592eb31f1890fd | [
"MIT"
] | null | null | null | string-method/src/analysis/FE_analysis/index_converter.py | delemottelab/gpcr-string-method-2019 | b50786a4a8747d56ad04ede525592eb31f1890fd | [
"MIT"
] | 3 | 2020-03-16T04:33:50.000Z | 2021-03-19T17:25:59.000Z | from __future__ import absolute_import, division, print_function
import logging
import sys
logging.basicConfig(
stream=sys.stdout,
level=logging.DEBUG,
format='%(asctime)s %(name)s-%(levelname)s: %(message)s',
datefmt='%Y-%m-%d %H:%M:%S')
import numpy as np
import utils
logger = logging.getLogger("ind... | 38.551724 | 116 | 0.609123 | 1,899 | 0.849284 | 0 | 0 | 0 | 0 | 0 | 0 | 259 | 0.115832 |
86a2581b9feb29958228bc644f88e652dbe7a0fa | 38 | py | Python | Ex029 Aula 11-Cores no Terminal.py | andersontmachado/ExerciciosPython | ebd93eb4127dadedee8b719ccc4bc20fc151d0ad | [
"MIT"
] | 1 | 2020-04-30T14:47:15.000Z | 2020-04-30T14:47:15.000Z | Ex029 Aula 11-Cores no Terminal.py | andersontmachado/exerciciospython | ebd93eb4127dadedee8b719ccc4bc20fc151d0ad | [
"MIT"
] | null | null | null | Ex029 Aula 11-Cores no Terminal.py | andersontmachado/exerciciospython | ebd93eb4127dadedee8b719ccc4bc20fc151d0ad | [
"MIT"
] | null | null | null | print('\033[7;30mOla mundo\033[m!!!')
| 19 | 37 | 0.631579 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 0.789474 |
86a37502649b0fcb2349b60e7e2d86e82dd233f5 | 12,050 | py | Python | cirq-pasqal/cirq_pasqal/pasqal_device.py | pavoljuhas/Cirq | b6d6577be61d216ce2f29f8c64ae5879cf3087d5 | [
"Apache-2.0"
] | 1 | 2022-02-05T22:17:39.000Z | 2022-02-05T22:17:39.000Z | cirq-pasqal/cirq_pasqal/pasqal_device.py | pavoljuhas/Cirq | b6d6577be61d216ce2f29f8c64ae5879cf3087d5 | [
"Apache-2.0"
] | null | null | null | cirq-pasqal/cirq_pasqal/pasqal_device.py | pavoljuhas/Cirq | b6d6577be61d216ce2f29f8c64ae5879cf3087d5 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The Cirq Developers
#
# 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 in ... | 37.42236 | 99 | 0.630954 | 11,033 | 0.915602 | 0 | 0 | 6,438 | 0.534274 | 0 | 0 | 5,728 | 0.475353 |
86a3efacb490990d88c7dfa47acc3b8f0d98c63a | 22,798 | py | Python | command_line/show.py | huwjenkins/dials | 885a2f6ea3900dd0c9fcc15c03561fb45452c3bb | [
"BSD-3-Clause"
] | null | null | null | command_line/show.py | huwjenkins/dials | 885a2f6ea3900dd0c9fcc15c03561fb45452c3bb | [
"BSD-3-Clause"
] | 1 | 2019-06-03T16:09:12.000Z | 2019-06-04T12:47:20.000Z | command_line/show.py | rjgildea/dials | 0665a385d644bbef7541fb2d33c7a3c5a748e2b4 | [
"BSD-3-Clause"
] | null | null | null | import os
import sys
import numpy as np
import iotbx.phil
from cctbx import uctbx
from dxtbx.model.experiment_list import ExperimentListFactory
from scitbx.math import five_number_summary
import dials.util
from dials.array_family import flex
from dials.util import Sorry, tabulate
help_message = """
Examples::
d... | 32.992764 | 88 | 0.530485 | 0 | 0 | 0 | 0 | 1,999 | 0.087683 | 0 | 0 | 5,302 | 0.232564 |
86a477c71ec5eb0f689387ca230eaa223627c82b | 8,749 | py | Python | app/config/env_jesa.py | OuissalTAIM/jenkins | 7ea5bcdeb6c0bb3cc14c2826a68e4f521de163c1 | [
"BSD-1-Clause"
] | null | null | null | app/config/env_jesa.py | OuissalTAIM/jenkins | 7ea5bcdeb6c0bb3cc14c2826a68e4f521de163c1 | [
"BSD-1-Clause"
] | 6 | 2021-02-02T22:52:41.000Z | 2022-03-12T00:37:30.000Z | app/config/env_jesa.py | OuissalTAIM/jenkins | 7ea5bcdeb6c0bb3cc14c2826a68e4f521de163c1 | [
"BSD-1-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from enum import Enum, IntEnum, unique
import os
APP_NAME = "mine2farm"
NETWORK_NAME = "CenterAxis"
LOG_LEVEL_CONSOLE = "WARNING"
LOG_LEVEL_FILE = "INFO"
APP_FOLDER = os.getenv("JESA_MINE2FARM_HOME", "C:/GitRepos/mine2farm/")
LOG_FOLDER = APP_FOLDER + "app/log/"
LOG_FILE = "%(asctime)_" + AP... | 29.758503 | 125 | 0.65356 | 866 | 0.098983 | 0 | 0 | 270 | 0.030861 | 0 | 0 | 3,387 | 0.38713 |
86a51a9e777416f598dec47e504f16a9b1fa7744 | 433 | py | Python | myFirstApp/travello/models.py | cankush625/Django | a3e874a69fbf34bf9123a7d60697a2449c7591c6 | [
"MIT"
] | null | null | null | myFirstApp/travello/models.py | cankush625/Django | a3e874a69fbf34bf9123a7d60697a2449c7591c6 | [
"MIT"
] | 10 | 2020-02-12T03:08:48.000Z | 2022-02-10T11:27:50.000Z | myFirstApp/travello/models.py | cankush625/Django | a3e874a69fbf34bf9123a7d60697a2449c7591c6 | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
class Destination(models.Model) :
name = models.CharField(max_length = 100)
img = models.ImageField(upload_to = 'pics')
desc = models.TextField()
price = models.IntegerField()
offer = models.BooleanField(default = False)
class News()... | 22.789474 | 48 | 0.637413 | 365 | 0.842956 | 0 | 0 | 0 | 0 | 0 | 0 | 32 | 0.073903 |
86a5619ddeca5e16cc4b5d0ebb8500be1708f077 | 6,001 | py | Python | app/app.py | Moustique-bot/hands-on-2021 | fd023f0a431f72ef2c48e3a469be42e2de9e2957 | [
"MIT"
] | null | null | null | app/app.py | Moustique-bot/hands-on-2021 | fd023f0a431f72ef2c48e3a469be42e2de9e2957 | [
"MIT"
] | null | null | null | app/app.py | Moustique-bot/hands-on-2021 | fd023f0a431f72ef2c48e3a469be42e2de9e2957 | [
"MIT"
] | null | null | null | import base64
import io
import dash
import dash_core_components as dcc
import dash_html_components as html
import dash_bootstrap_components as dbc
from dash.dependencies import Input, Output
import numpy as np
import tensorflow as tf
from PIL import Image
from constants import CLASSES
import yaml
with open('app.ya... | 31.920213 | 402 | 0.551408 | 0 | 0 | 0 | 0 | 2,540 | 0.421507 | 0 | 0 | 1,949 | 0.323432 |
86a57ddfcf5854e170f6cff9e4deb86cb8f9d464 | 1,214 | py | Python | books/rakutenapi.py | NobukoYano/LibraryApp | 623f60614f15ab760e1c0d2f18954ce948f2d2a3 | [
"MIT"
] | 1 | 2019-04-27T11:18:42.000Z | 2019-04-27T11:18:42.000Z | books/rakutenapi.py | NobukoYano/LibrayApp | 623f60614f15ab760e1c0d2f18954ce948f2d2a3 | [
"MIT"
] | 11 | 2020-02-12T00:11:23.000Z | 2022-02-10T07:59:24.000Z | books/rakutenapi.py | NobukoYano/LibrayApp | 623f60614f15ab760e1c0d2f18954ce948f2d2a3 | [
"MIT"
] | null | null | null | import json
import requests
from django.conf import settings
class rakuten:
def get_json(self, isbn: str) -> dict:
appid = settings.RAKUTEN_APP_ID
# API request template
api = "https://app.rakuten.co.jp/services/api/BooksTotal/"\
"Search/20170404?format=json&isbnjan={isbnj... | 27.590909 | 74 | 0.559308 | 1,149 | 0.946458 | 0 | 0 | 0 | 0 | 0 | 0 | 419 | 0.34514 |
86a6435f792c7fc0f926b7e3c4e14710ea4c902b | 26 | py | Python | Random-Programs/optimization/root/v4.py | naumoff0/Archive | d4ad2da89abb1576dd5a7c72ded6bf9b45c3f610 | [
"MIT"
] | null | null | null | Random-Programs/optimization/root/v4.py | naumoff0/Archive | d4ad2da89abb1576dd5a7c72ded6bf9b45c3f610 | [
"MIT"
] | null | null | null | Random-Programs/optimization/root/v4.py | naumoff0/Archive | d4ad2da89abb1576dd5a7c72ded6bf9b45c3f610 | [
"MIT"
] | null | null | null | print(int(input(""))**0.5) | 26 | 26 | 0.576923 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0.076923 |
86a699aa985f4eb39369d4b317e19a2eb2706a0b | 18,710 | py | Python | sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2018_01_01_preview/models/_models_py3.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2018_01_01_preview/models/_models_py3.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2018_01_01_preview/models/_models_py3.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 32.147766 | 165 | 0.615446 | 18,074 | 0.966007 | 0 | 0 | 0 | 0 | 0 | 0 | 9,725 | 0.519776 |
86a6e60b85eb87efd2531834b58c525dde29390d | 21,322 | py | Python | school/views.py | pa-one-patel/college_managenment | be6f6dcac1f7e01f71d95f445e2118e8eec3fe3a | [
"MIT"
] | 1 | 2021-04-11T12:05:44.000Z | 2021-04-11T12:05:44.000Z | school/views.py | aliffauzi/schoolmanagement | 6a4477af01df148404d1ff2941f74accb5717b09 | [
"MIT"
] | 6 | 2021-03-19T04:10:49.000Z | 2021-09-22T19:06:14.000Z | school/views.py | aliffauzi/schoolmanagement | 6a4477af01df148404d1ff2941f74accb5717b09 | [
"MIT"
] | 1 | 2021-04-11T12:07:08.000Z | 2021-04-11T12:07:08.000Z | from django.shortcuts import render,redirect,reverse
from . import forms,models
from django.db.models import Sum
from django.contrib.auth.models import Group
from django.http import HttpResponseRedirect
from django.contrib.auth.decorators import login_required,user_passes_test
def home_view(request):
if request.us... | 33.211838 | 123 | 0.710909 | 0 | 0 | 0 | 0 | 15,475 | 0.725776 | 0 | 0 | 4,229 | 0.19834 |
86a72a80401e7713121d2f9ca2a2d2dc62069b97 | 16,684 | py | Python | PaddleCV/tracking/pytracking/features/deep.py | weiwei1115/models | e2c96c5f64b1dc8f0d5d9aa121300b87150e11e3 | [
"Apache-2.0"
] | 2 | 2021-05-15T07:35:04.000Z | 2021-07-15T07:01:13.000Z | PaddleCV/tracking/pytracking/features/deep.py | weiwei1115/models | e2c96c5f64b1dc8f0d5d9aa121300b87150e11e3 | [
"Apache-2.0"
] | null | null | null | PaddleCV/tracking/pytracking/features/deep.py | weiwei1115/models | e2c96c5f64b1dc8f0d5d9aa121300b87150e11e3 | [
"Apache-2.0"
] | 4 | 2021-08-11T08:25:10.000Z | 2021-10-16T07:41:59.000Z | import os
import numpy as np
from paddle import fluid
from ltr.models.bbreg.atom import atom_resnet50, atom_resnet18
from ltr.models.siamese.siam import siamfc_alexnet
from ltr.models.siam.siam import SiamRPN_AlexNet, SiamMask_ResNet50_sharp, SiamMask_ResNet50_base
from pytracking.admin.environment import env... | 33.705051 | 98 | 0.552805 | 16,169 | 0.969132 | 0 | 0 | 0 | 0 | 0 | 0 | 2,448 | 0.146727 |
86a7a933257c5b58ca131b6e09db3e5af93d5f4e | 19,069 | py | Python | netesto/local/psPlot.py | fakeNetflix/facebook-repo-fbkutils | 16ec0c024322c163e7dbe691812ba8fdf5b511ad | [
"BSD-3-Clause"
] | 346 | 2016-04-08T17:04:29.000Z | 2021-09-30T06:05:47.000Z | netesto/local/psPlot.py | fakeNetflix/facebook-repo-fbkutils | 16ec0c024322c163e7dbe691812ba8fdf5b511ad | [
"BSD-3-Clause"
] | 38 | 2016-04-26T14:58:17.000Z | 2021-10-07T20:43:39.000Z | netesto/local/psPlot.py | fakeNetflix/facebook-repo-fbkutils | 16ec0c024322c163e7dbe691812ba8fdf5b511ad | [
"BSD-3-Clause"
] | 76 | 2016-04-08T17:59:23.000Z | 2021-09-05T13:18:27.000Z | #!/usr/bin/env python2
import sys
import random
import os.path
import shutil
import commands
import types
import math
#gsPath = '/usr/local/bin/gs'
gsPath = 'gs'
logFile = '/dev/null'
#logFile = 'plot.log'
#--- class PsPlot(fname, pageHeader, pageSubHeader, plotsPerPage)
#
class PsPlot(object):
def __init__(self... | 31.260656 | 147 | 0.457968 | 16,770 | 0.879438 | 0 | 0 | 0 | 0 | 0 | 0 | 3,237 | 0.169752 |
86a7e9fe107833a210f5b3b41b68cc42c51f48ee | 402 | py | Python | physio2go/exercises/migrations/0003_auto_20161128_1753.py | hamole/physio2go | ebd14c9406e2b6818dc649e4863a734bf812e9b0 | [
"MIT"
] | null | null | null | physio2go/exercises/migrations/0003_auto_20161128_1753.py | hamole/physio2go | ebd14c9406e2b6818dc649e4863a734bf812e9b0 | [
"MIT"
] | null | null | null | physio2go/exercises/migrations/0003_auto_20161128_1753.py | hamole/physio2go | ebd14c9406e2b6818dc649e4863a734bf812e9b0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-11-28 06:53
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('exercises', '0002_auto_20161128_1718'),
]
operations = [
migrations.RenameModel(
... | 20.1 | 49 | 0.621891 | 252 | 0.626866 | 0 | 0 | 0 | 0 | 0 | 0 | 128 | 0.318408 |
86a8e1ed877d30bb9fe2c31cbcb8f214021f1ba6 | 2,006 | py | Python | setup.py | pasinskim/mender-python-client | d6f3dc86ec46b0b249a112c5037bea579266e649 | [
"Apache-2.0"
] | null | null | null | setup.py | pasinskim/mender-python-client | d6f3dc86ec46b0b249a112c5037bea579266e649 | [
"Apache-2.0"
] | 71 | 2020-12-21T05:08:13.000Z | 2022-01-31T02:04:26.000Z | setup.py | pasinskim/mender-python-client | d6f3dc86ec46b0b249a112c5037bea579266e649 | [
"Apache-2.0"
] | 11 | 2020-12-02T14:46:58.000Z | 2021-12-02T06:43:25.000Z | # Copyright 2021 Northern.tech AS
#
# 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 ag... | 37.849057 | 82 | 0.698903 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,198 | 0.597208 |
86a985b6e0366a5f31612b64e590684791f59ced | 740 | py | Python | Q295-v2.py | Linchin/python_leetcode_git | 3d08ab04bbdbd2ce268f33c501fbb149662872c7 | [
"MIT"
] | null | null | null | Q295-v2.py | Linchin/python_leetcode_git | 3d08ab04bbdbd2ce268f33c501fbb149662872c7 | [
"MIT"
] | null | null | null | Q295-v2.py | Linchin/python_leetcode_git | 3d08ab04bbdbd2ce268f33c501fbb149662872c7 | [
"MIT"
] | null | null | null | """
295
find median from data stream
hard
"""
from heapq import *
class MedianFinder:
# max heap and min heap
def __init__(self):
"""
initialize your data structure here.
"""
self.hi = []
self.lo = []
def addNum(self, num: int) -> None:
heappush(self.lo,... | 18.5 | 53 | 0.558108 | 570 | 0.77027 | 0 | 0 | 0 | 0 | 0 | 0 | 128 | 0.172973 |
86a988c6aa7f35cfd3902d0931e8d87597572497 | 3,445 | py | Python | raisimPy/examples/newtonsCradle.py | mstoelzle/raisimLib | 81f33a1b82f296e9622f950bc292f61bee2d2c2f | [
"Apache-2.0"
] | null | null | null | raisimPy/examples/newtonsCradle.py | mstoelzle/raisimLib | 81f33a1b82f296e9622f950bc292f61bee2d2c2f | [
"Apache-2.0"
] | null | null | null | raisimPy/examples/newtonsCradle.py | mstoelzle/raisimLib | 81f33a1b82f296e9622f950bc292f61bee2d2c2f | [
"Apache-2.0"
] | null | null | null | import os
import numpy as np
import raisimpy as raisim
import math
import time
raisim.World.setLicenseFile(os.path.dirname(os.path.abspath(__file__)) + "/../../rsc/activation.raisim")
world = raisim.World()
ground = world.addGround()
world.setTimeStep(0.001)
world.setMaterialPairProp("steel", "steel", 0.1, 1.0, 0.0)
... | 32.196262 | 134 | 0.722787 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 208 | 0.060377 |
86aa12779a6111083d5f447b8a7b523841c60e96 | 15,132 | py | Python | nova/virt/hyperv/volumeops.py | viveknandavanam/nova | 556377b6915936467436c9d5bb33bc0e22244e1e | [
"Apache-2.0"
] | 1 | 2019-07-29T10:30:24.000Z | 2019-07-29T10:30:24.000Z | nova/virt/hyperv/volumeops.py | viveknandavanam/nova | 556377b6915936467436c9d5bb33bc0e22244e1e | [
"Apache-2.0"
] | 11 | 2017-06-19T01:28:55.000Z | 2017-06-23T02:01:47.000Z | nova/virt/hyperv/volumeops.py | viveknandavanam/nova | 556377b6915936467436c9d5bb33bc0e22244e1e | [
"Apache-2.0"
] | 3 | 2018-04-04T15:15:01.000Z | 2018-04-19T18:14:25.000Z | # Copyright 2012 Pedro Navarro Perez
# Copyright 2013 Cloudbase Solutions Srl
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org... | 41.231608 | 79 | 0.630849 | 13,976 | 0.923606 | 0 | 0 | 1,998 | 0.132038 | 0 | 0 | 2,841 | 0.187748 |
86aa70a303cf42efa31de488c8f84aac08996583 | 1,326 | py | Python | -Loan-Approval-Analysis/code.py | lakshit-sharma/greyatom-python-for-data-science | 55a6e5a4c54a4f7135cc09fb287d2f2fa1d36413 | [
"MIT"
] | null | null | null | -Loan-Approval-Analysis/code.py | lakshit-sharma/greyatom-python-for-data-science | 55a6e5a4c54a4f7135cc09fb287d2f2fa1d36413 | [
"MIT"
] | null | null | null | -Loan-Approval-Analysis/code.py | lakshit-sharma/greyatom-python-for-data-science | 55a6e5a4c54a4f7135cc09fb287d2f2fa1d36413 | [
"MIT"
] | null | null | null | # --------------
# Importing header files
import numpy as np
import pandas as pd
from scipy.stats import mode
# code starts here
bank = pd.read_csv(path)
categorical_var = bank.select_dtypes(include = 'object')
print(categorical_var)
numerical_var = bank.select_dtypes(include = 'number')
print(numeric... | 24.109091 | 125 | 0.69457 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 331 | 0.249623 |
86aa77866191f8899234ee88d0a38f765c6e8d3e | 7,673 | py | Python | others/train_RNN.py | jacobswan1/Video2Commonsense | 4dcef76360a29702fd90b7030a39a123da6db19e | [
"MIT"
] | 31 | 2021-01-07T00:42:05.000Z | 2022-01-18T16:44:09.000Z | others/train_RNN.py | jacobswan1/Video2Commonsense | 4dcef76360a29702fd90b7030a39a123da6db19e | [
"MIT"
] | 7 | 2021-01-07T00:41:28.000Z | 2021-12-01T09:29:49.000Z | others/train_RNN.py | jacobswan1/Video2Commonsense | 4dcef76360a29702fd90b7030a39a123da6db19e | [
"MIT"
] | 4 | 2021-02-04T04:55:20.000Z | 2021-07-25T06:50:44.000Z | ''' Training Scropt for V2C captioning task. '''
__author__ = 'Jacob Zhiyuan Fang'
import os
import numpy as np
from opts import *
from utils.utils import *
import torch.optim as optim
from model.Model import Model
from torch.utils.data import DataLoader
from utils.dataloader import VideoDataset
from model.transforme... | 41.475676 | 121 | 0.571224 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,141 | 0.27903 |