blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
2
283
content_id
stringlengths
40
40
detected_licenses
listlengths
0
91
license_type
stringclasses
2 values
repo_name
stringlengths
3
135
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
68
visit_date
timestamp[ns]date
2015-07-25 20:53:29
2023-09-06 10:46:05
revision_date
timestamp[ns]date
1970-01-01 00:00:00
2037-05-03 13:00:00
committer_date
timestamp[ns]date
1970-01-01 00:00:00
2036-02-09 17:40:36
github_id
int64
1.61k
691M
⌀
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
24 values
gha_event_created_at
timestamp[ns]date
2012-06-03 10:21:33
2023-09-14 21:59:50
⌀
gha_created_at
timestamp[ns]date
2008-03-27 23:40:48
2023-09-13 22:40:33
⌀
gha_language
stringclasses
250 values
src_encoding
stringclasses
27 values
language
stringclasses
1 value
is_vendor
bool
2 classes
is_generated
bool
2 classes
length_bytes
int64
6
10M
extension
stringclasses
289 values
filename
stringlengths
1
218
content
stringlengths
6
10M
adb90cce9ad043c3f99d0657c3afb40c9dd5c386
6e2b043a158e14d7f5bc833cbf88f056ddffecbf
/mcmc_manager.py
7c7858d5a23f58821305cafbb13c89867c383718
[]
no_license
BrunoSanchez/pysmp_standalone
53267eaf2e808845840d621f6828028084a45028
fbb23adc7850fe52f18e33ac67f7de443a4b070d
refs/heads/master
2022-12-06T09:12:59.795541
2020-09-01T19:13:13
2020-09-01T19:13:13
null
0
0
null
null
null
null
UTF-8
Python
false
false
9,775
py
mcmc_manager.py
print 'importing 1' import os import sys, getopt import time if __name__ == "__main__": index = 0 filter = 'g' npzfolder='/home/dbrout/pysmp_standalone/specnpzfiles' outpath = '/home/dbrout/pysmp_standalone/specfitout' corioutpath = '/home/dbrout/pysmp_standalone/corispec/' isfermigrid = False ...
d6afafc848e167b4e52ac00aff2598337860c0ef
82aab2423b7e543aeda08b36140dca0f933b315f
/layout.py
a5a62560983237e7ac2d5bb047fa0934f7c2c2c4
[]
no_license
Lady-Emporio/pygame-hex
35374105c093d24f062ab91a5eed39d4fa5f375e
9674426035507d1b63e58a93519e0203ab8a9baf
refs/heads/master
2020-05-15T02:46:07.403111
2019-04-20T08:08:56
2019-04-20T08:08:56
182,055,052
0
0
null
null
null
null
UTF-8
Python
false
false
8,898
py
layout.py
from MyConst import * from enum import Enum import pygame class HexType(Enum): grass = 1 woods = 2 stone = 3 greenGrown = 4 lightGreen = 5 red = 6 yellow = 7 def getHex(hexType): if(hexType==HexType.grass): return Hex(r'image\grass_19.png', hexType) elif(hexType==...
fc0b5e277f9f498a8864ae155d7b930fbd2ca063
e3564aff4783138fc40846ea8f2a642481d30a1e
/add_repos.py
4680972c71b4f485a8a3e917d862a3bbe689946a
[]
no_license
chehine-hub/API-REST-PYTHON
d21b098ed82f54d234285539729472728f8b4189
f7773e253f8b2fb2a3899b4bb3fb33b6a651d2c7
refs/heads/main
2023-02-20T08:08:53.157044
2021-01-06T19:43:29
2021-01-06T19:43:29
327,412,850
0
0
null
null
null
null
UTF-8
Python
false
false
557
py
add_repos.py
import requests import json my_access_token = 'cc11693a96d7aa02f9261fe2134d5c6cf3d1abf7' my_url = 'https://api.github.com/user/repos' my_body = {'name': 'OpenClassroomAPI', 'description': 'test_repo'} my_headers = {'Content-Type': 'application/json', 'Authorization': 'token {}'.format(my_access_token)} response = req...
88a1e84ed6277b0a5f5271205572114b84c10966
0bc7763d6357c059017e8112734ab519f1cdf2fc
/02_basic_datatypes/02_01_cylinder.py
5300555fd0c05bfc3fd3a49dfb6ea6de23a0e511
[]
no_license
GitFiras/CodingNomads-Python
99cd5a1b54f9a810a3b2bc20790678926742006a
80deee9022118b0bf8f26cc9145fc5eb5225cc01
refs/heads/master
2020-07-21T08:03:13.003010
2019-10-07T13:20:12
2019-10-07T13:20:12
206,789,247
0
0
null
null
null
null
UTF-8
Python
false
false
508
py
02_01_cylinder.py
''' Write the necessary code calculate the volume and surface area of a cylinder with a radius of 3.14 and a height of 5. Print out the result. ''' # cylinder radius (r) = 3.14 , height (h) = 5. # volume (V) of a cylinder is V = π * (radius ** 2) * height # π = 3.14 print(3.14 * (3.14 **2) * 5) # Volume of the cyli...
f6ddfdfa4052acf64c2dbe3556d182062c04d5b0
c5a18bb69f17cb0a8662318c9533b799ffb45201
/ga_opt.py
e38cc97fd8e5962a9c2280668eab856270f9b226
[]
no_license
llamosa/crypto
024887c08d8a556895b71aa380e007848b9ca2f3
e92829d933a8e2a6c505b9a2d274567aa4e8b50a
refs/heads/master
2021-09-02T12:57:34.674719
2018-01-02T20:59:40
2018-01-02T20:59:40
115,951,251
2
0
null
null
null
null
UTF-8
Python
false
false
11,631
py
ga_opt.py
#! /usr/bin/env python ''' Title: General Genetic Algorithm (GA) for optimization tasks. Date/Version: 2011 12 07 v1.1 Author: Nick Trefiak Description: Uses a binary chromosome to represent binary, integer and real values. Resolution for integer and real values should be course (e.g. 8bit or le...
44eec4a91080197df0e4e9f55b87f4b8a7178405
06907c00c2d96acad99cbd22595d8333d0db5534
/Assignment+3.py
bf216f3ef61b809066e3cf3d49101f4ea9d342b8
[]
no_license
MerEsf/Applied_Machine_Learning
146bc5d40ce5228e750a9dbe54daa0c1a6a6861b
9587b31c163e636e443c1d140442eb83f7a2eeb0
refs/heads/master
2020-04-14T01:00:49.557473
2019-02-12T02:59:07
2019-02-12T02:59:07
163,549,357
0
0
null
null
null
null
UTF-8
Python
false
false
4,581
py
Assignment+3.py
#   # Each row in `fraud_data.csv` corresponds to a credit card transaction. # Features include confidential variables `V1` through `V28` as well as `Amount` which is the amount of the transaction.   # The target is stored in the `class` column, where a value of 1 corresponds to an instance of fraud and # 0 corresp...
5b82a769f006aa303c54803030c88d31d0d77a83
ed077c05e8a17a6bcfd0f1d74206e2ba9277a135
/nss_admin/management/commands/copy_homes.py
83338429e40629daacea356c2bf40065502c8cbb
[]
no_license
vencax/django-sql-nss-admin
20889d09f188b41da40019df9d4eab029eeb3eb0
e2b18b51827f9b65db6c59a6d3e148a017043677
refs/heads/master
2021-01-19T05:43:30.079174
2014-09-10T07:43:59
2014-09-10T07:43:59
3,653,951
3
0
null
null
null
null
UTF-8
Python
false
false
1,397
py
copy_homes.py
from optparse import make_option from django.core.management.base import BaseCommand import os import shutil class Command(BaseCommand): """ In case we already have old homes and want to move its content into new one run this. """ option_list = BaseCommand.option_list + ( make_option('--old...
b6390d3c933e29c61f966975ca4dffe60bd66276
4ec475fb6b5cbfc67de5affde2daf76e2a808e13
/Toyoto Corolla/ToyotaCorolla.py
b51bda43a544d3b1b9bc64cc74a737c836897f59
[]
no_license
shubhrock777/Multiple-linear-regression
1311aaddbd2943c4523c6186dcb6d4ebe0791c9c
5447645c897fcd0da9e15898f00d2ca0e91f11a7
refs/heads/main
2023-04-12T13:15:39.034117
2021-05-04T17:18:22
2021-05-04T17:18:22
353,974,002
1
0
null
null
null
null
UTF-8
Python
false
false
5,847
py
ToyotaCorolla.py
import pandas as pd #loading the dataset toyo = pd.read_csv("D:/BLR10AM/Assi/21.Multiple liner regression/Datasets_MLR/ToyotaCorolla.csv", encoding ="latin1") #2. Work on each feature of the dataset to create a data dictionary as displayed in the below image #######feature of the dataset to create a data dict...
18f4d26b652c123edb119d24bf65a82512d742a4
c30483625f7bd28b85dc480043935c3ccb6f83b1
/27_Password_generator.py
971cfbd6a845fbdb89cfd21a8ad3064eceea24ce
[]
no_license
newokhla/PythonWorkout
dd9abf4e6c2d7156cc2924e6c4557feb081bba3e
4ea836fa3f40e9177d01967ce49710b97678b21a
refs/heads/main
2023-08-11T04:43:24.152872
2021-09-23T06:58:01
2021-09-23T06:58:01
409,482,037
0
0
null
null
null
null
UTF-8
Python
false
false
220
py
27_Password_generator.py
import random def create_password_generator(a_string): password = '' for char in range(0,len(a_string)): password += random.choice(a_string) return password print(create_password_generator('hello'))
92f7e0e8b2a2626815f8649b1cd09747fa9d6714
146f66d11964092bd14268f8843a21a3bcde76be
/data_utils/image_labelling.py
834354f3ccb624999d8d5c28243c9a307dd2e9ad
[]
no_license
nmushkin/cam_finder
7b1c4268b22a3ac2690236368772cba88f067602
ec16857d5a852a4ca20a40265e0cbeea52f711c3
refs/heads/master
2023-04-29T12:37:21.659376
2021-05-17T16:40:40
2021-05-17T16:40:40
311,816,622
0
0
null
null
null
null
UTF-8
Python
false
false
8,837
py
image_labelling.py
import os import json import xml.etree.ElementTree as etree import math from PIL import Image def png_to_jpeg(xml_label_folder, image_folder): """Converts images and their mentions in relevant xml to .jpeg""" xml_files = os.listdir(xml_label_folder) for file_name in xml_files: xml_path = os.path....
eef11add30cb0e7ff0bcf2ab83854110ce4c233e
12fd4b310b2879b1e742821d0312f945272a226d
/ibinn_imagenet/model/coupling_blocks/slow.py
d57d2d13f55844e1e8e1d4ce77debc8c815c44cf
[ "MIT" ]
permissive
moxime/ibinn-imagenet
b199f9fbab977468f494db05bacebeb427c9c700
04b2ab9315e591506d6805e96c35b60222447071
refs/heads/master
2023-06-26T09:09:06.588319
2021-04-16T12:40:37
2021-04-16T12:40:37
null
0
0
null
null
null
null
UTF-8
Python
false
false
6,612
py
slow.py
import torch import torch.nn as nn import torch.nn.functional as F from scipy.stats import special_ortho_group import numpy as np class AIO_SlowCouplingBlock(nn.Module): ''' This elegant coupling block was invented by Jakob Kruse ''' def __init__(self, dims_in, dims_c=[], subnet_constructor=N...
ee742767c544518e3f8e12e5502b17d7397a2144
44427ff3fc4ab4a40cef7cca73cf1b945f8833d6
/flocker_tools/tests/test_json.py
0a37d183a956c2e98214ae6ee8007c09837abb0e
[]
no_license
jml/flocker-tools
1fedb9a01c5e63e07bab525a790cd7c940368f30
141144d4e7ab7ffbbfda9a8ba399f888e5e010b7
refs/heads/master
2016-09-09T17:30:06.543575
2015-08-24T14:45:28
2015-08-24T14:45:28
40,599,517
1
0
null
null
null
null
UTF-8
Python
false
false
1,459
py
test_json.py
from testtools import TestCase from flocker_tools._json import repair_json class TestRepairJSON(TestCase): def test_one_json_line(self): self.assertEqual([{'foo': 'bar'}], list(repair_json(['{"foo": "bar"}']))) def test_split_json_line(self): lines = ['{"foo":\n', ' "bar"}'] self....
f4a5ac9d3dafa767a2e4fc85e1bf5f0b15663a9e
349ecb2bc043bc0447db5c2cf1e3bac41a264c08
/src/build/updateBuildTag.py
d812cb058ce9c9f04d6dc9c68e2b979e32ab0d55
[ "Apache-2.0" ]
permissive
open-power/sbe
e9509355c795ee1cde9a4773b132d6fe28923528
e66523bb0be9e66d9bbaaa895d5380091e0a9782
refs/heads/master
2023-09-03T17:58:57.402990
2023-04-07T10:28:49
2023-08-29T05:04:22
68,327,351
11
18
NOASSERTION
2023-08-22T15:52:10
2016-09-15T20:05:56
C
UTF-8
Python
false
false
3,033
py
updateBuildTag.py
#!/usr/bin/python2 # IBM_PROLOG_BEGIN_TAG # This is an automatically generated prolog. # # $Source: src/build/updateBuildTag.py $ # # OpenPOWER sbe Project # # Contributors Listed Below - COPYRIGHT 2017,2023 # [+] International Business Machines Corp. # [+] Marty E. Plummer # # # Licensed under the Apache License, Vers...
aaf287ee89ce046b17c73e7a38e2d11d47fb9be2
75d73228fc79e1125484adb814b35e8908ba2f7f
/examples/sgi.py
924d065c10f91969fce72d8622526a59f661e9e2
[ "BSD-3-Clause" ]
permissive
Killthebug/python-brlcad
be96018d29b4aa4451d6c6afd5ad465640aa9f94
06dd63d53f9414e6fcc2a920adce15aa73625a19
refs/heads/master
2020-03-20T05:57:25.849702
2018-08-14T03:51:08
2018-08-14T03:51:08
137,232,721
4
1
null
2018-06-13T15:10:58
2018-06-13T15:10:58
null
UTF-8
Python
false
false
2,783
py
sgi.py
""" This is the python version of sgi.sh using the python-brlcad module. usage: python sgi.py sgi.g To Render : rtedge -s 1024 -F output.pix sgi.g cube.r pix-png -s 1024 < output.pix > output.png """ from brlcad.procedural import * import brlcad.geometry as geometry def right(a, b, rcc_name, sph_name): ...
67508270a3b4229921756735a3e6a530e07e2312
e306fa6acd2ee817f785a37d8718718d81170324
/Douban/spiders/Poemtry.py
bb423c0afef748a8331b6ee40d751b06f468ffdf
[]
no_license
songhongwang/scrapyDemo
385bcc308861772a7a3e832f9c95c3438a9d0295
ac55300aecd1ca03a199ca87cd4a91ab24ad4c8f
refs/heads/master
2021-05-13T16:59:46.114150
2018-04-27T09:53:37
2018-04-27T09:53:37
116,808,986
0
1
null
null
null
null
UTF-8
Python
false
false
2,590
py
Poemtry.py
# -*- coding: utf-8 -*- import scrapy import sys import os reload(sys) sys.setdefaultencoding("utf-8") from Douban.items import Poem import imp SqlUtilsPoem = imp.load_source('SqlUtilsPoem', '../mysql/sqlutils_poem.py') from SqlUtilsPoem import SqlUtilsPoem import time class PoemtrySpider(scrapy.Spider): name...
6a30e14ab047fc168c006f043b718524075f1a17
27e362c38122ac6badbc0482daee187288284d03
/tests/test_client_edge_cases.py
936b7c677a0177c695b11f06bcb9a18418724dd5
[ "BSD-3-Clause" ]
permissive
gmr/aiorabbit
b2375cd550b2a1237c037b442f87e054ae1621ce
3e875511f1339ae12f923a1fe42088bc4739b63a
refs/heads/main
2023-08-31T20:02:41.219858
2023-08-17T21:32:16
2023-08-17T21:32:16
228,682,403
20
8
BSD-3-Clause
2022-06-28T15:37:10
2019-12-17T18:57:33
Python
UTF-8
Python
false
false
5,675
py
test_client_edge_cases.py
import asyncio import os from pamqp import base, commands from aiorabbit import client, exceptions, state from . import testing class ClientCloseTestCase(testing.ClientTestCase): @testing.async_test async def test_close(self): await self.connect() await self.client.close() self.asse...
18143cdbf54221d2cbc25036ab4efef0b72df586
ecd14cbad19f3821d9fa1f2b9a357b5f3fe066d1
/auctionApp/auction_add.py
ec2e22e13333349041d7d9bbfcae8c2cfb14905e
[]
no_license
DerJontte/AuctionApp
49e348df05813220a5b754c764227b4040fb0e44
69ee6f739041d622bfd4829b1c1b7055a3a96585
refs/heads/master
2022-12-22T01:18:37.179499
2019-02-25T16:15:19
2019-02-25T16:15:19
160,366,748
0
0
null
2022-12-08T01:20:03
2018-12-04T14:04:31
Python
UTF-8
Python
false
false
3,542
py
auction_add.py
from datetime import datetime, timedelta from django.core.mail import send_mail from django.shortcuts import redirect, render from django.views import View from auctionApp.currency import Currency from auctionApp.forms import AddAuctionForm from auctionApp.models import Auction from auctionApp.auction__base import Auct...
5aafd00273ad4d336d96f056a23573653f7257bb
0f136dc7557affaf35d10a9d58f1ac873e3ed5f1
/back/api/admin.py
8ba25d946e0da588c0dadd8950e9a762eb676477
[ "BSD-3-Clause" ]
permissive
sitn/geoshop2
b8ac70505b73e29e0e2f5fcc6fe960730cd04b05
2effcb014c86487dd835689ac3cf1266e9c2da2c
refs/heads/master
2023-09-03T14:31:55.151100
2023-08-22T07:17:35
2023-08-22T07:17:35
232,051,990
0
3
BSD-3-Clause
2023-08-22T07:17:36
2020-01-06T07:57:34
Python
UTF-8
Python
false
false
9,096
py
admin.py
from django import forms from django.conf import settings from django.db import models from django.contrib import messages from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from django.contrib.auth import get_user_model from django.contrib.gis import admin from django.http import HttpResponseRedirect fro...
a2deafe4592b3f2af259a75d304f082104edbc70
6a60b5b9e1b239dea0a49f0f2e54a53afd1e6350
/src/labels/__init__.py
711619b307f6169e70e0a57af66c9fc32ebc5eb2
[ "MIT" ]
permissive
hackebrot/labels
aafc291cfd9dd6042f3ef986ff1c07ddb124e256
2a36720c3fd924e010cc49810057d50f8adf552a
refs/heads/main
2023-04-13T18:00:24.333088
2021-09-10T07:24:16
2021-09-10T07:24:16
137,772,441
63
12
MIT
2023-03-29T08:28:23
2018-06-18T15:45:09
Python
UTF-8
Python
false
false
334
py
__init__.py
__version__ = "20.2.0.dev0" __title__ = "labels" __description__ = "CLI app for managing GitHub labels for Python 3.6 and newer. 📝" __url__ = "https://github.com/hackebrot/labels" __author__ = "Raphael Pierzina" __email__ = "raphael@hackebrot.de" __license__ = "MIT License" __copyright__ = "Copyright (c) 2018 Raphae...
ca502ec45a3d653b3d1c3bd1ba7c529d152b2965
eca5d815c419d755a0bdafb911cf60c4356e578c
/hello.py
2233dc48467e5611745819eaa58130ce789db12d
[]
no_license
Dalyoung/study_hello
60fe088c608add01246aba127f98fe852577591e
feaab53cb10faefaffc2e70a119472995f8baf06
refs/heads/master
2021-08-15T01:38:57.716937
2017-11-17T04:59:00
2017-11-17T04:59:00
111,058,961
0
0
null
null
null
null
UTF-8
Python
false
false
195
py
hello.py
//For command line git_ex //GitHub modification : First //Local repository modification : Second println("Hello, world!!") println("Hello hello") println("Hello Git!!!") println("Hello hotfix")
9c8a213fc8a7397662eebb74d6ee1ad34cb884d9
cb4d5bb9ff5497774bf6a53e609f2b637976c4b4
/NSML_2/Image_retrival/vgg16_cluster.py
c0f1f87827d3e1931309e4ae4162e17856b0d1c5
[]
no_license
Malgus1995/ML-DL_Projects
826e72a7e74cde180c37853f331af605ec7e19b1
fbaecc006fc2ccd1c9eb353a2b6a575ee5100771
refs/heads/master
2020-05-19T13:23:10.219824
2019-11-16T17:38:14
2019-11-16T17:38:14
null
0
0
null
null
null
null
UTF-8
Python
false
false
3,264
py
vgg16_cluster.py
import time import os, os.path import random import cv2 import glob import keras import matplotlib import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split from sklearn.cluster import KMeans from sklearn.mixture import GaussianMixture from sklearn.decomposition import PCA import pandas as ...
e03dfa0e02313c5478d4e97dcaf3bc27915bd878
63ac1ebd4c82d5128caf22800e7df6a582683a0b
/website_calendar/models/calendar_appointment.py
ee49a81ebf90a0b659638fd4c67ec8a36f0abdf8
[]
no_license
Darknroses/pedinnails
5cce55c66330ec2e3f30d4ea0f883e85df68e56e
56584712ee11758a5473b959ad075dcd5fc04636
refs/heads/main
2023-08-23T02:27:11.147977
2021-10-08T03:26:00
2021-10-08T03:26:00
null
0
0
null
null
null
null
UTF-8
Python
false
false
17,420
py
calendar_appointment.py
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import calendar as cal import random import pytz from datetime import datetime, timedelta, time from dateutil import rrule from dateutil.relativedelta import relativedelta from babel.dates import format_datetime from od...
1aaace83af0235341d10b8ac3b47d00a944dac37
179a8a4f3593cfc92341871481cde07adf81671e
/story1/migrations/0007_auto_20201017_2246.py
3695cb9ae6a1b260e167bfe51113d45aec8da8c9
[]
no_license
faisaladisoe/story-ppw
91a470a5d30885f6de10f5fadf91b5593aebe0a9
201544f822ea78750716cde7d1b5993346e085b0
refs/heads/master
2023-02-25T22:08:42.553020
2021-01-26T10:59:50
2021-01-26T10:59:50
296,297,310
0
0
null
null
null
null
UTF-8
Python
false
false
389
py
0007_auto_20201017_2246.py
# Generated by Django 3.1.2 on 2020-10-17 15:46 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('story1', '0006_visitor'), ] operations = [ migrations.RenameField( model_name='visitor', old_name='identitiy_n...
6aff61ce5cef537e6b1b19e382d8bf80e3a61693
5512e9bc83eedacbf50dc6beea8990c285a3ae12
/cmsrun.py
86ca54ab8c7026e9e46ff2d7678cfb220ae06d34
[]
no_license
oviazlo/RawAnalyzer
ba5de9b55aa433a8537c14ccf074d17ca39dd565
3b4c1059ad03527831b4b7a6dfa66ae004bfadb0
refs/heads/master
2021-12-05T16:59:52.209267
2015-08-13T13:36:12
2015-08-13T13:36:12
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,883
py
cmsrun.py
import FWCore.ParameterSet.Config as cms import FWCore.ParameterSet.VarParsing as VarParsing options = VarParsing.VarParsing() options.register( 'file','',VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.string, 'File path for storing output') options.parseArguments() file_path = options.f...
d0981d279f7090d5309aa564252dba731a34a66b
360c1f6bbd80164031e92ff9ea6231af691d4410
/py2.7go/SQL/mongo_Project_2429/testDicts.py
3ea446d1eeade809e2df2eeee14afacf568aecce
[]
no_license
sirlaxalot24/mongoDB_lesson_1_2429
210b341cad8880b0d134a4ac33ff7497c23d17d8
2e2cd037864719ce0cb6d3e2733e60c750911806
refs/heads/master
2020-04-16T16:40:07.894835
2016-08-28T02:13:44
2016-08-28T02:13:44
38,451,248
0
0
null
null
null
null
UTF-8
Python
false
false
188
py
testDicts.py
import csv from pprint import pprint as pp with open('nodes_tags.csv', 'r') as f: tags = csv.DictReader(f) for row in tags: if row['key'] == 'FIXME': pp(row)
f0a54feaa165a393c4e87cbac2a38347633acf5a
684fa037a3a067a2df2b5d8ded642383bb4e5904
/hiitapp/hiitapp/views.py
f140425c9ec2b6145ec6c153d3fd7bb5bb1e0bbb
[]
no_license
johnvanaltvorst/hiit-workouts
1800a1854aa1d8c43a2e7d36811794612a829730
69122eec4d4d72472d3fab49da8b9b8b3755cc82
refs/heads/master
2021-05-03T10:12:41.867600
2018-02-25T02:03:57
2018-02-25T02:03:57
120,530,137
0
0
null
null
null
null
UTF-8
Python
false
false
284
py
views.py
from django.shortcuts import render from django.views.generic import TemplateView # Create your views here. def index(request): context = 'Welcome home' return render(request,'base.html',{'context':context}) class HomePageView(TemplateView): template_name = 'base.html'
5000663e3cde9c1a1100c9022707ccae13db0034
29163fe89ffc403c06b6b1cb7e6736a9c8e615a6
/statwolf/services/baseservice.py
f4b14f672489e92fb09038a25d848eb1cee88a8f
[]
no_license
Statwolf/statwolfpy
0f21ccad34e2a2642972755cd6359853fc43a3fe
76abafdef0de27e95a5bf7b0dc1097b44ee40833
refs/heads/master
2020-04-17T00:51:34.237616
2019-05-08T06:58:42
2019-05-08T06:58:42
152,065,325
0
0
null
2018-10-22T20:08:57
2018-10-08T10:59:28
Python
UTF-8
Python
false
false
209
py
baseservice.py
class BaseService: def __init__(self, context): self._context = context def post(self, path, body): result = self._context.http.post(path, body) return result.json()["Data"]
da55d9a6534525e58b6c1d2db997e90a1c9b0f36
727d97f43db8d4cd39490de6752ed3bf8f30105d
/transform1.py
c63fd8349b3dad008923386ded257b0a8019c69b
[]
no_license
Aaaaanyaaaaaaa/mds20_cohortneyFull_Project
711aad0282a1bb2a66b08b4024371d9c6bf8cceb
c273ed4ca40471aa3ebe778dd792c52a39af8bd3
refs/heads/main
2023-03-29T22:19:43.020977
2021-03-30T13:19:54
2021-03-30T13:19:54
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,671
py
transform1.py
import torch import tarfile import pickle import pandas import json import argparse from pathlib import Path import numpy as np import shutil from shutil import copyfile import os import re import pandas as pd import sys from numpy import asarray from numpy import savetxt sys.path.append("..") def parse_arguments(): ...
325cc2fd82c44d0b7e291384159bd48d068e60f1
35e82d6b0e85b4a41e34e2d028ce8a5f09a50766
/src/ED.py
63a55cf200377e262e1abf35930e9ec0909b936b
[]
no_license
wwxy261/ExactDiagonalization
cb1e79fcf032670cb7b6504e242f04a33fe3cc29
1a8d9d816c5a7aa24206aeb4eec228bd093bd5e3
refs/heads/master
2023-08-27T19:16:41.456142
2021-11-10T17:43:32
2021-11-10T17:43:32
425,830,249
0
0
null
null
null
null
UTF-8
Python
false
false
1,840
py
ED.py
import time from numba import njit import scipy.sparse as sparse import scipy.sparse.linalg as sparse_alg L = 12 Nup = 6 Ndown = 6 t = -2.0 U = 10.0 hoppings = [(i, j, t) for i in range(L) for j in range(L) if abs(i - j) == 1] @njit def hammingWeight(n): res = 0 for i in range(32): if n & (1 << i): ...
d7dee3311e202ae50172077940fc625f1cc6836d
ca574e5dd6b375cd1703f3535d3ba6e64aaa4b59
/Lib/GetteacherData.py
d83bb4a4fee202ba66ffe9321f841d7b4ebf0a53
[]
no_license
chensiting/teach
834b83cf1ff05c879b0c8fd96ca7f4fff7047a5f
d6e45d892403dcaffa6f563fe37fade539a3f56e
refs/heads/master
2023-01-28T15:05:32.066172
2020-12-13T11:05:07
2020-12-13T11:05:07
321,043,467
0
0
null
null
null
null
UTF-8
Python
false
false
688
py
GetteacherData.py
#time:2020-11-28 import xlrd #读取库 def get_teacherData(): excelDir = r'../data/松勤-教管系统接口测试用例-v1.4.xls' workBook = xlrd.open_workbook(excelDir, formatting_info=True) # 保存原样---样式 # 2-操作对应的用例表 workSheet = workBook.sheet_by_name('3-老师模块') # 通过表名获取 dataList = [] for cnt in range(1, 2): # 到第四行 ...
464069e47c65347e000991135e6ac2da5bc6ac30
3d1c9efa7dc50b439dd148d4b231b85438f2c675
/DevilYuan-master/Stock/Select/Ui/Basic/Param/DyStockSelectParamWidget.py
cf9fcf3286b7da50ca6edbf44905abbd0daa1285
[ "MIT" ]
permissive
upton1919/N.C-Finance
b42470e2d81ffadde8fabffd7aa8ba55d634d3da
303fe82821bb83de6bb98d8766858ee3555b9985
refs/heads/master
2023-04-17T04:41:09.632608
2020-09-22T08:07:16
2020-09-22T08:07:16
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,706
py
DyStockSelectParamWidget.py
from PyQt5 import QtCore from PyQt5.QtWidgets import QTabWidget from .DyStockSelectStrategyParamWidget import * #选择参数组件(加一个表格放在这个TAB里面) class DyStockSelectParamWidget(QTabWidget): def __init__(self): super().__init__() self._strategyParamWidgets = {} self.setTabsClosable(True)# 可以通过关闭按钮...
c126f30a163fb90e3b5e95686e59272ec4b4d704
a8ee9fae022973fec426c60b29fffe9cbf346504
/find_element_by_name.py
23e0957e9c1afdac5eb329e748fa40c129bc314a
[]
no_license
Hansel-Lin420/Python_Selenium
7e6d902908e0f0fc7c92239daf38c0308fbe3141
91eac4defea16ff0d14f679dae1e0e061157cffa
refs/heads/master
2022-10-31T05:27:27.082073
2020-06-14T12:55:33
2020-06-14T12:55:33
null
0
0
null
null
null
null
UTF-8
Python
false
false
400
py
find_element_by_name.py
# -*- coding: utf-8 -*- """ Created on Mon Jun 1 03:10:51 2020 @author: ASUS """ from selenium import webdriver from selenium.webdriver import ActionChains import time driver = webdriver.Chrome() driver.maximize_window() driver.get('https://www.google.com.tw/') driver.find_element_by_name('q').send_keys('asia univer...
11d073b1e63833813f93b2c7c8728e2fcc141185
867eeb3133c2746b60ffa2cd15ac264e5357c86b
/app/tests/test_app.py
b7b2d97ad47d1f958e07302add351f522b811282
[]
no_license
Gdango/SkinCare
3a5ddbc6f17714b24dec3225b87220b1cf7ed29a
dd642cb415dcc5364238583af95daeb5153725cc
refs/heads/updatedb
2022-12-12T16:33:58.431540
2021-09-16T06:10:28
2021-09-16T06:10:28
231,278,332
1
0
null
2022-12-08T12:06:22
2020-01-02T00:06:05
Python
UTF-8
Python
false
false
571
py
test_app.py
from app import app import unittest from unittest.mock import Mock class FlaskApp(unittest.TestCase): # test response is 200 def test_index(self): apps = app.test_client() response = apps.get('/') self.assertEqual(response.status_code, 200) '''def test_valid_query(self):...
ad28c691095f2a4611199f3750889eaca730c6af
cd0c02076ae7ec2ab76e910962165d468fc136e9
/virta_health/virta_health.py
71e28ee76347e20237bd7d3b987831e3aa2f6be1
[]
no_license
joeb1415/interviews
804700fcdc528d235ec24ecac875820427c5a999
01c2998e79d4d343eb9168af687924b3efba9a66
refs/heads/master
2021-08-07T22:25:59.432037
2021-01-28T23:20:37
2021-01-28T23:20:37
99,956,688
0
0
null
null
null
null
UTF-8
Python
false
false
36
py
virta_health.py
# 8/3 1pm # two coder pad interviews
d47e4b03a72a49d775cb15475f56c0dfd7fb75da
3d5f1e47e9a7892f2fadb05a15d85618e99fbe78
/configLoad.py
b3007933bb24249a154eff4173dad158b8e43098
[]
no_license
yonghenglh6/human_count_project
2c1f5ac7c8a014484edcf9c6fd8ee8de0091496e
bfb1681cbcd9673e95f3827312f0fd3d4fcddb0a
refs/heads/master
2021-01-20T22:04:53.959523
2016-07-23T15:12:00
2016-07-23T15:12:00
63,710,611
1
1
null
null
null
null
UTF-8
Python
false
false
3,298
py
configLoad.py
import ConfigParser import string import os globalConfig = {} source_flag='.src.jpg'; result_flag='.rs.jpg'; boundingbox_flag='.bbox.txt' def load_cameras(): globalConfig['cameras'] = []; camera_dirs=os.listdir('camera'); for camera_dir in camera_dirs: if os.path.isdir('camera/'+camera_...
5264385ecda2d8a5186db80e62d246a6aace6df4
048a38ac3692a8970a11d792702db9be6752cb84
/miinimum arvust.py
63950956b2f1682bd4e1225d3cefa38bafadaf00
[]
no_license
erkitammeaid/school-exercises
bb9960473bc6eae8ccd40c82607d6093315cbda4
553e774ec92a8c3eb6c41de424857df2281bf354
refs/heads/master
2022-04-14T05:44:27.606165
2020-04-17T12:24:47
2020-04-17T12:24:47
209,001,546
0
0
null
null
null
null
UTF-8
Python
false
false
123
py
miinimum arvust.py
a = True if a == True: print("a on tõene") print("True") else: print("a on väär") print("False")
58ba3185788c881f803140ac32c325660650c87e
be0255891408824a726f17ce85a0e40d301a5028
/Models/querysets/Field lookups/__isnull/tests.py
4b57107369d08a5d1c50eebe587a8b4c9878fa4a
[ "Unlicense" ]
permissive
andrewp-as-is/django-examples
43259e849a5956176a26a291df433cd183567b66
dfafa450668cac5c0351f6c7238b8886511229bf
refs/heads/master
2021-07-07T09:56:59.522478
2020-12-03T19:58:44
2020-12-03T19:58:44
194,065,875
0
0
null
null
null
null
UTF-8
Python
false
false
225
py
tests.py
#!/usr/bin/env python from .models import MyModel """ https://docs.djangoproject.com/en/dev/ref/models/querysets/#isnull """ qs = MyModel.objects q.filter(field__isnull=False) # equivalent to: q.exclude(field__isnull=True)
a50f6a3c0004aa80bb1bb4d23a325bef3f8d50ed
a4a71acf369f8a3fe506a0000443d077ba0a700c
/src/models/rnn.py
70e77c781bccefd6aede02b1c09700f6af204aa5
[]
no_license
keerthisaran/toxic_comment
4b3c6b340e4f54899463a36abef77770b1bc8fd3
e2a297026d8e0455d95b48d104d4837a25cc8d33
refs/heads/master
2023-03-12T14:33:08.026144
2021-03-08T02:49:46
2021-03-08T02:49:46
345,332,861
0
0
null
null
null
null
UTF-8
Python
false
false
1,680
py
rnn.py
from abc import ABC, abstractmethod import tensorflow as tf from tensorflow.keras import layers class RNN(tf.keras.Model): def __init__(self, vocab_size, emb_dim=128, gru_units=64, FFN_units=512, nb_classes=2, ...
7964122d945d9bbc4b42997af7dad5152c92bbbe
48333158cfd46c9688b0271c71756b15fef5d2a3
/invivbility_cloak.py
518128069415d554bac7b29dfd1eda948711987d
[]
no_license
akritisneh/HarryPottersCloak
83788f9b6fd76a95f202f432510f078f670da756
d8c82789fa289634ea61b2387fb246afa55c5738
refs/heads/master
2023-03-18T06:44:42.626924
2021-03-08T12:38:18
2021-03-08T12:38:18
null
0
0
null
null
null
null
UTF-8
Python
false
false
977
py
invivbility_cloak.py
import cv2 import numpy as np cap = cv2.VideoCapture(0) back = cv2.imread('image.jpg') while cap.isOpened(): ret, frame = cap.read() if ret: #convert hsv hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV) #cv2.imshow('hsv', hsv) #bgr: np.uint8([[0,0,255]]) l_red = np.array([0...
ea93159071a4e10d7fe38120dccc05e232adbe44
6a37d562cd7d818356a5378fd7d88b934ccf7d66
/botnet/modules/builtin/sed.py
57cacab42692825b9a8b96edd6905855799de6e3
[ "MIT" ]
permissive
boreq/botnet
2525c7a99050aeb468f229e73c75324a35bdc2f6
7144414d009810ee265275ec22c8d590da5343cc
refs/heads/master
2023-07-09T18:58:04.842309
2023-06-26T15:42:51
2023-06-26T15:42:51
28,279,420
78
40
MIT
2018-05-19T23:06:48
2014-12-20T21:21:11
Python
UTF-8
Python
false
false
3,854
py
sed.py
import os import threading from ...helpers import save_json, load_json, is_channel_name from .. import BaseResponder import re def make_msg_entry(author, message): return { 'author': author, 'message': message, } def parse_message(message_text): pattern = re.compile('^([^:, ]*)[:, ]*s/([...
46d0ec68ea0182727aa67abd0438c76a5e74e366
9c658efd4a25610be278724eecf11cdd5dd15e27
/examples/multipage/app.py
e11e7617e995444b37791ecda5014dcab3723cc7
[ "MIT" ]
permissive
stevej2608/dash-spa
65e65d3f52ac01f5b3819a2aa4e543c19c416e6a
5a778c7fe24f6d77a7603b623b39edcf707adeb4
refs/heads/master
2022-09-16T23:46:31.936361
2022-09-04T07:39:56
2022-09-04T07:39:56
210,648,973
56
7
null
null
null
null
UTF-8
Python
false
false
1,542
py
app.py
from dash import Dash, html import dash_bootstrap_components as dbc from dash_spa import logging from dash_spa import DashSPA, page_container from dash_spa.components import NavBar, NavbarBrand, NavbarLink, Footer from server import serve_app from .pages import page1, page2 def create_dash(): app = DashSPA( __na...
0010c32b9394fba33b306e5152ddda5528e138b6
7b1b4ed8bd4c887362b367625a833c28aa919dd8
/wpaudit/providers/azure/resources/virtualmachines/images.py
15faf8b77679222d5ab6bfe7a7512c1cc20a107c
[]
no_license
wperic/wpaudit
6bbd557c803ce9bceb764c1451daeb5e440a3d9c
ed69c1eabcf85e80ed8fe5397d2d369fd3ff35d8
refs/heads/main
2023-07-16T21:36:57.528548
2021-09-03T10:35:43
2021-09-03T10:35:43
402,716,870
0
0
null
null
null
null
UTF-8
Python
false
false
1,290
py
images.py
from wpaudit.providers.azure.facade.base import AzureFacade from wpaudit.providers.azure.resources.base import AzureResources from wpaudit.providers.utils import get_non_provider_id class Images(AzureResources): def __init__(self, facade: AzureFacade, subscription_id: str): super().__init__(facade) ...
a3c1442265a9f12949160027c6a2091de047820c
6cec85994d72772a7e61cf4d4b0019153842aa18
/code/generate_mallet_corpus.py
d32c2c694ca911533bcf0358525834ca26cc305f
[]
no_license
anuzk13/citation-function
b4f00122edd61865983cb90db49b03e7206d4126
fdd767c5bf61b585d59a63123b1d496394f60d57
refs/heads/master
2020-04-25T12:41:13.322760
2019-02-26T21:56:50
2019-02-26T21:56:50
172,785,718
0
0
null
2019-02-26T20:31:15
2019-02-26T20:31:15
null
UTF-8
Python
false
false
3,909
py
generate_mallet_corpus.py
import sys import re from joblib import Parallel, delayed from fuzzywuzzy import fuzz from collections import OrderedDict from collections import defaultdict from numpy import mean from scipy import spatial from nltk.corpus import stopwords import os from random import shuffle import fnmatch reload(sys) sys.setdefaul...
1fb76fa97917d2709c5d6127ea9b8e70717f281e
9de94561cf069840ccdf4a68236f60b8d9572c45
/src/djrtime/tests/settings.py
fd4c1463a95ca0cd93416aa63763820b52869221
[ "BSD-3-Clause" ]
permissive
amitu/rtime
e69ee297e552bb9c8cac62ce30e73add2ff89641
6e23a2f86a2cae4399932879f0d157f8e63a8358
refs/heads/master
2021-01-11T04:05:30.919683
2016-11-08T08:14:09
2016-11-08T08:14:09
71,249,582
2
0
null
null
null
null
UTF-8
Python
false
false
2,380
py
settings.py
import os import sys BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.append(os.path.join(BASE_DIR, '../pyrtime')) SECRET_KEY = 'secret' DEBUG = True ALLOWED_HOSTS = ['*'] ROOT_URLCONF = 'tests.urls' WSGI_APPLICATION = 'tests.wsgi.application' DATABASES = { 'default': { ...
9d2bf7d3fffd7785ee733cad5b769843bf20e42c
f25878f99d67d726a3bdaacc5c2197a63c2a9a52
/ch17/4.py
d41def4142f8a1e1d1e8f28b3e69b364a0802ad5
[]
no_license
andrabogildea/cci
385c859c7086d6efaa5634241a8970a0c466fc50
7db2ef50b896ebf1c242570a13777865fc5e8162
refs/heads/master
2021-08-29T22:42:44.512630
2017-12-15T06:10:56
2017-12-15T06:10:56
114,332,978
0
0
null
null
null
null
UTF-8
Python
false
false
576
py
4.py
class Solution: def max(self, x, y): max_nr = { 1: x, 0: y } return max_nr[self.greater_than(x, y)] def max2(self, x, y): sign = self.greater_than(x, y) flipped = sign^1 return x * sign + y * flipped def greater_than(self, x, y): retu...
52ccf1fda1f91a7112b74d45efe09ce11807b0ea
febac9b7d94d0fd63e9a152046740ea679f58d81
/2017.01-2019.12/876-链表的中间结点/876-2.py
9b38d256366bb6972d4b0d567c6395723869b488
[]
no_license
Ten2016/Leetcode
d4132f3192fcac9b58d26d29a64d7dd4f4e02970
6c885adb3b45fa0128f769fa0005e94b33bb1102
refs/heads/master
2022-01-12T07:54:34.805946
2022-01-01T12:01:01
2022-01-01T12:01:01
151,939,348
0
0
null
null
null
null
UTF-8
Python
false
false
455
py
876-2.py
# Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None class Solution: def middleNode(self, head): """ :type head: ListNode :rtype: ListNode """ n=0 p=head while p.next: ...
cd6f5890ae43bc7ab8ab5ab061855cd45adfe5da
d7c6a95001b7dbb31e02cfa155c765b2ab74407e
/diagnostic.py
3968de5d6c45dd5a9642023acf374320538858dc
[]
no_license
SIMCA-USI/V2X-Tools
3837093c4d9d32406876e1517164b5fb50087bf0
dbec7414418985624f2c3f2298950e2c07cb5ff7
refs/heads/master
2020-05-30T21:02:59.468638
2019-06-03T13:06:03
2019-06-03T13:06:03
189,963,210
0
0
null
null
null
null
UTF-8
Python
false
false
4,641
py
diagnostic.py
""" Script utilizado para comprobar el estado de un módulo, borrando automáticamente logs antiguos, poniendo la fecha correcta en caso de que se haya desconfigurado y lanzando el jar de AUTOCITS. """ from datetime import datetime from traceback import format_exc from pexpect import pxssh import argparse def log(ms...
c4886b53803f2d2385b4509b1be43274c9496fc1
1f2149dd3640d31c3e1ec8925f7d54ecf9aeca38
/python/main_script.py
88d697a635247888a150a7a9e998b0d6495bb4b4
[]
no_license
iiiiii1wepfj/rss-news-to-telegram
f0b49c99ef7ab93ea04a7c9f291d23cc86c1ae04
3f99f3818bfc2ad2352c011eaaa0b5cda3cdb77c
refs/heads/master
2021-08-28T06:56:19.845830
2017-12-11T13:52:33
2017-12-11T13:52:33
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,443
py
main_script.py
import sqlite3 from time import sleep import feedparser from pip._vendor.requests.packages.urllib3.connectionpool import xrange import telebot import constants bot = telebot.TeleBot(constants.token) con = sqlite3.connect(constants.bd_name) cur = con.cursor() def refresh_news(): mas = [] d = feedparser.parse(c...
c82f9f69a046b3bba313082acac8db3ad819dd90
4e90a4a1802439258f474a0a2fa89f9cddf2ecfc
/tasks.py
b31a3538553c6abacdc4e624779b28a0b36538a1
[]
no_license
gjthompson1/instapath_image
0dd27645aec9fcf11a533e9bb1f963df4c2112bc
fa72a8f3cf16c91ca7a83d037607f0e592745bae
refs/heads/master
2021-06-21T02:43:45.063146
2019-10-12T01:25:12
2019-10-12T01:25:12
214,552,231
0
0
null
2021-05-06T19:42:41
2019-10-12T00:53:44
Python
UTF-8
Python
false
false
292
py
tasks.py
from invoke import task, run from subprocess import call @task def build(c): call("docker-compose down", shell=True) call("docker-compose build", shell=True) call("docker-compose run server python3 manage.py db_setup", shell=True) call("docker-compose up -d", shell=True)
e6e7ee978c3d74b8e18b96dd9516d26659053c74
0fca0eccd1a9c96f188c730d3c516708d739c506
/app.py
6cf85f64ddc92184f32b023b9f99f37c1ea5cee2
[]
no_license
MariuszStolarski/OpenBankingWebService
5037a3dc4710c45cee7ac3a0be599cac4e7862b8
72280181a4bc13637485d7a8ea404ab6f11e8634
refs/heads/master
2020-03-20T05:07:40.120485
2018-07-16T11:09:20
2018-07-16T11:09:20
137,204,422
2
1
null
null
null
null
UTF-8
Python
false
false
2,969
py
app.py
import os from flask import Flask, jsonify from flask_restful import Api from flask_jwt_extended import JWTManager from resources.user import ( UserRegister, UserLogin, UserLogout, TokenRefresh ) from resources.accountRequest import AccountRequest from blacklist import BLACKLIST app = Flask(__name__) app.co...
e2390f9251e79bfd2e1b111ce6c15902784e55e0
1f5058fb9b96678996b6b76693dcaa587afbdc4e
/src/pkg/qs_asset_gov.py
3bf01c9ca4665992420b17393e194a02424689a3
[]
no_license
CYarros10/aws-okta-quicksight-governance
77a7fcfaaff8142f80831f415d7552f762068303
298834a9b267b042c48089dc913678f1d0682ee8
refs/heads/master
2023-03-14T06:56:38.771609
2021-03-03T16:57:34
2021-03-03T16:57:34
342,030,495
1
0
null
null
null
null
UTF-8
Python
false
false
7,122
py
qs_asset_gov.py
""" Apply QuickSight Group/DataSet Permissions: a. Get Manifest file from S3 containing QS Group Permissions for DataSets. b. Update permissions based on manifest Sample Asset Governance Manifest File: { "assets":[ { "name": "dataset_example_1", "category":"dataset", "name...
fa5af9b9c8950f988f7b5267e07b36719acc4f52
8f7d864d154e333bf8fa7986288d37134b8578b7
/nosqlbiosets/__init__.py
94d36d29a3fd7bfb114a699d47119b17bf424a9c
[ "MIT" ]
permissive
uludag/nosql-biosets
9ac1077d8232fa0f99c77d5d46049e4bfa8a8dcb
b3148efcccdcaa21f684237bb375c1f513bdcee8
refs/heads/master
2023-04-29T04:28:13.433903
2023-04-24T13:10:46
2023-04-24T13:10:46
87,645,482
16
3
null
null
null
null
UTF-8
Python
false
false
504
py
__init__.py
import json def parseinputquery(query): """ Checks naively whether the input could be a MongoDB query-clause If not returns a MongoDB text search query-caluse with given input being the search term """ qc = None if isinstance(query, dict): qc = query else: try: ...
b70f689b57b7ddaa05e2abc38db03e2eabc66912
1486a1cc80650787a6cf3f427eae93c003ad341a
/1. Programming 4 E/Assignment_4_6.py
3e0bc1efe277e8fc688e31c11d9d8cccf1f456fb
[]
no_license
dkljajo/Python-for-everybody---Coursera
9cad625cf4e77a2098098905d7f38fc9798855bc
7b554e6aa8d4d03090a46282f362865db3fbf603
refs/heads/master
2023-03-31T12:16:39.156083
2023-03-16T15:02:59
2023-03-16T15:02:59
196,827,281
0
0
null
null
null
null
UTF-8
Python
false
false
372
py
Assignment_4_6.py
# -*- coding: utf-8 -*- """ Created on Thu Jan 10 20:01:06 2019 @author: dk """ hrs = input("Enter Hours:") rate = input("Enter rate:") h = float(hrs) r=float(rate) def computepay(h,r): if h > 40: req = r * h otp = (h-40) * (r * 0.5) pay = req + otp else : ...
62e904b4fd8cb23223e58a714f0ce4f711be0441
91680d73eeb2b25595796903117065e169b5158f
/SmartShoppingSystem/store/migrations/0002_auto_20180503_2028.py
b5e89512a6a902237e7924ca2dd41644c263fa5c
[]
no_license
ngoclt/smartshoppingsystem
e2ff295592eff4732b8fec28b7ed681d9733d563
06889560f7462ad3010b4c23c0a8972491961678
refs/heads/master
2020-03-15T22:27:29.373889
2018-08-12T15:53:42
2018-08-12T15:53:42
132,373,747
0
0
null
null
null
null
UTF-8
Python
false
false
1,458
py
0002_auto_20180503_2028.py
# Generated by Django 2.0.5 on 2018-05-03 20:28 from django.conf import settings import django.contrib.auth.models from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('users', '0002_auto_20171227_2246'), ('store', '00...
0de0f846ef1da01f0893a706478721f1987b02fa
c3432a248c8a7a43425c0fe1691557c0936ab380
/CodePlus_Practice_RE/2021.03.ThirdWeek/0314/13460_구슬탈출*.py
aee84b8fd34dfcd11355661dafeea2d2f91f8e8a
[]
no_license
Parkyunhwan/BaekJoon
13cb3af1f45212d7c418ecc4b927f42615b14a74
9a882c568f991c9fed3df45277f091626fcc2c94
refs/heads/master
2022-12-24T21:47:47.052967
2022-12-20T16:16:59
2022-12-20T16:16:59
232,264,447
3
0
null
null
null
null
UTF-8
Python
false
false
2,352
py
13460_구슬탈출*.py
# https://rebas.kr/725 # https://m.blog.naver.com/lizziechung/221859103444 (visited 검사의 새로운 방법 제시) n, m = map(int, input().split()) arr = [list(input()) for _ in range(n)] dx = [-1, 1, 0, 0] dy = [0, 0, 1, -1] visited = [[[[False] * m for _ in range(n)] for _ in range(m)] for _ in range(n)] def move_position(red, ...
f9daee3bf10828158fc5945dec046ee75c0f5294
0d62be21c3843033076621823069144be9b81930
/Led/app.py
78700bf9b572806b01ce104ce83377bb2b2c75ed
[]
no_license
dungace/Project
2089cad3fe22877c161c105eaf6eb23bf82a9f15
822fe6a64049d31aec18fb7881044706ab9cf89c
refs/heads/master
2023-03-17T08:39:05.254743
2021-03-15T11:27:31
2021-03-15T11:27:31
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,303
py
app.py
from flask import Flask , render_template, request import RPi.GPIO as GPIO app = Flask(__name__) GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) led_1 = 17 led_2 = 27 led_3 = 23 led_1Sts = 0 led_2Sts = 0 led_3Sts = 0 GPIO.setup(led_1, GPIO.OUT) GPIO.setup(led_2, GPIO.OUT) GPIO.setup(led_3, GPIO.OUT) GPIO.output(led...
22c76a11b069461b29d491581baeefec442abff6
0b30a964e8a5385b39190b24a9fcda7b3b86daf0
/MotifSearch/dmel_compare.py
dd0f66cd4dadeeea1dd12890f1d203e2bc457b8d
[]
no_license
jmf422/Daphnia-MA-lines
24fa661581011cabf1317ae6dfa7da659c2820f2
e35175c4f630e6b798e2d1fd5e9dab9514eb0573
refs/heads/master
2021-01-21T21:09:35.298598
2017-08-15T13:54:18
2017-08-15T13:54:18
92,311,634
2
0
null
null
null
null
UTF-8
Python
false
false
806
py
dmel_compare.py
#!/usr/bin/env python def get_rotations(kmer): '''Returns all rotated versions of k-mer.''' return [(kmer*2)[i:len(kmer)+i] for i in range(0, len(kmer))] # read in drosophila data, make a list dmelkmers=list() with open('dmel.commonkmers.txt', 'r') as f: for line in f: dmelkmers.append(line.strip()) ...
355ff04b30ea6f26be775f74a9e106ae6f09fc5e
105e1b00c440f363e3c6641ffad3fe4f7abd10c7
/SConstruct
ce78ed77ad41e8813b1373cc5d08d3ea48eb7f40
[ "MIT" ]
permissive
maxmurder/gdsqlite-native
4707071f04d3dfa04155c27da9623893b1c4133d
073b085cda3217f74e3f2d4d82527cb8c607ced3
refs/heads/master
2021-06-16T22:44:04.121860
2017-05-09T17:52:05
2017-05-09T17:52:05
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,599
SConstruct
#!python import os # To compile the module you need to run # `scons p=linux` to compile for linux # `scons p=windows` to compile for windows # on linux you can optionally use `use_llvm=yes` to use clang instead of gcc # Mac/Android will come soon as well. (help is appreciated :D) # Set it with your own path cpp_bin...
e7c28535cf71a1bbe2e2be384607dcc77b63294d
4f4776eb69cbea9ee1c87a22732c5d778855c83a
/leetcode/Single_Number.py
5a5c021ea55e03f337b1014bd44ed1d775299d45
[]
no_license
k4u5h4L/algorithms
4a0e694109b8aadd0e3b7a66d4c20692ecdef343
b66f43354792b1a6facff90990a7685f5ed36a68
refs/heads/main
2023-08-19T13:13:14.931456
2021-10-05T13:01:58
2021-10-05T13:01:58
383,174,341
1
0
null
null
null
null
UTF-8
Python
false
false
554
py
Single_Number.py
''' Single Number Easy Given a non-empty array of integers nums, every element appears twice except for one. Find that single one. You must implement a solution with a linear runtime complexity and use only constant extra space. ''' class Solution: def singleNumber(self, nums: List[int]) -> int: memo ={...
97dfc5309a132d1a728d0957feac1ebcdd875684
60bf41044eaa9c33d4adbd9c7afe0315850aeb32
/Python 36.py
0c7d0022e70d4a7e649c5b233d9f19fe6ea4c2e6
[]
no_license
Bocca1970/primary-admin
95a372c614224d6eaeaa360b265ed5e5b6f6eef5
07f1968635d9d42efbca8189e7af27017104ff84
refs/heads/master
2021-08-23T12:01:03.195155
2017-12-04T19:56:36
2017-12-04T20:30:31
112,212,179
1
0
null
null
null
null
UTF-8
Python
false
false
311
py
Python 36.py
# --------------- Python 36 --------------- # -------------- Zbir kubova -------------- # Faktorizacija zbira kubova vrsi se prema sledecem pravilu: a = float(input("Unesi vrednost a: ")) b = float(input("Unesi vrednost b: ")) zbirKubova = ((a + b)*(a**2 - a*b + b**2)) print("a ** 3 + b ** 3 ", zbirKubova)
30e1e74703868910ac4291ccbb40c0f27603f95a
bb49ca8887b7a6b8867165ab26b045f1d5bcf7a7
/leet_code/easy/leet_candy.py
bd4ec1e1edfd2a52d8229e4a2e72ca7a92281807
[]
no_license
albusdunble1/Leetcode
118a91e164e17fd54d794998e8cccd73f9f39289
980d22f3c8ee6487175252eeba5f4ceb6152c294
refs/heads/master
2020-06-25T09:35:16.729899
2019-11-01T14:09:06
2019-11-01T14:09:06
199,273,051
0
0
null
null
null
null
UTF-8
Python
false
false
959
py
leet_candy.py
class Solution(object): def distributeCandies(self, candies, num_people): """ :type candies: int :type num_people: int :rtype: List[int] """ extra = 1 output = [] while candies > 0: for j in range(num_people): idx = j+1 ...
f8fdd2a1423a08d3196b0d2fb4d6fa0210a61008
8b6f9de3541f71bed21abec5771251106b9cddf4
/blog1/admin.py
7c63a32b69fbd31985dd2904092a715b729e0989
[]
no_license
jun-ge/myweb
57c47cd447accb65fee23223c28a238a83d63cbe
76af666202de42c380520ef2aa2a9089218da23f
refs/heads/master
2020-03-13T04:16:08.761658
2018-04-25T11:02:18
2018-04-25T11:02:18
130,959,753
0
0
null
null
null
null
UTF-8
Python
false
false
156
py
admin.py
from django.contrib import admin from blog1.models import User,Article # Register your models here. admin.site.register(User) admin.site.register(Article)
7e660f63db3cf2831ad9d2a0b2b7830554700b32
974653948225c225abbebaa5fcf0cdb075b2b6a6
/projects/rev_digits_of_number.py
795e16def1176400c0cdcd95bac62a268a7fef57
[]
no_license
gagansokhal/python
00cd8910bcd224d6bbec5c5f1c3c58cd9e11d99b
d2f80da42410a77512ea9844b3800f79b4a10700
refs/heads/main
2023-08-01T12:08:57.269712
2021-09-12T17:51:58
2021-09-12T17:51:58
403,404,014
1
0
null
null
null
null
UTF-8
Python
false
false
188
py
rev_digits_of_number.py
num = int(input("Enter a number: ")) def reverseDigit(num): while num > 0: digit = num % 10 print(digit,end=" ") num = num // 10 reverseDigit(num)
58b1dc9dc16f241a6937400e8ddfff3f03b09e3d
22b31eaf388feb1412d0e99cddc81cd6f4e8163b
/seedbank/urls.py
acd1869fecb97550eeeb885a67f22252460a52cf
[ "MIT" ]
permissive
rankrh/soli
e7cf45380bbf9684c9ccea4fd8eb9d64b03b3aee
8f19945a175106064591d09a53d07fcbfa26b7da
refs/heads/master
2021-06-17T01:34:22.400034
2021-06-11T17:16:20
2021-06-11T17:16:20
206,982,251
0
2
MIT
2021-01-20T02:37:28
2019-09-07T14:48:53
JavaScript
UTF-8
Python
false
false
163
py
urls.py
from django.urls import path from seedbank.views.seedbankdetail import SeedbankDetail urlpatterns = [ path("", SeedbankDetail.as_view(), name="seedbank"), ]
d571dddf4378a5aa3b2254cc9ad5be101854ca73
fe28ca6f701ff4260962541367bea26a0aace373
/python/ImageProcessing/overwritePixelValues.py
a8541147d38a9ac14a6374b275e7587fb7976657
[]
no_license
kojiryo/mytools
5bcfb5c9b7bf5f740153e56f5c1142c501444c6a
7cd27d8ab3d385d78c00cc9ff6e254a12414e3e8
refs/heads/master
2020-04-21T16:26:12.983470
2019-10-04T08:33:58
2019-10-04T08:33:58
169,701,214
0
0
null
null
null
null
UTF-8
Python
false
false
1,336
py
overwritePixelValues.py
import cv2 import sys import os def main(): """ overwrite grayscale image files with each pixel values """ argvs = sys.argv argc = len(argvs) if argc == 1: print('usage: overwritePixelValues.py <path/to/*.png> ...') sys.exit(1) os.makedirs('result/overwritePixelValues', ex...
acbbc64c6ae7a9e6797ec63492fa8e053f061ab9
8d51c32ca968c1269eb447dd88a34583338bb695
/resources/auth.py
b779e649ce8cf306c8c43afb00f04095def2c384
[]
no_license
kaggrwal/Sahyog
dd5fa78601b1446da9ee2aa4db18795560dce64f
8403dadd80522fceb063170f944a543bc13c9378
refs/heads/main
2023-01-29T21:02:46.352281
2020-12-13T18:57:16
2020-12-13T18:57:16
321,137,920
0
0
null
null
null
null
UTF-8
Python
false
false
4,627
py
auth.py
from datetime import timedelta from flask import Blueprint, url_for, request, flash, session, current_app from flask_login import login_user, login_required, logout_user from flask_restful import Resource, abort from werkzeug.security import generate_password_hash, check_password_hash from varname import nameof from w...
6f1e55f9a3176f2fbbf23617201a06ffe5609386
19d5ac0f9812d99e3c53daaf691e75eb24fb0d9d
/setup.py
dce6dfea026a983077845a54624c8d6839c15f00
[]
no_license
borundev/pytorch_examples
3ee142cf55c276053b00a473b3b98ac533ca2d0c
1d97033d786cff93f69dcf38b202d42c0fc63f1d
refs/heads/master
2023-05-03T21:58:26.117930
2021-05-07T21:17:24
2021-05-07T21:17:24
329,625,250
0
0
null
2021-01-19T13:39:26
2021-01-14T13:35:05
Python
UTF-8
Python
false
false
774
py
setup.py
from setuptools import setup,find_packages packages=[] packages+=find_packages() setup(name='pytorch_examples', version='0.1', description='Examples using pytorch and pytorch lightning', url='http://github.com/borundev/pytorch_examples', author='Borun D Chowdhury', author_email='borunde...
2369bfd5a405149bd4f3b184f72adc72857c2a11
ca7aa979e7059467e158830b76673f5b77a0f5a3
/Python_codes/p03448/s444078708.py
632ced4bd57f3c13d86a0ec14ae52aa24a1c5759
[]
no_license
Aasthaengg/IBMdataset
7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901
f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8
refs/heads/main
2023-04-22T10:22:44.763102
2021-05-13T17:27:22
2021-05-13T17:27:22
367,112,348
0
0
null
null
null
null
UTF-8
Python
false
false
238
py
s444078708.py
# a, b, c, x = map(int, open(0)) A,B,C,X = [int(input()) for i in range(4)] count = 0 for i in range(A+1): for j in range(B+1): for k in range(C+1): if 500*i+100*j+50*k==X: count+=1 print(count)
4923db46fb0e4cb21985dcc57687982e2d1749bb
8f9c922ab8249a7d8544db4da32a2afaa0a67c74
/core/views.py
a26ad9ec1f1db76aa4651873a82d092dd0b53c58
[]
no_license
AlexSpekhov/blog
800fd3fb099e4fd83e822a1c953a0d1ac9927268
36b285c4dc4328f3a9b16028daf801096873dd16
refs/heads/master
2020-12-03T01:42:38.071849
2017-06-30T06:03:21
2017-06-30T06:03:21
95,854,179
0
0
null
null
null
null
UTF-8
Python
false
false
1,219
py
views.py
from django.contrib.auth import get_user_model, login from django.contrib.auth.forms import UserCreationForm from django.forms import FileField from django.http import HttpResponse from django.urls import reverse from django.views.generic import TemplateView, CreateView from blogs.models import Blog, Post from comment...
8bf05abb5973eaea1dc48216abb6c4808abea8c1
daa39813f4a7d92c7fdc20b5143e4e97cf69ba2e
/Day-3/series.py
bde9e6555ed20ea295fa874ddaca7046e8dbff5c
[]
no_license
itsme-vivek/Akash-Technolabs-Internship
acee21da2345a8848a52f6a3a6b84c836e5fa184
74e13eabbb5e4e775fc8a8f419eda6ebe83abf22
refs/heads/main
2023-05-30T16:36:02.640744
2021-06-08T12:41:25
2021-06-08T12:41:25
370,923,427
3
1
null
null
null
null
UTF-8
Python
false
false
137
py
series.py
a=int(input("Enter Starting Number:")) b=int(input("Enter Ending Number:")) for i in range(a,b+1,-3): print("the series is",i)
af1ec7022aca5d28a5de66477e3f0b923e3764d4
25cd2e6ccb2a521ba571ea71d0ad9d305f44475f
/setup.py
fd99f243565eaadccde3134a0a783a535d17034b
[ "BSD-3-Clause" ]
permissive
fitbenchmarking/fitbenchmarking
c7a55951972079d9e84f067cf4fe24d2905ac5a2
5ee7e66d963ebe9296c0a62c24b9616f6c65537e
refs/heads/master
2023-08-28T00:58:08.302581
2023-08-22T10:03:37
2023-08-22T10:03:37
126,030,049
15
10
BSD-3-Clause
2023-08-22T10:03:38
2018-03-20T14:26:19
Python
UTF-8
Python
false
false
2,250
py
setup.py
from setuptools import find_packages, setup from glob import glob with open('README.md', encoding="utf-8") as f: long_description = f.read() setup( name='FitBenchmarking', description='FitBenchmarking: A tool for comparing fitting software', author='FitBenchmarking Team', author_email="support@fit...
21552cc716010822f47a5a4ce1a135aa7326a001
1618ca511f4b62623987b2d1f24d38491649242c
/I Trimestre/condicionalesPython/E16CompañiaTelefonica.py
612663821a1b4368e64827f0cfb795916f935c5e
[]
no_license
jlalvarezfernandez/Python
446024a473d88ea0630d668658732fb9a56e5f51
9151c20260c4321bf6b983a833e82d6d0aee5fab
refs/heads/master
2020-12-13T07:51:21.517408
2020-05-22T12:37:31
2020-05-22T12:37:31
234,352,971
0
0
null
null
null
null
UTF-8
Python
false
false
2,665
py
E16CompañiaTelefonica.py
''' Programa: Ejercicio 16 E16CompañiaTelefonica.py Proposito: La política de cobro de una compañía telefónica es: cuando se realiza una llamada, el cobro es por el tiempo que ésta dura, de tal forma que los primeros cinco minutos cuestan 1 euro, los siguientes tres, 80 céntimos, ...
8835237cbb66c9942eeab544ec0f4da7cbc397a3
50402cc4388dfee3a9dbe9e121ef217759ebdba8
/Proj/RTT/python/RRT/RRT.py
35c7e7cd60399b9c8b87879f6c928f64e9effca8
[]
no_license
dqyi11/SVNBackup
bd46a69ec55e3a4f981a9bca4c8340944d8d5886
9ad38e38453ef8539011cf4d9a9c0a363e668759
refs/heads/master
2020-03-26T12:15:01.155873
2015-12-10T01:11:36
2015-12-10T01:11:36
144,883,382
2
1
null
null
null
null
UTF-8
Python
false
false
3,552
py
RRT.py
''' Created on Oct 24, 2014 @author: daqing_yi ''' import numpy as np class RRTNode(object): def __init__(self, pos): self.pos = pos self.parent = None self.children = [] self.cost = 0.0 def __eq__(self, other): if other == None: ...
ac03e25da8eb76d4fa6b2e0ec3f9a3d0221abcc0
8771950593b9b443bd87c074cc842a620d0c9dd4
/Python/Answers/array_diff.py
08eaa33fc2a315b8d2201c97f409dd30702dab29
[]
no_license
Danarvelini/Codewars
7cc2253b4ca0edc5b75ecd02da049f310d05041e
4241bece00c4b9dde06d652f661ebc7f5e3c3217
refs/heads/main
2023-06-30T18:32:57.460148
2021-07-23T02:59:05
2021-07-23T02:59:05
null
0
0
null
null
null
null
UTF-8
Python
false
false
225
py
array_diff.py
def array_diff(a, b): for i in b: if i in a: for j in range(a.count(i)): a.remove(i) return a #Smart Practice: # def array_diff(a, b): # return [x for x in a if x not in b]
e00e17c5b8f2cda9985d4f29cc570aece4336f5d
56f08baec43d71e1c14846b5dc4a5040ffd4e340
/Data Science/2. Data Scientist. Аналитика. Начальный уровень/6. Основы Python - функции/6.6. Recursion.py
c2ac16d77cc3b0c26ec88e5fcf3831ec185ba2bf
[]
no_license
tungyr/skillbox-study
65539be08aeb2f7e73ec1c0599cdf4d4f4b7cd9f
74b180d1dc5e9b527f7907f9a04086e05bb637f0
refs/heads/master
2023-01-20T00:03:22.414044
2020-11-04T18:26:09
2020-11-04T18:26:09
300,384,189
0
1
null
null
null
null
UTF-8
Python
false
false
2,244
py
6.6. Recursion.py
# -*- coding: utf-8 -*- # ---------------------------------------------------------------------------------------------------------- # # Skillbox, 6.6 - 6.7. Recursion # # https://go.skillbox.ru/course/data-scientist-1/03299f49-36a8-444b-83a6-c2cfd2b2dc95 # # def factorial(n): # print('factorial ', n) # if n =...
e00c41c171f87438aa90b269360e7239c65edced
010409b5fa8ac127763d43514531f90567f7a054
/mainoo.py
ef6e0be45b079578ebb760d8d8a9364591a3301e
[]
no_license
r4nd0wn/r4
d1aa56a7ba37f5e539f67bc02222ea66d1bd20a0
39868a789532075ee6c54cf7ac38b6851a05d19a
refs/heads/master
2020-07-13T23:20:10.959258
2019-09-16T01:01:19
2019-09-16T01:01:19
204,583,567
0
0
null
null
null
null
UTF-8
Python
false
false
8,233
py
mainoo.py
import sys import time import json from riotwatcher import RiotWatcher, ApiError from PyQt5.QtWidgets import * from PyQt5.QtGui import * from PyQt5.QtCore import * import threading import logging from PyQt5 import QtCore, QtGui, QtWidgets # ***HTML Skeleton***# html_upper = """ <!DOCTYPE html> <html> <head> <meta c...
b03c8b0c225ab875ca479fa9c57c3bb5918217ae
1a0e2871897fec3d345653fc3502909d9d2c48c0
/cellprofiler_core/pipeline/io/_v6.py
09e1c68362dd7262a928e89bf8562c4c6f0d0354
[]
no_license
citypalmtree/core
91ec8d75a09240c57a64708985a2e13fdeaab23d
51f7aa318f126d4ec7be59780c8f88d4208b0ab1
refs/heads/master
2022-11-15T03:13:01.843990
2020-07-08T01:56:39
2020-07-08T01:56:39
277,964,195
0
0
null
2020-07-08T01:54:03
2020-07-08T01:54:02
null
UTF-8
Python
false
false
174
py
_v6.py
import re import cellprofiler_core.measurement import cellprofiler_core.pipeline def dump(pipeline, fp, save_image_plane_details): import IPython IPython.embed()
62486391d0e0ebf3cdffc06fcb98831541e88e03
3368542f5157faaa069e71fa2fd43e4260bf69e0
/dibs/settings.py
e2174d230816291a7b9e7f96d3b763f07d073891
[ "BSD-3-Clause", "MIT", "CC-BY-3.0" ]
permissive
caltechlibrary/dibs
4937e274f950e203d1e83d849f944e39d3a9dcde
5b1b3c3a66d3679871f5e54b1a957536a8f981a3
refs/heads/main
2023-05-22T21:32:12.445690
2023-01-19T00:03:19
2023-01-19T00:03:19
327,465,314
22
8
NOASSERTION
2023-03-14T15:20:31
2021-01-07T00:52:33
JavaScript
UTF-8
Python
false
false
8,542
py
settings.py
''' settings.py: interface for parsing the configuration file This implements a subclass of Decouple's AutoConfig object which accepts a parameter for a section name, such that values in a settings.ini file are looked up within that section instead of Decouple's default "settings" section. In addition, the "config" ob...
f5fffa1f9eed3eea2c93b2305380ba3d01ad0207
f6a03e54d8bd754cd4d9048adc55f67b9e248f7f
/CSVImage.py
a27b218bd5ac42971105db729cac48dfdd6714af
[]
no_license
JeromeXu365/TAttack
cd92ee37443d5bb128a237f9751fa6ea8ea78e76
2a21d3fde8fb4107b5db8203285b41de7f5080c5
refs/heads/master
2020-04-02T16:32:59.582098
2019-02-06T06:12:44
2019-02-06T06:12:44
154,617,380
0
0
null
null
null
null
UTF-8
Python
false
false
548
py
CSVImage.py
def convert(imgf, outf, n): f = open(imgf, "rb") o = open(outf, "w") f.read(16) images = [] image = [] for i in range(n): for j in range(28 * 28): image.append(ord(f.read(1))) images.append(image) for image in images: o.write(",".join(str(pix) for pix i...
a909df1ac6dbda889c03a671123751889e2016fd
e9f5df11cc6cc32f7883a189532f36720f20d8ad
/K-Means聚类/K-Means聚类算法简介/K-Means1.py
257b6d78efe16fa275ec45f36aa2ffab97dabb4f
[ "Apache-2.0" ]
permissive
yanfeng12/scikit-learn
1319bb6a0ab24ecc214e96569c09cfb4b6458e36
8cb8de25c0b29aa900cd0d7ba0def589b6060829
refs/heads/master
2020-03-15T23:31:42.423883
2018-05-22T02:01:59
2018-05-22T02:01:59
132,395,749
0
0
null
null
null
null
UTF-8
Python
false
false
3,107
py
K-Means1.py
#聚类。聚类,或称为聚类分析(cluster analysis)是一种分组观察的方法,将更具相似性的样本归为一组,或一类(cluster),同组中的样本比其他组的样本更相似。 #无监督学习 #计算样本间的相似度 ''' 聚类的思想: 给定一个有M个对象的数据集,构建一个具有k个簇的模型,其中k<<=M,满足以下条件: 1.每个簇至少包含一个对象 2.每个对象属于且仅属于一个簇 3.将满足上述条件的k个簇成为一个合理的聚类划分 基本思想:对于给定的类别数目k,首先给定初始划分,通过迭代改变样本和簇的隶属关系, 使每次处理后得到的划分方式方式比上一次的好(总的数据集之间的距离和变小了) ''' #%matplotlib inline...
2d17229afe154937132c1e4f8c138896da34ab61
4ab1d3c508c4af5388e52fa367162082a18c2879
/papermerge/filebased_unique/apps.py
cc5dd89b8728a8f597b8cd182912131ae498e480
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
papermerge/papermerge-filebased-unique
24cfa7798492b609c749c378ec2fa6abffec463b
93af69df9919fd54b8c309f7a7f9b7e69f4f8286
refs/heads/master
2023-03-09T11:08:40.544868
2021-02-23T11:16:56
2021-02-23T11:16:56
341,529,558
0
0
null
null
null
null
UTF-8
Python
false
false
148
py
apps.py
from django.apps import AppConfig class FilebasedUniqueConfig(AppConfig): name = 'papermerge.filebased_unique' label = 'filebased_unique'
cb469b69bf974d39609f79c4f3be686d8106f971
b86eb9a29a19a0a4b7b27e7185a0be108cb35307
/test/sendMessages.py
555c2db680dbef23d252886e9cb9f6a8e69562f1
[]
no_license
jeffmacinnes/pl_gazeMapping_online
da207db80d81e81b3df49158616440a28b8d73c8
77803ef7921dc0a92e74fd6701ec03861aabd017
refs/heads/master
2021-01-20T12:15:30.397529
2017-03-05T23:18:39
2017-03-05T23:18:39
82,646,331
0
0
null
null
null
null
UTF-8
Python
false
false
640
py
sendMessages.py
from __future__ import print_function import zmq import time import random import numpy as np import msgpack as serializer port = '42000' # let the OS choose the IP and PORT ipc_sub_url = 'tcp://*:*' ipc_push_url = 'tcp://*:*' # starting communication threads zmq_ctx = zmq.Context() pub_socket = zmq_ctx.socket(zmq....
17b3f51779bda5a48c4d77c35d6bbdd2aadb13cd
ee87dd5c9b0d23ed3ae9e610b97bfc04b0fff992
/Homework/Homework1-After-Lesson2/conv.py
58d417ff29b804f68eea6639b70bc58f1f808539
[]
no_license
Fire-Sale/Machine-Learning-for-3D-Data
b05654fc2d41294526be141986423752a47c9066
8484e27377f1ba449172c0ed18a5a169dfeb0c18
refs/heads/master
2020-03-16T19:15:59.082502
2018-07-21T16:04:29
2018-07-21T16:04:29
132,907,871
1
2
null
null
null
null
UTF-8
Python
false
false
3,641
py
conv.py
import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_data_sets("MNIST_data/", one_hot=True, reshape=False) def fully_connected(prev_layer, num_units, batch_norm, is_training=False): layer = tf.layers.dense(prev_layer, num_units, use_bias=False, activation=None)...
1ddc261cf174c109583fd0ead1f537673d29090a
e7c3a279fb3347296b2e3cf1447dd55bcff8c8bf
/regular expression/validation rules/rules with eg.py
7693554efbd2a7bd0d191d41f700e9af91bd8935
[]
no_license
athirarajan23/luminarpython
ee61b20e06960c37fe14c6175adf020d06f5b5e7
ee16b071ced48fa8202f659049d34d0df6a55918
refs/heads/master
2023-04-28T07:04:30.114086
2021-05-20T00:48:41
2021-05-20T00:48:41
368,732,867
0
0
null
null
null
null
UTF-8
Python
false
false
2,250
py
rules with eg.py
#rules used for pattern matching # #1. x='[abc]' either a,b or c #eg: # import re # x="[abc]" # matcher=re.finditer(x,"abt cq5kz") # for match in matcher: # print(match.start()) # print(match.group()) #2. x='[^abc]' except abc #eg: # import re # x="[^abc]" # matcher=re.finditer(x,"abt cq5kz") # for match in ...
b220189d506737bf8cff9e600d1cfd4d7bc8435d
e99bff79892ac4f67477a73f4b6a557de0f9e1d3
/src/main/python/org/o3project/odenos/core/util/system_manager_interface.py
62def1be905e45e06dd197fbb3f054e617d79bfe
[ "Apache-2.0" ]
permissive
o3project/odenos
25f6354732861fe2075f399834aec4d974033d62
837d0d3d3c37482e843c40c5eeeac10646e68c65
refs/heads/develop
2022-07-30T23:34:18.339741
2019-11-26T00:55:25
2019-11-26T00:55:25
30,955,207
28
30
Apache-2.0
2022-07-07T21:03:23
2015-02-18T06:44:21
Java
UTF-8
Python
false
false
9,570
py
system_manager_interface.py
# -*- coding:utf-8 -*- # Copyright 2015 NEC Corporation. # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # you may not use this file except in compliance with the License...
f94894e5d3e6a0ff367911c72f4d863ac32c8baa
5da1102312d6f8f4f6ed4376cc2bb80f2000c4f1
/usermgmt/test.py
3f583add196ad7bc167b9d003f6cd4276ca0f81b
[]
no_license
punam2020/EatLoad
039089198a54a8231ee9ec924f5e9594d35b7df3
ab0216b9b14a3384da2b658a7fc87d9541f570ea
refs/heads/master
2020-12-28T15:28:16.369954
2020-02-05T06:58:35
2020-02-05T06:58:35
238,387,963
0
0
null
null
null
null
UTF-8
Python
false
false
286
py
test.py
import requests # url="http://www.google.com" # response=requests.get(url) # print(response.status_code) url = "http://icanhazdadjoke.com/" response = requests.get(url, headers={"Accept": "application/json"}) data = response.text print(type(data)) data = response.json() print(data)
507251113d80eaa3684081f7814470053b04dda9
c7825b019ee0757546fdaf111049aa409f24e460
/CS-136/__Personal/Testing/JuliaSet.py
511e1359bfed28479f54495fe408338e8ab120b2
[]
no_license
compsci-river/CS-136
0a3e61df88a2256b8b305ab10f4330644dcfe5eb
fbf6735b56ce86848b520844cf41c576ce0c8411
refs/heads/main
2023-04-01T03:38:05.130513
2021-04-13T04:29:07
2021-04-13T04:29:07
328,000,053
2
0
null
null
null
null
UTF-8
Python
false
false
1,030
py
JuliaSet.py
# #River Sheppard # # from PIL import Image if __name__ == "__main__": scale = 768 # creating the new image in RGB mode bitmap = Image.new("RGB", (scale, scale), "white") # Allocating the storage for the image and # loading the pixel data. pix = bitmap.load() ...
086c74669b6762a6b35e8a46f816db2f4f172caa
9da6e62ae107d91378966291a0bdb85ce53ae1d5
/interpy/PlotInter.py
8d6ed49801743aa450282d2596402b5e231f55e8
[]
no_license
neojie/vatic
d160355f9f7df4c506563ad494efd56a4f976b19
e8e7e757df48476fc0e2692dd81d8e350aa65e32
refs/heads/master
2022-12-31T07:09:17.338818
2020-10-18T19:03:14
2020-10-18T19:03:14
303,807,579
2
0
null
null
null
null
UTF-8
Python
false
false
4,270
py
PlotInter.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Dec 30 14:34:56 2019 ref : https://stackoverflow.com/questions/11140163/plotting-a-3d-cube-a-sphere-and-a-vector-in-matplotlib @author: jiedeng """ import numpy as np from itertools import product, combinations from mpl_toolkits.mplot3d.art3d impor...
36e350e0d578e169efaafb9e311566d71d6bc59e
5e9319d258959f74fa62ec5f9c2f18a34b665875
/pong.py
a2b4b64448833405a99f836b2793f939751c8938
[]
no_license
ShinhuPark/AI-pong-neat-python
9e6a72135b6bbd6b6032695856f2489c7c0a39d8
4ffc618cba29ecc624cc92038d4adfe817917c14
refs/heads/master
2022-05-27T22:38:33.717517
2020-05-06T04:32:20
2020-05-06T04:32:20
261,645,913
1
0
null
null
null
null
UTF-8
Python
false
false
3,458
py
pong.py
import retro # pip install gym-retro import numpy as np # pip install numpy #import cv2 # pip install opencv-python import neat # pip install neat-python import pickle # pip install cloudpickle import os import multiprocessing import cv2 import time env = retro.make(game='Pong-...
fd96bf5595ce6ec1f95d0f7a9d1c4ff582826ac0
b7b8b5ad1a1ba5b15c9526b97dcfdaa4d364dc11
/apps/contents/models.py
324edea91bf8b2722d4c9ec3b0c4d9a35f024527
[]
no_license
lmy129/myweb
d1e7c52cdbf52d5acfef858a47fa45e9c5dcd3e7
b08a6cc14f23b47cc0580826a8d5df8a30f80c7e
refs/heads/main
2023-08-11T04:45:44.037787
2021-09-22T14:02:52
2021-09-22T14:02:52
397,083,793
1
0
null
null
null
null
UTF-8
Python
false
false
1,254
py
models.py
from django.db import models from utils.models import BaseModel # Create your models here. class ContentCategory(BaseModel): '''广告内容类别''' name = models.CharField(verbose_name='名称',max_length=50) key = models.CharField(verbose_name='类别键名',max_length=50) class Meta: db_table = 'tb_content_catego...
99ddd9429ea018a328f28c783961fefaefd547be
3778da11cde704737f153416c5588aa851450d58
/version/0.37/api/plotting/_autosummary/pyvista-themes-_SliderStyleConfig-5.py
b078b146934e2337c864a2b89d78f424fef45869
[]
no_license
pyvista/pyvista-docs
98e86786aa1b8c5b197bf11b2c92c5ca7857714c
a6d92bc9a64b1b96b020185364c940c4587d2325
refs/heads/gh-pages
2023-09-01T16:07:49.205651
2023-09-01T13:34:03
2023-09-01T13:34:03
199,950,487
1
0
null
2023-04-26T06:35:16
2019-08-01T00:58:12
HTML
UTF-8
Python
false
false
78
py
pyvista-themes-_SliderStyleConfig-5.py
import pyvista pyvista.global_theme.slider_styles.modern.slider_length = 0.02
3a94ae8bc77bb39cc43a9e11e0ce008514bcdec4
8857278e85e90d6c813eaffeed7734c867f3c98a
/app.py
18bb9e3e2ba953b294f98a5b00c3610516ae8573
[]
no_license
AllenRayC/Move-Planner-NYC
7e4b66da391c35636b2284be9f620f44d6ed7d33
b910bc981487c64f1119af71e8f5fb46e8da7d25
refs/heads/master
2020-04-10T10:33:17.623283
2019-03-09T21:10:07
2019-03-09T21:10:07
160,969,422
2
0
null
null
null
null
UTF-8
Python
false
false
5,333
py
app.py
import os import pandas as pd import numpy as np import itertools import sqlalchemy from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import Session from sqlalchemy import create_engine, func import pandas as pd import datetime as dt from flask import Flask, jsonify, render_template #from flask_co...
98e0353d4e62eae0f6c114429b0f8ececbc59c36
8ee54c6d5b36b7fdc229f15fc07e1ed5ebaf0ba5
/src/visualization/exploration.py
b594fee539db9a0d074bfeb772c1c37571b15e21
[ "MIT" ]
permissive
jambo6/physionet_sepsis_challenge_2019
09228ca981813a5be2612a33b1ef4ac35ecdf262
e626f093320d12cd50f4264539bdc9852e5fdda6
refs/heads/master
2023-07-19T19:16:04.383361
2019-10-18T09:55:08
2019-10-18T09:55:08
215,989,153
20
14
null
2022-09-30T19:48:58
2019-10-18T09:29:50
Jupyter Notebook
UTF-8
Python
false
false
2,373
py
exploration.py
from definitions import * import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns from src.visualization.functions import * from src.visualization.general import * def missing_values_barplot(df, missing=True, return_vals=False): """ Takes a dataframe and plots the percentage o...
4ce0c8163467e9ada9eda02f48999901045b4416
124b35cc365906536e6a1dff776b07c2750fc757
/CodeForces/854/A.py
3de364a48759ab4e47d502b3e06c9cd9a9e70b6d
[]
no_license
galinaalperovich/ProgrammingExercises
ea5208ccd7aa073ae7dc6c48c8c99edb8b95f770
6ffb9c62a36ea0824f3168cdb6fccf223bc2a4a6
refs/heads/master
2021-01-21T12:16:20.028505
2017-12-10T14:25:03
2017-12-10T14:25:03
102,057,410
0
0
null
null
null
null
UTF-8
Python
false
false
943
py
A.py
import fileinput import sys # http://codeforces.com/contest/854/problem/A class InputData: def __init__(self, n): self.n = n class Result: def __init__(self, a, b): self.b = b self.a = a def __str__(self): return '{} {}'.format(self.a, self.b) def gcd(a, b): retur...
f7f3ab8bfee1273e329723f625641228128eeae1
3b323f209218f5208c765abd4c407f2c4c1cf235
/features/ExtractBIG.py
33bc4fa34dd167e9ea2158505b8d1b17f606eb12
[]
no_license
langheran/NLP-for-political-polarity-classification-from-tweets
c3ff15de7c6e210321f665070217d292026d9252
103ca7e0da58cdbb302ba086288fe20e5fb06e4c
refs/heads/master
2020-07-07T18:50:45.635483
2019-09-02T15:36:02
2019-09-02T15:36:02
203,444,247
0
0
null
null
null
null
UTF-8
Python
false
false
2,076
py
ExtractBIG.py
import itertools from features import SpecialTokens as st from features import save import numpy as np import pandas as pd def ExtractBIG(df): def ngrams(input, n): output = [] for i in range(len(input) - n + 1): output.append(input[i:i + n]) return output concat_df = df.copy(deep=True) de...
cb885efb2437842e0834b9722c03a66184ef340c
72f5c4cf0eda2f37d65a49e43fb9968d86bd48fc
/learning_traffic_light.py
19c1e98e3dd0c89744b505170cffc49f3c678094
[]
no_license
fredrikomstedt/traffic-control-system-comparison
5e1fdd6415d639735e78ff631f2dcacd6db1d2eb
da6a45d8aa93b4733bbe05bf613635735c08f508
refs/heads/master
2023-01-29T06:15:37.701166
2020-05-22T12:51:51
2020-05-22T12:51:51
null
0
0
null
null
null
null
UTF-8
Python
false
false
7,048
py
learning_traffic_light.py
import os, sys if 'SUMO_HOME' in os.environ: tools = os.path.join(os.environ['SUMO_HOME'], 'tools') sys.path.append(tools) else: sys.exit("Please declare environment variable 'SUMO_HOME'") from sumolib import checkBinary import traci import traffic_analyzer import random #Reinforcement learning import nump...
f2883b7eaad8a752d414e4647ead105e7f52ad6e
5fa0980db95b04c051c952db73dc3b96db901d64
/exporters/report/chart_generator.py
dd92b0b9099b3e9577bbe714f45f7aeb1e6054c5
[ "MIT" ]
permissive
SOM-Research/Gitana
55cdb029e5745dd27c1453b3fa874651f7a22e62
b82dbf8d6fb9a9e74bb656c618ed2fdc82dbd635
refs/heads/master
2022-09-27T21:25:12.932406
2022-09-09T08:53:08
2022-09-09T08:53:08
30,765,634
68
20
null
2017-11-17T08:29:12
2015-02-13T16:46:57
Python
UTF-8
Python
false
false
2,114
py
chart_generator.py
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'valerio cosentino' import pygal from pygal.style import LightColorizedStyle from util.date_util import DateUtil class ChartGenerator(): """ This class handles the generation of charts """ def __init__(self, cnx, logger): """ ...
ce3665e5994d101d0cbc8a2a28e720fb4fe73774
93f96bc77a90c10d3b4a1bfeb14f5b16704116b0
/Appscourse/homeproject/tododata.py
f729817877d8ce555f8da43fe61def27972de7c4
[]
no_license
penmetsaabhi/summer2019_raghu_penmetsaabhi
8472085c10689e3ce2368be4123c7b6b43447a0a
78510f32d87eb899605c56132a9fe5bc0d8470d9
refs/heads/master
2020-06-01T23:26:01.451421
2019-06-24T17:09:52
2019-06-24T17:09:52
190,963,559
0
0
null
null
null
null
UTF-8
Python
false
false
751
py
tododata.py
import os import django import openpyxl os.environ.setdefault('DJANGO_SETTINGS_MODULE','homeproject.settings') django.setup() from todoapp.models import * def addData(): ToDoList(name="dailyroutine").save() ToDoItem(description="Wahingclothes",todolist=ToDoList.objects.get(name="dailyroutine")).save() ToDoI...
33fca451ebd9936f68f7338bbc7b83882650df99
2e682fd72e3feaa70e3f7bf2a3b83c50d783ec02
/PyTorch/built-in/cv/classification/Resnet50_Cifar_for_PyTorch/tests/test_models/test_utils/test_position_encoding.py
ee78bb250fdf0e6f02c17be69189cecbce6e4c98
[ "GPL-1.0-or-later", "Apache-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause", "LicenseRef-scancode-generic-cla", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
Ascend/ModelZoo-PyTorch
4c89414b9e2582cef9926d4670108a090c839d2d
92acc188d3a0f634de58463b6676e70df83ef808
refs/heads/master
2023-07-19T12:40:00.512853
2023-07-17T02:48:18
2023-07-17T02:48:18
483,502,469
23
6
Apache-2.0
2022-10-15T09:29:12
2022-04-20T04:11:18
Python
UTF-8
Python
false
false
888
py
test_position_encoding.py
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the BSD 3-Clause License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://opensource.org/licenses/BSD-3-Clause # # Unless required by applicable law or agreed to in ...
2aafc49e5d5967ef1a0c562306b8244bcec3de55
12bb45dd1434910576ef4920d6c2730f26329b50
/app.py
95bb3cf8b9cca9c12b0ae0210d2c288ffc8aaef5
[]
no_license
ulsh-rbtsv/converter_bot
bd57f95cd756ce67fe52995d285688805bc187ea
8d0abb11f9ef348f9c3b962e8dc9ac229fb5c456
refs/heads/main
2023-02-26T15:04:47.774429
2021-01-28T11:59:31
2021-01-28T11:59:31
333,743,907
0
0
null
null
null
null
UTF-8
Python
false
false
1,429
py
app.py
import telebot from config import keys, TOKEN from utils import * bot = telebot.TeleBot(TOKEN) @bot.message_handler(commands=['start', 'help']) def help(message: telebot.types.Message): text = 'Введите валюту в следующем формате (через пробел): \n<имя конвертируемой валюты>' \ '<в какую валюту конверти...