hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
954c18bf90f46d31eb20671c5a0147392c86f4dc
551
py
Python
polyaxon/rl/stats.py
chandu088/p
878456367105924accc5b235263b0bb209d877c8
[ "MIT" ]
7
2018-03-05T08:01:45.000Z
2021-03-12T09:00:11.000Z
polyaxon/rl/stats.py
chandu088/p
878456367105924accc5b235263b0bb209d877c8
[ "MIT" ]
23
2017-07-10T16:52:25.000Z
2018-01-01T15:17:32.000Z
polyaxon/rl/stats.py
chandu088/p
878456367105924accc5b235263b0bb209d877c8
[ "MIT" ]
4
2018-01-25T14:08:49.000Z
2021-12-03T07:11:29.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function
21.192308
64
0.618875
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import numpy as np class Stats(object): """A class to collect episode rewards statistics""" def __init__(self): self.rewards = [] self.max_reward = 0 self.avg_reward = 0 self.total_reward ...
0
0
0
418
0
0
0
-3
46
26dcfc4b8ffe1021000bf8510fb228c1e8d519f9
5,275
py
Python
scripts/ggr/ggr_summarize_motifs.py
kundajelab/tronn
59654a958f6debb5be150e383e96997f1982359d
[ "MIT" ]
5
2020-10-18T21:17:44.000Z
2021-11-30T06:25:09.000Z
scripts/ggr/ggr_summarize_motifs.py
kundajelab/tronn
59654a958f6debb5be150e383e96997f1982359d
[ "MIT" ]
1
2021-11-18T13:03:48.000Z
2021-11-18T13:03:48.000Z
scripts/ggr/ggr_summarize_motifs.py
kundajelab/tronn
59654a958f6debb5be150e383e96997f1982359d
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import sys import h5py import argparse import pandas as pd import numpy as np from tronn.util.scripts import setup_run_logs BLACKLIST_MOTIFS = [ "SMARC", "NANOG"] def get_blacklist_indices(df): """search for blacklist substrings and return a list of indices """ ...
32.763975
137
0.639621
#!/usr/bin/env python import os import sys import h5py import argparse import pandas as pd import numpy as np from tronn.util.scripts import setup_run_logs BLACKLIST_MOTIFS = [ "SMARC", "NANOG"] def get_blacklist_indices(df): """search for blacklist substrings and return a list of indices """ ...
0
0
0
0
0
0
0
0
0
bcae6fc74a60731a753d23ca11a65e5b5b9cdb07
3,135
py
Python
hub-mirror/hubmirror.py
01xz/hub-mirror-action
b0a4b793e606e2b88fd418fe9eab73bb0755493f
[ "MIT" ]
null
null
null
hub-mirror/hubmirror.py
01xz/hub-mirror-action
b0a4b793e606e2b88fd418fe9eab73bb0755493f
[ "MIT" ]
null
null
null
hub-mirror/hubmirror.py
01xz/hub-mirror-action
b0a4b793e606e2b88fd418fe9eab73bb0755493f
[ "MIT" ]
1
2021-07-19T06:07:01.000Z
2021-07-19T06:07:01.000Z
if __name__ == '__main__': mirror = HubMirror() mirror.run()
32.319588
77
0.527273
import argparse import sys import yaml from utils import str2bool, str2list from hub import Hub from mirror import Mirror class HubMirror(object): def __init__(self): self.parser = self._create_parser() self.args = self.parser.parse_args() self.white_list = str2list(self.args.white_list) ...
0
0
0
2,917
0
0
0
-10
156
377d80112bc4c04755df98fa42f35c0ec78283f2
20,726
py
Python
ci/tsqa/tests/test_keepalive.py
garfieldonly/ats_git
940ff5c56bebabb96130a55c2a17212c5c518138
[ "Apache-2.0" ]
1
2022-01-19T14:34:34.000Z
2022-01-19T14:34:34.000Z
ci/tsqa/tests/test_keepalive.py
mingzym/trafficserver
a01c3a357b4ff9193f2e2a8aee48e3751ef2177a
[ "Apache-2.0" ]
4
2021-06-21T15:06:11.000Z
2021-06-21T15:06:14.000Z
ci/tsqa/tests/test_keepalive.py
maskit/trafficserver
3ffa19873f7cd7ced2fbdfed5a0ac8ddbbe70a68
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may...
42.822314
138
0.643298
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may...
0
8,878
0
10,424
0
0
0
-44
432
5b38f29bcdb7e4e840abfcedbbbdda71ec4c5e74
909
py
Python
01-introduction/xx-project/Task2.py
sconde/data-structure-and-algorithms-nanodegree
9abbbee520570f5dca620d3af7af2f875645177d
[ "MIT" ]
null
null
null
01-introduction/xx-project/Task2.py
sconde/data-structure-and-algorithms-nanodegree
9abbbee520570f5dca620d3af7af2f875645177d
[ "MIT" ]
null
null
null
01-introduction/xx-project/Task2.py
sconde/data-structure-and-algorithms-nanodegree
9abbbee520570f5dca620d3af7af2f875645177d
[ "MIT" ]
null
null
null
""" Read file into texts and calls. It's ok if you don't understand how to read files """ import csv with open('texts.csv', 'r') as f: texts = list(csv.reader(f)) with open('calls.csv', 'r') as f: calls = list(csv.reader(f)) """ TASK 2: Which telephone number spent the longest time on the phone during the p...
27.545455
110
0.70297
""" Read file into texts and calls. It's ok if you don't understand how to read files """ import csv with open('texts.csv', 'r') as f: texts = list(csv.reader(f)) with open('calls.csv', 'r') as f: calls = list(csv.reader(f)) """ TASK 2: Which telephone number spent the longest time on the phone during the p...
0
0
0
0
0
0
0
3
45
fce40e5f6e3d382f8be4b471e025280decc684c7
2,730
py
Python
source/gui/startinventory/overview.py
zig-for/ALttPDoorRandomizer
0cac07bcd63cafb62cf1e9d570d3edf52ae64fc1
[ "MIT" ]
42
2019-08-22T16:19:51.000Z
2022-03-30T17:39:39.000Z
source/gui/startinventory/overview.py
zig-for/ALttPDoorRandomizer
0cac07bcd63cafb62cf1e9d570d3edf52ae64fc1
[ "MIT" ]
48
2019-09-04T22:47:03.000Z
2022-01-13T22:16:13.000Z
source/gui/startinventory/overview.py
zig-for/ALttPDoorRandomizer
0cac07bcd63cafb62cf1e9d570d3edf52ae64fc1
[ "MIT" ]
35
2020-01-10T09:12:53.000Z
2022-03-23T08:22:25.000Z
import source.gui.widgets as widgets
38.450704
103
0.665934
from tkinter import ttk, Frame, N, E, W, LEFT, X, VERTICAL, Y import source.gui.widgets as widgets import json import os import source.classes.constants as CONST def startinventory_page(top,parent): # Starting Inventory self = ttk.Frame(parent) # Create uniform list columns def create_list_frame(pare...
0
0
0
0
0
2,544
0
37
112
0165d35807b96648755400877a88c8bd4f9ab864
1,078
py
Python
test.py
kuco23/Sigma-Irregularity
e378ab10271fcc4a2a3f5f3a6dd121eabedddef5
[ "MIT" ]
null
null
null
test.py
kuco23/Sigma-Irregularity
e378ab10271fcc4a2a3f5f3a6dd121eabedddef5
[ "MIT" ]
null
null
null
test.py
kuco23/Sigma-Irregularity
e378ab10271fcc4a2a3f5f3a6dd121eabedddef5
[ "MIT" ]
null
null
null
from lib import (maxSigmaRatio_annealing, localBasicNeighbor, globalTwoPartNeighbor, simplePlot) nsim_global, nsim_local = 400, 100 nrange = range(25, 60, 5) sigma_growth = [] for i in nrange: ropt, gopt = 0, None for _ in range(100): startedges = i * (i - 1) // 2 g, rg = maxSigmaRatio_anneal...
24.5
58
0.636364
from pathlib import Path import matplotlib.pyplot as plt from lib import ( sigma, sigma_t, sigmaRatio, sigmaArgmax, powerAproximation, degreeContinuoutyIndex, randomConnectedEdges, randomConnectedGraph, randomTree, randomSigmaOptAprox, maxSigmaRatio_annealing, localBasicNeigh...
0
0
0
0
0
0
0
337
44
d3047cc640a699da58f363c103275ba6da05fe10
9,110
py
Python
VREP SIM/2ndUpdate.py
ewlo2/ECE-470
02742f1fde12a933cb4cbe09435cca8e6554a297
[ "CNRI-Python" ]
null
null
null
VREP SIM/2ndUpdate.py
ewlo2/ECE-470
02742f1fde12a933cb4cbe09435cca8e6554a297
[ "CNRI-Python" ]
null
null
null
VREP SIM/2ndUpdate.py
ewlo2/ECE-470
02742f1fde12a933cb4cbe09435cca8e6554a297
[ "CNRI-Python" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sun Mar 22 12:58:36 2020 @author: Edmund Lo """ try: import sim except: print ('--------------------------------------------------------------') print ('"sim.py" could not be imported. This means very probably that') print ('either "sim.py" ...
30.366667
134
0.609221
# -*- coding: utf-8 -*- """ Created on Sun Mar 22 12:58:36 2020 @author: Edmund Lo """ try: import sim except: print ('--------------------------------------------------------------') print ('"sim.py" could not be imported. This means very probably that') print ('either "sim.py" ...
0
0
0
0
0
3,295
0
16
331
7d71bab19fde8b16698b35e0366b9b755edf8ef8
2,561
py
Python
src/bayesian_combination/ibcc.py
lmluzern/arxiv2018-bayesian-ensembles
a426e6f085bd042e646ede84dd1df7c08b585e97
[ "Apache-2.0" ]
null
null
null
src/bayesian_combination/ibcc.py
lmluzern/arxiv2018-bayesian-ensembles
a426e6f085bd042e646ede84dd1df7c08b585e97
[ "Apache-2.0" ]
null
null
null
src/bayesian_combination/ibcc.py
lmluzern/arxiv2018-bayesian-ensembles
a426e6f085bd042e646ede84dd1df7c08b585e97
[ "Apache-2.0" ]
null
null
null
''' Wrapper classes to implement independent Bayesian classifier combination (IBCC-VB) using the Bayesian combination framework, along with variants of that model. '''
54.489362
124
0.645451
''' Wrapper classes to implement independent Bayesian classifier combination (IBCC-VB) using the Bayesian combination framework, along with variants of that model. ''' from bayesian_combination.bayesian_combination import BC class IBCC(BC): def __init__(self, L=3, K=5, max_iter=20, eps=1e-4, ...
0
0
0
2,243
0
0
0
35
114
43c54ae308c3cc54f8833484d363f50db0f01e06
1,558
py
Python
shelvecache.py
lbellomo/shelvecache
c84c70d9ce6ccac6a05fdd25ff23a52a66aafee7
[ "MIT" ]
null
null
null
shelvecache.py
lbellomo/shelvecache
c84c70d9ce6ccac6a05fdd25ff23a52a66aafee7
[ "MIT" ]
null
null
null
shelvecache.py
lbellomo/shelvecache
c84c70d9ce6ccac6a05fdd25ff23a52a66aafee7
[ "MIT" ]
null
null
null
import json def dump_args(args: tuple, kwargs: dict) -> str: """Util to make hashable function arguments.""" return json.dumps(args) + json.dumps(kwargs, sort_keys=True) def shelvecache(shelvename="cache"): """ Decorator to wrap a function or corroutine with a memoizing callable (like functools.lru_...
27.333333
113
0.535302
import json import shelve from functools import wraps from asyncio import iscoroutinefunction def dump_args(args: tuple, kwargs: dict) -> str: """Util to make hashable function arguments.""" return json.dumps(args) + json.dumps(kwargs, sort_keys=True) def shelvecache(shelvename="cache"): """ Decorat...
0
672
0
0
0
238
0
16
93
d41d5dccbe1561c62b3194b0a769f760d11b96d0
4,609
py
Python
2021/2021_16b.py
davidxiao93/Advent-of-Code
29503100ae4eb46b048fc3ab68ff0181c6f00ee5
[ "MIT" ]
null
null
null
2021/2021_16b.py
davidxiao93/Advent-of-Code
29503100ae4eb46b048fc3ab68ff0181c6f00ee5
[ "MIT" ]
null
null
null
2021/2021_16b.py
davidxiao93/Advent-of-Code
29503100ae4eb46b048fc3ab68ff0181c6f00ee5
[ "MIT" ]
null
null
null
input = """420D598021E0084A07C98EC91DCAE0B880287912A925799429825980593D7DCD400820329480BF21003CC0086028910097520230C80813401D8CC00F601881805705003CC00E200E98400F50031801D160048E5AFEFD5E5C02B93F2F4C11CADBBB799CB294C5FDB8E12C40139B7C98AFA8B2600DCBAF4D3A4C27CB54EA6F5390B1004B93E2F40097CA2ECF70C1001F296EF9A647F5BFC48C012C...
45.186275
1,360
0.707529
from typing import Tuple, List input = """420D598021E0084A07C98EC91DCAE0B880287912A925799429825980593D7DCD400820329480BF21003CC0086028910097520230C80813401D8CC00F601881805705003CC00E200E98400F50031801D160048E5AFEFD5E5C02B93F2F4C11CADBBB799CB294C5FDB8E12C40139B7C98AFA8B2600DCBAF4D3A4C27CB54EA6F5390B1004B93E2F40097CA2EC...
0
0
0
1,392
0
1,610
0
9
114
a515b814b2b1698672f1d1f7ccae0308b5bbe332
2,031
py
Python
logist/exporter.py
nabeen/logist
452cc04756070de72a72f40797697b3812cb5f32
[ "MIT" ]
null
null
null
logist/exporter.py
nabeen/logist
452cc04756070de72a72f40797697b3812cb5f32
[ "MIT" ]
null
null
null
logist/exporter.py
nabeen/logist
452cc04756070de72a72f40797697b3812cb5f32
[ "MIT" ]
null
null
null
import logist.setting as setting import logist.libs.backlog_issues as backlog_issues import logist.libs.todoist_tasks as todoist_tasks
31.246154
86
0.612014
import configparser import click import logist.setting as setting import logist.libs.backlog_issues as backlog_issues import logist.libs.todoist_tasks as todoist_tasks from PyInquirer import style_from_dict, Token, prompt, Separator def main(): # read config before process try: backlog_host = setting....
3
0
0
0
0
1,749
0
32
112
1ff4b5ee7a0cfce50cffe20d0f0eaf4bf217f532
1,463
py
Python
terrain_relative_navigation/terrain_relative_navigation.py
rschwa6308/Landmark-Based-TRN
5d712221138ec6250ed5bd19caed49810f17014e
[ "Apache-2.0" ]
null
null
null
terrain_relative_navigation/terrain_relative_navigation.py
rschwa6308/Landmark-Based-TRN
5d712221138ec6250ed5bd19caed49810f17014e
[ "Apache-2.0" ]
null
null
null
terrain_relative_navigation/terrain_relative_navigation.py
rschwa6308/Landmark-Based-TRN
5d712221138ec6250ed5bd19caed49810f17014e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ /*************************************************************************** TerrainRelativeNavigation A QGIS plugin This plugin analyzes terrain for the purpose of automatic bearing-based robotic navigation ------------------...
29.857143
91
0.585099
# -*- coding: utf-8 -*- """ /*************************************************************************** TerrainRelativeNavigation A QGIS plugin This plugin analyzes terrain for the purpose of automatic bearing-based robotic navigation ------------------...
0
0
0
448
0
0
0
101
68
cc3fff40afa31c69c408df55f38f2b3898171ca2
7,013
py
Python
Generate_Synthetic_Data/generate_synthetic_data_S2.py
saeedmhz/Sarc-Graph
2746b2a88543487c0a501992c0cb6f342b16420e
[ "MIT" ]
1
2021-08-07T18:37:19.000Z
2021-08-07T18:37:19.000Z
Generate_Synthetic_Data/generate_synthetic_data_S2.py
saeedmhz/Sarc-Graph
2746b2a88543487c0a501992c0cb6f342b16420e
[ "MIT" ]
null
null
null
Generate_Synthetic_Data/generate_synthetic_data_S2.py
saeedmhz/Sarc-Graph
2746b2a88543487c0a501992c0cb6f342b16420e
[ "MIT" ]
1
2021-09-22T06:27:49.000Z
2021-09-22T06:27:49.000Z
import numpy as np import geom_fcns as geo import render_fcns as ren import os ########################################################################################## # investigation #2 -- elliptical shape with crossed strips in the center ##########################################################################...
46.753333
166
0.552403
import numpy as np import matplotlib.pyplot as plt import geom_fcns as geo import render_fcns as ren import os import sys ########################################################################################## # investigation #2 -- elliptical shape with crossed strips in the center ###############################...
0
0
0
0
0
0
0
-1
44
12c116121c9025b182cb5b802538a9e7514ce491
14,434
py
Python
conversion.py
jimevans/infield-fly
f2f2ccff16373f27b4fd9fa786f415db1cebc321
[ "MIT" ]
1
2021-07-25T22:25:31.000Z
2021-07-25T22:25:31.000Z
conversion.py
jimevans/infield-fly
f2f2ccff16373f27b4fd9fa786f415db1cebc321
[ "MIT" ]
null
null
null
conversion.py
jimevans/infield-fly
f2f2ccff16373f27b4fd9fa786f415db1cebc321
[ "MIT" ]
null
null
null
"""Module for converting files into correct format"""
39.763085
99
0.607316
"""Module for converting files into correct format""" import json import logging import os import platform import re import subprocess class Converter: """Converts files into the correct format""" def __init__(self, input_file, output_file, ffmpeg_location=None, is_unattended_mode=False): super()._...
0
2,970
0
11,256
0
0
0
-51
202
6f2de6790116bc6ef41091db2832890bbce2457a
2,623
py
Python
eunite/eunite_data.py
jiasudemotuohe/deep_learning
44eb14d91b6b9ca2092361918a1bcaa73786f78e
[ "MIT" ]
null
null
null
eunite/eunite_data.py
jiasudemotuohe/deep_learning
44eb14d91b6b9ca2092361918a1bcaa73786f78e
[ "MIT" ]
null
null
null
eunite/eunite_data.py
jiasudemotuohe/deep_learning
44eb14d91b6b9ca2092361918a1bcaa73786f78e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # @Time : 2020-04-11 12:34 # @Author : speeding_moto import numpy as np import pandas as pd EUNITE_PATH = "dataset/eunite.xlsx" PARSE_TABLE_NAME = "mainData" def load_eunite_data(): """ return the generated load data, include all the features wo handle """ data = open_f...
22.808696
91
0.661456
# -*- coding: utf-8 -*- # @Time : 2020-04-11 12:34 # @Author : speeding_moto import numpy as np import pandas as pd from matplotlib import pyplot as plt EUNITE_PATH = "dataset/eunite.xlsx" PARSE_TABLE_NAME = "mainData" def load_eunite_data(): """ return the generated load data, include all the features...
0
0
0
0
0
665
0
15
91
7889ea5ff6975e36693b763b8d8f625163f66ba0
271
py
Python
codeforces/cdf283_2a.py
knuu/competitive-programming
16bc68fdaedd6f96ae24310d697585ca8836ab6e
[ "MIT" ]
1
2018-11-12T15:18:55.000Z
2018-11-12T15:18:55.000Z
codeforces/cdf283_2a.py
knuu/competitive-programming
16bc68fdaedd6f96ae24310d697585ca8836ab6e
[ "MIT" ]
null
null
null
codeforces/cdf283_2a.py
knuu/competitive-programming
16bc68fdaedd6f96ae24310d697585ca8836ab6e
[ "MIT" ]
null
null
null
n = map(int, input().split()) l = list(map(int, input().split())) ans = 1000 for i in range(1,len(l)-1): li = l[:] li.remove(l[i]) m = 0 for j in range(len(li)-1): m = max(li[j+1] - li[j], m) ans = min(m, ans) print(ans)
18.066667
35
0.457565
n = map(int, input().split()) l = list(map(int, input().split())) ans = 1000 for i in range(1,len(l)-1): li = l[:] li.remove(l[i]) m = 0 for j in range(len(li)-1): m = max(li[j+1] - li[j], m) ans = min(m, ans) print(ans)
0
0
0
0
0
0
0
0
0
0a2d0cc22be48982bfc16b5ccc9a0772925cfccc
12,245
py
Python
exp_tools/EyeLinkCoreGraphicsPyglet.py
StevenM1/flashtask
22e88b386f934972fc9a208b3bbb231d53c21628
[ "MIT" ]
null
null
null
exp_tools/EyeLinkCoreGraphicsPyglet.py
StevenM1/flashtask
22e88b386f934972fc9a208b3bbb231d53c21628
[ "MIT" ]
null
null
null
exp_tools/EyeLinkCoreGraphicsPyglet.py
StevenM1/flashtask
22e88b386f934972fc9a208b3bbb231d53c21628
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # Copyright (c) 1996-2011, SR Research Ltd., All Rights Reserved # # # For use by SR Research licencees only. Redistribution and use in source # and binary forms, with or without modification, are NOT permitted. # # # # Redistributions in binary form must reproduce the above copyright # notice, ...
28.543124
133
0.645488
#!/usr/bin/env python # # Copyright (c) 1996-2011, SR Research Ltd., All Rights Reserved # # # For use by SR Research licencees only. Redistribution and use in source # and binary forms, with or without modification, are NOT permitted. # # # # Redistributions in binary form must reproduce the above copyright # notice, ...
0
0
0
10,671
0
0
0
-52
180
6d3683a0fc5137bc5a58f8290b4f4fd401e38e06
1,546
py
Python
sort_and_search/kth_largest_num_quick_select_algo.py
mantoshkumar1/interview_preparation
c7e5b6692ad6772b38de8be029bddf0e273e0bce
[ "MIT" ]
1
2020-05-28T19:14:56.000Z
2020-05-28T19:14:56.000Z
sort_and_search/kth_largest_num_quick_select_algo.py
mantoshkumar1/interview_preparation
c7e5b6692ad6772b38de8be029bddf0e273e0bce
[ "MIT" ]
null
null
null
sort_and_search/kth_largest_num_quick_select_algo.py
mantoshkumar1/interview_preparation
c7e5b6692ad6772b38de8be029bddf0e273e0bce
[ "MIT" ]
null
null
null
""" Kth Largest Element in an Array: Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element. Example 1: Input: [3,2,1,5,6,4] and k = 2 Output: 5 Example 2: Input: [3,2,3,1,2,4,5,5,6] and k = 4 Output: 4 Note: You may assume k is a...
24.15625
93
0.512937
""" Kth Largest Element in an Array: Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element. Example 1: Input: [3,2,1,5,6,4] and k = 2 Output: 5 Example 2: Input: [3,2,3,1,2,4,5,5,6] and k = 4 Output: 4 Note: You may assume k is a...
6
0
0
933
0
0
0
0
22
cd25372fe0a419d205564d8506edeff386bc9d69
105
py
Python
Tropes/core.py
Direwolf82/Data-Science-Projects
4919bad603f8c95d4e3160dd1f9d144284354131
[ "Apache-2.0" ]
null
null
null
Tropes/core.py
Direwolf82/Data-Science-Projects
4919bad603f8c95d4e3160dd1f9d144284354131
[ "Apache-2.0" ]
null
null
null
Tropes/core.py
Direwolf82/Data-Science-Projects
4919bad603f8c95d4e3160dd1f9d144284354131
[ "Apache-2.0" ]
null
null
null
import requests page = requests.get("http://dataquestio.github.io/web-scraping-pages/simple.html") page
21
82
0.780952
import requests page = requests.get("http://dataquestio.github.io/web-scraping-pages/simple.html") page
0
0
0
0
0
0
0
0
0
202bb2055334eb93cb052b4dc82e3785e40369bf
782
py
Python
loop.py
rohanbanerjee/ComputerVision101
ce4546d23e7d9a2f8cdbe0f31b1d0e25ba755112
[ "MIT" ]
null
null
null
loop.py
rohanbanerjee/ComputerVision101
ce4546d23e7d9a2f8cdbe0f31b1d0e25ba755112
[ "MIT" ]
null
null
null
loop.py
rohanbanerjee/ComputerVision101
ce4546d23e7d9a2f8cdbe0f31b1d0e25ba755112
[ "MIT" ]
null
null
null
import cv2 from imutils.paths import list_images import numpy as np from skimage import exposure as ex for imagePath in list_images("/Users/rohanbanerjee/Documents/SukShi19/dhe"): img = cv2.imread(imagePath) print(imagePath) # img = cv2.resize(image, (25, 25)) # img = cv2.imread('6.jpg') if(len(i...
24.4375
76
0.643223
import imutils import cv2 from imutils.paths import list_images import numpy as np import matplotlib.pyplot as plt from skimage import exposure as ex import imageio import sys for imagePath in list_images("/Users/rohanbanerjee/Documents/SukShi19/dhe"): img = cv2.imread(imagePath) print(imagePath) # img = ...
0
0
0
0
0
0
0
-15
88
b890eccccec97cdbe81bf8ea49e98c0fece73fc2
56,344
py
Python
src/ecpy/curves.py
Moustikitos/ECPy
ecd42872ddb5a8422b8bda54b88114fc7f78d6bf
[ "Apache-2.0" ]
1
2019-08-12T21:25:01.000Z
2019-08-12T21:25:01.000Z
src/ecpy/curves.py
Moustikitos/ECPy
ecd42872ddb5a8422b8bda54b88114fc7f78d6bf
[ "Apache-2.0" ]
null
null
null
src/ecpy/curves.py
Moustikitos/ECPy
ecd42872ddb5a8422b8bda54b88114fc7f78d6bf
[ "Apache-2.0" ]
null
null
null
# encoding: UTF-8 # Copyright 2016-2017 Cedric Mesnil <cedric.mesnil@ubinity.com>, Ubinity SAS # # 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-...
36.682292
158
0.57708
# encoding: UTF-8 # Copyright 2016-2017 Cedric Mesnil <cedric.mesnil@ubinity.com>, Ubinity SAS # # 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-...
36
3,972
0
20,234
0
0
0
-4
170
9de660f7ddbef64ada7dffc64558b25a94560929
1,027
py
Python
recipes/Python/576888_format_a_number_as_an_ordinal/recipe-576888.py
tdiprima/code
61a74f5f93da087d27c70b2efe779ac6bd2a3b4f
[ "MIT" ]
2,023
2017-07-29T09:34:46.000Z
2022-03-24T08:00:45.000Z
recipes/Python/576888_format_a_number_as_an_ordinal/recipe-576888.py
unhacker/code
73b09edc1b9850c557a79296655f140ce5e853db
[ "MIT" ]
32
2017-09-02T17:20:08.000Z
2022-02-11T17:49:37.000Z
recipes/Python/576888_format_a_number_as_an_ordinal/recipe-576888.py
unhacker/code
73b09edc1b9850c557a79296655f140ce5e853db
[ "MIT" ]
780
2017-07-28T19:23:28.000Z
2022-03-25T20:39:41.000Z
#!/usr/bin/env python def ordinal(value): """ Converts zero or a *postive* integer (or their string representations) to an ordinal value. >>> for i in range(1,13): ... ordinal(i) ... u'1st' u'2nd' u'3rd' u'4th' u'5th' u'6th' u'7th' u'8th' u'9th' ...
18.672727
58
0.450828
#!/usr/bin/env python def ordinal(value): """ Converts zero or a *postive* integer (or their string representations) to an ordinal value. >>> for i in range(1,13): ... ordinal(i) ... u'1st' u'2nd' u'3rd' u'4th' u'5th' u'6th' u'7th' u'8th' u'9th' ...
0
0
0
0
0
0
0
0
0
0773f702318f5f9b65c149ba69217853e9c5e3f7
7,123
py
Python
projects/baby_driver/scripts/can_util.py
Fionon/firmware_xiv
550835d1d903e849e9c42d865bd668c073a327a7
[ "MIT" ]
null
null
null
projects/baby_driver/scripts/can_util.py
Fionon/firmware_xiv
550835d1d903e849e9c42d865bd668c073a327a7
[ "MIT" ]
null
null
null
projects/baby_driver/scripts/can_util.py
Fionon/firmware_xiv
550835d1d903e849e9c42d865bd668c073a327a7
[ "MIT" ]
1
2020-10-23T16:25:24.000Z
2020-10-23T16:25:24.000Z
"""This module implements a low-level wrapper over Python-CAN's CAN API specific to Babydriver.""" import time import can from message_defs import BABYDRIVER_DEVICE_ID, BABYDRIVER_CAN_MESSAGE_ID # The default CAN channel to use for this module. Changed dynamically by cli_setup. default_channel = "can0" # pylint: di...
32.976852
100
0.636951
"""This module implements a low-level wrapper over Python-CAN's CAN API specific to Babydriver.""" import time import can from message_defs import BABYDRIVER_DEVICE_ID, BABYDRIVER_CAN_MESSAGE_ID # The default CAN channel to use for this module. Changed dynamically by cli_setup. default_channel = "can0" # pylint: di...
0
541
0
1,120
0
0
0
0
23
4e10b841514ed3aad3dd8fd092918b5e69b327ce
3,418
py
Python
get_stats.py
laurenwatson/lematus
01d28213b74daeee5e7e58f57580f036febb5283
[ "BSD-3-Clause" ]
null
null
null
get_stats.py
laurenwatson/lematus
01d28213b74daeee5e7e58f57580f036febb5283
[ "BSD-3-Clause" ]
null
null
null
get_stats.py
laurenwatson/lematus
01d28213b74daeee5e7e58f57580f036febb5283
[ "BSD-3-Clause" ]
null
null
null
#Author: Toms Bergmanis toms.bergmanis@gmail.com #Usage example python3 get_stats.py 20-char-context-v1 test Latvian import sys from collections import defaultdict model_name = sys.argv[1] data_set = sys.argv[2] # either dev or test for lang in sys.argv[3:]: model=lang + "-" + model_name train_inflections =...
41.180723
115
0.550614
#Author: Toms Bergmanis toms.bergmanis@gmail.com #Usage example python3 get_stats.py 20-char-context-v1 test Latvian import sys from collections import defaultdict model_name = sys.argv[1] data_set = sys.argv[2] # either dev or test for lang in sys.argv[3:]: model=lang + "-" + model_name train_inflections =...
0
0
0
0
0
0
0
0
0
0a0fafc461cc30b4f0af14cc9a054dd448047800
828
py
Python
themissc/Fields/RebuildDataIndex.py
mattkjames7/themissc
1e7257d60da1069fffc7fed848ddcf5c780e9250
[ "MIT" ]
null
null
null
themissc/Fields/RebuildDataIndex.py
mattkjames7/themissc
1e7257d60da1069fffc7fed848ddcf5c780e9250
[ "MIT" ]
null
null
null
themissc/Fields/RebuildDataIndex.py
mattkjames7/themissc
1e7257d60da1069fffc7fed848ddcf5c780e9250
[ "MIT" ]
null
null
null
from ..Tools.Downloading._RebuildDataIndex import _RebuildDataIndex from . import _Fields def RebuildDataIndex(sc,Prod,L): ''' Rebuilds the data index for a data product. Inputs ====== sc : str 'a'|'b'|'c'|'d'|'e' Prod: str Product string (see below) L : str or int Level of data to download (0,1,2) ...
18.818182
73
0.623188
import numpy as np from ..Tools.Downloading._RebuildDataIndex import _RebuildDataIndex from . import _Fields def RebuildDataIndex(sc,Prod,L): ''' Rebuilds the data index for a data product. Inputs ====== sc : str 'a'|'b'|'c'|'d'|'e' Prod: str Product string (see below) L : str or int Level of data to do...
0
0
0
0
0
0
0
-3
22
5208ca6ce2470db8647e0343bdd1dd992f218821
3,786
py
Python
backend/tracim_backend/views/core_api/session_controller.py
lezardrouge/tracim
713ff6066767554333e7e0b1de608ec1a7e4229c
[ "MIT" ]
null
null
null
backend/tracim_backend/views/core_api/session_controller.py
lezardrouge/tracim
713ff6066767554333e7e0b1de608ec1a7e4229c
[ "MIT" ]
null
null
null
backend/tracim_backend/views/core_api/session_controller.py
lezardrouge/tracim
713ff6066767554333e7e0b1de608ec1a7e4229c
[ "MIT" ]
null
null
null
# coding=utf-8 try: # Python 3.5+ from http import HTTPStatus except ImportError:
46.170732
161
0.736661
# coding=utf-8 from pyramid.config import Configurator from pyramid.security import remember from pyramid_ldap3 import get_ldap_connector from tracim_backend.config import CFG from tracim_backend.extensions import hapic from tracim_backend.lib.core.user import UserApi from tracim_backend.lib.utils.request import Traci...
0
2,084
0
773
0
0
0
482
358
d3de5c221b0ad5e84723def80589d4bdd789ec98
58,383
py
Python
neutron/tests/unit/vmware/test_nsx_plugin.py
CingHu/neutron-ustack
a1da17d0d63b3342a48c35da37984d6386ee1016
[ "Apache-2.0" ]
null
null
null
neutron/tests/unit/vmware/test_nsx_plugin.py
CingHu/neutron-ustack
a1da17d0d63b3342a48c35da37984d6386ee1016
[ "Apache-2.0" ]
null
null
null
neutron/tests/unit/vmware/test_nsx_plugin.py
CingHu/neutron-ustack
a1da17d0d63b3342a48c35da37984d6386ee1016
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2012 OpenStack Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
46.631789
79
0.579758
# Copyright (c) 2012 OpenStack Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
0
0
0
55,427
0
0
0
735
1,050
5149486e53e7a57b14d519cf9c5fd661e5ccbd3f
9,915
py
Python
XICRA_pip/XICRA/modules/database.py
HCGB-IGTP/XICRA
0004c3b3f22f51d6d68499b8a69fb1253304d71b
[ "MIT" ]
3
2021-05-16T21:13:22.000Z
2022-01-23T08:47:48.000Z
XICRA_pip/XICRA/modules/database.py
HCGB-IGTP/XICRA
0004c3b3f22f51d6d68499b8a69fb1253304d71b
[ "MIT" ]
16
2021-03-11T10:51:25.000Z
2022-03-12T01:02:00.000Z
XICRA_pip/XICRA/modules/database.py
HCGB-IGTP/XICRA
0004c3b3f22f51d6d68499b8a69fb1253304d71b
[ "MIT" ]
3
2021-03-05T10:07:38.000Z
2022-01-23T08:48:06.000Z
#!/usr/bin/env python3 ############################################################ ## Jose F. Sanchez, Marta Lopez & Lauro Sumoy ## ## Copyright (C) 2019-2021 Lauro Sumoy Lab, IGTP, Spain ## ############################################################ """ This module downloads data for genome annotation,...
38.430233
173
0.60706
#!/usr/bin/env python3 ############################################################ ## Jose F. Sanchez, Marta Lopez & Lauro Sumoy ## ## Copyright (C) 2019-2021 Lauro Sumoy Lab, IGTP, Spain ## ############################################################ from HCGB.functions import aesthetics_functions """ T...
0
0
0
0
0
8,795
0
58
445
8efa097a9175d4ae033058770c6b55bc07b8cee4
15,788
py
Python
backend/lost/logic/file_man.py
rZeroSys/lost
dda505dd5918f5fb1091f8e34e589c369f9f21d8
[ "MIT" ]
490
2019-01-16T12:57:22.000Z
2022-03-26T14:13:26.000Z
backend/lost/logic/file_man.py
rZeroSys/lost
dda505dd5918f5fb1091f8e34e589c369f9f21d8
[ "MIT" ]
147
2019-01-23T13:22:42.000Z
2022-03-30T11:14:08.000Z
backend/lost/logic/file_man.py
rZeroSys/lost
dda505dd5918f5fb1091f8e34e589c369f9f21d8
[ "MIT" ]
91
2019-03-11T10:37:50.000Z
2022-03-28T16:41:32.000Z
__author__ = 'Jonas Jaeger' import os import zipfile #import ptvsd DATA_ROOT_PATH = "" MEDIA_ROOT_PATH = DATA_ROOT_PATH + "media/" # MEDIA_UPLOAD_PATH = MEDIA_ROOT_PATH + "uploads/" # MEDIA_CHUNK_PATH = MEDIA_ROOT_PATH + ".chunks/" # SCRIPT_ROOT_PATH = DATA_ROOT_PATH + "script/" PIPE_ROOT_PATH = DATA_ROOT_PATH + "pip...
33.591489
144
0.591462
__author__ = 'Jonas Jaeger' from os.path import join import os from datetime import datetime import json import shutil import zipfile import lost import fsspec import numpy as np import cv2 import ast from lost.logic.crypt import decrypt_fs_connection #import ptvsd DATA_ROOT_PATH = "" MEDIA_ROOT_PATH = DATA_ROOT_PAT...
0
519
0
12,312
0
857
0
-21
311
0448cead8e8bfc7b31cc2d9034ba5a5cc5abc23e
5,200
py
Python
kafka_streamer/streamer.py
sam-mosleh/kafka-streamer
be977af192b33a335b42af0a42ad05d9f3f9fef4
[ "BSD-3-Clause" ]
1
2020-06-26T00:10:05.000Z
2020-06-26T00:10:05.000Z
kafka_streamer/streamer.py
sam-mosleh/kafka-streamer
be977af192b33a335b42af0a42ad05d9f3f9fef4
[ "BSD-3-Clause" ]
null
null
null
kafka_streamer/streamer.py
sam-mosleh/kafka-streamer
be977af192b33a335b42af0a42ad05d9f3f9fef4
[ "BSD-3-Clause" ]
null
null
null
from __future__ import annotations
35.37415
92
0.625385
from __future__ import annotations import asyncio import logging from typing import List, Optional, Union import confluent_kafka from confluent_avro import SchemaRegistry from kafka_streamer.client import AsyncKafkaConsumer, AsyncKafkaProducer from kafka_streamer.models import SchematicRecord, Serializable from kafk...
0
0
2,530
2,278
0
0
0
154
202
7bc9cd2afbb9b39bafa6f59e9efc38055cfd737e
2,295
py
Python
portal_towarzyski/portal/uzytkownicy/migrations/0001_initial.py
su-17/PSI1
36a8099dd5b535767749c8bf63c6891d64dda5bd
[ "MIT" ]
null
null
null
portal_towarzyski/portal/uzytkownicy/migrations/0001_initial.py
su-17/PSI1
36a8099dd5b535767749c8bf63c6891d64dda5bd
[ "MIT" ]
null
null
null
portal_towarzyski/portal/uzytkownicy/migrations/0001_initial.py
su-17/PSI1
36a8099dd5b535767749c8bf63c6891d64dda5bd
[ "MIT" ]
null
null
null
# Generated by Django 2.0.13 on 2020-01-29 20:09
40.263158
165
0.598257
# Generated by Django 2.0.13 on 2020-01-29 20:09 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Dane_uzytkownika', fields...
0
0
0
2,147
0
0
0
30
68
e50ed170732ab101e6e320cb43f35a4b6efa49f0
1,226
py
Python
release.py
mpetrosian/skillmodels
d9178aa1aaf15fb1354d0ac863ac9f1733bc5f7a
[ "BSD-2-Clause" ]
null
null
null
release.py
mpetrosian/skillmodels
d9178aa1aaf15fb1354d0ac863ac9f1733bc5f7a
[ "BSD-2-Clause" ]
null
null
null
release.py
mpetrosian/skillmodels
d9178aa1aaf15fb1354d0ac863ac9f1733bc5f7a
[ "BSD-2-Clause" ]
null
null
null
"""Build, test, convert and upload a conda package. For the upload step to work you have to log into your anaconda.org account before you run the script. The steps for this are explained here: https://conda.io/docs/user-guide/tutorials/build-pkgs.html """ from conda_build.api import build, convert from os.path impor...
31.435897
75
0.673736
"""Build, test, convert and upload a conda package. For the upload step to work you have to log into your anaconda.org account before you run the script. The steps for this are explained here: https://conda.io/docs/user-guide/tutorials/build-pkgs.html """ from conda_build.api import build, convert from os.path impor...
0
0
0
0
0
0
0
0
0
f94a3e026e49e10dcd0259d901524710b25c6ad4
1,275
py
Python
setup.py
zekna/py-types
ec39da1277986f0ea44830dfb0da9d906deb13e1
[ "MIT" ]
5
2015-06-18T20:04:56.000Z
2016-03-15T15:32:44.000Z
setup.py
sarlianna/py-types
ec39da1277986f0ea44830dfb0da9d906deb13e1
[ "MIT" ]
1
2016-01-19T01:39:54.000Z
2016-01-27T19:17:31.000Z
setup.py
zekna/py-types
ec39da1277986f0ea44830dfb0da9d906deb13e1
[ "MIT" ]
null
null
null
from setuptools import (setup, find_packages) from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, "README.md")) as rdme: with open(path.join(here, "CHANGELOG.md")) as chlog: readme = rdme.read() changes = chlog.read() long_description = readme + "\nCHA...
27.717391
101
0.610196
from setuptools import ( setup, find_packages, ) from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, "README.md")) as rdme: with open(path.join(here, "CHANGELOG.md")) as chlog: readme = rdme.read() changes = chlog.read() long_description = read...
0
0
0
0
0
0
0
11
0
4588a43c90e43017a0202e548e6f473c06545c19
3,611
py
Python
nusex/cli/commands/deploy.py
Jonxslays/nusex
8ec8a628f3ba253b218d966be41e231ed449c264
[ "BSD-3-Clause" ]
3
2021-07-30T20:47:35.000Z
2021-07-31T20:18:30.000Z
nusex/cli/commands/deploy.py
Jonxslays/nusex
8ec8a628f3ba253b218d966be41e231ed449c264
[ "BSD-3-Clause" ]
20
2021-10-04T21:28:45.000Z
2021-12-13T17:12:10.000Z
nusex/cli/commands/deploy.py
Jonxslays/nusex
8ec8a628f3ba253b218d966be41e231ed449c264
[ "BSD-3-Clause" ]
2
2021-10-08T02:22:30.000Z
2021-11-05T00:41:35.000Z
# Copyright (c) 2021, Ethan Henderson # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list of conditions and...
34.721154
80
0.681529
# Copyright (c) 2021, Ethan Henderson # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list of conditions and...
0
0
0
0
0
1,810
0
41
158
676b61242124f2df9a4564a21a24f9029cb906f4
2,354
py
Python
openbases/main/papers/__init__.py
openbases/whedon-python
6535cef2dd2cefca271ffb679b1ffb959ce5356d
[ "BSD-3-Clause" ]
1
2020-02-12T23:29:54.000Z
2020-02-12T23:29:54.000Z
openbases/main/papers/__init__.py
openbases/openbases-python
6535cef2dd2cefca271ffb679b1ffb959ce5356d
[ "BSD-3-Clause" ]
10
2018-09-08T14:49:38.000Z
2018-09-28T00:51:30.000Z
openbases/main/papers/__init__.py
openbases/whedon-python
6535cef2dd2cefca271ffb679b1ffb959ce5356d
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2018-2020, Vanessa Sochat All rights reserved. # See the LICENSE in the main repository at: # https://www.github.com/openbases/openbases-python
28.02381
78
0.553526
# Copyright (c) 2018-2020, Vanessa Sochat All rights reserved. # See the LICENSE in the main repository at: # https://www.github.com/openbases/openbases-python from openbases.logger import bot from openbases.utils import read_frontmatter import os import re import sys class Journal: joss = 'joss' rse = '...
0
0
0
2,009
0
0
0
-1
182
caf537d731d117c23c1e287120f1e06ce4ca58b2
491
py
Python
practice_problems/stacks_queues/stack_min.py
YazzyYaz/codinginterviews
b8115c43507d738bccd90366f2bc02867ba7f13f
[ "MIT" ]
null
null
null
practice_problems/stacks_queues/stack_min.py
YazzyYaz/codinginterviews
b8115c43507d738bccd90366f2bc02867ba7f13f
[ "MIT" ]
null
null
null
practice_problems/stacks_queues/stack_min.py
YazzyYaz/codinginterviews
b8115c43507d738bccd90366f2bc02867ba7f13f
[ "MIT" ]
null
null
null
stack = Stack() stack.push(4) stack.push(6) stack.push(2) print(stack.get_min_value()) stack.push(1) print(stack.get_min_value())
20.458333
55
0.615071
class Stack(object): def __init__(self): self.items = [] self.min_value = None def push(self, item): if not self.min_value or self.min_value > item: self.min_value = item self.items.append(item) def pop(self): self.items.pop() def get_min_val...
0
0
0
338
0
0
0
0
22
3bf61429a52dc3ce1a25f29feb3eb2efc9518b0b
4,613
py
Python
test_lui_gui.py
mjnickerson/csci-e-29-finalproject
029e5a9503dbbcd25a27988d4bc7b52890dd39af
[ "MIT" ]
null
null
null
test_lui_gui.py
mjnickerson/csci-e-29-finalproject
029e5a9503dbbcd25a27988d4bc7b52890dd39af
[ "MIT" ]
4
2021-06-08T20:48:59.000Z
2022-03-12T00:15:14.000Z
test_lui_gui.py
mjnickerson/csci-e-29-finalproject
029e5a9503dbbcd25a27988d4bc7b52890dd39af
[ "MIT" ]
1
2021-11-13T00:11:50.000Z
2021-11-13T00:11:50.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for `lui_gui` package."""
32.716312
100
0.628875
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for `lui_gui` package.""" import os import random import pathlib from unittest import TestCase import mock from luigi.mock import MockTarget from luigi import LocalTarget from luigi.contrib.opener import OpenerTarget, NoOpenerError class LuigiTestExternalTasks(...
0
1,214
0
3,039
0
0
0
30
246
fec996dc37cf46cc1ebf7997dc09e856d9c9b342
5,061
py
Python
ethereum/tools/stateless_client.py
NIC619/pyethereum
12aa0306512225b1460030735963614329ad395c
[ "MIT" ]
1
2021-06-16T02:33:15.000Z
2021-06-16T02:33:15.000Z
ethereum/tools/stateless_client.py
NIC619/pyethereum
12aa0306512225b1460030735963614329ad395c
[ "MIT" ]
null
null
null
ethereum/tools/stateless_client.py
NIC619/pyethereum
12aa0306512225b1460030735963614329ad395c
[ "MIT" ]
1
2017-11-10T15:53:06.000Z
2017-11-10T15:53:06.000Z
import rlp from ethereum.utils import sha3 from ethereum import trie def get_merkle_proof(db, root, value): """Get the merkle proof of a given value in trie value must exist in trie or exception will be thrown returns a list of nodes starting from root to leaf node """ assert db and root an...
36.941606
97
0.670816
import rlp from ethereum.utils import sha3, encode_hex from ethereum import trie def get_merkle_proof(db, root, value): """Get the merkle proof of a given value in trie value must exist in trie or exception will be thrown returns a list of nodes starting from root to leaf node """ assert db...
0
0
0
0
0
2,671
0
12
69
ee48e972b1ca4e53d2711c10cd8f137abf5b0c1a
67
py
Python
cv.py
helloparth/Facial-Recognition-App
a7ad760ce61208e80b30274e7276e17820de9353
[ "Apache-2.0" ]
null
null
null
cv.py
helloparth/Facial-Recognition-App
a7ad760ce61208e80b30274e7276e17820de9353
[ "Apache-2.0" ]
null
null
null
cv.py
helloparth/Facial-Recognition-App
a7ad760ce61208e80b30274e7276e17820de9353
[ "Apache-2.0" ]
null
null
null
/usr/local/Cellar/opencv/2.4.12_2/lib/python2.7/site-packages/cv.py
67
67
0.791045
/usr/local/Cellar/opencv/2.4.12_2/lib/python2.7/site-packages/cv.py
0
0
0
0
0
0
0
0
0
2ce9078eb6c12c7e17ad31045e53c4cda0de7636
524
py
Python
utils.py
gleybersonandrade/kytos-challenge
a59c9bc3c04dca44f0da434702b8b302e61b85aa
[ "MIT" ]
null
null
null
utils.py
gleybersonandrade/kytos-challenge
a59c9bc3c04dca44f0da434702b8b302e61b85aa
[ "MIT" ]
null
null
null
utils.py
gleybersonandrade/kytos-challenge
a59c9bc3c04dca44f0da434702b8b302e61b85aa
[ "MIT" ]
null
null
null
"""Helper kytos-challenge functions.""" # System imports # Local imports def unpack_header(bytes): """Unpack packet header content.""" header = unpack('>BBHI', bytes) return header[0], header[1], header[2], header[3] def unpack_packet(packet_name): """Unpack packet content.""" f = open(packet_na...
24.952381
57
0.671756
"""Helper kytos-challenge functions.""" # System imports from struct import * # Local imports from packet import * def unpack_header(bytes): """Unpack packet header content.""" header = unpack('>BBHI', bytes) return header[0], header[1], header[2], header[3] def unpack_packet(packet_name): """Unpack...
0
0
0
0
0
0
0
-2
44
26f5602c3865b853e0a6d7b16b5769a8a3f8f903
809
py
Python
apps/apiserver/migrations/versions/4727c742f8e5_.py
xmetadata/cd-heatmap
1f91ac30ea693a65d8ec1d446a1340dc99758b44
[ "MIT" ]
null
null
null
apps/apiserver/migrations/versions/4727c742f8e5_.py
xmetadata/cd-heatmap
1f91ac30ea693a65d8ec1d446a1340dc99758b44
[ "MIT" ]
null
null
null
apps/apiserver/migrations/versions/4727c742f8e5_.py
xmetadata/cd-heatmap
1f91ac30ea693a65d8ec1d446a1340dc99758b44
[ "MIT" ]
null
null
null
"""empty message Revision ID: 4727c742f8e5 Revises: 2923a924be67 Create Date: 2019-12-02 21:24:09.809578 """ # revision identifiers, used by Alembic. revision = '4727c742f8e5' down_revision = '2923a924be67' branch_labels = None depends_on = None
26.096774
78
0.697157
"""empty message Revision ID: 4727c742f8e5 Revises: 2923a924be67 Create Date: 2019-12-02 21:24:09.809578 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql # revision identifiers, used by Alembic. revision = '4727c742f8e5' down_revision = '2923a924be67' branch_labels = None depe...
0
0
0
0
0
427
0
19
112
3d1e758ebcf70caab6e4d83cfdb60542a1a95f4f
3,468
py
Python
scripts/mdp_book_builder.py
mehazardtfgm/sbedecoder
375e2d1f9557778170bdf3c3f0c36e721f013f52
[ "MIT" ]
null
null
null
scripts/mdp_book_builder.py
mehazardtfgm/sbedecoder
375e2d1f9557778170bdf3c3f0c36e721f013f52
[ "MIT" ]
null
null
null
scripts/mdp_book_builder.py
mehazardtfgm/sbedecoder
375e2d1f9557778170bdf3c3f0c36e721f013f52
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ Build and display orderbooks from a given pcap file """ import sys if __name__ == '__main__': status = main() sys.exit(status)
32.111111
112
0.662053
#!/usr/bin/env python """ Build and display orderbooks from a given pcap file """ import sys import os.path import gzip import dpkt import binascii from mdp.secdef import SecDef from mdp.orderbook import PacketProcessor from mdp.orderbook import ConsolePrinter from sbedecoder import MDPSchema from sbedecoder impor...
0
0
0
0
0
2,953
0
55
292
7d46a0daf5b87ba0ab76852cb04525769bdbc84a
362
py
Python
Ch7 - Dirty Hands 1/Code/7.3_requestraise_for_status.py
1110sillabo/ProgrammingDigitalHumanitiesBook
9ce1bef19e28fc3c1775e1135d9d177820e69f08
[ "MIT" ]
2
2020-12-25T19:31:37.000Z
2021-02-25T15:57:13.000Z
Ch7 - Dirty Hands 1/Code/7.3_requestraise_for_status.py
1110sillabo/ProgrammingDigitalHumanitiesBook
9ce1bef19e28fc3c1775e1135d9d177820e69f08
[ "MIT" ]
null
null
null
Ch7 - Dirty Hands 1/Code/7.3_requestraise_for_status.py
1110sillabo/ProgrammingDigitalHumanitiesBook
9ce1bef19e28fc3c1775e1135d9d177820e69f08
[ "MIT" ]
1
2020-07-09T15:48:56.000Z
2020-07-09T15:48:56.000Z
# Overcommented for explanatory reasons # Load the library that handles connecting to the internet import requests # Ask the user for the search term query = input('What do you want to search?') # Performing the search searchres = requests.get('https://www.google.com/search?q='+ query) # Make sure the request works...
30.166667
67
0.762431
# Overcommented for explanatory reasons # Load the library that handles connecting to the internet import requests # Ask the user for the search term query = input('What do you want to search?') # Performing the search searchres = requests.get('https://www.google.com/search?q='+ query) # Make sure the request works...
0
0
0
0
0
0
0
0
0
fad87040f78cfbeb613c801d94e6b9475c0135fb
146
py
Python
sachima/example/handler/s_scatter3d.py
DessertsLab/Sachima
5ddf2c8afd493b593e36703dbb09b000b08eeede
[ "MIT" ]
4
2019-01-25T01:44:36.000Z
2020-06-28T00:44:43.000Z
sachima/example/handler/s_scatter3d.py
DessertsLab/Sachima
5ddf2c8afd493b593e36703dbb09b000b08eeede
[ "MIT" ]
154
2019-01-28T03:35:34.000Z
2022-03-24T03:04:25.000Z
sachima/example/handler/s_scatter3d.py
DessertsLab/Sachima
5ddf2c8afd493b593e36703dbb09b000b08eeede
[ "MIT" ]
1
2019-02-18T06:10:55.000Z
2019-02-18T06:10:55.000Z
""" s_scatter3d """
12.166667
25
0.554795
""" s_scatter3d """ def run(data_in, params): df = data_in[0] header = df.iloc[0] df = df[1:] df.columns = header return df
0
0
0
0
0
102
0
0
23
fc5eaf5d6c2035cf1f55d111e6d2daaa241843c1
329
py
Python
src/config_default.py
mflaxman/specter-diy
3f0c21c0ec534f8178c572baebbb901f9be1652b
[ "MIT" ]
279
2019-08-31T02:26:24.000Z
2022-03-30T06:34:33.000Z
src/config_default.py
moneymanolis/specter-diy
324f3ed7f27ea1d3385077039861cdeaf21c427a
[ "MIT" ]
125
2019-09-17T10:48:57.000Z
2022-03-11T11:06:51.000Z
src/config_default.py
moneymanolis/specter-diy
324f3ed7f27ea1d3385077039861cdeaf21c427a
[ "MIT" ]
58
2019-09-03T17:11:13.000Z
2022-03-31T03:17:40.000Z
import sys import os simulator = sys.platform != "pyboard" # to overwrite these settings create a config.py file if simulator: storage_root = "./fs" try: os.mkdir(storage_root) except: pass else: storage_root = "" # pin that triggers QR code # if command mode failed QRSCANNER_TRIGGE...
15.666667
53
0.665653
import sys import os simulator = sys.platform != "pyboard" # to overwrite these settings create a config.py file if simulator: storage_root = "./fs" try: os.mkdir(storage_root) except: pass else: storage_root = "" # pin that triggers QR code # if command mode failed QRSCANNER_TRIGGE...
0
0
0
0
0
0
0
0
0
d8192a4daa587e7ed73a118afd1be53541979a6e
960
py
Python
src/axis/axis.py
hassnabdl/Helix-Analysis-Program
6383b132aefb4f0f51965d1812b59625ba35dab2
[ "MIT" ]
1
2021-05-12T20:28:08.000Z
2021-05-12T20:28:08.000Z
src/axis/axis.py
hassnabdl/Helix-Analysis-Program
6383b132aefb4f0f51965d1812b59625ba35dab2
[ "MIT" ]
1
2021-05-14T09:12:29.000Z
2021-05-20T14:14:49.000Z
src/axis/axis.py
hassnabdl/Helix-Analysis-Program
6383b132aefb4f0f51965d1812b59625ba35dab2
[ "MIT" ]
1
2021-05-20T14:38:31.000Z
2021-05-20T14:38:31.000Z
import numpy def principal_axis(alpha_carbons): """ Calculate principal inertia axis for the structure along with its geometrical center --- Parameters: alpha_carbons: alpha carbons of the structure --- Return: center: geometrical center of the structure axis_direction: directio...
24.615385
88
0.696875
import numpy def principal_axis(alpha_carbons): """ Calculate principal inertia axis for the structure along with its geometrical center --- Parameters: alpha_carbons: alpha carbons of the structure --- Return: center: geometrical center of the structure axis_direction: directio...
0
0
0
0
0
0
0
0
0
de586bb7ec0cb3f0ac23a3938db67633e9d549b0
1,100
py
Python
migrations/versions/e11c61ce67e7_.py
di/cabotage-app
a119800ce5a83547c0abf31540bd0bc90a0e6d10
[ "MIT" ]
15
2018-04-12T20:57:25.000Z
2022-02-25T01:51:58.000Z
migrations/versions/e11c61ce67e7_.py
di/cabotage-app
a119800ce5a83547c0abf31540bd0bc90a0e6d10
[ "MIT" ]
10
2018-01-30T19:55:06.000Z
2021-06-15T21:54:17.000Z
migrations/versions/e11c61ce67e7_.py
di/cabotage-app
a119800ce5a83547c0abf31540bd0bc90a0e6d10
[ "MIT" ]
6
2018-01-30T10:49:17.000Z
2022-02-25T01:51:59.000Z
"""empty message Revision ID: e11c61ce67e7 Revises: 5db306adc6cc Create Date: 2018-04-17 08:27:07.852716 """ # revision identifiers, used by Alembic. revision = 'e11c61ce67e7' down_revision = '5db306adc6cc' branch_labels = None depends_on = None
35.483871
205
0.741818
"""empty message Revision ID: e11c61ce67e7 Revises: 5db306adc6cc Create Date: 2018-04-17 08:27:07.852716 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = 'e11c61ce67e7' down_revision = '5db306adc6cc' branch_labels = None...
0
0
0
0
0
713
0
24
112
2d56f0b2f276b7c540c89d418e9535d38f24253a
345
py
Python
starchart/ml/stater.py
monochromegane/starchart
8f14f6c7284e9cce884bce95f39755e1c5a1c7c5
[ "MIT" ]
12
2017-01-12T03:31:48.000Z
2021-05-15T06:56:31.000Z
starchart/ml/stater.py
monochromegane/starchart
8f14f6c7284e9cce884bce95f39755e1c5a1c7c5
[ "MIT" ]
1
2019-12-24T05:26:35.000Z
2019-12-24T05:26:46.000Z
starchart/ml/stater.py
monochromegane/starchart
8f14f6c7284e9cce884bce95f39755e1c5a1c7c5
[ "MIT" ]
1
2017-01-18T12:10:06.000Z
2017-01-18T12:10:06.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*-
26.538462
70
0.611594
#!/usr/bin/env python # -*- coding: utf-8 -*- from starchart.ml import contexts, jobs def state(args): context = contexts.Context(args) jobs_, _ = jobs.list(context, fields='jobs(jobId,state)') for job in jobs_: if context.model_name in job['jobId']: print('jobId: {} ({})'.format(job[...
0
0
0
0
0
235
0
18
46
5a108810ac108d82e0171700b780df3d69b789d4
4,099
py
Python
IDSSignature.py
PhilSchroeder/IDSDeathBlossom
bc132c4478733834fd95969257aef523bcb47f44
[ "BSD-3-Clause" ]
19
2015-04-13T23:04:40.000Z
2019-04-21T18:35:11.000Z
IDSSignature.py
PhilSchroeder/IDSDeathBlossom
bc132c4478733834fd95969257aef523bcb47f44
[ "BSD-3-Clause" ]
6
2016-08-25T16:16:18.000Z
2020-07-13T21:45:02.000Z
IDSSignature.py
PhilSchroeder/IDSDeathBlossom
bc132c4478733834fd95969257aef523bcb47f44
[ "BSD-3-Clause" ]
14
2015-04-14T23:00:02.000Z
2020-10-12T18:56:20.000Z
# -*- coding: utf-8 -*- #************************************************************* # Copyright (c) 2003-2012, Emerging Threats # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the # following conditions are met: # # * ...
37.953704
126
0.560625
# -*- coding: utf-8 -*- #************************************************************* # Copyright (c) 2003-2012, Emerging Threats # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the # following conditions are met: # # * ...
0
0
0
2,330
0
0
0
4
68
dafc22e5b69a52b28bd30e20201a37ab077df9b5
2,090
py
Python
mise/__main__.py
appleparan/mise.py
a77ea51be37a739928600c66d168d69b78bc0c4b
[ "MIT" ]
1
2021-09-12T15:25:54.000Z
2021-09-12T15:25:54.000Z
mise/__main__.py
appleparan/mise.py
a77ea51be37a739928600c66d168d69b78bc0c4b
[ "MIT" ]
4
2021-07-14T09:59:56.000Z
2022-03-12T01:03:40.000Z
mise/__main__.py
appleparan/mise.py
a77ea51be37a739928600c66d168d69b78bc0c4b
[ "MIT" ]
1
2021-09-12T15:25:56.000Z
2021-09-12T15:25:56.000Z
"""Main interface to other modules """ import argparse # multivariate # machine learning models # univariate # statistical models def compute_stats(_args): """ stats(_args) Run statistical models """ sims = _args["stats"] if len(sims) == 0: # specify all simulation name ...
24.880952
82
0.701914
"""Main interface to other modules """ import argparse # multivariate from mise.dl.dt_xgboost import dl_xgboost from mise.dl.mlp_mul_ms import dl_mlp_mul_ms from mise.dl.mlp_mul_ms_mccr import dl_mlp_mul_ms_mccr from mise.dl.mlp_mul_transformer import dl_mlp_mul_transformer from mise.dl.mlp_mul_transformer_mccr import...
0
0
0
0
0
0
0
510
352
da93d5f1012113a4a2fab095541ea6b2f896b402
1,335
py
Python
cmc_api/test_cases/TC_api_connected_device_number_distribution.py
9nehS/mop_cmc_test
2d6cabaf7e6fe3a6825961d5b8ddd69d7467542e
[ "Apache-2.0" ]
null
null
null
cmc_api/test_cases/TC_api_connected_device_number_distribution.py
9nehS/mop_cmc_test
2d6cabaf7e6fe3a6825961d5b8ddd69d7467542e
[ "Apache-2.0" ]
null
null
null
cmc_api/test_cases/TC_api_connected_device_number_distribution.py
9nehS/mop_cmc_test
2d6cabaf7e6fe3a6825961d5b8ddd69d7467542e
[ "Apache-2.0" ]
null
null
null
import unittest if __name__ == '__main__': unittest.main()
27.244898
95
0.59176
import requests import unittest from cmc_api.common.api import Api class MopCmcApiTest(unittest.TestCase): def setUp(self): self._api_host = 'vmlnx-k8s04.calix.local' self._api_port = '8080' self.org_id = '160090' self.pattern_connected_devices = '^0$|^[1-9]\d*$' @property ...
0
152
0
1,044
0
0
0
7
67
ade08ac892c6a8366380aae44714d7866547fe8f
6,377
py
Python
benchmark/kernel/train_eval.py
pwycl/pytorch_geometric
ef7b1add2bb5a36a3a68cae7639c42000f629cac
[ "MIT" ]
null
null
null
benchmark/kernel/train_eval.py
pwycl/pytorch_geometric
ef7b1add2bb5a36a3a68cae7639c42000f629cac
[ "MIT" ]
null
null
null
benchmark/kernel/train_eval.py
pwycl/pytorch_geometric
ef7b1add2bb5a36a3a68cae7639c42000f629cac
[ "MIT" ]
null
null
null
import sys import random import os.path as osp import time import tqdm import torch import torch.nn.functional as F from torch import tensor from torch.optim import Adam from sklearn.model_selection import StratifiedKFold from torch_geometric.data import DataLoader, DenseDataLoader as DenseLoader device = torch.devic...
33.213542
116
0.588678
import sys import random import os.path as osp import time import tqdm import torch import torch.nn.functional as F from torch import tensor from torch.optim import Adam from sklearn.model_selection import StratifiedKFold from torch_geometric.data import DataLoader, DenseDataLoader as DenseLoader device = torch.devic...
4
0
0
0
0
2,873
0
0
23
a69a96120ce16c53cb9dbc59a0c56d581ce2c59e
1,006
py
Python
python/december_2.py
JonClayton/Advent-of-Code
f75b9a4eb64c5ef3a95a1bc9a3495a683245b37f
[ "Unlicense" ]
1
2021-12-01T17:27:59.000Z
2021-12-01T17:27:59.000Z
python/december_2.py
JonClayton/Advent-of-Code-2021
f75b9a4eb64c5ef3a95a1bc9a3495a683245b37f
[ "Unlicense" ]
null
null
null
python/december_2.py
JonClayton/Advent-of-Code-2021
f75b9a4eb64c5ef3a95a1bc9a3495a683245b37f
[ "Unlicense" ]
null
null
null
from python.classes import Solution solution = Solution('inputs/inputs_02.json', first_solution, second_solution)
25.15
77
0.616302
from python.classes import Solution def first_solution(a_list_of_actions): steps = convert_to_action_tuples(a_list_of_actions) down = 0 forward = 0 for pair in steps: down += pair[1] forward += pair[0] return forward * down def second_solution(a_list_of_actions): steps = conv...
0
0
0
0
0
818
0
0
69
1c2e2827127ca09db1965ad1e596f372ea8f2ad7
2,056
py
Python
tests/infra/test_utils.py
Keendata/impala
b25e250d321f329b98e017c648df75d052497963
[ "Apache-2.0" ]
1,523
2015-01-01T03:42:24.000Z
2022-02-06T22:24:04.000Z
tests/infra/test_utils.py
xwzbupt/impala
97dda2b27da99367f4d07699aa046b16cda16dd4
[ "Apache-2.0" ]
10
2015-01-09T06:46:05.000Z
2022-03-29T21:57:57.000Z
tests/infra/test_utils.py
xwzbupt/impala
97dda2b27da99367f4d07699aa046b16cda16dd4
[ "Apache-2.0" ]
647
2015-01-02T04:01:40.000Z
2022-03-30T15:57:35.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
41.959184
87
0.708658
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
0
0
0
0
0
354
0
34
46
d5a08b2e8b3fe198a5321173a6ec13320760df19
2,350
py
Python
testproject/pythonproject/TC008_post_delete.py
ksj-123/conduit
3427d76d0fa364cb5d19bdd6da4aeb0a22fe9660
[ "MIT" ]
1
2021-06-07T17:07:58.000Z
2021-06-07T17:07:58.000Z
testproject/pythonproject/TC008_post_delete.py
Arthii01052/conduit
3427d76d0fa364cb5d19bdd6da4aeb0a22fe9660
[ "MIT" ]
null
null
null
testproject/pythonproject/TC008_post_delete.py
Arthii01052/conduit
3427d76d0fa364cb5d19bdd6da4aeb0a22fe9660
[ "MIT" ]
1
2022-03-31T06:46:19.000Z
2022-03-31T06:46:19.000Z
# TC008 - My blog post delete from selenium import webdriver from webdriver_manager.chrome import ChromeDriverManager from selenium.webdriver.chrome.options import Options import time opt = Options() opt.headless = False driver = webdriver.Chrome(ChromeDriverManager().install(), options=opt) driver.set_window_size(10...
26.111111
76
0.664681
# TC008 - My blog post delete from selenium import webdriver from webdriver_manager.chrome import ChromeDriverManager from selenium.webdriver.chrome.options import Options import time opt = Options() opt.headless = False driver = webdriver.Chrome(ChromeDriverManager().install(), options=opt) driver.set_window_size(10...
0
0
0
0
0
519
0
0
74
4bf7b7e7a4ca32434a6bde33785dfe302a310295
234
py
Python
languages/python/topics/urls/P003_URLEncoding_UsingRequests.py
lakshmikanth-tesla/DeveloperNotes2Myself
9a5dad930ddbb99ace46d2d672109e8553aecbc2
[ "MIT" ]
2
2019-05-25T10:09:00.000Z
2022-03-11T09:06:23.000Z
languages/python/topics/urls/P003_URLEncoding_UsingRequests.py
lakshmikanth-tesla/DeveloperNotes2Myself
9a5dad930ddbb99ace46d2d672109e8553aecbc2
[ "MIT" ]
2
2020-03-31T04:30:17.000Z
2020-10-30T07:54:28.000Z
languages/python/topics/urls/P003_URLEncoding_UsingRequests.py
lakshmikanth-tesla/DeveloperNotes2Myself
9a5dad930ddbb99ace46d2d672109e8553aecbc2
[ "MIT" ]
4
2019-07-12T13:18:56.000Z
2021-11-17T08:04:55.000Z
from requests.utils import quote urlString1 = "NIFTY 25" urlString2 = 'NIFTY A\B\C\D' urlString3 = '22/01/2014' # Using urls library print quote(urlString1, safe='') print quote(urlString2, safe='') print quote(urlString3, safe='')
21.272727
32
0.726496
from requests.utils import quote urlString1 = "NIFTY 25" urlString2 = 'NIFTY A\B\C\D' urlString3 = '22/01/2014' # Using urls library print quote(urlString1, safe='') print quote(urlString2, safe='') print quote(urlString3, safe='')
0
0
0
0
0
0
0
0
0
de9a791d6b5460dd5ab1019043ee76937fcef551
5,313
py
Python
semilive.py
toji/semilive
f971c0ede7c3794ff9afaa48019821ef6e16236d
[ "MIT" ]
136
2017-05-19T21:15:08.000Z
2022-03-18T01:12:05.000Z
semilive.py
toji/semilive
f971c0ede7c3794ff9afaa48019821ef6e16236d
[ "MIT" ]
1
2017-08-02T08:19:22.000Z
2017-10-30T20:16:12.000Z
semilive.py
toji/semilive
f971c0ede7c3794ff9afaa48019821ef6e16236d
[ "MIT" ]
6
2017-05-20T13:15:05.000Z
2019-01-24T05:18:24.000Z
# Copyright (c) 2017, Brandon Jones. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, dis...
35.18543
83
0.659138
# Copyright (c) 2017, Brandon Jones. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, dis...
0
0
0
3,827
0
167
0
0
114
6b64d892b723dd59e3460a7b705ea17745488f3d
1,196
py
Python
scripts/train.py
Iuty/vue.fastcnn2.winservice
de4c8dcd19549ca9992346101c78b87077c86813
[ "Apache-2.0" ]
null
null
null
scripts/train.py
Iuty/vue.fastcnn2.winservice
de4c8dcd19549ca9992346101c78b87077c86813
[ "Apache-2.0" ]
null
null
null
scripts/train.py
Iuty/vue.fastcnn2.winservice
de4c8dcd19549ca9992346101c78b87077c86813
[ "Apache-2.0" ]
null
null
null
import tensorflow as tf cp_callback = tf.keras.callbacks.ModelCheckpoint(filepath=checkpoint_save_path, save_weights_only=False, save_best_only=False) tensorboard = tf.keras.callbacks.Tenso...
44.296296
92
0.534281
import tensorflow as tf def trainModel(tagpath,model,train_x,train_y,batch_size,maxperiod,val_x,val_y): log_dir = os.path.join(tagpath,'logs',datetime.datetime.now().strftime("%Y%m%d-%H%M%S")) checkpoint_save_path = os.path.join(tagpath,"checkpoint","save.ckpt" if os.path.exists(checkpoint_save_...
0
0
0
0
0
401
0
0
23
aa864e9fdf4e524bc23a0212ba00d694164c5a69
3,431
py
Python
psdaq/psdaq/configdb/opaltt_update_weights.py
ZhenghengLi/lcls2
94e75c6536954a58c8937595dcac295163aa1cdf
[ "BSD-3-Clause-LBNL" ]
null
null
null
psdaq/psdaq/configdb/opaltt_update_weights.py
ZhenghengLi/lcls2
94e75c6536954a58c8937595dcac295163aa1cdf
[ "BSD-3-Clause-LBNL" ]
null
null
null
psdaq/psdaq/configdb/opaltt_update_weights.py
ZhenghengLi/lcls2
94e75c6536954a58c8937595dcac295163aa1cdf
[ "BSD-3-Clause-LBNL" ]
null
null
null
import psdaq.configdb.configdb as cdb import numpy as np import argparse from psdaq.configdb.opaltt_config_store import opaltt_cdict # Copy values and shape from config dict into cdict if __name__ == "__main__": parser = argparse.ArgumentParser(description='Update weights and/or calib polynomial constants') ...
38.988636
173
0.641795
import psdaq.configdb.configdb as cdb import sys import IPython import numpy as np import argparse from psdaq.configdb.opaltt_config_store import opaltt_cdict # Copy values and shape from config dict into cdict def copyValues(din,dout,k=None): if k is not None and ':RO' in k: return if isinstance(din,...
0
0
0
0
0
519
0
-18
66
3f5a07b6f416b37a59a4faff67da29f587d3d24f
1,505
py
Python
archgenerator/utils.py
uriyyo/archgenerator
59c90b23a2318dadf60ab4c8bccbdc8a280f7deb
[ "MIT" ]
null
null
null
archgenerator/utils.py
uriyyo/archgenerator
59c90b23a2318dadf60ab4c8bccbdc8a280f7deb
[ "MIT" ]
null
null
null
archgenerator/utils.py
uriyyo/archgenerator
59c90b23a2318dadf60ab4c8bccbdc8a280f7deb
[ "MIT" ]
null
null
null
from typing import TypeVar T = TypeVar("T") __all__ = ["cached", "retry", "run_in_executor"]
24.274194
75
0.586047
from asyncio import sleep, get_event_loop from contextvars import copy_context from functools import wraps, partial from itertools import count from random import randint from typing import Tuple, Callable, TypeVar, Awaitable T = TypeVar("T") def retry(attempts: int = 10, delay_range: Tuple[int, int] = (1, 10)): ...
0
721
0
0
0
417
0
89
179
4fd777b13518588527b78cc41112703793d49912
1,154
py
Python
dodo.py
dreamhorn/dreamhorn
451fa9492cb3886e42a90ce375e2ef0da6d7f7ff
[ "BSD-3-Clause" ]
null
null
null
dodo.py
dreamhorn/dreamhorn
451fa9492cb3886e42a90ce375e2ef0da6d7f7ff
[ "BSD-3-Clause" ]
null
null
null
dodo.py
dreamhorn/dreamhorn
451fa9492cb3886e42a90ce375e2ef0da6d7f7ff
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from path import path PATH = path(__file__).dirname() BIN = PATH / 'node_modules' / '.bin' SRC = PATH / 'src' COFFEE_SOURCES = list(SRC.walkfiles('*.coffee')) JS_SOURCES = list(SRC.walkfiles('*.js')) SOURCES = COFFEE_SOURCES + JS_SOURCES COFFEE_TARGETS = [ (PATH / src.relpath(SRC)).repl...
21.773585
80
0.551993
# -*- coding: utf-8 -*- from path import path PATH = path(__file__).dirname() BIN = PATH / 'node_modules' / '.bin' SRC = PATH / 'src' COFFEE_SOURCES = list(SRC.walkfiles('*.coffee')) JS_SOURCES = list(SRC.walkfiles('*.js')) SOURCES = COFFEE_SOURCES + JS_SOURCES COFFEE_TARGETS = [ (PATH / src.relpath(SRC)).repl...
0
0
0
0
624
36
0
0
46
010d2f11aa2b8da4251d313ddefabd969377a641
3,749
py
Python
tfw/chat/ircbot.py
lildonpancho/tfw
190bcae58e1fa18603da85675c0fa5dae6a4f521
[ "Apache-2.0" ]
3
2019-05-30T01:46:00.000Z
2019-08-02T16:46:19.000Z
tfw/chat/ircbot.py
lildonpancho/tfw
190bcae58e1fa18603da85675c0fa5dae6a4f521
[ "Apache-2.0" ]
null
null
null
tfw/chat/ircbot.py
lildonpancho/tfw
190bcae58e1fa18603da85675c0fa5dae6a4f521
[ "Apache-2.0" ]
3
2019-04-19T21:33:06.000Z
2019-05-31T02:39:59.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This is a skeleton file that can serve as a starting point for a Python console script. To run this script uncomment the following lines in the [options.entry_points] section in setup.cfg: console_scripts = fibonacci = nlpia_bot.skeleton:run Then run `pyt...
26.971223
89
0.646572
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This is a skeleton file that can serve as a starting point for a Python console script. To run this script uncomment the following lines in the [options.entry_points] section in setup.cfg: console_scripts = fibonacci = nlpia_bot.skeleton:run Then run `pyt...
0
0
0
0
0
0
0
26
0
9c008f2abe6d865350c653dd1c4ad92d8154294b
3,370
py
Python
lib/starling_join_client.py
manner82/safeguard-sessions-plugin-starling-2fa
cd92f95c0b3b4e6f892275964b9e27154381e84c
[ "MIT" ]
null
null
null
lib/starling_join_client.py
manner82/safeguard-sessions-plugin-starling-2fa
cd92f95c0b3b4e6f892275964b9e27154381e84c
[ "MIT" ]
null
null
null
lib/starling_join_client.py
manner82/safeguard-sessions-plugin-starling-2fa
cd92f95c0b3b4e6f892275964b9e27154381e84c
[ "MIT" ]
null
null
null
# # Copyright (c) 2018-2019 One Identity # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publis...
46.805556
118
0.732047
# # Copyright (c) 2018-2019 One Identity # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publis...
0
377
0
1,509
0
0
0
52
90
043f0a6b74e9d00637e02e9b81e0139b832325a4
342
py
Python
plugins/targz.py
microns-ariadne/ariadne-pipeline-test-harness
73e749c48d1ff103fee2044833778e33c70be73b
[ "MIT" ]
2
2016-03-15T15:07:06.000Z
2016-05-10T23:01:05.000Z
plugins/targz.py
microns-ariadne/ariadne-pipeline-test-harness
73e749c48d1ff103fee2044833778e33c70be73b
[ "MIT" ]
null
null
null
plugins/targz.py
microns-ariadne/ariadne-pipeline-test-harness
73e749c48d1ff103fee2044833778e33c70be73b
[ "MIT" ]
null
null
null
plugin_class="targz"
20.117647
59
0.654971
import plugin import os plugin_class="targz" class targz(plugin.ArchivePlugin): name="targz" def can_handle(self, extension): return extension == ".tar.gz" or extension == ".tgz" def unpack(self, file_name, destination): os.system("tar -xzf "+file_name+" -C "+destination) def __init__(...
0
0
0
273
0
0
0
-20
67
57651aead8bc780e069dcbb4153946b076f0ec3e
3,044
py
Python
src/home_work/part_1_coding/python_list_exercices.py
AndreiHustiuc/IT_Factory_Course
c6f3e4a9282a1c19c0f52c79f0c81f026814a02a
[ "MIT" ]
null
null
null
src/home_work/part_1_coding/python_list_exercices.py
AndreiHustiuc/IT_Factory_Course
c6f3e4a9282a1c19c0f52c79f0c81f026814a02a
[ "MIT" ]
null
null
null
src/home_work/part_1_coding/python_list_exercices.py
AndreiHustiuc/IT_Factory_Course
c6f3e4a9282a1c19c0f52c79f0c81f026814a02a
[ "MIT" ]
1
2022-03-16T10:39:03.000Z
2022-03-16T10:39:03.000Z
# Assign the first element of the list to answer_1 on line 2 lst=[11, 100, 99, 1000, 999] answer_1=lst[0] print(answer_1) #===================================== #This time print the second element of the list directly on line 3. You should get 100. lst=[11, 100, 101, 999, 1001] print(lst[1]) #======================...
24.95082
135
0.556505
# Assign the first element of the list to answer_1 on line 2 lst=[11, 100, 99, 1000, 999] answer_1=lst[0] print(answer_1) #===================================== #This time print the second element of the list directly on line 3. You should get 100. lst=[11, 100, 101, 999, 1001] print(lst[1]) #======================...
0
0
0
0
0
0
0
0
0
fa052566aa6849e06985b1e378dbe7a75600e6d6
3,625
py
Python
milpool/training.py
knutdrand/milpool
6d33c6eb4d3bbdd8d95fce6a7006c43d9d939026
[ "MIT" ]
null
null
null
milpool/training.py
knutdrand/milpool
6d33c6eb4d3bbdd8d95fce6a7006c43d9d939026
[ "MIT" ]
null
null
null
milpool/training.py
knutdrand/milpool
6d33c6eb4d3bbdd8d95fce6a7006c43d9d939026
[ "MIT" ]
null
null
null
# from .visualization import plot_distributions_2d
39.402174
140
0.595862
import torch from copy import deepcopy # from .visualization import plot_distributions_2d from itertools import chain def simple_mil_training(X, y, model, n_iterations=1000, n_epochs=5): crit = torch.nn.BCEWithLogitsLoss(reduction='mean') optim = torch.optim.SGD(model.parameters(), lr=1e-1, momentum=0.0) p...
0
0
0
0
0
3,424
0
1
135
fddbae7ddbdcfb9064f3c75b532763a4d49e5843
16,261
py
Python
encyclopedia/eav.py
scott-howard-james/encyclopedia
8322320df790a56a51216208ae4977a1041085d2
[ "Apache-2.0" ]
null
null
null
encyclopedia/eav.py
scott-howard-james/encyclopedia
8322320df790a56a51216208ae4977a1041085d2
[ "Apache-2.0" ]
null
null
null
encyclopedia/eav.py
scott-howard-james/encyclopedia
8322320df790a56a51216208ae4977a1041085d2
[ "Apache-2.0" ]
null
null
null
# standard import unittest # external if __name__ == '__main__': unittest.main()
34.305907
121
0.509071
# standard import unittest import tempfile import typing # external from encyclopedia import Unindexed class EAV(dict, Unindexed): ''' Container for storing small-ish EAV "triples" (Entity-Atrribute-Value). - Focus of class is providing convenient dictionary-like access rather than data analysis functional...
0
136
0
15,928
0
0
0
-1
112
73a701e1c6d57e71d9866cbcf99b25e44e0aa00d
1,313
py
Python
calm/dsl/builtins/models/endpoint_payload.py
tuxtof/calm-dsl
5af67435d8304b97e170a690068f2d5975e9bfe6
[ "Apache-2.0" ]
37
2019-12-23T15:23:20.000Z
2022-03-15T11:12:11.000Z
calm/dsl/builtins/models/endpoint_payload.py
gabybeitler/calm-dsl
bac453413cfcf800eef95d89d5a7323c83654a93
[ "Apache-2.0" ]
144
2020-03-09T11:22:09.000Z
2022-03-28T21:34:09.000Z
calm/dsl/builtins/models/endpoint_payload.py
gabybeitler/calm-dsl
bac453413cfcf800eef95d89d5a7323c83654a93
[ "Apache-2.0" ]
46
2020-01-23T14:28:04.000Z
2022-03-09T04:17:10.000Z
# Endpoint Payload EndpointPayload = _endpoint_payload()
24.773585
85
0.703732
from .entity import EntityType, Entity from .validator import PropertyValidator from .endpoint import EndpointType # Endpoint Payload class EndpointPayloadType(EntityType): __schema_name__ = "EndpointPayload" __openapi_type__ = "endpoint_payload" class EndpointPayloadValidator(PropertyValidator, openapi_t...
0
0
0
219
0
822
0
49
158
0ae7296a7096ef67b693ba3c6323df75c8308ca2
2,161
py
Python
code/Solution_0105_buildTree.py
qizhenkang/myLeetCode
cb9edce69567eba9d96ce756507a5a7ac6e74293
[ "MIT" ]
null
null
null
code/Solution_0105_buildTree.py
qizhenkang/myLeetCode
cb9edce69567eba9d96ce756507a5a7ac6e74293
[ "MIT" ]
null
null
null
code/Solution_0105_buildTree.py
qizhenkang/myLeetCode
cb9edce69567eba9d96ce756507a5a7ac6e74293
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Tue Sep 28 23:39:31 2021 @author: qizhe """ # Definition for a binary tree node. if __name__ == '__main__': solu = Solution() input_Str = str('{[]{}()}') # input_list = input_List = [90] input_int = 200 n1 = TreeNode(15) n2 = TreeNode(7) n3 = T...
28.064935
120
0.580287
# -*- coding: utf-8 -*- """ Created on Tue Sep 28 23:39:31 2021 @author: qizhe """ # Definition for a binary tree node. class TreeNode: def __init__(self, val=0, left=None, right=None): self.val = val self.left = left self.right = right class Solution: def buildTree(self, preorder, ino...
420
0
0
1,218
0
0
0
0
44
16549ce1e5693e8ba671aec0e261b7166ae7b765
3,479
py
Python
manage.py
small99/AutoLine
2a672e2fe3ff7d00625f75f3b3aff25b59567b95
[ "Apache-2.0" ]
249
2018-05-11T08:43:17.000Z
2021-08-13T09:32:57.000Z
manage.py
small99/AutoLine
2a672e2fe3ff7d00625f75f3b3aff25b59567b95
[ "Apache-2.0" ]
31
2018-05-15T01:25:18.000Z
2022-03-12T00:11:29.000Z
manage.py
small99/AutoLine
2a672e2fe3ff7d00625f75f3b3aff25b59567b95
[ "Apache-2.0" ]
132
2018-03-01T02:34:52.000Z
2021-02-08T02:00:40.000Z
# -*- coding: utf-8 -*- __author__ = "" """ : Email: lymking@foxmail.com """ import os import sys from app import create_app, db from flask_script import Manager, Shell from flask_migrate import Migrate, MigrateCommand os.environ["PATH"] = os.environ["PATH"] + ";" + os.getcwd() + "/bin" app = create_app(os...
25.394161
85
0.561368
# -*- coding: utf-8 -*- __author__ = "苦叶子" """ 公众号: 开源优测 Email: lymking@foxmail.com """ import os import sys import codecs import requests from app import create_app, db from app.utils.trigger import Trigger from app.models import User, Role from flask_script import Manager, Shell from flask_migrate import Migrat...
675
637
0
0
0
1,584
0
14
249
ed563fd68bd9fcb34854fe615335ca8309df9c6b
404
py
Python
tools/print_status.py
babygrimes/circuitpython
2adecda5eb1ed864f9d0804cd39966a98b3e3405
[ "MIT" ]
36
2017-05-20T21:11:49.000Z
2022-01-30T18:36:45.000Z
tools/print_status.py
babygrimes/circuitpython
2adecda5eb1ed864f9d0804cd39966a98b3e3405
[ "MIT" ]
6
2018-06-01T15:12:52.000Z
2022-01-11T00:10:28.000Z
tools/print_status.py
babygrimes/circuitpython
2adecda5eb1ed864f9d0804cd39966a98b3e3405
[ "MIT" ]
3
2020-02-12T13:21:47.000Z
2021-12-02T15:56:16.000Z
#!/usr/bin/env python3 import sys if len(sys.argv) != 2: print("""\ Usage: print_status.py STATUS_FILENAME STATUS_FILENAME contains one line with an integer status.""" ) sys.exit(1) with open(sys.argv[1], 'r') as status_in: status = int(status_in.readline()) print('{} with status {}'.format( "...
25.25
75
0.655941
#!/usr/bin/env python3 import sys if len(sys.argv) != 2: print("""\ Usage: print_status.py STATUS_FILENAME STATUS_FILENAME contains one line with an integer status.""" ) sys.exit(1) with open(sys.argv[1], 'r') as status_in: status = int(status_in.readline()) print('{} with status {}'.format( "...
0
0
0
0
0
0
0
0
0
65f127c8d63d991de7eccb2d8d8a6bbb7f652397
165
py
Python
Config/avatar.py
wisrovi/MANITOR-WISROVI
e4b08a9bae4ec9d1a1f0acde08a84e2b8c5e7b51
[ "MIT" ]
null
null
null
Config/avatar.py
wisrovi/MANITOR-WISROVI
e4b08a9bae4ec9d1a1f0acde08a84e2b8c5e7b51
[ "MIT" ]
null
null
null
Config/avatar.py
wisrovi/MANITOR-WISROVI
e4b08a9bae4ec9d1a1f0acde08a84e2b8c5e7b51
[ "MIT" ]
null
null
null
AVATAR = dict() AVATAR['START'] = "avatar_saludo.mp4" AVATAR['BAS1'] = "avatar_basico.mp4" AVATAR['BAS2'] = "avatar_basico2.mp4" AVATAR['END'] = "avatar_final.mp4"
23.571429
37
0.690909
AVATAR = dict() AVATAR['START'] = "avatar_saludo.mp4" AVATAR['BAS1'] = "avatar_basico.mp4" AVATAR['BAS2'] = "avatar_basico2.mp4" AVATAR['END'] = "avatar_final.mp4"
0
0
0
0
0
0
0
0
0
b9ed1d4a3b50dc1357e2090fa2a0f685536376ff
4,120
py
Python
src/eudat/accounting/client/__main__.py
raphael-ritz/eudat.accounting.client
19ebf95aaa2081691534b82bc1bbe8860c8ef3d6
[ "BSD-2-Clause" ]
null
null
null
src/eudat/accounting/client/__main__.py
raphael-ritz/eudat.accounting.client
19ebf95aaa2081691534b82bc1bbe8860c8ef3d6
[ "BSD-2-Clause" ]
7
2017-03-24T09:52:05.000Z
2018-08-09T10:34:00.000Z
src/eudat/accounting/client/__main__.py
raphael-ritz/eudat.accounting.client
19ebf95aaa2081691534b82bc1bbe8860c8ef3d6
[ "BSD-2-Clause" ]
3
2017-12-14T09:23:24.000Z
2018-01-02T11:01:46.000Z
# -*- coding: utf-8 -*- """ ======================= eudat.accounting.client ======================= Command line handling """ import logging import sys from eudat.accounting.client import LOG def main(argv=sys.argv): """Main function called from console command """ logging.basicConfig(filename='.account...
37.798165
91
0.517476
# -*- coding: utf-8 -*- """ ======================= eudat.accounting.client ======================= Command line handling """ import argparse import logging import sys from eudat.accounting.client import __version__, LOG, utils def main(argv=sys.argv): """Main function called from console command """ l...
0
0
0
3,352
0
0
0
14
46
ec5e83bd6922d19c238d9afdbdfca2bc35aebb8b
1,007
py
Python
LeetCode_SortMatrixDiagonally.py
amukher3/Problem_solutions
8fa6014a91f295d08cafb989024caa91d99211d9
[ "Apache-2.0" ]
1
2021-12-28T08:58:51.000Z
2021-12-28T08:58:51.000Z
LeetCode_SortMatrixDiagonally.py
amukher3/Coding
a330cb04b5dd5cc1c3cf69249417a71586441bc7
[ "Apache-2.0" ]
null
null
null
LeetCode_SortMatrixDiagonally.py
amukher3/Coding
a330cb04b5dd5cc1c3cf69249417a71586441bc7
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Sep 7 17:47:42 2020 @author: Abhishek Mukherjee """
30.515152
69
0.431976
# -*- coding: utf-8 -*- """ Created on Mon Sep 7 17:47:42 2020 @author: Abhishek Mukherjee """ class Solution: def diagonalSort(self, mat: List[List[int]]) -> List[List[int]]: temp=[] tempDict={} for i in range(len(mat)): for j in range(len(mat[0])): ...
0
0
0
863
0
0
0
0
25
46265a6ff1864cb53a4854d14333ba9d2e820115
34,044
py
Python
devilry/devilry_deadlinemanagement/tests/test_manage_deadline_view_admin.py
aless80/devilry-django
416c262e75170d5662542f15e2d7fecf5ab84730
[ "BSD-3-Clause" ]
null
null
null
devilry/devilry_deadlinemanagement/tests/test_manage_deadline_view_admin.py
aless80/devilry-django
416c262e75170d5662542f15e2d7fecf5ab84730
[ "BSD-3-Clause" ]
null
null
null
devilry/devilry_deadlinemanagement/tests/test_manage_deadline_view_admin.py
aless80/devilry-django
416c262e75170d5662542f15e2d7fecf5ab84730
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*-
57.506757
134
0.706527
# -*- coding: utf-8 -*- import mock from django import test from django import http from django.conf import settings from django.utils import timezone from django_cradmin import cradmin_testhelpers from model_mommy import mommy from devilry.devilry_account import models as account_models from devilry.apps.core impor...
0
0
0
32,929
0
0
0
424
653
a9dbf5cd9f0d3093ddbc52c72fda75d565dc84af
919
py
Python
my-cs/projects_util/py_vm_benchmarks/delete_key.py
zaqwes8811/cs-courses
aa9cf5ad109c9cfcacaadc11bf2defb2188ddce2
[ "Apache-2.0" ]
null
null
null
my-cs/projects_util/py_vm_benchmarks/delete_key.py
zaqwes8811/cs-courses
aa9cf5ad109c9cfcacaadc11bf2defb2188ddce2
[ "Apache-2.0" ]
null
null
null
my-cs/projects_util/py_vm_benchmarks/delete_key.py
zaqwes8811/cs-courses
aa9cf5ad109c9cfcacaadc11bf2defb2188ddce2
[ "Apache-2.0" ]
null
null
null
def benchmark_delete_key(): """ http://docs.python.org/2/library/collections.html """ import timeit code = """ results = {'A': 1, 'B': 2, 'C': 3} del results['A'] del results['B'] """ print timeit.timeit(code, number=100000) code = """ results = {'A': 1, 'B': 2, 'C':...
21.372093
68
0.511425
def benchmark_delete_key(): """ http://docs.python.org/2/library/collections.html """ import timeit code = """ results = {'A': 1, 'B': 2, 'C': 3} del results['A'] del results['B'] """ print timeit.timeit(code, number=100000) code = """ results = {'A': 1, 'B': 2, 'C':...
0
0
0
0
0
0
0
0
0
b7136d6f361a9fb3f543e1071683989ae2df5b2a
8,592
py
Python
db_api/tests.py
nchibana/yelp-dataset-challenge-2-ds
394229573f7677cfd5d876c68f20cca048d925ee
[ "MIT" ]
2
2019-11-06T01:00:00.000Z
2019-12-05T17:29:27.000Z
db_api/tests.py
AkiBae4891/yelp-dataset-challenge-2-ds
fa7cace65e502e335bdb804519e2b3ec5b6e77c6
[ "MIT" ]
20
2019-11-12T00:33:46.000Z
2019-12-12T12:33:54.000Z
db_api/tests.py
AkiBae4891/yelp-dataset-challenge-2-ds
fa7cace65e502e335bdb804519e2b3ec5b6e77c6
[ "MIT" ]
6
2019-11-08T14:11:49.000Z
2021-08-02T02:42:13.000Z
import requests import json ## Test Helper Functions (from snippets - may be old. See snippets for up-to-date functions.) def generate_id(record): """Generate ID returns a repeatable hash of a given record. param record: python string, list, or dictionary, pandas.series type record: string """ i...
30.360424
102
0.643622
import requests import numpy as np import hashlib import json import pandas as pd import time from multiprocessing import Pool ## Test Helper Functions (from snippets - may be old. See snippets for up-to-date functions.) def generate_id(record): """Generate ID returns a repeatable hash of a given record. pa...
0
0
0
0
0
1,093
0
-21
186
ed027c5fae957241bbe90fc66fc97b9c4321c067
4,441
py
Python
vcli/tests/unit_tests/cmd/test_dns_command.py
vertica/vertica-accelerator-cli
706925f58a4bfc2876903396db72363f673be76a
[ "Apache-2.0" ]
null
null
null
vcli/tests/unit_tests/cmd/test_dns_command.py
vertica/vertica-accelerator-cli
706925f58a4bfc2876903396db72363f673be76a
[ "Apache-2.0" ]
null
null
null
vcli/tests/unit_tests/cmd/test_dns_command.py
vertica/vertica-accelerator-cli
706925f58a4bfc2876903396db72363f673be76a
[ "Apache-2.0" ]
null
null
null
# # (c) Copyright 2021 Micro Focus or one of its affiliates. #
34.426357
102
0.674172
# # (c) Copyright 2021 Micro Focus or one of its affiliates. # import unittest import pytest import json from unittest.mock import patch, MagicMock from vcli.cmd.dns_command import DNSCommand from vcli.util.static_params import ( VAAS_MODULES ) from vcli.constant import RETURN_CODE_SUCCESS class DNSCommandTest...
0
3,685
0
434
0
0
0
78
179
807cb7e20edb9a7e32b2c56de3b071ec2f99101b
6,094
py
Python
openstack_dashboard/plugins/urls.py
griddynamics/osc-robot-openstack-dashboard
93bafcf0c35ef6bd0e5a0a4434b222befa940e27
[ "Apache-2.0" ]
3
2015-05-18T13:49:44.000Z
2015-05-18T14:38:13.000Z
openstack_dashboard/plugins/urls.py
griddynamics/osc-robot-openstack-dashboard
93bafcf0c35ef6bd0e5a0a4434b222befa940e27
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/plugins/urls.py
griddynamics/osc-robot-openstack-dashboard
93bafcf0c35ef6bd0e5a0a4434b222befa940e27
[ "Apache-2.0" ]
null
null
null
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2011 Fourth Paradigm Development, Inc. # # Licensed under the Apache License, Version 2.0 (the "Licen...
37.617284
136
0.679685
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2011 Fourth Paradigm Development, Inc. # # Licensed under the Apache License, Version 2.0 (the "Licen...
0
0
0
3,221
0
0
0
18
68
5f4772b396bd13a271f44dfb42ae5d960c0b9a8d
4,351
py
Python
recipes/Python/439319_Shuffle_Merge_Files/recipe-439319.py
tdiprima/code
61a74f5f93da087d27c70b2efe779ac6bd2a3b4f
[ "MIT" ]
2,023
2017-07-29T09:34:46.000Z
2022-03-24T08:00:45.000Z
recipes/Python/439319_Shuffle_Merge_Files/recipe-439319.py
unhacker/code
73b09edc1b9850c557a79296655f140ce5e853db
[ "MIT" ]
32
2017-09-02T17:20:08.000Z
2022-02-11T17:49:37.000Z
recipes/Python/439319_Shuffle_Merge_Files/recipe-439319.py
unhacker/code
73b09edc1b9850c557a79296655f140ce5e853db
[ "MIT" ]
780
2017-07-28T19:23:28.000Z
2022-03-25T20:39:41.000Z
#!/usr/bin/python """ NAME shuffle-merge -- shuffle-merge text files SYNOPSIS %(progname)s [OPTIONS] <File Name Prefix> DESCRIPTION shuffle-merge merges a number of text files. The order of merging is selected with a random policy. OPTIONS: Arguments: --help Print a summary of th...
27.19375
84
0.550448
#!/usr/bin/python """ NAME shuffle-merge -- shuffle-merge text files SYNOPSIS %(progname)s [OPTIONS] <File Name Prefix> DESCRIPTION shuffle-merge merges a number of text files. The order of merging is selected with a random policy. OPTIONS: Arguments: --help Print a summary of th...
0
0
0
0
0
846
0
0
47
05b1fa32288e3968e975c229ef70ef377470b2c4
3,975
py
Python
experiments/histology/dqn_struct.py
Denbergvanthijs/imbDRLAppendix
2bc810366b5793abdb47fbe110caf0936c0c9f28
[ "Apache-2.0" ]
null
null
null
experiments/histology/dqn_struct.py
Denbergvanthijs/imbDRLAppendix
2bc810366b5793abdb47fbe110caf0936c0c9f28
[ "Apache-2.0" ]
null
null
null
experiments/histology/dqn_struct.py
Denbergvanthijs/imbDRLAppendix
2bc810366b5793abdb47fbe110caf0936c0c9f28
[ "Apache-2.0" ]
3
2021-01-22T14:53:55.000Z
2021-10-08T16:44:11.000Z
import argparse import csv from imbDRL.agents.ddqn import TrainDDQN from imbDRL.data import get_train_test_val from imbDRL.metrics import classification_metrics, network_predictions from imbDRL.utils import imbalance_ratio from sklearn.model_selection import train_test_split from tensorflow import keras from tensorflo...
44.662921
140
0.718491
import argparse import csv from imbDRL.agents.ddqn import TrainDDQN from imbDRL.data import get_train_test_val from imbDRL.metrics import classification_metrics, network_predictions from imbDRL.utils import imbalance_ratio from sklearn.model_selection import train_test_split from tensorflow import keras from tensorflo...
0
0
0
0
0
0
0
0
0
add57e3fff8b2ed7715fdebb0e7cd1fdf0f038fe
6,930
py
Python
tutorials/example_pytorch_yolov5n.py
eladc-git/model_optimization
46d1c893ca23e61d8ef7597184ad2ba6e2ae6e7a
[ "Apache-2.0" ]
null
null
null
tutorials/example_pytorch_yolov5n.py
eladc-git/model_optimization
46d1c893ca23e61d8ef7597184ad2ba6e2ae6e7a
[ "Apache-2.0" ]
null
null
null
tutorials/example_pytorch_yolov5n.py
eladc-git/model_optimization
46d1c893ca23e61d8ef7597184ad2ba6e2ae6e7a
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Sony Semiconductors Israel, Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
42
156
0.59798
# Copyright 2021 Sony Semiconductors Israel, Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
0
0
0
2,076
0
591
0
98
317
de79376c1e2dd28fee8ecee34aedcb02001f68e0
11,654
py
Python
QMapUtil.py
pradeep021096/QMap
617251d743368e833cfb0e39d8a444b41822dc3c
[ "MIT" ]
4
2021-02-16T09:19:35.000Z
2021-02-17T09:59:30.000Z
QMapUtil.py
pradeep021096/qMaps
617251d743368e833cfb0e39d8a444b41822dc3c
[ "MIT" ]
null
null
null
QMapUtil.py
pradeep021096/qMaps
617251d743368e833cfb0e39d8a444b41822dc3c
[ "MIT" ]
2
2021-02-22T11:09:05.000Z
2021-05-14T11:41:53.000Z
# ============================================================================================================== # MIT License # Copyright (c) 2020 Pradeep Kumar # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), t...
32.016484
139
0.587524
# ============================================================================================================== # MIT License # Copyright (c) 2020 Pradeep Kumar # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), t...
0
5,048
0
4,529
0
483
0
-11
166
966c9caf3401e29fe1b0e820c6dbe22fad1da910
1,453
py
Python
tests/test_wait.py
Puneethnaik/awaitwhat
41254780191cb77a32fe420d697455bac8b14c64
[ "MIT" ]
45
2019-08-12T12:15:52.000Z
2022-03-03T13:27:13.000Z
tests/test_wait.py
Puneethnaik/awaitwhat
41254780191cb77a32fe420d697455bac8b14c64
[ "MIT" ]
27
2019-08-16T06:32:16.000Z
2021-07-14T12:15:04.000Z
tests/test_wait.py
Puneethnaik/awaitwhat
41254780191cb77a32fe420d697455bac8b14c64
[ "MIT" ]
9
2019-09-14T02:05:00.000Z
2021-06-22T04:14:01.000Z
import awaitwhat.wait
24.216667
63
0.594632
import asyncio import pytest import awaitwhat.wait import awaitwhat.blocker from awaitwhat.stack import task_get_stack async def a(): await asyncio.wait(b(), timeout=123) async def b(): await asyncio.sleep(42) async def debug(): t = asyncio.create_task(a()) await asyncio.sleep(0.11) stack = ta...
0
1,046
168
0
0
0
0
9
203
36595e49a4a6407acc4cea3b50a213759b89808b
267
py
Python
show_photo.py
Monologuethl/Unet-CT-us
8829c7833ff868f476d29ee6756bb008788b3b18
[ "MIT" ]
null
null
null
show_photo.py
Monologuethl/Unet-CT-us
8829c7833ff868f476d29ee6756bb008788b3b18
[ "MIT" ]
null
null
null
show_photo.py
Monologuethl/Unet-CT-us
8829c7833ff868f476d29ee6756bb008788b3b18
[ "MIT" ]
null
null
null
import cv2 import matplotlib.pyplot as plt img = cv2.imread(r'D:\TONG\PycharmProjects\Unet-US\data\membrane\train\label\0.png') # R = img[:, :, 2] # cv2.imshow("img", img) # cv2.waitKey(0) plt.imshow(img) plt.show() plt.hist(img.ravel(), 256, [0, 256]) plt.show()
19.071429
84
0.674157
import cv2 import matplotlib.pyplot as plt img = cv2.imread(r'D:\TONG\PycharmProjects\Unet-US\data\membrane\train\label\0.png') # R = img[:, :, 2] # cv2.imshow("img", img) # cv2.waitKey(0) plt.imshow(img) plt.show() plt.hist(img.ravel(), 256, [0, 256]) plt.show()
0
0
0
0
0
0
0
0
0
7ca5fd55b0f38e852fbc5d0e09caf4d119586ae0
1,096
py
Python
Theme_1_Baseline/Scenario_1B_CoreVariable_Strings/utilities.py
ocefpaf/system-test
9e435524b96dcdcb7a2e5dccb8be8ead0f35a547
[ "Unlicense" ]
null
null
null
Theme_1_Baseline/Scenario_1B_CoreVariable_Strings/utilities.py
ocefpaf/system-test
9e435524b96dcdcb7a2e5dccb8be8ead0f35a547
[ "Unlicense" ]
null
null
null
Theme_1_Baseline/Scenario_1B_CoreVariable_Strings/utilities.py
ocefpaf/system-test
9e435524b96dcdcb7a2e5dccb8be8ead0f35a547
[ "Unlicense" ]
null
null
null
service_mapping = { "odp" : "opendap" }
30.444444
125
0.573905
from IPython.core.display import HTML def css_styles(): return HTML(""" <style> .info { background-color: #fcf8e3; border-color: #faebcc; border-left: 5px solid #8a6d3b; padding: 0.5em; color: #8a6d3b; } .success { background-color: #d9edf7; border-color: #bce...
0
0
0
0
0
966
0
16
67
bc25325884a29578864f507707aa25a3214e1145
1,779
py
Python
tasks/hackers-pc/gen.py
irdkwmnsb/lkshl-ctf
e5c0200ddc8ba73df5f321b87b9763fb1bbaba57
[ "MIT" ]
3
2021-03-30T06:27:58.000Z
2021-04-03T17:56:35.000Z
tasks/hackers-pc/gen.py
irdkwmnsb/lkshl-ctf
e5c0200ddc8ba73df5f321b87b9763fb1bbaba57
[ "MIT" ]
null
null
null
tasks/hackers-pc/gen.py
irdkwmnsb/lkshl-ctf
e5c0200ddc8ba73df5f321b87b9763fb1bbaba57
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- BASE_PORT = 36000 if __name__ == '__main__': main()
25.056338
75
0.536818
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys from tqdm import tqdm import teams_and_flags import os import subprocess as sp BASE_PORT = 36000 def sh(*args, sudo=False, env=True, fatal=True): if sudo: print('Requesting sudo privileges for command:') print(' ' + ' '.join(args)) ...
0
0
0
0
0
1,466
0
-20
228
21df1235de33c19f7c20f8f74ca102c1cccdf3e1
3,028
py
Python
locan/data/region_utils.py
super-resolution/Locan
94ed7759f7d7ceddee7c7feaabff80010cfedf30
[ "BSD-3-Clause" ]
8
2021-11-25T20:05:49.000Z
2022-03-27T17:45:00.000Z
locan/data/region_utils.py
super-resolution/Locan
94ed7759f7d7ceddee7c7feaabff80010cfedf30
[ "BSD-3-Clause" ]
4
2021-12-15T22:39:20.000Z
2022-03-11T17:35:34.000Z
locan/data/region_utils.py
super-resolution/Locan
94ed7759f7d7ceddee7c7feaabff80010cfedf30
[ "BSD-3-Clause" ]
1
2022-03-22T19:53:13.000Z
2022-03-22T19:53:13.000Z
""" Utility functions for working with regions. See Also -------- :func:`locan.data.filter.select_by_region` :func:`locan.data.properties.misc.distance_to_region` :func:`locan.data.properties.misc.distance_to_region_boundary` """ from shapely.ops import unary_union from locan.data.region import EmptyRegion, Region2D...
29.980198
113
0.683289
""" Utility functions for working with regions. See Also -------- :func:`locan.data.filter.select_by_region` :func:`locan.data.properties.misc.distance_to_region` :func:`locan.data.properties.misc.distance_to_region_boundary` """ from shapely.ops import unary_union from locan.data.region import EmptyRegion, Region, ...
0
0
0
0
0
0
0
8
0
915f71f30f7302f5219ebe6502ce285534b8f078
1,258
py
Python
syncmanagerapi/tests/setup.py
Frie-man/syncmanager
f76e36f85ea68ab177a9ffd50dfff033ae0fc8f6
[ "MIT" ]
null
null
null
syncmanagerapi/tests/setup.py
Frie-man/syncmanager
f76e36f85ea68ab177a9ffd50dfff033ae0fc8f6
[ "MIT" ]
null
null
null
syncmanagerapi/tests/setup.py
Frie-man/syncmanager
f76e36f85ea68ab177a9ffd50dfff033ae0fc8f6
[ "MIT" ]
null
null
null
SYNC_ADMIN = "syncman" SYNC_ADMIN_PASSWORD = "pw1234" USER = "eggs" USER_PASSWORD = "secret" USER_CLIENT_ENV = "intregationtest"
26.765957
107
0.72814
from requests.auth import _basic_auth_str SYNC_ADMIN = "syncman" SYNC_ADMIN_PASSWORD = "pw1234" USER = "eggs" USER_PASSWORD = "secret" USER_CLIENT_ENV = "intregationtest" def create_admin(runner): runner.invoke(args=['admin-create', '--name', SYNC_ADMIN, '--password', SYNC_ADMIN_PASSWORD]) def get_admin_basic...
0
0
0
0
0
941
0
20
160
b25be4ce54888747fad471883fd2dbd805b1b15b
4,103
py
Python
manhattan.py
wissemzaghdoudi/sys_recomandation
4653b595592426c26a11199f70ef7f8ddc105136
[ "Apache-2.0" ]
1
2021-05-21T10:55:12.000Z
2021-05-21T10:55:12.000Z
manhattan.py
wissemzaghdoudi/sys_recomandation
4653b595592426c26a11199f70ef7f8ddc105136
[ "Apache-2.0" ]
null
null
null
manhattan.py
wissemzaghdoudi/sys_recomandation
4653b595592426c26a11199f70ef7f8ddc105136
[ "Apache-2.0" ]
null
null
null
if __name__ == '__main__': testInstance = [[0.51, 0.50], [0.1, 0.9], [0.4, 0.3]] k = 3 # AND GATE trainSetAND_GATE = [[0.0, 0.0, 0], [1.0, 1.0, 1], [0.0, 1.0, 0], [1.0, 0.0, 0]] print("<-......................By applying AND Gate..................>\n") main(trainSetAND_GA...
37.642202
122
0.588837
import math import operator def euclideanDistance(testInstance, trainInstance, length): distance = 0 for x in range(length): distance += pow((testInstance[x] - trainInstance[x]), 2) return math.sqrt(distance) def manhattan(testInstance, trainInstance, length): # formula is: dista...
0
0
0
0
0
3,368
0
-16
221
bb50dd1f7f6fc4cd13fecc3aa3adf3c000c85c10
1,799
py
Python
python/flask/app/blueprint.py
kskumgk63/trace-examples
1de45b351aa03367c745933b4923f07d436aea3e
[ "BSD-3-Clause" ]
75
2017-03-20T12:17:14.000Z
2022-03-24T02:55:53.000Z
python/flask/app/blueprint.py
kskumgk63/trace-examples
1de45b351aa03367c745933b4923f07d436aea3e
[ "BSD-3-Clause" ]
25
2017-05-10T18:21:20.000Z
2022-01-28T18:36:52.000Z
python/flask/app/blueprint.py
kskumgk63/trace-examples
1de45b351aa03367c745933b4923f07d436aea3e
[ "BSD-3-Clause" ]
54
2017-05-10T18:13:52.000Z
2022-01-11T21:04:42.000Z
from ddtrace import Pin from flask import Blueprint # Create a new Blueprint bp = Blueprint('bp', __name__, url_prefix='/bp/') # Just showing that we can override the service set for this blueprint Pin.override(bp, service='flask-bp', app='flask', app_type='web') # Hook to run before each blueprint request # Hoo...
23.064103
70
0.757643
from ddtrace import Pin from flask import abort, Blueprint, render_template_string from .limiter import limiter # Create a new Blueprint bp = Blueprint('bp', __name__, url_prefix='/bp/') # Just showing that we can override the service set for this blueprint Pin.override(bp, service='flask-bp', app='flask', app_type...
0
786
0
0
0
0
0
38
243
d3645ca28e74bd942584ef2afe78208d3a88e4d5
243
py
Python
Python/accountant1/delete me/Expense.py
Fornost461/drafts
39f56fb16ebf206077e5f8617741aa93623195af
[ "CC0-1.0" ]
null
null
null
Python/accountant1/delete me/Expense.py
Fornost461/drafts
39f56fb16ebf206077e5f8617741aa93623195af
[ "CC0-1.0" ]
null
null
null
Python/accountant1/delete me/Expense.py
Fornost461/drafts
39f56fb16ebf206077e5f8617741aa93623195af
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python3
24.3
72
0.646091
#!/usr/bin/env python3 class Transaction: def __init__(self, amount, account, description="", date, category): self.amount = amount self.description = description self.date = date self.category = category
0
0
0
197
0
0
0
0
23
a1581b0131e10eb2027e2ba52b62eac4bcdd7c1a
802
py
Python
1.3/e1_3_19_kary.py
garryyes/python-learning
0071efd11ffc8f8cf0938a14b3e02518c7fdf99d
[ "MIT" ]
null
null
null
1.3/e1_3_19_kary.py
garryyes/python-learning
0071efd11ffc8f8cf0938a14b3e02518c7fdf99d
[ "MIT" ]
null
null
null
1.3/e1_3_19_kary.py
garryyes/python-learning
0071efd11ffc8f8cf0938a14b3e02518c7fdf99d
[ "MIT" ]
null
null
null
''' Modify binary.py to create a program kary.py that takes i and k as command-line arguments and converts i to base k. Assume that k is an integer between 2 and 16. For bases greater than 10, use the letters A through F to represent the 11th through 16th digits, respectively. ''' # convert i to base k import sys i = f...
26.733333
273
0.63591
''' Modify binary.py to create a program kary.py that takes i and k as command-line arguments and converts i to base k. Assume that k is an integer between 2 and 16. For bases greater than 10, use the letters A through F to represent the 11th through 16th digits, respectively. ''' # convert i to base k import sys i = f...
0
0
0
0
0
0
0
0
0
e639cb9183c732e0d96301c79283928373848452
20,730
py
Python
chp5/blackjack.py
leyuanheart/Reinforcement_Learning_An_Introduction
95500ebcb0430c5d08181652baec8efa0b45b356
[ "MIT" ]
4
2021-07-24T15:35:30.000Z
2021-09-02T01:07:28.000Z
chp5/blackjack.py
leyuanheart/Reinforcement_Learning_An_Introduction
95500ebcb0430c5d08181652baec8efa0b45b356
[ "MIT" ]
1
2021-07-24T15:41:19.000Z
2021-07-24T15:41:19.000Z
chp5/blackjack.py
leyuanheart/Reinforcement_Learning_An_Introduction
95500ebcb0430c5d08181652baec8efa0b45b356
[ "MIT" ]
2
2021-07-24T15:36:16.000Z
2021-07-25T01:14:46.000Z
# -*- coding: utf-8 -*- """ Created on Mon Mar 15 14:10:52 2021 @author: leyuan reference: https://github.com/ShangtongZhang/reinforcement-learning-an-introduction/blob/master/chapter05/blackjack.py https://github.com/dennybritz/reinforcement-learning/blob/master/lib/envs/blackjack.py """ import numpy as np ...
27.788204
227
0.606802
# -*- coding: utf-8 -*- """ Created on Mon Mar 15 14:10:52 2021 @author: leyuan reference: https://github.com/ShangtongZhang/reinforcement-learning-an-introduction/blob/master/chapter05/blackjack.py https://github.com/dennybritz/reinforcement-learning/blob/master/lib/envs/blackjack.py """ import time import...
660
0
0
0
0
10,077
0
-2
384
1e94697fa92f42fa1ad8ec2e74b430655d093edc
7,677
py
Python
pyutils/load.py
rfmanz/pyutils
f522ec18879d48c3cabfddfd21c83b0387d8f95a
[ "MIT" ]
null
null
null
pyutils/load.py
rfmanz/pyutils
f522ec18879d48c3cabfddfd21c83b0387d8f95a
[ "MIT" ]
null
null
null
pyutils/load.py
rfmanz/pyutils
f522ec18879d48c3cabfddfd21c83b0387d8f95a
[ "MIT" ]
null
null
null
import pandas as pd import datatable as dt import zipfile import re import os import time from datetime import timedelta import sys def directory(directory_path): """Puts you in the right directory. Gives you list of files in path""" os.chdir(re.findall("^(.*[\\\/])", directory_path)[0]) csv_files = os.l...
41.497297
116
0.446138
import pandas as pd import datatable as dt import zipfile import re import os import time from datetime import timedelta import sys def pd_options(): desired_width = 300 pd.set_option('display.width', desired_width) pd.set_option('display.max_columns', None) import warnings warnings.filterwarnings...
0
0
0
0
0
522
0
0
46
466b878167776360a81e33ee0828c2c2033b54c1
1,984
py
Python
vezba03/v3/v3/v3.py
acorovic/Projek
66d67823e618e133484c7e690c86190d9b50cfae
[ "MIT" ]
null
null
null
vezba03/v3/v3/v3.py
acorovic/Projek
66d67823e618e133484c7e690c86190d9b50cfae
[ "MIT" ]
null
null
null
vezba03/v3/v3/v3.py
acorovic/Projek
66d67823e618e133484c7e690c86190d9b50cfae
[ "MIT" ]
1
2017-03-17T07:50:18.000Z
2017-03-17T07:50:18.000Z
import time A = HeapClass() buildMaxHeap(A) # A is a max priorityQueue while(A.heapsize >= 1): sleepTime = heapExtractMax(A) if(time != None): print("Task with duration: ", sleepTime, " is in progress") time.sleep(sleepTime) print("All tasks finished");
22.545455
69
0.53125
import math import time def parentH(i): return math.floor(i/2) def left(i): return 2*i def right(i): return 2*i + 1 def maxHeapify(A,i): l = left(i) r = right(i) if l <= A.heapsize and A.heap[l] > A.heap[i]: largest = l else: largest = i if r <= A.h...
0
0
0
90
0
1,313
0
-10
298
82f0553283701a8f16603935ad68ad981746d5bc
25,389
py
Python
state-of-the-data-for-webgis/sotd_indicators/Indicator.py
ngageoint/state-of-the-data
59bd91d5108c04c9fb57caa0be542b53cfd0b07a
[ "MIT" ]
18
2017-09-18T14:47:40.000Z
2022-02-03T23:43:34.000Z
state-of-the-data-for-webgis/sotd_indicators/Indicator.py
ngageoint/state-of-the-data
59bd91d5108c04c9fb57caa0be542b53cfd0b07a
[ "MIT" ]
13
2017-10-10T16:12:28.000Z
2018-12-14T19:47:54.000Z
state-of-the-data-for-webgis/sotd_indicators/Indicator.py
ngageoint/state-of-the-data
59bd91d5108c04c9fb57caa0be542b53cfd0b07a
[ "MIT" ]
8
2017-09-21T20:09:54.000Z
2019-02-22T17:24:37.000Z
import ssl ssl._create_default_https_context = ssl._create_unverified_context
31.267241
117
0.482217
from sotd_indicators.indicators import * from arcgis.gis import GIS from arcgis.geometry import Geometry, filters import configparser import time import datetime import shutil import ssl ssl._create_default_https_context = ssl._create_unverified_context class Indicator: def __init__(self): # GIS Resou...
0
0
0
25,110
0
0
0
22
179
409b23608276a924a1148781980d949261d95496
2,433
py
Python
nicos_demo/vspodi/setups/detector.py
jkrueger1/nicos
5f4ce66c312dedd78995f9d91e8a6e3c891b262b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
null
null
null
nicos_demo/vspodi/setups/detector.py
jkrueger1/nicos
5f4ce66c312dedd78995f9d91e8a6e3c891b262b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
null
null
null
nicos_demo/vspodi/setups/detector.py
jkrueger1/nicos
5f4ce66c312dedd78995f9d91e8a6e3c891b262b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
null
null
null
description = 'Virtual SPODI detector' group = 'lowlevel' devices = dict( mon = device('nicos.devices.generic.VirtualCounter', description = 'Simulated MON1', fmtstr = '%d', type = 'monitor', visibility = (), ), tim1 = device('nicos.devices.generic.VirtualTimer', de...
29.670732
79
0.553226
description = 'Virtual SPODI detector' group = 'lowlevel' devices = dict( mon = device('nicos.devices.generic.VirtualCounter', description = 'Simulated MON1', fmtstr = '%d', type = 'monitor', visibility = (), ), tim1 = device('nicos.devices.generic.VirtualTimer', de...
0
0
0
0
0
0
0
0
0
a80c43a28774cfc1d5ad44a3e2b3a531dc0b3381
1,030
py
Python
examples/python_django/manage.py
GravityID/didkit
c5c422f2469c2c5cc2f6e6d8746e95b552fce3ed
[ "Apache-2.0" ]
116
2021-01-27T21:45:47.000Z
2022-03-31T07:30:12.000Z
examples/python_django/manage.py
GravityID/didkit
c5c422f2469c2c5cc2f6e6d8746e95b552fce3ed
[ "Apache-2.0" ]
154
2021-01-27T20:49:00.000Z
2022-03-24T20:20:26.000Z
examples/python_django/manage.py
GravityID/didkit
c5c422f2469c2c5cc2f6e6d8746e95b552fce3ed
[ "Apache-2.0" ]
27
2021-01-29T09:30:51.000Z
2022-02-20T06:09:15.000Z
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import errno import os import sys import didkit flags = os.O_CREAT | os.O_EXCL | os.O_WRONLY def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'python_django.settings') try: ...
27.105263
77
0.645631
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import errno import os import sys import didkit flags = os.O_CREAT | os.O_EXCL | os.O_WRONLY def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'python_django.settings') try: ...
0
0
0
0
0
0
0
0
0