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
a7f04927312c54fd0baf48c57fcf9282e128c3f1
7,107
py
Python
tests/test_file.py
kellerjustin/keyrings.cryptfile
85b7735b937ecd5bbf0720092586b74e737d86a6
[ "MIT" ]
null
null
null
tests/test_file.py
kellerjustin/keyrings.cryptfile
85b7735b937ecd5bbf0720092586b74e737d86a6
[ "MIT" ]
null
null
null
tests/test_file.py
kellerjustin/keyrings.cryptfile
85b7735b937ecd5bbf0720092586b74e737d86a6
[ "MIT" ]
null
null
null
import os import tempfile import sys import errno import getpass import configparser import pytest from unittest import mock from keyring.testing.backend import BackendBasicTests from keyring.testing.util import random_string from keyrings.cryptfile import file from keyrings.cryptfile.file_base import encodebytes fr...
34.333333
76
0.658084
import os import tempfile import sys import errno import getpass import configparser import pytest from unittest import mock from keyring.testing.backend import BackendBasicTests from keyring.testing.util import random_string from keyrings.cryptfile import file from keyrings.cryptfile.file_base import encodebytes fr...
4,988
1,618
69
a7458a46e77f76c9090f89ed0eaea5db0320edcc
7,947
py
Python
src/flags.py
whoji/castle2048
5532b92809927b04d5ab5f3f9f3f8652ed7901e5
[ "MIT" ]
null
null
null
src/flags.py
whoji/castle2048
5532b92809927b04d5ab5f3f9f3f8652ed7901e5
[ "MIT" ]
null
null
null
src/flags.py
whoji/castle2048
5532b92809927b04d5ab5f3f9f3f8652ed7901e5
[ "MIT" ]
null
null
null
import math import pygame from pygame.locals import * class Flags(object): """docstring for Flags""" # def __get_sound(self): # self.sounds = { # 'move' : pygame.mixer.Sound(self.proj_path + 'asset/sound/Coin_1.wav'), # 'merge' : pygame.mixer.Sound(self.proj_path + 'asset/...
42.497326
96
0.600101
import math import pygame from pygame.locals import * class Flags(object): """docstring for Flags""" def __init__(self): self.game_name = 'Castle 2048' self.game_ver = '0.13.apha.190203' self.proj_path = './' self.save_path = './save/' self.debug_mod = False sel...
7,331
0
162
a9528b7459fa88a7e299377df8afca39ca1c719d
2,836
py
Python
main/models.py
lixianjing/HFMS
3b97ddc6062140fd22232a2e9bdf205e91a4405a
[ "Apache-2.0" ]
1
2019-11-22T03:24:25.000Z
2019-11-22T03:24:25.000Z
main/models.py
lixianjing/HFMS
3b97ddc6062140fd22232a2e9bdf205e91a4405a
[ "Apache-2.0" ]
null
null
null
main/models.py
lixianjing/HFMS
3b97ddc6062140fd22232a2e9bdf205e91a4405a
[ "Apache-2.0" ]
null
null
null
# This is an auto-generated Django model module. # You'll have to do the following manually to clean this up: # * Rearrange models' order # * Make sure each model has one field with primary_key=True # * Make sure each ForeignKey has `on_delete` set to the desired behavior. # * Remove `managed = False` lines if ...
36.358974
112
0.711566
# This is an auto-generated Django model module. # You'll have to do the following manually to clean this up: # * Rearrange models' order # * Make sure each model has one field with primary_key=True # * Make sure each ForeignKey has `on_delete` set to the desired behavior. # * Remove `managed = False` lines if ...
0
2,216
115
0fb25e247aa94c339a444ab4b66d0fa2df220639
2,128
py
Python
test-framework/test-suites/integration/tests/report/test_report_host_route.py
knutsonchris/stacki
33087dd5fa311984a66ccecfeee6f9c2c25f665d
[ "BSD-3-Clause" ]
123
2015-05-12T23:36:45.000Z
2017-07-05T23:26:57.000Z
test-framework/test-suites/integration/tests/report/test_report_host_route.py
knutsonchris/stacki
33087dd5fa311984a66ccecfeee6f9c2c25f665d
[ "BSD-3-Clause" ]
177
2015-06-05T19:17:47.000Z
2017-07-07T17:57:24.000Z
test-framework/test-suites/integration/tests/report/test_report_host_route.py
knutsonchris/stacki
33087dd5fa311984a66ccecfeee6f9c2c25f665d
[ "BSD-3-Clause" ]
32
2015-06-07T02:25:03.000Z
2017-06-23T07:35:35.000Z
import json
28
100
0.699718
import json class TestReportHostRoute: def test_scope_resolving(self, host, add_host_with_interface, add_environment, host_os, test_file): # Add our host to the test environment result = host.run('stack set host environment backend-0-0 environment=test') assert result.rc == 0 # Set the backend's interface t...
2,064
5
46
d3ab97481d24a0956b7f73d553025b68e0295cf2
4,662
py
Python
leaderboard_view.py
MCOxford/tile_miner
eefa0c8a31cf44e9b25ee3e779bc21b7ee79212e
[ "MIT" ]
null
null
null
leaderboard_view.py
MCOxford/tile_miner
eefa0c8a31cf44e9b25ee3e779bc21b7ee79212e
[ "MIT" ]
null
null
null
leaderboard_view.py
MCOxford/tile_miner
eefa0c8a31cf44e9b25ee3e779bc21b7ee79212e
[ "MIT" ]
null
null
null
import arcade import arcade.gui import menu_view from data_handler import DataHandler from arcade.gui import UIManager from constants import * import os dirname = os.path.dirname(__file__) button_normal = arcade.load_texture(os.path.join(dirname, 'images/red_button_normal.png')) hovered_texture = arcade.load_texture(...
34.791045
115
0.587731
import arcade import arcade.gui import menu_view from data_handler import DataHandler from arcade.gui import UIManager from constants import * import os dirname = os.path.dirname(__file__) button_normal = arcade.load_texture(os.path.join(dirname, 'images/red_button_normal.png')) hovered_texture = arcade.load_texture(...
169
0
50
d92117457af089c8066d24f4437d773bd086c5b1
506
py
Python
{{cookiecutter.package_name}}/tests/test_{{ cookiecutter.package_name }}.py
ryankanno/cookiecutter-py
4877ce8c6a0355b537da4985210c7c0d9db11e6c
[ "MIT" ]
2
2019-02-10T18:59:29.000Z
2021-07-12T22:38:40.000Z
{{cookiecutter.package_name}}/tests/test_{{ cookiecutter.package_name }}.py
ryankanno/cookiecutter-py
4877ce8c6a0355b537da4985210c7c0d9db11e6c
[ "MIT" ]
null
null
null
{{cookiecutter.package_name}}/tests/test_{{ cookiecutter.package_name }}.py
ryankanno/cookiecutter-py
4877ce8c6a0355b537da4985210c7c0d9db11e6c
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Tests for `{{ cookiecutter.package_name }}` package. """ from {{ cookiecutter.package_name }} import {{ cookiecutter.package_name }} class Test{{ cookiecutter.project_name|replace(' ', '')}}(object): @classmethod @classmethod # vim: filetype=python
20.24
77
0.644269
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Tests for `{{ cookiecutter.package_name }}` package. """ from {{ cookiecutter.package_name }} import {{ cookiecutter.package_name }} class Test{{ cookiecutter.project_name|replace(' ', '')}}(object): @classmethod def setup_class(cls): pass def ...
113
0
79
edc190d4b974d923978c79efd3cd10032b5cb503
22
py
Python
tccli/services/live/v20180801/__init__.py
ivandksun/tencentcloud-cli-intl-en
41b84e339918961b8bc92f7498e56347d21e16d3
[ "Apache-2.0" ]
null
null
null
tccli/services/live/v20180801/__init__.py
ivandksun/tencentcloud-cli-intl-en
41b84e339918961b8bc92f7498e56347d21e16d3
[ "Apache-2.0" ]
1
2022-02-07T13:39:09.000Z
2022-02-07T13:39:09.000Z
tccli/services/live/v20180801/__init__.py
ivandksun/tencentcloud-cli-intl-en
41b84e339918961b8bc92f7498e56347d21e16d3
[ "Apache-2.0" ]
4
2020-07-20T01:51:58.000Z
2021-08-13T08:25:22.000Z
version = "2018-08-01"
22
22
0.681818
version = "2018-08-01"
0
0
0
c92d12f759f6f32d63b1e4e6f645d878df664f1a
828
py
Python
fs/tests/test_basename.py
sturmianseq/python-fs
2567922ced9387e327e65f3244caff3b7af35684
[ "MIT" ]
27
2015-03-30T08:42:56.000Z
2022-02-02T01:18:48.000Z
fs/tests/test_basename.py
sturmianseq/python-fs
2567922ced9387e327e65f3244caff3b7af35684
[ "MIT" ]
8
2015-06-02T11:50:58.000Z
2022-02-27T18:51:14.000Z
fs/tests/test_basename.py
sturmianseq/python-fs
2567922ced9387e327e65f3244caff3b7af35684
[ "MIT" ]
12
2015-03-30T08:42:59.000Z
2021-11-27T19:37:03.000Z
import fs from .setup import *
21.230769
46
0.601449
import fs from .setup import * def test_basename_from_path(): _filename = 'test' _ext = ".txt" _file = "foo/bar/%s%s" % (_filename, _ext) _base = fs.basename(_file) assert _base == "%s%s" % (_filename, _ext) def test_basename_from_file(): _filename = 'test' _ext = ".txt" _file = "%...
705
0
92
c5a555a8b9b1cb1e5f2287edaf048bdd98415f62
273
py
Python
scraper/urls.py
yujhenchen/boulderingScraper
03d3c0bb0cb25b783476edd9150bd94413dd08a4
[ "MIT" ]
null
null
null
scraper/urls.py
yujhenchen/boulderingScraper
03d3c0bb0cb25b783476edd9150bd94413dd08a4
[ "MIT" ]
2
2021-11-25T23:30:13.000Z
2021-11-28T14:51:44.000Z
scraper/urls.py
yujhenchen/boulderingScraper
03d3c0bb0cb25b783476edd9150bd94413dd08a4
[ "MIT" ]
null
null
null
from django.urls import path from . import views urlpatterns = [ path('', views.index, name='index'), path('competitions', views.competitions, name='competitions'), path('athletes', views.athletes, name='athletes'), path('news', views.news, name='news') ]
27.3
66
0.673993
from django.urls import path from . import views urlpatterns = [ path('', views.index, name='index'), path('competitions', views.competitions, name='competitions'), path('athletes', views.athletes, name='athletes'), path('news', views.news, name='news') ]
0
0
0
78f99f79e162e5576845d61737e73b44e165cf59
3,110
py
Python
examples/Sales_Copy/run_feature_benefits.py
paigebranam/Halldon_
1f02878e39e818055f86b8db570f30ae280948dc
[ "MIT" ]
null
null
null
examples/Sales_Copy/run_feature_benefits.py
paigebranam/Halldon_
1f02878e39e818055f86b8db570f30ae280948dc
[ "MIT" ]
null
null
null
examples/Sales_Copy/run_feature_benefits.py
paigebranam/Halldon_
1f02878e39e818055f86b8db570f30ae280948dc
[ "MIT" ]
null
null
null
##updated api path, engine, top p ##Runs as expected import os import sys API_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..') sys.path.append(API_PATH) from api import GPT, Example, UIConfig # Construct GPT object and show some examples gpt = GPT(engine="curie-instruct-beta", ...
51.833333
151
0.749839
##updated api path, engine, top p ##Runs as expected import os import sys API_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..') sys.path.append(API_PATH) from api import GPT, Example, UIConfig # Construct GPT object and show some examples gpt = GPT(engine="curie-instruct-beta", ...
0
0
0
3ea22cc355f99d35ee6009dc89e48eddc997383e
4,875
py
Python
Transposon.py
blakedallen/transposon
c94c2a9323a0f20042068bf75f3736ca51b1f239
[ "MIT" ]
null
null
null
Transposon.py
blakedallen/transposon
c94c2a9323a0f20042068bf75f3736ca51b1f239
[ "MIT" ]
null
null
null
Transposon.py
blakedallen/transposon
c94c2a9323a0f20042068bf75f3736ca51b1f239
[ "MIT" ]
null
null
null
import numpy as np from random import randint class Transposon(object): """ Transposon is our general class used for evolutionary algorithms applied to vectors""" def initialize(self): """ sets up our population and asserts our fitness func is of correct type """ assert self.mutation_rate >= 0.0 assert...
31.451613
102
0.726974
import numpy as np from random import randint class Transposon(object): """ Transposon is our general class used for evolutionary algorithms applied to vectors""" def __init__(self, vector_len=100, fitness_func=None, min_value=0, max_value=100, population_size=1000, max_fitness=1.0, max_gen...
623
0
24
f50d60ba29fb57d14a40dc72e1e8a1b0b30c5600
1,170
py
Python
google codejam/sorting/Reversort engineering/Answer.py
theCodeTeen/CP_Collection
78a0a564e8da47038232b0cca6f26153725af029
[ "MIT" ]
null
null
null
google codejam/sorting/Reversort engineering/Answer.py
theCodeTeen/CP_Collection
78a0a564e8da47038232b0cca6f26153725af029
[ "MIT" ]
null
null
null
google codejam/sorting/Reversort engineering/Answer.py
theCodeTeen/CP_Collection
78a0a564e8da47038232b0cca6f26153725af029
[ "MIT" ]
null
null
null
for i in range(int(input())): solution() #Author: Dharmik Bhadra
20.892857
57
0.460684
def createArray(no): arr=[] for i in range(1,no+1): arr.append(i) return arr def ArrayOpp(no,cost): if cost<no-1: return [] arr=[] t=0 c=1 for i in range(no-1,0,-1): c+=1 if t+c+i-1>=cost: r=cost-t-i+1 ...
993
0
99
8bfdb2468a7478d911bc550aafd9389c3602480f
1,061
py
Python
Chapter08/SVector2D.py
fengsong77/ai-game-python
ed47596c5ed9989b344069b07bef055c8c0560e9
[ "MIT" ]
5
2017-06-15T02:08:08.000Z
2021-05-24T12:17:04.000Z
Chapter08/SVector2D.py
fengsong77/ai-game-python
ed47596c5ed9989b344069b07bef055c8c0560e9
[ "MIT" ]
2
2017-10-20T22:23:45.000Z
2018-12-02T13:17:34.000Z
Chapter09/SVector2D.py
crazyskady/ai-game-python
ed47596c5ed9989b344069b07bef055c8c0560e9
[ "MIT" ]
5
2017-10-23T15:02:20.000Z
2021-06-06T08:28:36.000Z
# -*- coding: utf-8 -*- from math import sqrt
25.261905
156
0.694628
# -*- coding: utf-8 -*- from math import sqrt class SVector2D(object): def __init__(self, a=0.0, b=0.0): self._x = a self._y = b return def __add__(self, rhs): return SVector2D(self._x+rhs._x, self._y+rhs._y) def __sub__(self, rhs): return SVector2D(self._x-rhs._x, self._y-rhs._y) def __mul__(self, r...
793
3
234
fe62a3b8c957cd45f1e51b3e86c79f886f93ff1a
6,443
py
Python
xTool/utils/throttle.py
luciferliu/xTools
324ef1388be13ece0d952e3929eb685212d573f1
[ "Apache-2.0" ]
2
2020-09-02T13:46:06.000Z
2020-10-11T16:11:02.000Z
xTool/utils/throttle.py
luciferliu/xTools
324ef1388be13ece0d952e3929eb685212d573f1
[ "Apache-2.0" ]
null
null
null
xTool/utils/throttle.py
luciferliu/xTools
324ef1388be13ece0d952e3929eb685212d573f1
[ "Apache-2.0" ]
4
2018-10-15T07:08:34.000Z
2019-11-26T01:52:47.000Z
# coding: utf-8 from builtins import object import time import threading from xTool.compat import PY3 if PY3: from threading import BoundedSemaphore else: from threading import _BoundedSemaphore as BoundedSemaphore class BoundedEmptySemaphore(BoundedSemaphore): """ A bounded semaphore that is initia...
35.794444
97
0.652025
# coding: utf-8 from builtins import object import time import threading from xTool.compat import PY3 if PY3: from threading import BoundedSemaphore else: from threading import _BoundedSemaphore as BoundedSemaphore class BoundedEmptySemaphore(BoundedSemaphore): """ A bounded semaphore that is initia...
1,692
0
216
8a58b8624f19ba243cc918e2073ff83514cb5c53
12,589
py
Python
pyperator/components.py
baffelli/pyperator
4b4d176db993708dc1f7d8cec048d490910213b7
[ "MIT" ]
60
2017-03-18T10:01:16.000Z
2021-12-07T02:55:43.000Z
pyperator/components.py
baffelli/pyperator
4b4d176db993708dc1f7d8cec048d490910213b7
[ "MIT" ]
14
2017-04-11T06:10:02.000Z
2018-03-16T12:40:20.000Z
pyperator/components.py
baffelli/pyperator
4b4d176db993708dc1f7d8cec048d490910213b7
[ "MIT" ]
8
2017-11-01T11:33:34.000Z
2019-12-01T22:58:38.000Z
import asyncio import glob as _glob import itertools as _iter import pathlib as _path import random as _rand import functools from pyperator import IP from pyperator.nodes import Component from pyperator.utils import InputPort, OutputPort, FilePort from pyperator.decorators import log_schedule, component, inport, out...
30.408213
110
0.614902
import asyncio import glob as _glob import itertools as _iter import pathlib as _path import random as _rand import functools from pyperator import IP from pyperator.nodes import Component from pyperator.utils import InputPort, OutputPort, FilePort from pyperator.decorators import log_schedule, component, inport, out...
6,296
78
660
2d668f7d5d669b88f263c0a3f968ec638e5cf693
13,224
py
Python
utils.py
sabernn/vit-pytorch
21a2671aa92adb941a56ae629f6089f550949fb2
[ "MIT" ]
null
null
null
utils.py
sabernn/vit-pytorch
21a2671aa92adb941a56ae629f6089f550949fb2
[ "MIT" ]
null
null
null
utils.py
sabernn/vit-pytorch
21a2671aa92adb941a56ae629f6089f550949fb2
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod from skimage.io import imread, imshow import matplotlib.pyplot as plt import random import numpy as np import matplotlib.patches as patches import os from torch.utils.data import Dataset, DataLoader import torch import glob if __name__ == "__main__": from co...
35.934783
143
0.588627
from abc import ABC, abstractmethod from skimage.io import imread, imshow import matplotlib.pyplot as plt import random import numpy as np import matplotlib.patches as patches import os from torch.utils.data import Dataset, DataLoader import torch import glob class DataGeneratorBase(ABC): @abstractmethod def _...
11,115
839
505
b9b60d6ad866148924253fa5069e7e37944c754b
429
py
Python
docs/src/development/sending_data/sending_data0.py
ExpressApp/pybotx
97c8b1ce5d45a05567ed01d545cb43174a2dcbb9
[ "MIT" ]
13
2021-01-21T12:43:10.000Z
2022-03-23T11:11:59.000Z
docs/src/development/sending_data/sending_data0.py
ExpressApp/pybotx
97c8b1ce5d45a05567ed01d545cb43174a2dcbb9
[ "MIT" ]
259
2020-02-26T08:51:03.000Z
2022-03-23T11:08:36.000Z
docs/src/development/sending_data/sending_data0.py
ExpressApp/pybotx
97c8b1ce5d45a05567ed01d545cb43174a2dcbb9
[ "MIT" ]
5
2019-12-02T16:19:22.000Z
2021-11-22T20:33:34.000Z
from uuid import UUID from botx import Bot, SendingMessage bot = Bot() CHAT_ID = UUID("1f972f5e-6d17-4f39-be5b-f7e20f1b4d13") BOT_ID = UUID("cc257e1c-c028-4181-a055-01e14ba881b0") CTS_HOST = "my-cts.example.com"
22.578947
54
0.678322
from uuid import UUID from botx import Bot, SendingMessage bot = Bot() CHAT_ID = UUID("1f972f5e-6d17-4f39-be5b-f7e20f1b4d13") BOT_ID = UUID("cc257e1c-c028-4181-a055-01e14ba881b0") CTS_HOST = "my-cts.example.com" async def some_function() -> None: message = SendingMessage( text="You were chosen by random...
191
0
23
c528820d645082e6638ab570ab1da8de5ad7a2d4
9,573
py
Python
src/repair_ss.py
noemiefedon/RELAY
1bf9c27ee1bcf1be0a7652fcca0ea38dd47b14b8
[ "MIT" ]
1
2020-12-07T22:18:22.000Z
2020-12-07T22:18:22.000Z
src/repair_ss.py
noemiefedon/RELAY
1bf9c27ee1bcf1be0a7652fcca0ea38dd47b14b8
[ "MIT" ]
null
null
null
src/repair_ss.py
noemiefedon/RELAY
1bf9c27ee1bcf1be0a7652fcca0ea38dd47b14b8
[ "MIT" ]
1
2021-12-02T22:19:02.000Z
2021-12-02T22:19:02.000Z
# -*- coding: utf-8 -*- """ Repair strategy - repair_ss: attempts at repairing a stacking sequence for the following constraints: - damage tolerance - contiguity - disorientation - 10% rule - balance """ __version__ = '2.0' __author__ = 'Noemie Fedon' import sys import nump...
39.8875
83
0.598872
# -*- coding: utf-8 -*- """ Repair strategy - repair_ss: attempts at repairing a stacking sequence for the following constraints: - damage tolerance - contiguity - disorientation - 10% rule - balance """ __version__ = '2.0' __author__ = 'Noemie Fedon' import sys import nump...
0
0
0
1d6bc2617865ad3a16bc19f3c20563f15c78f3ea
1,488
py
Python
navrep/scripts/check_vae1d.py
ReykCS/navrep
22ee4727268188414a8121f069e45c2ab798ca19
[ "MIT" ]
48
2020-11-26T10:16:08.000Z
2022-03-24T15:22:08.000Z
navrep/scripts/check_vae1d.py
ReykCS/navrep
22ee4727268188414a8121f069e45c2ab798ca19
[ "MIT" ]
1
2021-12-14T02:08:18.000Z
2022-03-14T09:17:25.000Z
navrep/scripts/check_vae1d.py
ReykCS/navrep
22ee4727268188414a8121f069e45c2ab798ca19
[ "MIT" ]
18
2020-12-09T08:37:43.000Z
2022-03-30T06:56:38.000Z
from __future__ import print_function import numpy as np import os from sensor_msgs.msg import LaserScan from navrep.tools.data_extraction import archive_to_lidar_dataset from navrep.models.vae1d import Conv1DVAE, reset_graph DEBUG_PLOTTING = True # Parameters for training batch_size = 100 N_SCANS_PER_BATCH = 1 NUM_...
24
79
0.715726
from __future__ import print_function import numpy as np import os from sensor_msgs.msg import LaserScan from navrep.tools.data_extraction import archive_to_lidar_dataset from navrep.models.vae1d import Conv1DVAE, reset_graph DEBUG_PLOTTING = True # Parameters for training batch_size = 100 N_SCANS_PER_BATCH = 1 NUM_...
0
0
0
8fc85758ed23c6729ca478f239feae24bd8a47fe
2,320
py
Python
module/passive/dns_record.py
b1ackc4t/getdomain
0d1d31c9abf1d3293d113bff46c400b246434807
[ "Apache-2.0" ]
null
null
null
module/passive/dns_record.py
b1ackc4t/getdomain
0d1d31c9abf1d3293d113bff46c400b246434807
[ "Apache-2.0" ]
null
null
null
module/passive/dns_record.py
b1ackc4t/getdomain
0d1d31c9abf1d3293d113bff46c400b246434807
[ "Apache-2.0" ]
1
2021-11-24T09:22:38.000Z
2021-11-24T09:22:38.000Z
# modules in standard library import re from urllib.parse import urlparse import requests from selenium import webdriver from selenium.webdriver.common.keys import Keys #需要引入 keys 包 import time def main(domain): """ 主函数,只需执行它就能get子域名 :param domain: :return: """ dns_record = DnsR...
29.74359
135
0.580603
# modules in standard library import re from urllib.parse import urlparse import requests from selenium import webdriver from selenium.webdriver.common.keys import Keys #需要引入 keys 包 import time class DnsRecord(object): def __init__(self, domain): """ 初始化基本信息 :param target: 要扫描...
1,305
601
24
878ce46586d03f4554547045ef951e1fae7509e8
41
py
Python
venv/lib/python3.6/encodings/utf_16_be.py
JamesMusyoka/Blog
fdcb51cf4541bbb3b9b3e7a1c3735a0b1f45f0b5
[ "Unlicense" ]
2
2019-04-17T13:35:50.000Z
2021-12-21T00:11:36.000Z
venv/lib/python3.6/encodings/utf_16_be.py
JamesMusyoka/Blog
fdcb51cf4541bbb3b9b3e7a1c3735a0b1f45f0b5
[ "Unlicense" ]
2
2021-03-31T19:51:24.000Z
2021-06-10T23:05:09.000Z
venv/lib/python3.6/encodings/utf_16_be.py
JamesMusyoka/Blog
fdcb51cf4541bbb3b9b3e7a1c3735a0b1f45f0b5
[ "Unlicense" ]
2
2019-10-01T08:47:35.000Z
2020-07-11T06:32:16.000Z
/usr/lib/python3.6/encodings/utf_16_be.py
41
41
0.829268
/usr/lib/python3.6/encodings/utf_16_be.py
0
0
0
6ab189934782a1fb160cd1818c8c88eaeb7c5a43
1,110
py
Python
interstitial/managers.py
invisiblehands/django-interstitial
04bd811e180c8bb94bad04198228acbf6c5e7cff
[ "MIT" ]
null
null
null
interstitial/managers.py
invisiblehands/django-interstitial
04bd811e180c8bb94bad04198228acbf6c5e7cff
[ "MIT" ]
null
null
null
interstitial/managers.py
invisiblehands/django-interstitial
04bd811e180c8bb94bad04198228acbf6c5e7cff
[ "MIT" ]
null
null
null
from datetime import datetime from django.db import models from django.conf import settings from django.core.cache import get_cache
27.75
65
0.626126
from datetime import datetime from django.db import models from django.conf import settings from django.core.cache import get_cache class InterstitialManager(models.Manager): def get_interstitial(self): caching = getattr(settings, 'INTERSTITIAL_CACHE', True) if caching: cache = get_ca...
878
21
76
c4e22ffc44e425009a479fb44c3a678354488d3c
3,959
py
Python
wordsearch/main.py
maxrothman/wordsearch
026187c994a4510d32f54223988be0787ca698ce
[ "MIT" ]
null
null
null
wordsearch/main.py
maxrothman/wordsearch
026187c994a4510d32f54223988be0787ca698ce
[ "MIT" ]
null
null
null
wordsearch/main.py
maxrothman/wordsearch
026187c994a4510d32f54223988be0787ca698ce
[ "MIT" ]
null
null
null
# Ensure that accidentally-raised StopIterations are transformed to RuntimeErrors # Livin' in the future! from __future__ import generator_stop from wordsearch.board import Board import string, random def start_board_run(start, direction, board): """ A generator that yields successive values of "board" starting ...
32.45082
102
0.667593
# Ensure that accidentally-raised StopIterations are transformed to RuntimeErrors # Livin' in the future! from __future__ import generator_stop from wordsearch.board import Board import string, random def start_board_run(start, direction, board): """ A generator that yields successive values of "board" starting ...
0
0
0
5dd5b3aaa3549ee4e2e1c9dfd185b4953bf00728
3,575
py
Python
sdk/python/pulumi_aws/ebs/get_snapshot_ids.py
JakeGinnivan/pulumi-aws
c91ef78932964ac74eda7f5da81f65b0f1798c93
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/ebs/get_snapshot_ids.py
JakeGinnivan/pulumi-aws
c91ef78932964ac74eda7f5da81f65b0f1798c93
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/ebs/get_snapshot_ids.py
JakeGinnivan/pulumi-aws
c91ef78932964ac74eda7f5da81f65b0f1798c93
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import json import warnings import pulumi import pulumi.runtime from typing import Union from .. import utilities, tables class GetSna...
34.708738
112
0.643077
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import json import warnings import pulumi import pulumi.runtime from typing import Union from .. import utilities, tables class GetSna...
1,253
37
74
94aa194bc312507a4ff1a92f580f44183d5dd89f
1,067
py
Python
tasks/broken-transmitter/exploit.py
chankruze/qctf-school-2018
1e732cf264ee0a94bc2fc1fd8cf3a20660d57605
[ "MIT" ]
null
null
null
tasks/broken-transmitter/exploit.py
chankruze/qctf-school-2018
1e732cf264ee0a94bc2fc1fd8cf3a20660d57605
[ "MIT" ]
null
null
null
tasks/broken-transmitter/exploit.py
chankruze/qctf-school-2018
1e732cf264ee0a94bc2fc1fd8cf3a20660d57605
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import re import requests from time import sleep from argparse import ArgumentParser if __name__ == '__main__': args = get_args() data = '' pattern = 'QCTF{.*?}' while not re.search(pattern, data): update = requests.get('%s/%s/' % (args.url, args.token)).text hexc...
29.638889
103
0.612933
#!/usr/bin/python3 import re import requests from time import sleep from argparse import ArgumentParser def get_args(): parser = ArgumentParser() parser.add_argument('--url', help='server address (with http)', required=True) parser.add_argument('--token', help='your token', required=True) parser.add...
311
0
23
3613506af86ab39ddcebe6227a8d8d4a204e0b51
1,031
py
Python
mayan/apps/documents/migrations/0025_auto_20150718_0742.py
nattangwiwat/Mayan-EDMS-recitation
fcf16afb56eae812fb99144d65ae1ae6749de0b7
[ "Apache-2.0" ]
343
2015-01-05T14:19:35.000Z
2018-12-10T19:07:48.000Z
mayan/apps/documents/migrations/0025_auto_20150718_0742.py
nattangwiwat/Mayan-EDMS-recitation
fcf16afb56eae812fb99144d65ae1ae6749de0b7
[ "Apache-2.0" ]
191
2015-01-03T00:48:19.000Z
2018-11-30T09:10:25.000Z
mayan/apps/documents/migrations/0025_auto_20150718_0742.py
nattangwiwat/Mayan-EDMS-recitation
fcf16afb56eae812fb99144d65ae1ae6749de0b7
[ "Apache-2.0" ]
257
2019-05-14T10:26:37.000Z
2022-03-30T03:37:36.000Z
import pycountry from django.db import migrations
32.21875
87
0.669253
import pycountry from django.db import migrations def operation_change_bibliographic_to_terminology(apps, schema_editor): Document = apps.get_model(app_label='documents', model_name='Document') for document in Document.objects.using(alias=schema_editor.connection.alias).all(): try: langu...
730
202
46
edfc96ae8b85b7ba7a88f0bebf54e995343650f3
550
py
Python
nisyscfg/types.py
tkrebes/nisyscfg-python
080cec262a30bfc2b00f703996d2ad896578a67a
[ "MIT" ]
2
2021-12-17T15:41:35.000Z
2021-12-17T15:41:37.000Z
nisyscfg/types.py
tkrebes/nisyscfg-python
080cec262a30bfc2b00f703996d2ad896578a67a
[ "MIT" ]
3
2020-12-08T16:43:36.000Z
2022-01-23T15:50:02.000Z
nisyscfg/types.py
tkrebes/nisyscfg-python
080cec262a30bfc2b00f703996d2ad896578a67a
[ "MIT" ]
null
null
null
# This file is code generated import ctypes simple_string = ctypes.c_char * 1024 UInt64 = ctypes.c_ulonglong ResourceHandle = ctypes.c_void_p EnumResourceHandle = ctypes.c_void_p EnumSoftwareFeedHandle = ctypes.c_void_p SessionHandle = ctypes.c_void_p TimestampUTC = ctypes.c_uint * 4 EnumSoftwareComponentHandle = ct...
27.5
45
0.84
# This file is code generated import ctypes simple_string = ctypes.c_char * 1024 UInt64 = ctypes.c_ulonglong ResourceHandle = ctypes.c_void_p EnumResourceHandle = ctypes.c_void_p EnumSoftwareFeedHandle = ctypes.c_void_p SessionHandle = ctypes.c_void_p TimestampUTC = ctypes.c_uint * 4 EnumSoftwareComponentHandle = ct...
0
0
0
66871c8115c9f515390aa21924d566cce16565d8
1,248
py
Python
web/wine/app.py
afnom/what-the-ctf-2020
9df5a18d911235d483383762b2fc6426ea95f239
[ "MIT" ]
null
null
null
web/wine/app.py
afnom/what-the-ctf-2020
9df5a18d911235d483383762b2fc6426ea95f239
[ "MIT" ]
null
null
null
web/wine/app.py
afnom/what-the-ctf-2020
9df5a18d911235d483383762b2fc6426ea95f239
[ "MIT" ]
null
null
null
import os import random import string from flask import Flask, render_template, request, redirect, url_for app = Flask(__name__) COMPLAINTS_DIR = 'complaints' os.makedirs(COMPLAINTS_DIR, exist_ok=True) @app.route('/') @app.route('/complaint', methods=['GET']) @app.route('/complaint', methods=['POST']) if __name__ ...
26
83
0.657051
import os import random import string from flask import Flask, render_template, request, redirect, url_for app = Flask(__name__) COMPLAINTS_DIR = 'complaints' os.makedirs(COMPLAINTS_DIR, exist_ok=True) @app.route('/') def index(): return render_template('index.html') @app.route('/complaint', methods=['GET']) def...
785
0
89
36f3d68a22be7887c4f965e6b8da30455045f47a
1,482
py
Python
sky_visitor/template_email_senders.py
Apkawa/django-sky-visitor
817f850a7ca4e3c7f2568ffdd2c2ddd0cf47cdad
[ "Apache-2.0" ]
null
null
null
sky_visitor/template_email_senders.py
Apkawa/django-sky-visitor
817f850a7ca4e3c7f2568ffdd2c2ddd0cf47cdad
[ "Apache-2.0" ]
null
null
null
sky_visitor/template_email_senders.py
Apkawa/django-sky-visitor
817f850a7ca4e3c7f2568ffdd2c2ddd0cf47cdad
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from django.template import Template, Context, loader, TemplateDoesNotExist from django.contrib.sites.models import Site from django.core.mail import EmailMultiAlternatives from django.template.defaultfilters import striptags
32.933333
75
0.687584
# -*- coding: utf-8 -*- from django.template import Template, Context, loader, TemplateDoesNotExist from django.contrib.sites.models import Site from django.core.mail import EmailMultiAlternatives from django.template.defaultfilters import striptags class BaseTemplateSender(object): def send(self, template_name, ...
1,035
38
152
6a0b2d97f3797679b5ea29d4d7c1f4d1cb65ce03
387
py
Python
2019/exam_solutions-2019December/question8.py
ati-ozgur/course-python
38237d120043c07230658b56dc3aeb01c3364933
[ "Apache-2.0" ]
1
2021-02-04T16:59:11.000Z
2021-02-04T16:59:11.000Z
2019/exam_solutions-2019December/question8.py
ati-ozgur/course-python
38237d120043c07230658b56dc3aeb01c3364933
[ "Apache-2.0" ]
null
null
null
2019/exam_solutions-2019December/question8.py
ati-ozgur/course-python
38237d120043c07230658b56dc3aeb01c3364933
[ "Apache-2.0" ]
1
2019-10-30T14:37:48.000Z
2019-10-30T14:37:48.000Z
import string import random as rnd for u in range(1000): p1 = random_password() print(p1)
24.1875
56
0.666667
import string import random as rnd def random_password(length = 12): password = "" max = len(string.ascii_uppercase) for index in range(length): random_num = rnd.randint(1,max-1) random_char = string.ascii_uppercase[random_num] password = password + random_char return passwo...
266
0
22
0a5eb05ea3b413e02f36b8ed15446ad917f429ca
1,905
py
Python
jax/lib/__init__.py
jonasrauber/jax
7cbd58b6c6f910e1d7b762d7ed51a057be138976
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
jax/lib/__init__.py
jonasrauber/jax
7cbd58b6c6f910e1d7b762d7ed51a057be138976
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
jax/lib/__init__.py
jonasrauber/jax
7cbd58b6c6f910e1d7b762d7ed51a057be138976
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
35.943396
80
0.706037
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
610
0
22
fbf78c1bb99660c1fb41b25072ddb3f5ee24fe9c
1,178
py
Python
QBG/DataLoader/loaders/index_loader.py
GYMS-PKU/Daily-Frequency-Quant
808eda9930efecff04ecf98abf617404cadd0003
[ "MIT" ]
3
2021-11-21T04:35:04.000Z
2022-03-04T09:19:53.000Z
QBG/DataLoader/loaders/index_loader.py
GYMS-PKU/Daily-Frequency-Quant
808eda9930efecff04ecf98abf617404cadd0003
[ "MIT" ]
null
null
null
QBG/DataLoader/loaders/index_loader.py
GYMS-PKU/Daily-Frequency-Quant
808eda9930efecff04ecf98abf617404cadd0003
[ "MIT" ]
5
2021-10-03T00:00:22.000Z
2022-03-07T09:02:00.000Z
# Copyright (c) 2022 Dai HBG """ 获得日频指数成分股数据 日志 2022-01-05 - init,迁移原本功能 2022-01-08 - 更新:传入dates - 增量更新 2022-01-11 - 更新:新增多种指数 """ from jqdatasdk import * import os import pickle import numpy as np
28.731707
91
0.596774
# Copyright (c) 2022 Dai HBG """ 获得日频指数成分股数据 日志 2022-01-05 - init,迁移原本功能 2022-01-08 - 更新:传入dates - 增量更新 2022-01-11 - 更新:新增多种指数 """ from jqdatasdk import * import os import pickle import numpy as np def get_index(dates: np.array, data_path: str): lst = set(os.listdir('{}/StockDailyData'.format(data_path))) ...
975
0
23
fd991e55f95c4bfe4d2a0c5b935f235c33c3adea
360
py
Python
main.py
kotekpsotek/awesome-instaling
ccabd75b8dad899a297125fb888b52b1b9fd77f7
[ "MIT" ]
null
null
null
main.py
kotekpsotek/awesome-instaling
ccabd75b8dad899a297125fb888b52b1b9fd77f7
[ "MIT" ]
null
null
null
main.py
kotekpsotek/awesome-instaling
ccabd75b8dad899a297125fb888b52b1b9fd77f7
[ "MIT" ]
null
null
null
from get_set_login_data import get_login_data from instaling import start_instaling if __name__ == "__main__": main()
36
91
0.713889
from get_set_login_data import get_login_data from instaling import start_instaling def main(): login, password = get_login_data().values() # get login data and quick destructure them start_instaling(login, password) # start instaling # print("The login is: " + login + "\n" + "The password is: " + password...
215
0
23
72851db9122740699bd2adbb8f7f8a806d22f652
126
py
Python
opdracht-01.py
TPLxxA/pathways-python-opdrachten
e29da62cb91257afce2ff81acd23def68b082914
[ "Unlicense" ]
null
null
null
opdracht-01.py
TPLxxA/pathways-python-opdrachten
e29da62cb91257afce2ff81acd23def68b082914
[ "Unlicense" ]
null
null
null
opdracht-01.py
TPLxxA/pathways-python-opdrachten
e29da62cb91257afce2ff81acd23def68b082914
[ "Unlicense" ]
null
null
null
var = "Casper" print ("Value 1:", var) var = 23 print ("Value 2:", var) var = "You get the point" print ("Value 3:", var)
21
26
0.579365
var = "Casper" print ("Value 1:", var) var = 23 print ("Value 2:", var) var = "You get the point" print ("Value 3:", var)
0
0
0
724a1a0ea383615277b1e465022474b304dd6a5b
1,905
py
Python
tests/schema/product/gql/fragments/fragment_product.py
simonsobs/acondbs
6ca11c2889d827ecdb2b54d0cf3b94b8cdd281e6
[ "MIT" ]
null
null
null
tests/schema/product/gql/fragments/fragment_product.py
simonsobs/acondbs
6ca11c2889d827ecdb2b54d0cf3b94b8cdd281e6
[ "MIT" ]
24
2020-04-02T19:29:07.000Z
2022-03-08T03:05:43.000Z
tests/schema/product/gql/fragments/fragment_product.py
simonsobs/acondbs
6ca11c2889d827ecdb2b54d0cf3b94b8cdd281e6
[ "MIT" ]
1
2020-04-08T15:48:28.000Z
2020-04-08T15:48:28.000Z
FRAGMENT_PRODUCT = """ fragment fragmentProduct on Product { productId typeId type_ { typeId name } attributesUnicodeText { edges { node { name field { name type_ } value } } } attributesBoolean { edges { node { ...
12.7
37
0.379528
FRAGMENT_PRODUCT = """ fragment fragmentProduct on Product { productId typeId type_ { typeId name } attributesUnicodeText { edges { node { name field { name type_ } value } } } attributesBoolean { edges { node { ...
0
0
0
78c6be06d7717f86a877f33e3e064213195a0051
2,049
py
Python
backend/firebug_server/swagger_server/models/concentration_series.py
aandr/firebug
bae24a65994b0ed1ab0dc3c1295f884d526ae2ba
[ "MIT" ]
null
null
null
backend/firebug_server/swagger_server/models/concentration_series.py
aandr/firebug
bae24a65994b0ed1ab0dc3c1295f884d526ae2ba
[ "MIT" ]
7
2021-03-09T09:59:54.000Z
2022-02-26T13:14:59.000Z
backend/firebug_server/swagger_server/models/concentration_series.py
aandr/firebug
bae24a65994b0ed1ab0dc3c1295f884d526ae2ba
[ "MIT" ]
null
null
null
# coding: utf-8 from __future__ import absolute_import from datetime import date, datetime # noqa: F401 from typing import List, Dict # noqa: F401 from swagger_server.models.base_model_ import Model from swagger_server import util class ConcentrationSeries(Model): """NOTE: This class is auto generated by the...
30.58209
103
0.673987
# coding: utf-8 from __future__ import absolute_import from datetime import date, datetime # noqa: F401 from typing import List, Dict # noqa: F401 from swagger_server.models.base_model_ import Model from swagger_server import util class ConcentrationSeries(Model): """NOTE: This class is auto generated by the...
0
0
0
f0d0f00450724876d5e490a03f16b544916b1045
2,007
py
Python
src/Multithreading.py
ng-haste/pyNG-HASTE
c910e126ec1bf2a7be3afc7e587f782a6b3fc97a
[ "MIT" ]
null
null
null
src/Multithreading.py
ng-haste/pyNG-HASTE
c910e126ec1bf2a7be3afc7e587f782a6b3fc97a
[ "MIT" ]
null
null
null
src/Multithreading.py
ng-haste/pyNG-HASTE
c910e126ec1bf2a7be3afc7e587f782a6b3fc97a
[ "MIT" ]
null
null
null
from Algorithm import SearchTree, GraphContainer from multiprocessing import Process, Queue import time
25.0875
121
0.586447
from Algorithm import SearchTree, GraphContainer from multiprocessing import Process, Queue import time def runJob(env, container, q): tree = SearchTree(container, env) iterations = 0 startTime = time.time() for i in range(10000): if container.isEmpty(): break tree.nextIt...
1,831
0
69
56fb5246123ec3f1497bc6a06efa6f423a14c683
3,209
py
Python
test/testAuthentication.py
twissell-/anipy
331fa229c5d2a523de02254835c15eee91c4333b
[ "MIT" ]
14
2016-07-14T17:23:47.000Z
2021-07-02T02:39:55.000Z
test/testAuthentication.py
twissell-/anipy
331fa229c5d2a523de02254835c15eee91c4333b
[ "MIT" ]
4
2016-11-14T23:01:03.000Z
2021-06-22T15:02:14.000Z
test/testAuthentication.py
twissell-/anipy
331fa229c5d2a523de02254835c15eee91c4333b
[ "MIT" ]
3
2020-10-30T13:54:51.000Z
2022-03-05T16:56:01.000Z
from urllib3_mock import Responses from anipy import ( AuthenticationProvider, ) import os # from anipy.exception import AniException # from anipy.exception import InternalServerError # from anipy.exception import InvalidGrantException # from anipy.exception import InvalidRequestException # from anipy.exception ...
31.15534
67
0.599564
from urllib3_mock import Responses from anipy import ( AuthenticationProvider, ) import os # from anipy.exception import AniException # from anipy.exception import InternalServerError # from anipy.exception import InvalidGrantException # from anipy.exception import InvalidRequestException # from anipy.exception ...
371
2,465
23
e1d33fe276058ac77a26d51b4cdc63a4bb229f10
1,658
py
Python
ymir/backend/src/ymir_controller/controller/invoker/invoker_cmd_branch_list.py
Zhang-SJ930104/ymir
dd6481be6f229ade4cf8fba64ef44a15357430c4
[ "Apache-2.0" ]
64
2021-11-15T03:48:00.000Z
2022-03-25T07:08:46.000Z
ymir/backend/src/ymir_controller/controller/invoker/invoker_cmd_branch_list.py
Zhang-SJ930104/ymir
dd6481be6f229ade4cf8fba64ef44a15357430c4
[ "Apache-2.0" ]
35
2021-11-23T04:14:35.000Z
2022-03-26T09:03:43.000Z
ymir/backend/src/ymir_controller/controller/invoker/invoker_cmd_branch_list.py
Aryalfrat/ymir
d4617ed00ef67a77ab4e1944763f608bface4be6
[ "Apache-2.0" ]
57
2021-11-11T10:15:40.000Z
2022-03-29T07:27:54.000Z
from controller.invoker.invoker_cmd_base import BaseMirControllerInvoker from controller.utils import checker, utils from id_definition.error_codes import CTLResponseCode from proto import backend_pb2
46.055556
112
0.600724
from controller.invoker.invoker_cmd_base import BaseMirControllerInvoker from controller.utils import checker, utils from id_definition.error_codes import CTLResponseCode from proto import backend_pb2 class BranchListInvoker(BaseMirControllerInvoker): def pre_invoke(self) -> backend_pb2.GeneralResp: retur...
1,351
29
76
97dfc3b4f92246adb98d90753894a41d866a8df3
292
py
Python
view_breadcrumbs/generic/__init__.py
codacy-badger/django-view-breadcrumbs
f6edd20db12c7afdb1ba14bf84b78eeca90ee72b
[ "BSD-3-Clause" ]
29
2020-10-17T05:28:52.000Z
2022-03-10T21:14:06.000Z
view_breadcrumbs/generic/__init__.py
codacy-badger/django-view-breadcrumbs
f6edd20db12c7afdb1ba14bf84b78eeca90ee72b
[ "BSD-3-Clause" ]
225
2020-08-17T13:21:41.000Z
2022-03-31T11:58:50.000Z
view_breadcrumbs/generic/__init__.py
codacy-badger/django-view-breadcrumbs
f6edd20db12c7afdb1ba14bf84b78eeca90ee72b
[ "BSD-3-Clause" ]
5
2021-04-24T21:30:21.000Z
2021-11-01T20:28:19.000Z
from .base import BaseBreadcrumbMixin # noqa from .create import CreateBreadcrumbMixin # noqa from .delete import DeleteBreadcrumbMixin # noqa from .detail import DetailBreadcrumbMixin # noqa from .list import ListBreadcrumbMixin # noqa from .update import UpdateBreadcrumbMixin # noqa
41.714286
49
0.815068
from .base import BaseBreadcrumbMixin # noqa from .create import CreateBreadcrumbMixin # noqa from .delete import DeleteBreadcrumbMixin # noqa from .detail import DetailBreadcrumbMixin # noqa from .list import ListBreadcrumbMixin # noqa from .update import UpdateBreadcrumbMixin # noqa
0
0
0
1f6d256b45288074b3de10940e3ca152e1a8f5d6
217
py
Python
shlink/data/__init__.py
DavidSouthgate/shlink-py
86320dd55bfb391c9d66d2d2014463661cee6e58
[ "MIT" ]
null
null
null
shlink/data/__init__.py
DavidSouthgate/shlink-py
86320dd55bfb391c9d66d2d2014463661cee6e58
[ "MIT" ]
null
null
null
shlink/data/__init__.py
DavidSouthgate/shlink-py
86320dd55bfb391c9d66d2d2014463661cee6e58
[ "MIT" ]
1
2021-06-23T13:04:57.000Z
2021-06-23T13:04:57.000Z
from .data import Data from .error import Error from .paged_data import PagedData from .pagination import Pagination from .short_url import ShortUrl __all__ = ["Data", "PagedData", "Error", "Pagination", "ShortUrl"]
27.125
66
0.769585
from .data import Data from .error import Error from .paged_data import PagedData from .pagination import Pagination from .short_url import ShortUrl __all__ = ["Data", "PagedData", "Error", "Pagination", "ShortUrl"]
0
0
0
d077aba0bc5f6fe39e822869cd7ddde2d6493c66
2,173
py
Python
serverchecker.py
EMC-prog/ServerChecker
718b8d1b88880fb902c8376af3c7be11d71cdd86
[ "MIT" ]
1
2022-01-29T07:45:54.000Z
2022-01-29T07:45:54.000Z
serverchecker.py
EMC-prog/ServerChecker
718b8d1b88880fb902c8376af3c7be11d71cdd86
[ "MIT" ]
null
null
null
serverchecker.py
EMC-prog/ServerChecker
718b8d1b88880fb902c8376af3c7be11d71cdd86
[ "MIT" ]
null
null
null
# Original by EMC-prog # UNDER THE MIT LICENSE import paramiko import time import os import json import sys from getpass import getpass print("ServerChecker") print("Check and command your linux server without knowing Linux") time.sleep(2) os.system('cls' if os.name == 'nt' else 'clear') #Know if the program has be...
26.5
155
0.687989
# Original by EMC-prog # UNDER THE MIT LICENSE import paramiko import time import os import json import sys from getpass import getpass print("ServerChecker") print("Check and command your linux server without knowing Linux") time.sleep(2) os.system('cls' if os.name == 'nt' else 'clear') #Know if the program has be...
0
0
0
7999c1dc2f3ca8e7e583e7fb697df31e59fc908a
929
py
Python
src/setup.py
thhapke/DI_Pandas
7a9108007459260a30ea7ee404a76b42861c81c5
[ "MIT" ]
2
2020-01-02T19:54:46.000Z
2020-03-09T08:49:33.000Z
src/setup.py
thhapke/DI_Pandas
7a9108007459260a30ea7ee404a76b42861c81c5
[ "MIT" ]
null
null
null
src/setup.py
thhapke/DI_Pandas
7a9108007459260a30ea7ee404a76b42861c81c5
[ "MIT" ]
1
2020-03-28T22:53:16.000Z
2020-03-28T22:53:16.000Z
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="sdi_pandas", version="0.0.38", author="Thorsten Hapke", author_email="thorsten.hapke@sap.com", description="List of operators using the pandas module for processing the input", long_de...
30.966667
85
0.650161
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="sdi_pandas", version="0.0.38", author="Thorsten Hapke", author_email="thorsten.hapke@sap.com", description="List of operators using the pandas module for processing the input", long_de...
0
0
0
4aaa7331a48d35a7a77be12908d0f10a4108f6d1
3,447
py
Python
examples/limit_holdem_nfsp_pytorch.py
Res260/rlcard
c0fc9fe70c4ec1c726e5e66b62866086491f5dbf
[ "MIT" ]
2
2020-08-24T21:30:44.000Z
2020-10-27T03:44:04.000Z
examples/limit_holdem_nfsp_pytorch.py
Res260/rlcard
c0fc9fe70c4ec1c726e5e66b62866086491f5dbf
[ "MIT" ]
null
null
null
examples/limit_holdem_nfsp_pytorch.py
Res260/rlcard
c0fc9fe70c4ec1c726e5e66b62866086491f5dbf
[ "MIT" ]
2
2020-02-23T17:26:14.000Z
2020-12-22T15:34:13.000Z
''' An example of learning a NFSP Agent on Limit Texas Holdem ''' import torch import rlcard from rlcard.agents.nfsp_agent_pytorch import NFSPAgent from rlcard.agents.random_agent import RandomAgent from rlcard.utils.utils import set_global_seed from rlcard.utils.logger import Logger # Make environment env = rlcard.m...
34.128713
131
0.669568
''' An example of learning a NFSP Agent on Limit Texas Holdem ''' import torch import rlcard from rlcard.agents.nfsp_agent_pytorch import NFSPAgent from rlcard.agents.random_agent import RandomAgent from rlcard.utils.utils import set_global_seed from rlcard.utils.logger import Logger # Make environment env = rlcard.m...
0
0
0
7d06b8a1e935f41c825242385e77b3ec1e1c036d
5,899
py
Python
data_load.py
jesus-a-martinez-v/facial-keypoints
08ab0dc7b4250533a329412fde68629ef13917b7
[ "MIT" ]
null
null
null
data_load.py
jesus-a-martinez-v/facial-keypoints
08ab0dc7b4250533a329412fde68629ef13917b7
[ "MIT" ]
null
null
null
data_load.py
jesus-a-martinez-v/facial-keypoints
08ab0dc7b4250533a329412fde68629ef13917b7
[ "MIT" ]
null
null
null
import os import random import cv2 import matplotlib.image as mpimg import numpy as np import pandas as pd import torch from torch.utils.data import Dataset class FacialKeypointsDataset(Dataset): """ Face Landmarks dataset. """ def __init__(self, csv_file, root_dir, transform=None): """ ...
28.360577
92
0.583658
import os import random import cv2 import matplotlib.image as mpimg import numpy as np import pandas as pd import torch from torch.utils.data import Dataset class FacialKeypointsDataset(Dataset): """ Face Landmarks dataset. """ def __init__(self, csv_file, root_dir, transform=None): """ ...
4,163
14
292
890e4c7f12b5b3b533294613e48301232b0d8c3c
841
py
Python
todo_report/auth_server_client.py
sergio-bershadsky/todo.report
fa135fae2dadbcab4483a96a435db8ea6c073668
[ "MIT" ]
null
null
null
todo_report/auth_server_client.py
sergio-bershadsky/todo.report
fa135fae2dadbcab4483a96a435db8ea6c073668
[ "MIT" ]
null
null
null
todo_report/auth_server_client.py
sergio-bershadsky/todo.report
fa135fae2dadbcab4483a96a435db8ea6c073668
[ "MIT" ]
null
null
null
import requests
27.129032
71
0.588585
import requests class AuthServerClient: @property def server_url(self): #return "http://localhost:8000/" return "https://urbamatica.appspot.com/" def get_authorize_url(self, provider): return self.call("get_authorize_url", "get", provider=provider) def get_token(self, state)...
677
124
23
dffb9c0e062cdd510faab296053db97cdaa1a672
516
py
Python
boop/lib/channels.py
Seabreg/BoopSuite
1c4e68d02badf9ece2ed765d7ba7fffb8dd57fc9
[ "MIT" ]
514
2017-07-10T22:29:36.000Z
2022-03-24T12:06:08.000Z
boop/lib/channels.py
Seabreg/BoopSuite
1c4e68d02badf9ece2ed765d7ba7fffb8dd57fc9
[ "MIT" ]
18
2017-08-13T01:57:32.000Z
2020-08-03T19:56:10.000Z
boop/lib/channels.py
Seabreg/BoopSuite
1c4e68d02badf9ece2ed765d7ba7fffb8dd57fc9
[ "MIT" ]
116
2017-08-05T09:10:42.000Z
2021-11-12T10:42:10.000Z
TWOHERTZ = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] FIVEHERTZ = [ 36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 132, 136, 140, 149, 153, 157, 161, 165, ] ALL = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, ...
8.459016
46
0.302326
TWOHERTZ = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] FIVEHERTZ = [ 36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 132, 136, 140, 149, 153, 157, 161, 165, ] ALL = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, ...
0
0
0
e0cadd9390762e552fb2dde0b50ff58b7778b895
403
py
Python
concepts/arrays/unique_char_in_string.py
dnootana/Python
2881bafe8bc378fa3cae50a747fcea1a55630c63
[ "MIT" ]
1
2021-02-19T11:00:11.000Z
2021-02-19T11:00:11.000Z
concepts/arrays/unique_char_in_string.py
dnootana/Python
2881bafe8bc378fa3cae50a747fcea1a55630c63
[ "MIT" ]
null
null
null
concepts/arrays/unique_char_in_string.py
dnootana/Python
2881bafe8bc378fa3cae50a747fcea1a55630c63
[ "MIT" ]
null
null
null
#!/usr/bin/env python3.8 print(uni_char1('abcdaefg'))
15.5
39
0.682382
#!/usr/bin/env python3.8 def uni_char(string): return len(string) == len(set(string)) def uni_char1(string): letters = set() for char in string: if char in letters: return False else: letters.add(char) return True def uni_char2(string): letters = {} for char in string: if char in letters: retu...
280
0
69
49eae1dda744367d8fab8df4d149cd4f4d3e0711
1,639
py
Python
maps/urls.py
bhavanat12/GCH
02013b49d66858718d7744ba074bf9875983e00d
[ "MIT" ]
null
null
null
maps/urls.py
bhavanat12/GCH
02013b49d66858718d7744ba074bf9875983e00d
[ "MIT" ]
null
null
null
maps/urls.py
bhavanat12/GCH
02013b49d66858718d7744ba074bf9875983e00d
[ "MIT" ]
null
null
null
from django.urls import path from .views import RecipientDetails, MeetSchedule, DashboardView, MyMapView, SubmitMap, submitForReview,AdminGraphView, FinalSubmit, Approval, SentForApprovalMap, SaveApprovedVersion, GetLatestRevision, CommentSubmit, Discard, ReviewerReview, embedded_signing_ceremony, get_access_code, auth...
60.703704
312
0.744966
from django.urls import path from .views import RecipientDetails, MeetSchedule, DashboardView, MyMapView, SubmitMap, submitForReview,AdminGraphView, FinalSubmit, Approval, SentForApprovalMap, SaveApprovedVersion, GetLatestRevision, CommentSubmit, Discard, ReviewerReview, embedded_signing_ceremony, get_access_code, auth...
0
0
0
95fac783ccf720a62910955d05435041390a95ce
740
py
Python
tests/commands/test_command.py
luoxiaohei/orator
d1738e5c81c6c9c64bf4c972c0b90586776c63da
[ "MIT" ]
null
null
null
tests/commands/test_command.py
luoxiaohei/orator
d1738e5c81c6c9c64bf4c972c0b90586776c63da
[ "MIT" ]
null
null
null
tests/commands/test_command.py
luoxiaohei/orator
d1738e5c81c6c9c64bf4c972c0b90586776c63da
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- import os import tempfile from flexmock import flexmock from orator.commands.command import Command from . import OratorCommandTestCase class FooCommand(Command): """ Test Command """ name = "foo"
20.555556
72
0.643243
# -*- coding:utf-8 -*- import os import tempfile from flexmock import flexmock from orator.commands.command import Command from . import OratorCommandTestCase class FooCommand(Command): """ Test Command """ name = "foo" def handle(self): pass class CommandTestCase(OratorCommandTestC...
397
24
76
92d20b7eced1c72eae2c0685c60678fcf8b161bb
3,369
py
Python
tests/unit/v1/_test_helpers.py
noxxious/python-firestore
6b5a7795bb2827b65f8015fcef6663880a29a65d
[ "Apache-2.0" ]
140
2020-02-16T19:35:47.000Z
2022-03-27T23:58:03.000Z
tests/unit/v1/_test_helpers.py
noxxious/python-firestore
6b5a7795bb2827b65f8015fcef6663880a29a65d
[ "Apache-2.0" ]
311
2020-01-31T23:45:43.000Z
2022-03-22T14:41:34.000Z
tests/unit/v1/_test_helpers.py
noxxious/python-firestore
6b5a7795bb2827b65f8015fcef6663880a29a65d
[ "Apache-2.0" ]
52
2020-01-31T21:40:11.000Z
2022-02-25T18:32:51.000Z
# Copyright 2021 Google LLC All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
31.783019
87
0.700208
# Copyright 2021 Google LLC All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
1,960
8
245
0796a1a08ccd54c91e9b96ca9f9dfe700c1debed
2,412
py
Python
peekingduck/pipeline/nodes/dabble/bbox_to_3d_loc.py
diwei-tan/PeekingDuck
0169365580160f02be86fc8979a9915b8cefffcd
[ "Apache-2.0" ]
1
2021-08-19T09:39:14.000Z
2021-08-19T09:39:14.000Z
peekingduck/pipeline/nodes/dabble/bbox_to_3d_loc.py
sidney-tio/PeekingDuck
966734ab81c9e466ab51495644673c2d52daf17c
[ "Apache-2.0" ]
null
null
null
peekingduck/pipeline/nodes/dabble/bbox_to_3d_loc.py
sidney-tio/PeekingDuck
966734ab81c9e466ab51495644673c2d52daf17c
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 AI Singapore # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
33.971831
100
0.659204
# Copyright 2021 AI Singapore # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
115
0
27
9602435d9907a9497d021fa9099436c498c55a95
2,731
py
Python
tests/test_file_configuration.py
joshua-s/punch
c29751844ecf654cc21966a14842e8165e0bc300
[ "ISC" ]
null
null
null
tests/test_file_configuration.py
joshua-s/punch
c29751844ecf654cc21966a14842e8165e0bc300
[ "ISC" ]
null
null
null
tests/test_file_configuration.py
joshua-s/punch
c29751844ecf654cc21966a14842e8165e0bc300
[ "ISC" ]
null
null
null
import pytest from punch import file_configuration as fc @pytest.fixture @pytest.fixture @pytest.fixture
26.259615
73
0.660198
import pytest from punch import file_configuration as fc @pytest.fixture def global_variables(): return { 'serializer': '{{ major }}.{{ minor }}.{{ patch }}', 'mark': 'just a mark' } @pytest.fixture def local_variables(): return { 'serializer': '{{ major }}.{{ minor }}' } ...
2,409
0
204
8ec8aa9f78ea04bedaeab8a98c76a25bdf0902ea
1,584
py
Python
02. oop-instance-class-static-methods.py
surajitrana1985/python-oops
08b93af2bb8bb32f85bb37c68c91aa30a8dbf7ad
[ "MIT" ]
null
null
null
02. oop-instance-class-static-methods.py
surajitrana1985/python-oops
08b93af2bb8bb32f85bb37c68c91aa30a8dbf7ad
[ "MIT" ]
null
null
null
02. oop-instance-class-static-methods.py
surajitrana1985/python-oops
08b93af2bb8bb32f85bb37c68c91aa30a8dbf7ad
[ "MIT" ]
null
null
null
import datetime emp1 = Employee.from_string("Jason-Gibbs-jason.gibbs@hotmail.com-36000") emp2 = Employee.from_string("Mason-Storm-mason.storm@gmail.com-45000") emp3 = Employee.from_string("Kelvin-Hobbs-kelvin.hobbs@yahoomail.com-89000") Employee.set_raise() emp1.apply_raise() emp2.apply_raise() emp3.apply_raise() ...
29.886792
116
0.67803
import datetime class Employee: raise_pay = 1.04 # constructor method def __init__(self, first_name, last_name, email, pay): self.first_name = first_name self.last_name = last_name self.email = email self.pay = pay self.timestamp = Employee.get_timestamp() # i...
507
382
23
98d9774606907256c71e47bc2d5cfa9e19d08a9f
1,978
py
Python
env/lib/python2.7/site-packages/future/tests/test_import_star.py
talishte/ctigre
1da8e56e716d84cc3ad7773c52267d0d53bd0d04
[ "BSD-2-Clause" ]
null
null
null
env/lib/python2.7/site-packages/future/tests/test_import_star.py
talishte/ctigre
1da8e56e716d84cc3ad7773c52267d0d53bd0d04
[ "BSD-2-Clause" ]
null
null
null
env/lib/python2.7/site-packages/future/tests/test_import_star.py
talishte/ctigre
1da8e56e716d84cc3ad7773c52267d0d53bd0d04
[ "BSD-2-Clause" ]
null
null
null
""" This tests whether from future.builtins import * works as expected: - This should NOT introduce namespace pollution on Py3. - On Python 2, this should not introduce any symbols that aren't in __builtin__. """ from __future__ import absolute_import, print_function, unicode_literals import copy from futur...
29.522388
78
0.666835
""" This tests whether from future.builtins import * works as expected: - This should NOT introduce namespace pollution on Py3. - On Python 2, this should not introduce any symbols that aren't in __builtin__. """ from __future__ import absolute_import, print_function, unicode_literals import copy from futur...
957
19
211
a0d2e4380cddc23ff59fec189f236b132814990c
1,155
py
Python
algorithms/Arrays/closest3sum.py
gadodia/Algorithms
714d43ce89b684d8e5c4bb77a654938957957f33
[ "MIT" ]
null
null
null
algorithms/Arrays/closest3sum.py
gadodia/Algorithms
714d43ce89b684d8e5c4bb77a654938957957f33
[ "MIT" ]
null
null
null
algorithms/Arrays/closest3sum.py
gadodia/Algorithms
714d43ce89b684d8e5c4bb77a654938957957f33
[ "MIT" ]
null
null
null
import collections ''' This problem was recently asked by Google: Given a list of numbers and a target number n, find 3 numbers combinatins in the list that sums closest to the target number n. There may be multiple ways of creating the sum closest to the target number, you can return any combination in any order. T...
30.394737
249
0.54632
import collections ''' This problem was recently asked by Google: Given a list of numbers and a target number n, find 3 numbers combinatins in the list that sums closest to the target number n. There may be multiple ways of creating the sum closest to the target number, you can return any combination in any order. T...
659
-6
50
be7c1bdbe72f5af36c98b4bdd62ae9afb152bdeb
2,614
py
Python
hyperparameter_tuner/oracle.py
aierh/autoML
8e31966edf6de2c223d5eeb6cd4b4dbd6ddbbf77
[ "MIT" ]
185
2019-12-26T12:41:53.000Z
2020-09-18T06:22:32.000Z
hyperparameter_tuner/oracle.py
aierh/autoML
8e31966edf6de2c223d5eeb6cd4b4dbd6ddbbf77
[ "MIT" ]
8
2020-02-25T19:32:22.000Z
2020-09-18T06:17:48.000Z
hyperparameter_tuner/oracle.py
aierh/autoML
8e31966edf6de2c223d5eeb6cd4b4dbd6ddbbf77
[ "MIT" ]
27
2019-12-26T15:02:47.000Z
2020-09-08T21:24:54.000Z
from .trial import generate_trial_id import random import hashlib import pandas as pd
35.324324
83
0.572686
from .trial import generate_trial_id import random import hashlib import pandas as pd class Oracle: def __init__(self, space, max_epochs, max_trials=None): self.max_epochs = max_epochs self.space = space self.trials = {} self._tried_so_far = set() self.max_trials = max_tri...
2,377
-8
158
d3a5f9354952f5c8131ea23b89af9878604703b2
555
py
Python
app/helpers/__init__.py
peterhil/ninhursag
582133ae51e98b2e4272d6a78794b08aed845960
[ "MIT" ]
4
2015-05-24T20:39:54.000Z
2021-06-23T06:48:23.000Z
app/helpers/__init__.py
peterhil/ninhursag
582133ae51e98b2e4272d6a78794b08aed845960
[ "MIT" ]
10
2021-03-23T01:11:49.000Z
2021-06-22T23:58:36.000Z
app/helpers/__init__.py
peterhil/ninhursag
582133ae51e98b2e4272d6a78794b08aed845960
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # from flask_security import login_required from functools import wraps from .blueprints import register_blueprints from .slugify import slugify from app.settings import project_name try: from instance.settings import project_name except ImportError: pass
22.2
47
0.673874
#!/usr/bin/env python # -*- coding: utf-8 -*- # from flask_security import login_required from functools import wraps from .blueprints import register_blueprints from .slugify import slugify from app.settings import project_name try: from instance.settings import project_name except ImportError: pass def route(bp,...
226
0
23
01cf8a14c4fab83d98f40dd99d9c64a350d27566
600
py
Python
src/DoS/dos_firmware.py
bstnbuck/Epson-Printer-vulnerabilities
9c9b88c3bf36472a3f805b42c30d95894e93c73f
[ "MIT" ]
3
2021-11-09T16:10:46.000Z
2022-01-18T16:40:37.000Z
src/DoS/dos_firmware.py
bstnbuck/Epson-Printer-vulnerabilities
9c9b88c3bf36472a3f805b42c30d95894e93c73f
[ "MIT" ]
null
null
null
src/DoS/dos_firmware.py
bstnbuck/Epson-Printer-vulnerabilities
9c9b88c3bf36472a3f805b42c30d95894e93c73f
[ "MIT" ]
null
null
null
import requests if __name__ == '__main__': main()
26.086957
92
0.666667
import requests def requestFirmwareUpdate(): url = 'http://141.87.29.101/FIRMWAREUPDATE' requests.get(url) def triggerDos(): url = 'http://141.87.29.101/DOWN/FIRMWAREUPDATE/ROM1' try: # epson printer recive firmware file by `post` method, but `get` method trigger dos. requests.get(url,...
477
0
69
f6532607c371bb53057566607b9bfbeaf107127d
1,084
py
Python
homeworkpal_project/maximo/migrations/0002_datadocument.py
luiscberrocal/homeworkpal
342acf876264fade818b107f4af13cac067f1ace
[ "MIT" ]
null
null
null
homeworkpal_project/maximo/migrations/0002_datadocument.py
luiscberrocal/homeworkpal
342acf876264fade818b107f4af13cac067f1ace
[ "MIT" ]
null
null
null
homeworkpal_project/maximo/migrations/0002_datadocument.py
luiscberrocal/homeworkpal
342acf876264fade818b107f4af13cac067f1ace
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import model_utils.fields import django.utils.timezone
34.967742
147
0.610701
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import model_utils.fields import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('maximo', '0001_initial'), ] operations = [ migrations.CreateModel( ...
0
899
23
256033a277a7efd83c664f7091741ead5c4842a3
137
py
Python
tests/test_app.py
aracnid/i-xero2
449bb8bccb9e76935cedc49eff776bb8804d756b
[ "MIT" ]
null
null
null
tests/test_app.py
aracnid/i-xero2
449bb8bccb9e76935cedc49eff776bb8804d756b
[ "MIT" ]
null
null
null
tests/test_app.py
aracnid/i-xero2
449bb8bccb9e76935cedc49eff776bb8804d756b
[ "MIT" ]
null
null
null
"""Application tests. """ import i_xero2 def test_version(): """Test the version of the app. """ assert i_xero2.__version__
15.222222
35
0.656934
"""Application tests. """ import i_xero2 def test_version(): """Test the version of the app. """ assert i_xero2.__version__
0
0
0
e9ca1648d91deb910529ad55e8d5f08e7de02539
5,687
py
Python
esmond/api/tests/test_correlator.py
esnet/esmond-test
8aaec580e8fa8a27bddddc0fd91fd3e96730515f
[ "BSD-3-Clause-LBNL" ]
null
null
null
esmond/api/tests/test_correlator.py
esnet/esmond-test
8aaec580e8fa8a27bddddc0fd91fd3e96730515f
[ "BSD-3-Clause-LBNL" ]
null
null
null
esmond/api/tests/test_correlator.py
esnet/esmond-test
8aaec580e8fa8a27bddddc0fd91fd3e96730515f
[ "BSD-3-Clause-LBNL" ]
null
null
null
from django.test import TestCase from esmond.poll import IfDescrCorrelator, JnxFirewallCorrelator, \ JnxCOSCorrelator, SentryCorrelator, \ ALUSAPCorrelator #def test_jnx_cos_correlator(): # s = MockSession() # c = JnxCOSCorrelator(s) # c.setup() # fo...
45.496
90
0.495516
from django.test import TestCase from esmond.poll import IfDescrCorrelator, JnxFirewallCorrelator, \ JnxCOSCorrelator, SentryCorrelator, \ ALUSAPCorrelator class MockSession(object): def walk(self, oid): if oid == 'ifDescr': return (('ifDes...
5,066
17
173
ef83386aa4f0d57c0d5a33e9362aa865c04a2323
3,836
py
Python
test/harness/VerboseOutput.py
adamrehn/language-toolbox
f86c39784b2a6952719afdd7c3769a6a6b5f2630
[ "MIT" ]
2
2018-12-18T07:53:06.000Z
2020-02-28T11:13:21.000Z
test/harness/VerboseOutput.py
adamrehn/language-toolbox
f86c39784b2a6952719afdd7c3769a6a6b5f2630
[ "MIT" ]
null
null
null
test/harness/VerboseOutput.py
adamrehn/language-toolbox
f86c39784b2a6952719afdd7c3769a6a6b5f2630
[ "MIT" ]
null
null
null
from . import common_pb2 as common_messages from contextlib import redirect_stdout from .Utility import Utility import json, io
31.186992
119
0.703858
from . import common_pb2 as common_messages from contextlib import redirect_stdout from .Utility import Utility import json, io class VerboseOutput: @staticmethod def _extractCapabilities(capabilities): ''' Extracts the list of capabilities from the LanguageCapabilities message bitfield ''' capabilitiesDic...
0
3,685
23
5228d1bb504d38bdf6aaa7f03736262ba215e1e0
1,618
py
Python
app/data/func.py
stanmain/IION-Flask-Test
ddd68706ee06eacb17ad461a9d31087b87217769
[ "MIT" ]
null
null
null
app/data/func.py
stanmain/IION-Flask-Test
ddd68706ee06eacb17ad461a9d31087b87217769
[ "MIT" ]
null
null
null
app/data/func.py
stanmain/IION-Flask-Test
ddd68706ee06eacb17ad461a9d31087b87217769
[ "MIT" ]
null
null
null
# Copyright © 2018 Stanislav Hnatiuk. All rights reserved. """Module of functions.""" from operator import itemgetter from itertools import groupby def stime_to_decimal(s): """Lololo.""" return s.hour + s.minute / 60 def group_time(records): """Lololo.""" records.sort(key=itemgetter(6, 1)) res...
19.731707
66
0.487639
# Copyright © 2018 Stanislav Hnatiuk. All rights reserved. """Module of functions.""" from operator import itemgetter from itertools import groupby def stime_to_decimal(s): """Lololo.""" return s.hour + s.minute / 60 def group_time(records): """Lololo.""" records.sort(key=itemgetter(6, 1)) res...
0
0
0
83f168eee9b74da62f383dcf9b275bd1bf380a28
15,770
py
Python
tests/examples/minlplib/transswitch0009p.py
ouyang-w-19/decogo
52546480e49776251d4d27856e18a46f40c824a1
[ "MIT" ]
2
2021-07-03T13:19:10.000Z
2022-02-06T10:48:13.000Z
tests/examples/minlplib/transswitch0009p.py
ouyang-w-19/decogo
52546480e49776251d4d27856e18a46f40c824a1
[ "MIT" ]
1
2021-07-04T14:52:14.000Z
2021-07-15T10:17:11.000Z
tests/examples/minlplib/transswitch0009p.py
ouyang-w-19/decogo
52546480e49776251d4d27856e18a46f40c824a1
[ "MIT" ]
null
null
null
# MINLP written by GAMS Convert at 04/21/18 13:54:56 # # Equation counts # Total E G L N X C B # 140 56 33 51 0 0 0 0 # # Variable counts # x b i s1s s2s sc ...
39.52381
120
0.603995
# MINLP written by GAMS Convert at 04/21/18 13:54:56 # # Equation counts # Total E G L N X C B # 140 56 33 51 0 0 0 0 # # Variable counts # x b i s1s s2s sc ...
0
0
0
4ee8509f03c8f5ebeb21b108dd00b217afcaa269
8,819
py
Python
academicstoday_project/teacher/tests/test_discussion.py
LeeDoona/EasyGrading
8a3b7a95e328a5b710bd98934dcde7556731bd72
[ "Apache-2.0" ]
146
2017-02-04T11:14:50.000Z
2021-12-30T20:54:50.000Z
academicstoday_project/teacher/tests/test_discussion.py
LeeDoona/EasyGrading
8a3b7a95e328a5b710bd98934dcde7556731bd72
[ "Apache-2.0" ]
139
2015-02-21T21:40:34.000Z
2016-02-20T13:34:25.000Z
academicstoday_project/teacher/tests/test_discussion.py
topsit143/acda
c2a20ffd1dcf8668d1fe401d114d32d9e686f1fd
[ "Apache-2.0" ]
88
2017-01-20T20:32:44.000Z
2022-02-07T05:32:44.000Z
# Django & Python from django.core.urlresolvers import resolve from django.http import HttpRequest from django.http import QueryDict from django.test import TestCase from django.test import Client from django.contrib.auth.models import User from django.contrib.auth import authenticate, login, logout from django.contrib...
39.022124
86
0.659372
# Django & Python from django.core.urlresolvers import resolve from django.http import HttpRequest from django.http import QueryDict from django.test import TestCase from django.test import Client from django.contrib.auth.models import User from django.contrib.auth import authenticate, login, logout from django.contrib...
7,335
14
554
d146f86fe4b08ed4d48239b293aa2f2b80b2c8eb
1,239
py
Python
rebase/validators/nested_validator.py
dciccale/rebase
e218bde43a31cb8b269733d262e978e4872f969f
[ "Apache-2.0" ]
15
2018-07-06T13:40:27.000Z
2021-08-05T21:33:31.000Z
rebase/validators/nested_validator.py
dciccale/rebase
e218bde43a31cb8b269733d262e978e4872f969f
[ "Apache-2.0" ]
1
2021-04-01T10:24:32.000Z
2021-04-01T10:24:32.000Z
rebase/validators/nested_validator.py
dciccale/rebase
e218bde43a31cb8b269733d262e978e4872f969f
[ "Apache-2.0" ]
5
2018-07-06T13:40:31.000Z
2020-10-28T19:51:03.000Z
"""This file is part of the trivago/rebase library. # Copyright (c) 2018 trivago N.V. # License: Apache 2.0 # Source: https://github.com/trivago/rebase # Version: 1.2.2 # Python Version: 3.6 # Author: Yuv Joodhisty <yuvrajsingh.joodhisty@trivago.com> """ from rebase.core import Model, Validator
29.5
68
0.572236
"""This file is part of the trivago/rebase library. # Copyright (c) 2018 trivago N.V. # License: Apache 2.0 # Source: https://github.com/trivago/rebase # Version: 1.2.2 # Python Version: 3.6 # Author: Yuv Joodhisty <yuvrajsingh.joodhisty@trivago.com> """ from rebase.core import Model, Validator class NestedValidato...
852
12
76
05b958c3e5ef7b84bf7c6a9d4484c6eb9da5ea59
1,071
py
Python
TemasC/try.py
axsaenz/Alvin
9afa5a5a8ad3e7d703818d867df3630042293d49
[ "MIT" ]
null
null
null
TemasC/try.py
axsaenz/Alvin
9afa5a5a8ad3e7d703818d867df3630042293d49
[ "MIT" ]
null
null
null
TemasC/try.py
axsaenz/Alvin
9afa5a5a8ad3e7d703818d867df3630042293d49
[ "MIT" ]
null
null
null
import numpy as np import cv2 import camera import images objCamera = camera.Camera(camera_port = 1, resolution = 1) img = objCamera.take_photo() gray = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY) cv2.imshow('Gray', gray) cv2.waitKey(0) gray_blur = images.gaussian(gray, 11) cv2.imshow('Gaussian', gray_blur) cv2.waitKey(0)...
27.461538
93
0.709617
import numpy as np import cv2 import camera import images objCamera = camera.Camera(camera_port = 1, resolution = 1) img = objCamera.take_photo() gray = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY) cv2.imshow('Gray', gray) cv2.waitKey(0) gray_blur = images.gaussian(gray, 11) cv2.imshow('Gaussian', gray_blur) cv2.waitKey(0)...
0
0
0
7f37e9263c431b73f9c514e50ece1dc69d7a3167
1,591
py
Python
03-Multidimensional-lists/alice_in_wonderland.py
nmoskova/Python-advanced
007f496e868aa151e39d79446b055e76ffb2db95
[ "MIT" ]
null
null
null
03-Multidimensional-lists/alice_in_wonderland.py
nmoskova/Python-advanced
007f496e868aa151e39d79446b055e76ffb2db95
[ "MIT" ]
null
null
null
03-Multidimensional-lists/alice_in_wonderland.py
nmoskova/Python-advanced
007f496e868aa151e39d79446b055e76ffb2db95
[ "MIT" ]
null
null
null
size = int(input()) matrix = [] alice_row, alice_col = 0, 0 for r in range(size): matrix.append(input().split()) for c in range(size): if matrix[r][c] == "A": alice_row, alice_col = r, c matrix[alice_row][alice_col] = '*' alice_collected_enough_tea = False tea = 0 current_r...
26.966102
78
0.623507
def get_position(command: str, row: int, col: int): if command == "up": return row - 1, col elif command == "down": return row + 1, col elif command == "left": return row, col - 1 elif command == "right": return row, col + 1 def check_valid_index(next_row, next_col, siz...
341
0
45
e87e4331c329b0e493efb43ebb9bed1ab2eadf77
349
py
Python
common/helpers.py
gtsiokos/diogenis
c83d4dac26df68bbbf897c48a5552ea9c9ede9c2
[ "BSD-3-Clause" ]
1
2019-08-16T13:47:46.000Z
2019-08-16T13:47:46.000Z
common/helpers.py
gtsiokos/diogenis
c83d4dac26df68bbbf897c48a5552ea9c9ede9c2
[ "BSD-3-Clause" ]
null
null
null
common/helpers.py
gtsiokos/diogenis
c83d4dac26df68bbbf897c48a5552ea9c9ede9c2
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # -*- coding: utf8 -*- import hashlib
21.8125
69
0.590258
#!/usr/bin/env python # -*- coding: utf-8 -*- # -*- coding: utf8 -*- import hashlib def get_hashed_id(object_id): hashed_id = hashlib.sha256( str(object_id) ) return hashed_id.hexdigest() def humanize_time(time): t = (u"%d μ.μ." % (time-12) if time >= 13 else u"%d π.μ." % time) if time == 12: t = u"%...
223
0
46
1bd903dfb9b3c865b70e9022d40b1ef39d839bc9
1,118
py
Python
scripts/create_sample_images.py
JColl88/sdc1-solution-binder
4a932b319bd26d66a4230de5014d53339fa85da9
[ "BSD-3-Clause" ]
null
null
null
scripts/create_sample_images.py
JColl88/sdc1-solution-binder
4a932b319bd26d66a4230de5014d53339fa85da9
[ "BSD-3-Clause" ]
null
null
null
scripts/create_sample_images.py
JColl88/sdc1-solution-binder
4a932b319bd26d66a4230de5014d53339fa85da9
[ "BSD-3-Clause" ]
null
null
null
import os from pathlib import Path from ska.sdc1.utils.image_utils import crop_to_training_area # Challenge frequency bands # FREQS = [560, 1400, 9200] full_image_dir = os.path.join("data", "images") sample_image_dir = os.path.join("data", "sample_images") if __name__ == "__main__": """ Helper script to ...
27.268293
84
0.646691
import os from pathlib import Path from ska.sdc1.utils.image_utils import crop_to_training_area # Challenge frequency bands # FREQS = [560, 1400, 9200] full_image_dir = os.path.join("data", "images") sample_image_dir = os.path.join("data", "sample_images") def full_image_path(freq): return os.path.join(full_im...
167
0
46
783fca3a6ff9d0b95b21823f4aed095974cacc79
12,099
py
Python
Tests/test_graph.py
dguan4/Airline
c461c5525f1739333bc5d969a87eabbd4ed9c855
[ "MIT" ]
null
null
null
Tests/test_graph.py
dguan4/Airline
c461c5525f1739333bc5d969a87eabbd4ed9c855
[ "MIT" ]
null
null
null
Tests/test_graph.py
dguan4/Airline
c461c5525f1739333bc5d969a87eabbd4ed9c855
[ "MIT" ]
null
null
null
from unittest import TestCase from graph import Graph from edge import Edge from vertex import Vertex import collections as col
41.013559
226
0.592528
from unittest import TestCase from graph import Graph from edge import Edge from vertex import Vertex import collections as col class TestGraph(TestCase): def test_add_from_json(self): """ Tests the add_from_json function in the Graph class :return: true if all asserts pass ...
0
11,939
25
2cca849ff3e302117332a11854b3931a325f5621
972
py
Python
tests/test_plots/test_base_plot.py
CMargreitter/ChemCharts
ec47b8f572f6b77518051aafc578557a5a10c2d0
[ "Apache-2.0" ]
16
2022-01-29T05:32:13.000Z
2022-03-02T15:19:17.000Z
tests/test_plots/test_base_plot.py
CMargreitter/ChemCharts
ec47b8f572f6b77518051aafc578557a5a10c2d0
[ "Apache-2.0" ]
7
2022-02-01T22:34:57.000Z
2022-03-11T23:02:27.000Z
tests/test_plots/test_base_plot.py
CMargreitter/ChemCharts
ec47b8f572f6b77518051aafc578557a5a10c2d0
[ "Apache-2.0" ]
1
2022-01-19T12:41:38.000Z
2022-01-19T12:41:38.000Z
import unittest from chemcharts.core.plots.base_plot import BasePlot
34.714286
84
0.693416
import unittest from chemcharts.core.plots.base_plot import BasePlot class TestBasePlot(unittest.TestCase): @classmethod def setUpClass(cls) -> None: pass def test_path_update_snapshot(self): test_base_plot = BasePlot() test_updated_path = test_base_plot._path_update_snapshot( ...
791
87
23
b163d91b901f7d637f3ef8540aeac505134ad228
39,730
py
Python
src/choo/apis/efa.old.py
codingcatgirl/choo
128990f1fe89a4740110ead81987832e01bf7393
[ "Apache-2.0" ]
null
null
null
src/choo/apis/efa.old.py
codingcatgirl/choo
128990f1fe89a4740110ead81987832e01bf7393
[ "Apache-2.0" ]
null
null
null
src/choo/apis/efa.old.py
codingcatgirl/choo
128990f1fe89a4740110ead81987832e01bf7393
[ "Apache-2.0" ]
null
null
null
import re import xml.etree.ElementTree as ET from datetime import datetime, timedelta import requests from ...models import (POI, Address, Coordinates, Line, LineType, LineTypes, LiveTime, Location, MetaRide, Platform, Ride, RidePoint, RideSegment, Searchable, Stop, TicketData, TicketList, Trip...
40.916581
117
0.546313
import re import xml.etree.ElementTree as ET from datetime import datetime, timedelta import requests from ...models import (POI, Address, Coordinates, Line, LineType, LineTypes, LiveTime, Location, MetaRide, Platform, Ride, RidePoint, RideSegment, Searchable, Stop, TicketData, TicketList, Trip...
5,358
33,969
23
5cfd69f29b2d309d326593310d7963a46110542e
837
py
Python
ceraon/api/v1/locations/schema.py
Rdbaker/Mealbound
37cec6b45a632ac26a5341a0c9556279b6229ea8
[ "BSD-3-Clause" ]
1
2018-11-03T17:48:50.000Z
2018-11-03T17:48:50.000Z
ceraon/api/v1/locations/schema.py
Rdbaker/Mealbound
37cec6b45a632ac26a5341a0c9556279b6229ea8
[ "BSD-3-Clause" ]
3
2021-03-09T09:47:04.000Z
2022-02-12T13:04:41.000Z
ceraon/api/v1/locations/schema.py
Rdbaker/Mealbound
37cec6b45a632ac26a5341a0c9556279b6229ea8
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Location schema.""" from marshmallow import Schema, fields, validates from werkzeug.exceptions import BadRequest from ceraon.constants import Errors class LocationSchema(Schema): """A schema for a Location model.""" created_at = fields.DateTime(dump_only=True) name = fields.St...
26.15625
58
0.655914
# -*- coding: utf-8 -*- """Location schema.""" from marshmallow import Schema, fields, validates from werkzeug.exceptions import BadRequest from ceraon.constants import Errors class LocationSchema(Schema): """A schema for a Location model.""" created_at = fields.DateTime(dump_only=True) name = fields.St...
0
0
0
a48761cda1ea411c2b818a7c48af1d5a1062fc80
24
py
Python
distgen/_version.py
rsintheta/distgen
5ee7c48a6261f65b3d1658bb66511b9ef1cd02cd
[ "Apache-2.0" ]
null
null
null
distgen/_version.py
rsintheta/distgen
5ee7c48a6261f65b3d1658bb66511b9ef1cd02cd
[ "Apache-2.0" ]
null
null
null
distgen/_version.py
rsintheta/distgen
5ee7c48a6261f65b3d1658bb66511b9ef1cd02cd
[ "Apache-2.0" ]
null
null
null
__version__ = '0.4.4'
6
21
0.583333
__version__ = '0.4.4'
0
0
0
a1b004e47c4537ad22d3c3e3ead762da0229a0e5
1,101
py
Python
src/workflows/worker.py
turnbros/paul
42699b4d13386b39f60a4aacede64dc4d1415ea6
[ "CC-BY-4.0" ]
null
null
null
src/workflows/worker.py
turnbros/paul
42699b4d13386b39f60a4aacede64dc4d1415ea6
[ "CC-BY-4.0" ]
null
null
null
src/workflows/worker.py
turnbros/paul
42699b4d13386b39f60a4aacede64dc4d1415ea6
[ "CC-BY-4.0" ]
1
2022-01-10T19:51:38.000Z
2022-01-10T19:51:38.000Z
import logging from util import config from abc import ABC, abstractmethod from temporal.workflow import workflow_method logging.basicConfig(level=logging.DEBUG) import functools
19.315789
57
0.786558
import logging from util import config from abc import ABC, abstractmethod from temporal.workflow import workflow_method logging.basicConfig(level=logging.DEBUG) import functools def example_workflow_method(queue_name): def decorator_repeat(func): @functools.wraps(func) def wrapper_example_workflow_method(*a...
631
227
45
4622d9b42469a4b6e217b79ba18cfcdbef274db4
4,955
py
Python
ycyc/base/typeutils.py
MrLYC/ycyc
1938493294fbad3a461cc3a752c5385d30a6e51d
[ "MIT" ]
22
2015-07-21T03:15:36.000Z
2021-02-23T07:58:03.000Z
ycyc/base/typeutils.py
MrLYC/ycyc
1938493294fbad3a461cc3a752c5385d30a6e51d
[ "MIT" ]
3
2016-03-20T12:06:07.000Z
2018-01-16T10:34:19.000Z
ycyc/base/typeutils.py
MrLYC/ycyc
1938493294fbad3a461cc3a752c5385d30a6e51d
[ "MIT" ]
3
2015-05-08T00:55:38.000Z
2017-02-25T03:30:14.000Z
#!/usr/bin/env python # encoding: utf-8 from itertools import groupby from operator import itemgetter def get_real_bases(bases): """ Get real bases for types argument. >>> get_real_bases(None) #=> (object,) >>> get_real_bases(TypeA) #=> (TypeA,) >>> get_real_bases([TypeA, TypeB]) #=> (TypeA, Type...
25.152284
75
0.587891
#!/usr/bin/env python # encoding: utf-8 from itertools import groupby from operator import itemgetter def get_real_bases(bases): """ Get real bases for types argument. >>> get_real_bases(None) #=> (object,) >>> get_real_bases(TypeA) #=> (TypeA,) >>> get_real_bases([TypeA, TypeB]) #=> (TypeA, Type...
2,396
0
261
71de2eae5aee65bc132d29967be856043a214997
6,807
py
Python
notebook/script/MachineLearning.py
licheng-xu-echo/SyntheticSpacePrediction
986b6d010b10c825121452880aecf8e195793a13
[ "MIT" ]
null
null
null
notebook/script/MachineLearning.py
licheng-xu-echo/SyntheticSpacePrediction
986b6d010b10c825121452880aecf8e195793a13
[ "MIT" ]
null
null
null
notebook/script/MachineLearning.py
licheng-xu-echo/SyntheticSpacePrediction
986b6d010b10c825121452880aecf8e195793a13
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Fri Mar 25 21:00:31 2022 @author: LiCheng_Xu """ import numpy as np from .TargetTransformation import ddG2ee import matplotlib.pyplot as plt from scipy.interpolate import make_interp_spline from sklearn.model_selection import KFold
41.506098
117
0.58763
# -*- coding: utf-8 -*- """ Created on Fri Mar 25 21:00:31 2022 @author: LiCheng_Xu """ import numpy as np from .TargetTransformation import ddG2ee import matplotlib.pyplot as plt from scipy.interpolate import make_interp_spline from sklearn.model_selection import KFold def std_error(truth,pred): ret...
6,434
0
124
c8521555850f9bc486cf9f8cc0ba3ef9390b66ee
875
py
Python
my_lambdata/postISA.py
SaraWestWA/lambdata-iambrookedrake
a599cec77cdeb37b3465adc6d0d3e5e92b050ad6
[ "MIT" ]
null
null
null
my_lambdata/postISA.py
SaraWestWA/lambdata-iambrookedrake
a599cec77cdeb37b3465adc6d0d3e5e92b050ad6
[ "MIT" ]
1
2021-08-23T20:57:33.000Z
2021-08-23T20:57:33.000Z
my_lambdata/postISA.py
SaraWestWA/lambdata-iambrookedrake
a599cec77cdeb37b3465adc6d0d3e5e92b050ad6
[ "MIT" ]
2
2020-07-13T01:26:47.000Z
2020-09-15T03:29:08.000Z
import pandas as pd # Accepts input for 'Salary Offer' and 'Tax Rate %' to provide # Annual, Monthly, and Weekly take home pay after taxes and # Lambda ISA deductions if __name__ == '__main__': salary = int(input("Salary Offer $:")) taxrate = int(input('Tax Rate as Whole Number ___%:')) take_h...
35
72
0.637714
import pandas as pd class TakeHomePay(): # Accepts input for 'Salary Offer' and 'Tax Rate %' to provide # Annual, Monthly, and Weekly take home pay after taxes and # Lambda ISA deductions def __init__(self, salary, taxrate): self.salary = salary self.taxrate = taxrate def postISA...
238
-1
77
22be887cd1f296eff9257ff04bb6e26cac5510dd
5,976
py
Python
Job Portal with Automated Resume Screening/gensim-4.1.2/gensim/scripts/word2vec_standalone.py
Candida18/Job-Portal-with-Automated-Resume-Screening
19d19464ad3d1714da856656753a4afdfe257b31
[ "MIT" ]
3
2021-03-29T19:21:08.000Z
2021-12-31T09:30:11.000Z
Job Portal with Automated Resume Screening/gensim-4.1.2/gensim/scripts/word2vec_standalone.py
Candida18/Job-Portal-with-Automated-Resume-Screening
19d19464ad3d1714da856656753a4afdfe257b31
[ "MIT" ]
1
2021-08-30T08:53:09.000Z
2021-08-30T08:53:09.000Z
venv/Lib/site-packages/gensim/scripts/word2vec_standalone.py
saritmaitra/nlp_ner_topic_modeling
70914b4ae4cd7d3b9cb10776161132216394883c
[ "MIT" ]
2
2022-01-15T05:36:58.000Z
2022-02-08T15:25:50.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ USAGE: %(program)s -train CORPUS -output VECTORS -size SIZE -window WINDOW -cbow CBOW -sample SAMPLE -hs HS -negative NEGATIVE -threads THREADS -iter ITER -min_count MIN-COUNT -alpha ALPHA -b...
41.5
118
0.643574
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ USAGE: %(program)s -train CORPUS -output VECTORS -size SIZE -window WINDOW -cbow CBOW -sample SAMPLE -hs HS -negative NEGATIVE -threads THREADS -iter ITER -min_count MIN-COUNT -alpha ALPHA -b...
0
0
0
fc3ad5daaf48fb4119014f23e24f8ab5e227292c
2,951
py
Python
352/mini-projects/hw3/CENG352_Mini_Project_3_Files/source/validators.py
ysyesilyurt/Metu-CENG
a83fcab00f68e28bda307bb94c060f55042a1389
[ "MIT" ]
33
2019-03-19T07:51:17.000Z
2022-03-15T11:04:35.000Z
352/mini-projects/hw3/CENG352_Mini_Project_3_Files/source/validators.py
ysyesilyurt/Metu-CENG
a83fcab00f68e28bda307bb94c060f55042a1389
[ "MIT" ]
1
2019-11-09T18:08:21.000Z
2019-11-09T18:08:21.000Z
352/mini-projects/hw3/CENG352_Mini_Project_3_Files/source/validators.py
ysyesilyurt/Metu-CENG
a83fcab00f68e28bda307bb94c060f55042a1389
[ "MIT" ]
13
2019-11-08T06:18:21.000Z
2022-01-07T17:17:38.000Z
import messages """ This validator is basic validator that returns (True, None) when a user is authenticated and the number of command tokens is 1. Returns (False, <message>) otherwise. """
29.808081
76
0.689258
import messages def sign_up_validator(auth_customer, cmd_tokens): # disregard already signed in users if auth_customer: return False, messages.USER_ALREADY_SIGNED_IN # sign_up <email> <password> <first_name> <last_name> <plan_id> elif len(cmd_tokens) == 6: return True, None ...
2,441
0
275
f72ac585b2ba49e680b69313a2fa0d0a5d6a749c
137
py
Python
Python/Regex and Parsing/Validating Roman Numerals/Solution.py
PawarAditi/HackerRank
fcd9d1450ee293372ce5f1d4a3b7284ecf472657
[ "MIT" ]
219
2018-06-17T19:47:22.000Z
2022-03-27T15:28:56.000Z
Python/Regex and Parsing/Validating Roman Numerals/Solution.py
PawarAditi/HackerRank
fcd9d1450ee293372ce5f1d4a3b7284ecf472657
[ "MIT" ]
2
2020-08-12T16:47:41.000Z
2020-12-15T17:05:57.000Z
Python/Regex and Parsing/Validating Roman Numerals/Solution.py
PawarAditi/HackerRank
fcd9d1450ee293372ce5f1d4a3b7284ecf472657
[ "MIT" ]
182
2018-12-12T21:36:50.000Z
2022-03-26T17:49:51.000Z
import re regex_pattern = r'M{0,3}(C[MD]|D?C{0,3})(X[CL]|L?X{0,3})(I[VX]|V?I{0,3})$' print(str(bool(re.match(regex_pattern, input()))))
27.4
74
0.605839
import re regex_pattern = r'M{0,3}(C[MD]|D?C{0,3})(X[CL]|L?X{0,3})(I[VX]|V?I{0,3})$' print(str(bool(re.match(regex_pattern, input()))))
0
0
0
8791a7ba3ffc3a49544214256a6f8aed850b1945
4,232
py
Python
Day12/12_passage_pathing.py
schca675/my-code-for-advent-of-code-2021
e8bdb986930b444884d37e679a37ed25efe2b34e
[ "Apache-2.0" ]
null
null
null
Day12/12_passage_pathing.py
schca675/my-code-for-advent-of-code-2021
e8bdb986930b444884d37e679a37ed25efe2b34e
[ "Apache-2.0" ]
null
null
null
Day12/12_passage_pathing.py
schca675/my-code-for-advent-of-code-2021
e8bdb986930b444884d37e679a37ed25efe2b34e
[ "Apache-2.0" ]
null
null
null
# --- Day 12: Passage Pathing --- import copy print("TEST") resolve_puzzle("test_data.txt") print("PUZZLE") resolve_puzzle("data.txt") ## takes a while (<1min) --> not very efficient
41.490196
133
0.624764
# --- Day 12: Passage Pathing --- import copy class Path: def __init__(self, cave, steps_taken, next_step, has_visited_lower_caves, lower_case_visited_twice): self.lower_cave_visited_twice = lower_case_visited_twice self.has_visited_lower_caves = has_visited_lower_caves if len(has_visited_l...
3,819
-24
247
5e0f6f4ca343035446ce4d5b7cee2f2840ba7722
2,627
py
Python
optimization_tutorial/optimizers/parameters_dicts.py
gniqeh/optimization-tutorial
f72f7c08a3e857ed36c4b3973f0164862680a3de
[ "MIT" ]
null
null
null
optimization_tutorial/optimizers/parameters_dicts.py
gniqeh/optimization-tutorial
f72f7c08a3e857ed36c4b3973f0164862680a3de
[ "MIT" ]
null
null
null
optimization_tutorial/optimizers/parameters_dicts.py
gniqeh/optimization-tutorial
f72f7c08a3e857ed36c4b3973f0164862680a3de
[ "MIT" ]
null
null
null
epsilon_d_ = { "epsilon": ["float", "0.03", "0.01 ... 0.3"], } distribution_d_ = { "distribution": ["string", "normal", "normal, laplace, logistic, gumbel"], } n_neighbours_d_ = { "n_neighbours": ["int", "3", "1 ... 10"], } p_accept_d_ = { "p_accept": ["float", "0.1", "0.01 ... 0.3"], } repulsion_factor...
23.247788
78
0.50552
epsilon_d_ = { "epsilon": ["float", "0.03", "0.01 ... 0.3"], } distribution_d_ = { "distribution": ["string", "normal", "normal, laplace, logistic, gumbel"], } n_neighbours_d_ = { "n_neighbours": ["int", "3", "1 ... 10"], } p_accept_d_ = { "p_accept": ["float", "0.1", "0.01 ... 0.3"], } repulsion_factor...
0
0
0
34998dafee2d5b0abab5b24a8a1a045fcb034d90
3,173
py
Python
mt/base/aio/procedure.py
inteplus/mtbase
b211f25110f95be8b78be3e44feb1c16789c13b8
[ "MIT" ]
null
null
null
mt/base/aio/procedure.py
inteplus/mtbase
b211f25110f95be8b78be3e44feb1c16789c13b8
[ "MIT" ]
null
null
null
mt/base/aio/procedure.py
inteplus/mtbase
b211f25110f95be8b78be3e44feb1c16789c13b8
[ "MIT" ]
null
null
null
'''Asynchronous procedure. An asynchronous procedure, a.k.a. an aproc, is a procedure that is asynchronous and has been wrapped into an :class:`asyncio.Future`. A procedure is a function that returns None. ''' import asyncio __all__ = ['AprocManager'] class AprocManager: '''Manages the completion of aprocs. ...
39.6625
109
0.6341
'''Asynchronous procedure. An asynchronous procedure, a.k.a. an aproc, is a procedure that is asynchronous and has been wrapped into an :class:`asyncio.Future`. A procedure is a function that returns None. ''' import asyncio __all__ = ['AprocManager'] class AprocManager: '''Manages the completion of aprocs. ...
1,444
0
54
8274136679ce63a74786a5d2b3687fe982c83c08
2,005
py
Python
hypno.py
Leonidas-from-XIV/sandbox
ca1f53d4ba1c27be4397c18bf3d5a2ccf9db6a50
[ "WTFPL" ]
null
null
null
hypno.py
Leonidas-from-XIV/sandbox
ca1f53d4ba1c27be4397c18bf3d5a2ccf9db6a50
[ "WTFPL" ]
null
null
null
hypno.py
Leonidas-from-XIV/sandbox
ca1f53d4ba1c27be4397c18bf3d5a2ccf9db6a50
[ "WTFPL" ]
null
null
null
#!/usr/bin/env python # -*- coding: UTF-8 -*- import math import gtk, gobject import gnomecanvas if __name__ == '__main__': main()
29.925373
70
0.573566
#!/usr/bin/env python # -*- coding: UTF-8 -*- import math import gtk, gobject import gnomecanvas class HypnoticWindow(object): def __init__(self, width, height): self.window = gtk.Window() self.window.set_title('Spiral') self.window.connect('delete_event', gtk.main_quit) self.width,...
1,140
683
46
0c3a35ed3caed81730d5c1e91525115e25c0ced4
2,954
py
Python
crew.py
koenhagen/lb-bot
8433a401fe1d2d3237f8a8a028bb5ed4298e280d
[ "MIT" ]
10
2021-01-27T01:55:38.000Z
2022-02-04T06:09:31.000Z
crew.py
koenhagen/lb-bot
8433a401fe1d2d3237f8a8a028bb5ed4298e280d
[ "MIT" ]
null
null
null
crew.py
koenhagen/lb-bot
8433a401fe1d2d3237f8a8a028bb5ed4298e280d
[ "MIT" ]
5
2021-01-17T21:33:34.000Z
2022-02-13T19:58:45.000Z
from api import api_call from config import SETTINGS from helpers import create_embed, LetterboxdError
37.392405
78
0.63981
from api import api_call from config import SETTINGS from helpers import create_embed, LetterboxdError async def crew_embed(input_name, cmd_alias): lbxd_id = __check_if_fixed_search(input_name) person_json = await __search_letterboxd(input_name, cmd_alias, lbxd_id) description, name, url, tmdb_id = __get_...
2,707
0
138
46d4cfc2a4ae2b3653dbb6e24c91be1e5c58e672
1,725
py
Python
systori/apps/company/migrations/0002_auto_20190730_2210.py
systori/systori
e309c63e735079ff6032fdaf1db354ec872b28b1
[ "BSD-3-Clause" ]
12
2018-01-30T00:44:06.000Z
2020-07-13T05:20:48.000Z
systori/apps/company/migrations/0002_auto_20190730_2210.py
systori/systori
e309c63e735079ff6032fdaf1db354ec872b28b1
[ "BSD-3-Clause" ]
36
2018-03-06T17:49:50.000Z
2020-06-23T19:26:00.000Z
systori/apps/company/migrations/0002_auto_20190730_2210.py
systori/systori
e309c63e735079ff6032fdaf1db354ec872b28b1
[ "BSD-3-Clause" ]
3
2018-08-03T07:03:09.000Z
2020-07-09T20:21:10.000Z
# Generated by Django 2.0.13 on 2019-07-30 20:10 from django.conf import settings from django.db import migrations, models import django.db.models.deletion from postgres_schema.operations import RunInPublic
28.75
68
0.496232
# Generated by Django 2.0.13 on 2019-07-30 20:10 from django.conf import settings from django.db import migrations, models import django.db.models.deletion from postgres_schema.operations import RunInPublic class Migration(migrations.Migration): initial = True dependencies = [ ("company", "0001_ini...
0
1,493
23
652e1af2d76fc8f234b10e9c9f6b44f047c6d6ce
10,843
py
Python
android/python/cellbotRemote.py
jlivingstonsg/Cellbots-2019
2e4635beab0cabef7a75e9d863d588b51db0e74d
[ "Apache-2.0" ]
2
2018-10-11T16:11:11.000Z
2018-10-11T16:15:53.000Z
android/python/cellbotRemote.py
jlivingstonsg/Cellbots-2019
2e4635beab0cabef7a75e9d863d588b51db0e74d
[ "Apache-2.0" ]
38
2015-03-03T22:32:20.000Z
2015-03-03T22:32:47.000Z
android/python/cellbotRemote.py
jlivingstonsg/Cellbots-2019
2e4635beab0cabef7a75e9d863d588b51db0e74d
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
37.649306
80
0.636909
# Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
8,826
719
239
de4b2a6933b3aa5e5ae0ced88de5b8ddb6b75250
4,802
py
Python
data/train/python/d83dbb1902b79a51c8b572a88e9c7888c362d43c__init__.py
harshp8l/deep-learning-lang-detection
2a54293181c1c2b1a2b840ddee4d4d80177efb33
[ "MIT" ]
84
2017-10-25T15:49:21.000Z
2021-11-28T21:25:54.000Z
data/train/python/d83dbb1902b79a51c8b572a88e9c7888c362d43c__init__.py
vassalos/deep-learning-lang-detection
cbb00b3e81bed3a64553f9c6aa6138b2511e544e
[ "MIT" ]
5
2018-03-29T11:50:46.000Z
2021-04-26T13:33:18.000Z
data/train/python/d83dbb1902b79a51c8b572a88e9c7888c362d43c__init__.py
vassalos/deep-learning-lang-detection
cbb00b3e81bed3a64553f9c6aa6138b2511e544e
[ "MIT" ]
24
2017-11-22T08:31:00.000Z
2022-03-27T01:22:31.000Z
from fabric.api import * from fabric.contrib.files import * from path import path as ppath app = env.app = { 'live_catalogue-repo': 'https://svn.eionet.europa.eu/repositories/Python/flis.live_catalogue', 'localrepo': ppath(__file__).abspath().parent.parent, } try: from localcfg import * except: pass app.upda...
36.105263
104
0.636818
from fabric.api import * from fabric.contrib.files import * from path import path as ppath app = env.app = { 'live_catalogue-repo': 'https://svn.eionet.europa.eu/repositories/Python/flis.live_catalogue', 'localrepo': ppath(__file__).abspath().parent.parent, } try: from localcfg import * except: pass app.upda...
4,027
0
178
33f3d29ca81d488b9b1fa12a199928dd2f994a1a
1,643
py
Python
tests/unit/ipnetwork/test_brtransferipnetworkcommand.py
ivcmartello/registrobrepp
dece39a451bcdb964d337df6aa7bd418a60c1a85
[ "MIT" ]
null
null
null
tests/unit/ipnetwork/test_brtransferipnetworkcommand.py
ivcmartello/registrobrepp
dece39a451bcdb964d337df6aa7bd418a60c1a85
[ "MIT" ]
null
null
null
tests/unit/ipnetwork/test_brtransferipnetworkcommand.py
ivcmartello/registrobrepp
dece39a451bcdb964d337df6aa7bd418a60c1a85
[ "MIT" ]
null
null
null
import pytest from eppy.doc import EppResponse from lxml import etree from registrobrepp.ipnetwork.brtransferipnetworkcommand import BrEppTransferIpNetworkCommand
42.128205
136
0.712112
import pytest from eppy.doc import EppResponse from lxml import etree from registrobrepp.ipnetwork.brtransferipnetworkcommand import BrEppTransferIpNetworkCommand class TestBrTransferIpNetworkCommand: @pytest.fixture def ipnetworkcommand(self): roid = 'b_12345-LACNIC' command = BrEppTransfer...
1,338
117
23
d1b656c61ecb335fbfba74450b82a969d9671697
2,858
py
Python
nozbe.py
msielicki/python-nozbe
6cc9287e4db106c75e279ef428881bcbdcc16e83
[ "MIT" ]
2
2017-03-13T22:37:35.000Z
2019-07-29T00:19:43.000Z
nozbe.py
msielicki/python-nozbe
6cc9287e4db106c75e279ef428881bcbdcc16e83
[ "MIT" ]
null
null
null
nozbe.py
msielicki/python-nozbe
6cc9287e4db106c75e279ef428881bcbdcc16e83
[ "MIT" ]
2
2018-02-18T08:23:36.000Z
2018-09-03T12:10:49.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: Mariusz Sielicki <mariusz.sielicki@gmail.com> import logging import requests log = logging.getLogger("nozbe")
30.731183
83
0.584325
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: Mariusz Sielicki <mariusz.sielicki@gmail.com> import logging import requests log = logging.getLogger("nozbe") class Nozbe(object): API_URL = 'https://webapp.nozbe.com/api' API_KEY = None SESSION = None ACTIONS = ('projects', 'contexts', 'newproj...
2,238
429
23
7b6ee7f219bb40fd9c0b27109e5cf02b92963deb
2,866
py
Python
vision/benchmarks/times/bench_obstacle.py
pieperm/IARC-2020
a90bfe830ea2ceced59e8f2e7b54862dda42f5a3
[ "MIT" ]
12
2019-10-10T22:17:45.000Z
2021-09-14T23:54:02.000Z
vision/benchmarks/times/bench_obstacle.py
pieperm/IARC-2020
a90bfe830ea2ceced59e8f2e7b54862dda42f5a3
[ "MIT" ]
178
2019-10-29T16:28:02.000Z
2021-07-26T17:15:31.000Z
vision/benchmarks/times/bench_obstacle.py
pieperm/IARC-2020
a90bfe830ea2ceced59e8f2e7b54862dda42f5a3
[ "MIT" ]
6
2019-10-09T00:20:27.000Z
2021-09-28T00:24:00.000Z
""" Utility to measure performance of obstacle detector. Parameter Defaults ------------------ Resolution = (1280, 720) Noise SD = 0 N Objects = 0 Type = circle Radius = 100 """ import os, sys parent_dir = os.path.dirname(os.path.abspath(__file__)) gparent_dir = os.path.dirname(parent_dir) ggparent_dir = os.path.dirna...
32.568182
101
0.647244
""" Utility to measure performance of obstacle detector. Parameter Defaults ------------------ Resolution = (1280, 720) Noise SD = 0 N Objects = 0 Type = circle Radius = 100 """ import os, sys parent_dir = os.path.dirname(os.path.abspath(__file__)) gparent_dir = os.path.dirname(parent_dir) ggparent_dir = os.path.dirna...
0
0
0
8f1e732615d84da880b410262631235f8839a656
8,469
py
Python
molly/apps/library/views.py
mollyproject/mollyproject
3247c6bac3f39ce8d275d19aa410b30c6284b8a7
[ "Apache-2.0" ]
7
2015-05-16T13:27:21.000Z
2019-08-06T11:09:24.000Z
molly/apps/library/views.py
mollyproject/mollyproject
3247c6bac3f39ce8d275d19aa410b30c6284b8a7
[ "Apache-2.0" ]
null
null
null
molly/apps/library/views.py
mollyproject/mollyproject
3247c6bac3f39ce8d275d19aa410b30c6284b8a7
[ "Apache-2.0" ]
4
2015-11-27T13:36:36.000Z
2021-03-09T17:55:53.000Z
from datetime import timedelta from django.core.paginator import Paginator from django.http import Http404 from django.utils.translation import ugettext as _ from molly.utils import haversine from molly.utils.views import BaseView, ZoomableView from molly.utils.breadcrumbs import * from molly.maps import Map from mo...
33.741036
97
0.58106
from datetime import timedelta from django.core.paginator import Paginator from django.http import Http404 from django.utils.translation import ugettext as _ from molly.utils import haversine from molly.utils.views import BaseView, ZoomableView from molly.utils.breadcrumbs import * from molly.maps import Map from mo...
7,052
0
464
7c4ea99478a8b815bbc72c96a682399b86c5de9d
3,902
py
Python
unit_08/main7.py
janusnic/21v-pyqt
8ee3828e1c6e6259367d6cedbd63b9057cf52c24
[ "MIT" ]
null
null
null
unit_08/main7.py
janusnic/21v-pyqt
8ee3828e1c6e6259367d6cedbd63b9057cf52c24
[ "MIT" ]
null
null
null
unit_08/main7.py
janusnic/21v-pyqt
8ee3828e1c6e6259367d6cedbd63b9057cf52c24
[ "MIT" ]
2
2019-11-14T15:04:22.000Z
2021-10-31T07:34:46.000Z
# -*- coding:utf-8 -*- import os import sys from PyQt4.QtGui import * from PyQt4.QtCore import * from sqldb import * from add_customer import * from customer_order import * main()
38.254902
103
0.705279
# -*- coding:utf-8 -*- import os import sys from PyQt4.QtGui import * from PyQt4.QtCore import * from sqldb import * from add_customer import * from customer_order import * class ShopWindow(QMainWindow): def __init__(self, parent=None): super(ShopWindow, self).__init__(parent) self.setMinimumWidt...
3,572
9
180
9aa3bd2b23226f521d7c52a9adbd1c90b631cff8
13,955
py
Python
src/pyams_portal/portlet.py
Py-AMS/pyams-portal
a19f48079e683711394b8e57c05cf7cd9d20a888
[ "ZPL-2.1" ]
null
null
null
src/pyams_portal/portlet.py
Py-AMS/pyams-portal
a19f48079e683711394b8e57c05cf7cd9d20a888
[ "ZPL-2.1" ]
null
null
null
src/pyams_portal/portlet.py
Py-AMS/pyams-portal
a19f48079e683711394b8e57c05cf7cd9d20a888
[ "ZPL-2.1" ]
null
null
null
# # Copyright (c) 2015-2021 Thierry Florac <tflorac AT ulthar.net> # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRAN...
36.341146
98
0.68771
# # Copyright (c) 2015-2021 Thierry Florac <tflorac AT ulthar.net> # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRAN...
2,700
0
162
bc5db1a7313edd0e614dac7de99e16d9af554f32
1,252
py
Python
simulate.py
trevharmon/gold-silver-3box
8d1428e2400c6abbcfb862f69a3432cf882701de
[ "Apache-2.0" ]
null
null
null
simulate.py
trevharmon/gold-silver-3box
8d1428e2400c6abbcfb862f69a3432cf882701de
[ "Apache-2.0" ]
null
null
null
simulate.py
trevharmon/gold-silver-3box
8d1428e2400c6abbcfb862f69a3432cf882701de
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import random import time tests = 1000000 boxes = [[ 'G', 'G' ], [ 'G', 'S' ], [ 'S', 'S' ]] draws = [[[ 0, 0 ], [ 0, 0 ], [ 0, 0 ]], [[ 0, 0 ], [ 0, 0 ], [ 0, 0 ]]] total_gold_1 = 0 total_gold_2 = 0 print('Running %d tests.'%(tests)) random.seed(int(time.time())) for...
29.809524
78
0.517572
#!/usr/bin/env python import random import time tests = 1000000 boxes = [[ 'G', 'G' ], [ 'G', 'S' ], [ 'S', 'S' ]] draws = [[[ 0, 0 ], [ 0, 0 ], [ 0, 0 ]], [[ 0, 0 ], [ 0, 0 ], [ 0, 0 ]]] total_gold_1 = 0 total_gold_2 = 0 print('Running %d tests.'%(tests)) random.seed(int(time.time())) for...
0
0
0
0fb7fb95900ecf367a17b0e5bad2f5a6a92e2e5d
3,961
py
Python
workflow/scripts/VennDiagrams.py
sanjaynagi/rna-seq-pop
fedbdd374837876947be5c4d113f05a1577045ca
[ "MIT" ]
2
2021-06-22T13:05:43.000Z
2022-01-31T08:00:33.000Z
workflow/scripts/VennDiagrams.py
sanjaynagi/rna-seq-pop
fedbdd374837876947be5c4d113f05a1577045ca
[ "MIT" ]
3
2021-06-18T09:22:29.000Z
2022-03-26T19:52:11.000Z
workflow/scripts/VennDiagrams.py
sanjaynagi/rna-seq-pop
fedbdd374837876947be5c4d113f05a1577045ca
[ "MIT" ]
1
2021-12-16T03:11:02.000Z
2021-12-16T03:11:02.000Z
#!/usr/bin/env python3 """ A script to get the intersections of Differential expression results, Fst, and differential SNPs analysis. Draws Venn diagrams and adds columns to RNA-seq-diff.xlsx, whether the gene has high Fst/PBS/diffsnps. """ import sys sys.stderr = open(snakemake.log[0], "w") import matplotlib matplo...
35.053097
118
0.666246
#!/usr/bin/env python3 """ A script to get the intersections of Differential expression results, Fst, and differential SNPs analysis. Draws Venn diagrams and adds columns to RNA-seq-diff.xlsx, whether the gene has high Fst/PBS/diffsnps. """ import sys sys.stderr = open(snakemake.log[0], "w") import matplotlib matplo...
1,320
0
73
d9d99c47ac71fe23afdeb2996eb3a11528a72814
464
py
Python
104. Maximum Depth of Binary Tree.py
JazzikPeng/Algorithm-in-Python
915135b1cdd02a6bb8d7068a54b2f497b2ec31d4
[ "MIT" ]
3
2018-02-05T06:15:57.000Z
2019-04-07T23:33:07.000Z
104. Maximum Depth of Binary Tree.py
JazzikPeng/Algorithm-in-Python
915135b1cdd02a6bb8d7068a54b2f497b2ec31d4
[ "MIT" ]
null
null
null
104. Maximum Depth of Binary Tree.py
JazzikPeng/Algorithm-in-Python
915135b1cdd02a6bb8d7068a54b2f497b2ec31d4
[ "MIT" ]
null
null
null
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None
24.421053
42
0.482759
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def maxDepth(self, root): """ :type root: TreeNode :rtype: int """ if root is None: ...
0
279
24