hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
400708af3eb122277da5836ea70cf914223ea9b3
1,387
py
Python
src/c3_price/main.py
KlimaDAO/discord-bots
96fefab99e27abccd0b2d5c9d3812f8ad60e94d6
[ "MIT" ]
2
2022-01-24T19:58:44.000Z
2022-03-07T20:16:52.000Z
src/c3_price/main.py
KlimaDAO/discord-bots
96fefab99e27abccd0b2d5c9d3812f8ad60e94d6
[ "MIT" ]
8
2021-11-29T19:38:01.000Z
2022-03-29T19:19:39.000Z
src/c3_price/main.py
KlimaDAO/discord-bots
96fefab99e27abccd0b2d5c9d3812f8ad60e94d6
[ "MIT" ]
12
2021-10-06T20:23:08.000Z
2022-03-31T23:51:03.000Z
import os from discord.ext import tasks from ..constants import C3_ADDRESS, FRAX_DECIMALS, \ C3_DECIMALS, FRAX_C3_POOL from ..contract_info import token_supply, uni_v2_pool_price from ..utils import get_discord_client, get_eth_web3, \ get_polygon_web3, load_abi, \ ...
26.169811
78
0.674838
import os from discord.ext import tasks from ..constants import C3_ADDRESS, FRAX_DECIMALS, \ C3_DECIMALS, FRAX_C3_POOL from ..contract_info import token_supply, uni_v2_pool_price from ..utils import get_discord_client, get_eth_web3, \ get_polygon_web3, load_abi, \ ...
647
0
44
1d1b2e85d0c1358607cd2dd62f5bab1dffbce3a4
191
py
Python
setup.py
kempei/hx711py
1256669450f757e46c859c8b21b40e278f31fef3
[ "Apache-2.0" ]
1
2022-03-24T13:50:48.000Z
2022-03-24T13:50:48.000Z
setup.py
kempei/hx711py-jetsonnano
1256669450f757e46c859c8b21b40e278f31fef3
[ "Apache-2.0" ]
null
null
null
setup.py
kempei/hx711py-jetsonnano
1256669450f757e46c859c8b21b40e278f31fef3
[ "Apache-2.0" ]
null
null
null
from setuptools import setup setup( name='hx711', version='0.1', description='HX711 Python Library for Jetson Nano', py_modules=['hx711'], install_requires=['logzero'] )
19.1
55
0.670157
from setuptools import setup setup( name='hx711', version='0.1', description='HX711 Python Library for Jetson Nano', py_modules=['hx711'], install_requires=['logzero'] )
0
0
0
2b8e9a78122675bae02f4d3f6416c2c2d0b63adb
168
py
Python
snippets/delete_from_multi_tables.py
hit9/skylark
5b7a14e401196e025117b095a7c5e68e551e547a
[ "BSD-2-Clause", "MIT" ]
114
2015-01-06T06:12:30.000Z
2021-08-25T06:17:05.000Z
snippets/delete_from_multi_tables.py
keng-king/skylark
5b7a14e401196e025117b095a7c5e68e551e547a
[ "BSD-2-Clause", "MIT" ]
10
2015-03-23T17:05:13.000Z
2017-03-24T11:50:18.000Z
snippets/delete_from_multi_tables.py
keng-king/skylark
5b7a14e401196e025117b095a7c5e68e551e547a
[ "BSD-2-Clause", "MIT" ]
59
2015-01-21T14:56:23.000Z
2021-09-05T01:24:37.000Z
from models import User, Post # delete user from post, user where post.user_id = user.id query = (Post & User).delete(User) # mysql supports; sqlite3 dosenot support
33.6
77
0.744048
from models import User, Post # delete user from post, user where post.user_id = user.id query = (Post & User).delete(User) # mysql supports; sqlite3 dosenot support
0
0
0
b0e41ddb7c1863a92a19e81a28f9239f50f770ff
868
py
Python
Semproject/Courseoutline/choices.py
sllash2000/CourseOutline
d44a2a7d49695d988f8ffa6eb5407011029ece25
[ "MIT" ]
null
null
null
Semproject/Courseoutline/choices.py
sllash2000/CourseOutline
d44a2a7d49695d988f8ffa6eb5407011029ece25
[ "MIT" ]
null
null
null
Semproject/Courseoutline/choices.py
sllash2000/CourseOutline
d44a2a7d49695d988f8ffa6eb5407011029ece25
[ "MIT" ]
null
null
null
FacultyNameChoices = [ ('FAH','Arts And Humanities'),('FBA','Business Admin'), ('FEd','Education'),('FRS','Religous Studies'),('FOS','Science'), ('FIT','Information Technology'),('FON','Nursing')] CourseCategory = [ ('Core Course','Core Course'),('General Education Course','General Education Course'), ...
39.454545
103
0.615207
FacultyNameChoices = [ ('FAH','Arts And Humanities'),('FBA','Business Admin'), ('FEd','Education'),('FRS','Religous Studies'),('FOS','Science'), ('FIT','Information Technology'),('FON','Nursing')] CourseCategory = [ ('Core Course','Core Course'),('General Education Course','General Education Course'), ...
0
0
0
960ae6c2cee95810d30359e79da59c8a97171c61
894
py
Python
diagnose.py
youngdon95/start_over
48352c42752f6dd24c82250f57c5ee1434352688
[ "MIT" ]
null
null
null
diagnose.py
youngdon95/start_over
48352c42752f6dd24c82250f57c5ee1434352688
[ "MIT" ]
null
null
null
diagnose.py
youngdon95/start_over
48352c42752f6dd24c82250f57c5ee1434352688
[ "MIT" ]
null
null
null
import xlrd from datetime import date from datetime import datetime import random workbook = xlrd.open_workbook('diagnose.xlsx') worksheet = workbook.sheet_by_name('Sheet1') file = open("diagnoseInsert.txt","w") empNum = 2 for x in range(0, 30884): year = random.choice(range(1990, 2018)) month = random....
26.294118
130
0.619687
import xlrd from datetime import date from datetime import datetime import random workbook = xlrd.open_workbook('diagnose.xlsx') worksheet = workbook.sheet_by_name('Sheet1') file = open("diagnoseInsert.txt","w") empNum = 2 for x in range(0, 30884): year = random.choice(range(1990, 2018)) month = random....
0
0
0
60a92fc32f9436c820e1f78c7327d9e09aea64ef
881
py
Python
day9/student_sqlcloud.py
dikshaa1702/ml
c35f279b8fa7544517ca713c2c1e55f08270d4c3
[ "Apache-2.0" ]
1
2019-06-13T13:52:09.000Z
2019-06-13T13:52:09.000Z
day9/student_sqlcloud.py
dikshaa1702/ml
c35f279b8fa7544517ca713c2c1e55f08270d4c3
[ "Apache-2.0" ]
null
null
null
day9/student_sqlcloud.py
dikshaa1702/ml
c35f279b8fa7544517ca713c2c1e55f08270d4c3
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu May 16 11:50:16 2019 @author: DiPu """ import mysql.connector con=mysql.connector.connect(user="diksha",password='diksha1702', host='db4free.net',database='diksha') c=con.cursor() c.execute("""CREATE TABLE student( name text, age i...
29.366667
65
0.624291
# -*- coding: utf-8 -*- """ Created on Thu May 16 11:50:16 2019 @author: DiPu """ import mysql.connector con=mysql.connector.connect(user="diksha",password='diksha1702', host='db4free.net',database='diksha') c=con.cursor() c.execute("""CREATE TABLE student( name text, age i...
0
0
0
2ceb31c77a59667b68c5c12e1c7cd4b434dda44e
1,494
py
Python
16. 3Sum Closest.py
XinchaoGou/MyLeetCode
bba0ab077374f7da2cb1a990266bc59fa7ddf23c
[ "MIT" ]
null
null
null
16. 3Sum Closest.py
XinchaoGou/MyLeetCode
bba0ab077374f7da2cb1a990266bc59fa7ddf23c
[ "MIT" ]
null
null
null
16. 3Sum Closest.py
XinchaoGou/MyLeetCode
bba0ab077374f7da2cb1a990266bc59fa7ddf23c
[ "MIT" ]
null
null
null
from typing import List
36.439024
98
0.436412
from typing import List class Solution: def threeSumClosest(self, nums: List[int], target: int) -> int: nums.sort() length = len(nums) resSum3 = float("inf") res = 0 for p1 in range(length): p3 = length - 1 for p2 in range(p1+1, length): ...
1,386
-12
97
7e88360483551114fdce570e13880bcbf47a3724
5,775
py
Python
Optic/WrapperBl2Seq.py
CGATOxford/Optic
2df92e953b5139ff4e5c383cb4383e6367cd47f1
[ "MIT" ]
null
null
null
Optic/WrapperBl2Seq.py
CGATOxford/Optic
2df92e953b5139ff4e5c383cb4383e6367cd47f1
[ "MIT" ]
null
null
null
Optic/WrapperBl2Seq.py
CGATOxford/Optic
2df92e953b5139ff4e5c383cb4383e6367cd47f1
[ "MIT" ]
1
2020-03-31T22:55:50.000Z
2020-03-31T22:55:50.000Z
########################################################################## # # MRC FGU Computational Genomics Group # # $Id$ # # Copyright (C) 2009 Andreas Heger # # 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 ...
29.020101
110
0.571602
########################################################################## # # MRC FGU Computational Genomics Group # # $Id$ # # Copyright (C) 2009 Andreas Heger # # 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 ...
1,489
1,103
46
13088a8ac517f64c48d773cb8a5a92fb091eb78b
1,728
py
Python
src/prefect/cli/__init__.py
jamestwebber/prefect
410c4ac37d2595ab61007742883687f5e284821d
[ "Apache-2.0" ]
null
null
null
src/prefect/cli/__init__.py
jamestwebber/prefect
410c4ac37d2595ab61007742883687f5e284821d
[ "Apache-2.0" ]
null
null
null
src/prefect/cli/__init__.py
jamestwebber/prefect
410c4ac37d2595ab61007742883687f5e284821d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import click import json import logging import os import requests import sys import prefect @click.group() def cli(): """ The Prefect CLI """ pass @cli.command() def make_user_config(): """ Generates a user configuration file """ user_config_path = prefect.con...
25.791045
80
0.696759
#!/usr/bin/env python import click import json import logging import os import requests import sys import prefect @click.group() def cli(): """ The Prefect CLI """ pass @cli.command() def make_user_config(): """ Generates a user configuration file """ user_config_path = prefect.con...
0
0
0
159bef3318bfb6c684b7d77703c8e85be28688b9
411
py
Python
year2019/python/day1/day1.py
3schwartz/AdventOfCode
32f259c4e20c3c4834718411f1053b6a11f71c86
[ "MIT" ]
null
null
null
year2019/python/day1/day1.py
3schwartz/AdventOfCode
32f259c4e20c3c4834718411f1053b6a11f71c86
[ "MIT" ]
null
null
null
year2019/python/day1/day1.py
3schwartz/AdventOfCode
32f259c4e20c3c4834718411f1053b6a11f71c86
[ "MIT" ]
null
null
null
from day1_func import get_fuel lines = open('../../data/day1_data.txt').read().strip().split('\n') fuels = [get_fuel(int(line)) for line in lines] print(f'Part 1: {sum(fuels)}') total_sum = 0 for line in lines: last_value = int(line) while True: last_value = get_fuel(last_value) if last_val...
19.571429
67
0.620438
from day1_func import get_fuel lines = open('../../data/day1_data.txt').read().strip().split('\n') fuels = [get_fuel(int(line)) for line in lines] print(f'Part 1: {sum(fuels)}') total_sum = 0 for line in lines: last_value = int(line) while True: last_value = get_fuel(last_value) if last_val...
0
0
0
f1d40cad2f2fbe51cb27d3a15929184262878d47
518
py
Python
postgis_helpers/__init__.py
aaronfraint/postgis-helpers
99f4f9ae50c1197fe6d2d0fe42884c06d2c3589c
[ "MIT" ]
1
2021-02-25T21:52:24.000Z
2021-02-25T21:52:24.000Z
postgis_helpers/__init__.py
aaronfraint/postgis-helpers
99f4f9ae50c1197fe6d2d0fe42884c06d2c3589c
[ "MIT" ]
null
null
null
postgis_helpers/__init__.py
aaronfraint/postgis-helpers
99f4f9ae50c1197fe6d2d0fe42884c06d2c3589c
[ "MIT" ]
1
2021-02-26T00:33:29.000Z
2021-02-26T00:33:29.000Z
from .PgSQL import PostgreSQL from .config_helpers import make_config_file, read_config_file, configurations from .geopandas_helpers import spatialize_point_dataframe from .raw_data import DataSource from .console import _console __VERSION__ = "0.2.2" # _console.print(":globe_showing_americas:", justify="left") # _c...
37
78
0.797297
from .PgSQL import PostgreSQL from .config_helpers import make_config_file, read_config_file, configurations from .geopandas_helpers import spatialize_point_dataframe from .raw_data import DataSource from .console import _console __VERSION__ = "0.2.2" # _console.print(":globe_showing_americas:", justify="left") # _c...
0
0
0
35abc541d0d7ce086f795d6703dfd297577c9cb7
424
py
Python
client/delivery/urls.py
daniel-waruo/e-commerse-api
6b080039398fb4099a34335317d649dd67783f63
[ "Apache-2.0" ]
6
2019-11-21T10:09:49.000Z
2021-06-19T09:52:59.000Z
client/delivery/urls.py
daniel-waruo/e-commerse-api
6b080039398fb4099a34335317d649dd67783f63
[ "Apache-2.0" ]
null
null
null
client/delivery/urls.py
daniel-waruo/e-commerse-api
6b080039398fb4099a34335317d649dd67783f63
[ "Apache-2.0" ]
null
null
null
from django.urls import path from .views import CreateDeliveryInfo, DeliveryInfoApi, ListDeliveryInfo app_name = 'delivery' urlpatterns = [ path('delivery-information/add', CreateDeliveryInfo.as_view(), name='add_delivery_info'), path('delivery-information/<int:pk>', DeliveryInfoApi.as_view(), name='delivery...
35.333333
93
0.768868
from django.urls import path from .views import CreateDeliveryInfo, DeliveryInfoApi, ListDeliveryInfo app_name = 'delivery' urlpatterns = [ path('delivery-information/add', CreateDeliveryInfo.as_view(), name='add_delivery_info'), path('delivery-information/<int:pk>', DeliveryInfoApi.as_view(), name='delivery...
0
0
0
976b5d264ccc2ded21f52e33be4c2ab378f4c30d
2,709
py
Python
python/day11/day11.py
secworks/advent_of_code_2020
b90e4e1d27c1e4b597a08cac8ff13e63686769f2
[ "BSD-2-Clause" ]
null
null
null
python/day11/day11.py
secworks/advent_of_code_2020
b90e4e1d27c1e4b597a08cac8ff13e63686769f2
[ "BSD-2-Clause" ]
null
null
null
python/day11/day11.py
secworks/advent_of_code_2020
b90e4e1d27c1e4b597a08cac8ff13e63686769f2
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #======================================================================= # # day11.py # ------- # Solutions to Advent of Code 2020, day 11. # https://adventofcode.com/2020/day/11 # #======================================================================= import sys #----...
27.927835
72
0.298265
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #======================================================================= # # day11.py # ------- # Solutions to Advent of Code 2020, day 11. # https://adventofcode.com/2020/day/11 # #======================================================================= import sys #----...
908
0
132
7eb7e67de869f3bb153180f2431ce5d9de6c4ecb
389
py
Python
tests/edgestats_test.py
devjack/edgestats
d668cfdc4a6962c0f02a76916fc58d43605d46b2
[ "MIT" ]
null
null
null
tests/edgestats_test.py
devjack/edgestats
d668cfdc4a6962c0f02a76916fc58d43605d46b2
[ "MIT" ]
null
null
null
tests/edgestats_test.py
devjack/edgestats
d668cfdc4a6962c0f02a76916fc58d43605d46b2
[ "MIT" ]
null
null
null
import unittest import gzip from edgestats import EdgeStats if __name__ == '__main__': unittest.main()
27.785714
69
0.699229
import unittest import gzip from edgestats import EdgeStats class EdgestatsTest(unittest.TestCase): def test_can_parse_log_file(self): with gzip.open('tests/data/simple_unzip_test.gz', 'rb') as f: file_content = f.read() expected = b"Simple gzipped string\n" self.assertEqual(exp...
214
18
49
73dd5e51df3dee9bc1040211fdb75399402c8941
15,096
py
Python
sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/models/_service_fabric_managed_clusters_management_client_enums.py
dubiety/azure-sdk-for-python
62ffa839f5d753594cf0fe63668f454a9d87a346
[ "MIT" ]
1
2022-02-01T18:50:12.000Z
2022-02-01T18:50:12.000Z
sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/models/_service_fabric_managed_clusters_management_client_enums.py
ellhe-blaster/azure-sdk-for-python
82193ba5e81cc5e5e5a5239bba58abe62e86f469
[ "MIT" ]
null
null
null
sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/models/_service_fabric_managed_clusters_management_client_enums.py
ellhe-blaster/azure-sdk-for-python
82193ba5e81cc5e5e5a5239bba58abe62e86f469
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
42.285714
102
0.72602
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
0
95
23
0f8896b2d56b1d6c742f1e75296d6e1c654c2549
10,751
py
Python
solarforecastarbiter/io/reference_observations/srml.py
wholmgren/solarforecastarbiter-core
e692c7e142f24c0253e4288a6ac760e10ba41dbd
[ "Apache-2.0", "MIT" ]
null
null
null
solarforecastarbiter/io/reference_observations/srml.py
wholmgren/solarforecastarbiter-core
e692c7e142f24c0253e4288a6ac760e10ba41dbd
[ "Apache-2.0", "MIT" ]
null
null
null
solarforecastarbiter/io/reference_observations/srml.py
wholmgren/solarforecastarbiter-core
e692c7e142f24c0253e4288a6ac760e10ba41dbd
[ "Apache-2.0", "MIT" ]
null
null
null
import logging import json from urllib import error from pkg_resources import resource_filename, Requirement import pandas as pd from pvlib import iotools from requests.exceptions import HTTPError from solarforecastarbiter.datamodel import Observation, SolarPowerPlant from solarforecastarbiter.io.reference_observat...
36.692833
80
0.646172
import logging import json from urllib import error from pkg_resources import resource_filename, Requirement import pandas as pd from pvlib import iotools from requests.exceptions import HTTPError from solarforecastarbiter.datamodel import Observation, SolarPowerPlant from solarforecastarbiter.io.reference_observat...
0
0
0
23ff69637f82addae0325c842c00f5a222080a6a
2,369
py
Python
tests/test_estimators.py
astrojose9/fulmar
62a79fb9b7ab01e5b7b3acadaca8e4f0db0e0e2f
[ "MIT" ]
null
null
null
tests/test_estimators.py
astrojose9/fulmar
62a79fb9b7ab01e5b7b3acadaca8e4f0db0e0e2f
[ "MIT" ]
null
null
null
tests/test_estimators.py
astrojose9/fulmar
62a79fb9b7ab01e5b7b3acadaca8e4f0db0e0e2f
[ "MIT" ]
null
null
null
import os import sys # sys.path.insert(0, os.path.abspath('/home/jrodrigues/Documents/PhD/fulmar')) from fulmar.estimators import ( estimate_planet_mass, estimate_semi_amplitude ) from fulmar.utils import ( FulmarWarning ) import astropy.units as u import numpy as np import numpy.testing as npt from astro...
36.446154
82
0.699451
import os import sys # sys.path.insert(0, os.path.abspath('/home/jrodrigues/Documents/PhD/fulmar')) from fulmar.estimators import ( estimate_planet_mass, estimate_semi_amplitude ) from fulmar.utils import ( FulmarWarning ) import astropy.units as u import numpy as np import numpy.testing as npt from astro...
0
0
0
745adf17e78917104f0f56ad44e17b5a7a1b9a7e
25,642
py
Python
rwb/images/__init__.py
boakley/robotframework-workbench
92f15845d6fa4baedd4f3c4346fb8ff5cf9149a6
[ "Apache-2.0" ]
11
2015-03-09T01:53:21.000Z
2021-03-29T08:33:05.000Z
rwb/images/__init__.py
boakley/robotframework-workbench
92f15845d6fa4baedd4f3c4346fb8ff5cf9149a6
[ "Apache-2.0" ]
1
2016-08-24T06:20:11.000Z
2016-08-24T06:20:11.000Z
rwb/images/__init__.py
boakley/robotframework-workbench
92f15845d6fa4baedd4f3c4346fb8ff5cf9149a6
[ "Apache-2.0" ]
5
2016-03-03T15:27:09.000Z
2019-03-26T13:05:32.000Z
''' This data was automatically generated by script img2data.py. These images are part of the FAMFAMFAM silk icons set which is provided under a creative commons license. For more information see http://www.famfamfam.com/lab/icons/silk/ ''' data = { 'cancel': ''' R0lGODlhEAAQAPcAAAAAAAAAMwAAZgA...
61.198091
73
0.77338
''' This data was automatically generated by script img2data.py. These images are part of the FAMFAMFAM silk icons set which is provided under a creative commons license. For more information see http://www.famfamfam.com/lab/icons/silk/ ''' data = { 'cancel': ''' R0lGODlhEAAQAPcAAAAAAAAAMwAAZgA...
0
0
0
28a6cd67583aaea23b8d40e9061ec596cdb2ce3c
34,063
py
Python
chapisha/create/create.py
whythawk/chapisha
ddaa028a48d10ff5396e18d1c0ae01fd56c9f465
[ "BSD-3-Clause" ]
2
2021-05-29T12:56:05.000Z
2021-10-31T04:56:32.000Z
chapisha/create/create.py
whythawk/chapisha
ddaa028a48d10ff5396e18d1c0ae01fd56c9f465
[ "BSD-3-Clause" ]
1
2021-01-29T13:12:28.000Z
2021-01-30T16:14:04.000Z
chapisha/create/create.py
whythawk/chapisha
ddaa028a48d10ff5396e18d1c0ae01fd56c9f465
[ "BSD-3-Clause" ]
null
null
null
""" .. module:: create :synopsis: Import a Word `docx` document, define its metadata, cover and rights, and publish it as an EPUB3. .. moduleauthor:: Gavin Chait <github.com/turukawa> CreateWork ========== Publish a standards compliant EPUB3 creative work from a source Microsoft Word `docx` document, and define it...
46.661644
551
0.648622
""" .. module:: create :synopsis: Import a Word `docx` document, define its metadata, cover and rights, and publish it as an EPUB3. .. moduleauthor:: Gavin Chait <github.com/turukawa> CreateWork ========== Publish a standards compliant EPUB3 creative work from a source Microsoft Word `docx` document, and define it...
0
0
0
f014873bcb18c5403755ad32e29f145b9b136a1d
3,167
py
Python
test/test_tarrecords.py
NVlabs/dlinputs
fbce290b7b8c5f3b00e9197c55a13b0a5a0f7953
[ "BSD-3-Clause" ]
38
2017-10-18T05:44:25.000Z
2021-06-20T02:14:13.000Z
test/test_tarrecords.py
NVlabs/dlinputs
fbce290b7b8c5f3b00e9197c55a13b0a5a0f7953
[ "BSD-3-Clause" ]
1
2017-12-07T20:14:18.000Z
2018-05-07T01:00:34.000Z
test/test_tarrecords.py
NVlabs/dlinputs
fbce290b7b8c5f3b00e9197c55a13b0a5a0f7953
[ "BSD-3-Clause" ]
10
2018-01-07T15:19:17.000Z
2020-12-01T20:42:37.000Z
from __future__ import unicode_literals import glob import pdb from builtins import range from imp import reload from io import open import numpy as np from dlinputs import tarrecords reload(tarrecords) # get_ipython().system(u'tar -ztvf testdata/imagenet-000000.tgz | sed 7q') # get_ipython().system(u'tar xvf tes...
31.989899
79
0.641932
from __future__ import unicode_literals import glob import pdb from builtins import range from imp import reload from io import open import numpy as np from dlinputs import tarrecords reload(tarrecords) def test_tardata(): stream = open("testdata/imagenet-000000.tgz", mode='rb') data = tarrecords.tardata(s...
2,631
0
138
6a64971723ab828855f7055bd04df9ded8f9d292
54,054
py
Python
tests/unit/fake_data_root/vault/var/lib/juju/agents/unit-vault-hacluster-0/charm/hooks/utils.py
KellenRenshaw/hotsos
e3fc51ab7f8af606a5846a3486a7fda23d761583
[ "Apache-2.0" ]
17
2016-07-07T23:39:17.000Z
2020-05-06T14:03:54.000Z
tests/unit/fake_data_root/vault/var/lib/juju/agents/unit-vault-hacluster-0/charm/hooks/utils.py
KellenRenshaw/hotsos
e3fc51ab7f8af606a5846a3486a7fda23d761583
[ "Apache-2.0" ]
111
2021-10-01T18:18:17.000Z
2022-03-29T12:23:20.000Z
tests/unit/fake_data_root/vault/var/lib/juju/agents/unit-vault-hacluster-0/charm/hooks/utils.py
KellenRenshaw/hotsos
e3fc51ab7f8af606a5846a3486a7fda23d761583
[ "Apache-2.0" ]
20
2016-11-03T04:04:09.000Z
2021-01-04T20:40:43.000Z
#!/usr/bin/python # # Copyright 2016 Canonical Ltd # # 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 agr...
33.161963
79
0.643024
#!/usr/bin/python # # Copyright 2016 Canonical Ltd # # 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 agr...
12,041
80
724
dc846139a64da96893d81c6eddfca55ea20f7f1e
70,433
py
Python
autots/evaluator/auto_model.py
nsankar/AutoTS
b4167e1506e1ccb41a85dad1be481a646d808583
[ "MIT" ]
null
null
null
autots/evaluator/auto_model.py
nsankar/AutoTS
b4167e1506e1ccb41a85dad1be481a646d808583
[ "MIT" ]
null
null
null
autots/evaluator/auto_model.py
nsankar/AutoTS
b4167e1506e1ccb41a85dad1be481a646d808583
[ "MIT" ]
null
null
null
"""Mid-level helper functions for AutoTS.""" import numpy as np import pandas as pd import datetime import json from hashlib import md5 from autots.evaluator.metrics import PredictionEval from autots.tools.transform import RandomTransform def seasonal_int(include_one: bool = False): """Generate a random integer o...
37.907966
181
0.582397
"""Mid-level helper functions for AutoTS.""" import numpy as np import pandas as pd import datetime import json from hashlib import md5 from autots.evaluator.metrics import PredictionEval from autots.tools.transform import RandomTransform def seasonal_int(include_one: bool = False): """Generate a random integer o...
3,116
0
104
b6fd8e198c7dfa420a6d4c45a470a2d144bb9ee4
1,025
py
Python
aoc2020/day12/day12_part2.py
GetPastTheMonkey/advent-of-code
db80be6d87baba4d5315cc69276905c55762da86
[ "MIT" ]
1
2019-09-15T16:37:24.000Z
2019-09-15T16:37:24.000Z
aoc2020/day12/day12_part2.py
GetPastTheMonkey/advent-of-code
db80be6d87baba4d5315cc69276905c55762da86
[ "MIT" ]
null
null
null
aoc2020/day12/day12_part2.py
GetPastTheMonkey/advent-of-code
db80be6d87baba4d5315cc69276905c55762da86
[ "MIT" ]
null
null
null
from utils import get_input_lines pos_x = 0 pos_y = 0 waypoint_x = 10 waypoint_y = 1 for line in get_input_lines(__file__): action = line[0] n = int(line[1:]) # Handle actions if action == "N": waypoint_y += n elif action == "S": waypoint_y -= n elif action == "E": wa...
25
68
0.537561
from utils import get_input_lines pos_x = 0 pos_y = 0 waypoint_x = 10 waypoint_y = 1 for line in get_input_lines(__file__): action = line[0] n = int(line[1:]) # Handle actions if action == "N": waypoint_y += n elif action == "S": waypoint_y -= n elif action == "E": wa...
0
0
0
2326b0fce7d21d579893e74d3e91c5354e98cf2f
282
py
Python
src/year2019/day13a.py
lancelote/advent_of_code
06dda6ca034bc1e86addee7798bb9b2a34ff565b
[ "Unlicense" ]
10
2017-12-11T17:54:52.000Z
2021-12-09T20:16:30.000Z
src/year2019/day13a.py
lancelote/advent_of_code
06dda6ca034bc1e86addee7798bb9b2a34ff565b
[ "Unlicense" ]
260
2015-12-09T11:03:03.000Z
2021-12-12T14:32:23.000Z
src/year2019/day13a.py
lancelote/advent_of_code
06dda6ca034bc1e86addee7798bb9b2a34ff565b
[ "Unlicense" ]
null
null
null
"""2019 - Day 13 Part 1: Care Package.""" from src.year2019.intcode import Computer def solve(task: str) -> int: """Count the number of blocks.""" computer = Computer() computer.load_program(task) computer.execute() return list(computer.stdout)[2::3].count(2)
25.636364
47
0.666667
"""2019 - Day 13 Part 1: Care Package.""" from src.year2019.intcode import Computer def solve(task: str) -> int: """Count the number of blocks.""" computer = Computer() computer.load_program(task) computer.execute() return list(computer.stdout)[2::3].count(2)
0
0
0
6af6580ccb03ce18151efe09dbeb559263c69624
1,816
py
Python
examples/fontforge-old/demoAddToMenu.py
simoncozens/pysilfont
bb8a9fc58a83e074bbcc466ba058841845b9107e
[ "MIT" ]
41
2015-05-21T21:12:26.000Z
2022-02-17T17:23:14.000Z
examples/fontforge-old/demoAddToMenu.py
simoncozens/pysilfont
bb8a9fc58a83e074bbcc466ba058841845b9107e
[ "MIT" ]
63
2015-05-15T10:25:55.000Z
2021-02-23T04:51:17.000Z
examples/fontforge-old/demoAddToMenu.py
simoncozens/pysilfont
bb8a9fc58a83e074bbcc466ba058841845b9107e
[ "MIT" ]
12
2015-06-12T11:52:08.000Z
2020-09-23T10:40:59.000Z
#!/usr/bin/env python 'FontForge: Demo script to add menu items to FF tools menu' __url__ = 'http://github.com/silnrsi/pysilfont' __copyright__ = 'Copyright (c) 2014 SIL International (http://www.sil.org)' __license__ = 'Released under the MIT License (http://opensource.org/licenses/MIT)' __author__ = 'David Raymond' ...
46.564103
102
0.785793
#!/usr/bin/env python 'FontForge: Demo script to add menu items to FF tools menu' __url__ = 'http://github.com/silnrsi/pysilfont' __copyright__ = 'Copyright (c) 2014 SIL International (http://www.sil.org)' __license__ = 'Released under the MIT License (http://opensource.org/licenses/MIT)' __author__ = 'David Raymond' ...
94
0
23
46615d419dda76960016bd1ad4896644e6b356d7
29,475
py
Python
tensor2struct/utils/tree_kernels.py
chenyangh/tensor2struct-public
d3257cba6d76d3c658a58a78f687d986bdc755cf
[ "MIT" ]
69
2021-04-14T06:35:07.000Z
2022-03-31T18:35:05.000Z
tensor2struct/utils/tree_kernels.py
chenyangh/tensor2struct-public
d3257cba6d76d3c658a58a78f687d986bdc755cf
[ "MIT" ]
11
2021-04-16T11:16:04.000Z
2022-03-22T21:21:29.000Z
tensor2struct/utils/tree_kernels.py
chenyangh/tensor2struct-public
d3257cba6d76d3c658a58a78f687d986bdc755cf
[ "MIT" ]
18
2021-04-14T07:19:56.000Z
2022-03-23T19:26:18.000Z
import math from copy import deepcopy from tensor2struct.utils import tree # Common routines for kernel functions #### # An extremely simple cache
41.927454
145
0.397116
import math from copy import deepcopy from tensor2struct.utils import tree class Kernel: # Common routines for kernel functions def kernel(self, a, b): # compute the tree kernel on the trees a and b if not isinstance(a, tree.Tree): print("ERROR: first parameter has to be a Tree Ob...
28,093
14
1,202
332475d0ce0bb3d099c2199a8d805fa2ce7c35ea
3,005
py
Python
backend/src/board/views/api/v1/telegram.py
baealex/Medium-Clone-in-Django
1f388ca9d75c05ce3100dfb7ad58ef751c964d19
[ "MIT" ]
null
null
null
backend/src/board/views/api/v1/telegram.py
baealex/Medium-Clone-in-Django
1f388ca9d75c05ce3100dfb7ad58ef751c964d19
[ "MIT" ]
null
null
null
backend/src/board/views/api/v1/telegram.py
baealex/Medium-Clone-in-Django
1f388ca9d75c05ce3100dfb7ad58ef751c964d19
[ "MIT" ]
null
null
null
import json from django.conf import settings from django.http import Http404 from django.utils import timezone from PIL import Image, ImageFilter from board.models import TelegramSync from board.modules.response import StatusDone, StatusError from modules.subtask import sub_task_manager from modules.telegram import T...
41.164384
125
0.560067
import json from django.conf import settings from django.http import Http404 from django.utils import timezone from PIL import Image, ImageFilter from board.models import TelegramSync from board.modules.response import StatusDone, StatusError from modules.subtask import sub_task_manager from modules.telegram import T...
2,745
0
23
162b83394afde2c91cf06578b6a90603be379765
469
py
Python
Question_nlp/answers/onehot.py
skn047/DeepLearningMugenKnock
73d2b903816b380d56020c8336041883bc0d131c
[ "MIT" ]
10
2021-12-17T06:07:25.000Z
2022-03-25T13:50:05.000Z
Question_nlp/answers/onehot.py
skn047/DeepLearningMugenKnock
73d2b903816b380d56020c8336041883bc0d131c
[ "MIT" ]
null
null
null
Question_nlp/answers/onehot.py
skn047/DeepLearningMugenKnock
73d2b903816b380d56020c8336041883bc0d131c
[ "MIT" ]
2
2022-03-15T02:42:09.000Z
2022-03-30T23:19:55.000Z
_chars = "あいうおえかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわをんがぎぐげござじずぜぞだぢづでどばびぶべぼぱぴぷぺぽぁぃぅぇぉゃゅょっー1234567890!?、。" chars = [c for c in _chars] print(data_load())
23.45
106
0.556503
_chars = "あいうおえかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわをんがぎぐげござじずぜぞだぢづでどばびぶべぼぱぴぷぺぽぁぃぅぇぉゃゅょっー1234567890!?、。" chars = [c for c in _chars] def data_load(): fname = 'sandwitchman.txt' xs = [] with open(fname, 'r') as f: for l in f.readlines(): l = l.strip() for c in l: ...
291
0
23
12774b82ae587f55749e4d546d6743b03cdf3463
590
py
Python
problems/593.Valid_Square/li.py
subramp-prep/leetcode
d125201d9021ab9b1eea5e5393c2db4edd84e740
[ "Unlicense" ]
null
null
null
problems/593.Valid_Square/li.py
subramp-prep/leetcode
d125201d9021ab9b1eea5e5393c2db4edd84e740
[ "Unlicense" ]
null
null
null
problems/593.Valid_Square/li.py
subramp-prep/leetcode
d125201d9021ab9b1eea5e5393c2db4edd84e740
[ "Unlicense" ]
null
null
null
# coding=utf-8 # Author: Jianghan LI # Question: 593.Valid_Square # Date: 2017-05-22
26.818182
137
0.477966
# coding=utf-8 # Author: Jianghan LI # Question: 593.Valid_Square # Date: 2017-05-22 class Solution(object): def validSquare(self, p1, p2, p3, p4): """ :type p1: List[int] :type p2: List[int] :type p3: List[int] :type p4: List[int] :rtype: bool """ ...
138
343
23
f1f4c0e148288296136b5caf6748c31645cc02a9
769
py
Python
Tuples and Sets - Exercise/07. Battle of Names.py
B3WD/python_advanced
477b2eac41f1ec5a172d612afda1096a9d7fb2f5
[ "MIT" ]
1
2020-10-28T07:52:17.000Z
2020-10-28T07:52:17.000Z
Tuples and Sets - Exercise/07. Battle of Names.py
B3WD/python_advanced_softuni
477b2eac41f1ec5a172d612afda1096a9d7fb2f5
[ "MIT" ]
null
null
null
Tuples and Sets - Exercise/07. Battle of Names.py
B3WD/python_advanced_softuni
477b2eac41f1ec5a172d612afda1096a9d7fb2f5
[ "MIT" ]
null
null
null
lines_count = int(input()) lines = [input() for _ in range(lines_count)] solve(lines)
27.464286
62
0.587776
def solve(liens): results_odd = set() results_even = set() for i, name in enumerate(lines): ascii_sum = 0 for char in name: ascii_sum += ord(char) result = int(ascii_sum / (i + 1)) if result % 2 != 0: results_odd.add(result) else: r...
658
0
22
bc177fd76c0ff5e5ec9943fd6750ff2dfe5cb200
3,707
py
Python
sdk/python/touca/_printer.py
trytouca/trytouca
eae38a96407d1ecac543c5a5fb05cbbe632ddfca
[ "Apache-2.0" ]
6
2022-03-19T02:57:11.000Z
2022-03-31T16:34:34.000Z
sdk/python/touca/_printer.py
trytouca/trytouca
eae38a96407d1ecac543c5a5fb05cbbe632ddfca
[ "Apache-2.0" ]
null
null
null
sdk/python/touca/_printer.py
trytouca/trytouca
eae38a96407d1ecac543c5a5fb05cbbe632ddfca
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Touca, Inc. Subject to Apache-2.0 License. import math from pathlib import Path from colorama import Style, Fore, Back, init init()
34.971698
88
0.534394
# Copyright 2021 Touca, Inc. Subject to Apache-2.0 License. import math from pathlib import Path from colorama import Style, Fore, Back, init init() class Printer: def print_warning(fmt: str, *args, **kwargs): print(f"{Fore.YELLOW}{fmt.format(*args, **kwargs)}{Fore.RESET}") def print_error(fmt: str...
3,299
-7
265
55dadc90c2f9fdbe258867ab069d2c73b2196055
394
py
Python
siphon/__init__.py
DanielWatkins/siphon
4c6740c2f8030ec1a23cafd8b8b9713dcd382cb2
[ "BSD-3-Clause" ]
1
2019-05-31T14:02:08.000Z
2019-05-31T14:02:08.000Z
siphon/__init__.py
DanielWatkins/siphon
4c6740c2f8030ec1a23cafd8b8b9713dcd382cb2
[ "BSD-3-Clause" ]
147
2021-03-06T01:01:13.000Z
2022-03-30T22:18:18.000Z
siphon/__init__.py
DanielWatkins/siphon
4c6740c2f8030ec1a23cafd8b8b9713dcd382cb2
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2013-2015 Siphon Contributors. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Tools for accessing atmospheric and oceanic science data on remote servers.""" # Version import needs to come first so everyone else can pull on import from ._version imp...
39.4
81
0.786802
# Copyright (c) 2013-2015 Siphon Contributors. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Tools for accessing atmospheric and oceanic science data on remote servers.""" # Version import needs to come first so everyone else can pull on import from ._version imp...
0
0
0
d33d5c69746ae0b6fef212b68e6a477d56434fb5
88
py
Python
Python/B2025.py
Epoch1017/LintCode-Shared-Solutions
d1559ef96917c4255e1ce2cf25ef17edec596ac3
[ "CC0-1.0" ]
null
null
null
Python/B2025.py
Epoch1017/LintCode-Shared-Solutions
d1559ef96917c4255e1ce2cf25ef17edec596ac3
[ "CC0-1.0" ]
null
null
null
Python/B2025.py
Epoch1017/LintCode-Shared-Solutions
d1559ef96917c4255e1ce2cf25ef17edec596ac3
[ "CC0-1.0" ]
null
null
null
# B2025-输出字符菱形 print(" *") print(" ***") print("*****") print(" ***") print(" *")
14.666667
15
0.409091
# B2025-输出字符菱形 print(" *") print(" ***") print("*****") print(" ***") print(" *")
0
0
0
5fe8ca8ff1e4826dd6cfd6ad23878adf5707eed5
3,733
py
Python
brilhack/basic_blocks.py
yati-sagade/brilhack
700e95dc5f5ba7f156ac405d0339dd03bd0de021
[ "MIT" ]
null
null
null
brilhack/basic_blocks.py
yati-sagade/brilhack
700e95dc5f5ba7f156ac405d0339dd03bd0de021
[ "MIT" ]
null
null
null
brilhack/basic_blocks.py
yati-sagade/brilhack
700e95dc5f5ba7f156ac405d0339dd03bd0de021
[ "MIT" ]
null
null
null
import copy from .util import is_terminator, is_label, mklabel
31.905983
86
0.554246
import copy from .util import is_terminator, is_label, mklabel def _make_blocks(instrs): blocks = [] label_index = {} curr_block = [] for instr in instrs: if not is_label(instr): curr_block.append(instr) if is_label(instr) or is_terminator(instr): if curr_blo...
2,760
760
145
73ac7853a328732454c3edf704f71354323b832f
1,215
py
Python
tests/pages/rollups.py
uk-gov-mirror/alphagov.notifications-functional-tests
899032ff637161c1ab8d058555cb0326ec04b1be
[ "MIT" ]
null
null
null
tests/pages/rollups.py
uk-gov-mirror/alphagov.notifications-functional-tests
899032ff637161c1ab8d058555cb0326ec04b1be
[ "MIT" ]
null
null
null
tests/pages/rollups.py
uk-gov-mirror/alphagov.notifications-functional-tests
899032ff637161c1ab8d058555cb0326ec04b1be
[ "MIT" ]
null
null
null
from config import config from tests.pages import SignInPage from tests.test_utils import do_verify, do_email_auth_verify
34.714286
102
0.723457
from config import config from tests.pages import SignInPage from tests.test_utils import do_verify, do_email_auth_verify def sign_in(driver, seeded=False): _sign_in(driver, 'seeded' if seeded else 'normal') do_verify(driver) def sign_in_email_auth(driver): _sign_in(driver, 'email_auth') assert dri...
996
0
92
6adbb154ad2791f017881d82ab4f304608aa3b72
21,792
py
Python
rave/filesystem.py
rave-engine/rave
0eeb956363f4d7eda92350775d7d386550361273
[ "BSD-2-Clause" ]
5
2015-03-18T01:19:56.000Z
2020-10-23T12:44:47.000Z
rave/filesystem.py
rave-engine/rave
0eeb956363f4d7eda92350775d7d386550361273
[ "BSD-2-Clause" ]
null
null
null
rave/filesystem.py
rave-engine/rave
0eeb956363f4d7eda92350775d7d386550361273
[ "BSD-2-Clause" ]
null
null
null
# rave's virtual file system. import os import io import re import threading import collections import rave.common import rave.log _log = rave.log.get(__name__) # Canonical path separator. PATH_SEPARATOR = '/' # Root. ROOT = '/' # Unnormalized path pattern. BAD_PATH_PATTERN = re.compile(r'(?:{0}{{2,}}|(?:{0}|^)\.+(...
36.686869
149
0.62321
# rave's virtual file system. import os import io import re import threading import collections import rave.common import rave.log _log = rave.log.get(__name__) # Canonical path separator. PATH_SEPARATOR = '/' # Root. ROOT = '/' # Unnormalized path pattern. BAD_PATH_PATTERN = re.compile(r'(?:{0}{{2,}}|(?:{0}|^)\.+(...
2,375
16,110
880
dbf0337be9f2b428ff1ae5f70ee820bc2aaa584f
802
py
Python
geogebra_applet/views.py
Stasianna/geogebra-project
33ddf30ec8b001f86fb35d336b8d53bcdf69231b
[ "MIT" ]
null
null
null
geogebra_applet/views.py
Stasianna/geogebra-project
33ddf30ec8b001f86fb35d336b8d53bcdf69231b
[ "MIT" ]
null
null
null
geogebra_applet/views.py
Stasianna/geogebra-project
33ddf30ec8b001f86fb35d336b8d53bcdf69231b
[ "MIT" ]
null
null
null
#from django.http import HttpResponse #from django.http import response_redirect from django.shortcuts import render_to_response from django.views.generic import DetailView, CreateView, TemplateView from geogebra_applet.models import GeogebraApplet
32.08
70
0.77182
#from django.http import HttpResponse #from django.http import response_redirect from django.shortcuts import render_to_response from django.views.generic import DetailView, CreateView, TemplateView from geogebra_applet.models import GeogebraApplet class GeogebraAppletDetailView(DetailView): model = GeogebraAppl...
341
140
69
637cd14234add4d98a4167907d1629a8dc3593e3
6,036
py
Python
test/test_diff_tar.py
gmertes/conda-mirror
34b206e19d8c858676ce2b707da15165578e6f79
[ "BSD-3-Clause" ]
6
2020-10-09T15:55:57.000Z
2021-07-29T11:08:10.000Z
test/test_diff_tar.py
gmertes/conda-mirror
34b206e19d8c858676ce2b707da15165578e6f79
[ "BSD-3-Clause" ]
34
2020-09-05T05:08:16.000Z
2022-03-09T15:13:55.000Z
test/test_diff_tar.py
gmertes/conda-mirror
34b206e19d8c858676ce2b707da15165578e6f79
[ "BSD-3-Clause" ]
7
2020-09-07T09:45:59.000Z
2022-01-20T20:16:38.000Z
import os import sys import json import shutil import tempfile from os.path import isfile, join import pathlib import pytest import conda_mirror.diff_tar as dt EMPTY_MD5 = "d41d8cd98f00b204e9800998ecf8427e" @pytest.fixture
29.588235
88
0.680583
import os import sys import json import shutil import tempfile from os.path import isfile, join import pathlib import pytest import conda_mirror.diff_tar as dt EMPTY_MD5 = "d41d8cd98f00b204e9800998ecf8427e" @pytest.fixture def tmpdir(): tmpdir = tempfile.mkdtemp() dt.mirror_dir = join(tmpdir, "repo") ...
5,305
0
482
926b3d6413e556587b0edd606bb4824c907485dd
417
py
Python
app/core/migrations/0005_item_slug.py
Andika7/microservice-django
7c25635d7fe371a62f14d2e3b6685678354a0568
[ "MIT" ]
null
null
null
app/core/migrations/0005_item_slug.py
Andika7/microservice-django
7c25635d7fe371a62f14d2e3b6685678354a0568
[ "MIT" ]
null
null
null
app/core/migrations/0005_item_slug.py
Andika7/microservice-django
7c25635d7fe371a62f14d2e3b6685678354a0568
[ "MIT" ]
null
null
null
# Generated by Django 3.0.2 on 2020-02-05 10:54 from django.db import migrations, models
20.85
54
0.58753
# Generated by Django 3.0.2 on 2020-02-05 10:54 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0004_auto_20200205_1029'), ] operations = [ migrations.AddField( model_name='item', name='slug', ...
0
303
23
be8b6d00d6603fd9d2bfbc19d2ac5292cd519ac9
1,268
py
Python
src/views/CmdView/deactivate.py
mehsoy/jaws
b79723c1fc549741494ebf5d948e94a44e971f2a
[ "MIT" ]
1
2019-06-17T17:01:17.000Z
2019-06-17T17:01:17.000Z
src/views/CmdView/deactivate.py
mehsoy/jaws
b79723c1fc549741494ebf5d948e94a44e971f2a
[ "MIT" ]
7
2021-02-08T20:46:15.000Z
2021-09-08T02:12:59.000Z
src/views/CmdView/deactivate.py
mehsoy/jaws
b79723c1fc549741494ebf5d948e94a44e971f2a
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- import os from views.CmdView.tokenify import Tokenify from views.CmdView.command import Command
30.190476
77
0.576498
#!/usr/bin/python # -*- coding: utf-8 -*- import os from views.CmdView.tokenify import Tokenify from views.CmdView.command import Command class Deactivate(Command): def __init__(self, object, obj, id=None): super(Deactivate, self).__init__(obj) self.id = id self.object = object def e...
1,020
5
103
277cfc2eaf7d209975206be666ec892e87746c43
4,457
py
Python
datasets/utils.py
xdr940/cc
a98fe9b6c33c332a4c399f968032a90989c55672
[ "MIT" ]
null
null
null
datasets/utils.py
xdr940/cc
a98fe9b6c33c332a4c399f968032a90989c55672
[ "MIT" ]
1
2019-08-16T07:09:22.000Z
2019-09-04T04:59:51.000Z
datasets/utils.py
xdr940/cc
a98fe9b6c33c332a4c399f968032a90989c55672
[ "MIT" ]
1
2020-01-13T04:51:22.000Z
2020-01-13T04:51:22.000Z
import numpy as np from scipy.misc import imread import torch import random #这里跳帧 #增加跳帧功能 #跳帧且加载gt
30.319728
118
0.572582
import numpy as np from scipy.misc import imread import torch import random def load_depth(path,format='png'): if format=='npy': tgt_depth = np.expand_dims(np.load(path), axis=0) elif format=='png': tgt_depth =np.expand_dims( imread(path), axis=0) return torch.from_numpy(tgt_depth).float()...
4,378
0
112
6377ca21c65dacd8a4f10dd4484517d8cf1d99aa
6,665
py
Python
modules/datastructures/TrainData_deepCSV.py
dntaylor/DeepJet
249610b3b80543c8c84f5ba795bbb07c097f8150
[ "Apache-2.0" ]
1
2018-02-16T13:13:09.000Z
2018-02-16T13:13:09.000Z
modules/datastructures/TrainData_deepCSV.py
dntaylor/DeepJet
249610b3b80543c8c84f5ba795bbb07c097f8150
[ "Apache-2.0" ]
null
null
null
modules/datastructures/TrainData_deepCSV.py
dntaylor/DeepJet
249610b3b80543c8c84f5ba795bbb07c097f8150
[ "Apache-2.0" ]
5
2017-11-03T15:51:27.000Z
2019-05-29T14:45:23.000Z
''' Created on 21 Feb 2017 @author: jkiesele ''' from TrainDataDeepJet import TrainData_Flavour, TrainData_simpleTruth, TrainData_fullTruth, fileTimeOut import numpy as np class TrainData_deepCSV(TrainData_Flavour, TrainData_simpleTruth): ''' same as TrainData_deepCSV but with 4 truth labels: B BB C UDSG ...
35.452128
103
0.580045
''' Created on 21 Feb 2017 @author: jkiesele ''' from TrainDataDeepJet import TrainData_Flavour, TrainData_simpleTruth, TrainData_fullTruth, fileTimeOut import numpy as np class TrainData_deepCSV(TrainData_Flavour, TrainData_simpleTruth): ''' same as TrainData_deepCSV but with 4 truth labels: B BB C UDSG ...
2,537
0
54
589972506c18ceae6aaf9215a98021b547e17043
603
py
Python
src/clover/demo.py
gregjhansell97/leprechaun
d31e8d1a4b0a91aee2902602224c924b0b89fa06
[ "MIT" ]
null
null
null
src/clover/demo.py
gregjhansell97/leprechaun
d31e8d1a4b0a91aee2902602224c924b0b89fa06
[ "MIT" ]
null
null
null
src/clover/demo.py
gregjhansell97/leprechaun
d31e8d1a4b0a91aee2902602224c924b0b89fa06
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from clover.gui import CloverApp, Clock # may want to consider bounding speed app = CloverApp(title="leo-demo")
20.793103
55
0.633499
#!/usr/bin/env python # -*- coding: utf-8 -*- from clover.gui import CloverApp, Clock # may want to consider bounding speed app = CloverApp(title="leo-demo") def tick(time_interval): if app.world.gold is None or app.world.leo is None: return try: gold_x, gold_y = app.world.gold.loc ...
393
0
46
7c1efb98e5fd682a9bcfc00cec5517743f22f8a6
1,197
py
Python
flatiron-notebook/test/test_languages.py
IllumiDesk/flatiron-stacks
51ec24fefc35ccca0a1667ae20438db26a901d22
[ "MIT" ]
null
null
null
flatiron-notebook/test/test_languages.py
IllumiDesk/flatiron-stacks
51ec24fefc35ccca0a1667ae20438db26a901d22
[ "MIT" ]
2
2021-08-02T02:53:14.000Z
2021-11-05T18:08:18.000Z
flatiron-notebook/test/test_languages.py
IllumiDesk/flatiron-stacks
51ec24fefc35ccca0a1667ae20438db26a901d22
[ "MIT" ]
1
2020-10-21T16:08:46.000Z
2020-10-21T16:08:46.000Z
import docker from docker.errors import ContainerError import logging import pytest LOGGER = logging.getLogger(__name__) PYTHON_VERSION='3.9.5' NOTEBOOK_IMAGE_TAG=f'python-{PYTHON_VERSION}' @pytest.mark.parametrize( 'language,version_output', [ ('python', ['Python', '3.9.5\n']), ], ) def test...
29.925
113
0.70259
import docker from docker.errors import ContainerError import logging import pytest LOGGER = logging.getLogger(__name__) PYTHON_VERSION='3.9.5' NOTEBOOK_IMAGE_TAG=f'python-{PYTHON_VERSION}' @pytest.mark.parametrize( 'language,version_output', [ ('python', ['Python', '3.9.5\n']), ], ) def test...
0
0
0
39b66c96fbaf8cecf65a0efb079529756c9fb5ba
5,846
py
Python
bot.py
rivermont/orka
4719c3b758d85f9b340698b9b637af196a50cec2
[ "MIT" ]
1
2017-10-08T17:18:44.000Z
2017-10-08T17:18:44.000Z
bot.py
rivermont/orka
4719c3b758d85f9b340698b9b637af196a50cec2
[ "MIT" ]
null
null
null
bot.py
rivermont/orka
4719c3b758d85f9b340698b9b637af196a50cec2
[ "MIT" ]
null
null
null
""" Orka Discord Bot Copyright (c) 2017 William Bennett """ ########### # IMPORTS # ########### import discord import random import markovify from os import path, makedirs from scripts import * ################### # OTHER FUNCTIONS # ################### def add_msg(channel, text, mode='a+'): """ Appends ...
34.591716
128
0.561923
""" Orka Discord Bot Copyright (c) 2017 William Bennett """ ########### # IMPORTS # ########### import discord import random import markovify from os import path, makedirs from scripts import * ################### # OTHER FUNCTIONS # ################### def add_msg(channel, text, mode='a+'): """ Appends ...
5,018
6
127
5dfc4ead3ddd6b27d4c94803fa33ddb4e209c9c4
20,054
py
Python
composer/callbacks/checkpoint_saver.py
hanlint/composer
83d96b7efde533cbc2fff7dd7e0769da2b177807
[ "Apache-2.0" ]
null
null
null
composer/callbacks/checkpoint_saver.py
hanlint/composer
83d96b7efde533cbc2fff7dd7e0769da2b177807
[ "Apache-2.0" ]
null
null
null
composer/callbacks/checkpoint_saver.py
hanlint/composer
83d96b7efde533cbc2fff7dd7e0769da2b177807
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 MosaicML. All Rights Reserved. """Callback to save checkpoints during training.""" from __future__ import annotations import logging import os import pathlib import textwrap from typing import Callable, List, Optional, Tuple, Union from composer.core import Event, State from composer.core.callback ...
49.761787
154
0.621472
# Copyright 2021 MosaicML. All Rights Reserved. """Callback to save checkpoints during training.""" from __future__ import annotations import logging import os import pathlib import textwrap from typing import Callable, List, Optional, Tuple, Union from composer.core import Event, State from composer.core.callback ...
7,195
10,577
50
9df712a61c104af137c3836ef28840763dfb0311
5,919
py
Python
wrapperNYU.py
Z7Gao/InverseRenderingOfIndoorScene
f245d20dcbe05b1de766c2e53af79fd489f58d74
[ "MIT" ]
171
2020-06-28T04:03:23.000Z
2022-03-30T08:50:20.000Z
wrapperNYU.py
Z7Gao/InverseRenderingOfIndoorScene
f245d20dcbe05b1de766c2e53af79fd489f58d74
[ "MIT" ]
9
2020-08-20T08:56:38.000Z
2022-01-19T19:53:51.000Z
wrapperNYU.py
Z7Gao/InverseRenderingOfIndoorScene
f245d20dcbe05b1de766c2e53af79fd489f58d74
[ "MIT" ]
19
2020-06-23T11:49:03.000Z
2022-01-22T01:49:26.000Z
import torch from torch.autograd import Variable import numpy as np import torch.nn.functional as F import models # Return triplet of predictions, ground-truth and error
48.516393
167
0.66937
import torch from torch.autograd import Variable import numpy as np import torch.nn.functional as F import models # Return triplet of predictions, ground-truth and error def wrapperNYU(dataBatch, opt, encoder, albedoDecoder, normalDecoder, roughDecoder, depthDecoder ): # Load data from cpu to gpu normal_c...
5,724
0
24
5108e36e1b24e0722a49cfe5996dd84987d18722
1,337
py
Python
ex105.py
ArthurCorrea/python-exercises
0c2ac46b8c40dd9868b132e847cfa42e025095e3
[ "MIT" ]
null
null
null
ex105.py
ArthurCorrea/python-exercises
0c2ac46b8c40dd9868b132e847cfa42e025095e3
[ "MIT" ]
null
null
null
ex105.py
ArthurCorrea/python-exercises
0c2ac46b8c40dd9868b132e847cfa42e025095e3
[ "MIT" ]
null
null
null
# Faça um programa que tenha um função notas() que pode receber várias # notas de alunos e vai retornar um dicionário com as seguintes informações: # - Quantidade de notas; # - A maior nota; # - A menor nota; # - A média da turma; # - A situação(opcional); # Adicione também as docstrings da função. def notas(show=Fal...
27.854167
84
0.554226
# Faça um programa que tenha um função notas() que pode receber várias # notas de alunos e vai retornar um dicionário com as seguintes informações: # - Quantidade de notas; # - A maior nota; # - A menor nota; # - A média da turma; # - A situação(opcional); # Adicione também as docstrings da função. def notas(show=Fal...
0
0
0
78baa060484aee5b5791c697ecb50180a17dcae1
15,613
py
Python
core/models/group.py
agolibroda/PyTorWiki
678a2ae13d0027c61af36e61b72e4e54493a29ac
[ "Apache-2.0" ]
null
null
null
core/models/group.py
agolibroda/PyTorWiki
678a2ae13d0027c61af36e61b72e4e54493a29ac
[ "Apache-2.0" ]
null
null
null
core/models/group.py
agolibroda/PyTorWiki
678a2ae13d0027c61af36e61b72e4e54493a29ac
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3.6 # -*- coding: utf-8 -*- # # Copyright 2016 Alec Goliboda # # group.py from __future__ import print_function import logging import json import zlib # import markdown from datetime import datetime import tornado.options # import pymysql import hashlib import bcrypt i...
40.343669
193
0.547172
#!/usr/bin/env python3.6 # -*- coding: utf-8 -*- # # Copyright 2016 Alec Goliboda # # group.py from __future__ import print_function import logging import json import zlib # import markdown from datetime import datetime import tornado.options # import pymysql import hashlib import bcrypt i...
2,684
3,344
99
70b6c80341def36320aeb56eea498bea8fda840e
4,327
py
Python
spug_api/libs/parser.py
atompi/spug
88ebd46e47c88731b40cb82a6c7a360511b703fa
[ "MIT" ]
null
null
null
spug_api/libs/parser.py
atompi/spug
88ebd46e47c88731b40cb82a6c7a360511b703fa
[ "MIT" ]
null
null
null
spug_api/libs/parser.py
atompi/spug
88ebd46e47c88731b40cb82a6c7a360511b703fa
[ "MIT" ]
null
null
null
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug # Copyright: (c) <spug.dev@gmail.com> # Released under the AGPL-3.0 License. import json from .utils import AttrDict # 自定义的解析异常 # 需要校验的参数对象 class Argument(object): """ :param name: name of option :param default: default value if t...
33.030534
105
0.554657
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug # Copyright: (c) <spug.dev@gmail.com> # Released under the AGPL-3.0 License. import json from .utils import AttrDict # 自定义的解析异常 class ParseError(BaseException): def __init__(self, message): self.message = message # 需要校验的参数对象 class...
3,534
23
360
ca3c214980bb966e02bee0584e6a700a068fc2b7
3,954
py
Python
mBugTranslations/Chrome.py
SkyLined/mBugId
781bfe9a120e55630a91ce1e86b39ad0dee031ec
[ "CC-BY-4.0" ]
22
2016-08-11T14:50:55.000Z
2021-06-06T09:39:26.000Z
mBugTranslations/Chrome.py
SkyLined/mBugId
781bfe9a120e55630a91ce1e86b39ad0dee031ec
[ "CC-BY-4.0" ]
19
2016-09-07T05:54:40.000Z
2020-07-02T07:46:38.000Z
mBugTranslations/Chrome.py
SkyLined/mBugId
781bfe9a120e55630a91ce1e86b39ad0dee031ec
[ "CC-BY-4.0" ]
11
2016-09-03T22:42:50.000Z
2018-10-01T18:28:59.000Z
import re; from .cBugTranslation import cBugTranslation; aoBugTranslations = [ # ASan build related -> Ignored cBugTranslation( azs0rbAdditionalIrrelevantStackFrameSymbols = [ rb".*!`anonymous namespace'::Create", # Part of skia rb".*!base::debug::BreakDebugger", rb".*!base::debug::CollectGDI...
40.762887
151
0.686899
import re; from .cBugTranslation import cBugTranslation; aoBugTranslations = [ # ASan build related -> Ignored cBugTranslation( azs0rbAdditionalIrrelevantStackFrameSymbols = [ rb".*!`anonymous namespace'::Create", # Part of skia rb".*!base::debug::BreakDebugger", rb".*!base::debug::CollectGDI...
0
0
0
f7b84e0119a5bb7d3e69b3fc77fd9952daf83b18
2,975
py
Python
ProjetoMercado/mercado/models.py
LucasRodriguesDaPaixao/ProjetoMercado
7a086ab0af800b15ef090520c9c81a0cd83dd650
[ "MIT" ]
null
null
null
ProjetoMercado/mercado/models.py
LucasRodriguesDaPaixao/ProjetoMercado
7a086ab0af800b15ef090520c9c81a0cd83dd650
[ "MIT" ]
null
null
null
ProjetoMercado/mercado/models.py
LucasRodriguesDaPaixao/ProjetoMercado
7a086ab0af800b15ef090520c9c81a0cd83dd650
[ "MIT" ]
null
null
null
from django.db import models # Create your models here.
33.806818
103
0.736807
from django.db import models # Create your models here. class Cliente(models.Model): ID_cliente = models.AutoField(primary_key=True) nome_cliente = models.CharField(max_length=100, verbose_name="Nome:") cpf = models.CharField(max_length=14, verbose_name="CPF:") def __str__(self): return self....
260
2,486
160
e682d03323f99fc860ddd405e81e02079d38b903
2,979
py
Python
macrokit/_validator.py
hanjinliu/macro-kit
61ebc38ea1086337d5a7477c6e896af0220f8a71
[ "BSD-3-Clause" ]
2
2021-11-02T09:53:49.000Z
2021-11-10T10:33:05.000Z
macrokit/_validator.py
hanjinliu/macro-kit
61ebc38ea1086337d5a7477c6e896af0220f8a71
[ "BSD-3-Clause" ]
null
null
null
macrokit/_validator.py
hanjinliu/macro-kit
61ebc38ea1086337d5a7477c6e896af0220f8a71
[ "BSD-3-Clause" ]
null
null
null
from typing import Callable, Hashable, TypeVar, Iterable, Union from ._symbol import Symbol from .head import Head _T = TypeVar("_T", bound=Hashable) _A = TypeVar("_A") class Validator: """A validator class that will be used for Expr argument validation.""" def register(self, value: _T): """Register...
22.568182
75
0.627727
from typing import Callable, Hashable, TypeVar, Iterable, Union from ._symbol import Symbol from .head import Head _T = TypeVar("_T", bound=Hashable) _A = TypeVar("_A") class Validator: """A validator class that will be used for Expr argument validation.""" def __init__(self): self._map: dict[_T, Ca...
1,270
0
256
2dcc5057b0af83ae887869fbadf0b60476028183
7,579
py
Python
cubi_tk/archive/readme.py
eudesbarbosa/cubi-tk
80c3ef9387f2399f796b2cc445b99781d541f222
[ "MIT" ]
null
null
null
cubi_tk/archive/readme.py
eudesbarbosa/cubi-tk
80c3ef9387f2399f796b2cc445b99781d541f222
[ "MIT" ]
null
null
null
cubi_tk/archive/readme.py
eudesbarbosa/cubi-tk
80c3ef9387f2399f796b2cc445b99781d541f222
[ "MIT" ]
null
null
null
"""``cubi-tk archive prepare``: Prepare a project for archival""" import errno import os import re import shutil import sys import tempfile from cookiecutter.main import cookiecutter from logzero import logger from ..common import execute_shell_commands from ..isa_tpl import IsaTabTemplate from ..isa_tpl import load...
34.766055
98
0.577517
"""``cubi-tk archive prepare``: Prepare a project for archival""" import errno import os import re import shutil import sys import tempfile from cookiecutter.main import cookiecutter from logzero import logger from ..common import execute_shell_commands from ..isa_tpl import IsaTabTemplate from ..isa_tpl import load...
5,266
0
184
769fc816a6040cc61dab6376c20fd5c6bf0ebaa0
989
py
Python
sigmod2021-exdra-p523/experiments/archive/submitted_results/code/other/pca.py
damslab/reproducibility
f7804b2513859f7e6f14fa7842d81003d0758bf8
[ "Apache-2.0" ]
4
2021-12-10T17:20:26.000Z
2021-12-27T14:38:40.000Z
sigmod2021-exdra-p523/experiments/code/other/pca.py
damslab/reproducibility
f7804b2513859f7e6f14fa7842d81003d0758bf8
[ "Apache-2.0" ]
null
null
null
sigmod2021-exdra-p523/experiments/code/other/pca.py
damslab/reproducibility
f7804b2513859f7e6f14fa7842d81003d0758bf8
[ "Apache-2.0" ]
null
null
null
import numpy as np import argparse from sklearn.decomposition import PCA from sklearn.pipeline import make_pipeline from sklearn.preprocessing import StandardScaler parser = argparse.ArgumentParser() parser.add_argument('-x', '--datapath', type=str, required=True) parser.add_argument('-y', '--labels', type=str, requ...
43
118
0.781598
import numpy as np import argparse from sklearn.decomposition import PCA from sklearn.pipeline import make_pipeline from sklearn.preprocessing import StandardScaler parser = argparse.ArgumentParser() parser.add_argument('-x', '--datapath', type=str, required=True) parser.add_argument('-y', '--labels', type=str, requ...
0
0
0
ac1fa224c6f4611660c583d6666d2a339221dfa7
8,868
py
Python
prototypes/learn_weigths.py
pantelisantonoudiou/Logic_szrDetect
3267cabc78905c189a97e06ea2731b6f9e7b2def
[ "Apache-2.0" ]
1
2020-11-19T19:26:34.000Z
2020-11-19T19:26:34.000Z
prototypes/learn_weigths.py
pantelisantonoudiou/Logic_szrDetect
3267cabc78905c189a97e06ea2731b6f9e7b2def
[ "Apache-2.0" ]
null
null
null
prototypes/learn_weigths.py
pantelisantonoudiou/Logic_szrDetect
3267cabc78905c189a97e06ea2731b6f9e7b2def
[ "Apache-2.0" ]
1
2021-04-07T11:41:39.000Z
2021-04-07T11:41:39.000Z
# -*- coding: utf-8 -*- """ Created on Thu Aug 13 09:14:32 2020 @author: Pante """ import os, features, time import numpy as np from sklearn.preprocessing import StandardScaler from array_helper import find_szr_idx, match_szrs, merge_close from build_feature_data import get_data, get_features_allch from sklearn.metric...
27.974763
141
0.614005
# -*- coding: utf-8 -*- """ Created on Thu Aug 13 09:14:32 2020 @author: Pante """ import os, features, time import numpy as np from sklearn.preprocessing import StandardScaler from array_helper import find_szr_idx, match_szrs, merge_close from build_feature_data import get_data, get_features_allch from sklearn.metric...
2,799
0
54
276b5d3d63f7139687164c5d10374d92ac764ed2
1,016
py
Python
qcloudsdkcmem/DescribeCmemRequest.py
f3n9/qcloudcli
b965a4f0e6cdd79c1245c1d0cd2ca9c460a56f19
[ "Apache-2.0" ]
null
null
null
qcloudsdkcmem/DescribeCmemRequest.py
f3n9/qcloudcli
b965a4f0e6cdd79c1245c1d0cd2ca9c460a56f19
[ "Apache-2.0" ]
null
null
null
qcloudsdkcmem/DescribeCmemRequest.py
f3n9/qcloudcli
b965a4f0e6cdd79c1245c1d0cd2ca9c460a56f19
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from qcloudsdkcore.request import Request
25.4
73
0.643701
# -*- coding: utf-8 -*- from qcloudsdkcore.request import Request class DescribeCmemRequest(Request): def __init__(self): super(DescribeCmemRequest, self).__init__( 'cmem', 'qcloudcliV1', 'DescribeCmem', 'cmem.api.qcloud.com') def get_limit(self): return self.get_params().get('li...
615
14
320
14f7045572f6a48f7da91a5292fba1fe343f71d8
391
py
Python
tests/unit/cartography/intel/aws/test_ecr.py
srics/cartography
19a06766e304d657d956246179a2bb01a6d9aef6
[ "Apache-2.0" ]
1
2022-03-31T03:24:37.000Z
2022-03-31T03:24:37.000Z
tests/unit/cartography/intel/aws/test_ecr.py
srics/cartography
19a06766e304d657d956246179a2bb01a6d9aef6
[ "Apache-2.0" ]
null
null
null
tests/unit/cartography/intel/aws/test_ecr.py
srics/cartography
19a06766e304d657d956246179a2bb01a6d9aef6
[ "Apache-2.0" ]
null
null
null
from cartography.intel.aws import ecr from tests.data.aws.ecr import GET_ECR_REPOSITORY_IMAGE_VULNS
43.444444
96
0.803069
from cartography.intel.aws import ecr from tests.data.aws.ecr import GET_ECR_REPOSITORY_IMAGE_VULNS def test_transform_repository_image_vulns(): transformed_data = ecr.transform_ecr_scan_finding_attributes(GET_ECR_REPOSITORY_IMAGE_VULNS) assert transformed_data['findings'][0]['package_name'] == 'some_name' ...
267
0
23
a06cceb6d9e57c9f8d1381b5bcfd1fa628bd0789
2,314
py
Python
rssnewsbot/spiders/rssspider.py
hijoe320/RSSBot
cbc0bc24d980ede3419111d51384abbc2c93f70c
[ "MIT" ]
null
null
null
rssnewsbot/spiders/rssspider.py
hijoe320/RSSBot
cbc0bc24d980ede3419111d51384abbc2c93f70c
[ "MIT" ]
null
null
null
rssnewsbot/spiders/rssspider.py
hijoe320/RSSBot
cbc0bc24d980ede3419111d51384abbc2c93f70c
[ "MIT" ]
null
null
null
from time import sleep, gmtime, mktime from datetime import datetime import logging import scrapy import redis import msgpack import xxhash import pymongo as pm import feedparser as fp from colorama import Back, Fore, Style from ..settings import MONGODB_URI, REDIS_HOST, REDIS_PORT, REDIS_PWD, REDIS_PENDING_QUEUE def...
32.138889
103
0.617978
from time import sleep, gmtime, mktime from datetime import datetime import logging import scrapy import redis import msgpack import xxhash import pymongo as pm import feedparser as fp from colorama import Back, Fore, Style from ..settings import MONGODB_URI, REDIS_HOST, REDIS_PORT, REDIS_PWD, REDIS_PENDING_QUEUE def...
1,545
195
23
0a29357a3fcb65eb38130117fd1af6fb06bc1c40
11,992
py
Python
data/transforms/data_preprocessing.py
zyxwvu321/Classifer_SSL_Longtail
e6c09414c49e695b0f4221a3c6245ae3929a1788
[ "MIT" ]
null
null
null
data/transforms/data_preprocessing.py
zyxwvu321/Classifer_SSL_Longtail
e6c09414c49e695b0f4221a3c6245ae3929a1788
[ "MIT" ]
null
null
null
data/transforms/data_preprocessing.py
zyxwvu321/Classifer_SSL_Longtail
e6c09414c49e695b0f4221a3c6245ae3929a1788
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Jan 8 15:36:15 2020 dataset transform @author: minjie """ import albumentations as A from albumentations.pytorch import ToTensor as ToTensor_albu import cv2 import torch from multiprocessing import Pool from utils.parse_meta import parse_kpds import ...
38.935065
162
0.488075
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Jan 8 15:36:15 2020 dataset transform @author: minjie """ import albumentations as A from albumentations.pytorch import ToTensor as ToTensor_albu import cv2 import torch from multiprocessing import Pool from utils.parse_meta import parse_kpds import ...
181
10,462
116
22a8e0eda2fca9bf48bd5895ab01712afaaf9054
265
py
Python
Python/leetcode/HIndexIi.py
darrencheng0817/AlgorithmLearning
aec1ddd0c51b619c1bae1e05f940d9ed587aa82f
[ "MIT" ]
2
2015-12-02T06:44:01.000Z
2016-05-04T21:40:54.000Z
Python/leetcode/HIndexIi.py
darrencheng0817/AlgorithmLearning
aec1ddd0c51b619c1bae1e05f940d9ed587aa82f
[ "MIT" ]
null
null
null
Python/leetcode/HIndexIi.py
darrencheng0817/AlgorithmLearning
aec1ddd0c51b619c1bae1e05f940d9ed587aa82f
[ "MIT" ]
null
null
null
''' Created on 1.12.2016 @author: Darren '''''' Follow up for H-Index: What if the citations array is sorted in ascending order? Could you optimize your algorithm? Expected runtime complexity is in O(log n) and the input is sorted. " '''
18.928571
117
0.656604
''' Created on 1.12.2016 @author: Darren '''''' Follow up for H-Index: What if the citations array is sorted in ascending order? Could you optimize your algorithm? Expected runtime complexity is in O(log n) and the input is sorted. " '''
0
0
0
c6d3edd93fcde8345da8ce9f04c85393e6bb98d8
5,516
py
Python
HW1/hw1/code/visual_recog.py
jiansfoggy/16-720B
6395555449fa297f19efb42970e480f1b382e38a
[ "Unlicense" ]
2
2020-03-31T15:54:49.000Z
2022-01-07T13:43:46.000Z
HW1/hw1/code/visual_recog.py
jiansfoggy/16-720B
6395555449fa297f19efb42970e480f1b382e38a
[ "Unlicense" ]
null
null
null
HW1/hw1/code/visual_recog.py
jiansfoggy/16-720B
6395555449fa297f19efb42970e480f1b382e38a
[ "Unlicense" ]
4
2019-09-10T00:48:11.000Z
2022-01-07T13:43:50.000Z
import numpy as np import threading import queue import imageio import os,time import math import visual_words import multiprocessing as mp def build_recognition_system(num_workers=2): ''' Creates a trained recognition system by generating training features from all training images. [input] * num_wo...
28.729167
143
0.701051
import numpy as np import threading import queue import imageio import os,time import math import visual_words import multiprocessing as mp def build_recognition_system(num_workers=2): ''' Creates a trained recognition system by generating training features from all training images. [input] * num_wo...
236
0
25
076663290b2821e6423b989415d2957ab3b21b81
441
py
Python
app/__init__.py
SalesAppi/JPSSM_topics
6be32fca31e5e15f51753101a222a08fd2013f9b
[ "MIT" ]
1
2022-03-01T08:15:28.000Z
2022-03-01T08:15:28.000Z
app/__init__.py
SalesAppi/JPSSM_topics
6be32fca31e5e15f51753101a222a08fd2013f9b
[ "MIT" ]
null
null
null
app/__init__.py
SalesAppi/JPSSM_topics
6be32fca31e5e15f51753101a222a08fd2013f9b
[ "MIT" ]
1
2020-12-14T05:00:28.000Z
2020-12-14T05:00:28.000Z
from flask import Flask import gensim import re from gensim.models import LdaModel from gensim.test.utils import datapath from gensim import corpora, models from gensim.corpora import Dictionary from re import sub import os import string import codecs import nltk #from nltk.tokenize import RegexpTokenizer #from nlt...
19.173913
42
0.825397
from flask import Flask import gensim import re from gensim.models import LdaModel from gensim.test.utils import datapath from gensim import corpora, models from gensim.corpora import Dictionary from re import sub import os import string import codecs import nltk #from nltk.tokenize import RegexpTokenizer #from nlt...
0
0
0
0cd7b7f58642768e6475f872172900431c6d1e24
100
py
Python
tests/core/test_str_utils.py
namuan/orkestra
83b67f7e816c94b75232691c14d91fd9d62213ed
[ "MIT" ]
null
null
null
tests/core/test_str_utils.py
namuan/orkestra
83b67f7e816c94b75232691c14d91fd9d62213ed
[ "MIT" ]
11
2020-06-07T12:29:21.000Z
2020-06-24T19:44:36.000Z
tests/core/test_str_utils.py
namuan/orkestra
83b67f7e816c94b75232691c14d91fd9d62213ed
[ "MIT" ]
null
null
null
from app.utils.str_utils import str_to_int
16.666667
42
0.73
from app.utils.str_utils import str_to_int def test_str_to_int(): assert str_to_int("5") == 5
33
0
23
f6c6564e121ddf8a7df728a398f2d1498dea1117
7,942
py
Python
tables.py
arunext/greffy
001a0b94428629b9cdfaa8966f3cf6cd6f349e8a
[ "Apache-2.0" ]
null
null
null
tables.py
arunext/greffy
001a0b94428629b9cdfaa8966f3cf6cd6f349e8a
[ "Apache-2.0" ]
null
null
null
tables.py
arunext/greffy
001a0b94428629b9cdfaa8966f3cf6cd6f349e8a
[ "Apache-2.0" ]
null
null
null
import psycopg2 from config import config import datetime from textblob import TextBlob import nltk from nltk.corpus import stopwords def create_tables(): """ create tables in the PostgreSQL database""" params = config() # connect to the PostgreSQL server conn = psycopg2.connect(**params) cur = c...
27.013605
157
0.629816
import psycopg2 from config import config import datetime from textblob import TextBlob import nltk from nltk.corpus import stopwords def create_tables(): """ create tables in the PostgreSQL database""" params = config() # connect to the PostgreSQL server conn = psycopg2.connect(**params) cur = c...
2,434
0
69
2f1c4753ac08df358bf6226a60a7c9bda64e76e2
950
py
Python
weltgeist/units.py
samgeen/Weltgeist
c7d52e879bb3473cecbb06651b5e76dac3020da6
[ "MIT" ]
null
null
null
weltgeist/units.py
samgeen/Weltgeist
c7d52e879bb3473cecbb06651b5e76dac3020da6
[ "MIT" ]
null
null
null
weltgeist/units.py
samgeen/Weltgeist
c7d52e879bb3473cecbb06651b5e76dac3020da6
[ "MIT" ]
null
null
null
""" Defined code units and physical quantities The Python parts of Weltgeist use cgs VH1 uses units defined below Sam Geen, February 2018 """ import numpy as np # Physical quantities (base units in cgs) pc = 3.086e+18 mH = 1.66e-24 year = 3.154e+7 Myr = 1e6*year kB = 1.3806485279e-16 # in cgs G = 6.674...
26.388889
85
0.663158
""" Defined code units and physical quantities The Python parts of Weltgeist use cgs VH1 uses units defined below Sam Geen, February 2018 """ import numpy as np # Physical quantities (base units in cgs) pc = 3.086e+18 mH = 1.66e-24 year = 3.154e+7 Myr = 1e6*year kB = 1.3806485279e-16 # in cgs G = 6.674...
0
0
0
6f13085bc1fdca1855e4e392298226e252788d0b
343
py
Python
api/interest/api/viewsets.py
jhonatantft/ckl
8a0d533922fa091ac5f2dbe50caee3920ec2b90d
[ "MIT" ]
null
null
null
api/interest/api/viewsets.py
jhonatantft/ckl
8a0d533922fa091ac5f2dbe50caee3920ec2b90d
[ "MIT" ]
2
2021-05-08T21:26:43.000Z
2022-02-19T00:26:17.000Z
api/interest/api/viewsets.py
jhonatantft/ckl
8a0d533922fa091ac5f2dbe50caee3920ec2b90d
[ "MIT" ]
null
null
null
from rest_framework.response import Response from rest_framework.filters import SearchFilter from rest_framework.viewsets import ModelViewSet from interest.models import Interest from .serializers import InterestSerializer
31.181818
48
0.848397
from rest_framework.response import Response from rest_framework.filters import SearchFilter from rest_framework.viewsets import ModelViewSet from interest.models import Interest from .serializers import InterestSerializer class InterestsViewSet(ModelViewSet): serializer_class = InterestSerializer queryset = ...
0
97
23
ca8b1afb26f13038161c24aead09569f01b99768
9,456
py
Python
olwidget/widgets.py
jj0hns0n/mednet
efb6681292e7ac8f870ee5967a5a2b352853ae35
[ "BSD-3-Clause" ]
2
2016-02-18T01:06:04.000Z
2016-02-18T03:53:37.000Z
olwidget/widgets.py
jj0hns0n/mednet
efb6681292e7ac8f870ee5967a5a2b352853ae35
[ "BSD-3-Clause" ]
null
null
null
olwidget/widgets.py
jj0hns0n/mednet
efb6681292e7ac8f870ee5967a5a2b352853ae35
[ "BSD-3-Clause" ]
null
null
null
import re from django.contrib.gis.gdal import OGRException, OGRGeometry from django.contrib.gis.geos import GEOSGeometry from django.forms.widgets import Textarea from django.template.loader import render_to_string from django.utils import simplejson from django.conf import settings from django import forms # Def...
32.273038
88
0.602792
import re from django.contrib.gis.gdal import OGRException, OGRGeometry from django.contrib.gis.geos import GEOSGeometry from django.forms.widgets import Textarea from django.template.loader import render_to_string from django.utils import simplejson from django.conf import settings from django import forms def reduc...
4,049
84
304
a777c1f7cbe7e6ff795a3c5c9391e45397c000e0
921
py
Python
advent/year2021/day1.py
davweb/advent-of-code
6d9ac52092f4aad26a84d7cfd2fcd8420f1ea612
[ "Unlicense" ]
null
null
null
advent/year2021/day1.py
davweb/advent-of-code
6d9ac52092f4aad26a84d7cfd2fcd8420f1ea612
[ "Unlicense" ]
null
null
null
advent/year2021/day1.py
davweb/advent-of-code
6d9ac52092f4aad26a84d7cfd2fcd8420f1ea612
[ "Unlicense" ]
null
null
null
#!/usr/local/bin/python3 def part1(data): """ >>> part1([199, 200, 208, 210, 200, 207, 240, 269, 260, 263]) 7 >>> part1(read_input()) 1581 """ previous = data[0] count = 0 for value in data[1:]: if value > previous: count += 1 previous = value re...
16.745455
65
0.512486
#!/usr/local/bin/python3 def read_input(): file = open('input/2021/day1-input.txt', 'r') return [int(line) for line in file.readlines()] def part1(data): """ >>> part1([199, 200, 208, 210, 200, 207, 240, 269, 260, 263]) 7 >>> part1(read_input()) 1581 """ previous = data[0] co...
158
0
46
ac3978d7b01ad6d6e0f32900633722a103fd5b2e
4,738
py
Python
Example/Gutenkunst2007/Lee_2003/LeeNet.py
bcdaniels/SloppyCell
17e68127a6aba19056a5067748a2d18241cc4d76
[ "BSD-3-Clause" ]
2
2020-05-26T19:29:39.000Z
2020-08-26T20:54:52.000Z
Example/Gutenkunst2007/Lee_2003/LeeNet.py
bcdaniels/SloppyCell
17e68127a6aba19056a5067748a2d18241cc4d76
[ "BSD-3-Clause" ]
1
2019-04-15T21:08:12.000Z
2019-04-15T21:08:12.000Z
Example/Gutenkunst2007/Lee_2003/LeeNet.py
jurquiza/SloppyCellUrquiza2019
a9f64d9d4172c82735813f09e48f36777a714e9c
[ "BSD-3-Clause" ]
3
2017-09-12T03:12:01.000Z
2018-10-19T11:08:09.000Z
from SloppyCell.ReactionNetworks import * net = Network('Lee2003') net.add_compartment('extract') net.add_parameter('Dsh0', 100, name = r'Dsh^0') net.add_parameter('APC0', 100, name = r'APC^0') net.add_parameter('TCF0', 15, name = r'TCF^0') net.add_parameter('GSK0', 50, name = r'GSK^0') net.add_species('X2', 'extra...
41.561404
105
0.657239
from SloppyCell.ReactionNetworks import * net = Network('Lee2003') net.add_compartment('extract') net.add_parameter('Dsh0', 100, name = r'Dsh^0') net.add_parameter('APC0', 100, name = r'APC^0') net.add_parameter('TCF0', 15, name = r'TCF^0') net.add_parameter('GSK0', 50, name = r'GSK^0') net.add_species('X2', 'extra...
0
0
0
86a50822ca54c8a73daa3b439ad60fdf4ef3c6c6
4,288
py
Python
project_1_1/src/engine.py
tillaczel/Deep-Learning-in-Computer-Vision
792e90a3ad5bafdb30e0267226c2c75b8afd01e3
[ "MIT" ]
null
null
null
project_1_1/src/engine.py
tillaczel/Deep-Learning-in-Computer-Vision
792e90a3ad5bafdb30e0267226c2c75b8afd01e3
[ "MIT" ]
null
null
null
project_1_1/src/engine.py
tillaczel/Deep-Learning-in-Computer-Vision
792e90a3ad5bafdb30e0267226c2c75b8afd01e3
[ "MIT" ]
1
2021-06-08T09:28:01.000Z
2021-06-08T09:28:01.000Z
from omegaconf import DictConfig import pytorch_lightning as pl import torch from torch import nn import torchmetrics from .model import Model
34.861789
120
0.614972
from omegaconf import DictConfig import pytorch_lightning as pl import torch from torch import nn import torchmetrics from .model import Model class EngineModule(pl.LightningModule): def __init__(self, config: DictConfig, main_metric: str="f1"): super().__init__() self.config = config se...
3,796
276
69
07f3349c9a417036cdc8776d53fcfa52d2e1af80
5,082
py
Python
PWGJE/EMCALJetTasks/Tracks/analysis/util/Interpolator.py
maroozm/AliPhysics
22ec256928cfdf8f800e05bfc1a6e124d90b6eaf
[ "BSD-3-Clause" ]
114
2017-03-03T09:12:23.000Z
2022-03-03T20:29:42.000Z
PWGJE/EMCALJetTasks/Tracks/analysis/util/Interpolator.py
maroozm/AliPhysics
22ec256928cfdf8f800e05bfc1a6e124d90b6eaf
[ "BSD-3-Clause" ]
19,637
2017-01-16T12:34:41.000Z
2022-03-31T22:02:40.000Z
PWGJE/EMCALJetTasks/Tracks/analysis/util/Interpolator.py
maroozm/AliPhysics
22ec256928cfdf8f800e05bfc1a6e124d90b6eaf
[ "BSD-3-Clause" ]
1,021
2016-07-14T22:41:16.000Z
2022-03-31T05:15:51.000Z
#************************************************************************** #* Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. * #* * #* Author: The ALICE Off-line Project. * #* Contributors ...
37.925373
123
0.538764
#************************************************************************** #* Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. * #* * #* Author: The ALICE Off-line Project. * #* Contributors ...
0
3,791
23
0b9bc42aab3a61dc776c20fde1b7be088ba0e2b2
2,276
py
Python
creator/schema.py
kids-first/kf-api-study-creator
93a79b108b6474f9b4135ace06c89ddcf63dd257
[ "Apache-2.0" ]
3
2019-05-04T02:07:28.000Z
2020-10-16T17:47:44.000Z
creator/schema.py
kids-first/kf-api-study-creator
93a79b108b6474f9b4135ace06c89ddcf63dd257
[ "Apache-2.0" ]
604
2019-02-21T18:14:51.000Z
2022-02-10T08:13:54.000Z
creator/schema.py
kids-first/kf-api-study-creator
93a79b108b6474f9b4135ace06c89ddcf63dd257
[ "Apache-2.0" ]
null
null
null
""" This is the root schema definition that combines individual applications' schemas into one. Each application that has queries or mutations exports them as either Query or Mutation from the application's schema module. No resolvers or type definitions should be included here. """ import graphene from django.conf imp...
29.947368
75
0.773726
""" This is the root schema definition that combines individual applications' schemas into one. Each application that has queries or mutations exports them as either Query or Mutation from the application's schema module. No resolvers or type definitions should be included here. """ import graphene from django.conf imp...
0
0
0
eebaa5aaa5d495d9ab50fc4d5c37d590c86b3096
9,624
py
Python
simulation/simulation.py
bopopescu/sparrow-mod
56c601ee3dd852a9f053bffffc2a52ff3da8d2bd
[ "Apache-2.0" ]
200
2015-01-05T07:37:20.000Z
2022-03-30T03:28:21.000Z
simulation/simulation.py
bopopescu/sparrow-mod
56c601ee3dd852a9f053bffffc2a52ff3da8d2bd
[ "Apache-2.0" ]
1
2016-05-13T10:46:32.000Z
2016-05-13T10:46:32.000Z
simulation/simulation.py
bopopescu/sparrow-mod
56c601ee3dd852a9f053bffffc2a52ff3da8d2bd
[ "Apache-2.0" ]
73
2015-01-06T02:00:17.000Z
2021-11-22T10:04:03.000Z
# # Copyright 2013 The Regents of The University California # # 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...
40.779661
115
0.641209
# # Copyright 2013 The Regents of The University California # # 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...
6,768
976
376
eb0cc8b93b8223d65f24aaccba78c888502d04df
892
py
Python
2015/MAC0327/Desafios 2/p11.py
andredalton/bcc
188190e436615e2344d87b722856fa02e6eec9cc
[ "Apache-2.0" ]
1
2018-08-02T14:09:26.000Z
2018-08-02T14:09:26.000Z
2015/MAC0327/Desafios 2/p11.py
andredalton/bcc
188190e436615e2344d87b722856fa02e6eec9cc
[ "Apache-2.0" ]
null
null
null
2015/MAC0327/Desafios 2/p11.py
andredalton/bcc
188190e436615e2344d87b722856fa02e6eec9cc
[ "Apache-2.0" ]
1
2020-07-13T04:27:02.000Z
2020-07-13T04:27:02.000Z
# coding=utf-8 __author__ = 'André Meneghelli' """ /******************************************************************************* * Aluno: André Meneghelli Vale, Núm. USP: 4898948 * Curso: Bacharelado em Ciências da Computação * Aula 13 - Stone Pile * MAC0327 -- IME/USP, -- Prof. Cristina Gomes Fernandes ...
22.3
80
0.48991
# coding=utf-8 __author__ = 'André Meneghelli' """ /******************************************************************************* * Aluno: André Meneghelli Vale, Núm. USP: 4898948 * Curso: Bacharelado em Ciências da Computação * Aula 13 - Stone Pile * MAC0327 -- IME/USP, -- Prof. Cristina Gomes Fernandes ...
389
0
46
cd67696b0ec1ee40fb689af2c3c02ad3ecc6be4e
5,014
py
Python
model.py
abhitrip/Behavioral-Cloning
9930dc7fc2e6623954f84859b7d011905cd48d30
[ "MIT" ]
null
null
null
model.py
abhitrip/Behavioral-Cloning
9930dc7fc2e6623954f84859b7d011905cd48d30
[ "MIT" ]
null
null
null
model.py
abhitrip/Behavioral-Cloning
9930dc7fc2e6623954f84859b7d011905cd48d30
[ "MIT" ]
null
null
null
import csv import matplotlib.image as mpimg import pickle import numpy as np from keras.models import Sequential from keras.layers.core import Flatten,Lambda,Dense from keras.layers.convolutional import Cropping2D,Conv2D from keras import backend as K from keras.layers.core import Activation import matplotlib.image a...
25.451777
89
0.632429
import csv import matplotlib.image as mpimg import pickle import numpy as np from keras.models import Sequential from keras.layers.core import Flatten,Lambda,Dense from keras.layers.convolutional import Cropping2D,Conv2D from keras import backend as K from keras.layers.core import Activation import matplotlib.image a...
3,085
0
158
43ba3750ab55b89ed9e0505f5404d4b28171dd33
1,647
py
Python
src/downward/experiments/issue739/v5-translate.py
ScarfZapdos/conan-bge-questgen
4d184c5bf0ae4b768b8043cec586395df9ce1451
[ "MIT" ]
1
2021-09-09T13:03:02.000Z
2021-09-09T13:03:02.000Z
src/downward/experiments/issue739/v5-translate.py
ScarfZapdos/conan-bge-questgen
4d184c5bf0ae4b768b8043cec586395df9ce1451
[ "MIT" ]
null
null
null
src/downward/experiments/issue739/v5-translate.py
ScarfZapdos/conan-bge-questgen
4d184c5bf0ae4b768b8043cec586395df9ce1451
[ "MIT" ]
null
null
null
#! /usr/bin/env python # -*- coding: utf-8 -*- import os from lab.environments import LocalEnvironment, BaselSlurmEnvironment import common_setup from common_setup import IssueConfig, IssueExperiment from relativescatter import RelativeScatterPlotReport DIR = os.path.dirname(os.path.abspath(__file__)) BENCHMARKS_DI...
35.042553
178
0.756527
#! /usr/bin/env python # -*- coding: utf-8 -*- import os from lab.environments import LocalEnvironment, BaselSlurmEnvironment import common_setup from common_setup import IssueConfig, IssueExperiment from relativescatter import RelativeScatterPlotReport DIR = os.path.dirname(os.path.abspath(__file__)) BENCHMARKS_DI...
0
0
0
6ba0b5003d4c97df676dbfc10dff603b15cd48d9
506
py
Python
mplscience/__init__.py
adamgayoso/mpscience
0401ded920a4d09314e9a747cf4da07d17a60a05
[ "MIT" ]
4
2021-07-15T16:55:24.000Z
2022-03-04T23:10:02.000Z
mplscience/__init__.py
adamgayoso/mpscience
0401ded920a4d09314e9a747cf4da07d17a60a05
[ "MIT" ]
null
null
null
mplscience/__init__.py
adamgayoso/mpscience
0401ded920a4d09314e9a747cf4da07d17a60a05
[ "MIT" ]
null
null
null
"""Matplotlib science style""" from .core import available_styles, set_style, style_context # https://github.com/python-poetry/poetry/pull/2366#issuecomment-652418094 # https://github.com/python-poetry/poetry/issues/144#issuecomment-623927302 try: import importlib.metadata as importlib_metadata except ModuleNotFo...
31.625
75
0.804348
"""Matplotlib science style""" from .core import available_styles, set_style, style_context # https://github.com/python-poetry/poetry/pull/2366#issuecomment-652418094 # https://github.com/python-poetry/poetry/issues/144#issuecomment-623927302 try: import importlib.metadata as importlib_metadata except ModuleNotFo...
0
0
0
3a06da5ff6c0053e4dc72e9a222d828921a7534c
4,153
py
Python
template/templates.py
dkratzert/FinalCif
07ca23dbb4e7439b108a906521a118cdb876d97e
[ "Beerware" ]
13
2020-01-14T16:23:48.000Z
2022-02-16T18:02:08.000Z
template/templates.py
dkratzert/FinalCif
07ca23dbb4e7439b108a906521a118cdb876d97e
[ "Beerware" ]
24
2021-04-21T05:30:42.000Z
2022-03-31T20:07:29.000Z
template/templates.py
dkratzert/FinalCif
07ca23dbb4e7439b108a906521a118cdb876d97e
[ "Beerware" ]
1
2021-08-09T16:48:33.000Z
2021-08-09T16:48:33.000Z
from contextlib import suppress from pathlib import Path from typing import List from PyQt5.QtCore import Qt from PyQt5.QtGui import QColor from PyQt5.QtWidgets import QFileDialog, QListWidgetItem with suppress(ImportError): from appwindow import AppWindow from tools.settings import FinalCifSettings class Repor...
44.180851
120
0.666265
from contextlib import suppress from pathlib import Path from typing import List from PyQt5.QtCore import Qt from PyQt5.QtGui import QColor from PyQt5.QtWidgets import QFileDialog, QListWidgetItem with suppress(ImportError): from appwindow import AppWindow from tools.settings import FinalCifSettings class Repor...
3,553
0
189
10d8540be113dbd61336aecade22ee5448341df6
2,648
py
Python
guillotina_cms/api/search.py
alteroo/guillotina_cms
a8ea0efd2ad4f4ab9fab484fe55f41abd37cdac8
[ "BSD-2-Clause" ]
null
null
null
guillotina_cms/api/search.py
alteroo/guillotina_cms
a8ea0efd2ad4f4ab9fab484fe55f41abd37cdac8
[ "BSD-2-Clause" ]
null
null
null
guillotina_cms/api/search.py
alteroo/guillotina_cms
a8ea0efd2ad4f4ab9fab484fe55f41abd37cdac8
[ "BSD-2-Clause" ]
null
null
null
from guillotina import configure from guillotina.catalog.utils import parse_query from guillotina.interfaces import IResource from guillotina.utils import find_container from guillotina_cms.utils import get_search_utility import itertools from collections import Counter @configure.service( context=IResource, meth...
28.782609
95
0.574018
from guillotina import configure from guillotina.catalog.utils import parse_query from guillotina.interfaces import IResource from guillotina.utils import find_container from guillotina_cms.utils import get_search_utility import itertools from collections import Counter @configure.service( context=IResource, meth...
1,595
0
44
a01a3506d1d2788ace0fce8ccd2fde5aaaddd30d
505
py
Python
modules/img2Vector.py
cycoe/class_robber
968e493481e1dfa06a806d6382413871a4856f31
[ "MIT" ]
3
2018-09-19T14:55:43.000Z
2019-03-12T01:07:05.000Z
modules/img2Vector.py
cycoe/class_robber
968e493481e1dfa06a806d6382413871a4856f31
[ "MIT" ]
1
2020-12-14T11:56:10.000Z
2020-12-14T12:31:37.000Z
modules/img2Vector.py
cycoe/class_robber
968e493481e1dfa06a806d6382413871a4856f31
[ "MIT" ]
null
null
null
import os from PIL import Image
24.047619
62
0.554455
import os from PIL import Image def img2Vector(imgPath): fullVector = [] vectorList = [] img = Image.open(imgPath) img = img.convert('RGBA') pixdata = img.load() for x in range(img.size[0]): for y in range(img.size[1]): if pixdata[x, y] == (0, 0, 153, 255): ...
449
0
23
6aa55d8d1800c23e9910fd1b02e8951e054760f8
4,126
py
Python
tests/test_random_walk.py
SwamyDev/gym-quickcheck
d271f509c11998c9f210c5d8131906f712553123
[ "MIT" ]
null
null
null
tests/test_random_walk.py
SwamyDev/gym-quickcheck
d271f509c11998c9f210c5d8131906f712553123
[ "MIT" ]
null
null
null
tests/test_random_walk.py
SwamyDev/gym-quickcheck
d271f509c11998c9f210c5d8131906f712553123
[ "MIT" ]
null
null
null
import numpy as np import pytest from gym import utils from more_itertools import last from gym_quickcheck.envs import RandomWalkEnv from tests.aux import assert_that, follows_contract, assert_obs_eq, unpack_reward, unpack_obs, unpack_done, until_done, \ run_example @pytest.fixture @pytest.fixture @pytest.fi...
30.338235
121
0.741638
import numpy as np import pytest from gym import utils from more_itertools import last from gym_quickcheck.envs import RandomWalkEnv from tests.aux import assert_that, follows_contract, assert_obs_eq, unpack_reward, unpack_obs, unpack_done, until_done, \ run_example @pytest.fixture def env(): return RandomWa...
3,144
0
521
1815a1cfdf441bab8f5c07943254b362f00a655f
163
py
Python
celery/settings.py
alculquicondor/AmigoCloud-IGP-Sync
56de7e9137340054159289ef9c6534bb1b5872fc
[ "MIT" ]
null
null
null
celery/settings.py
alculquicondor/AmigoCloud-IGP-Sync
56de7e9137340054159289ef9c6534bb1b5872fc
[ "MIT" ]
null
null
null
celery/settings.py
alculquicondor/AmigoCloud-IGP-Sync
56de7e9137340054159289ef9c6534bb1b5872fc
[ "MIT" ]
null
null
null
from os import environ TOKEN = environ.get('AMIGOCLOUD_TOKEN') BROKER_URL = environ.get('BROKER_URL') PROJECT_URL = 'users/475/projects/13608' DATASET_ID = 79746
23.285714
40
0.779141
from os import environ TOKEN = environ.get('AMIGOCLOUD_TOKEN') BROKER_URL = environ.get('BROKER_URL') PROJECT_URL = 'users/475/projects/13608' DATASET_ID = 79746
0
0
0
855c72651aff3902ac92bec1942941cff9cf4170
342
py
Python
scripts/twist_remapper.py
tamago117/kcctsim
0cd72c79ade6be48ad59fb9cfb202dcbe8de69cf
[ "Apache-2.0" ]
1
2021-11-25T07:53:53.000Z
2021-11-25T07:53:53.000Z
scripts/twist_remapper.py
tamago117/kcctsim
0cd72c79ade6be48ad59fb9cfb202dcbe8de69cf
[ "Apache-2.0" ]
1
2021-09-09T06:34:32.000Z
2021-11-02T11:49:00.000Z
scripts/twist_remapper.py
tamago117/kcctsim
0cd72c79ade6be48ad59fb9cfb202dcbe8de69cf
[ "Apache-2.0" ]
2
2021-10-01T13:43:58.000Z
2021-11-25T07:53:54.000Z
#!/usr/bin/env python import rospy from geometry_msgs.msg import Twist pub = rospy.Publisher("/diff_drive_controller/cmd_vel", Twist, queue_size = 10) if __name__ == '__main__': rospy.init_node('twist_remapper', anonymous=True) rospy.Subscriber("/cmd_vel", Twist, callback) rospy.spin()
28.5
79
0.733918
#!/usr/bin/env python import rospy from geometry_msgs.msg import Twist pub = rospy.Publisher("/diff_drive_controller/cmd_vel", Twist, queue_size = 10) def callback(data): pub.publish(data) if __name__ == '__main__': rospy.init_node('twist_remapper', anonymous=True) rospy.Subscriber("/cmd_vel", Twist, call...
20
0
22
860f3238dfabe5abdc4b560671b0f41979c23fa1
48,472
py
Python
qiskit/visualization/matplotlib.py
quantumjim/qiskit-terra
5292f487eaa980986a1e5affae8c4fc50c743e71
[ "Apache-2.0" ]
1
2019-12-09T08:25:14.000Z
2019-12-09T08:25:14.000Z
qiskit/visualization/matplotlib.py
quantumjim/qiskit-terra
5292f487eaa980986a1e5affae8c4fc50c743e71
[ "Apache-2.0" ]
1
2020-03-29T19:57:14.000Z
2020-03-29T21:49:25.000Z
qiskit/visualization/matplotlib.py
quantumjim/qiskit-terra
5292f487eaa980986a1e5affae8c4fc50c743e71
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2018. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any...
41.894555
100
0.444875
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2018. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any...
46,257
682
180
a7cf222e3f96762239244a7b076603c3ca2e33f3
946
py
Python
sjpClass.py
alkamid/wiktionary
ce242da609a1001ae7462b07da2f6e83f1a7281b
[ "MIT" ]
3
2015-01-06T22:00:22.000Z
2016-08-14T08:07:32.000Z
sjpClass.py
alkamid/wiktionary
ce242da609a1001ae7462b07da2f6e83f1a7281b
[ "MIT" ]
56
2015-07-12T10:21:38.000Z
2020-02-23T18:51:01.000Z
sjpClass.py
alkamid/wiktionary
ce242da609a1001ae7462b07da2f6e83f1a7281b
[ "MIT" ]
2
2015-01-06T21:25:06.000Z
2018-01-17T12:03:17.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- import pywikibot
27.823529
136
0.609937
#!/usr/bin/python # -*- coding: utf-8 -*- import pywikibot class kategoriaSlowa(): def __init__(self, name, counter, pages, tabelka, outputFile): self.name = name self.counter = counter self.pages = 'Wikipedysta:AlkamidBot/sjp/' + pages self.buffer = '' self.tabelka = tabel...
786
2
98
8b6ebb32e27f26c072b135c85ff8fb1b572ad23d
2,446
py
Python
tests/test_filters.py
mobius-medical/flask-genshi
68cba6c9cb604272a25f5e4c74e5a127e3ac7854
[ "BSD-3-Clause" ]
null
null
null
tests/test_filters.py
mobius-medical/flask-genshi
68cba6c9cb604272a25f5e4c74e5a127e3ac7854
[ "BSD-3-Clause" ]
null
null
null
tests/test_filters.py
mobius-medical/flask-genshi
68cba6c9cb604272a25f5e4c74e5a127e3ac7854
[ "BSD-3-Clause" ]
null
null
null
from __future__ import unicode_literals from inspect import cleandoc from genshi.filters import Transformer from flask_genshi import render_template from flatland.out.genshi import setup as flatland_setup from flatland import Form, String def test_applies_method_filters(app): """Method filters are applied for ...
31.766234
102
0.629599
from __future__ import unicode_literals from inspect import cleandoc from genshi.filters import Transformer from flask_genshi import render_template from flatland.out.genshi import setup as flatland_setup from flatland import Form, String class FlatlandForm(Form): username = String def test_applies_method_fi...
218
27
114
978ff0be8e3774dfa21908c9b4b49bc92d1eeb4e
3,159
py
Python
forms/models.py
ditttu/gymkhana-Nominations
2a0e993c1b8362c456a9369b0b549d1c809a21df
[ "MIT" ]
3
2018-02-27T13:48:28.000Z
2018-03-03T21:57:50.000Z
forms/models.py
ditttu/gymkhana-Nominations
2a0e993c1b8362c456a9369b0b549d1c809a21df
[ "MIT" ]
6
2020-02-12T00:07:46.000Z
2022-03-11T23:25:59.000Z
forms/models.py
ditttu/gymkhana-Nominations
2a0e993c1b8362c456a9369b0b549d1c809a21df
[ "MIT" ]
1
2019-03-26T20:19:57.000Z
2019-03-26T20:19:57.000Z
from django.db import models from django import forms from django.contrib.auth.models import User from .form_dynamic import NominationForm import json FIELD_TYPES = ( ('Short_answer', forms.CharField), ('Paragraph', forms.CharField), ('Integer', forms.IntegerField), ('ChoiceField', forms.ChoiceField)...
28.981651
120
0.660336
from django.db import models from django import forms from django.contrib.auth.models import User from .form_dynamic import NominationForm import json class Questionnaire(models.Model): name = models.CharField(max_length=100, null=True) def __unicode__(self): return self.name def __str__(self): ...
1,490
940
69
c910c09445a0e65ba2545dbe1c4a46731ae345b6
4,099
py
Python
degmo/data/datasets.py
IcarusWizard/Deep-Generative-Models
4117c11ad944bdeff106a80adbb3642a076af64e
[ "MIT" ]
2
2019-11-21T15:50:59.000Z
2019-12-17T02:44:19.000Z
degmo/data/datasets.py
IcarusWizard/Deep-Generative-Models
4117c11ad944bdeff106a80adbb3642a076af64e
[ "MIT" ]
null
null
null
degmo/data/datasets.py
IcarusWizard/Deep-Generative-Models
4117c11ad944bdeff106a80adbb3642a076af64e
[ "MIT" ]
1
2021-07-02T05:49:29.000Z
2021-07-02T05:49:29.000Z
import numpy as np import torch, torchvision, math from torch.functional import F import os import PIL.Image as Image from functools import partial DATADIR = 'dataset/' load_celeba32 = partial(load_celeba, image_size=32) load_celeba64 = partial(load_celeba, image_size=64) load_celeba128 = partial(load_celeba, image_s...
37.263636
112
0.68041
import numpy as np import torch, torchvision, math from torch.functional import F import os import PIL.Image as Image from functools import partial DATADIR = 'dataset/' class ImageDataset(torch.utils.data.Dataset): def __init__(self, root, transform=None): super().__init__() self.root = root ...
3,525
24
222
1a3578a56a4bccb214d3e2c35a83b6e6b51851e2
57,483
py
Python
basistheory/api/tenants_api.py
Basis-Theory/basistheory-python
5fd0f3d20fd07e8de45d6d5919e092c696049df1
[ "Apache-2.0" ]
null
null
null
basistheory/api/tenants_api.py
Basis-Theory/basistheory-python
5fd0f3d20fd07e8de45d6d5919e092c696049df1
[ "Apache-2.0" ]
null
null
null
basistheory/api/tenants_api.py
Basis-Theory/basistheory-python
5fd0f3d20fd07e8de45d6d5919e092c696049df1
[ "Apache-2.0" ]
null
null
null
""" Basis Theory API ## Getting Started * Sign-in to [Basis Theory](https://basistheory.com) and go to [Applications](https://portal.basistheory.com/applications) * Create a Basis Theory Server to Server Application * All permissions should be selected * Paste the API Key into the `BT-API-KEY` variable # noqa...
37.768068
300
0.517736
""" Basis Theory API ## Getting Started * Sign-in to [Basis Theory](https://basistheory.com) and go to [Applications](https://portal.basistheory.com/applications) * Create a Basis Theory Server to Server Application * All permissions should be selected * Paste the API Key into the `BT-API-KEY` variable # noqa...
16,455
0
27
2b5c325a1726de056d5d1198acc3940aef23c363
3,454
py
Python
custom_components/nwsradar/config_flow.py
MatthewFlamm/ha_nws_radar
f039bf1abb94a48232599746f80d4c7e4af35de7
[ "MIT" ]
21
2019-07-18T23:38:22.000Z
2021-01-08T01:14:44.000Z
custom_components/nwsradar/config_flow.py
MatthewFlamm/ha_nws_radar
f039bf1abb94a48232599746f80d4c7e4af35de7
[ "MIT" ]
7
2019-09-06T13:14:49.000Z
2020-12-18T17:49:34.000Z
custom_components/nwsradar/config_flow.py
MatthewFlamm/ha_nws_radar
f039bf1abb94a48232599746f80d4c7e4af35de7
[ "MIT" ]
2
2019-07-26T21:23:59.000Z
2020-01-14T23:03:12.000Z
"""Config flow for National Weather Service (NWS) integration.""" import logging import voluptuous as vol from nws_radar.nws_radar_mosaic import REGIONS from homeassistant import config_entries from . import unique_id # pylint: disable=unused-import from .const import ( CONF_LOOP, CONF_STATION, CONF_STY...
32.895238
87
0.621888
"""Config flow for National Weather Service (NWS) integration.""" import logging import voluptuous as vol from nws_radar.nws_radar_mosaic import REGIONS from homeassistant import config_entries from . import unique_id # pylint: disable=unused-import from .const import ( CONF_LOOP, CONF_STATION, CONF_STY...
0
0
0
e288a19792ad0dab33c86bbab35d030926f6a073
2,944
py
Python
xinci/model.py
Lapis-Hong/xinci
9234ef6e426dfa282c334ff79f4f76b475eb10f3
[ "MIT" ]
23
2018-06-18T15:35:47.000Z
2021-07-28T02:19:16.000Z
xinci/model.py
Lapis-Hong/xinci
9234ef6e426dfa282c334ff79f4f76b475eb10f3
[ "MIT" ]
null
null
null
xinci/model.py
Lapis-Hong/xinci
9234ef6e426dfa282c334ff79f4f76b475eb10f3
[ "MIT" ]
10
2018-06-20T07:01:17.000Z
2020-08-31T15:56:24.000Z
#!/usr/bin/env python # coding: utf-8 # @Author: lapis-hong # @Date : 2018/6/17 """This module contains the main algorithm for chinese word extraction. criterion 1: solid rate criterion 2: character entropy """ from __future__ import unicode_literals from __future__ import division import math from indexer i...
37.74359
108
0.66712
#!/usr/bin/env python # coding: utf-8 # @Author: lapis-hong # @Date : 2018/6/17 """This module contains the main algorithm for chinese word extraction. criterion 1: solid rate criterion 2: character entropy """ from __future__ import unicode_literals from __future__ import division import math from indexer i...
1,657
0
81
86c4428f80dd80644e84963f60d1a11c38e4a4c2
561
py
Python
Machine_Learning/ZCSNumpy.py
ZuoCaiSong/Python
137d1c4c79f9594b9bc2c7dc7728246e697f1329
[ "MIT" ]
null
null
null
Machine_Learning/ZCSNumpy.py
ZuoCaiSong/Python
137d1c4c79f9594b9bc2c7dc7728246e697f1329
[ "MIT" ]
null
null
null
Machine_Learning/ZCSNumpy.py
ZuoCaiSong/Python
137d1c4c79f9594b9bc2c7dc7728246e697f1329
[ "MIT" ]
null
null
null
#! usr/bin/env python # -*- coding:utf-8 -*- """ 基础篇 """ from numpy import * ''' NumPy的主要对象是同种元素的多维数组。 这是一个所有的元素都是一种类型、通过一个正整数元组索引的元素表格(通常是元素是数字) ''' ''' NumPy中维度(dimensions)叫做轴(axes),轴的个数叫做秩(rank)。 ''' #eg: ''' 在3D空间一个点的坐标 [1,2,3] 是一个秩为1的数组,它只有一个轴,轴的长度为3 ''' #注意直接写,他的类型不是一个ndarray,是一个list,此处只是用于举例说明秩 arr2 = [[1,0,...
13.357143
44
0.682709
#! usr/bin/env python # -*- coding:utf-8 -*- """ 基础篇 """ from numpy import * ''' NumPy的主要对象是同种元素的多维数组。 这是一个所有的元素都是一种类型、通过一个正整数元组索引的元素表格(通常是元素是数字) ''' ''' NumPy中维度(dimensions)叫做轴(axes),轴的个数叫做秩(rank)。 ''' #eg: ''' 在3D空间一个点的坐标 [1,2,3] 是一个秩为1的数组,它只有一个轴,轴的长度为3 ''' #注意直接写,他的类型不是一个ndarray,是一个list,此处只是用于举例说明秩 arr2 = [[1,0,...
0
0
0
077630693a28af4ea5bf434f4de1bcb506757b3e
1,696
py
Python
tests/unit/test_fileclient.py
jubrad/salt
7960334fb726cfde45e6409da79a65535c626685
[ "Apache-2.0" ]
1
2020-01-02T09:03:21.000Z
2020-01-02T09:03:21.000Z
tests/unit/test_fileclient.py
jubrad/salt
7960334fb726cfde45e6409da79a65535c626685
[ "Apache-2.0" ]
null
null
null
tests/unit/test_fileclient.py
jubrad/salt
7960334fb726cfde45e6409da79a65535c626685
[ "Apache-2.0" ]
1
2020-01-02T09:03:24.000Z
2020-01-02T09:03:24.000Z
# -*- coding: utf-8 -*- ''' :codeauthor: :email: `Bo Maryniuk <bo@suse.de>` ''' # Import Python libs from __future__ import absolute_import import errno # Import Salt Testing libs from tests.support.mock import patch, Mock from tests.support.unit import TestCase # Import Salt libs from salt.ext.six.moves import ...
32.615385
82
0.628538
# -*- coding: utf-8 -*- ''' :codeauthor: :email: `Bo Maryniuk <bo@suse.de>` ''' # Import Python libs from __future__ import absolute_import import errno # Import Salt Testing libs from tests.support.mock import patch, Mock from tests.support.unit import TestCase # Import Salt libs from salt.ext.six.moves import ...
166
0
27
9e5a009aa9aeb584ea41f3acb660d59e05af5898
11,072
py
Python
prepare_datasets.py
Jakob-Bach/Meta-Learning-Feature-Importance
089e5c7a5be91307f747e00b38b1567386fbee16
[ "MIT" ]
null
null
null
prepare_datasets.py
Jakob-Bach/Meta-Learning-Feature-Importance
089e5c7a5be91307f747e00b38b1567386fbee16
[ "MIT" ]
null
null
null
prepare_datasets.py
Jakob-Bach/Meta-Learning-Feature-Importance
089e5c7a5be91307f747e00b38b1567386fbee16
[ "MIT" ]
null
null
null
"""Prepare datasets Script that: - downloads, pre-processes, and saves base datasets from OpenML - computes meta-features - computes meta-targets (combining feature-importance measures and base models) - saves the meta-datasets Usage: python -m prepare_datasets --help """ import argparse import multiprocessing impor...
58.582011
110
0.694906
"""Prepare datasets Script that: - downloads, pre-processes, and saves base datasets from OpenML - computes meta-features - computes meta-targets (combining feature-importance measures and base models) - saves the meta-datasets Usage: python -m prepare_datasets --help """ import argparse import multiprocessing impor...
7,730
0
132
3f79f678ffc367e4156a50c0372bba0efcd118d0
4,749
py
Python
mywebsocket.py
malengelajosue/app_flask
ea656abb859d8941e9a4761736f2a6ce4b91f7aa
[ "MIT" ]
null
null
null
mywebsocket.py
malengelajosue/app_flask
ea656abb859d8941e9a4761736f2a6ce4b91f7aa
[ "MIT" ]
null
null
null
mywebsocket.py
malengelajosue/app_flask
ea656abb859d8941e9a4761736f2a6ce4b91f7aa
[ "MIT" ]
null
null
null
#!/usr/bin/env python import signal import sys import tornado.ioloop import tornado.web import tornado.websocket import tornado.wsgi as myapp_wsgi from datetime import datetime import time import ast import random from datetime import date from models.model import Sites from models.model import Coordonnates from mode...
29.314815
169
0.620131
#!/usr/bin/env python import signal import sys import tornado.ioloop import tornado.web import tornado.websocket import tornado.wsgi as myapp_wsgi from datetime import datetime import time import ast import random from datetime import date from models.model import Sites from models.model import Coordonnates from mode...
3,139
36
238
ef071130d8e688b2bf7d1480cb9a43266fc55e27
4,576
py
Python
compile.py
KValexander/compile-java-project
62aab5ca9ec53705daa25a21875fc5c97e71db97
[ "MIT" ]
null
null
null
compile.py
KValexander/compile-java-project
62aab5ca9ec53705daa25a21875fc5c97e71db97
[ "MIT" ]
null
null
null
compile.py
KValexander/compile-java-project
62aab5ca9ec53705daa25a21875fc5c97e71db97
[ "MIT" ]
null
null
null
import shutil import os import re from tkinter import * # Storage concat = "" assets = [] startclass = "" # Static config config = { "javapath": "java", "classpath": "class", "sourcetxt": "source.txt", "compilebat": "compile.bat", "startclass": "Main.class", "runbat": "run.bat", "copyassets": "true" } # Gett...
26
138
0.674825
import shutil import os import re from tkinter import * # Storage concat = "" assets = [] startclass = "" # Static config config = { "javapath": "java", "classpath": "class", "sourcetxt": "source.txt", "compilebat": "compile.bat", "startclass": "Main.class", "runbat": "run.bat", "copyassets": "true" } # Gett...
3,423
0
176
6d79c61a4cd03cad002390bea3fef1d83f0bef83
601
py
Python
multiprocessing_module/multiprocessing_test2.py
kenwaldek/python
e6aaf5616a456a4fb91889c0617bd6511f1a223e
[ "MIT" ]
1
2019-02-24T09:57:16.000Z
2019-02-24T09:57:16.000Z
multiprocessing_module/multiprocessing_test2.py
kenwaldek/python
e6aaf5616a456a4fb91889c0617bd6511f1a223e
[ "MIT" ]
null
null
null
multiprocessing_module/multiprocessing_test2.py
kenwaldek/python
e6aaf5616a456a4fb91889c0617bd6511f1a223e
[ "MIT" ]
4
2017-05-21T15:34:53.000Z
2018-09-25T06:56:15.000Z
#! /usr/bin/env python3 # -*- coding:utf-8 -*- ############################################################### # © kenwaldek MIT-license # # Title: multiprocessing 2 Version: 1.0 # Date: 30-12-16 Language: python3 # Description: multiprocessing dus m...
25.041667
63
0.44426
#! /usr/bin/env python3 # -*- coding:utf-8 -*- ############################################################### # © kenwaldek MIT-license # # Title: multiprocessing 2 Version: 1.0 # Date: 30-12-16 Language: python3 # Description: multiprocessing dus m...
11
0
23
d0f18eb34b3ac7f1fbda4ccdac297a8ef889417b
1,088
py
Python
leetcode-python/num002.py
shuaizi/leetcode
c943410575f380a00335bf5ac8d361af53a92d78
[ "Apache-2.0" ]
null
null
null
leetcode-python/num002.py
shuaizi/leetcode
c943410575f380a00335bf5ac8d361af53a92d78
[ "Apache-2.0" ]
null
null
null
leetcode-python/num002.py
shuaizi/leetcode
c943410575f380a00335bf5ac8d361af53a92d78
[ "Apache-2.0" ]
null
null
null
__author__ = 'shuai' l1 = ListNode(2) l1.next = ListNode(4) l1.next.next = ListNode(3) l2 = ListNode(5) l2.next = ListNode(6) l2.next.next = ListNode(4) sol = Solution() sol.addTwoNumbers(l1, l2)
23.148936
45
0.465074
__author__ = 'shuai' class ListNode(object): def __init__(self, x): self.val = x self.next = None class Solution(object): def addTwoNumbers(self, l1, l2): """ :type l1: ListNode :type l2: ListNode :rtype: ListNode """ ret = ListNode(0) ...
49
768
73
b5b7dbcb1ba016b3352ed24c0000b521b5f7e7a1
116
py
Python
some/path/to/app/Class3.py
CameronHudson8/python-implicit-namespace-packages
80dc55ab31ef43d4cbf57ce68ee3c89a14cd534d
[ "Apache-2.0" ]
null
null
null
some/path/to/app/Class3.py
CameronHudson8/python-implicit-namespace-packages
80dc55ab31ef43d4cbf57ce68ee3c89a14cd534d
[ "Apache-2.0" ]
null
null
null
some/path/to/app/Class3.py
CameronHudson8/python-implicit-namespace-packages
80dc55ab31ef43d4cbf57ce68ee3c89a14cd534d
[ "Apache-2.0" ]
null
null
null
from module1.Class1 import Class1
14.5
40
0.672414
from module1.Class1 import Class1 class Class3: def __init__(self): self.helper = Class1('hola-bot')
39
-8
50