hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
dac3972df47a878c3756101ad08dfd5e7487db7c
1,491
py
Python
Algo and DSA/LeetCode-Solutions-master/Python/minimum-number-of-operations-to-reinitialize-a-permutation.py
Sourav692/FAANG-Interview-Preparation
f523e5c94d582328b3edc449ea16ac6ab28cdc81
[ "Unlicense" ]
3,269
2018-10-12T01:29:40.000Z
2022-03-31T17:58:41.000Z
Algo and DSA/LeetCode-Solutions-master/Python/minimum-number-of-operations-to-reinitialize-a-permutation.py
Sourav692/FAANG-Interview-Preparation
f523e5c94d582328b3edc449ea16ac6ab28cdc81
[ "Unlicense" ]
53
2018-12-16T22:54:20.000Z
2022-02-25T08:31:20.000Z
Algo and DSA/LeetCode-Solutions-master/Python/minimum-number-of-operations-to-reinitialize-a-permutation.py
Sourav692/FAANG-Interview-Preparation
f523e5c94d582328b3edc449ea16ac6ab28cdc81
[ "Unlicense" ]
1,236
2018-10-12T02:51:40.000Z
2022-03-30T13:30:37.000Z
# Time: O(sqrt(n)) # Space: O(sqrt(n)) # Time: O(n) # Space: O(1) # Time: O(n) # Space: O(1)
24.442623
99
0.428571
# Time: O(sqrt(n)) # Space: O(sqrt(n)) class Solution(object): def reinitializePermutation(self, n): """ :type n: int :rtype: int """ # reference: https://cp-algorithms.com/algebra/discrete-log.html def discrete_log(a, b, m): a %= m b %= m ...
0
0
0
1,324
0
0
0
0
67
b9f202eff4afce8d5b6efdead49b6cd42bd0114b
1,269
py
Python
setup.py
ucl-exoplanets/taurex-ultranest
b8d933f3179217757d2fc6d238ccb67a432a06e3
[ "BSD-3-Clause" ]
null
null
null
setup.py
ucl-exoplanets/taurex-ultranest
b8d933f3179217757d2fc6d238ccb67a432a06e3
[ "BSD-3-Clause" ]
null
null
null
setup.py
ucl-exoplanets/taurex-ultranest
b8d933f3179217757d2fc6d238ccb67a432a06e3
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python from setuptools import find_packages from distutils.core import setup packages = find_packages(exclude=('tests', 'doc')) provides = ['taurex_ultranest', ] requires = [] install_requires = ['taurex','ultranest', ] entry_points = {'taurex.plugins': 'ultranest = taurex_ultranest'} with open("REA...
27.586957
65
0.619385
#!/usr/bin/env python import setuptools from setuptools import find_packages from distutils.core import setup from distutils.core import Extension from distutils import log import re, os packages = find_packages(exclude=('tests', 'doc')) provides = ['taurex_ultranest', ] requires = [] install_requires = ['taurex','u...
0
0
0
0
0
0
0
7
88
24e711e1aea144926e7fb1ce6fd28c7141879705
5,264
py
Python
django/apps/issues/tests/test_tasks.py
Haakenlid/tassen
911a2541c77eca522ba5a723f175786f4f9eb481
[ "Apache-2.0" ]
16
2017-03-21T03:53:37.000Z
2021-08-14T06:28:02.000Z
django/apps/issues/tests/test_tasks.py
universitas/universitas.no
911a2541c77eca522ba5a723f175786f4f9eb481
[ "Apache-2.0" ]
104
2017-03-25T00:12:46.000Z
2021-03-09T22:40:58.000Z
django/apps/issues/tests/test_tasks.py
Haakenlid/tassen
911a2541c77eca522ba5a723f175786f4f9eb481
[ "Apache-2.0" ]
6
2017-03-21T03:53:40.000Z
2020-06-07T14:15:38.000Z
"""Tests for issue and pdf tasks""" from pathlib import PosixPath as Path from PIL import Image import pytest from apps.issues.tasks import (convert_pdf_to_web, generate_pdf_preview) PAGE_ONE = 'UNI11VER16010101000.pdf' def test_convert_pdf_page_to_web(tmp_fixture_dir): """Convert single page pdf to web vers...
27.560209
78
0.691489
"""Tests for issue and pdf tasks""" import datetime from datetime import date from pathlib import PosixPath as Path import shutil import tempfile from PIL import Image from django.utils import timezone import pytest from apps.issues.models import Issue, PrintIssue from apps.issues.tasks import ( MissingBinary, ...
0
1,768
0
0
0
1,470
0
170
272
0a8ca45f5e5e66a8ac1c06b8c37a3af69ae4b211
108,870
py
Python
mesonbuild/build.py
EdouardThiel/meson
47759550e5f6a5e617ff686f2b5f275ade97c4b2
[ "Apache-2.0" ]
null
null
null
mesonbuild/build.py
EdouardThiel/meson
47759550e5f6a5e617ff686f2b5f275ade97c4b2
[ "Apache-2.0" ]
null
null
null
mesonbuild/build.py
EdouardThiel/meson
47759550e5f6a5e617ff686f2b5f275ade97c4b2
[ "Apache-2.0" ]
null
null
null
# Copyright 2012-2017 The Meson development team # 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 agree...
43.426406
183
0.611252
# Copyright 2012-2017 The Meson development team # 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 agree...
0
4,844
0
98,780
0
1,023
0
317
884
d3781514599815b24fa3f214376490a413bd3960
2,587
py
Python
swagger_server/models/site_data_schema_create.py
hedleyroos/core-user-data-store
b73ba3e89809e35e6c76ee44f837df1fc5ad6193
[ "BSD-3-Clause" ]
null
null
null
swagger_server/models/site_data_schema_create.py
hedleyroos/core-user-data-store
b73ba3e89809e35e6c76ee44f837df1fc5ad6193
[ "BSD-3-Clause" ]
43
2018-01-03T12:19:15.000Z
2018-10-18T11:52:21.000Z
swagger_server/models/site_data_schema_create.py
hedleyroos/core-user-data-store
b73ba3e89809e35e6c76ee44f837df1fc5ad6193
[ "BSD-3-Clause" ]
1
2021-08-17T12:05:23.000Z
2021-08-17T12:05:23.000Z
# coding: utf-8 from __future__ import absolute_import
27.231579
93
0.618864
# 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 SiteDataSchemaCreate(Model): """NOTE: This class is auto generated by th...
0
1,418
0
909
0
0
0
62
141
688ab7d5582ecbb7d3cd9bb44feb51d529cde255
1,389
py
Python
sorting/radix_sort.py
hnc01/clrs-algorithms
755b9658c1711a6adedac08a2ea9ff9745dd06cc
[ "MIT" ]
null
null
null
sorting/radix_sort.py
hnc01/clrs-algorithms
755b9658c1711a6adedac08a2ea9ff9745dd06cc
[ "MIT" ]
null
null
null
sorting/radix_sort.py
hnc01/clrs-algorithms
755b9658c1711a6adedac08a2ea9ff9745dd06cc
[ "MIT" ]
null
null
null
# We cant use counting sort because counting sort will take O(n2) which is worse than comparison-based sorting algorithms. # Can we sort such an array in linear time? Yes, we use radix sort. # Runtime Average-case, Best-case, Worst-case: Theta(d(n+k)) [if we're using counting sort as helper sorting algorithm] # =>...
23.948276
123
0.570194
def get_max(A, index): max = float("-inf") for i in range(0, len(A)): if A[i] // 10 ** index % 10 > max: max = A[i] // 10 ** index % 10 return max def counting_sort(A, B, k, index): C = [0] * (k + 1) for j in range(0, len(A)): C[A[j] // 10 ** index % 10] += 1 fo...
3
0
0
0
0
702
0
0
90
0aa3cd020eb12eb7e9160002c51f2070157513eb
5,556
py
Python
autotest/gcore/rat.py
rcoup/gdal
31240deb7b71d990a2abbad1bebedd0918989ca0
[ "MIT" ]
null
null
null
autotest/gcore/rat.py
rcoup/gdal
31240deb7b71d990a2abbad1bebedd0918989ca0
[ "MIT" ]
null
null
null
autotest/gcore/rat.py
rcoup/gdal
31240deb7b71d990a2abbad1bebedd0918989ca0
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # $Id$ # # Project: GDAL/OGR Test Suite # Purpose: Test RasterAttributeTables services from Python. # Author: Frank Warmerdam <warmerdam@pobox.com> # ########################################...
29.242105
81
0.598092
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # $Id$ # # Project: GDAL/OGR Test Suite # Purpose: Test RasterAttributeTables services from Python. # Author: Frank Warmerdam <warmerdam@pobox.com> # ########################################...
0
0
0
0
0
3,111
0
1
91
05958316be122a1d5a63b5b8188ca9d7c1d74f61
9,558
py
Python
crazyflie_demo/scripts/swarmskin.py
negvet/crazyflie_ros
649d01970687c576a576999429fe27c08f50a9ea
[ "MIT" ]
1
2021-04-28T06:52:38.000Z
2021-04-28T06:52:38.000Z
crazyflie_demo/scripts/swarmskin.py
negvet/crazyflie_ros
649d01970687c576a576999429fe27c08f50a9ea
[ "MIT" ]
null
null
null
crazyflie_demo/scripts/swarmskin.py
negvet/crazyflie_ros
649d01970687c576a576999429fe27c08f50a9ea
[ "MIT" ]
null
null
null
#!/usr/bin/env python import rospy import crazyflie import time import uav_trajectory import swarmlib import message_filters from geometry_msgs.msg import PoseStamped, TransformStamped import os from multiprocessing import Process import random import numpy as np # def land_detector(): # while not rospy.is_shutdo...
30.733119
182
0.588094
#!/usr/bin/env python import rospy import crazyflie import time import uav_trajectory import swarmlib import message_filters from geometry_msgs.msg import PoseStamped, TransformStamped import os from multiprocessing import Process import random import numpy as np from math import * def start_recording(): os.syst...
0
0
0
0
0
2,779
0
-3
91
cf87aea802e2fb0d15e85f468e3bfca3ccf7213b
18,982
py
Python
modules/mod.py
itzFlubby/ETIT-Chef
813223182bc0f4d0e94ceb9204cfd4abdee6f4ba
[ "MIT" ]
5
2021-03-23T20:41:55.000Z
2021-04-06T08:48:09.000Z
modules/mod.py
itzFlubby/ETIT-Chef
813223182bc0f4d0e94ceb9204cfd4abdee6f4ba
[ "MIT" ]
4
2021-04-21T14:31:55.000Z
2021-09-13T19:19:43.000Z
modules/mod.py
itzFlubby/ETIT-Chef
813223182bc0f4d0e94ceb9204cfd4abdee6f4ba
[ "MIT" ]
4
2021-03-28T22:23:36.000Z
2021-09-05T11:52:56.000Z
import modules.data.ids as ids
45.520384
329
0.669424
import datetime import discord import linecache import modules.bottiHelper import modules.data.ids as ids import os import xlrd import xlwt from time import sleep async def ban(botti, message, botData): """ Reserviert für Moderator oder höher Dieser Befehl bannt einen Nutzer. !ban {@USER} {@USER} ...
116
0
18,374
0
0
0
0
-44
551
e00acda8deb2928e3fa6dae4e89fe515352d6f7a
4,254
py
Python
python/ray/serve/autoscaling_metrics.py
mgelbart/ray
4cec2286572e368a4bd64aae467751a384eff62d
[ "Apache-2.0" ]
22
2018-05-08T05:52:34.000Z
2020-04-01T10:09:55.000Z
python/ray/serve/autoscaling_metrics.py
mgelbart/ray
4cec2286572e368a4bd64aae467751a384eff62d
[ "Apache-2.0" ]
73
2021-09-25T07:11:39.000Z
2022-03-26T07:10:59.000Z
python/ray/serve/autoscaling_metrics.py
mgelbart/ray
4cec2286572e368a4bd64aae467751a384eff62d
[ "Apache-2.0" ]
10
2018-04-27T10:50:59.000Z
2020-02-24T02:41:43.000Z
import threading from typing import Callable, Dict def start_metrics_pusher( interval_s: float, collection_callback: Callable[[], Dict[str, float]], controller_handle, ): """Start a background thread to push metrics to controller. We use this background so it will be not blocked by user's code an...
35.157025
85
0.64645
import threading import bisect from collections import defaultdict import time from typing import Callable, DefaultDict, Dict, List, Optional from dataclasses import dataclass, field import ray def start_metrics_pusher( interval_s: float, collection_callback: Callable[[], Dict[str, float]], controller_ha...
0
86
0
2,122
0
774
0
33
211
ce04f46ad32f50808f48fd17560b48ac48d75f28
487
py
Python
examples/bomb_planted.py
paulnbrd/csgogsi
b0bfb422cd62f92c888c746a873c719bad45753c
[ "MIT" ]
null
null
null
examples/bomb_planted.py
paulnbrd/csgogsi
b0bfb422cd62f92c888c746a873c719bad45753c
[ "MIT" ]
null
null
null
examples/bomb_planted.py
paulnbrd/csgogsi
b0bfb422cd62f92c888c746a873c719bad45753c
[ "MIT" ]
null
null
null
import csgogsi server = csgogsi.Server() # Default is host: 127.0.0.1, port: 3000 csgogsi.disable_log() server.disable_on_start_event_triggering = True server.run() print("This will never be printed because the csgogsi server is blocking the thread (blocking argument is True by " "default)")
30.4375
115
0.749487
import csgogsi server = csgogsi.Server() # Default is host: 127.0.0.1, port: 3000 csgogsi.disable_log() @server.add_observer("current_round", "bomb") # On bomb state changed def on_bomb_state_changed(): print("Bomb sate changed ! Now {}".format(server.payload.current_round.bomb)) server.disable_on_start_even...
0
160
0
0
0
0
0
0
23
ff71cda33289b0e553db2cce0fa7c4240d063763
4,628
py
Python
Systems/esh-spring-2015.git/eshtests/basic/fg_test.py
mikefeneley/school
5156f4537ca76782e7ad6df3c5ffe7b9fb5038da
[ "MIT" ]
1
2021-04-21T16:54:04.000Z
2021-04-21T16:54:04.000Z
Systems/esh-spring-2015.git/eshtests/basic/fg_test.py
mikefeneley/school
5156f4537ca76782e7ad6df3c5ffe7b9fb5038da
[ "MIT" ]
null
null
null
Systems/esh-spring-2015.git/eshtests/basic/fg_test.py
mikefeneley/school
5156f4537ca76782e7ad6df3c5ffe7b9fb5038da
[ "MIT" ]
null
null
null
#!/usr/bin/python # # fg_test: tests the fg command # # Test the fg command for bringing a command back to the foreground. # Requires the following commands to be implemented # or otherwise usable: # # fg, sleep, ctrl-c control, ctrl-z control # import sys, imp, atexit sys.path.append("/home/courses/cs3214/software/p...
30.248366
93
0.745678
#!/usr/bin/python # # fg_test: tests the fg command # # Test the fg command for bringing a command back to the foreground. # Requires the following commands to be implemented # or otherwise usable: # # fg, sleep, ctrl-c control, ctrl-z control # import sys, imp, atexit sys.path.append("/home/courses/cs3214/software/p...
0
0
0
0
0
43
0
22
22
f7998c2a4647774ce865c164b4c2e394b4dde8a7
1,463
py
Python
leetcode/python/medium/p033_search.py
kefirzhang/algorithms
549e68731d4c05002e35f0499d4f7744f5c63979
[ "Apache-2.0" ]
null
null
null
leetcode/python/medium/p033_search.py
kefirzhang/algorithms
549e68731d4c05002e35f0499d4f7744f5c63979
[ "Apache-2.0" ]
null
null
null
leetcode/python/medium/p033_search.py
kefirzhang/algorithms
549e68731d4c05002e35f0499d4f7744f5c63979
[ "Apache-2.0" ]
null
null
null
slu = Solution() print(slu.search([1,3], 1))
28.686275
50
0.416268
class Solution: def search(self, nums, target: int) -> int: def find_rotate_index(start, end): if nums[start] < nums[end]: return 0 while start <= end: mid = (start + end) // 2 if nums[mid] > nums[mid + 1]: return mi...
0
0
0
1,394
0
0
0
0
22
ecc3984a096924782d6954efe08ebd9e1942f2b4
6,609
py
Python
filestat/utils.py
zxalif/filestat
ff91fa235363d2d272f71dce716bbde98d98b026
[ "MIT" ]
null
null
null
filestat/utils.py
zxalif/filestat
ff91fa235363d2d272f71dce716bbde98d98b026
[ "MIT" ]
null
null
null
filestat/utils.py
zxalif/filestat
ff91fa235363d2d272f71dce716bbde98d98b026
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import os as _os from datetime import datetime as _datetime import pwd as _pwd import grp as _grp import getpass as _getpass def get_user_name() -> str: """Return current user name. Returns: str -- current user name""" return _getpass.getuser() def get_group_name(user: str = N...
23.43617
78
0.606143
#!/usr/bin/python3 import os as _os from datetime import datetime as _datetime import pwd as _pwd import grp as _grp import getpass as _getpass def get_user_name() -> str: """Return current user name. Returns: str -- current user name""" return _getpass.getuser() def get_group_name(user: str = N...
0
0
0
0
0
0
0
0
0
079b09db68d897c60b74ccb00edeac3fc1f0e986
984
py
Python
toolbox/asymgauss.py
lauralwatkins/toolbox
7da2de1859e7683ec368f486274548806c10e3b4
[ "BSD-2-Clause" ]
null
null
null
toolbox/asymgauss.py
lauralwatkins/toolbox
7da2de1859e7683ec368f486274548806c10e3b4
[ "BSD-2-Clause" ]
null
null
null
toolbox/asymgauss.py
lauralwatkins/toolbox
7da2de1859e7683ec368f486274548806c10e3b4
[ "BSD-2-Clause" ]
1
2020-06-11T19:52:12.000Z
2020-06-11T19:52:12.000Z
#!/usr/bin/env python import numpy as np from scipy import stats def asymgauss(x, mu, sigma_lower, sigma_upper): """ Program calculates an asymmetric Gaussian distribution (ie. a Gaussian with different standard deviations above and below the mean) for a given mean and standard deviations. There...
28.941176
76
0.671748
#!/usr/bin/env python import numpy as np from scipy import stats def asymgauss(x, mu, sigma_lower, sigma_upper): """ Program calculates an asymmetric Gaussian distribution (ie. a Gaussian with different standard deviations above and below the mean) for a given mean and standard deviations. There...
0
0
0
0
0
0
0
0
0
f5034bb3ec31cdc82388e7e728ca04270b9d0d5e
655
py
Python
front_data/urls.py
mahbd/django-front-data
5d42e8d42d2964fc278c389bfd5f761a66b4dc8e
[ "MIT" ]
null
null
null
front_data/urls.py
mahbd/django-front-data
5d42e8d42d2964fc278c389bfd5f761a66b4dc8e
[ "MIT" ]
null
null
null
front_data/urls.py
mahbd/django-front-data
5d42e8d42d2964fc278c389bfd5f761a66b4dc8e
[ "MIT" ]
null
null
null
try: from django.urls import include, path from rest_framework.routers import DefaultRouter from . import views router = DefaultRouter() router.register(r'faqs', views.FAQViewSet, 'faqs') router.register(r'front-data', views.FrontDataViewSet, 'front-data') router.register(r'front-data-std'...
34.473684
86
0.716031
try: from django.urls import include, path from rest_framework.routers import DefaultRouter from . import views router = DefaultRouter() router.register(r'faqs', views.FAQViewSet, 'faqs') router.register(r'front-data', views.FrontDataViewSet, 'front-data') router.register(r'front-data-std'...
0
0
0
0
0
0
0
0
0
354acd0b5fe975c845a2d00b9476debe52ff30fb
3,239
py
Python
mnist/ensemble_examples_wrapper_mnist.py
whxbergkamp/RobustDL_GAN
a622faf1c7d5e803bca3091dd035c616b5736bd7
[ "MIT" ]
22
2019-02-27T12:37:39.000Z
2021-04-19T04:08:36.000Z
mnist/ensemble_examples_wrapper_mnist.py
whxbergkamp/RobustDL_GAN
a622faf1c7d5e803bca3091dd035c616b5736bd7
[ "MIT" ]
3
2019-06-28T21:51:04.000Z
2021-03-19T08:08:50.000Z
mnist/ensemble_examples_wrapper_mnist.py
whxbergkamp/RobustDL_GAN
a622faf1c7d5e803bca3091dd035c616b5736bd7
[ "MIT" ]
4
2019-04-07T08:18:00.000Z
2021-12-22T00:45:19.000Z
# wrapper script for black box attacks import argparse parser = argparse.ArgumentParser(description='Black box attack on model 1 using model 2.') parser.add_argument('--output-size', default=64, type=int, help='Size of samples.') parser.add_argument('--c-dim', default=1, type=int, help='Number of channels.') parser....
42.064935
130
0.724606
# wrapper script for black box attacks import argparse from adversarial_networks.gen_static_adversarial_examples_mnist import gen_adv_examples import pprint from adversarial_networks import models import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data parser = argparse.ArgumentParser(de...
0
0
0
0
0
1,279
0
115
135
040a6bc0935c22996368851c6b1ef0268d1b32d2
3,060
py
Python
code/opaque-copy.py
gray0018/Poisson-image-editing
368a192ca9841c1b3e24097efa5941a64ffcd586
[ "MIT" ]
8
2019-05-07T13:24:48.000Z
2021-06-07T10:14:08.000Z
code/opaque-copy.py
gray0018/Poisson-image-editing
368a192ca9841c1b3e24097efa5941a64ffcd586
[ "MIT" ]
null
null
null
code/opaque-copy.py
gray0018/Poisson-image-editing
368a192ca9841c1b3e24097efa5941a64ffcd586
[ "MIT" ]
1
2019-08-08T14:45:21.000Z
2019-08-08T14:45:21.000Z
# -*- coding: utf-8 -*- import cv2 import numpy as np from scipy.sparse.linalg import spsolve offset = [[210, 10], [10, 28], [140, 80], [-40, 90], [60, 100], [-28, 88]] for pic_index in range(1, 6): mask = cv2.imread("../data/mask_0{0}.jpg".format(pic_index), 0) source = cv2.imread("../data/source_0{0}.jpg"....
33.626374
265
0.483333
# -*- coding: utf-8 -*- import cv2 import numpy as np from scipy.sparse.linalg import spsolve def fix_source(source, mask, shape, offset): mydict = {} counter = 0 for i in range(mask.shape[0]): for j in range(mask.shape[1]): if mask[i][j]>127: mydict[(i+offset[0], j+off...
0
0
0
0
0
623
0
0
23
177d9a1e9e0f177772f623ddc0ba97573e786966
805
py
Python
DSP Lab 7/keyboard_demos/pygame_demo_01.py
bubbledoodle/EL-GY-6183-Digital-Signal-Processing-LAB
fe8b00357f04a39806664d56eb4f9e9c681fb49e
[ "MIT" ]
null
null
null
DSP Lab 7/keyboard_demos/pygame_demo_01.py
bubbledoodle/EL-GY-6183-Digital-Signal-Processing-LAB
fe8b00357f04a39806664d56eb4f9e9c681fb49e
[ "MIT" ]
null
null
null
DSP Lab 7/keyboard_demos/pygame_demo_01.py
bubbledoodle/EL-GY-6183-Digital-Signal-Processing-LAB
fe8b00357f04a39806664d56eb4f9e9c681fb49e
[ "MIT" ]
null
null
null
# pygame_demo_01.py import pygame pygame.init() # Initializes pygame pge = pygame.event.get() print pge print type(pge) print 'pygame.KEYDOWN = ', pygame.KEYDOWN print 'pygame.KEYUP = ', pygame.KEYUP print 'Press q to quit (quit on un-press)' stop = False while stop == False: pge = pygame.event.get() if l...
16.1
47
0.642236
# pygame_demo_01.py import pygame pygame.init() # Initializes pygame pge = pygame.event.get() print pge print type(pge) print 'pygame.KEYDOWN = ', pygame.KEYDOWN print 'pygame.KEYUP = ', pygame.KEYUP print 'Press q to quit (quit on un-press)' stop = False while stop == False: pge = pygame.event.get() if l...
0
0
0
0
0
0
0
0
0
5d79707679b64ca8991483f8c34c9707ad34ecaa
1,826
py
Python
src/aiida_codtools/parsers/cif_split_primitive.py
aiidateam/aiida-codtools
548843c3e4dd74d8e10b56fda742a5837f499b99
[ "MIT" ]
null
null
null
src/aiida_codtools/parsers/cif_split_primitive.py
aiidateam/aiida-codtools
548843c3e4dd74d8e10b56fda742a5837f499b99
[ "MIT" ]
51
2017-09-13T12:22:03.000Z
2020-04-23T15:10:38.000Z
src/aiida_codtools/parsers/cif_split_primitive.py
aiidateam/aiida-codtools
548843c3e4dd74d8e10b56fda742a5837f499b99
[ "MIT" ]
7
2018-02-17T11:33:39.000Z
2021-11-24T10:42:35.000Z
# -*- coding: utf-8 -*- """Parser implementation for the `CifSplitPrimitiveCalculation` plugin."""
36.52
118
0.680723
# -*- coding: utf-8 -*- """Parser implementation for the `CifSplitPrimitiveCalculation` plugin.""" import os import traceback from aiida_codtools.calculations.cif_split_primitive import CifSplitPrimitiveCalculation from aiida_codtools.parsers.cif_base import CifBaseParser class CifSplitPrimitiveParser(CifBaseParser)...
0
0
0
1,528
0
0
0
86
112
65b9c6686abd7128d9b1ca41a36c3abedaf55f84
8,864
pyw
Python
Star-Wars-Years.pyw
chandler-stevens/Star-Wars-Years
f8c1a95573e7a1a397c9bcb35d523f921b09e434
[ "MIT" ]
1
2020-01-01T01:27:05.000Z
2020-01-01T01:27:05.000Z
Star-Wars-Years.pyw
chandler-stevens/Star-Wars-Years
f8c1a95573e7a1a397c9bcb35d523f921b09e434
[ "MIT" ]
null
null
null
Star-Wars-Years.pyw
chandler-stevens/Star-Wars-Years
f8c1a95573e7a1a397c9bcb35d523f921b09e434
[ "MIT" ]
null
null
null
from tkinter import Tk, Label, RIDGE, mainloop master = Tk() master.title("Star-Wars-Years") # Calculate and Return Conversion Formulae Map # Calculate Year in BBY # Convert Calendars # List of Calendars CalendarList = list(GetFormulae(0).keys()) # Default Calendar DefaultCalendar = CalendarLis...
46.899471
139
0.630641
from tkinter import Tk, StringVar, Label, Entry, OptionMenu, RIDGE, mainloop master = Tk() master.title("Star-Wars-Years") # Calculate and Return Conversion Formulae Map def GetFormulae(year, toBBY=True): # If converting from Calendar to BBY if toBBY: return { "BBY": year,...
0
0
0
1,442
0
4,769
0
30
184
e4e9296ca7a6ef1f535844abaaa7511a83d645d0
2,128
py
Python
docs/cryptography-docs.py
derwolfe/cryptography
a6112133d6797313ea8fe741daf25178b2abe25c
[ "Apache-2.0" ]
1
2020-08-26T01:36:57.000Z
2020-08-26T01:36:57.000Z
docs/cryptography-docs.py
Lukasa/cryptography
9341ddca88aebdd04f07adfefaa2ef8133ce2bca
[ "Apache-2.0" ]
null
null
null
docs/cryptography-docs.py
Lukasa/cryptography
9341ddca88aebdd04f07adfefaa2ef8133ce2bca
[ "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...
26.6
76
0.6875
# 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...
0
0
0
582
0
382
0
41
184
93d881f9fc29709012ac2390e56e9b501dc7287b
5,482
py
Python
tools/generate_gei_UFOP.py
wesleylp/libras
b293fc8f3d2a7c1a8d584ce7fc7a66d863b2ce6c
[ "MIT" ]
8
2021-04-16T12:45:43.000Z
2022-01-03T00:47:01.000Z
tools/generate_gei_UFOP.py
wesleylp/libras
b293fc8f3d2a7c1a8d584ce7fc7a66d863b2ce6c
[ "MIT" ]
1
2021-12-12T08:10:23.000Z
2021-12-22T13:02:25.000Z
tools/generate_gei_UFOP.py
wesleylp/libras
b293fc8f3d2a7c1a8d584ce7fc7a66d863b2ce6c
[ "MIT" ]
2
2021-12-29T16:33:58.000Z
2022-01-17T20:18:36.000Z
import os import sys this_filepath = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.join(this_filepath, '../src/detectron2/projects/DensePose/')) # IN THE UFOP-DATASET WE HAVE TO BE A LITTLE MORE CAREFULL # AS THE GESTURE IS PERFORMED MORE THAN ONCE IN EACH VIDEO # return annotations if...
34.696203
119
0.647209
import json import os import pickle import sys import cv2 import numpy as np this_filepath = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.join(this_filepath, '../src/detectron2/projects/DensePose/')) from densepose import add_densepose_config, add_hrnet_config from densepose.data.structures imp...
0
0
0
0
0
4,207
0
518
401
df0eaa2d39a0a020d95a43c7f7268a7951e36da5
2,113
py
Python
steppy/adapter.py
romaniukm/steppy
3c07ef846962bdd989706a94f9a3f5d6e3bc74e0
[ "MIT" ]
null
null
null
steppy/adapter.py
romaniukm/steppy
3c07ef846962bdd989706a94f9a3f5d6e3bc74e0
[ "MIT" ]
null
null
null
steppy/adapter.py
romaniukm/steppy
3c07ef846962bdd989706a94f9a3f5d6e3bc74e0
[ "MIT" ]
null
null
null
from typing import Dict, Any, NamedTuple E = NamedTuple('E', [('input_name', str), ('key', str)] ) AdaptingRecipe = Any Results = Dict[str, Any] AllInputs = Dict[str, Any]
35.216667
96
0.63275
from typing import Tuple, List, Dict, Any, NamedTuple E = NamedTuple('E', [('input_name', str), ('key', str)] ) AdaptingRecipe = Any Results = Dict[str, Any] AllInputs = Dict[str, Any] class AdapterError(Exception): pass class Adapter: def __init__(self, adapting_recipe...
0
0
0
1,842
0
0
0
13
46
98b498d010cf2cf4ae2baa1deff5371ccd5e210c
1,921
py
Python
station/controller/commands/tests/test_command.py
GLO3013-E4/COViRondelle2021
f8d23903d0a906e93a7698a555d90ebecdf83969
[ "MIT" ]
null
null
null
station/controller/commands/tests/test_command.py
GLO3013-E4/COViRondelle2021
f8d23903d0a906e93a7698a555d90ebecdf83969
[ "MIT" ]
null
null
null
station/controller/commands/tests/test_command.py
GLO3013-E4/COViRondelle2021
f8d23903d0a906e93a7698a555d90ebecdf83969
[ "MIT" ]
null
null
null
ONCE_HANDLED_DATA = 'ONCE_HANDLED_DATA' HANDLED_DATA = None
31.491803
135
0.766788
from unittest.mock import call from commands.command import Command from handlers.handler import Handler ONCE_HANDLED_DATA = 'ONCE_HANDLED_DATA' HANDLED_DATA = None class StubHandler(Handler): def __init__(self, on_handle, on_unregister): self.on_handle = on_handle self.on_unregister = on_unregi...
0
0
0
298
0
1,360
0
39
159
6d7c5ee23636f6868dde3b7d29b1b30dfe876f7b
3,236
py
Python
PandoraNLPWebApp/NLPApp.py
ashwinraj-in/MachineLearningProjects
2443bb89f2dcaab9a4484cac68ed8217a49aa3df
[ "MIT" ]
2
2021-05-14T04:56:18.000Z
2021-05-14T04:56:24.000Z
PandoraNLPWebApp/NLPApp.py
ashwinraj-in/MachineLearningProjects
2443bb89f2dcaab9a4484cac68ed8217a49aa3df
[ "MIT" ]
null
null
null
PandoraNLPWebApp/NLPApp.py
ashwinraj-in/MachineLearningProjects
2443bb89f2dcaab9a4484cac68ed8217a49aa3df
[ "MIT" ]
4
2021-11-07T08:09:28.000Z
2021-11-08T15:28:53.000Z
# Import Python Packages import streamlit as st from textblob import TextBlob # Function to Perform Sumy Summarization # Function to Extract Token and Lemma # Function to Extract Named Entities # Main Function - WebApp def main(): """Process Your Text With NLP""" # Title and Sub-Header st.title("PandoraNLP") ...
29.153153
89
0.726205
# Import Python Packages import os import spacy import streamlit as st from sumy.nlp.tokenizers import Tokenizer from sumy.parsers.plaintext import PlaintextParser from sumy.summarizers.lex_rank import LexRankSummarizer from textblob import TextBlob from gensim.summarization import summarize # Function to Perform S...
0
435
0
0
0
260
0
83
200
01a73964c9bf81cc5478c35747b58edb891f5792
1,641
py
Python
code/nim/sol_301.py
bhavinjawade/project-euler-solutions
56bf6a282730ed4b9b875fa081cf4509d9939d98
[ "Apache-2.0" ]
2
2020-07-16T08:16:32.000Z
2020-10-01T07:16:48.000Z
code/nim/sol_301.py
Psingh12354/project-euler-solutions
56bf6a282730ed4b9b875fa081cf4509d9939d98
[ "Apache-2.0" ]
null
null
null
code/nim/sol_301.py
Psingh12354/project-euler-solutions
56bf6a282730ed4b9b875fa081cf4509d9939d98
[ "Apache-2.0" ]
1
2021-05-07T18:06:08.000Z
2021-05-07T18:06:08.000Z
# -*- coding: utf-8 -*- ''' File name: code\nim\sol_301.py Author: Vaidic Joshi Date created: Oct 20, 2018 Python Version: 3.x ''' # Solution to Project Euler Problem #301 :: Nim # # For more information see: # https://projecteuler.net/problem=301 # Problem Statement ''' Nim is a game played with h...
41.025
376
0.730652
# -*- coding: utf-8 -*- ''' File name: code\nim\sol_301.py Author: Vaidic Joshi Date created: Oct 20, 2018 Python Version: 3.x ''' # Solution to Project Euler Problem #301 :: Nim # # For more information see: # https://projecteuler.net/problem=301 # Problem Statement ''' Nim is a game played with h...
15
0
0
0
0
0
0
0
0
d31fa7c687eb0c2e2565157131ee619af03e4702
687
py
Python
sphinx/util/typing.py
ocegidalm/sphinx-francais
fd9ad53bb756244e0417a013ede70757c004212d
[ "BSD-2-Clause" ]
null
null
null
sphinx/util/typing.py
ocegidalm/sphinx-francais
fd9ad53bb756244e0417a013ede70757c004212d
[ "BSD-2-Clause" ]
null
null
null
sphinx/util/typing.py
ocegidalm/sphinx-francais
fd9ad53bb756244e0417a013ede70757c004212d
[ "BSD-2-Clause" ]
1
2021-07-23T12:09:13.000Z
2021-07-23T12:09:13.000Z
# -*- coding: utf-8 -*- """ sphinx.util.typing ~~~~~~~~~~~~~~~~~~ The composit types for Sphinx. :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from typing import Callable, Dict, List, Tuple from docutils import nodes from docutils.pa...
27.48
95
0.688501
# -*- coding: utf-8 -*- """ sphinx.util.typing ~~~~~~~~~~~~~~~~~~ The composit types for Sphinx. :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from typing import Callable, Dict, List, Tuple from docutils import nodes from docutils.pa...
0
0
0
0
0
0
0
0
0
02330762abbe89a90a7165d31a53e79c09bfd955
4,547
py
Python
safetynet-flask-server/app.py
duo-labs/chain-of-fools
1fbeefb9484b2a99ee3c7412be96ba2834414d91
[ "BSD-3-Clause" ]
12
2019-12-04T14:04:37.000Z
2021-11-08T10:27:46.000Z
safetynet-flask-server/app.py
duo-labs/chain-of-fools
1fbeefb9484b2a99ee3c7412be96ba2834414d91
[ "BSD-3-Clause" ]
null
null
null
safetynet-flask-server/app.py
duo-labs/chain-of-fools
1fbeefb9484b2a99ee3c7412be96ba2834414d91
[ "BSD-3-Clause" ]
4
2020-03-11T14:01:52.000Z
2021-07-15T21:47:20.000Z
import logging from flask import Flask app = Flask(__name__) app.logger.setLevel(logging.DEBUG) GSR_ROOT = """-----BEGIN CERTIFICATE----- MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4G A1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkdsb2JhbFNp Z24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDYxMjE1MDgwMD...
45.019802
101
0.716516
import json from OpenSSL import crypto import logging import jose from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.asymmetric import padding from flask import Flask, request from utils import dec_b64 from base64 import b64decode app = Flask(__name__) app.logger.setLevel(logging.DEB...
0
2,828
0
0
0
0
0
73
177
815b7f57b48f2fb117977088cfb1a131f5147214
3,607
py
Python
social_rl/multiagent_tfagents/joint_attention/utils.py
DionysisChristopoulos/google-research
7f59ef421beef32ca16c2a7215be74f7eba01a0f
[ "Apache-2.0" ]
23,901
2018-10-04T19:48:53.000Z
2022-03-31T21:27:42.000Z
social_rl/multiagent_tfagents/joint_attention/utils.py
DionysisChristopoulos/google-research
7f59ef421beef32ca16c2a7215be74f7eba01a0f
[ "Apache-2.0" ]
891
2018-11-10T06:16:13.000Z
2022-03-31T10:42:34.000Z
social_rl/multiagent_tfagents/joint_attention/utils.py
admariner/google-research
7cee4b22b925581d912e8d993625c180da2a5a4f
[ "Apache-2.0" ]
6,047
2018-10-12T06:31:02.000Z
2022-03-31T13:59:28.000Z
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # 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 applicab...
34.352381
79
0.644857
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # 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 applicab...
0
0
0
2,709
0
0
0
57
179
6abe7a7b29bb0d164503eaf9fcd4797692e4ba21
56,836
py
Python
parser/fase2/team29/analizer_pl/grammar.py
eAntillon/tytus
e8c14a788ac25283ad55d67b12e69a5990b86b52
[ "MIT" ]
null
null
null
parser/fase2/team29/analizer_pl/grammar.py
eAntillon/tytus
e8c14a788ac25283ad55d67b12e69a5990b86b52
[ "MIT" ]
null
null
null
parser/fase2/team29/analizer_pl/grammar.py
eAntillon/tytus
e8c14a788ac25283ad55d67b12e69a5990b86b52
[ "MIT" ]
null
null
null
from sys import path from os.path import dirname as dir path.append(dir(path[0])) from analizer_pl.modules import code import analizer_pl.modules.expressions as expression from analizer_pl.abstract.expression import incTemp from analizer_pl.abstract.expression import newTemp from analizer_pl.abstract.expression import...
19.977504
168
0.600377
from sys import path from os.path import dirname as dir path.append(dir(path[0])) from analizer_pl.modules import code import analizer_pl.modules.expressions as expression from analizer_pl.abstract.expression import incTemp from analizer_pl.abstract.expression import newTemp from analizer_pl.abstract.expression import...
12
0
0
0
0
796
0
31
204
5fc144b2ba0706cf570db52dd29fd3d076caf073
125
py
Python
Introduction to Python/Introduction to Python Smallpiece 2018/Strings/In operator/in_operator.py
phamola/firstproject1
1e2aaafeb7abf9c82e4c823f197fc1fbefce6416
[ "Apache-2.0" ]
null
null
null
Introduction to Python/Introduction to Python Smallpiece 2018/Strings/In operator/in_operator.py
phamola/firstproject1
1e2aaafeb7abf9c82e4c823f197fc1fbefce6416
[ "Apache-2.0" ]
null
null
null
Introduction to Python/Introduction to Python Smallpiece 2018/Strings/In operator/in_operator.py
phamola/firstproject1
1e2aaafeb7abf9c82e4c823f197fc1fbefce6416
[ "Apache-2.0" ]
null
null
null
ice_cream = "ice cream" print("cream" in ice_cream) # print boolean result directly contains = type here print(contains)
20.833333
62
0.744
ice_cream = "ice cream" print("cream" in ice_cream) # print boolean result directly contains = type here print(contains)
0
0
0
0
0
0
0
0
0
feb9a220cc210ba7137f0ee96603e5a17e9019a7
11,384
py
Python
tests/integration/integration_test_Entity.py
kellrott/synapsePythonClient
8af4b89a95140fafca2e98af2768423c3ea949fc
[ "Apache-2.0" ]
null
null
null
tests/integration/integration_test_Entity.py
kellrott/synapsePythonClient
8af4b89a95140fafca2e98af2768423c3ea949fc
[ "Apache-2.0" ]
null
null
null
tests/integration/integration_test_Entity.py
kellrott/synapsePythonClient
8af4b89a95140fafca2e98af2768423c3ea949fc
[ "Apache-2.0" ]
null
null
null
import synapseclient.client as client import synapseclient.utils as utils
39.94386
181
0.70845
import uuid, filecmp, os, sys, requests, time from datetime import datetime as Datetime from nose.tools import assert_raises import synapseclient.client as client import synapseclient.utils as utils from synapseclient import Activity, Entity, Project, Folder, File, Data from synapseclient.exceptions import * import i...
0
0
0
0
0
10,839
0
146
316
e794d395e3902df2e9c38d33914397efdf26bba2
4,800
py
Python
cpp/ntradesys/apps/timeslice/genTradeoff.py
CodeApprenticeRai/newt
0e07a87aa6b8d4b238c1a9fd3fef363133866c57
[ "Apache-2.0" ]
1
2021-06-21T12:23:55.000Z
2021-06-21T12:23:55.000Z
cpp/ntradesys/apps/timeslice/genTradeoff.py
CodeApprenticeRai/newt
0e07a87aa6b8d4b238c1a9fd3fef363133866c57
[ "Apache-2.0" ]
null
null
null
cpp/ntradesys/apps/timeslice/genTradeoff.py
CodeApprenticeRai/newt
0e07a87aa6b8d4b238c1a9fd3fef363133866c57
[ "Apache-2.0" ]
6
2019-10-17T21:16:21.000Z
2020-10-19T08:27:01.000Z
""" Generate a tradeoff slip/opp curve for a stock """ import string BASE_DIR="/spare/local/apratap/costanalysis" import sys crange=["-100","-3","-2.5","-2","-1.5","-1","-0.5","0","0.5","1","1.5","2"] date_range=["20100104","20100105","20100106","20100107","20100108","20100111","20100112","20100113","2...
28.571429
188
0.505625
""" Generate a tradeoff slip/opp curve for a stock """ import string BASE_DIR="/spare/local/apratap/costanalysis" import sys class fill: def __init__(self,d): self.n=abs(int(d[5])) self.fpx = float(d[6]) self.side = 2 * (int(d[5])>0) - 1 self.add = (d[-1]=="add") return cl...
0
0
0
1,568
0
2,352
0
0
173
07cc196f2cd5fe855c984333905da3108d3c58be
7,410
py
Python
ComplementaryScripts/Step_03_Compare_Refine/Step_simulate_case04.py
HaoLuoChalmers/Lactobacillus_reuteri_MM41A_GEM
9be6a48e7467e0c81b0b974180860d599fc9c201
[ "CC-BY-4.0" ]
null
null
null
ComplementaryScripts/Step_03_Compare_Refine/Step_simulate_case04.py
HaoLuoChalmers/Lactobacillus_reuteri_MM41A_GEM
9be6a48e7467e0c81b0b974180860d599fc9c201
[ "CC-BY-4.0" ]
1
2021-07-19T16:00:03.000Z
2021-07-19T16:00:03.000Z
ComplementaryScripts/Step_03_Compare_Refine/Step_simulate_case04.py
SysBioChalmers/Lactobacillus_reuteri_MM41A_GEM
9be6a48e7467e0c81b0b974180860d599fc9c201
[ "CC-BY-4.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # Created by Hao Luo at 4/22/19 """Step_refine_pipeline_part03_amino_acids.py :description : script to refine amino acids :param : :returns: :rtype: """ import os import cobra import matplotlib.pyplot as plt import numpy as np import pandas as pd os.chdir('../../Complem...
32.643172
121
0.635358
#!/usr/bin/env python # -*- coding: utf-8 -*- # Created by Hao Luo at 4/22/19 """Step_refine_pipeline_part03_amino_acids.py :description : script to refine amino acids :param : :returns: :rtype: """ import os import cobra import matplotlib.pyplot as plt import numpy as np import pandas as pd os.chdir('../../Complem...
0
0
0
0
0
0
0
0
0
68678eea7786fb844d460dea4023f8554e4dc3f1
200
py
Python
utils/logger.py
qmeeus/lstm-text-generator
6a24fdc2da6dfaece6a995252af7227907766e64
[ "MIT" ]
1
2018-12-16T20:37:33.000Z
2018-12-16T20:37:33.000Z
utils/logger.py
qmeeus/lstm-text-generator
6a24fdc2da6dfaece6a995252af7227907766e64
[ "MIT" ]
null
null
null
utils/logger.py
qmeeus/lstm-text-generator
6a24fdc2da6dfaece6a995252af7227907766e64
[ "MIT" ]
null
null
null
import logzero import os os.makedirs('outputs', exist_ok=True) log_file = 'outputs/logs.txt' logger = logzero.logger logzero.loglevel('DEBUG') logzero.logfile(log_file, maxBytes=1e6, backupCount=3)
20
54
0.78
import logzero import os os.makedirs('outputs', exist_ok=True) log_file = 'outputs/logs.txt' logger = logzero.logger logzero.loglevel('DEBUG') logzero.logfile(log_file, maxBytes=1e6, backupCount=3)
0
0
0
0
0
0
0
0
0
bd7d634da184dd1258d2176b3bc46a2a8b567b4e
1,288
py
Python
datacommons/examples/query.py
mvashishtha/api-python
324478efbbc7a1a0e08ae880a2a9daa5767d72d7
[ "Apache-2.0" ]
null
null
null
datacommons/examples/query.py
mvashishtha/api-python
324478efbbc7a1a0e08ae880a2a9daa5767d72d7
[ "Apache-2.0" ]
null
null
null
datacommons/examples/query.py
mvashishtha/api-python
324478efbbc7a1a0e08ae880a2a9daa5767d72d7
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
27.404255
74
0.718944
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
0
0
0
0
0
406
0
3
46
3641c2ab6913551689eacaad9a921131ac600e67
777
py
Python
Analisando_newsletter.py
wpsd2/Analise_de_series
00cc34d8d1171b15f6834036823e3000671bfe29
[ "MIT" ]
null
null
null
Analisando_newsletter.py
wpsd2/Analise_de_series
00cc34d8d1171b15f6834036823e3000671bfe29
[ "MIT" ]
null
null
null
Analisando_newsletter.py
wpsd2/Analise_de_series
00cc34d8d1171b15f6834036823e3000671bfe29
[ "MIT" ]
null
null
null
#Analisando assinantes da newsletter import pandas as pd from analise_de_vendas import plot_comparacao assinantes = pd.read_csv('arquivos/newsletter_alucar.csv') assinantes.head() assinantes.dtypes print('Quantidade de linhas e colunas', assinantes.shape) print('Quantidade de dados nulos', assinantes.isna().sum()...
23.545455
66
0.760618
#Analisando assinantes da newsletter import pandas as pd import seaborn as sns from matplotlib import pyplot as plt from pandas.plotting import autocorrelation_plot from analise_de_vendas import plot_comparacao assinantes = pd.read_csv('arquivos/newsletter_alucar.csv') assinantes.head() assinantes.dtypes print('Q...
2
0
0
0
0
0
0
42
66
5934de01135301066287ef530617fc41d3bd75fd
1,368
py
Python
fias/importer/table/dbf.py
lavr/django-fias
8e587e2788a3234641331c2e02cc8fbdcdac6c3d
[ "BSD-3-Clause" ]
null
null
null
fias/importer/table/dbf.py
lavr/django-fias
8e587e2788a3234641331c2e02cc8fbdcdac6c3d
[ "BSD-3-Clause" ]
3
2018-10-14T20:09:13.000Z
2018-11-17T15:39:23.000Z
fias/importer/table/dbf.py
lavr/django-fias
8e587e2788a3234641331c2e02cc8fbdcdac6c3d
[ "BSD-3-Clause" ]
null
null
null
# coding: utf-8 from __future__ import unicode_literals, absolute_import
24.428571
68
0.592836
# coding: utf-8 from __future__ import unicode_literals, absolute_import from .table import Table, ParentLookupException from dbfread import DBF, FieldParser class ModelFieldParser(FieldParser): def parseC(self, field, data): result = FieldParser.parseC(self, field, data) if not result: ...
0
0
0
1,158
0
0
0
41
92
d9cd4c6232709ea51e9b751304d82e9ca93b437d
1,641
py
Python
emmaa/tests/test_filters.py
kkaris/emmaa
e381bac492579007efaa248bde4fa8d2005ff2f7
[ "BSD-2-Clause" ]
6
2018-11-29T09:33:07.000Z
2021-02-10T04:21:47.000Z
emmaa/tests/test_filters.py
kkaris/emmaa
e381bac492579007efaa248bde4fa8d2005ff2f7
[ "BSD-2-Clause" ]
53
2019-02-01T14:44:57.000Z
2021-09-17T16:13:28.000Z
emmaa/tests/test_filters.py
kkaris/emmaa
e381bac492579007efaa248bde4fa8d2005ff2f7
[ "BSD-2-Clause" ]
8
2018-11-22T02:41:56.000Z
2021-03-26T19:54:41.000Z
import networkx as nx edges = [ (1, 2, {'statements': [{'internal': True}]}), (2, 3, {'statements': [{'internal': False}]}), (3, 4, {'statements': [{'internal': True}, {'internal': True}]}), (4, 5, {'statements': [{'internal': True}, {'internal': False}]}), (5, 6, {'statements': [{'internal': False...
34.914894
75
0.666057
import networkx as nx from emmaa.filter_functions import filter_chem_mesh_go, \ filter_to_internal_edges from indra.statements import Agent from indra.explanation.pathfinding import get_subgraph edges = [ (1, 2, {'statements': [{'internal': True}]}), (2, 3, {'statements': [{'internal': False}]}), (3, 4...
0
0
0
0
0
1,002
0
111
135
35359a08d6a69ff561aa2927aebaba93570c7357
3,718
py
Python
validador/app.py
diazclaudia1/clinicaABC
8ae6ff02dbd03cc71f2dc004bf300ab8de4a869d
[ "MIT" ]
null
null
null
validador/app.py
diazclaudia1/clinicaABC
8ae6ff02dbd03cc71f2dc004bf300ab8de4a869d
[ "MIT" ]
29
2021-08-20T22:59:45.000Z
2021-09-20T00:23:51.000Z
validador/app.py
diazclaudia1/clinicaABC
8ae6ff02dbd03cc71f2dc004bf300ab8de4a869d
[ "MIT" ]
null
null
null
from flask import Flask import pika import time from flask_mail import Mail import sys canal_con_error="" uuid_peticion="" arrayValidar = {} app = Flask(__name__) sleepTime = 20 print(' [*] Inicia en ', sleepTime, ' segundos.') time.sleep(sleepTime) app.config['MAIL_SERVER']='smtp.gmail.com' app.config['MAIL_P...
33.8
165
0.628564
from flask import Flask import pika import time from flask_mail import Mail from flask_mail import Message import sys from datetime import datetime import json canal_con_error="" uuid_peticion="" arrayValidar = {} def notificacion(canal_con_error, uuid_peticion): with app.app_context(): msg = Message('Al...
10
23
0
0
0
2,653
0
7
138
3ee00c08ce095df07e9a3af37566eadf8e9f3c1f
3,328
py
Python
pytorch_binding/tests/test.py
yjchun/warp-ctc
18dc5c5a17fbf4c4d712ae5a862ad775c9b05a82
[ "Apache-2.0" ]
null
null
null
pytorch_binding/tests/test.py
yjchun/warp-ctc
18dc5c5a17fbf4c4d712ae5a862ad775c9b05a82
[ "Apache-2.0" ]
null
null
null
pytorch_binding/tests/test.py
yjchun/warp-ctc
18dc5c5a17fbf4c4d712ae5a862ad775c9b05a82
[ "Apache-2.0" ]
null
null
null
""" Tests are based on the torch7 bindings for warp-ctc. Reference numbers are also obtained from the tests. """ import unittest import torch from warpctc_pytorch import CTCLoss ctc_loss = CTCLoss() places = 5 use_cuda = torch.cuda.is_available() if __name__ == '__main__': unittest.main()
37.393258
120
0.613281
""" Tests are based on the torch7 bindings for warp-ctc. Reference numbers are also obtained from the tests. """ import unittest import torch from torch.autograd import Variable from warpctc_pytorch import CTCLoss ctc_loss = CTCLoss() places = 5 use_cuda = torch.cuda.is_available() def run_grads(label_sizes, labels...
0
0
0
2,412
0
534
0
14
68
607a221754d82a53b7ad18f0323845e50a5fcde4
117
py
Python
homework/homework 31.py
CoderLoveMath/Jeju-IOSEFTGS-python
0efe26e3840817197c1584ac4cf90d35c3699988
[ "FSFAP" ]
null
null
null
homework/homework 31.py
CoderLoveMath/Jeju-IOSEFTGS-python
0efe26e3840817197c1584ac4cf90d35c3699988
[ "FSFAP" ]
null
null
null
homework/homework 31.py
CoderLoveMath/Jeju-IOSEFTGS-python
0efe26e3840817197c1584ac4cf90d35c3699988
[ "FSFAP" ]
null
null
null
print(s(int(input('Enter number: '))))
16.714286
38
0.470085
def s(a): if a == 1: return 1 else: return a * s(a-1) print(s(int(input('Enter number: '))))
0
0
0
0
0
56
0
0
22
47f8cf3455bb5898e0ede8712ceb43e2e4c61908
937
py
Python
mysite/apps/user/views.py
Pywww/search-wystech
7ee32fc57867a92013407253700bab8904031440
[ "Apache-2.0" ]
null
null
null
mysite/apps/user/views.py
Pywww/search-wystech
7ee32fc57867a92013407253700bab8904031440
[ "Apache-2.0" ]
null
null
null
mysite/apps/user/views.py
Pywww/search-wystech
7ee32fc57867a92013407253700bab8904031440
[ "Apache-2.0" ]
null
null
null
# Create your views here.
21.295455
55
0.613661
from django.http import HttpResponse from django.shortcuts import render # Create your views here. from django.views import View from .models import User class Index_view(View): def get(self, request): return render(request, 'user/index.html') class UserView(View): def get(self, request): ...
156
0
0
657
0
0
0
40
158
46393f20f22304d00f63a06e7b896875e191a20f
669
py
Python
odoo-13.0/web_oca/web_ir_actions_act_multi/__manifest__.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
null
null
null
odoo-13.0/web_oca/web_ir_actions_act_multi/__manifest__.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
null
null
null
odoo-13.0/web_oca/web_ir_actions_act_multi/__manifest__.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
null
null
null
# Copyright 2017 - 2018 Modoolar <info@modoolar.com> # Copyright 2018 Brainbean Apps # Copyright 2020 Manuel Calero # Copyright 2020 CorporateHub (https://corporatehub.eu) # License LGPLv3.0 or later (https://www.gnu.org/licenses/lgpl-3.0.en.html). { "name": "Web Actions Multi", "summary": "Enables triggering ...
35.210526
79
0.663677
# Copyright 2017 - 2018 Modoolar <info@modoolar.com> # Copyright 2018 Brainbean Apps # Copyright 2020 Manuel Calero # Copyright 2020 CorporateHub (https://corporatehub.eu) # License LGPLv3.0 or later (https://www.gnu.org/licenses/lgpl-3.0.en.html). { "name": "Web Actions Multi", "summary": "Enables triggering ...
0
0
0
0
0
0
0
0
0
c2fcf2f99b8ddf481d9cdd16508f1640568c86e4
7,171
py
Python
apps/pyserver/app/objectdetection.py
TiagoPrata/FastAPI-TensorFlow-Docker
a476380ef2b1fef1b9304ca5ba790a7df4827ccf
[ "Apache-2.0" ]
5
2021-09-07T22:34:04.000Z
2022-03-23T15:28:26.000Z
apps/pyserver/app/objectdetection.py
TiagoPrata/FastAPI-TensorFlow-Docker
a476380ef2b1fef1b9304ca5ba790a7df4827ccf
[ "Apache-2.0" ]
null
null
null
apps/pyserver/app/objectdetection.py
TiagoPrata/FastAPI-TensorFlow-Docker
a476380ef2b1fef1b9304ca5ba790a7df4827ccf
[ "Apache-2.0" ]
2
2021-05-06T07:24:06.000Z
2021-12-20T15:55:28.000Z
################################################## ## Author: Tiago Prata (https://github.com/TiagoPrata) ## Date: 22-Mar-2021 ################################################## # References: # https://www.tensorflow.org/datasets/catalog/coco # https://github.com/IntelAI/models/blob/master/docs/object_detection/tens...
37.941799
191
0.606052
################################################## ## Author: Tiago Prata (https://github.com/TiagoPrata) ## Date: 22-Mar-2021 ################################################## # References: # https://www.tensorflow.org/datasets/catalog/coco # https://github.com/IntelAI/models/blob/master/docs/object_detection/tens...
0
0
0
0
0
196
0
-9
68
55685d56c2f862c3e73657508082a16969c3c6a5
368
py
Python
Untitled-1.py
hagiwaratakayuki/Better-Code-Extention-Alpha-
b84275fd6e385a2269340e9a3b53f872de6db224
[ "MIT" ]
null
null
null
Untitled-1.py
hagiwaratakayuki/Better-Code-Extention-Alpha-
b84275fd6e385a2269340e9a3b53f872de6db224
[ "MIT" ]
null
null
null
Untitled-1.py
hagiwaratakayuki/Better-Code-Extention-Alpha-
b84275fd6e385a2269340e9a3b53f872de6db224
[ "MIT" ]
null
null
null
""" 1. Pick 10 random numbers 2. Sort the numbers in decreasing order 3. Print those numbers 4. Repeat 2 more times """ if __name__ == "__main__": main()
18.4
50
0.608696
""" 1. Pick 10 random numbers 2. Sort the numbers in decreasing order 3. Print those numbers 4. Repeat 2 more times """ import random def main(): for i in range(3): numbers = [] for j in range(10): numbers.append(random.randint(1, 100)) numbers.sort(reverse=True) print...
0
0
0
0
0
171
0
-8
46
df1cdec05c31c6880368a194268045be056a166c
1,376
py
Python
tutorials/W2D3_DecisionMaking/solutions/W2D3_Tutorial1_Solution_ce09121d.py
raxosiris/course-content
6904ae919b91aeb885d73b53cb9b02e6ec73d9cd
[ "CC-BY-4.0" ]
26
2020-07-01T20:38:44.000Z
2021-06-20T06:37:27.000Z
tutorials/W2D3_DecisionMaking/solutions/W2D3_Tutorial1_Solution_ce09121d.py
raxosiris/course-content
6904ae919b91aeb885d73b53cb9b02e6ec73d9cd
[ "CC-BY-4.0" ]
3
2020-06-23T03:46:36.000Z
2020-07-07T05:26:01.000Z
tutorials/W2D3_DecisionMaking/solutions/W2D3_Tutorial1_Solution_ce09121d.py
raxosiris/course-content
6904ae919b91aeb885d73b53cb9b02e6ec73d9cd
[ "CC-BY-4.0" ]
16
2020-07-06T06:48:02.000Z
2021-07-30T08:18:52.000Z
sigma = 4.65 # standard deviation for observation noise num_sample = 200 # number of simulations to run for each stopping time stop_time_list = np.arange(1, 150, 10) # Stopping times to play with def simulate_accuracy_vs_stoptime(sigma, stop_time_list, num_sample): """Calculate the average decision accuracy vs. st...
37.189189
77
0.740552
sigma = 4.65 # standard deviation for observation noise num_sample = 200 # number of simulations to run for each stopping time stop_time_list = np.arange(1, 150, 10) # Stopping times to play with def simulate_accuracy_vs_stoptime(sigma, stop_time_list, num_sample): """Calculate the average decision accuracy vs. st...
0
0
0
0
0
0
0
0
0
28608cbef1a3fb70f4d3849e076c2e3af325f4d3
1,397
py
Python
configs/aitod/v002.01.02_dota_faster_rcnn_r50_baseline.py
jwwangchn/mmdet-aitod
a4f1cad1f6ba079037a58edda885981654885b9e
[ "Apache-2.0" ]
2
2021-04-23T12:15:43.000Z
2021-06-09T05:28:10.000Z
configs/aitod/v002.01.02_dota_faster_rcnn_r50_baseline.py
jwwangchn/mmdet-aitod
a4f1cad1f6ba079037a58edda885981654885b9e
[ "Apache-2.0" ]
null
null
null
configs/aitod/v002.01.02_dota_faster_rcnn_r50_baseline.py
jwwangchn/mmdet-aitod
a4f1cad1f6ba079037a58edda885981654885b9e
[ "Apache-2.0" ]
1
2021-12-18T02:11:30.000Z
2021-12-18T02:11:30.000Z
""" Faster R-CNN baseline Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=3000 ] = 0.594 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=3000 ] = 0.373 Average Precision (AP) @[ IoU=0.50:0.95 | area= smal...
48.172414
79
0.629921
""" Faster R-CNN baseline Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=3000 ] = 0.594 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=3000 ] = 0.373 Average Precision (AP) @[ IoU=0.50:0.95 | area= smal...
0
0
0
0
0
0
0
0
0
f7d6c25253b919e0c188c455d625b55198b32f5e
1,161
py
Python
configuration.py
skyer9/CloudFormationForPython
6b5e1de4336a0ba9b0899a3cd7c83e08d24b078e
[ "MIT" ]
1
2019-02-18T06:45:36.000Z
2019-02-18T06:45:36.000Z
configuration.py
skyer9/CloudFormationForPython
6b5e1de4336a0ba9b0899a3cd7c83e08d24b078e
[ "MIT" ]
null
null
null
configuration.py
skyer9/CloudFormationForPython
6b5e1de4336a0ba9b0899a3cd7c83e08d24b078e
[ "MIT" ]
1
2019-02-18T06:45:41.000Z
2019-02-18T06:45:41.000Z
stack_base_name = "skyer9-test" region_name = "ap-northeast-2" acm_certificate_arn = "arn:aws:acm:us-east-1:061175447448:certificate/d6c212a8-8871-XXXXXXXXXXXXXXX" acm_cluster_certificate_arn = "arn:aws:acm:ap-northeast-2:061175447448:certificate/45a14cb8-3da4-4XXXXXXXXXXXXXXX" # for assets root_domain_name = "10x10.i...
29.769231
114
0.782946
stack_base_name = "skyer9-test" region_name = "ap-northeast-2" acm_certificate_arn = "arn:aws:acm:us-east-1:061175447448:certificate/d6c212a8-8871-XXXXXXXXXXXXXXX" acm_cluster_certificate_arn = "arn:aws:acm:ap-northeast-2:061175447448:certificate/45a14cb8-3da4-4XXXXXXXXXXXXXXX" # for assets root_domain_name = "10x10.i...
0
0
0
0
0
0
0
0
0
cb567c4589f9f6cc11459d7c3549e25cf057f90a
750
py
Python
tests/validators/test_coding_dna_delins.py
cancervariants/varlex
3806317fa0125c3098e80124d5169fe6a13d50db
[ "MIT" ]
null
null
null
tests/validators/test_coding_dna_delins.py
cancervariants/varlex
3806317fa0125c3098e80124d5169fe6a13d50db
[ "MIT" ]
15
2019-10-23T17:35:42.000Z
2020-05-05T21:04:01.000Z
tests/validators/test_coding_dna_delins.py
cancervariants/varlex
3806317fa0125c3098e80124d5169fe6a13d50db
[ "MIT" ]
null
null
null
"""Module for testing Coding DNA DelIns Validator."""
32.608696
69
0.74
"""Module for testing Coding DNA DelIns Validator.""" import unittest from variation.validators import CodingDNADelIns from variation.classifiers import CodingDNADelInsClassifier from .validator_base import ValidatorBase class TestCodingDNADelInsValidator(ValidatorBase, unittest.TestCase): """A class to test the...
0
0
0
504
0
0
0
79
112
0ce76391b7925f2b30e47192a54ba30c3f192d5c
15,109
py
Python
rl.py
MichaelBlume/gymql
d564b8fc36bf43a120dc1d6e39b9175c4a015aeb
[ "MIT" ]
null
null
null
rl.py
MichaelBlume/gymql
d564b8fc36bf43a120dc1d6e39b9175c4a015aeb
[ "MIT" ]
null
null
null
rl.py
MichaelBlume/gymql
d564b8fc36bf43a120dc1d6e39b9175c4a015aeb
[ "MIT" ]
null
null
null
# An attempt to replicate http://www.nature.com/nature/journal/v518/n7540/full/nature14236.html # (You can download it from Scihub) from __future__ import print_function, division import numpy as np from collections import namedtuple FRAMES_PER_STATE = 4 FRAME_WIDTH = 84 FRAME_HEIGHT = 110 RAW_FRAME_WIDTH = 160 RAW_F...
39.552356
133
0.641737
# An attempt to replicate http://www.nature.com/nature/journal/v518/n7540/full/nature14236.html # (You can download it from Scihub) from __future__ import print_function, division import tensorflow as tf import numpy as np import gym from collections import namedtuple import random import os import h5py from itertools...
0
0
0
11,991
0
2,031
0
-33
486
3e64a55efa34e8df76396cb9c91317acf14d7cfd
988
py
Python
LeetCode/gold_book/面试题17.16.按摩师.py
xmmmmmovo/MyAlgorithmSolutions
f5198d438f36f41cc4f72d53bb71d474365fa80d
[ "MIT" ]
1
2020-03-26T13:40:52.000Z
2020-03-26T13:40:52.000Z
LeetCode/gold_book/面试题17.16.按摩师.py
xmmmmmovo/MyAlgorithmSolutions
f5198d438f36f41cc4f72d53bb71d474365fa80d
[ "MIT" ]
null
null
null
LeetCode/gold_book/面试题17.16.按摩师.py
xmmmmmovo/MyAlgorithmSolutions
f5198d438f36f41cc4f72d53bb71d474365fa80d
[ "MIT" ]
null
null
null
""" 17.16. [1,2,3,1] 4 1 3 = 1 + 3 = 4 [2,7,9,3,1] 12 1 3 5 = 2 + 9 + 1 = 12 [2,1,4,5,3,1,1,3] 12 1 3 5 8 = 2 + 4 + 3 + 3 = 12 """ if __name__ == "__main__": assert Solution().massage([1, 2, 3, 1]) == 4 assert Solution().massage([2, 7, 9, 3, 1]) == 12 assert Solution().ma...
20.163265
61
0.537449
""" 面试题 17.16. 按摩师 一个有名的按摩师会收到源源不断的预约请求,每个预约都可以选择接或不接。 在每次预约服务之间要有休息时间,因此她不能接受相邻的预约。 给定一个预约请求序列,替按摩师找到最优的预约集合(总预约时间最长), 返回总的分钟数。 注意:本题相对原题稍作改动 输入: [1,2,3,1] 输出: 4 解释: 选择 1 号预约和 3 号预约,总时长 = 1 + 3 = 4。 输入: [2,7,9,3,1] 输出: 12 解释: 选择 1 号预约、 3 号预约和 5 号预约,总时长 = 2 + 9 + 1 = 12。 输入: [2,1,4,5,3,1,1,3] 输出: 12 解释: 选择 1 号预约、 3...
723
0
0
342
0
0
0
2
45
324931eead6d27a062d6818040660ebdcdb66c4d
1,921
py
Python
03 Hamming distance/hamming_distance.py
XuuRee/python-data-structures
a3972f5781d666d15d61c0d474877880d1b7c483
[ "MIT" ]
null
null
null
03 Hamming distance/hamming_distance.py
XuuRee/python-data-structures
a3972f5781d666d15d61c0d474877880d1b7c483
[ "MIT" ]
null
null
null
03 Hamming distance/hamming_distance.py
XuuRee/python-data-structures
a3972f5781d666d15d61c0d474877880d1b7c483
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Povolene knihovny: copy, math # Import jakekoli jine knihovny neprojde vyhodnocovaci sluzbou. # IB002 Domaci uloha 4. # # Hammingovu vzdalenost dvou stejne dlouhych binarnich retezcu # definujeme jako pocet bitu, ve kterych se retezce lisi. # # Vasim ukolem je implementovat funkci hamming_dis...
33.701754
84
0.630921
#!/usr/bin/env python3 # Povolene knihovny: copy, math # Import jakekoli jine knihovny neprojde vyhodnocovaci sluzbou. # IB002 Domaci uloha 4. # # Hammingovu vzdalenost dvou stejne dlouhych binarnich retezcu # definujeme jako pocet bitu, ve kterych se retezce lisi. # # Vasim ukolem je implementovat funkci hamming_dis...
0
0
0
0
0
87
0
0
46
d7adbc44dcf2aa57569732d78b3ccd65a9ae198c
6,610
py
Python
interpFunctions.py
ogirou/ODSTA
52c4fc382e4f39e3a2c4260136931cbea2143a5d
[ "MIT" ]
null
null
null
interpFunctions.py
ogirou/ODSTA
52c4fc382e4f39e3a2c4260136931cbea2143a5d
[ "MIT" ]
null
null
null
interpFunctions.py
ogirou/ODSTA
52c4fc382e4f39e3a2c4260136931cbea2143a5d
[ "MIT" ]
null
null
null
# coding=utf-8 # # # Calcul du log du temps equivalent Agarwal - 1980 # # Ezekwe 12.16 # # # Algorithme de drivation d'aprs Bourdet et al - 1989 # # Diffrences centres pas variable # # Voir Ezekwe - 2010 - 12C.1 pour le calcul # # # Dans cette section on veut pouvoir tracer automatiquement une droite de rgression ...
27.541667
103
0.691982
# coding=utf-8 # import numpy as np from numpy import * import matplotlib.pyplot as plt # # Calcul du log du temps equivalent Agarwal - 1980 # # Ezekwe 12.16 # def agarwal(t,tp): te=(tp*t)/(tp+t) lt=log(te) return te, lt # # Algorithme de dérivation d'après Bourdet et al - 1989 # # Différences centrées à pas va...
134
0
0
0
0
5,262
0
5
297
fd7eee7c8072291e8f653ab07b95fe9b4ee1c591
504
py
Python
courses/migrations/0013_alter_homeworksubmission_submission_file_upload.py
Dynamicist-handa/EscuelaLingua
198abfcc14204d8ecd2706f2de2650293219662e
[ "Apache-2.0" ]
null
null
null
courses/migrations/0013_alter_homeworksubmission_submission_file_upload.py
Dynamicist-handa/EscuelaLingua
198abfcc14204d8ecd2706f2de2650293219662e
[ "Apache-2.0" ]
null
null
null
courses/migrations/0013_alter_homeworksubmission_submission_file_upload.py
Dynamicist-handa/EscuelaLingua
198abfcc14204d8ecd2706f2de2650293219662e
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.2 on 2021-04-30 03:47
25.2
91
0.674603
# Generated by Django 3.2 on 2021-04-30 03:47 import courses.models from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('courses', '0012_alter_homeworksubmission_submission_description'), ] operations = [ migrations.AlterField( m...
0
0
0
370
0
0
0
19
68
a998bd46b6a5dc62cda4386a1f4dbcc27c4a81cf
14,178
py
Python
gui/windows.py
tkerwin/pydre
a100779801ffdc9855f09328bd28bf79ab6e679b
[ "Apache-2.0" ]
null
null
null
gui/windows.py
tkerwin/pydre
a100779801ffdc9855f09328bd28bf79ab6e679b
[ "Apache-2.0" ]
null
null
null
gui/windows.py
tkerwin/pydre
a100779801ffdc9855f09328bd28bf79ab6e679b
[ "Apache-2.0" ]
null
null
null
''' Created by: Craig Fouts Created on: 11/13/2020 ''' import logging from gui.config import Config, CONFIG_PATH config = Config() config.read(CONFIG_PATH) logger = logging.getLogger('PydreLogger')
30.101911
79
0.633164
''' Created by: Craig Fouts Created on: 11/13/2020 ''' import inspect import json import logging import os import pydre import time from PySide2.QtWidgets import QFileDialog, QInputDialog from gui.config import Config, CONFIG_PATH, GUI_PATH, PROJECT_PATH from gui.customs import ProjectTree from gui.handlers import Pyd...
0
0
0
13,638
0
0
0
95
244
89c9798b9fcbd959dd7851e2ed8b0745a38e18fc
40,261
py
Python
MV3D_TF_release/lib/datasets/kitti_mv3d.py
ZiningWang/Sparse_Pooling
a160ddf9a03ef53bad630b4ac186a8437bd0475c
[ "Unlicense" ]
52
2018-08-28T03:44:51.000Z
2022-03-23T16:00:14.000Z
MV3D_TF_release/lib/datasets/kitti_mv3d.py
weidezhang/Sparse_Pooling
a160ddf9a03ef53bad630b4ac186a8437bd0475c
[ "Unlicense" ]
1
2019-06-25T01:32:35.000Z
2019-07-01T01:34:20.000Z
MV3D_TF_release/lib/datasets/kitti_mv3d.py
weidezhang/Sparse_Pooling
a160ddf9a03ef53bad630b4ac186a8437bd0475c
[ "Unlicense" ]
20
2018-07-31T18:17:35.000Z
2021-07-09T08:42:06.000Z
# WZN: Note here we unify all LIDAR points to camera frame!!! __author__ = 'yuxiang' # derived from honda.py by fyang import datasets import datasets.kitti_mv3d import datasets.imdb if __name__ == '__main__': d = datasets.kitti_mv3d('train') res = d.roidb from IPython import embed; embed()
47.033879
199
0.51412
# WZN: Note here we unify all LIDAR points to camera frame!!! __author__ = 'yuxiang' # derived from honda.py by fyang import datasets import datasets.kitti_mv3d import os import time import PIL import datasets.imdb import numpy as np from matplotlib import pyplot as plt import scipy.sparse from utils.cyt...
0
0
0
39,388
0
0
0
209
348
c1e052136d9cd47792b46dad3c5f74cb6583700a
266
py
Python
study/ModelMain.py
NextLmabda/PyLambda
5fb91062c4f9c493fcd3637c2aa4d786f8c387d0
[ "MIT" ]
null
null
null
study/ModelMain.py
NextLmabda/PyLambda
5fb91062c4f9c493fcd3637c2aa4d786f8c387d0
[ "MIT" ]
null
null
null
study/ModelMain.py
NextLmabda/PyLambda
5fb91062c4f9c493fcd3637c2aa4d786f8c387d0
[ "MIT" ]
null
null
null
x = combination(10, 10) y = (lambda x: x ** 2)(10) z = (lambda x, y: x * y)(2, 3) func = lambda x, y: x * y if (x > y) else x ** 3 print(x) print(y) print(z) print(func(10, 12)) print((lambda x, y, z: x * y * z)(3, 4, 5))
14.777778
48
0.552632
from preprocessing.calculus import * x = combination(10, 10) y = (lambda x: x ** 2)(10) z = (lambda x, y: x * y)(2, 3) func = lambda x, y: x * y if (x > y) else x ** 3 print(x) print(y) print(z) print(func(10, 12)) print((lambda x, y, z: x * y * z)(3, 4, 5))
0
0
0
0
0
0
0
15
22
32dde44d2ec9a6ce926bffb44762e7feacb5663e
1,253
py
Python
tests/test_sloth_utils.py
codacy-badger/sloth
a4f2118b2f19e55271613d43c785aaf4ab030b5e
[ "MIT" ]
1
2021-02-11T12:14:23.000Z
2021-02-11T12:14:23.000Z
tests/test_sloth_utils.py
Legorooj/sloth
47f6358349f8545fc475efab19edd6efda3ffbcd
[ "MIT" ]
null
null
null
tests/test_sloth_utils.py
Legorooj/sloth
47f6358349f8545fc475efab19edd6efda3ffbcd
[ "MIT" ]
null
null
null
# ---------------------------------------------------------------------------- # Copyright (c) 2020 Legorooj <legorooj@protonmail.com> # Copyright (c) 2020 FluffyKoalas <github.com/fluffykoalas> # This file and all others in this project are licensed under the MIT license. # Please see the LICENSE file in the root of t...
35.8
109
0.612131
# ---------------------------------------------------------------------------- # Copyright (c) 2020 Legorooj <legorooj@protonmail.com> # Copyright (c) 2020 FluffyKoalas <github.com/fluffykoalas> # This file and all others in this project are licensed under the MIT license. # Please see the LICENSE file in the root of t...
0
0
0
0
0
677
0
-5
113
6909a093ebc1b16b9ec6ee5e4625cf5a70e33ea5
910
py
Python
autorest/codegen/serializers/operations_init_serializer.py
qwordy/autorest.python
6b12df51c2a39a1285546b5a771b69f5896e794f
[ "MIT" ]
35
2018-04-03T12:15:53.000Z
2022-03-11T14:03:34.000Z
autorest/codegen/serializers/operations_init_serializer.py
qwordy/autorest.python
6b12df51c2a39a1285546b5a771b69f5896e794f
[ "MIT" ]
652
2017-08-28T22:44:41.000Z
2022-03-31T21:20:31.000Z
autorest/codegen/serializers/operations_init_serializer.py
qwordy/autorest.python
6b12df51c2a39a1285546b5a771b69f5896e794f
[ "MIT" ]
29
2017-08-28T20:57:01.000Z
2022-03-11T14:03:38.000Z
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # --------------------------------------------------------------------------
41.363636
117
0.618681
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- from jinja...
0
0
0
514
0
0
0
18
67
7e740d16f4c3661da418ef20250435495d59f35e
577
py
Python
tests/all_emulated_tests.py
matt-phair/pypylon
f81385a838ac0786f1a3f9b61db8eb4cdd2a905e
[ "BSD-3-Clause" ]
358
2018-05-03T15:09:08.000Z
2022-03-30T02:18:02.000Z
tests/all_emulated_tests.py
matt-phair/pypylon
f81385a838ac0786f1a3f9b61db8eb4cdd2a905e
[ "BSD-3-Clause" ]
473
2018-05-01T14:55:20.000Z
2022-03-31T18:09:31.000Z
tests/all_emulated_tests.py
matt-phair/pypylon
f81385a838ac0786f1a3f9b61db8eb4cdd2a905e
[ "BSD-3-Clause" ]
176
2018-07-05T20:16:05.000Z
2022-03-16T10:59:52.000Z
#!/usr/bin/env python import unittest if __name__ == "__main__": unittest.main()
41.214286
125
0.736568
#!/usr/bin/env python import unittest import os def load_tests(loader, tests, pattern): thisdir = os.path.dirname(__file__) suites = [] suites.append(unittest.defaultTestLoader.discover( os.path.join(thisdir), pattern='nonexistent.py')) suites.append(unittest.defaultTestLoader.discover( os.path.join(th...
0
0
0
0
0
459
0
-12
45
e35c865d9b8556a1581618601205d5d8f9947475
343
py
Python
account/tests.py
Hoofeycheng/Bookmarks
f2721633cd39393f0c92993579071679bb975ab0
[ "MIT" ]
null
null
null
account/tests.py
Hoofeycheng/Bookmarks
f2721633cd39393f0c92993579071679bb975ab0
[ "MIT" ]
null
null
null
account/tests.py
Hoofeycheng/Bookmarks
f2721633cd39393f0c92993579071679bb975ab0
[ "MIT" ]
null
null
null
# Create your tests here. # from django.contrib.auth.views import LoginView,PasswordChangeDoneView,PasswordResetView #LoginView, #LogoutView, #PasswordChangeView, #PasswordChangeDoneView #PasswordResetView,token
20.176471
90
0.857143
from django.test import TestCase # Create your tests here. # from django.contrib.auth.views import LoginView,PasswordChangeDoneView,PasswordResetView #LoginView,处理登录表单填写和登录功能 #LogoutView,退出登录 #PasswordChangeView,处理修改密码的表单,然后修改密码 #PasswordChangeDoneView,成功修改密码之后执行的视图 #PasswordResetView,用户选择重置密码功能的视图,生成一个一次性重置密码链接和对应的验...
270
0
0
0
0
0
0
11
22
db8612c541097d31ad5e4689feb29f9e5d02fa73
924
py
Python
colections/dump_load_file_in_hdfs.py
vanducng/learning-spark
b7e93361b1ae37fbcd718c4d7034b8355b65fd94
[ "MIT" ]
null
null
null
colections/dump_load_file_in_hdfs.py
vanducng/learning-spark
b7e93361b1ae37fbcd718c4d7034b8355b65fd94
[ "MIT" ]
null
null
null
colections/dump_load_file_in_hdfs.py
vanducng/learning-spark
b7e93361b1ae37fbcd718c4d7034b8355b65fd94
[ "MIT" ]
null
null
null
import joblib import subprocess def run_cmd(args_list): """ run linux commands """ # import subprocess print('Running system command: {0}'.format(' '.join(args_list))) proc = subprocess.Popen(args_list, stdout=subprocess.PIPE, stderr=subprocess.PIPE) s_output, s_err = proc.communicate() ...
25.666667
96
0.701299
import joblib import subprocess def run_cmd(args_list): """ run linux commands """ # import subprocess print('Running system command: {0}'.format(' '.join(args_list))) proc = subprocess.Popen(args_list, stdout=subprocess.PIPE, stderr=subprocess.PIPE) s_output, s_err = proc.communicate() ...
0
0
0
0
0
0
0
0
0
0b5e6b27aee9e1bf0ba611e2fa0cf2b30619c1f8
1,033
py
Python
fdk_client/platform/models/RtoAddress.py
kavish-d/fdk-client-python
a1023eb530473322cb52e095fc4ceb226c1e6037
[ "MIT" ]
null
null
null
fdk_client/platform/models/RtoAddress.py
kavish-d/fdk-client-python
a1023eb530473322cb52e095fc4ceb226c1e6037
[ "MIT" ]
null
null
null
fdk_client/platform/models/RtoAddress.py
kavish-d/fdk-client-python
a1023eb530473322cb52e095fc4ceb226c1e6037
[ "MIT" ]
null
null
null
"""Platform Models."""
13.959459
72
0.662149
"""Platform Models.""" from marshmallow import fields, Schema from marshmallow.validate import OneOf from ..enums import * from ..models.BaseSchema import BaseSchema from .StoreAddressJson import StoreAddressJson class RtoAddress(BaseSchema): # Order swagger.json name = fie...
0
0
0
760
0
0
0
80
135
22ed6397cb177767be196a7f0f4d5ae1306b21e3
1,599
py
Python
tests/test_gen_dict_563.py
aha79/cattrs
50ba769c8349f5891b157d2bb7f06602822ac0a3
[ "MIT" ]
null
null
null
tests/test_gen_dict_563.py
aha79/cattrs
50ba769c8349f5891b157d2bb7f06602822ac0a3
[ "MIT" ]
null
null
null
tests/test_gen_dict_563.py
aha79/cattrs
50ba769c8349f5891b157d2bb7f06602822ac0a3
[ "MIT" ]
null
null
null
"""`gen` tests under PEP 563.""" from __future__ import annotations # These need to be at the top level for `attr.resolve_types` to work.
19.035714
73
0.706692
"""`gen` tests under PEP 563.""" from __future__ import annotations from dataclasses import dataclass from attr import define from cattrs import GenConverter from cattrs.gen import make_dict_structure_fn, make_dict_unstructure_fn # These need to be at the top level for `attr.resolve_types` to work. @define class I...
0
114
0
0
0
990
0
74
274
5d56e60b7a2f1c1c12e830762b2698bf113e7e71
1,293
py
Python
core/migrations/0001_initial.py
rdmaulana/covid19-dashboard-idn
08f0e8ae9979f2df863388537981fc5d9272c4bc
[ "MIT" ]
null
null
null
core/migrations/0001_initial.py
rdmaulana/covid19-dashboard-idn
08f0e8ae9979f2df863388537981fc5d9272c4bc
[ "MIT" ]
null
null
null
core/migrations/0001_initial.py
rdmaulana/covid19-dashboard-idn
08f0e8ae9979f2df863388537981fc5d9272c4bc
[ "MIT" ]
null
null
null
# Generated by Django 3.1.4 on 2020-12-23 07:55
36.942857
114
0.565352
# Generated by Django 3.1.4 on 2020-12-23 07:55 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='covidRecord', fields=[ ('id', models.AutoFi...
0
0
0
1,179
0
0
0
19
46
978550ada7e336a25f0266a58b6082955fb08bd1
520
py
Python
exercises/python/built-ins/any-all.py
rogeriosantosf/hacker-rank-profile
d4b9c131524d138c415e5c5de4e38c6b8c35dd77
[ "MIT" ]
null
null
null
exercises/python/built-ins/any-all.py
rogeriosantosf/hacker-rank-profile
d4b9c131524d138c415e5c5de4e38c6b8c35dd77
[ "MIT" ]
null
null
null
exercises/python/built-ins/any-all.py
rogeriosantosf/hacker-rank-profile
d4b9c131524d138c415e5c5de4e38c6b8c35dd77
[ "MIT" ]
null
null
null
# Sample Input # 5 # 12 9 61 5 14 # Sample Output # True # Explanation # Condition 1: All the integers in the list are positive. # Condition 2: 5 is a palindromic integer. # Hence, the output is True. if __name__ == '__main__': count, numbers = input(), input().split() msg = "True" if any(map(is_palindromic,...
26
62
0.671154
# Sample Input # 5 # 12 9 61 5 14 # Sample Output # True # Explanation # Condition 1: All the integers in the list are positive. # Condition 2: 5 is a palindromic integer. # Hence, the output is True. if __name__ == '__main__': count, numbers = input(), input().split() def is_palindromic(value): return value...
0
0
0
0
0
61
0
0
52
ae57cb433b4cd86ab53f4c3978d3145abaa12cfe
265
py
Python
user/urls.py
tyronedamasceno/coffe-api
8cbf48c35c5dbd9ddfbeb921140be1d96a48698f
[ "MIT" ]
null
null
null
user/urls.py
tyronedamasceno/coffe-api
8cbf48c35c5dbd9ddfbeb921140be1d96a48698f
[ "MIT" ]
8
2020-02-12T02:59:28.000Z
2022-02-10T14:02:04.000Z
user/urls.py
tyronedamasceno/coffe-api
8cbf48c35c5dbd9ddfbeb921140be1d96a48698f
[ "MIT" ]
null
null
null
from django.urls import path, include from rest_framework import routers from user import views router = routers.DefaultRouter() router.register('', views.UserViewSet, base_name='users') app_name = 'user' urlpatterns = [ path('', include(router.urls)), ]
16.5625
57
0.735849
from django.urls import path, include from rest_framework import routers from user import views router = routers.DefaultRouter() router.register('', views.UserViewSet, base_name='users') app_name = 'user' urlpatterns = [ path('', include(router.urls)), ]
0
0
0
0
0
0
0
0
0
bb1fd24753ca2e5ce633536d45199e9887f993f6
3,932
py
Python
stacks/vmdkexport/resources/amidistribution/ami_distribution.py
aws-samples/ec2-imagebuilder-vmdk-export
542bbb23ddc66c7f3551d05b5fb9373bdb315e9e
[ "MIT", "MIT-0" ]
null
null
null
stacks/vmdkexport/resources/amidistribution/ami_distribution.py
aws-samples/ec2-imagebuilder-vmdk-export
542bbb23ddc66c7f3551d05b5fb9373bdb315e9e
[ "MIT", "MIT-0" ]
null
null
null
stacks/vmdkexport/resources/amidistribution/ami_distribution.py
aws-samples/ec2-imagebuilder-vmdk-export
542bbb23ddc66c7f3551d05b5fb9373bdb315e9e
[ "MIT", "MIT-0" ]
null
null
null
################################################## ## EC2 ImageBuilder AMI distribution setting targetAccountIds ## is not supported by CloudFormation (as of September 2021). ## https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-imagebuilder-distributionconfiguration.html ## ## This lambda func...
39.32
122
0.669634
################################################## ## EC2 ImageBuilder AMI distribution setting targetAccountIds ## is not supported by CloudFormation (as of September 2021). ## https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-imagebuilder-distributionconfiguration.html ## ## This lambda func...
0
0
0
0
0
3,145
0
-44
180
bf30c6c11a941e3458f24fd3fad9b2029cef6892
136
py
Python
server/club_controller/midi/midi_animation_controller.py
thomsan/club-controller
fbc511c0e08481f473c8fb3675e243ab04b25098
[ "MIT" ]
null
null
null
server/club_controller/midi/midi_animation_controller.py
thomsan/club-controller
fbc511c0e08481f473c8fb3675e243ab04b25098
[ "MIT" ]
null
null
null
server/club_controller/midi/midi_animation_controller.py
thomsan/club-controller
fbc511c0e08481f473c8fb3675e243ab04b25098
[ "MIT" ]
null
null
null
""" The MidiAnimationController gets MIDI messages from the MidiServer and sends animation messages to the LED strip clients """ # TODO
22.666667
70
0.794118
""" The MidiAnimationController gets MIDI messages from the MidiServer and sends animation messages to the LED strip clients """ # TODO
0
0
0
0
0
0
0
0
0
28b7907baa3de457a0172c871455f15361d14d60
878
py
Python
autofile/hookspecs.py
RhetTbull/autofile
b61235b29f8047699654ea101312bda257835e7c
[ "MIT" ]
6
2021-11-18T17:33:04.000Z
2022-01-08T04:51:55.000Z
autofile/hookspecs.py
RhetTbull/autofile
b61235b29f8047699654ea101312bda257835e7c
[ "MIT" ]
8
2021-10-30T16:04:56.000Z
2022-01-02T17:26:52.000Z
autofile/hookspecs.py
RhetTbull/autofile
b61235b29f8047699654ea101312bda257835e7c
[ "MIT" ]
null
null
null
from pluggy import HookspecMarker hookspec = HookspecMarker("autofile")
36.583333
109
0.73918
from typing import List, Optional, Iterable from pluggy import HookspecMarker hookspec = HookspecMarker("autofile") @hookspec(firstresult=True) def get_template_value( filepath: str, field: str, subfield: str, default: List[str] ) -> Optional[List[Optional[str]]]: """Called by template.py to get template va...
0
712
0
0
0
0
0
22
68
eddfcd31a0949195167ba7914fff5593e13b6e92
844
py
Python
main.py
mohsenhariri/ml-simple-models
32b469eadd2880f3f55cfe104cea314b326cedd6
[ "MIT", "Unlicense" ]
2
2022-01-17T15:45:08.000Z
2022-01-17T21:27:13.000Z
main.py
mohsenhariri/ml-simple-models
32b469eadd2880f3f55cfe104cea314b326cedd6
[ "MIT", "Unlicense" ]
null
null
null
main.py
mohsenhariri/ml-simple-models
32b469eadd2880f3f55cfe104cea314b326cedd6
[ "MIT", "Unlicense" ]
null
null
null
# MNIST # import mnist.fc # import mnist.lenet5 # import mnist.lenet5_loader # import mnist.alex # CIFAR10 # import cifar.lenet5 # import cifar.alex # import cifar.vgg16 # Data Preparation # import data.mnist # import data.cifar # import data.fashion_mnist # Data Augmentation # import data_augmentation.ds_builder...
22.810811
58
0.830569
# MNIST # import mnist.fc # import mnist.lenet5 # import mnist.lenet5_loader # import mnist.alex # CIFAR10 # import cifar.lenet5 # import cifar.alex # import cifar.vgg16 # Data Preparation # import data.mnist # import data.cifar # import data.fashion_mnist # Data Augmentation # import data_augmentation.ds_builder...
0
0
0
0
0
0
0
0
0
d56644ba89d24443fc6651f8f43c0f0fbaa1a004
341
py
Python
PyTrinamic/ic/TMC7300/TMC7300_register.py
trinamic-AA/PyTrinamic
b054f4baae8eb6d3f5d2574cf69c232f66abb4ee
[ "MIT" ]
37
2019-01-13T11:08:45.000Z
2022-03-25T07:18:15.000Z
PyTrinamic/ic/TMC7300/TMC7300_register.py
trinamic-AA/PyTrinamic
b054f4baae8eb6d3f5d2574cf69c232f66abb4ee
[ "MIT" ]
56
2019-02-25T02:48:27.000Z
2022-03-31T08:45:34.000Z
PyTrinamic/ic/TMC7300/TMC7300_register.py
trinamic-AA/PyTrinamic
b054f4baae8eb6d3f5d2574cf69c232f66abb4ee
[ "MIT" ]
26
2019-01-14T05:20:16.000Z
2022-03-08T13:27:35.000Z
''' Created on 30.03.2020 @author: JM '''
17.947368
31
0.480938
''' Created on 30.03.2020 @author: JM ''' class TMC7300_register(object): GCONF = 0x00 GSTAT = 0x01 IFCNT = 0x02 SLAVECONF = 0x03 IOIN = 0x06 CURRENT_LIMIT = 0x10 PWM_AB = 0x22 CHOPCONF = 0x6C DRV_STATUS = 0x6F P...
0
0
0
275
0
0
0
0
23
73d9012ad89769ce6f4048f4a0fb80d83ba8fcb8
27,489
py
Python
scripts/addons/RetopoFlow/addon_common/common/ui_layout.py
Tilapiatsu/blender-custom_conf
05592fedf74e4b7075a6228b8448a5cda10f7753
[ "MIT" ]
2
2020-04-16T22:12:40.000Z
2022-01-22T17:18:45.000Z
scripts/addons/RetopoFlow/addon_common/common/ui_layout.py
Tilapiatsu/blender-custom_conf
05592fedf74e4b7075a6228b8448a5cda10f7753
[ "MIT" ]
null
null
null
scripts/addons/RetopoFlow/addon_common/common/ui_layout.py
Tilapiatsu/blender-custom_conf
05592fedf74e4b7075a6228b8448a5cda10f7753
[ "MIT" ]
2
2019-05-16T04:01:09.000Z
2020-08-25T11:42:26.000Z
''' Copyright (C) 2021 CG Cookie http://cgcookie.com hello@cgcookie.com Created by Jonathan Denning, Jonathan Williamson This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 ...
48.653097
169
0.617192
''' Copyright (C) 2021 CG Cookie http://cgcookie.com hello@cgcookie.com Created by Jonathan Denning, Jonathan Williamson This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 ...
0
0
0
25,339
0
0
0
501
865
fd556d10ee4f31251dc4489edaff4dd7c4bfa6b1
2,360
py
Python
pylark/api_service_bitable_view_list.py
chyroc/pylark
a54cce6b814935fd3c72668b262b54c8ee461484
[ "Apache-2.0" ]
7
2021-08-18T00:42:05.000Z
2022-03-14T09:49:15.000Z
pylark/api_service_bitable_view_list.py
chyroc/pylark
a54cce6b814935fd3c72668b262b54c8ee461484
[ "Apache-2.0" ]
null
null
null
pylark/api_service_bitable_view_list.py
chyroc/pylark
a54cce6b814935fd3c72668b262b54c8ee461484
[ "Apache-2.0" ]
1
2022-03-14T09:49:20.000Z
2022-03-14T09:49:20.000Z
# Code generated by lark_sdk_gen. DO NOT EDIT.
36.307692
106
0.649153
# Code generated by lark_sdk_gen. DO NOT EDIT. from pylark.lark_request import RawRequestReq, _new_method_option from pylark import lark_type, lark_type_sheet, lark_type_approval import attr import typing import io @attr.s class GetBitableViewListReq(object): page_size: int = attr.ib( default=0, metadata...
375
1,472
0
0
0
451
0
58
203
7e5b55a429157922135bb14078c7d1db48ed3f46
2,217
py
Python
analysis/summarize_dataset.py
alecmeade/nlp_final_project
12b41b2632ae06f3833c0c608827149b5f24349e
[ "MIT" ]
1
2021-05-29T04:13:10.000Z
2021-05-29T04:13:10.000Z
analysis/summarize_dataset.py
nikhilsinghmus/nlp_final_project
12b41b2632ae06f3833c0c608827149b5f24349e
[ "MIT" ]
null
null
null
analysis/summarize_dataset.py
nikhilsinghmus/nlp_final_project
12b41b2632ae06f3833c0c608827149b5f24349e
[ "MIT" ]
1
2021-04-26T22:47:42.000Z
2021-04-26T22:47:42.000Z
import argparse import os import pickle if __name__ == "__main__": paritions = ["train_2020.json", "test_seen_2020.json", "test_unseen_2020.json"] parser = argparse.ArgumentParser() parser.add_argument("--partitions", type=list, default=[0])#, 1, 2]) parser.add_argument("--force_rerun", type=bool, default=Tru...
26.082353
80
0.732521
import argparse import matplotlib.pyplot as plt import numpy as np import json import collections import os import pickle import seaborn as sns def summarize_partition(path, data): print("Partition: %s" % path) caption_lengths = [] speaker_counts = collections.defaultdict(int) word_counts = collections.defaultdi...
0
0
0
0
0
881
0
-6
202
5e7eb15551b3296e5b0ea1e8d67d22d1f3804b27
188
py
Python
mne_qt_browser/__init__.py
GuillaumeFavelier/mne-qt-browser
c0a7d32259c13097dbd0f2553725ba7049c83b3e
[ "BSD-3-Clause" ]
17
2021-11-01T08:59:20.000Z
2022-03-29T13:39:18.000Z
mne_qt_browser/__init__.py
mscheltienne/mne-qt-browser
6c2431632c577fb41f2c1fa25dfbe4e19205da69
[ "BSD-3-Clause" ]
69
2021-09-02T16:47:00.000Z
2022-03-31T09:22:58.000Z
mne_qt_browser/__init__.py
mscheltienne/mne-qt-browser
6c2431632c577fb41f2c1fa25dfbe4e19205da69
[ "BSD-3-Clause" ]
11
2021-10-11T00:03:02.000Z
2022-03-31T16:55:35.000Z
# All created brower-instances are listed here for a reference to avoid having # them garbage-collected prematurely. _browser_instances = list()
31.333333
78
0.797872
from ._version import __version__ # noqa # All created brower-instances are listed here for a reference to avoid having # them garbage-collected prematurely. _browser_instances = list()
0
0
0
0
0
0
0
12
30
a22a234aad1219d42b0a654e16cd48fe971812c9
2,474
py
Python
data/livestock/analyze.py
NUKnightLab/fao-explorer
ab986780c92355fae1e033372492ef85a41658e9
[ "MIT" ]
2
2015-04-28T03:16:14.000Z
2015-06-14T17:58:48.000Z
data/livestock/analyze.py
NUKnightLab/fao-explorer
ab986780c92355fae1e033372492ef85a41658e9
[ "MIT" ]
null
null
null
data/livestock/analyze.py
NUKnightLab/fao-explorer
ab986780c92355fae1e033372492ef85a41658e9
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np ISO_COUNTRY_CODES = { 'Brazil': 76, 'China': 156, 'India': 356, 'Nigeria': 566 } FAOSTAT_COUNTRY_CODES = { 'Brazil': 21, 'China': 351, 'India': 100, 'Nigeria': 159 } CLASSES = {'SEAFOOD': [ 'Aquatic Animals, Others', 'Cephalopods', 'Crustacean...
29.105882
250
0.681083
import pandas as pd import numpy as np ISO_COUNTRY_CODES = { 'Brazil': 76, 'China': 156, 'India': 356, 'Nigeria': 566 } FAOSTAT_COUNTRY_CODES = { 'Brazil': 21, 'China': 351, 'India': 100, 'Nigeria': 159 } CLASSES = {'SEAFOOD': [ 'Aquatic Animals, Others', 'Cephalopods', 'Crustacean...
0
0
0
0
0
919
0
0
45
8f258812f4a4b199e3a1532d7216e2e0013ba79c
488
py
Python
COMM3.py
varuuntiwari/codechef-practice-beginner
ca9246c6292eca5a689c3b9e720cc315d09ec9d0
[ "MIT" ]
null
null
null
COMM3.py
varuuntiwari/codechef-practice-beginner
ca9246c6292eca5a689c3b9e720cc315d09ec9d0
[ "MIT" ]
null
null
null
COMM3.py
varuuntiwari/codechef-practice-beginner
ca9246c6292eca5a689c3b9e720cc315d09ec9d0
[ "MIT" ]
null
null
null
t=int(input()) while t > 0: t-=1 r = float(input()) chef = [int(x) for x in input().split(' ')] head = [int(x) for x in input().split(' ')] sous = [int(x) for x in input().split(' ')] dists = [getDist(chef, head), getDist(chef, sous), getDist(sous, head)] if len([x for x in dists if (x > r)]) > 1: pr...
24.4
73
0.534836
from math import pow, sqrt def getDist(x, y): a = pow((x[0] - y[0]), 2) b = pow((x[1] - y[1]), 2) res = sqrt(a+b) return res t=int(input()) while t > 0: t-=1 r = float(input()) chef = [int(x) for x in input().split(' ')] head = [int(x) for x in input().split(' ')] sous = [int(x) for x in input().spl...
0
0
0
0
0
84
0
5
45
369735fbdd23931c0cdf06794856f213234f205a
92
py
Python
command/src/main.py
gus-maurizio/monorepo
cda533e7e4a8dffb74ff50531fd4732da0ad2736
[ "MIT" ]
null
null
null
command/src/main.py
gus-maurizio/monorepo
cda533e7e4a8dffb74ff50531fd4732da0ad2736
[ "MIT" ]
null
null
null
command/src/main.py
gus-maurizio/monorepo
cda533e7e4a8dffb74ff50531fd4732da0ad2736
[ "MIT" ]
null
null
null
from str_utils import normalize if __name__ == '__main__': print(normalize(' main '))
18.4
31
0.695652
from str_utils import normalize if __name__ == '__main__': print(normalize(' main '))
0
0
0
0
0
0
0
0
0
5bfed94e7462d947d3ba317a9ed12e7a5f5d0bbe
255
py
Python
CodingBat/Python/List-1/has23.py
unobatbayar/codingbat
085c86f8f2f043cc020ba0f5fcc364d3f03de9e6
[ "MIT" ]
2
2018-10-28T16:56:20.000Z
2019-05-17T19:13:21.000Z
CodingBat/Python/List-1/has23.py
unobatbayar/CodingBat
94044b6150df8ce7a4fbe42a47b168fbf2fede61
[ "MIT" ]
2
2022-02-22T04:23:15.000Z
2022-03-31T06:55:56.000Z
CodingBat/Python/List-1/has23.py
unobatbayar/CodingBat
94044b6150df8ce7a4fbe42a47b168fbf2fede61
[ "MIT" ]
null
null
null
""" Given an int array length 2, return True if it contains a 2 or a 3. has23([2, 5]) True has23([4, 3]) True has23([4, 5]) False @author unobatbayar """
14.166667
67
0.596078
""" Given an int array length 2, return True if it contains a 2 or a 3. has23([2, 5]) → True has23([4, 3]) → True has23([4, 5]) → False @author unobatbayar """ def has23(nums): if 1 < nums[0] < 4 or 1 < nums[1] < 4: return True return False
9
0
0
0
0
67
0
0
23
2462186118f2ce48e348d55a3290b9d21bd5ac76
441
py
Python
rtmplib/__init__.py
genba2/pinybotbeta-enhanced
564ae7c363ee00ad2ae0e05d74e08e58de3d1d2f
[ "MIT" ]
null
null
null
rtmplib/__init__.py
genba2/pinybotbeta-enhanced
564ae7c363ee00ad2ae0e05d74e08e58de3d1d2f
[ "MIT" ]
null
null
null
rtmplib/__init__.py
genba2/pinybotbeta-enhanced
564ae7c363ee00ad2ae0e05d74e08e58de3d1d2f
[ "MIT" ]
null
null
null
""" This package is responsible for encoding/decoding RTMP amf messages. This package contains classes/methods to establish a connection to a RTMP server and to read/write amf messages on a connected stream. It also contains the PySocks (https://github.com/Anorov/PySocks) module to enable a connection to a RTMP server...
33.923077
81
0.777778
""" This package is responsible for encoding/decoding RTMP amf messages. This package contains classes/methods to establish a connection to a RTMP server and to read/write amf messages on a connected stream. It also contains the PySocks (https://github.com/Anorov/PySocks) module to enable a connection to a RTMP server...
0
0
0
0
0
0
0
0
0
216e2470538eb81e3971f3b286f6a22dca38b1ef
2,399
py
Python
setup.py
arago/python-hiro-stonebranch-actionhandler
252791c9fe6e9af150cff2a0903881d69c450ebf
[ "MIT" ]
null
null
null
setup.py
arago/python-hiro-stonebranch-actionhandler
252791c9fe6e9af150cff2a0903881d69c450ebf
[ "MIT" ]
null
null
null
setup.py
arago/python-hiro-stonebranch-actionhandler
252791c9fe6e9af150cff2a0903881d69c450ebf
[ "MIT" ]
1
2021-07-01T09:03:36.000Z
2021-07-01T09:03:36.000Z
#!/usr/bin/env python import os import distutils.core if os.environ.get('USER', '') == 'vagrant': del os.link distutils.core.setup( name='arago-hiro-actionhandler-stonebranch', version='1.0.0', author='Johannes Harth', author_email='jharth@arago.co', description='Arago HIRO ActionHandler plugi...
33.788732
144
0.617341
#!/usr/bin/env python import os import distutils.core if os.environ.get('USER', '') == 'vagrant': del os.link distutils.core.setup( name='arago-hiro-actionhandler-stonebranch', version='1.0.0', author='Johannes Harth', author_email='jharth@arago.co', description='Arago HIRO ActionHandler plugi...
0
0
0
0
0
0
0
0
0
c278a86301cbef2610d856181ae65b38fc10fa57
943
py
Python
cardio_audio_sleep/io/read_raw_fif.py
mscheltienne/cardio-audio-sleep
42a41eb46dc7b285e0fbcdd909352153f69d68b7
[ "MIT" ]
null
null
null
cardio_audio_sleep/io/read_raw_fif.py
mscheltienne/cardio-audio-sleep
42a41eb46dc7b285e0fbcdd909352153f69d68b7
[ "MIT" ]
null
null
null
cardio_audio_sleep/io/read_raw_fif.py
mscheltienne/cardio-audio-sleep
42a41eb46dc7b285e0fbcdd909352153f69d68b7
[ "MIT" ]
null
null
null
import mne from .utils import add_annotations_from_events, map_aux def read_raw_fif(fname): """ Read raw FIF files saved with BSL StreamRecorder. Parameters ---------- fname : file-like Path to the -raw.fif file to load. Returns ------- raw : Raw MNE raw instance. ...
19.645833
55
0.518558
import mne from .utils import add_annotations_from_events, map_aux def read_raw_fif(fname): """ Read raw FIF files saved with BSL StreamRecorder. Parameters ---------- fname : file-like Path to the -raw.fif file to load. Returns ------- raw : Raw MNE raw instance. ...
0
0
0
0
0
0
0
0
0
0318069d50498855eedec7900bc11a20be512003
15,526
py
Python
analyze_video.py
GeneralFox2/Video_Analyzer
7d32d6a68c9615efe65721d73dc71c9ed2c86ace
[ "BSD-2-Clause" ]
1
2020-07-15T03:17:09.000Z
2020-07-15T03:17:09.000Z
analyze_video.py
GeneralFox2/Video_Analyzer
7d32d6a68c9615efe65721d73dc71c9ed2c86ace
[ "BSD-2-Clause" ]
1
2021-08-02T01:13:00.000Z
2021-08-02T01:15:32.000Z
analyze_video.py
GeneralFox2/Video_Analyzer
7d32d6a68c9615efe65721d73dc71c9ed2c86ace
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python3 #python3 analyze_video.py {path/video_filename.mp4} {ID Folder Name} # initalize import sys # draw labels on video for Age and Sex detection engine if __name__ == "__main__": main(sys.argv)
49.92283
157
0.567306
#!/usr/bin/env python3 #python3 analyze_video.py {path/video_filename.mp4} {ID Folder Name} # initalize import sys import argparse import tensorflow as tf import cv2 import dlib import numpy as np import detect_and_align import os from model import OpenNsfwModel from image_utils import create_yahoo_image_loader from ...
0
0
0
4,325
0
10,553
0
70
358
c32b1cf7d7f17df39d33173e3ca4f3a241567018
26,957
py
Python
article_separation/util/util.py
CITlabRostock/citlab-article-separation-new
814364bf81552eefbe0ce60bbb9ec9e8ca63baf4
[ "OLDAP-2.7" ]
8
2021-05-03T11:53:25.000Z
2022-03-31T13:07:42.000Z
article_separation/util/util.py
CITlabRostock/citlab-article-separation-new
814364bf81552eefbe0ce60bbb9ec9e8ca63baf4
[ "OLDAP-2.7" ]
null
null
null
article_separation/util/util.py
CITlabRostock/citlab-article-separation-new
814364bf81552eefbe0ce60bbb9ec9e8ca63baf4
[ "OLDAP-2.7" ]
null
null
null
import copy from collections import defaultdict from python_util.geometry.polygon import list_to_polygon_object from python_util.geometry.rectangle import Rectangle from python_util.geometry.util import ortho_connect, smooth_surrounding_polygon, convex_hull from python_util.image_processing.white_space_detection impor...
49.644567
183
0.626516
import copy from collections import defaultdict from python_util.geometry.polygon import Polygon, list_to_polygon_object from python_util.geometry.rectangle import Rectangle from python_util.geometry.util import ortho_connect, smooth_surrounding_polygon, polygon_clip, convex_hull, \ bounding_box, merge_rectangles ...
0
0
0
0
0
12,610
0
79
114
be25f6cabd839af772dd74399c57991c222d3da8
1,972
py
Python
setuptools/_distutils/log.py
venthur/setuptools
254f8a969a542da0b221c178896f741238022fe4
[ "MIT" ]
1
2022-01-09T05:26:33.000Z
2022-01-09T05:26:33.000Z
setuptools/_distutils/log.py
sthagen/pypa-setuptools
5516cd00e7721b9135a7833dd3be0a99eeb046a8
[ "MIT" ]
null
null
null
setuptools/_distutils/log.py
sthagen/pypa-setuptools
5516cd00e7721b9135a7833dd3be0a99eeb046a8
[ "MIT" ]
null
null
null
"""A simple log mechanism styled after PEP 282.""" # The class here is styled after PEP 282 so that it could later be # replaced with a standard Python logging implementation. DEBUG = 1 INFO = 2 WARN = 3 ERROR = 4 FATAL = 5 _global_log = Log() log = _global_log.log debug = _global_log.debug info = _global_log.info...
24.345679
79
0.587728
"""A simple log mechanism styled after PEP 282.""" # The class here is styled after PEP 282 so that it could later be # replaced with a standard Python logging implementation. import sys DEBUG = 1 INFO = 2 WARN = 3 ERROR = 4 FATAL = 5 class Log: def __init__(self, threshold=WARN): self.threshold = thre...
0
0
0
1,223
0
269
0
-11
92
ce6bce0398a67438508d27a71df87f474b7bcbab
1,078
py
Python
setup.py
ruizhaogit/alf
be1e65afa5f8401236d98db8f85a5e27fa1e18dc
[ "Apache-2.0" ]
2
2021-03-22T14:57:03.000Z
2021-09-28T07:02:10.000Z
setup.py
ruizhaogit/alf
be1e65afa5f8401236d98db8f85a5e27fa1e18dc
[ "Apache-2.0" ]
null
null
null
setup.py
ruizhaogit/alf
be1e65afa5f8401236d98db8f85a5e27fa1e18dc
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2019 Horizon Robotics. 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 applicab...
30.8
74
0.647495
# Copyright (c) 2019 Horizon Robotics. 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 applicab...
0
0
0
0
0
0
0
0
0
3c3b91101c6a3294b45f7b1b4adc2bb81fc7a78b
426
py
Python
CursoEmVideo/Python/Mundo 2/ex061.py
GabriellyBailon/Cursos
0fe82881638a48dabbfd5963db39d2a0b7d7e4c3
[ "MIT" ]
null
null
null
CursoEmVideo/Python/Mundo 2/ex061.py
GabriellyBailon/Cursos
0fe82881638a48dabbfd5963db39d2a0b7d7e4c3
[ "MIT" ]
null
null
null
CursoEmVideo/Python/Mundo 2/ex061.py
GabriellyBailon/Cursos
0fe82881638a48dabbfd5963db39d2a0b7d7e4c3
[ "MIT" ]
null
null
null
#Refazer o Desafio 51 da PA usando o "while" primeirotermo = int(input('Digite o primeiro termo da PA: ')); razao = int(input('Agora digite a razo da PA: ')); vezes = 10; cont = 0; pa = primeirotermo; print(f'Os {vezes} termos da PA so: {pa}', end=' '); cont += 1; while cont < vezes: pa = pa + razao; ...
14.689655
63
0.544601
#Refazer o Desafio 51 da PA usando o "while" primeirotermo = int(input('Digite o primeiro termo da PA: ')); razao = int(input('Agora digite a razão da PA: ')); vezes = 10; cont = 0; pa = primeirotermo; print(f'Os {vezes} termos da PA são: {pa}', end=' '); cont += 1; while cont < vezes: pa = pa + razao;...
4
0
0
0
0
0
0
0
0
46693641ecb56a0a182deefaae7f2cdd68321523
1,751
py
Python
6kyu/playing_with_digits.py
lcsm29/codewars
25263ae3784b1b55f3229acb8b08c96c927ad6e5
[ "MIT" ]
null
null
null
6kyu/playing_with_digits.py
lcsm29/codewars
25263ae3784b1b55f3229acb8b08c96c927ad6e5
[ "MIT" ]
null
null
null
6kyu/playing_with_digits.py
lcsm29/codewars
25263ae3784b1b55f3229acb8b08c96c927ad6e5
[ "MIT" ]
null
null
null
# Playing with Digits # 6 kyu # https://www.codewars.com/kata/5552101f47fc5178b1000050 # # w r i t t e n b y # oooo https://github.com/lcsm29 .oooo. .ooooo. # `888 .dP""Y88b 888' `Y88. # 888 .ooooo. .oooo.o ooo. .oo. .oo. ]8...
38.065217
75
0.432324
# Playing with Digits # 6 kyu # https://www.codewars.com/kata/5552101f47fc5178b1000050 # # w r i t t e n b y # oooo https://github.com/lcsm29 .oooo. .ooooo. # `888 .dP""Y88b 888' `Y88. # 888 .ooooo. .oooo.o ooo. .oo. .oo. ]8...
0
0
0
0
0
128
0
0
22
295ab9af60b5d0796f663a49002a54e55ebf4617
194
py
Python
customs/__init__.py
fin09pcap/customs
4a419cb2809bec0d186f416c410b849010b02f94
[ "MIT" ]
null
null
null
customs/__init__.py
fin09pcap/customs
4a419cb2809bec0d186f416c410b849010b02f94
[ "MIT" ]
null
null
null
customs/__init__.py
fin09pcap/customs
4a419cb2809bec0d186f416c410b849010b02f94
[ "MIT" ]
null
null
null
# -*- coding: utf-8; -*- # flake8: noqa from .const import VERSION __title__ = 'customs' __version__ = VERSION
19.4
27
0.71134
# -*- coding: utf-8; -*- # flake8: noqa from .agent import Agent from .agency import Agency from .const import VERSION from .rules import Rules __title__ = 'customs' __version__ = VERSION
0
0
0
0
0
0
0
14
66
5d56e1b392d67d7fd55d70df0195a4f9508d6adb
4,898
py
Python
Graphics Projects/Egg_Catcher.py
RawRapter/Python-Projects
7943a833c91bcee0698565f554516661044ed7f5
[ "MIT" ]
null
null
null
Graphics Projects/Egg_Catcher.py
RawRapter/Python-Projects
7943a833c91bcee0698565f554516661044ed7f5
[ "MIT" ]
null
null
null
Graphics Projects/Egg_Catcher.py
RawRapter/Python-Projects
7943a833c91bcee0698565f554516661044ed7f5
[ "MIT" ]
null
null
null
""" This Project is a game , name - Egg Catcher. """ #Importing libraries from itertools import cycle from tkinter import Tk, Canvas #Creating variable for canvas size canvas_width = 800 canvas_height = 400 win = Tk() #Win starts #Giving title win.title("The Egg Catcher") #creating canvas c = Canvas(win , width = ca...
36.281481
166
0.72499
""" This Project is a game , name - Egg Catcher. """ #Importing libraries from itertools import cycle from random import randrange from tkinter import Tk , Canvas , messagebox , font #Creating variable for canvas size canvas_width = 800 canvas_height = 400 win = Tk() #Win starts #Giving title win.title("The Egg Catc...
0
0
0
0
0
2,185
0
28
198
78ed560d15f138a71ebae5ef0aafedfaa11684c1
6,733
py
Python
leatherman/cfg.py
scottidler/leatherman
041affeb497eb01dad9df045636c1acea403c031
[ "MIT" ]
null
null
null
leatherman/cfg.py
scottidler/leatherman
041affeb497eb01dad9df045636c1acea403c031
[ "MIT" ]
null
null
null
leatherman/cfg.py
scottidler/leatherman
041affeb497eb01dad9df045636c1acea403c031
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ config """ import sys import time import logging import sh from decouple import config LOG_LEVELS = ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"] LOG_LEVEL = config("LOG_LEVEL", logging.WARNING, cast=int) logging.basicConfig( stream=sys.stdout, level=LOG_LEVEL, format="%(asctime)...
22.221122
97
0.522947
# -*- coding: utf-8 -*- """ config """ import os import re import pwd import sys import time import logging import sh from decouple import UndefinedValueError, AutoConfig, config LOG_LEVELS = ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"] LOG_LEVEL = config("LOG_LEVEL", logging.WARNING, cast=int) logging.basicC...
0
4,184
0
1,547
0
0
0
-2
136
fca385a87f0aa013b7e73245721f7c4bbe5295fa
4,794
py
Python
pyEX/fx.py
westonplatter/pyEX
e7c30a468aae8d3a1afe17a388e15c6e37771a3e
[ "Apache-2.0" ]
null
null
null
pyEX/fx.py
westonplatter/pyEX
e7c30a468aae8d3a1afe17a388e15c6e37771a3e
[ "Apache-2.0" ]
null
null
null
pyEX/fx.py
westonplatter/pyEX
e7c30a468aae8d3a1afe17a388e15c6e37771a3e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import pandas as pd from .common import _getJson def latestFX(symbols=None, token='', version='', filter=''): '''This endpoint returns real-time foreign currency exchange rates data updated every 250 milliseconds. https://iexcloud.io/docs/api/#latest-currency-rates 5pm Sun-4pm Fri...
36.876923
215
0.67209
# -*- coding: utf-8 -*- import pandas as pd from .common import _getJson def latestFX(symbols=None, token='', version='', filter=''): '''This endpoint returns real-time foreign currency exchange rates data updated every 250 milliseconds. https://iexcloud.io/docs/api/#latest-currency-rates 5pm Sun-4pm Fri...
6
0
0
0
0
0
0
0
0
6b98ab238d2fee12858ae536c98aec73e1c244b8
297
py
Python
Resource/BCCWJ_frequencylist_suw_ver1_0/compile_shelve.py
mack-the-psych/plimac3
7b47abf7a087961e5a3e9c90b1ae20d07b3d6898
[ "MIT" ]
null
null
null
Resource/BCCWJ_frequencylist_suw_ver1_0/compile_shelve.py
mack-the-psych/plimac3
7b47abf7a087961e5a3e9c90b1ae20d07b3d6898
[ "MIT" ]
null
null
null
Resource/BCCWJ_frequencylist_suw_ver1_0/compile_shelve.py
mack-the-psych/plimac3
7b47abf7a087961e5a3e9c90b1ae20d07b3d6898
[ "MIT" ]
null
null
null
#If there is an existing db, it should be deleted before loading otherwise #the frequency information will be invalid. import sys sys.path.append(r'../../Lib') ac_load_oanc_shelve(r'BCCWJ_frequencylist-FrqGE3.csv', r'BCCWJ_frequencylist-FrqGE3.db', 'Jp')
27
94
0.784512
#If there is an existing db, it should be deleted before loading otherwise #the frequency information will be invalid. import sys sys.path.append(r'../../Lib') from ac_oanc_lemma_frequency import * ac_load_oanc_shelve(r'BCCWJ_frequencylist-FrqGE3.csv', r'BCCWJ_frequencylist-FrqGE3.db', 'Jp')
0
0
0
0
0
0
0
16
23
2e31f69c46302b698bb22ea5d2cca4080a42167a
2,834
py
Python
src/data/make_dataset.py
ckiesl/Facebook-Analyzer
30afea79f5e558f435ef4548da67ade94b061cd1
[ "BSD-3-Clause" ]
null
null
null
src/data/make_dataset.py
ckiesl/Facebook-Analyzer
30afea79f5e558f435ef4548da67ade94b061cd1
[ "BSD-3-Clause" ]
null
null
null
src/data/make_dataset.py
ckiesl/Facebook-Analyzer
30afea79f5e558f435ef4548da67ade94b061cd1
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import os 'def' if __name__ == '__main__': os.chdir(os.getcwd()) os.chdir('..') os.chdir('..') os.chdir('data') os.chdir('raw') os.chdir('html') html_dir = os.getcwd() os.chdir('..') os.chdir('..') os.chdir('processed') processed_dir = o...
34.987654
301
0.613267
# -*- coding: utf-8 -*- import os import logging from bs4 import BeautifulSoup import re 'def' import codecs import functools from pymongo import MongoClient import datetime import time def getMessage(threadId,sender, text, date): return {"threadId":threadId, "sender":sender, "text":text, "date":date} def getTh...
2
0
0
0
0
2,253
0
-30
245
1cf8e3d25a4b315a03eb4cd8c2bc872ad9510316
364
py
Python
ECOMMERCE/backend/base/migrations/0005_rename_caegory_product_category.py
Lisgevan/Django-and-React-An-Ecommerce-Website
30ea36645c91ca1038cfa9bcd8bc428f9db7d5bc
[ "MIT" ]
null
null
null
ECOMMERCE/backend/base/migrations/0005_rename_caegory_product_category.py
Lisgevan/Django-and-React-An-Ecommerce-Website
30ea36645c91ca1038cfa9bcd8bc428f9db7d5bc
[ "MIT" ]
null
null
null
ECOMMERCE/backend/base/migrations/0005_rename_caegory_product_category.py
Lisgevan/Django-and-React-An-Ecommerce-Website
30ea36645c91ca1038cfa9bcd8bc428f9db7d5bc
[ "MIT" ]
null
null
null
# Generated by Django 3.2.8 on 2021-11-05 09:20
19.157895
47
0.585165
# Generated by Django 3.2.8 on 2021-11-05 09:20 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('base', '0004_auto_20211105_1115'), ] operations = [ migrations.RenameField( model_name='product', old_name='caegory', ...
0
0
0
258
0
0
0
11
46
2d932246237812c465cc4d255b43703f179f6ecc
5,889
py
Python
monitor/plugins/vertical/plugin.py
matheuscmelo/asperathos-monitor
8801321789792b54cf12b845009710c14b95bfca
[ "Apache-2.0" ]
null
null
null
monitor/plugins/vertical/plugin.py
matheuscmelo/asperathos-monitor
8801321789792b54cf12b845009710c14b95bfca
[ "Apache-2.0" ]
null
null
null
monitor/plugins/vertical/plugin.py
matheuscmelo/asperathos-monitor
8801321789792b54cf12b845009710c14b95bfca
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2018 UFCG-LSD. # # 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,...
37.75
126
0.639328
# Copyright (c) 2018 UFCG-LSD. # # 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,...
0
0
0
4,840
0
0
0
79
291
ed4ddce89ce7e82c9cac398ecb58caf90e270994
63
py
Python
text/_abstract/block/__init__.py
jedhsu/text
8525b602d304ac571a629104c48703443244545c
[ "Apache-2.0" ]
null
null
null
text/_abstract/block/__init__.py
jedhsu/text
8525b602d304ac571a629104c48703443244545c
[ "Apache-2.0" ]
null
null
null
text/_abstract/block/__init__.py
jedhsu/text
8525b602d304ac571a629104c48703443244545c
[ "Apache-2.0" ]
null
null
null
from ._block import AbstractBlock __all__ = ["AbstractBlock"]
15.75
33
0.777778
from ._block import AbstractBlock __all__ = ["AbstractBlock"]
0
0
0
0
0
0
0
0
0