hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
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
125
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
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
a30dc0ac5d58b18237f87ea3dfc0cd5b019efc1f
2,018
py
Python
Code.py
vybhavjain/NLP_PROJECT
42f6dcb6aaccd1dcb53e1d9a96e67152a9d49ca6
[ "MIT" ]
null
null
null
Code.py
vybhavjain/NLP_PROJECT
42f6dcb6aaccd1dcb53e1d9a96e67152a9d49ca6
[ "MIT" ]
null
null
null
Code.py
vybhavjain/NLP_PROJECT
42f6dcb6aaccd1dcb53e1d9a96e67152a9d49ca6
[ "MIT" ]
null
null
null
import turtle import math import speech_recognition as sr import re r = sr.Recognizer() with sr.Microphone() as source: print('Say Something') audio=r.listen(source) try: print('Google thinks you said:\n' + r.recognize_google(audio)) except: pass n=r.recognize_google(audio) patterns= [...
20.18
66
0.613479
import turtle import math import speech_recognition as sr import re def circle(radius): turtle.up() # go to (0, radius) turtle.goto(0,radius) turtle.down() turtle.color("red") # number of times the y axis has been crossed times_crossed_y = 0 x_sign = 1.0 while times_crossed_...
1,145
0
94
e8fde1ba1597924021a71bac35d5b4f831e16789
2,286
py
Python
assign4/src/lexer.py
rali20/cs335-project
6115cf4592fff1f9ab5ed21896acf671b38ffcc3
[ "MIT" ]
null
null
null
assign4/src/lexer.py
rali20/cs335-project
6115cf4592fff1f9ab5ed21896acf671b38ffcc3
[ "MIT" ]
null
null
null
assign4/src/lexer.py
rali20/cs335-project
6115cf4592fff1f9ab5ed21896acf671b38ffcc3
[ "MIT" ]
null
null
null
import ply.lex as lex keywords = { 'BREAK', 'CONST', 'CONTINUE', 'ELIF', 'ELSE', 'FOR', 'FUNC', 'GOTO', 'IF', 'RETURN', 'STRUCT', 'TYPE', 'VAR' } operators = { 'ADD', # + 'SUB', # - 'MUL', # * 'QUO', # / 'REM', # % 'AND', # & 'OR', # | 'SHL', # << 'SHR', # ...
17.584615
69
0.453631
import ply.lex as lex keywords = { 'BREAK', 'CONST', 'CONTINUE', 'ELIF', 'ELSE', 'FOR', 'FUNC', 'GOTO', 'IF', 'RETURN', 'STRUCT', 'TYPE', 'VAR' } operators = { 'ADD', # + 'SUB', # - 'MUL', # * 'QUO', # / 'REM', # % 'AND', # & 'OR', # | 'SHL', # << 'SHR', # ...
324
0
111
9ab77af536f3ff9a485a1f1789860b577739c4a8
902
py
Python
setup.py
Huelse/HEAAN-Python
034ee757a7b7949d96b27d3228819dd9be6579ae
[ "MIT" ]
17
2020-01-04T13:02:45.000Z
2022-02-18T08:37:58.000Z
setup.py
Huelse/PYHEAAN
034ee757a7b7949d96b27d3228819dd9be6579ae
[ "MIT" ]
6
2020-07-03T09:43:01.000Z
2021-11-02T08:30:56.000Z
setup.py
Huelse/PYHEAAN
034ee757a7b7949d96b27d3228819dd9be6579ae
[ "MIT" ]
4
2020-01-04T13:02:47.000Z
2021-09-14T00:04:53.000Z
from distutils.core import setup, Extension from distutils import sysconfig cfg_vars = sysconfig.get_config_vars() for key, value in cfg_vars.items(): if type(value) == str: cfg_vars[key] = value.replace('-Wstrict-prototypes', '') cpp_args = ['-std=c++11'] ext_modules = [ Extension( 'HEAAN', ...
28.1875
111
0.641907
from distutils.core import setup, Extension from distutils import sysconfig cfg_vars = sysconfig.get_config_vars() for key, value in cfg_vars.items(): if type(value) == str: cfg_vars[key] = value.replace('-Wstrict-prototypes', '') cpp_args = ['-std=c++11'] ext_modules = [ Extension( 'HEAAN', ...
0
0
0
fc13f414dd8d7f0600657287014d27609e190f10
21,848
py
Python
grr/server/grr_response_server/check_lib/checks_test.py
khanhgithead/grr
8ad8a4d2c5a93c92729206b7771af19d92d4f915
[ "Apache-2.0" ]
4,238
2015-01-01T15:34:50.000Z
2022-03-31T08:18:05.000Z
grr/server/grr_response_server/check_lib/checks_test.py
khanhgithead/grr
8ad8a4d2c5a93c92729206b7771af19d92d4f915
[ "Apache-2.0" ]
787
2015-01-02T21:34:24.000Z
2022-03-02T13:26:38.000Z
grr/server/grr_response_server/check_lib/checks_test.py
khanhgithead/grr
8ad8a4d2c5a93c92729206b7771af19d92d4f915
[ "Apache-2.0" ]
856
2015-01-02T02:50:11.000Z
2022-03-31T11:11:53.000Z
#!/usr/bin/env python # -*- encoding: utf-8 -*- """Tests for checks.""" import os from absl import app from grr_response_core import config from grr_response_core.lib.parsers import config_file as config_file_parsers from grr_response_core.lib.parsers import linux_cmd_parser from grr_response_core.lib.parsers import...
36.596315
80
0.682992
#!/usr/bin/env python # -*- encoding: utf-8 -*- """Tests for checks.""" import os from absl import app from grr_response_core import config from grr_response_core.lib.parsers import config_file as config_file_parsers from grr_response_core.lib.parsers import linux_cmd_parser from grr_response_core.lib.parsers import...
12,442
3,275
736
f40433383c076322b093e44928670306096be641
738
py
Python
code/exampleStrats/grimTrigger.py
robo-monk/PrisonersDilemmaTournament
84f323f46233d3c6b4ce4380e04e981520912423
[ "MIT" ]
null
null
null
code/exampleStrats/grimTrigger.py
robo-monk/PrisonersDilemmaTournament
84f323f46233d3c6b4ce4380e04e981520912423
[ "MIT" ]
null
null
null
code/exampleStrats/grimTrigger.py
robo-monk/PrisonersDilemmaTournament
84f323f46233d3c6b4ce4380e04e981520912423
[ "MIT" ]
null
null
null
# Strategy known as "Grim Trigger" or "Grudger". # We will cooperate repeatedly until our opponent betrays us once. # Then, we will get angry and defect for the rest of time. # # In this implementation, I used the memory variable to store Grim Trigger's state of mind. # memory is true if Grim Trigger has been wronged, ...
36.9
91
0.665312
# Strategy known as "Grim Trigger" or "Grudger". # We will cooperate repeatedly until our opponent betrays us once. # Then, we will get angry and defect for the rest of time. # # In this implementation, I used the memory variable to store Grim Trigger's state of mind. # memory is true if Grim Trigger has been wronged, ...
366
0
22
834346e09dafd4d37d18d307f014b0104fd5d23a
9,764
py
Python
cbopensource/connectors/fortisandbox/api_fortisandbox.py
carbonblack/cb-fortisandbox-connector
1c1f45c133e44a7498147f79e2c2e462e6e59022
[ "MIT" ]
3
2019-12-11T07:39:46.000Z
2021-11-10T07:46:10.000Z
cbopensource/connectors/fortisandbox/api_fortisandbox.py
sierrezinal/cb-fortisandbox-connector
1c1f45c133e44a7498147f79e2c2e462e6e59022
[ "MIT" ]
null
null
null
cbopensource/connectors/fortisandbox/api_fortisandbox.py
sierrezinal/cb-fortisandbox-connector
1c1f45c133e44a7498147f79e2c2e462e6e59022
[ "MIT" ]
2
2020-08-02T19:21:43.000Z
2020-09-01T23:22:53.000Z
import os import requests import json from base64 import b64encode, b64decode # NOTE: For 'requests' to work with 'https' addrs, must use 'verify=False' # to ignore invalid SSL certificates. TEST_URL = 'https://10.210.39.16/jsonrpc' # NOTE: List is used to control the order in which RPC requests are sent (order # matte...
28.138329
92
0.508193
import os import requests import json from base64 import b64encode, b64decode # NOTE: For 'requests' to work with 'https' addrs, must use 'verify=False' # to ignore invalid SSL certificates. TEST_URL = 'https://10.210.39.16/jsonrpc' # NOTE: List is used to control the order in which RPC requests are sent (order # matte...
473
0
23
43d199d30a03046712e04f52ced815d863208b1a
1,152
py
Python
calvin/calvinsys/media/mediaplayer.py
josrolgil/exjobbCalvin
976459eaa50246586360c049b9880d753623d574
[ "Apache-2.0" ]
1
2016-05-10T22:36:31.000Z
2016-05-10T22:36:31.000Z
calvin/calvinsys/media/mediaplayer.py
josrolgil/exjobbCalvin
976459eaa50246586360c049b9880d753623d574
[ "Apache-2.0" ]
null
null
null
calvin/calvinsys/media/mediaplayer.py
josrolgil/exjobbCalvin
976459eaa50246586360c049b9880d753623d574
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2015 Ericsson AB # # 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 ...
24.510638
74
0.662326
# -*- coding: utf-8 -*- # Copyright (c) 2015 Ericsson AB # # 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 ...
46
0
27
c3b978c2d664237823d69dbf887cee9555ab595b
1,681
py
Python
setup.py
WarmongeR1/vulyk-pythondigest-moderator
57f06a151926c918b90dcea55b561800aa9ae7ad
[ "MIT" ]
null
null
null
setup.py
WarmongeR1/vulyk-pythondigest-moderator
57f06a151926c918b90dcea55b561800aa9ae7ad
[ "MIT" ]
null
null
null
setup.py
WarmongeR1/vulyk-pythondigest-moderator
57f06a151926c918b90dcea55b561800aa9ae7ad
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import uuid try: from setuptools import setup except ImportError: from distutils.core import setup from pip.req import parse_requirements with open('README.rst') as readme_file: readme = readme_file.read() install_reqs = parse_requirements('requirements.txt'...
30.563636
75
0.674004
#!/usr/bin/env python # -*- coding: utf-8 -*- import uuid try: from setuptools import setup except ImportError: from distutils.core import setup from pip.req import parse_requirements with open('README.rst') as readme_file: readme = readme_file.read() install_reqs = parse_requirements('requirements.txt'...
0
0
0
2415f9f082a7265abcaac7959a3414a55f67a982
30
py
Python
typereduction/typereduction/__init__.py
Haghrah/PyIT2FLS
ca2763032a4f441c3c4456570c18faa68cfee3e8
[ "MIT" ]
33
2019-01-06T19:33:15.000Z
2022-03-31T01:34:54.000Z
typereduction/typereduction/__init__.py
sirojkhuja/PyIT2FLS
ca2763032a4f441c3c4456570c18faa68cfee3e8
[ "MIT" ]
4
2020-04-10T10:43:06.000Z
2020-12-18T19:06:31.000Z
typereduction/typereduction/__init__.py
sirojkhuja/PyIT2FLS
ca2763032a4f441c3c4456570c18faa68cfee3e8
[ "MIT" ]
18
2019-10-13T05:09:15.000Z
2022-03-16T04:36:23.000Z
from .typereduction import *
15
29
0.766667
from .typereduction import *
0
0
0
b05f0e8fc33f8ea67be7ec8884f5ada4b6bd909d
1,342
py
Python
cogs/food.py
dave-kramer/atlasboy
7715e2a6e9385abc95a558b3a5bee885fbd584f9
[ "MIT" ]
null
null
null
cogs/food.py
dave-kramer/atlasboy
7715e2a6e9385abc95a558b3a5bee885fbd584f9
[ "MIT" ]
null
null
null
cogs/food.py
dave-kramer/atlasboy
7715e2a6e9385abc95a558b3a5bee885fbd584f9
[ "MIT" ]
1
2022-01-10T12:06:36.000Z
2022-01-10T12:06:36.000Z
import discord import datetime from discord.ext import commands from all import food_list # adding cog to bot setup
34.410256
158
0.593145
import discord import datetime from discord.ext import commands from all import food_list class Food(commands.Cog): def __init__(self, client): self.client = client description = 'Get information about a certain animal.' @commands.command(name='food') async def food(self, ct...
1,009
169
45
2fc00c26a120a51a29955dc0efcf39d03c6ca97b
88
py
Python
codes_auto/198.house-robber.py
smartmark-pro/leetcode_record
6504b733d892a705571eb4eac836fb10e94e56db
[ "MIT" ]
null
null
null
codes_auto/198.house-robber.py
smartmark-pro/leetcode_record
6504b733d892a705571eb4eac836fb10e94e56db
[ "MIT" ]
null
null
null
codes_auto/198.house-robber.py
smartmark-pro/leetcode_record
6504b733d892a705571eb4eac836fb10e94e56db
[ "MIT" ]
null
null
null
# # @lc app=leetcode.cn id=198 lang=python3 # # [198] house-robber # None # @lc code=end
12.571429
41
0.659091
# # @lc app=leetcode.cn id=198 lang=python3 # # [198] house-robber # None # @lc code=end
0
0
0
8acba6555ffdb28c6c615b0e3a53dc5e4cea65d7
1,142
py
Python
Easy/1351.CountNegativeNumbersinaSortedMatrix(nestedForOptimized).py
YuriSpiridonov/LeetCode
2dfcc9c71466ffa2ebc1c89e461ddfca92e2e781
[ "MIT" ]
39
2020-07-04T11:15:13.000Z
2022-02-04T22:33:42.000Z
Easy/1351.CountNegativeNumbersinaSortedMatrix(nestedForOptimized).py
YuriSpiridonov/LeetCode
2dfcc9c71466ffa2ebc1c89e461ddfca92e2e781
[ "MIT" ]
1
2020-07-15T11:53:37.000Z
2020-07-15T11:53:37.000Z
Easy/1351.CountNegativeNumbersinaSortedMatrix(nestedForOptimized).py
YuriSpiridonov/LeetCode
2dfcc9c71466ffa2ebc1c89e461ddfca92e2e781
[ "MIT" ]
20
2020-07-14T19:12:53.000Z
2022-03-02T06:28:17.000Z
""" Given a m * n matrix grid which is sorted in non-increasing order both row-wise and column-wise. Return the number of negative numbers in grid. Example: Input: grid = [[4,3,2,-1],[3,2,1,-1],[1,1,-1,-2],[-1,-1,-2,-3]] Output: 8 Explanation: There are 8 negatives number in the matri...
31.722222
117
0.568301
""" Given a m * n matrix grid which is sorted in non-increasing order both row-wise and column-wise. Return the number of negative numbers in grid. Example: Input: grid = [[4,3,2,-1],[3,2,1,-1],[1,1,-1,-2],[-1,-1,-2,-3]] Output: 8 Explanation: There are 8 negatives number in the matri...
299
-6
53
bdcd1d8e762346186023b2e80b7d8c3e9f1b81ab
19,254
py
Python
contract_analysis.py
jasonrubenstein18/MLB_FA
2221124f67ee52989ee23afea09bd03a5d741bfa
[ "MIT" ]
null
null
null
contract_analysis.py
jasonrubenstein18/MLB_FA
2221124f67ee52989ee23afea09bd03a5d741bfa
[ "MIT" ]
null
null
null
contract_analysis.py
jasonrubenstein18/MLB_FA
2221124f67ee52989ee23afea09bd03a5d741bfa
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np from statsmodels.formula.api import ols import plotly_express import plotly.graph_objs as go from plotly.subplots import make_subplots # Read in data batter_data = pd.read_csv("~/Desktop/MLB_FA/Data/fg_bat_data.csv") del batter_data['Age'] print(len(batter_data)) print(batter_dat...
42.786667
120
0.617067
import pandas as pd import numpy as np from statsmodels.formula.api import ols import plotly_express import plotly.graph_objs as go from plotly.subplots import make_subplots # Read in data batter_data = pd.read_csv("~/Desktop/MLB_FA/Data/fg_bat_data.csv") del batter_data['Age'] print(len(batter_data)) print(batter_dat...
9,010
-6
384
d954f7b42ca358b7dbc659d537a00af570ba25d9
5,010
py
Python
make_smaller_labse.py
jeongukjae/smaller-laBSE
104e4ff7f49a6c8490b3d55a4d32584fe356dcfb
[ "Apache-2.0" ]
8
2021-09-16T05:20:25.000Z
2022-01-27T14:31:12.000Z
make_smaller_labse.py
jeongukjae/smaller-laBSE
104e4ff7f49a6c8490b3d55a4d32584fe356dcfb
[ "Apache-2.0" ]
2
2021-11-29T03:37:13.000Z
2022-01-16T02:22:02.000Z
make_smaller_labse.py
jeongukjae/smaller-laBSE
104e4ff7f49a6c8490b3d55a4d32584fe356dcfb
[ "Apache-2.0" ]
null
null
null
import json import re import tensorflow as tf import tensorflow_text as text import tensorflow_hub as hub from official.nlp.modeling import networks from official.nlp.tools import export_tfhub_lib from absl import app, flags from tqdm import tqdm from save_as_weight_from_saved_model import create_model FLAGS = flags.F...
45.135135
145
0.706986
import json import re import tensorflow as tf import tensorflow_text as text import tensorflow_hub as hub from official.nlp.modeling import networks from official.nlp.tools import export_tfhub_lib from absl import app, flags from tqdm import tqdm from save_as_weight_from_saved_model import create_model FLAGS = flags.F...
4,463
0
23
e0b8c946f3ae2399ece9d0b144b42ca4fcc70a79
1,418
py
Python
udiskie/automount.py
LocutusOfBorg/udiskie
8aa85bb99d44fedc19ec584389072c264877e767
[ "MIT" ]
null
null
null
udiskie/automount.py
LocutusOfBorg/udiskie
8aa85bb99d44fedc19ec584389072c264877e767
[ "MIT" ]
null
null
null
udiskie/automount.py
LocutusOfBorg/udiskie
8aa85bb99d44fedc19ec584389072c264877e767
[ "MIT" ]
null
null
null
""" Automount utility. """ from __future__ import absolute_import from __future__ import unicode_literals __all__ = ['AutoMounter'] class AutoMounter(object): """ Automount utility. Being connected to the udiskie daemon, this component automatically mounts newly discovered external devices. Insta...
29.541667
78
0.67701
""" Automount utility. """ from __future__ import absolute_import from __future__ import unicode_literals __all__ = ['AutoMounter'] class AutoMounter(object): """ Automount utility. Being connected to the udiskie daemon, this component automatically mounts newly discovered external devices. Insta...
0
0
0
336f7119fef3ae8c7d6d862f56e69dfb371aa8cb
3,529
py
Python
beacon_api/conf/__init__.py
NBISweden/beacon-python
ba3499e3cedd4e38c105bb984f34d21098fe8a89
[ "Apache-2.0" ]
null
null
null
beacon_api/conf/__init__.py
NBISweden/beacon-python
ba3499e3cedd4e38c105bb984f34d21098fe8a89
[ "Apache-2.0" ]
2
2020-03-16T09:15:43.000Z
2020-03-18T10:19:57.000Z
beacon_api/conf/__init__.py
NBISweden/beacon-python
ba3499e3cedd4e38c105bb984f34d21098fe8a89
[ "Apache-2.0" ]
null
null
null
"""Beacon Python Application Configuration.""" import json import os from configparser import ConfigParser from collections import namedtuple from distutils.util import strtobool def parse_drspaths(paths): """Parse handover configuration.""" return [p.strip().split(',', 2) for p in paths.split('\n') if p.spl...
49.013889
126
0.68178
"""Beacon Python Application Configuration.""" import json import os from configparser import ConfigParser from collections import namedtuple from distutils.util import strtobool def parse_drspaths(paths): """Parse handover configuration.""" return [p.strip().split(',', 2) for p in paths.split('\n') if p.spl...
0
0
0
a5c41d43da681d116b4f43ec9796fc9ce75927a5
1,284
py
Python
features/eolearn/features/__init__.py
chorng/eo-learn
a1a3c6fa5568d398f5e43f5ad5aecdfeb05e8d3c
[ "MIT" ]
null
null
null
features/eolearn/features/__init__.py
chorng/eo-learn
a1a3c6fa5568d398f5e43f5ad5aecdfeb05e8d3c
[ "MIT" ]
null
null
null
features/eolearn/features/__init__.py
chorng/eo-learn
a1a3c6fa5568d398f5e43f5ad5aecdfeb05e8d3c
[ "MIT" ]
null
null
null
""" A collection of EOTasks for feature manipulation """ from .temporal_features import ( AddSpatioTemporalFeaturesTask, AddMaxMinTemporalIndicesTask, AddMaxMinNDVISlopeIndicesTask, ) from .interpolation import ( InterpolationTask, ResamplingTask, LinearInterpolationTask, CubicInterpolation...
26.75
78
0.804517
""" A collection of EOTasks for feature manipulation """ from .temporal_features import ( AddSpatioTemporalFeaturesTask, AddMaxMinTemporalIndicesTask, AddMaxMinNDVISlopeIndicesTask, ) from .interpolation import ( InterpolationTask, ResamplingTask, LinearInterpolationTask, CubicInterpolation...
0
0
0
5001577af8dc35e032efee53a918fe544b7fae4f
1,213
py
Python
tests/unit/test_app.py
openpermissions/identity-srv
97696413accfea052f4037a4291d8d4eed560cfb
[ "Apache-2.0" ]
2
2016-05-03T20:10:04.000Z
2019-05-20T01:41:33.000Z
tests/unit/test_app.py
openpermissions/identity-srv
97696413accfea052f4037a4291d8d4eed560cfb
[ "Apache-2.0" ]
1
2016-05-05T11:04:39.000Z
2016-05-05T11:04:39.000Z
tests/unit/test_app.py
openpermissions/identity-srv
97696413accfea052f4037a4291d8d4eed560cfb
[ "Apache-2.0" ]
1
2019-05-20T01:41:23.000Z
2019-05-20T01:41:23.000Z
# -*- coding: utf-8 -*- # Copyright 2016 Open Permissions Platform Coalition # 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 appl...
39.129032
107
0.736191
# -*- coding: utf-8 -*- # Copyright 2016 Open Permissions Platform Coalition # 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 appl...
340
0
22
0eae852bd2a693337e10c55e1d21fa970a3ffc88
1,441
py
Python
code/ner/search_hyperparams.py
miquelcanalesteve/mtextos2122
e400090575b9f23469cf5a071523b8dafec1c0cf
[ "CC-BY-4.0" ]
2
2022-03-07T13:47:36.000Z
2022-03-07T16:10:34.000Z
code/ner/search_hyperparams.py
gilbert98xD/mtextos2122
4811575134344c0bf255fa592c3b82efdb59d867
[ "CC-BY-4.0" ]
null
null
null
code/ner/search_hyperparams.py
gilbert98xD/mtextos2122
4811575134344c0bf255fa592c3b82efdb59d867
[ "CC-BY-4.0" ]
5
2022-02-09T15:13:31.000Z
2022-03-07T20:07:24.000Z
import argparse import os from subprocess import check_call import sys import utils PYTHON = sys.executable parser = argparse.ArgumentParser() parser.add_argument('--parent_dir', default='experiments/learning_rate', help='Directory containing params.json') parser.add_argument('--data_dir', defau...
31.326087
118
0.678001
import argparse import os from subprocess import check_call import sys import utils PYTHON = sys.executable parser = argparse.ArgumentParser() parser.add_argument('--parent_dir', default='experiments/learning_rate', help='Directory containing params.json') parser.add_argument('--data_dir', defau...
516
0
23
d6fddf2db0bee3c289868a82ca8d61a986ba48f7
1,595
py
Python
StarcorpServer/starcorp/data/enums.py
Jordan-Cottle/Game-Design-Capstone
89d23148e31400ecdf445a52ec1ad361b55c8dfb
[ "MIT" ]
1
2021-04-25T22:24:56.000Z
2021-04-25T22:24:56.000Z
StarcorpServer/starcorp/data/enums.py
Jordan-Cottle/Game-Design-Capstone
89d23148e31400ecdf445a52ec1ad361b55c8dfb
[ "MIT" ]
29
2020-10-17T23:20:08.000Z
2021-04-27T17:29:42.000Z
StarcorpServer/starcorp/data/enums.py
Jordan-Cottle/Game-Design-Capstone
89d23148e31400ecdf445a52ec1ad361b55c8dfb
[ "MIT" ]
1
2020-12-16T02:02:25.000Z
2020-12-16T02:02:25.000Z
""" Module for enums and constants. """ from enum import Enum class TileType(str, Enum): """Enum for types of tiles in the world. These types represent types of planetary surfaces. """ SPACE = " " LUSH = "L" ARID = "D" AQUATIC = "W" SOLAR = "*" class Resource(str, Enum): """En...
21.554054
88
0.636991
""" Module for enums and constants. """ from enum import Enum class TileType(str, Enum): """Enum for types of tiles in the world. These types represent types of planetary surfaces. """ SPACE = " " LUSH = "L" ARID = "D" AQUATIC = "W" SOLAR = "*" def __str__(self) -> str: ...
35
0
27
f5f9825d02f03902cb1bb9ded49a61a7434a47a1
4,451
py
Python
scripts/typing-summary.py
AlexWaygood/typing
4bdf0db49dda83a00dfb5f7e45c96e89bc0e0c8a
[ "PSF-2.0" ]
1,145
2016-01-23T00:30:39.000Z
2022-03-31T23:56:30.000Z
scripts/typing-summary.py
ConnectionMaster/typing
eeb29ad833f992ea9f2f29b32723c05586cd0aec
[ "PSF-2.0" ]
753
2016-01-23T05:04:33.000Z
2022-03-26T16:12:23.000Z
scripts/typing-summary.py
ConnectionMaster/typing
eeb29ad833f992ea9f2f29b32723c05586cd0aec
[ "PSF-2.0" ]
212
2016-01-23T00:22:21.000Z
2022-03-28T07:28:56.000Z
#!/usr/bin/env python3 """ Generate a summary of last week's issues tagged with "topic: feature". The summary will include a list of new and changed issues and is sent each Monday at 0200 CE(S)T to the typing-sig mailing list. Due to limitation with GitHub Actions, the mail is sent from a private server, currently ma...
30.696552
87
0.609077
#!/usr/bin/env python3 """ Generate a summary of last week's issues tagged with "topic: feature". The summary will include a list of new and changed issues and is sent each Monday at 0200 CE(S)T to the typing-sig mailing list. Due to limitation with GitHub Actions, the mail is sent from a private server, currently ma...
2,856
111
183
e48bf20cf883731702d751263a82fffcb2392a41
360
py
Python
ExamenDeFundamentosDeP/Examen3.py
Sharnol-Tec/Examen
fc859c5a56cf9e550e903296eecdb53b42ec9b2f
[ "Apache-2.0" ]
null
null
null
ExamenDeFundamentosDeP/Examen3.py
Sharnol-Tec/Examen
fc859c5a56cf9e550e903296eecdb53b42ec9b2f
[ "Apache-2.0" ]
null
null
null
ExamenDeFundamentosDeP/Examen3.py
Sharnol-Tec/Examen
fc859c5a56cf9e550e903296eecdb53b42ec9b2f
[ "Apache-2.0" ]
null
null
null
#Datosdeentrada print("Ingrese el Sexo (H/M):") sexo = input() print("Ingrese la EdadSLLB:") #proceso edad = int(input()) if edad>=70: print("la vacuna es de tipo C") if sexo=="H": edad>=16 and edad<=69 print("la vacuna es de tipo A") if sexo=="M": edad>=16 and edad<=69 print("la vacuna es de tipo B") if edad...
21.176471
33
0.644444
#Datosdeentrada print("Ingrese el Sexo (H/M):") sexo = input() print("Ingrese la EdadSLLB:") #proceso edad = int(input()) if edad>=70: print("la vacuna es de tipo C") if sexo=="H": edad>=16 and edad<=69 print("la vacuna es de tipo A") if sexo=="M": edad>=16 and edad<=69 print("la vacuna es de tipo B") if edad...
0
0
0
d9c93d9c834c1e96c514e0911c1435237b1ee758
210
py
Python
records/12-24/asda2.py
AaronYang2333/CSCI_570
03e34ce5ff192fc94612bc3afb51dcab3e854462
[ "Apache-2.0" ]
36
2020-07-25T00:13:25.000Z
2022-02-28T17:48:15.000Z
records/12-24/asda2.py
AaronYang2333/LeetCode
03e34ce5ff192fc94612bc3afb51dcab3e854462
[ "Apache-2.0" ]
6
2020-06-06T04:39:37.000Z
2021-04-03T01:45:39.000Z
records/12-24/asda2.py
AaronYang2333/LeetCode
03e34ce5ff192fc94612bc3afb51dcab3e854462
[ "Apache-2.0" ]
16
2020-12-16T02:38:16.000Z
2022-02-28T17:48:16.000Z
__author__ = 'Aaron Yang' __email__ = 'byang971@usc.edu' __date__ = '12/24/2020 10:01 PM' func1()
13.125
32
0.595238
__author__ = 'Aaron Yang' __email__ = 'byang971@usc.edu' __date__ = '12/24/2020 10:01 PM' def func1(): res = 0 def inner_func(num): res = num * num inner_func(2) print(res) func1()
87
0
23
a602c1f9b589b4c4a1cf2da7812b6dcafe30b9a7
8,693
py
Python
src/AST_CIL.py
ezielramos/cool-compiler-2021
e5b2aa51e47296b21f8b1ea14d73b1c7e7ef0785
[ "MIT" ]
null
null
null
src/AST_CIL.py
ezielramos/cool-compiler-2021
e5b2aa51e47296b21f8b1ea14d73b1c7e7ef0785
[ "MIT" ]
null
null
null
src/AST_CIL.py
ezielramos/cool-compiler-2021
e5b2aa51e47296b21f8b1ea14d73b1c7e7ef0785
[ "MIT" ]
null
null
null
# class Array(Instruction): # def __init__(self, dest, src): # self.dest = dest # self.src = src
28.132686
105
0.608075
class Node: pass class Program(Node): def __init__(self): self.type_section = [] self.data_section = {} #data[string] = tag self.code_section = [] class Type(Node): def __init__(self, name): self.name = name self.attributes = [] self.methods = {} def to_...
5,400
225
2,943
7ff47fcb388c190dbb61a358ededdbdb2e74bd85
2,342
py
Python
oscar/apps/analytics/reports.py
owad/django-oscar
cfa69e37dc9abc97a7aff5c8616da319e1771008
[ "BSD-3-Clause" ]
1
2022-03-17T19:26:13.000Z
2022-03-17T19:26:13.000Z
oscar/apps/analytics/reports.py
aykut/django-oscar
ca3629e74ea1e0affc55d3de4e97f523e352d267
[ "BSD-3-Clause" ]
null
null
null
oscar/apps/analytics/reports.py
aykut/django-oscar
ca3629e74ea1e0affc55d3de4e97f523e352d267
[ "BSD-3-Clause" ]
1
2019-03-23T10:26:02.000Z
2019-03-23T10:26:02.000Z
import csv from oscar.core.loading import import_module report_classes = import_module('reports.reports', ['ReportGenerator']) analytics_models = import_module('analytics.models', ['ProductRecord', 'UserRecord'])
35.484848
110
0.592656
import csv from oscar.core.loading import import_module report_classes = import_module('reports.reports', ['ReportGenerator']) analytics_models = import_module('analytics.models', ['ProductRecord', 'UserRecord']) class ProductReportGenerator(report_classes.ReportGenerator): filename_template = 'product-anal...
1,563
514
46
8a232162accbd0015bca70451a06b84904de5c85
4,024
py
Python
klayout_dot_config/tech/EBeam/pymacros/pcells_EBeam_Beta/strip_to_slot.py
blin016/SiEPIC_EBeam_PDK
5a04fd95c8a2428c992a69c1c49a59593dc40a06
[ "MIT" ]
null
null
null
klayout_dot_config/tech/EBeam/pymacros/pcells_EBeam_Beta/strip_to_slot.py
blin016/SiEPIC_EBeam_PDK
5a04fd95c8a2428c992a69c1c49a59593dc40a06
[ "MIT" ]
null
null
null
klayout_dot_config/tech/EBeam/pymacros/pcells_EBeam_Beta/strip_to_slot.py
blin016/SiEPIC_EBeam_PDK
5a04fd95c8a2428c992a69c1c49a59593dc40a06
[ "MIT" ]
null
null
null
from . import * class strip_to_slot(pya.PCellDeclarationHelper): """ The PCell declaration for the strip_to_slot. draft by Lukas Chrostowski july 24, 2017 based on https://www.osapublishing.org/oe/fulltext.cfm?uri=oe-21-16-19029&id=259920 """
37.607477
189
0.641899
from . import * class strip_to_slot(pya.PCellDeclarationHelper): """ The PCell declaration for the strip_to_slot. draft by Lukas Chrostowski july 24, 2017 based on https://www.osapublishing.org/oe/fulltext.cfm?uri=oe-21-16-19029&id=259920 """ def __init__(self): # Important: initialize the super clas...
3,666
0
104
b232195f232cbfca4bc3c83f43eb190a4d6c0531
31
py
Python
SeleniumPythonFramework/selenium_framework/page_objects/generic_helpers/error_strings.py
darrenudaiyan/SeleniumPythonFramework
e22b0ad17196e337018c397750035154c6404957
[ "MIT" ]
null
null
null
SeleniumPythonFramework/selenium_framework/page_objects/generic_helpers/error_strings.py
darrenudaiyan/SeleniumPythonFramework
e22b0ad17196e337018c397750035154c6404957
[ "MIT" ]
null
null
null
SeleniumPythonFramework/selenium_framework/page_objects/generic_helpers/error_strings.py
darrenudaiyan/SeleniumPythonFramework
e22b0ad17196e337018c397750035154c6404957
[ "MIT" ]
null
null
null
URL_is_Null = "The URL is null"
31
31
0.741935
URL_is_Null = "The URL is null"
0
0
0
0087d396d5fe0e8ad5d5787b6e02942ba873900f
1,523
py
Python
scripts/Pre_processing.py
Vancouver-Datajam/automated-fitness-tracker
888444f39507f980b37a878519671e5e5c3598d1
[ "MIT" ]
null
null
null
scripts/Pre_processing.py
Vancouver-Datajam/automated-fitness-tracker
888444f39507f980b37a878519671e5e5c3598d1
[ "MIT" ]
1
2021-09-26T00:46:14.000Z
2021-09-26T00:46:14.000Z
scripts/Pre_processing.py
Vancouver-Datajam/python-computer-vision
888444f39507f980b37a878519671e5e5c3598d1
[ "MIT" ]
1
2021-09-29T20:37:14.000Z
2021-09-29T20:37:14.000Z
import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns # check and return missing values in each features in the dataframe def missing_statistics(df): """ This function check and return missing values in each features for a dataframe Parameters ---------- ...
28.735849
100
0.601445
import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns def Pre_process(df): df_c = df.copy() df_c['y23_const'] = df_c['y23'] df_c['z23_const'] = df_c['z23'] df_c['y24_const'] = df_c['y24'] df_c['z24_const'] = df_c['z24'] #normalize the y and...
771
0
23
c42aa82da114142a8ecb4d7031c1dab90cea485c
1,719
py
Python
yolo_v3/yolo-test.py
akshath/image_classification_kit_keras
c6c593d582e39c2c110326e4955e6c751be075a5
[ "Apache-2.0" ]
null
null
null
yolo_v3/yolo-test.py
akshath/image_classification_kit_keras
c6c593d582e39c2c110326e4955e6c751be075a5
[ "Apache-2.0" ]
null
null
null
yolo_v3/yolo-test.py
akshath/image_classification_kit_keras
c6c593d582e39c2c110326e4955e6c751be075a5
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # In[1]: import cv2 import numpy as np from PIL import Image import matplotlib.pyplot as plt import YoloHelper # In[2]: yolo_net, yolo_output_layers, yolo_classes = YoloHelper.load_yolo('yolov3.weights','yolov3.cfg', 'coco.names') # In[3]: img = cv2.imread('test-image....
12.828358
110
0.70797
#!/usr/bin/env python # coding: utf-8 # In[1]: import cv2 import numpy as np from PIL import Image import matplotlib.pyplot as plt import YoloHelper # In[2]: yolo_net, yolo_output_layers, yolo_classes = YoloHelper.load_yolo('yolov3.weights','yolov3.cfg', 'coco.names') # In[3]: img = cv2.imread('test-image....
0
0
0
b51b76291e48833ac2802d1fe5e96e9e5ba66f50
1,190
py
Python
fit-calculator/fitness.py
SilvaMatteus/IAsperathos-plugin
f295678044e0e67c932acf4596243a05f2cd48fe
[ "MIT" ]
null
null
null
fit-calculator/fitness.py
SilvaMatteus/IAsperathos-plugin
f295678044e0e67c932acf4596243a05f2cd48fe
[ "MIT" ]
5
2018-08-02T22:13:45.000Z
2018-08-03T20:11:56.000Z
fit-calculator/fitness.py
SilvaMatteus/IAsperathos-plugin
f295678044e0e67c932acf4596243a05f2cd48fe
[ "MIT" ]
null
null
null
from PIL import Image, ImageDraw from skimage.measure import compare_ssim as ssim from numpy import array from pickle import loads from flask import Flask, request from os import path import genetic.individual import json from base64 import b64decode image_path = '/home/ubuntu/image.jpg' individual_path = '/home/ubunt...
25.319149
70
0.706723
from PIL import Image, ImageDraw from skimage.measure import compare_ssim as ssim from numpy import array from pickle import loads from flask import Flask, request from os import path import genetic.individual import json from base64 import b64decode image_path = '/home/ubuntu/image.jpg' individual_path = '/home/ubunt...
616
0
68
460a0c9c97d29ab82d0d586bf68009e53a143e4f
1,436
py
Python
12-managing-access/solution/my-site/my_site/deposit/views.py
mvidalgarcia/training
56c7d62d0b66538d4bfb104eb651222d099436d5
[ "MIT" ]
34
2019-03-16T18:54:53.000Z
2022-03-17T08:05:17.000Z
12-managing-access/solution/my-site/my_site/deposit/views.py
mvidalgarcia/training
56c7d62d0b66538d4bfb104eb651222d099436d5
[ "MIT" ]
59
2019-03-18T11:46:57.000Z
2022-03-04T15:01:08.000Z
12-managing-access/solution/my-site/my_site/deposit/views.py
mvidalgarcia/training
56c7d62d0b66538d4bfb104eb651222d099436d5
[ "MIT" ]
42
2019-03-12T08:33:56.000Z
2022-03-17T08:05:21.000Z
"""Views for deposit of records.""" from __future__ import absolute_import, print_function from flask import Blueprint, redirect, render_template, url_for from flask_login import login_required from flask_security import current_user from .forms import RecordForm from .api import create_record # define a new Flask...
28.156863
75
0.681058
"""Views for deposit of records.""" from __future__ import absolute_import, print_function from flask import Blueprint, redirect, render_template, url_for from flask_login import login_required from flask_security import current_user from .forms import RecordForm from .api import create_record # define a new Flask...
0
0
0
a235ef57e8c2fabbd3cffd97687b74c965ffa5c3
2,036
py
Python
skills_taxonomy/pipeline/name_clusters.py
Jack-0-0/skills_taxonomy
067c5e9c94482fe6864809b5b653be76ce09c98b
[ "MIT" ]
null
null
null
skills_taxonomy/pipeline/name_clusters.py
Jack-0-0/skills_taxonomy
067c5e9c94482fe6864809b5b653be76ce09c98b
[ "MIT" ]
19
2021-05-11T09:22:32.000Z
2021-07-08T13:40:23.000Z
skills_taxonomy/pipeline/name_clusters.py
Jack-0-0/skills_taxonomy
067c5e9c94482fe6864809b5b653be76ce09c98b
[ "MIT" ]
null
null
null
from skills_taxonomy import PROJECT_DIR from pprint import pprint from skills_taxonomy.utils.json_management import load_json, save_json def input_name(class_id, informative_words): """Print most informative words, and then ask for user input to assign a suitable name. Args: class_id(str): id for...
32.31746
91
0.684676
from skills_taxonomy import PROJECT_DIR from pprint import pprint from skills_taxonomy.utils.json_management import load_json, save_json def input_name(class_id, informative_words): """Print most informative words, and then ask for user input to assign a suitable name. Args: class_id(str): id for...
0
0
0
1b706385f591e44f2d22dab5151c26b066ea0f56
2,090
py
Python
madoka/dataflow/empty.py
korepwx/madoka
56675bd8220935c6a9c1571a886a84bed235fd3b
[ "MIT" ]
null
null
null
madoka/dataflow/empty.py
korepwx/madoka
56675bd8220935c6a9c1571a886a84bed235fd3b
[ "MIT" ]
null
null
null
madoka/dataflow/empty.py
korepwx/madoka
56675bd8220935c6a9c1571a886a84bed235fd3b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import numpy as np from .base import DataFlow __all__ = [] class _EmptyDataFlow(DataFlow): """Empty data flow. This class is useful when constructing a data flow by merging sources from other data flows. """ @property @property @property @property @p...
23.222222
76
0.635407
# -*- coding: utf-8 -*- import numpy as np from .base import DataFlow __all__ = [] class _EmptyDataFlow(DataFlow): """Empty data flow. This class is useful when constructing a data flow by merging sources from other data flows. """ @property def input_flows(self): return () @p...
1,197
0
480
cec396c860ec6422ee3b75ec5421af32c825768d
512
py
Python
spirit/app.py
Jroc561/Spirit-Recommender
b9a3591656d062d0fb1e1848733ca9965dcb9b6c
[ "MIT" ]
null
null
null
spirit/app.py
Jroc561/Spirit-Recommender
b9a3591656d062d0fb1e1848733ca9965dcb9b6c
[ "MIT" ]
null
null
null
spirit/app.py
Jroc561/Spirit-Recommender
b9a3591656d062d0fb1e1848733ca9965dcb9b6c
[ "MIT" ]
null
null
null
from os import getenv import json from flask import Flask, render_template, request, jsonify from flask_mongoengine import MongoEngine from flask_pymongo import PyMongo from pymongo import MongoClient
21.333333
62
0.683594
from os import getenv import json from flask import Flask, render_template, request, jsonify from flask_mongoengine import MongoEngine from flask_pymongo import PyMongo from pymongo import MongoClient def create_app(): app = Flask(__name__) app.config["MONGO_URI"] = getenv('MONGO_URI') mongo = PyMon...
288
0
23
cc2c06a53250e13adccd181f1d76724efbe953aa
3,231
py
Python
eval_lfw.py
smarsu/mtcnn
98c3839e250b18c310efa920bc6289a70379f07d
[ "MIT" ]
null
null
null
eval_lfw.py
smarsu/mtcnn
98c3839e250b18c310efa920bc6289a70379f07d
[ "MIT" ]
null
null
null
eval_lfw.py
smarsu/mtcnn
98c3839e250b18c310efa920bc6289a70379f07d
[ "MIT" ]
null
null
null
# -------------------------------------------------------- # MTCNN # Licensed under The MIT License [see LICENSE for details] # Copyright 2019 smarsu. All Rights Reserved. # -------------------------------------------------------- import os.path as osp import cv2 import numpy as np from mtcnn import PNet, RNet, ONet...
31.067308
85
0.614051
# -------------------------------------------------------- # MTCNN # Licensed under The MIT License [see LICENSE for details] # Copyright 2019 smarsu. All Rights Reserved. # -------------------------------------------------------- import os.path as osp import cv2 import numpy as np from mtcnn import PNet, RNet, ONet...
733
0
23
adbbf8d71d24cd5e30afdac39663e659b2ca63d6
1,251
py
Python
crafters/nlp/JiebaSegmenter/__init__.py
carlosb1/jina-hub
f298d0f136c8627dd720d7a4e3eb9031655f5ccb
[ "Apache-2.0" ]
1
2022-03-01T12:43:17.000Z
2022-03-01T12:43:17.000Z
crafters/nlp/JiebaSegmenter/__init__.py
carlosb1/jina-hub
f298d0f136c8627dd720d7a4e3eb9031655f5ccb
[ "Apache-2.0" ]
null
null
null
crafters/nlp/JiebaSegmenter/__init__.py
carlosb1/jina-hub
f298d0f136c8627dd720d7a4e3eb9031655f5ccb
[ "Apache-2.0" ]
null
null
null
from typing import Dict, List from jina.executors.crafters import BaseSegmenter class JiebaSegmenter(BaseSegmenter): """ :class:`JiebaSegmenter` split the chinese text on the doc-level into words on the chunk-level with `jieba`. """ def __init__(self, mode: str = 'accurate', *args, **kwargs): ...
30.512195
111
0.576339
from typing import Dict, List from jina.executors.crafters import BaseSegmenter class JiebaSegmenter(BaseSegmenter): """ :class:`JiebaSegmenter` split the chinese text on the doc-level into words on the chunk-level with `jieba`. """ def __init__(self, mode: str = 'accurate', *args, **kwargs): ...
0
0
0
7683f73bdce9ad4b92a4f2bedeacc9e5903b06ea
10,290
py
Python
prepare_phosphomatics_ct.py
mgleeming/phosphomatics_PD_node
c64dee62aea3d6c5f768f7590c3dd958a156fd62
[ "BSD-3-Clause" ]
null
null
null
prepare_phosphomatics_ct.py
mgleeming/phosphomatics_PD_node
c64dee62aea3d6c5f768f7590c3dd958a156fd62
[ "BSD-3-Clause" ]
null
null
null
prepare_phosphomatics_ct.py
mgleeming/phosphomatics_PD_node
c64dee62aea3d6c5f768f7590c3dd958a156fd62
[ "BSD-3-Clause" ]
null
null
null
# ----------------------------------------------------------------------- # Use Case 2 # ----------------------------------------------------------------------- import sys import csv import scriptutils import traceback if __name__ == "__main__": try: assert (len(sys.argv) == 2), \ "Script requ...
37.418182
137
0.570068
# ----------------------------------------------------------------------- # Use Case 2 # ----------------------------------------------------------------------- import sys import csv import scriptutils import traceback class UC2(object): # node_response.json template nodeResponseTemplate = ''' { ...
7,563
1,954
23
8a799bcc56743ba6d80209189e374812f55ff15b
15,235
py
Python
Lib/ssl.py
certik/python2.6
3b8ab0cdb83bea160b2c5e11c620ffd1bdf04a59
[ "PSF-2.0" ]
4
2015-12-07T13:37:48.000Z
2021-03-24T16:27:52.000Z
Lib/ssl.py
certik/python2.6
3b8ab0cdb83bea160b2c5e11c620ffd1bdf04a59
[ "PSF-2.0" ]
null
null
null
Lib/ssl.py
certik/python2.6
3b8ab0cdb83bea160b2c5e11c620ffd1bdf04a59
[ "PSF-2.0" ]
null
null
null
# Wrapper module for _ssl, providing some additional facilities # implemented in Python. Written by Bill Janssen. """\ This module provides some more Pythonic support for SSL. Object types: SSLSocket -- subtype of socket.socket which does SSL over the socket Exceptions: SSLError -- exception raised for I/O er...
34.546485
118
0.594815
# Wrapper module for _ssl, providing some additional facilities # implemented in Python. Written by Bill Janssen. """\ This module provides some more Pythonic support for SSL. Object types: SSLSocket -- subtype of socket.socket which does SSL over the socket Exceptions: SSLError -- exception raised for I/O er...
6,805
0
397
0ca5ad5a54f7358fbe3645e43301b998f994beea
9,477
py
Python
src/myrl/agents/dqn.py
erwanlecarpentier/myrl
f123ccbae9099f2f02f63f50ff967665674f6602
[ "MIT" ]
null
null
null
src/myrl/agents/dqn.py
erwanlecarpentier/myrl
f123ccbae9099f2f02f63f50ff967665674f6602
[ "MIT" ]
null
null
null
src/myrl/agents/dqn.py
erwanlecarpentier/myrl
f123ccbae9099f2f02f63f50ff967665674f6602
[ "MIT" ]
null
null
null
import random import torch import collections from myrl.agents.agent import Agent from myrl.utils.memory import ReplayMemory from myrl.models import FullyConnectedNet, get_optimizer from myrl.utils.save import net_directory, get_filename
41.748899
123
0.620027
import random import torch import collections from myrl.agents.agent import Agent from myrl.utils.memory import ReplayMemory from myrl.models import FullyConnectedNet, get_optimizer from myrl.utils.save import net_directory, get_filename class DQN(Agent): def __init__(self, name, env_name, state_dimension, acti...
3,611
5,603
23
ac84e461846fdbe9e15ffb8a33ac7872b8a358f6
3,089
py
Python
tfsnippet/preprocessing/samplers.py
897615138/tfsnippet-jill
2fc898a4def866c8d3c685168df1fa22083bb143
[ "MIT" ]
null
null
null
tfsnippet/preprocessing/samplers.py
897615138/tfsnippet-jill
2fc898a4def866c8d3c685168df1fa22083bb143
[ "MIT" ]
null
null
null
tfsnippet/preprocessing/samplers.py
897615138/tfsnippet-jill
2fc898a4def866c8d3c685168df1fa22083bb143
[ "MIT" ]
null
null
null
import numpy as np from tfsnippet.dataflow import DataMapper __all__ = ['BaseSampler', 'BernoulliSampler', 'UniformNoiseSampler'] class BaseSampler(DataMapper): """Base class for samplers.""" def sample(self, x): """ Sample array according to `x`. Args: x (np.ndarray): ...
30.584158
80
0.61541
import numpy as np from tfsnippet.dataflow import DataMapper __all__ = ['BaseSampler', 'BernoulliSampler', 'UniformNoiseSampler'] class BaseSampler(DataMapper): """Base class for samplers.""" def sample(self, x): """ Sample array according to `x`. Args: x (np.ndarray): ...
406
0
81
d9d78c44153758f05c078ed00a29da25c6100d10
1,592
py
Python
checkov/terraform/checks/resource/gcp/GKENetworkPolicyEnabled.py
vangundy-jason-pfg/checkov
2fb50908f62390c98dda665f1fa94fe24806b654
[ "Apache-2.0" ]
1
2021-02-13T15:24:42.000Z
2021-02-13T15:24:42.000Z
checkov/terraform/checks/resource/gcp/GKENetworkPolicyEnabled.py
vangundy-jason-pfg/checkov
2fb50908f62390c98dda665f1fa94fe24806b654
[ "Apache-2.0" ]
7
2021-04-12T06:54:07.000Z
2022-03-21T14:04:14.000Z
checkov/terraform/checks/resource/gcp/GKENetworkPolicyEnabled.py
vangundy-jason-pfg/checkov
2fb50908f62390c98dda665f1fa94fe24806b654
[ "Apache-2.0" ]
1
2021-12-16T03:09:55.000Z
2021-12-16T03:09:55.000Z
from checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck from checkov.common.models.enums import CheckResult, CheckCategories check = GKENetworkPolicyEnabled()
40.820513
106
0.686558
from checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck from checkov.common.models.enums import CheckResult, CheckCategories class GKENetworkPolicyEnabled(BaseResourceValueCheck): def __init__(self): name = "Ensure Network Policy is enabled on Kubernetes Engine Clust...
371
997
23
cb52447aea68112909b65e9aeb941d96041e4d18
575
py
Python
pastebin/users/viewsets.py
amirasaad/pastebin
dba0617337a61646cba3bed7f35f4afa1618a49e
[ "MIT" ]
null
null
null
pastebin/users/viewsets.py
amirasaad/pastebin
dba0617337a61646cba3bed7f35f4afa1618a49e
[ "MIT" ]
192
2020-01-07T12:10:04.000Z
2022-03-27T17:32:32.000Z
pastebin/users/viewsets.py
amirasaad/pastebin
dba0617337a61646cba3bed7f35f4afa1618a49e
[ "MIT" ]
null
null
null
from django.contrib.auth import get_user_model from rest_framework import filters from rest_framework.viewsets import ModelViewSet from pastebin.users.permissions import IsAuthenticatedOrCreate from pastebin.users.serializers import UserSerializer User = get_user_model()
31.944444
62
0.786087
from django.contrib.auth import get_user_model from rest_framework import filters from rest_framework.viewsets import ModelViewSet from pastebin.users.permissions import IsAuthenticatedOrCreate from pastebin.users.serializers import UserSerializer User = get_user_model() class UsersViewSet(ModelViewSet): querys...
0
277
23
dc49accfe2c0c6b668d4115b95e1fafba7659ad4
645
py
Python
migrations/versions/fbfec56d097e_.py
VikTymZ/pegelinux
bd274aebf8606da5217e0ee7653cf0dd8db4c10a
[ "MIT" ]
11
2018-06-29T01:48:05.000Z
2021-01-13T19:56:02.000Z
migrations/versions/fbfec56d097e_.py
VikTymZ/pegelinux
bd274aebf8606da5217e0ee7653cf0dd8db4c10a
[ "MIT" ]
237
2018-07-01T05:18:03.000Z
2022-02-12T10:32:50.000Z
migrations/versions/fbfec56d097e_.py
VikTymZ/pegelinux
bd274aebf8606da5217e0ee7653cf0dd8db4c10a
[ "MIT" ]
9
2018-06-30T12:10:28.000Z
2019-10-22T10:42:43.000Z
"""empty message Revision ID: fbfec56d097e Revises: 3b1f45ed96c7 Create Date: 2018-06-27 10:04:50.000959 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "fbfec56d097e" down_revision = "3b1f45ed96c7" branch_labels = None depends_on = None
22.241379
74
0.686822
"""empty message Revision ID: fbfec56d097e Revises: 3b1f45ed96c7 Create Date: 2018-06-27 10:04:50.000959 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "fbfec56d097e" down_revision = "3b1f45ed96c7" branch_labels = None depends_on = None def upgrade(): # ...
300
0
46
7efbf8047ae9e8b3f47852ce76fc2f1a09ab542c
1,959
py
Python
CIM16/CDPSM/Balanced/IEC61970/Wires/PhaseTapChangerSymetrical.py
MaximeBaudette/PyCIM
d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14
[ "MIT" ]
null
null
null
CIM16/CDPSM/Balanced/IEC61970/Wires/PhaseTapChangerSymetrical.py
MaximeBaudette/PyCIM
d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14
[ "MIT" ]
null
null
null
CIM16/CDPSM/Balanced/IEC61970/Wires/PhaseTapChangerSymetrical.py
MaximeBaudette/PyCIM
d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14
[ "MIT" ]
1
2021-04-02T18:04:49.000Z
2021-04-02T18:04:49.000Z
# Copyright (C) 2010-2011 Richard Lincoln # # 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...
48.975
386
0.757529
# Copyright (C) 2010-2011 Richard Lincoln # # 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...
0
0
0
4e1280a6687983484caf83bbb0ed9ee34b09a2e1
3,121
py
Python
echem_FCVSsurfacearea.py
johnmgregoire/JCAPdatavis
6d77a510e00acf31de9665828d27ea33aba6ab78
[ "BSD-3-Clause" ]
null
null
null
echem_FCVSsurfacearea.py
johnmgregoire/JCAPdatavis
6d77a510e00acf31de9665828d27ea33aba6ab78
[ "BSD-3-Clause" ]
null
null
null
echem_FCVSsurfacearea.py
johnmgregoire/JCAPdatavis
6d77a510e00acf31de9665828d27ea33aba6ab78
[ "BSD-3-Clause" ]
null
null
null
import numpy, scipy from matplotlib.ticker import FuncFormatter import matplotlib.colors as colors from echem_plate_math import * import time, pickle from echem_plate_fcns import * p='C:/Users/Public/Documents/EchemDropAnalyzedData/FCVdata/20130523 NiFeCoCe_3V_FCV_4835/Sample4825_x60_y65_A33B23C3D40_FCVS7.txt' p2='C:...
30.009615
131
0.687921
import numpy, scipy from matplotlib.ticker import FuncFormatter import matplotlib.colors as colors from echem_plate_math import * import time, pickle from echem_plate_fcns import * p='C:/Users/Public/Documents/EchemDropAnalyzedData/FCVdata/20130523 NiFeCoCe_3V_FCV_4835/Sample4825_x60_y65_A33B23C3D40_FCVS7.txt' p2='C:...
0
0
0
25daaad0b9b9e4b4d6a8dcf63ee7b341525484e9
46
py
Python
tests/basic/lambda2.py
Fryguy/py2rb
0d2fbc5a86b82707a1d83241a21af6b2cc22c0b8
[ "MIT" ]
124
2017-08-19T05:37:16.000Z
2022-03-08T18:24:18.000Z
tests/basic/lambda2.py
JeMaMokuma/py2rb
0d2fbc5a86b82707a1d83241a21af6b2cc22c0b8
[ "MIT" ]
15
2017-12-16T05:59:31.000Z
2022-02-08T02:51:17.000Z
tests/basic/lambda2.py
JeMaMokuma/py2rb
0d2fbc5a86b82707a1d83241a21af6b2cc22c0b8
[ "MIT" ]
18
2017-09-25T11:57:04.000Z
2022-02-19T17:33:48.000Z
l = lambda *x: print("%s %s %s" % x) l(1,2,3)
15.333333
36
0.456522
l = lambda *x: print("%s %s %s" % x) l(1,2,3)
0
0
0
0c99b38a81039e06395d7643a6fcb817fd74313d
595
py
Python
products/models.py
BassamMismar/store-django
c614459c38c20d8caebf15fad9e054091c8e88ba
[ "MIT" ]
null
null
null
products/models.py
BassamMismar/store-django
c614459c38c20d8caebf15fad9e054091c8e88ba
[ "MIT" ]
7
2021-03-30T13:50:45.000Z
2022-01-13T03:04:12.000Z
products/models.py
bassamaljeed/store-django
c614459c38c20d8caebf15fad9e054091c8e88ba
[ "MIT" ]
null
null
null
from django.db import models from django.urls import reverse # Create your models here.
29.75
63
0.719328
from django.db import models from django.urls import reverse # Create your models here. class Product(models.Model): brand = models.CharField(max_length=100) title = models.CharField(max_length=100) description = models.TextField(max_length=500) price = models.PositiveIntegerField() created_at = m...
88
395
23
33f70917e72e8b385328fb32e7b1257a7d657ba1
86,219
py
Python
nova/api/openstack/wsgi.py
bopopescu/nova-token
ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2
[ "Apache-2.0" ]
null
null
null
nova/api/openstack/wsgi.py
bopopescu/nova-token
ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2
[ "Apache-2.0" ]
null
null
null
nova/api/openstack/wsgi.py
bopopescu/nova-token
ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2
[ "Apache-2.0" ]
2
2017-07-20T17:31:34.000Z
2020-07-24T02:42:19.000Z
begin_unit comment|'# Copyright 2013 IBM Corp.' nl|'\n' comment|'# Copyright 2011 OpenStack Foundation' nl|'\n' comment|'# All Rights Reserved.' nl|'\n' comment|'#' nl|'\n' comment|'# Licensed under the Apache License, Version 2.0 (the "License"); you may' nl|'\n' comment|'# not use this file except in compliance...
13.931007
727
0.603765
begin_unit comment|'# Copyright 2013 IBM Corp.' nl|'\n' comment|'# Copyright 2011 OpenStack Foundation' nl|'\n' comment|'# All Rights Reserved.' nl|'\n' comment|'#' nl|'\n' comment|'# Licensed under the Apache License, Version 2.0 (the "License"); you may' nl|'\n' comment|'# not use this file except in compliance...
0
0
0
5aa7fa3e1877693aeecf9e1ceccbfa29eb2b7901
3,627
py
Python
Examples/Qmod_basic_features.py
Mv77/Q_Investment
5d570940311ef5823f457e31d02122960b573d19
[ "MIT" ]
1
2019-11-23T21:03:49.000Z
2019-11-23T21:03:49.000Z
Examples/Qmod_basic_features.py
Mv77/Q_Investment
5d570940311ef5823f457e31d02122960b573d19
[ "MIT" ]
1
2019-10-22T17:32:27.000Z
2019-10-25T13:14:44.000Z
Examples/Qmod_basic_features.py
Mv77/Q_Investment
5d570940311ef5823f457e31d02122960b573d19
[ "MIT" ]
4
2020-08-06T00:04:40.000Z
2020-11-27T20:29:43.000Z
# -*- coding: utf-8 -*- # --- # jupyter: # jupytext: # formats: ipynb,py:percent # text_representation: # extension: .py # format_name: percent # format_version: '1.2' # jupytext_version: 1.2.3 # kernelspec: # display_name: Python 3 # language: python # name: python3 # --...
29.975207
283
0.687896
# -*- coding: utf-8 -*- # --- # jupyter: # jupytext: # formats: ipynb,py:percent # text_representation: # extension: .py # format_name: percent # format_version: '1.2' # jupytext_version: 1.2.3 # kernelspec: # display_name: Python 3 # language: python # name: python3 # --...
0
0
0
edc0caf3e2e518ae87a7db5e31f0cdc915c8e8a0
2,514
py
Python
roles/hello/files/hello_tools.py
alxgrtnstrngl/hellostats
1a0b4f1659bb10ebf83fff5c3d2e85bf402cc1ad
[ "MIT" ]
null
null
null
roles/hello/files/hello_tools.py
alxgrtnstrngl/hellostats
1a0b4f1659bb10ebf83fff5c3d2e85bf402cc1ad
[ "MIT" ]
null
null
null
roles/hello/files/hello_tools.py
alxgrtnstrngl/hellostats
1a0b4f1659bb10ebf83fff5c3d2e85bf402cc1ad
[ "MIT" ]
null
null
null
""" hellostats sample API author: Alex G.S. Utils for use by the hello app such as html formatting getting loadavg of the server and ipaddress """ import os, socket, re import requests import json # server tools and stats def get_ip(): """get the ip address for the server""" aws_url="http://169.254.169.254...
27.933333
94
0.581146
""" hellostats sample API author: Alex G.S. Utils for use by the hello app such as html formatting getting loadavg of the server and ipaddress """ import os, socket, re import requests import json # server tools and stats def get_ip(): """get the ip address for the server""" aws_url="http://169.254.169.254...
0
0
0
6f074455bf527642751ad1872238a87b008036af
11,279
py
Python
mixemt/test/preprocess_test.py
svohr/mixemt
f854cf24d6e2b9486c67bbc5bd48eff4beed0b74
[ "MIT" ]
16
2017-04-06T03:30:46.000Z
2022-02-10T00:49:11.000Z
mixemt/test/preprocess_test.py
svohr/mixemt
f854cf24d6e2b9486c67bbc5bd48eff4beed0b74
[ "MIT" ]
14
2017-01-27T22:34:36.000Z
2021-02-11T01:17:53.000Z
mixemt/test/preprocess_test.py
svohr/mixemt
f854cf24d6e2b9486c67bbc5bd48eff4beed0b74
[ "MIT" ]
7
2017-09-29T19:13:50.000Z
2022-02-15T06:03:16.000Z
""" Unit Tests for preprocess module. """ import sys import math import unittest import argparse import numpy import pysam from mixemt import phylotree from mixemt import preprocess # TODO: Stuff to test: # def process_reads(samfile, var_pos, min_mq, min_bq): # def build_em_input(samfile, refseq, phylo, args): ...
37.848993
79
0.519372
""" Unit Tests for preprocess module. """ import sys import math import unittest import argparse import numpy import pysam from mixemt import phylotree from mixemt import preprocess # TODO: Stuff to test: # def process_reads(samfile, var_pos, min_mq, min_bq): # def build_em_input(samfile, refseq, phylo, args): cla...
10,023
155
732
29eb414346f910ebc7fbbffc73d462e0187173b4
1,413
py
Python
koku/api/common/permissions/test/test_settings_access.py
rubik-ai/koku
3255d1c217b7b6685cb2e130bf4e025946e76fac
[ "Apache-2.0" ]
157
2018-04-30T16:27:53.000Z
2022-03-31T08:17:21.000Z
koku/api/common/permissions/test/test_settings_access.py
rubik-ai/koku
3255d1c217b7b6685cb2e130bf4e025946e76fac
[ "Apache-2.0" ]
3,250
2018-04-26T14:14:25.000Z
2022-03-31T23:49:15.000Z
koku/api/common/permissions/test/test_settings_access.py
rubik-ai/koku
3255d1c217b7b6685cb2e130bf4e025946e76fac
[ "Apache-2.0" ]
65
2018-05-10T14:11:50.000Z
2022-03-18T19:22:58.000Z
# # Copyright 2021 Red Hat Inc. # SPDX-License-Identifier: Apache-2.0 # """Tests for Settings Access Permissions.""" from unittest.mock import Mock from django.test import TestCase from api.common.permissions.settings_access import SettingsAccessPermission from api.iam.models import User class SettingsAccessPermiss...
35.325
101
0.690729
# # Copyright 2021 Red Hat Inc. # SPDX-License-Identifier: Apache-2.0 # """Tests for Settings Access Permissions.""" from unittest.mock import Mock from django.test import TestCase from api.common.permissions.settings_access import SettingsAccessPermission from api.iam.models import User class SettingsAccessPermiss...
0
0
0
430811a35a0129ea51c881b624f64eaf064cdeec
1,983
py
Python
hannah/http/session.py
suganthsundar/hannah
e3e841850199f565bf2e19ebc9a0eb3d00a7a968
[ "MIT" ]
null
null
null
hannah/http/session.py
suganthsundar/hannah
e3e841850199f565bf2e19ebc9a0eb3d00a7a968
[ "MIT" ]
null
null
null
hannah/http/session.py
suganthsundar/hannah
e3e841850199f565bf2e19ebc9a0eb3d00a7a968
[ "MIT" ]
null
null
null
import uuid import asyncio import httpx from hannah.http.mappings import HTTPTrafficMapper REQUEST_RATE_LIMIT = 50
30.984375
107
0.625819
import uuid import asyncio import httpx from hannah.http.mappings import HTTPTrafficMapper REQUEST_RATE_LIMIT = 50 class HTTPSession: def __init__(self, name: str, base_url: str = None, auth: tuple = None, headers: dict = None, ssl_verify: bool = False, ...
1,570
6
285
e768c605baf8b447887be28f44764ee00ebacd6e
903
py
Python
create_new_sdfield.py
Keeganfn/sdf-generator
5bc0f306efad144f48780161f3942a7b7c2868c8
[ "MIT" ]
1
2021-05-24T23:36:19.000Z
2021-05-24T23:36:19.000Z
create_new_sdfield.py
Keeganfn/sdf-generator
5bc0f306efad144f48780161f3942a7b7c2868c8
[ "MIT" ]
null
null
null
create_new_sdfield.py
Keeganfn/sdf-generator
5bc0f306efad144f48780161f3942a7b7c2868c8
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sdfield_generator import sys if __name__ == "__main__": if(len(sys.argv) == 5): sdf = sdfield_generator.SDF_Generator(str(sys.argv[1]), resolution = int(sys.argv[2]), padding = float(sys.argv[3])) distance_array, sdf_origin, sdf_spacing, sdf_resolution = sdf.calcu...
32.25
136
0.692137
#!/usr/bin/env python3 import sdfield_generator import sys if __name__ == "__main__": if(len(sys.argv) == 5): sdf = sdfield_generator.SDF_Generator(str(sys.argv[1]), resolution = int(sys.argv[2]), padding = float(sys.argv[3])) distance_array, sdf_origin, sdf_spacing, sdf_resolution = sdf.calcu...
0
0
0
fbd646dfdc924969cdc957431c73ca82c465fa6b
850
py
Python
FusionIIIT/applications/academic_information/migrations/0002_auto_20191113_0231.py
sabhishekpratap5/sonarcubeTest2
9bd8105e457f6feb8c38fa94b335e54783fca99e
[ "bzip2-1.0.6" ]
2
2020-01-24T16:34:54.000Z
2020-08-01T05:09:24.000Z
FusionIIIT/applications/academic_information/migrations/0002_auto_20191113_0231.py
sabhishekpratap5/sonarcubeTest2
9bd8105e457f6feb8c38fa94b335e54783fca99e
[ "bzip2-1.0.6" ]
19
2019-09-08T06:01:14.000Z
2020-05-21T09:08:20.000Z
FusionIIIT/applications/academic_information/migrations/0002_auto_20191113_0231.py
sabhishekpratap5/sonarcubeTest2
9bd8105e457f6feb8c38fa94b335e54783fca99e
[ "bzip2-1.0.6" ]
14
2019-08-31T12:25:42.000Z
2022-01-12T08:05:33.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.25 on 2019-11-13 02:31 from __future__ import unicode_literals from django.db import migrations, models
40.47619
437
0.647059
# -*- coding: utf-8 -*- # Generated by Django 1.11.25 on 2019-11-13 02:31 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('academic_information', '0001_initial'), ] operations = [ migrations.AlterF...
0
670
23
ce22890ef8550a13f3be158f44c6c59edefccc6a
12,531
py
Python
plot_miri_ramp.py
STScI-MIRI/miriramps_karl
10882bb61bc63c9c2a0b6cfaf3c7c72e0696f6e0
[ "BSD-3-Clause" ]
null
null
null
plot_miri_ramp.py
STScI-MIRI/miriramps_karl
10882bb61bc63c9c2a0b6cfaf3c7c72e0696f6e0
[ "BSD-3-Clause" ]
null
null
null
plot_miri_ramp.py
STScI-MIRI/miriramps_karl
10882bb61bc63c9c2a0b6cfaf3c7c72e0696f6e0
[ "BSD-3-Clause" ]
null
null
null
import argparse import matplotlib.pyplot as plt import matplotlib as mpl import numpy as np from astropy.io import fits from astropy.modeling.models import Linear1D from astropy.modeling.fitting import LinearLSQFitter from miri_ramp_utils import get_ramp, get_good_ramp, fit_diffs, calc_lincor if __name__ == "__main...
34.425824
90
0.579523
import argparse import matplotlib.pyplot as plt import matplotlib as mpl import numpy as np from astropy.io import fits from astropy.modeling.models import Linear1D from astropy.modeling.fitting import LinearLSQFitter from miri_ramp_utils import get_ramp, get_good_ramp, fit_diffs, calc_lincor if __name__ == "__main...
0
0
0
1354c255a5e3e096c6f238e6d70c432f87dae4bf
960
py
Python
DQM/HLXMonitor/python/hlx_dqm_sourceclient_test_cfi.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
DQM/HLXMonitor/python/hlx_dqm_sourceclient_test_cfi.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
DQM/HLXMonitor/python/hlx_dqm_sourceclient_test_cfi.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
import FWCore.ParameterSet.Config as cms source = cms.Source("EmptySource") # name of DQM Source program from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer hlxdqmsource = DQMEDAnalyzer('HLXMonitor', NBINS = cms.untracked.uint32(335), ## 10 bunch crossings per bin Style = cms.untracked.string('BX'), ## ...
32
79
0.708333
import FWCore.ParameterSet.Config as cms source = cms.Source("EmptySource") # name of DQM Source program from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer hlxdqmsource = DQMEDAnalyzer('HLXMonitor', NBINS = cms.untracked.uint32(335), ## 10 bunch crossings per bin Style = cms.untracked.string('BX'), ## ...
0
0
0
efe7780f965657432aa35e82c457b9873730465e
5,202
py
Python
src/model/reentrancy.py
CVbluecat/TIPS
823974f418bbd970b1f5be07f6ff5de4653f717e
[ "MIT" ]
null
null
null
src/model/reentrancy.py
CVbluecat/TIPS
823974f418bbd970b1f5be07f6ff5de4653f717e
[ "MIT" ]
null
null
null
src/model/reentrancy.py
CVbluecat/TIPS
823974f418bbd970b1f5be07f6ff5de4653f717e
[ "MIT" ]
null
null
null
from queue import Queue from generateAST import TreeNode # tranverse the tree to find the defect node # usually use the pattern call.value
38.533333
128
0.538831
from queue import Queue from generateAST import TreeNode # tranverse the tree to find the defect node def BFSGetNode(ast, num): nodeQ = Queue() nodeQ.put(ast) # root while(not nodeQ.empty()): tmpNode = nodeQ.get() if tmpNode.beginPoint == num: return tmpNode for childNod...
4,960
0
102
a191c568d1a8ccd10ecfe34dbac8ceb6c183ead3
2,402
py
Python
accounting/accounting/doctype/sales_invoice/sales_invoice.py
rutwikhdev/accounting
1aca431f94e89a0c794dc14266f43f50ed0c71b1
[ "MIT" ]
2
2021-09-11T02:49:20.000Z
2021-11-15T11:45:21.000Z
accounting/accounting/doctype/sales_invoice/sales_invoice.py
rutwikhdev/accounting
1aca431f94e89a0c794dc14266f43f50ed0c71b1
[ "MIT" ]
null
null
null
accounting/accounting/doctype/sales_invoice/sales_invoice.py
rutwikhdev/accounting
1aca431f94e89a0c794dc14266f43f50ed0c71b1
[ "MIT" ]
null
null
null
#Copyright (c) 2021, Rutwik and contributors # For license information, please see license.txt import frappe, json, datetime from frappe.utils import getdate from frappe.model.document import Document from accounting.accounting.doctype.gl_entry.gl_entry import make_gl_entries @frappe.whitelist(allow_guest=True)
28.595238
89
0.566195
#Copyright (c) 2021, Rutwik and contributors # For license information, please see license.txt import frappe, json, datetime from frappe.utils import getdate from frappe.model.document import Document from accounting.accounting.doctype.gl_entry.gl_entry import make_gl_entries class SalesInvoice(Document): def val...
1,598
444
45
0100d5c7903e157911608570abc99018593a31d6
1,315
py
Python
pysaintcoinach/ex/sheet.py
icykoneko/saintcoinach-py
66898385e1198203a7ec9da83787427bf6fe5c83
[ "MIT" ]
7
2019-11-20T17:24:49.000Z
2022-03-29T04:17:53.000Z
pysaintcoinach/ex/sheet.py
icykoneko/saintcoinach-py
66898385e1198203a7ec9da83787427bf6fe5c83
[ "MIT" ]
7
2019-04-08T07:36:46.000Z
2022-01-17T22:51:54.000Z
pysaintcoinach/ex/sheet.py
icykoneko/saintcoinach-py
66898385e1198203a7ec9da83787427bf6fe5c83
[ "MIT" ]
3
2019-04-08T08:24:22.000Z
2021-06-27T22:19:15.000Z
from abc import ABC, abstractmethod from typing import Union, Tuple, Iterable, TypeVar from .. import ex T = TypeVar('T', bound=IRow)
19.057971
92
0.60076
from abc import ABC, abstractmethod from typing import Union, Tuple, Iterable, TypeVar from .. import ex class IRow(ABC): @property @abstractmethod def sheet(self) -> 'ISheet': pass @property @abstractmethod def key(self) -> int: pass @abstractmethod def __getitem__(...
292
838
46
8ad24e2b083bdbf415b2d171defb5c3e1c8216a8
1,432
py
Python
setup.py
arthursoprana/barril
87ebd247c3c3fa422f4ab3b5acdefbe9e85145c7
[ "MIT" ]
1
2020-06-09T16:45:29.000Z
2020-06-09T16:45:29.000Z
setup.py
arthursoprana/barril
87ebd247c3c3fa422f4ab3b5acdefbe9e85145c7
[ "MIT" ]
null
null
null
setup.py
arthursoprana/barril
87ebd247c3c3fa422f4ab3b5acdefbe9e85145c7
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """The setup script.""" import io from setuptools import find_packages, setup with io.open("README.rst", encoding="UTF-8") as readme_file: readme = readme_file.read() with io.open("CHANGELOG.rst", encoding="UTF-8") as changelog_file: history = changelog_file.rea...
30.468085
87
0.646648
#!/usr/bin/env python # -*- coding: utf-8 -*- """The setup script.""" import io from setuptools import find_packages, setup with io.open("README.rst", encoding="UTF-8") as readme_file: readme = readme_file.read() with io.open("CHANGELOG.rst", encoding="UTF-8") as changelog_file: history = changelog_file.rea...
0
0
0
a8187bb91daec99a367befa8aa6910b292a5ccc4
17,307
py
Python
applications/SwimmingDEMApplication/python_scripts/Derivatives.py
clazaro/Kratos
b947b82c90dfcbf13d60511427f85990d36b90be
[ "BSD-4-Clause" ]
778
2017-01-27T16:29:17.000Z
2022-03-30T03:01:51.000Z
applications/SwimmingDEMApplication/python_scripts/Derivatives.py
clazaro/Kratos
b947b82c90dfcbf13d60511427f85990d36b90be
[ "BSD-4-Clause" ]
6,634
2017-01-15T22:56:13.000Z
2022-03-31T15:03:36.000Z
applications/SwimmingDEMApplication/python_scripts/Derivatives.py
clazaro/Kratos
b947b82c90dfcbf13d60511427f85990d36b90be
[ "BSD-4-Clause" ]
224
2017-02-07T14:12:49.000Z
2022-03-06T23:09:34.000Z
import numpy as np import sympy as sp HyperbolicTangentFluidFractionSolution().DerivativeCalculator()
42.523342
152
0.544288
import numpy as np import sympy as sp class TimeDependantFluidFractionSolution(): def __init__(self): self.time = sp.Symbol('time') self.x1 = sp.Symbol('x1') self.x2 = sp.Symbol('x2') self.L = sp.Symbol('L') self.delta_alpha = sp.Symbol('delta_alpha') sel...
16,460
82
660
f7537b491f8aa9032d2a36ff9cfe852cd01429d9
2,792
py
Python
vis/plot_2d_neural_outputs.py
ajclaros/rl_legged_walker
26d0e124ef38045943449c2772b966571117683b
[ "MIT" ]
null
null
null
vis/plot_2d_neural_outputs.py
ajclaros/rl_legged_walker
26d0e124ef38045943449c2772b966571117683b
[ "MIT" ]
null
null
null
vis/plot_2d_neural_outputs.py
ajclaros/rl_legged_walker
26d0e124ef38045943449c2772b966571117683b
[ "MIT" ]
null
null
null
from jason.ctrnn import CTRNN import matplotlib.pyplot as plt import matplotlib.patches as mpatches import numpy as np import random import sys import json import os import math from util.fitness_functions import fitness_maximize_output_change, fitness_frequency_match def simulate_ctrnn(ctrnn, stepsize=0.01, init...
28.783505
181
0.693768
from jason.ctrnn import CTRNN import matplotlib.pyplot as plt import matplotlib.patches as mpatches import numpy as np import random import sys import json import os import math from util.fitness_functions import fitness_maximize_output_change, fitness_frequency_match def main(): trial_seed=1 sol_seed=6 ...
1,385
0
46
905865b280914b2496b3b63730fb6307640a91c5
1,005
py
Python
tests/test_DataPulls.py
D0cR3d/PokeFacts
7bbb8a9e8b53ae68d7da1b99cc72bc0587acf9cd
[ "MIT" ]
null
null
null
tests/test_DataPulls.py
D0cR3d/PokeFacts
7bbb8a9e8b53ae68d7da1b99cc72bc0587acf9cd
[ "MIT" ]
2
2017-07-04T09:29:14.000Z
2017-07-06T07:00:27.000Z
tests/test_DataPulls.py
rpokemon/PokeFacts
eec9c784f9c907ee1627e4f22781d7362f9060a8
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import codecs, json from PokeFacts import DataPulls
43.695652
76
0.631841
#!/usr/bin/env python3 import codecs, json from PokeFacts import DataPulls class TestDataPulls(object): def test_ItemStore(self): store = DataPulls.ItemStore({'term_property': 'term'}) with codecs.open('tests/test_data.json', "r", "utf-8") as data_file: store.addItems(json.load(data_f...
874
7
49
510c4afab071a1e81947f0cbec9ca686a8719af7
4,653
py
Python
main.py
MurphyWants/rc-hammer-client
d5d68d60a0481bca309edec1e872565804031ab8
[ "MIT" ]
null
null
null
main.py
MurphyWants/rc-hammer-client
d5d68d60a0481bca309edec1e872565804031ab8
[ "MIT" ]
null
null
null
main.py
MurphyWants/rc-hammer-client
d5d68d60a0481bca309edec1e872565804031ab8
[ "MIT" ]
null
null
null
#!python3 try: from .Settings import * except Exception: # ImportError from Settings import * import time from classes import Variable_Holder as VH import math import websocket import json import threading global vars vars = VH() if __name__ == "__main__": print("Main function started:\n") if...
29.449367
88
0.588223
#!python3 try: from .Settings import * except Exception: # ImportError from Settings import * import time from classes import Variable_Holder as VH import math import websocket import json import threading global vars vars = VH() def set_servo(num, pi): cos_input = math.cos(math.radians(num)) mid...
3,158
0
184
ff1df9c5c8855eca5bdd252829cba41c99412f84
1,673
py
Python
esphome/components/max31865/sensor.py
huhuhugo1/esphome
eb895d2095861a4d51f1a5fcd582a97389c27b4f
[ "MIT" ]
null
null
null
esphome/components/max31865/sensor.py
huhuhugo1/esphome
eb895d2095861a4d51f1a5fcd582a97389c27b4f
[ "MIT" ]
null
null
null
esphome/components/max31865/sensor.py
huhuhugo1/esphome
eb895d2095861a4d51f1a5fcd582a97389c27b4f
[ "MIT" ]
null
null
null
import esphome.codegen as cg import esphome.config_validation as cv from esphome.components import sensor, spi from esphome.const import CONF_ID, CONF_MAINS_FILTER, CONF_REFERENCE_RESISTANCE, \ CONF_RTD_NOMINAL_RESISTANCE, CONF_RTD_WIRES, ICON_THERMOMETER, UNIT_CELSIUS max31865_ns = cg.esphome_ns.namespace('max318...
47.8
97
0.767484
import esphome.codegen as cg import esphome.config_validation as cv from esphome.components import sensor, spi from esphome.const import CONF_ID, CONF_MAINS_FILTER, CONF_REFERENCE_RESISTANCE, \ CONF_RTD_NOMINAL_RESISTANCE, CONF_RTD_WIRES, ICON_THERMOMETER, UNIT_CELSIUS max31865_ns = cg.esphome_ns.namespace('max318...
445
0
23
01d46f1812d1aa6a824cfbeb5a383790ba4750a2
75
py
Python
soln/dummy.py
cberzan/kaggle-caterpillar
05a4abc975ad8eb399b6e9579147e5d5a9193084
[ "MIT" ]
11
2015-09-28T15:43:04.000Z
2019-04-07T12:54:25.000Z
soln/dummy.py
cberzan/kaggle-caterpillar
05a4abc975ad8eb399b6e9579147e5d5a9193084
[ "MIT" ]
null
null
null
soln/dummy.py
cberzan/kaggle-caterpillar
05a4abc975ad8eb399b6e9579147e5d5a9193084
[ "MIT" ]
8
2015-09-03T12:43:35.000Z
2019-12-31T03:12:54.000Z
# This file exists only so that I can do `os.path.dirname(dummy.__file__)`
37.5
74
0.746667
# This file exists only so that I can do `os.path.dirname(dummy.__file__)`
0
0
0
31d98b00562038ec38e177f53c091bd4853255cf
10,609
py
Python
WDL/__init__.py
illusional/miniwdl
f8fc2c4285f44fe87a26fa5a24fd94e7f48597b4
[ "MIT" ]
null
null
null
WDL/__init__.py
illusional/miniwdl
f8fc2c4285f44fe87a26fa5a24fd94e7f48597b4
[ "MIT" ]
null
null
null
WDL/__init__.py
illusional/miniwdl
f8fc2c4285f44fe87a26fa5a24fd94e7f48597b4
[ "MIT" ]
null
null
null
""" `miniwdl <https://github.com/chanzuckerberg/miniwdl/>`_ is a developer toolkit and local runner for the bioinformatics-focused `Workflow Description Language (WDL) <http://openwdl.org/>`_. This documentation covers the Python3 ``WDL`` package facilitating parsing & static analysis of WDL documents. * `GitHub repo ...
39.585821
254
0.661043
""" `miniwdl <https://github.com/chanzuckerberg/miniwdl/>`_ is a developer toolkit and local runner for the bioinformatics-focused `Workflow Description Language (WDL) <http://openwdl.org/>`_. This documentation covers the Python3 ``WDL`` package facilitating parsing & static analysis of WDL documents. * `GitHub repo ...
95
0
23
8102267bdc479bec80871dcf3a1ca8a3ad679c31
423
py
Python
petstagram/pets/migrations/0003_like_test.py
ZhivkoZhelyazkov/Petstagram
0e7ade5175f517f8935d4be0cb8f71cd31a06cf9
[ "MIT" ]
null
null
null
petstagram/pets/migrations/0003_like_test.py
ZhivkoZhelyazkov/Petstagram
0e7ade5175f517f8935d4be0cb8f71cd31a06cf9
[ "MIT" ]
null
null
null
petstagram/pets/migrations/0003_like_test.py
ZhivkoZhelyazkov/Petstagram
0e7ade5175f517f8935d4be0cb8f71cd31a06cf9
[ "MIT" ]
null
null
null
# Generated by Django 3.1.1 on 2020-10-11 20:24 from django.db import migrations, models
21.15
60
0.591017
# Generated by Django 3.1.1 on 2020-10-11 20:24 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('pets', '0002_auto_20201011_1244'), ] operations = [ migrations.AddField( model_name='like', name='test', ...
0
309
23
61db9479529ab7e0b3be4a0b9fe476b5d3493304
2,000
py
Python
Code/test_model.py
rutwik777/ML-and-IoT-based-Self-Driving-car
007a41774c0aa3b72e9c2c43c1cfc188573ad55e
[ "CC0-1.0" ]
null
null
null
Code/test_model.py
rutwik777/ML-and-IoT-based-Self-Driving-car
007a41774c0aa3b72e9c2c43c1cfc188573ad55e
[ "CC0-1.0" ]
null
null
null
Code/test_model.py
rutwik777/ML-and-IoT-based-Self-Driving-car
007a41774c0aa3b72e9c2c43c1cfc188573ad55e
[ "CC0-1.0" ]
null
null
null
# test_model.py import numpy as np from grabscreen import grab_screen import cv2 import time from alexnet import alexnet from getkeys import key_check import serial arduinoSerial = serial.Serial('com4',9600) time.sleep(1) import random WIDTH = 160 HEIGHT = 120 LR = 1e-3 EPOCHS = 20 MODEL_NAME = 'self-driving-car-fas...
23.255814
104
0.552
# test_model.py import numpy as np from grabscreen import grab_screen import cv2 import time from alexnet import alexnet from getkeys import key_check import serial arduinoSerial = serial.Serial('com4',9600) time.sleep(1) import random WIDTH = 160 HEIGHT = 120 LR = 1e-3 EPOCHS = 20 MODEL_NAME = 'self-driving-car-fas...
1,385
0
92
9150954c066c33bda0b392995e9bb4c6c3a35da5
5,084
py
Python
openstack_dashboard/api/rest/neutron.py
Hodorable/0602
3b1e4cb7458e4f456bfebc52fc2902205c36cc15
[ "Apache-2.0" ]
1
2017-12-07T05:21:58.000Z
2017-12-07T05:21:58.000Z
openstack_dashboard/api/rest/neutron.py
Hodorable/0602
3b1e4cb7458e4f456bfebc52fc2902205c36cc15
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/api/rest/neutron.py
Hodorable/0602
3b1e4cb7458e4f456bfebc52fc2902205c36cc15
[ "Apache-2.0" ]
null
null
null
# # (c) Copyright 2015 Hewlett-Packard Development Company, L.P. # # 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 ap...
37.109489
87
0.653029
# # (c) Copyright 2015 Hewlett-Packard Development Company, L.P. # # 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 ap...
0
0
0
4fe879acf3b1bdf20cb1db9c1f6f377eb4303255
5,419
py
Python
bean/grid_sizer_dialog.py
CASL/VERAview
89b18f239ca5228185b80d5392068981d7733d3b
[ "BSD-3-Clause" ]
7
2017-04-21T05:35:16.000Z
2022-02-28T20:14:42.000Z
bean/grid_sizer_dialog.py
CASL/VERAview
89b18f239ca5228185b80d5392068981d7733d3b
[ "BSD-3-Clause" ]
2
2019-02-27T15:25:34.000Z
2021-05-26T17:01:59.000Z
bean/grid_sizer_dialog.py
CASL/VERAview
89b18f239ca5228185b80d5392068981d7733d3b
[ "BSD-3-Clause" ]
3
2019-07-09T08:31:34.000Z
2022-03-08T03:18:48.000Z
#!/usr/bin/env python # $Id$ #------------------------------------------------------------------------ # NAME: grid_sizer_dialog.py - # HISTORY: - # 2017-07-21 leerw@ornl.gov - # Fixing _OnCharHook for Linux. # 2017-03-31 leerw@ornl.gov - # Added EVT_CHAR_HOOK # 2015-02-14 leerw@ornl.gov - #--...
28.371728
77
0.442702
#!/usr/bin/env python # $Id$ #------------------------------------------------------------------------ # NAME: grid_sizer_dialog.py - # HISTORY: - # 2017-07-21 leerw@ornl.gov - # Fixing _OnCharHook for Linux. # 2017-03-31 leerw@ornl.gov - # Added EVT_CHAR_HOOK # 2015-02-14 leerw@ornl.gov - #--...
724
0
96
b903ed12cff76a8c3358bc008cfa3c3fc439c0dd
6,249
py
Python
osg_configure/configure_modules/pbs.py
mmascher/osg-configure
0a8490f87ff1b3340796f94ed657b62b19602347
[ "Apache-2.0" ]
null
null
null
osg_configure/configure_modules/pbs.py
mmascher/osg-configure
0a8490f87ff1b3340796f94ed657b62b19602347
[ "Apache-2.0" ]
null
null
null
osg_configure/configure_modules/pbs.py
mmascher/osg-configure
0a8490f87ff1b3340796f94ed657b62b19602347
[ "Apache-2.0" ]
null
null
null
""" Module to handle attributes related to the pbs jobmanager configuration """ import os import logging from osg_configure.modules import utilities from osg_configure.modules import configfile from osg_configure.modules import validation from osg_configure.modules.jobmanagerconfiguration import JobManagerConfigurat...
41.384106
115
0.603617
""" Module to handle attributes related to the pbs jobmanager configuration """ import os import logging from osg_configure.modules import utilities from osg_configure.modules import configfile from osg_configure.modules import validation from osg_configure.modules.jobmanagerconfiguration import JobManagerConfigurat...
1,183
0
27
312977492b5df68a1fd16270301071daf1e7767c
16,405
py
Python
DQMOffline/Trigger/python/DisplacedJet_Monitor_cff.py
pasmuss/cmssw
566f40c323beef46134485a45ea53349f59ae534
[ "Apache-2.0" ]
null
null
null
DQMOffline/Trigger/python/DisplacedJet_Monitor_cff.py
pasmuss/cmssw
566f40c323beef46134485a45ea53349f59ae534
[ "Apache-2.0" ]
null
null
null
DQMOffline/Trigger/python/DisplacedJet_Monitor_cff.py
pasmuss/cmssw
566f40c323beef46134485a45ea53349f59ae534
[ "Apache-2.0" ]
null
null
null
import FWCore.ParameterSet.Config as cms from DQMOffline.Trigger.HTMonitor_cfi import hltHTmonitoring from DQMOffline.Trigger.JetMonitor_cfi import hltJetMETmonitoring from DQMOffline.Trigger.TrackingMonitoring_cff import * DisplacedJetIter2TracksMonitoringHLT = trackingMonHLT.clone() DisplacedJetIter2TracksMonitor...
78.492823
211
0.880098
import FWCore.ParameterSet.Config as cms from DQMOffline.Trigger.HTMonitor_cfi import hltHTmonitoring from DQMOffline.Trigger.JetMonitor_cfi import hltJetMETmonitoring from DQMOffline.Trigger.TrackingMonitoring_cff import * DisplacedJetIter2TracksMonitoringHLT = trackingMonHLT.clone() DisplacedJetIter2TracksMonitor...
0
0
0
0b6514b479918edb10d5edaed7d5c591a271ac8a
8,276
py
Python
primitive.py
dp-cont/dp-cont
193bea06c1861645f16bd080e45eb0f282e8469a
[ "MIT" ]
3
2021-06-28T20:49:19.000Z
2022-03-24T02:01:24.000Z
primitive.py
dp-cont/dp-cont
193bea06c1861645f16bd080e45eb0f282e8469a
[ "MIT" ]
null
null
null
primitive.py
dp-cont/dp-cont
193bea06c1861645f16bd080e45eb0f282e8469a
[ "MIT" ]
1
2021-02-03T22:00:50.000Z
2021-02-03T22:00:50.000Z
import numpy as np from scipy import special from numpy import linalg as LA # noisy max '''some LDP primitives''' # stochastic rounding (Duchi et al.) # piecewise mechanism (Wang et al.) # square wave (Li et al.)
34.198347
132
0.55957
import numpy as np from scipy import special from numpy import linalg as LA def laplace(beta, data): output = data + np.random.laplace(0, beta, len(data)) return output def smooth_ell(p_rank, b, max_ell, data): m = len(data) data = np.append([0] * m, data) data = np.append(data, [max_ell] * m) ...
7,844
0
203
c97d8a3e1aa95806d3934c27caf4f4d52bf96c3a
265
py
Python
db/tests/fixtures/job_type.py
matchd-ch/matchd-backend
84be4aab1b4708cae50a8988301b15df877c8db0
[ "Apache-2.0" ]
1
2022-03-03T09:55:57.000Z
2022-03-03T09:55:57.000Z
db/tests/fixtures/job_type.py
matchd-ch/matchd-backend
84be4aab1b4708cae50a8988301b15df877c8db0
[ "Apache-2.0" ]
7
2022-02-09T10:44:53.000Z
2022-03-28T03:29:43.000Z
db/tests/fixtures/job_type.py
matchd-ch/matchd-backend
84be4aab1b4708cae50a8988301b15df877c8db0
[ "Apache-2.0" ]
null
null
null
import pytest from db.models.job_type import JobType @pytest.fixture @pytest.fixture
18.928571
72
0.728302
import pytest from db.models.job_type import JobType @pytest.fixture def job_type_valid_args(): return {'name': 'Smart work', 'mode': 'Remote'} @pytest.fixture def create_job_type(): return JobType.objects.create(name='Work and travel', mode='remote')
131
0
44
6314e51f9fc94df754ce929422f893b378669703
13,322
py
Python
utils/residualload.py
maep-tools/MAEP-SDDP_sourcecode
f951a630cb5aa323eeb359a08b67c66035662293
[ "Unlicense" ]
2
2021-09-09T17:19:58.000Z
2021-12-15T14:22:56.000Z
utils/residualload.py
maep-tools/model-maep
f951a630cb5aa323eeb359a08b67c66035662293
[ "Unlicense" ]
null
null
null
utils/residualload.py
maep-tools/model-maep
f951a630cb5aa323eeb359a08b67c66035662293
[ "Unlicense" ]
5
2019-02-15T18:44:16.000Z
2021-09-09T17:20:02.000Z
import pickle ###############################################################################
40.740061
150
0.506005
import pickle def aggr_energy(dict_data, Param): import numpy as np from utils.mipproblem import fisrt_vec, pelp_vec dict_wind = pickle.load( open( "savedata/windspeed_save.p", "rb" ) ) dict_solD = pickle.load( open( "savedata/solarradDist.p", "rb" ) ) dict_solL = pickle.load( open( "save...
13,155
0
73
3c0daa5a31a67e635725474cc99b373b14c8e6e9
336
py
Python
20190209_SWIG/example2/setup.py
3x3x3/Presentations
3c31b136ed4d9214bb3730fa41a4a575da38edc9
[ "MIT" ]
null
null
null
20190209_SWIG/example2/setup.py
3x3x3/Presentations
3c31b136ed4d9214bb3730fa41a4a575da38edc9
[ "MIT" ]
null
null
null
20190209_SWIG/example2/setup.py
3x3x3/Presentations
3c31b136ed4d9214bb3730fa41a4a575da38edc9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from setuptools import setup, Extension packages = [ "swig_ex2", ] ext_modules = [ Extension( name="_swig_ex2", sources=["ex2.c", "ex2_wrap.c"], ), ] setup( name="swig_ex2", version="1.0.0", description="SWIG Example2", ext_modules=ext_modules, packages=packages, package_dir={"sw...
14.608696
39
0.654762
# -*- coding: utf-8 -*- from setuptools import setup, Extension packages = [ "swig_ex2", ] ext_modules = [ Extension( name="_swig_ex2", sources=["ex2.c", "ex2_wrap.c"], ), ] setup( name="swig_ex2", version="1.0.0", description="SWIG Example2", ext_modules=ext_modules, packages=packages, package_dir={"sw...
0
0
0
261fc16cfc4339a99ec05d8935e2b190af1caa4a
14,436
py
Python
src/View/ResizingImageCanvas.py
wklock/nasal-modeling
35623d1c6f62a2ee07a99d01a475ea1ca735f0ff
[ "BSD-3-Clause" ]
null
null
null
src/View/ResizingImageCanvas.py
wklock/nasal-modeling
35623d1c6f62a2ee07a99d01a475ea1ca735f0ff
[ "BSD-3-Clause" ]
4
2021-06-08T19:00:37.000Z
2022-03-11T23:15:09.000Z
src/View/ResizingImageCanvas.py
wklock/nasal-modeling
35623d1c6f62a2ee07a99d01a475ea1ca735f0ff
[ "BSD-3-Clause" ]
1
2019-05-16T08:11:25.000Z
2019-05-16T08:11:25.000Z
import hashlib import logging import os import threading import time from tkinter import * import cv2 import numpy as np from PIL import Image, ImageTk from src.ImageProcessing.contouring import cnt_from_img, save_contour, save_image class ResizingImageCanvas(Canvas): """ Customized Canvas that can handle d...
32.883827
99
0.56179
import hashlib import logging import os import threading import time from tkinter import * import cv2 import numpy as np from PIL import Image, ImageTk from src.ImageProcessing.contouring import cnt_from_img, save_contour, save_image class ResizingImageCanvas(Canvas): """ Customized Canvas that can handle d...
105
0
27
5cfc13d7f239c86cab1f4b97845e639498d9a98c
713
py
Python
setup.py
mrzhangboss/hookman
e1bef52f18f8f53f437477bad72607716c01b605
[ "Apache-2.0" ]
null
null
null
setup.py
mrzhangboss/hookman
e1bef52f18f8f53f437477bad72607716c01b605
[ "Apache-2.0" ]
null
null
null
setup.py
mrzhangboss/hookman
e1bef52f18f8f53f437477bad72607716c01b605
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- from __future__ import absolute_import, unicode_literals, print_function from setuptools import setup, find_packages # todo: add install_requires and test_requires setup(name='hookman', version='0.1.2', packages=find_packages(), test_requires = ['py.test>=2.92', 'mock'], ...
37.526316
92
0.681627
# -*- coding:utf-8 -*- from __future__ import absolute_import, unicode_literals, print_function from setuptools import setup, find_packages # todo: add install_requires and test_requires setup(name='hookman', version='0.1.2', packages=find_packages(), test_requires = ['py.test>=2.92', 'mock'], ...
0
0
0
10b01385472c3bf2d2ca2f856566151a55231a09
887
py
Python
myproject.py
akshat0047/Fraped
c2208aa7c770392664a41371d7a599770e0dbb7d
[ "MIT" ]
null
null
null
myproject.py
akshat0047/Fraped
c2208aa7c770392664a41371d7a599770e0dbb7d
[ "MIT" ]
null
null
null
myproject.py
akshat0047/Fraped
c2208aa7c770392664a41371d7a599770e0dbb7d
[ "MIT" ]
null
null
null
from app import app """ If Twisted's WSGI server is not desired in favor for solutions like uwsgi or gunicorn or anything similar, the `crochet` library can execute Twisted code in an isolated thread. Be EXTREMELY careful with this solution! Python's WSGI servers generally use threads, as does `crochet`, and/or process...
38.565217
110
0.738444
from app import app """ If Twisted's WSGI server is not desired in favor for solutions like uwsgi or gunicorn or anything similar, the `crochet` library can execute Twisted code in an isolated thread. Be EXTREMELY careful with this solution! Python's WSGI servers generally use threads, as does `crochet`, and/or process...
0
0
0
7c70729f88b3127aec5498cc52269217e8c2a7e2
2,663
py
Python
src/pyherc/events/__init__.py
tuturto/pyherc
4e7c72a4d80d335f7d3c48cecac96cd7105acac4
[ "MIT" ]
25
2015-07-21T12:40:42.000Z
2021-09-23T09:00:45.000Z
src/pyherc/events/__init__.py
tuturto/pyherc
4e7c72a4d80d335f7d3c48cecac96cd7105acac4
[ "MIT" ]
65
2015-02-15T19:42:19.000Z
2018-01-03T10:22:35.000Z
src/pyherc/events/__init__.py
tuturto/pyherc
4e7c72a4d80d335f7d3c48cecac96cd7105acac4
[ "MIT" ]
3
2017-06-15T13:07:49.000Z
2019-04-15T02:18:39.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2010-2017 Tuukka Turto # # 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,...
49.314815
86
0.772062
# -*- coding: utf-8 -*- # Copyright (c) 2010-2017 Tuukka Turto # # 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,...
0
0
0
72c0a95eec9375b10a7aab985a7bd93ee563b2ef
4,161
py
Python
src/server/tcp_server.py
polzbit/tcp_reverse_shell
d18bb6136d1a7bbd5dd44685b7e6906e55865705
[ "MIT" ]
null
null
null
src/server/tcp_server.py
polzbit/tcp_reverse_shell
d18bb6136d1a7bbd5dd44685b7e6906e55865705
[ "MIT" ]
null
null
null
src/server/tcp_server.py
polzbit/tcp_reverse_shell
d18bb6136d1a7bbd5dd44685b7e6906e55865705
[ "MIT" ]
null
null
null
# TCP Server from socket import socket, AF_INET, SOCK_STREAM from Crypto.PublicKey import RSA from Crypto.Cipher import AES, PKCS1_OAEP from Crypto.Util import Counter import os class Server: ''' Shell Server ''' def str_xor(self, s1, s2): ''' Encrypt/Decrypt function ''' r...
41.19802
129
0.57342
# TCP Server from socket import socket, AF_INET, SOCK_STREAM from Crypto.PublicKey import RSA from Crypto.Cipher import AES, PKCS1_OAEP from Crypto.Util import Counter import os class Server: ''' Shell Server ''' def __init__(self): self.IP = '<SERVER-IP-ADDRESS>' self.PORT = 8080 ...
195
0
52
6b2234f49a8b57fe4bf6fd97f1ef5ca5137dfade
2,342
py
Python
Apps/phdigitalshadows/dsapi/service/infrastructure_service.py
ryanbsaunders/phantom-apps
1befda793a08d366fbd443894f993efb1baf9635
[ "Apache-2.0" ]
74
2019-10-22T02:00:53.000Z
2022-03-15T12:56:13.000Z
Apps/phdigitalshadows/dsapi/service/infrastructure_service.py
ryanbsaunders/phantom-apps
1befda793a08d366fbd443894f993efb1baf9635
[ "Apache-2.0" ]
375
2019-10-22T20:53:50.000Z
2021-11-09T21:28:43.000Z
Apps/phdigitalshadows/dsapi/service/infrastructure_service.py
ryanbsaunders/phantom-apps
1befda793a08d366fbd443894f993efb1baf9635
[ "Apache-2.0" ]
175
2019-10-23T15:30:42.000Z
2021-11-05T21:33:31.000Z
# File: infrastructure_service.py # # Licensed under Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt) # from .ds_base_service import DSBaseService from .ds_find_service import DSFindService from ..model.infrastructure import Infrastructure
32.985915
106
0.599488
# File: infrastructure_service.py # # Licensed under Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt) # from .ds_base_service import DSBaseService from .ds_find_service import DSFindService from ..model.infrastructure import Infrastructure class InfrastructureService(DSFindService): def __init__(se...
970
1,094
23
3563857b8dcbacfabfb8b623eed375f16c61d5c9
2,952
py
Python
raspberrypi/pi3_client/wifi_handle.py
alexisdal/agv-line-follower
538dfce20354508744df338a26d4f6d68ac6095b
[ "MIT" ]
1
2019-09-02T17:06:11.000Z
2019-09-02T17:06:11.000Z
raspberrypi/pi3_client/wifi_handle.py
alexisdal/agv-line-follower
538dfce20354508744df338a26d4f6d68ac6095b
[ "MIT" ]
null
null
null
raspberrypi/pi3_client/wifi_handle.py
alexisdal/agv-line-follower
538dfce20354508744df338a26d4f6d68ac6095b
[ "MIT" ]
null
null
null
# this Python file uses the following encoding: utf-8 import os # to execute shall cmds import time # to sleep() import redis # to interface with the queue of requests. installed with => python3 -m pip install redis import requests # because if's simpler to use for an http query than the default python . installed w...
40.438356
136
0.557249
# this Python file uses the following encoding: utf-8 import os # to execute shall cmds import time # to sleep() import redis # to interface with the queue of requests. installed with => python3 -m pip install redis import requests # because if's simpler to use for an http query than the default python . installed w...
1,903
0
96
d93987d855e263ebb5ac585f549e1ea82b33ac16
741
py
Python
project/events/tests.py
Aman2244-hub/ducss-site-old
42bb7d4938f2500cc3e709c2f2e34cc11dacbe7c
[ "MIT" ]
1
2020-10-19T17:25:33.000Z
2020-10-19T17:25:33.000Z
project/events/tests.py
Aman2244-hub/ducss-site-old
42bb7d4938f2500cc3e709c2f2e34cc11dacbe7c
[ "MIT" ]
1
2020-10-24T16:28:57.000Z
2020-10-24T16:28:57.000Z
project/events/tests.py
Aman2244-hub/ducss-site-old
42bb7d4938f2500cc3e709c2f2e34cc11dacbe7c
[ "MIT" ]
4
2020-09-30T16:48:40.000Z
2020-10-19T03:53:12.000Z
from django.core.urlresolvers import reverse from utilities.utils import CleanTestCase class ViewsTest(CleanTestCase): '''Tests for all the views in the events app''' fixtures = [ 'events.json' ] def test_event_page_view(self): '''Tests the context for the page that shows all the details about a c...
30.875
67
0.724696
from django.core.urlresolvers import reverse from utilities.utils import CleanTestCase class ViewsTest(CleanTestCase): '''Tests for all the views in the events app''' fixtures = [ 'events.json' ] def test_event_page_view(self): '''Tests the context for the page that shows all the details about a c...
0
0
0
373bc6df16ccb1c78421ca0bf49271077d209643
1,949
py
Python
smoke/convert/firework_to_nc.py
minnieteng/smoke_project
cc3c8f16f7759fe29e46d3cec32a3ed6ca86bd5f
[ "Apache-2.0" ]
null
null
null
smoke/convert/firework_to_nc.py
minnieteng/smoke_project
cc3c8f16f7759fe29e46d3cec32a3ed6ca86bd5f
[ "Apache-2.0" ]
null
null
null
smoke/convert/firework_to_nc.py
minnieteng/smoke_project
cc3c8f16f7759fe29e46d3cec32a3ed6ca86bd5f
[ "Apache-2.0" ]
null
null
null
""" Functions to transform firework model files to netCDF files """ import logging import os import sys import numpy as np import datetime import xarray as xr import click import smoke.utils.utilities as utilities from pathlib import Path from smoke.load.parsers import * logging.getLogger(__name__).addHandler(loggin...
29.089552
109
0.703951
""" Functions to transform firework model files to netCDF files """ import logging import os import sys import numpy as np import datetime import xarray as xr import click import smoke.utils.utilities as utilities from pathlib import Path from smoke.load.parsers import * logging.getLogger(__name__).addHandler(loggin...
563
0
45
94312290ddda3b32c4f4cb1ef88624b5da111b0e
4,170
py
Python
contact_updater/tests.py
projectkrang/foia-hub
0f9a6de2ff76a1049852bd5cb0c06ed2d131f790
[ "CC0-1.0" ]
2
2015-04-14T19:42:04.000Z
2017-05-09T16:38:16.000Z
contact_updater/tests.py
projectkrang/foia-hub
0f9a6de2ff76a1049852bd5cb0c06ed2d131f790
[ "CC0-1.0" ]
16
2015-02-17T19:24:33.000Z
2015-05-08T20:58:53.000Z
contact_updater/tests.py
projectkrang/foia-hub
0f9a6de2ff76a1049852bd5cb0c06ed2d131f790
[ "CC0-1.0" ]
1
2015-02-17T20:10:29.000Z
2015-02-17T20:10:29.000Z
from django.test import TestCase from django.core.urlresolvers import reverse from contact_updater import views api_data = { 'offices': [], 'public_liaison_email': None, 'foia_libraries': [{'url': 'http://www.amtrak.com/library'}], 'simple_processing_time': 1.0, 'name': 'AMTRAK', 'common_requ...
32.076923
79
0.606954
from django.test import TestCase from django.core.urlresolvers import reverse from contact_updater import views api_data = { 'offices': [], 'public_liaison_email': None, 'foia_libraries': [{'url': 'http://www.amtrak.com/library'}], 'simple_processing_time': 1.0, 'name': 'AMTRAK', 'common_requ...
0
2,969
69
b2c15d1c3315dfbd24248641c3995085b2c7cd04
5,820
py
Python
mask/eolearn/mask/masking.py
chorng/eo-learn
a1a3c6fa5568d398f5e43f5ad5aecdfeb05e8d3c
[ "MIT" ]
null
null
null
mask/eolearn/mask/masking.py
chorng/eo-learn
a1a3c6fa5568d398f5e43f5ad5aecdfeb05e8d3c
[ "MIT" ]
null
null
null
mask/eolearn/mask/masking.py
chorng/eo-learn
a1a3c6fa5568d398f5e43f5ad5aecdfeb05e8d3c
[ "MIT" ]
null
null
null
""" Module for creating mask features Credits: Copyright (c) 2017-2022 Matej Aleksandrov, Matej Batič, Grega Milčinski, Domagoj Korais, Matic Lubej (Sinergise) Copyright (c) 2017-2022 Žiga Lukšič, Devis Peressutti, Nejc Vesel, Jovan Višnjić, Anže Zupanc (Sinergise) Copyright (c) 2019-2020 Jernej Puc, Lojze Žust (Siner...
42.173913
120
0.682474
""" Module for creating mask features Credits: Copyright (c) 2017-2022 Matej Aleksandrov, Matej Batič, Grega Milčinski, Domagoj Korais, Matic Lubej (Sinergise) Copyright (c) 2017-2022 Žiga Lukšič, Devis Peressutti, Nejc Vesel, Jovan Višnjić, Anže Zupanc (Sinergise) Copyright (c) 2019-2020 Jernej Puc, Lojze Žust (Siner...
0
0
0
de5882bacfdfa39c408052cb576f8b74974e4b51
341
py
Python
files/5_with.py
fcafedericoguerra/Python
130381d51ddc9192859d2512715a86db8aa5869d
[ "MIT" ]
1
2019-10-14T18:17:27.000Z
2019-10-14T18:17:27.000Z
files/5_with.py
fcafedericoguerra/Python
130381d51ddc9192859d2512715a86db8aa5869d
[ "MIT" ]
3
2019-05-03T21:22:36.000Z
2019-05-03T21:24:50.000Z
files/5_with.py
fcafedericoguerra/Python
130381d51ddc9192859d2512715a86db8aa5869d
[ "MIT" ]
50
2019-04-24T22:52:19.000Z
2021-11-04T01:57:33.000Z
# -*- coding: utf-8 -*- import locale ############## Manejo de archivos ############## with open("5_with.py", "r", encoding='utf-8') as file: #With permite cerrar el archivo automaticamente cuando se ejecute el bloque print(locale.getpreferredencoding()) # LANG environment variable print(locale.setlocale(...
31
130
0.653959
# -*- coding: utf-8 -*- import locale ############## Manejo de archivos ############## with open("5_with.py", "r", encoding='utf-8') as file: #With permite cerrar el archivo automaticamente cuando se ejecute el bloque print(locale.getpreferredencoding()) # LANG environment variable print(locale.setlocale(...
0
0
0
ca2a3d943c65f6613fda2db5af2fb7cc2370ada0
1,075
py
Python
PYQT5/Line_edit.py
Amara-Manikanta/Python-GUI
0356e7cae7f1c51d0781bf431c386ee7262608b1
[ "MIT" ]
null
null
null
PYQT5/Line_edit.py
Amara-Manikanta/Python-GUI
0356e7cae7f1c51d0781bf431c386ee7262608b1
[ "MIT" ]
null
null
null
PYQT5/Line_edit.py
Amara-Manikanta/Python-GUI
0356e7cae7f1c51d0781bf431c386ee7262608b1
[ "MIT" ]
null
null
null
import sys from PyQt5.QtWidgets import * if __name__=='__main__': main()
27.564103
84
0.651163
import sys from PyQt5.QtWidgets import * class Windows(QWidget): def __init__(self): super().__init__() self.setWindowTitle("Using Line Edits") self.setGeometry(50,50,350,350) self.UI() def UI(self): self.nameTextBox= QLineEdit(self) self.nameTextBox.setPlacehol...
867
2
126
5b7788ca1a6abf922214c236be57040bca916688
2,207
py
Python
tests/tag_handlers/test_import_handler.py
an-otter-world/marshpy
42aed8e5f316358792356c7e550f844a08bf206e
[ "WTFPL" ]
null
null
null
tests/tag_handlers/test_import_handler.py
an-otter-world/marshpy
42aed8e5f316358792356c7e550f844a08bf206e
[ "WTFPL" ]
16
2021-03-26T08:32:29.000Z
2021-03-27T10:37:24.000Z
tests/tag_handlers/test_import_handler.py
an-otter-world/marshpy
42aed8e5f316358792356c7e550f844a08bf206e
[ "WTFPL" ]
null
null
null
"""Import handler tests.""" from pathlib import Path from marshpy.core.constants import UNDEFINED from marshpy.core.errors import ErrorCode from marshpy.tag_handlers.import_handler import ImportHandler from tests.tag_handlers.path_handler_helpers import check_path_tag from tests.tag_handlers.path_handler_helpers impo...
24.522222
73
0.636158
"""Import handler tests.""" from pathlib import Path from marshpy.core.constants import UNDEFINED from marshpy.core.errors import ErrorCode from marshpy.tag_handlers.import_handler import ImportHandler from tests.tag_handlers.path_handler_helpers import check_path_tag from tests.tag_handlers.path_handler_helpers impo...
0
0
0
03c4e4c2cf1b6e16b0820e68f2fcc27ec213049e
1,195
py
Python
yadi/context.py
fcracker79/yadi
e0327295b062c24cf85323c8fcc414c8dc4fe4a4
[ "MIT" ]
3
2018-03-09T09:12:32.000Z
2018-03-20T13:41:50.000Z
yadi/context.py
fcracker79/yadi
e0327295b062c24cf85323c8fcc414c8dc4fe4a4
[ "MIT" ]
1
2018-03-09T09:11:43.000Z
2018-03-11T16:18:10.000Z
yadi/context.py
fcracker79/yadi
e0327295b062c24cf85323c8fcc414c8dc4fe4a4
[ "MIT" ]
null
null
null
import abc import sys import typing from yadi import listeners SINGLETON = 'singleton' PROTOTYPE = 'prototype'
21.339286
91
0.658577
import abc import sys import typing from yadi import listeners class Scope(metaclass=abc.ABCMeta): @property @abc.abstractmethod def name(self) -> str: pass @abc.abstractmethod def get(self, key: str) -> typing.Optional[object]: pass @abc.abstractmethod def set(self, key...
432
601
46
920bbd298c739af9cfab836361ac97b3aaa1b339
4,863
py
Python
setup.py
YSmart/YSmart
fdf442ed19559105cc6c8fdabca665603ec1aef6
[ "Apache-2.0" ]
10
2015-06-28T02:09:17.000Z
2021-04-18T01:20:38.000Z
setup.py
YSmart/YSmart
fdf442ed19559105cc6c8fdabca665603ec1aef6
[ "Apache-2.0" ]
null
null
null
setup.py
YSmart/YSmart
fdf442ed19559105cc6c8fdabca665603ec1aef6
[ "Apache-2.0" ]
8
2015-09-17T13:01:13.000Z
2020-03-31T15:35:03.000Z
#!/usr/bin/env python """ Copyright (c) 2012 The Ohio State University. 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 req...
41.211864
172
0.506683
#!/usr/bin/env python """ Copyright (c) 2012 The Ohio State University. 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 req...
3,919
0
115
119d976c660bc2a7367e7a4be268f3abb169b4ec
6,323
py
Python
Algorithm test/Random Forest/decision_tree.py
jbaldwin2014/cs-4641-group-44
b6c7f9b657b0b5a5998a4379eb80064c108d36a3
[ "CC0-1.0" ]
null
null
null
Algorithm test/Random Forest/decision_tree.py
jbaldwin2014/cs-4641-group-44
b6c7f9b657b0b5a5998a4379eb80064c108d36a3
[ "CC0-1.0" ]
null
null
null
Algorithm test/Random Forest/decision_tree.py
jbaldwin2014/cs-4641-group-44
b6c7f9b657b0b5a5998a4379eb80064c108d36a3
[ "CC0-1.0" ]
3
2020-10-02T15:06:23.000Z
2020-10-03T02:50:34.000Z
import numpy as np from collections import Counter from scipy import stats from util import *
33.812834
123
0.544678
import numpy as np from collections import Counter from scipy import stats from util import * class MyDecisionTree(object): def __init__(self, max_depth=3): """ Helper Function: Initializing the tree as an empty dictionary. Args: max_depth: maximum depth of the tree includi...
901
5,306
23
a2513891f6a03d54c2d28ea72b15fcb9969af2b2
976
py
Python
unit_tests/clients/create_pool.py
jaredlunde/cargo-orm
1d5524d359bd52a991edc738982b7df2149d9c69
[ "MIT" ]
3
2017-02-10T08:03:21.000Z
2017-02-25T04:55:48.000Z
unit_tests/clients/create_pool.py
jaredlunde/cargo-orm
1d5524d359bd52a991edc738982b7df2149d9c69
[ "MIT" ]
null
null
null
unit_tests/clients/create_pool.py
jaredlunde/cargo-orm
1d5524d359bd52a991edc738982b7df2149d9c69
[ "MIT" ]
null
null
null
#!/usr/bin/python3 -S # -*- coding: utf-8 -*- """ `Unit tests for cargo.clients.create_pool` --·--·--·--·--·--·--·--·--·--·--·--·--·--·--·--·--·--·--·--·--·--·--·--·--·--·-- 2016 Jared Lunde © The MIT License (MIT) http://github.com/jaredlunde """ import unittest from multiprocessing import cpu_count from ca...
25.684211
80
0.61373
#!/usr/bin/python3 -S # -*- coding: utf-8 -*- """ `Unit tests for cargo.clients.create_pool` --·--·--·--·--·--·--·--·--·--·--·--·--·--·--·--·--·--·--·--·--·--·--·--·--·--·-- 2016 Jared Lunde © The MIT License (MIT) http://github.com/jaredlunde """ import unittest from multiprocessing import cpu_count from ca...
385
119
23
6790a9fa05d96e048617e89c7439e1a024eb557c
1,637
py
Python
scripts/polygon2cog_test.py
itko/scanbox
9a00c11eafb4cc2faa69bfcc76bdf0d8e295dcf3
[ "BSD-3-Clause" ]
1
2020-01-09T09:30:23.000Z
2020-01-09T09:30:23.000Z
scripts/polygon2cog_test.py
itko/scanbox
9a00c11eafb4cc2faa69bfcc76bdf0d8e295dcf3
[ "BSD-3-Clause" ]
23
2018-03-19T20:54:52.000Z
2018-05-16T12:36:59.000Z
scripts/polygon2cog_test.py
itko/scanbox
9a00c11eafb4cc2faa69bfcc76bdf0d8e295dcf3
[ "BSD-3-Clause" ]
1
2018-03-14T20:00:43.000Z
2018-03-14T20:00:43.000Z
import polygon2cog as p2c import unittest import numpy as np if __name__ == '__main__': unittest.main()
37.204545
86
0.597434
import polygon2cog as p2c import unittest import numpy as np def normalize(v): return v / np.linalg.norm(v) class TestComputeNearestPoints(unittest.TestCase): def test_general_close(self): ray1 = (np.array([0,0,3]), normalize(np.array([3,2,-1]) - np.array([0,0,3]))) ray2 = (np.array([-3,0,0]),...
1,351
51
121
1f621b763bacb3fda0ec7e2435b7a4eff36b6eed
4,405
py
Python
icecaps/decoding/basic_decoder_custom.py
janithwanni/icecaps
15efca1b896478f37b520385d591ae8bbac3e0e1
[ "MIT" ]
277
2019-07-31T17:23:42.000Z
2022-01-28T11:19:16.000Z
icecaps/decoding/basic_decoder_custom.py
janithwanni/icecaps
15efca1b896478f37b520385d591ae8bbac3e0e1
[ "MIT" ]
15
2019-09-04T14:28:38.000Z
2022-03-31T09:18:11.000Z
icecaps/decoding/basic_decoder_custom.py
janithwanni/icecaps
15efca1b896478f37b520385d591ae8bbac3e0e1
[ "MIT" ]
47
2019-08-29T19:54:48.000Z
2021-09-18T05:30:07.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import tensorflow as tf from tensorflow.contrib.seq2seq.python.ops import basic_decoder from tensorflow.python.framework import ops from tensorflow.python.ops import nn_ops from tensorflow.py...
37.330508
95
0.657662
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import tensorflow as tf from tensorflow.contrib.seq2seq.python.ops import basic_decoder from tensorflow.python.framework import ops from tensorflow.python.ops import nn_ops from tensorflow.py...
718
107
75
d96772e57682557ed5f4d64394823e3044fe3ddd
4,666
py
Python
voice_enhance/architectures/baseline/discriminator.py
ericlearning/Progressive-Image-Translation-Network
972c54dfdbc4c065328f7fc54b2b47c2cefcc609
[ "MIT" ]
2
2019-05-11T12:25:55.000Z
2019-10-17T16:10:34.000Z
voice_enhance/architectures/baseline/discriminator.py
ericlearning/Progressive-Image-Translation-Network
972c54dfdbc4c065328f7fc54b2b47c2cefcc609
[ "MIT" ]
null
null
null
voice_enhance/architectures/baseline/discriminator.py
ericlearning/Progressive-Image-Translation-Network
972c54dfdbc4c065328f7fc54b2b47c2cefcc609
[ "MIT" ]
null
null
null
import math import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.utils.spectral_norm as SpectralNorm
31.106667
159
0.668453
import math import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.utils.spectral_norm as SpectralNorm def get_norm(norm_type, size): if(norm_type == 'batchnorm'): return nn.BatchNorm2d(size) elif(norm_type == 'instancenorm'): return nn.InstanceNorm2d(size) class N...
4,180
31
305
0d4bc0f5f535c2a14ab30e726f897a769f6a43fb
269
py
Python
afterglow_core/views/ajax_api/__init__.py
SkynetRTN/afterglow-access-server
3d8d62f622577fdd1ae7b0076cb536251f7bf0cd
[ "Apache-2.0" ]
2
2021-05-24T15:12:07.000Z
2022-02-17T19:58:16.000Z
afterglow_core/views/ajax_api/__init__.py
SkynetRTN/afterglow-access-server
3d8d62f622577fdd1ae7b0076cb536251f7bf0cd
[ "Apache-2.0" ]
1
2022-02-27T03:01:06.000Z
2022-02-27T03:01:06.000Z
afterglow_core/views/ajax_api/__init__.py
SkynetRTN/afterglow-access-server
3d8d62f622577fdd1ae7b0076cb536251f7bf0cd
[ "Apache-2.0" ]
2
2021-06-08T18:16:40.000Z
2021-07-09T14:19:49.000Z
""" Afterglow Core: AJAX API endpoints """ url_prefix = '/ajax/' from .app_authorizations import * from .tokens import * from .sessions import * from .initialize import * from .oauth2_providers import * from .oauth2_clients import * from .server_status import *
14.157895
34
0.736059
""" Afterglow Core: AJAX API endpoints """ url_prefix = '/ajax/' from .app_authorizations import * from .tokens import * from .sessions import * from .initialize import * from .oauth2_providers import * from .oauth2_clients import * from .server_status import *
0
0
0