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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d7727134d57610c7e3baa7fa1174c66abf5aacd8 | 212172e3ed0b6264436b14e1643f123990d5fbf4 | /nems0/xform_helper.py | 7faf5dacf9afe5fd292b15ceb83dce1f89a0aa85 | [] | no_license | LBHB/nems_db | 96b30b6c3d8412b7ec5808d73d366cf002ce126c | 3dbcd8385e3314d61980758cb3b5240c79b726be | refs/heads/master | 2023-08-22T21:29:34.671843 | 2023-08-14T15:47:09 | 2023-08-14T15:47:09 | 123,649,190 | 5 | 2 | null | 2023-08-09T20:45:19 | 2018-03-03T01:40:42 | Jupyter Notebook | UTF-8 | Python | false | false | 16,952 | py | xform_helper.py | """xforms_helper library
This module contains wrappers for transformations ("xforms") applied sequentially during a NEMS
fitting process.
"""
import logging
import os
import time
import nems0.xforms as xforms
import nems0.db as nd
from nems0 import get_setting
from nems0.utils import escaped_split, escaped_join
from... |
e0fce67b43519b71395082780d40dc6262896e51 | 95a7a081c1f6d7a6583bcb9728ff26af3c3cc7b1 | /custom.py | 4a9b908c5e38d66fe8170246a557dac1c25a0647 | [] | no_license | dwillmott/ss-inf | 9cd6276c955b45e8593edfae98a1ac6254dd1cfe | a8a54b539105cf4d841781b7dea29d6dba91944b | refs/heads/master | 2021-04-30T04:35:12.099125 | 2018-08-28T13:33:00 | 2018-08-28T13:33:00 | 121,538,973 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,226 | py | custom.py | import keras
import numpy as np
import time
from matplotlib import colors
import matplotlib.pyplot as plt
import keras.backend as K
import tensorflow as tf
from sklearn.metrics import confusion_matrix
from makebatches import *
# CUSTOM KERAS LAYERS
def SelfCartesian(x):
newshape = K.stack([1, 1, K.shape(x)[1], 1... |
1f3a4951878ca57528c3f208c99799e9449ae58c | 1d1c17e6989261151e895fffbf99503729a17e13 | /redtemp/waffle.py | 7cee13990ed523c8c7c2e412a0512b5963a18cbc | [] | no_license | P0nt14c/deploy | 40729d91d749c66fce623f2d8e1fdf78a732a4c8 | 0830e6cfaf52acb6b61b42dcdc0393f337fb5e79 | refs/heads/master | 2023-04-25T07:40:14.067946 | 2021-05-26T00:47:19 | 2021-05-26T00:47:19 | 370,864,335 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 424 | py | waffle.py | #!/usr/bin/env python3
import socket
import time
ip = '34.73.195.185'
port = 81
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect(("8.8.8.8", 80))
host_ip = s.getsockname()[0]
s.close()
while(True):
time.sleep(30)
try:
sock = socket.socket()
sock.settimeout(3)
sock.conn... |
447fc5afec162e830ea23c97509f3ce19b0ed982 | 25ebc03b92df764ff0a6c70c14c2848a49fe1b0b | /daily/20190616/example_unittest/00tests.py | e6791322cae00c3aa824e34a84f52ce44820dc42 | [] | no_license | podhmo/individual-sandbox | 18db414fafd061568d0d5e993b8f8069867dfcfb | cafee43b4cf51a321f4e2c3f9949ac53eece4b15 | refs/heads/master | 2023-07-23T07:06:57.944539 | 2023-07-09T11:45:53 | 2023-07-09T11:45:53 | 61,940,197 | 6 | 0 | null | 2022-10-19T05:01:17 | 2016-06-25T11:27:04 | Python | UTF-8 | Python | false | false | 209 | py | 00tests.py | import unittest
from testing import AlwaysFailMixin
class Tests(AlwaysFailMixin, unittest.TestCase):
def test_it(self):
self.assert_always_fail()
if __name__ == "__main__":
unittest.main()
|
57777cf932e673bd1a33bb0fd89bc3246e39ed26 | caa255cd93cb322a32ea9c41acd28e93318923da | /svm.py | 2cf5309055fb80e231a86aef4332cee8cc348487 | [] | no_license | Verssae/svm_MNIST | 27b1cdaa26e7c435234fa22958e55b7246f650a1 | e9b0f6c49625ff665709843d05405ab9f5e1ba81 | refs/heads/master | 2023-07-20T16:03:30.944338 | 2019-10-14T08:34:37 | 2019-10-14T08:34:37 | 213,416,676 | 0 | 0 | null | 2023-07-06T21:45:31 | 2019-10-07T15:14:33 | Python | UTF-8 | Python | false | false | 4,412 | py | svm.py | import os
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import struct
import pickle
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import scale, StandardScaler, Normalizer
from sklearn import svm, metrics
from sklearn.model_selection import cross_val_score, Stra... |
58f3d9732f77d5e0cacbe22bf5af64b24fe80856 | 0d67af768ca11f4e87c8fc92ab3ece8e4c27696f | /tests/tests_toolbox/test_pediacache.py | 21ced0dafd8326b688a30fff23b53d7cc7a0e65b | [] | no_license | SpaceAppsXploration/chronos-stable | e71568263e4eecb5637bd5db2a3cc33711b9481b | 0656043a49e661caf6dedd57168693a5109c6745 | refs/heads/master | 2020-04-13T07:33:58.439933 | 2015-07-15T17:05:18 | 2015-07-15T17:05:18 | 30,731,732 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,114 | py | test_pediacache.py | __author__ = ['lorenzo@pramantha.net']
from toolbox.pediacache import DBpediaCache
from toolbox.surfing import JsonLD
from toolbox import pediacache
from pprint import pprint
import unittest
class Test(unittest.TestCase):
"""
Class for testing the tools in the 'toolbox' package
"""
title_slug0 = '... |
e10791341b9ba138d3f6008ab563352e8eb4717a | aff72737860c226e56e3910ea0442648ef4d01a4 | /Dreamwin5/functions/filter_func.py | 11545384c3fcde6e1bd8cc79f88c1f1ba7451aed | [] | no_license | sivaprasadkonduru/Python-Programs | 3db77270e085f785ecd0d9049557395010cfa1cd | aadace30e921f02210398bce20ab48d330a71812 | refs/heads/master | 2022-04-29T15:28:50.357467 | 2022-03-18T18:14:42 | 2022-03-18T18:14:42 | 94,407,324 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 405 | py | filter_func.py | """
filter:
syntax: filter(func, iterable)
"""
odd = []
for i in range(10):
if i % 2 != 0:
odd.append(i)
a = filter(lambda x: x % 2, range(20))
print(list(a))
b = map(lambda x: x % 2==0, range(20))
print(list(b))
c = filter(lambda x: x%3 == 0 and x%5==0, range(50))
print(list(c))
l = [("Tendulkar", 9... |
8458325947658e5f36937db51b6f676972c35334 | f9655650bf4c212b4aa34f35b9043daa1f045969 | /runtests.py | ed4ad396a216da9f5f2bd1ac9f17de07306c4a30 | [
"MIT"
] | permissive | coagulant/django-webperf | 5950fce0b6f816d723310baed550aff07e704820 | 71dcf04b58310873eb0bb97c09271e48047f09f4 | refs/heads/master | 2020-12-24T17:53:43.558255 | 2013-01-29T20:23:59 | 2013-01-29T20:23:59 | 2,454,750 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,497 | py | runtests.py | from django.core.management import execute_manager
import sys
from django.conf import settings
PROJECT_APPS = ('web_performance', 'tests')
try:
import django_jenkins
JENKINS_APP = ('django_jenkins',)
except ImportError:
JENKINS_APP = tuple()
settings.configure(DEBUG = True,
DATABASE_EN... |
df300ded495a5fa7f8ed678b068239aad4a3d567 | 3bbac89ea5eab3383f355c11c5d319e3384b7fd9 | /How+many+Divisors.py | 8f9a70222c08e63ad1afb3e88e540065fd735124 | [] | no_license | kensuke-tanaka/- | 681b95dfb50e5669585304f777a2bd7d68fc6d44 | e7949952bf7a68937e8509da40347b731a349293 | refs/heads/master | 2020-07-04T23:49:56.611067 | 2019-09-23T08:00:28 | 2019-09-23T08:00:28 | 202,460,365 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 151 | py | How+many+Divisors.py |
# coding: utf-8
# In[1]:
a,b,c = map(int, input().split())
num = 0
for i in range(a, b + 1):
if c % i == 0:
num+= 1
print(num)
|
0121535c7eb64411585578f333ad4a4c18ed8f13 | 5592b4154029125b758e70429d3574e6d7ae348b | /demo/jupy_demo.py | d859898c47e4f16fb929680736ffdb2c682fe833 | [] | no_license | yanyanxumian/Stats507_F21 | 96f4f7759bff76fe1316875237bcd7210b262a51 | 88c0e2983322ca6f4f30df06307bcd8965717433 | refs/heads/main | 2023-09-01T01:43:59.375623 | 2021-11-04T12:44:35 | 2021-11-04T12:44:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,878 | py | jupy_demo.py | # ---
# jupyter:
# jupytext:
# cell_metadata_json: true
# notebook_metadata_filter: markdown
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.11.4
# kernelspec:
# display_name: Python 3 (ipykernel)
# language: pyth... |
343e1386b57ddfb1b4d21baadf2eb0ed8fc75dbe | fde898a39f992cfc81a951d4622c9f532d9acf31 | /project_management/tasks.py | 5a8f3c9e50f6e3c09e09024c66ea49410fc63235 | [
"MIT"
] | permissive | wambozaAllan/Sybyl-Service-Desk-Web | 633d17fdddffee5941e0fc7b95c9e58c39382152 | c9ef865cac3932bf1aa192a0f048fe2995f86594 | refs/heads/master | 2022-12-12T18:39:03.002689 | 2021-03-22T13:58:35 | 2021-03-22T13:58:35 | 173,111,784 | 1 | 2 | null | 2022-11-22T03:13:15 | 2019-02-28T12:53:06 | Python | UTF-8 | Python | false | false | 421 | py | tasks.py | from background_task import background
from .models import User
@background(schedule=60)
def notify_user(user_id):
# lookup user by id and send them a message
print('xxxxxxxxxx``````````````````````````xxxxxxxxxxxxxxxxxxxxxxxxxx `````````````')
user = User.objects.get(pk=user_id)
print('--------------... |
135d6daabfd5f8990cb4a78abe8da78dae303055 | a820c9bfb0534f12d887aadfd97071c29be9b696 | /search/migrations/0002_auto_20191102_1509.py | 03443f4af8d7a88450ff7951758c2ebad91bd40b | [] | no_license | rupendr/django-rest- | a23ca6f6f75fe8e88b3239fdd0d0a7933806660c | c53b2b3d13970f9467241633261213593b753709 | refs/heads/master | 2022-12-24T16:05:47.025081 | 2019-11-06T13:21:27 | 2019-11-06T13:21:27 | 220,000,896 | 0 | 1 | null | 2022-12-11T03:24:28 | 2019-11-06T13:16:36 | Python | UTF-8 | Python | false | false | 523 | py | 0002_auto_20191102_1509.py | # Generated by Django 2.2.6 on 2019-11-02 09:39
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('search', '0001_initial'),
]
operations = [
migrations.RenameField(
model_name='category',
old_name='Enter field documentatio... |
497ced6d5b41f9510ec7eba145f5d3a8de0926e6 | fe8cffc5dba93d7a6a5ee9be60e128117de8080e | /DirichletPageProcessing.py | 7e5ab6ba0a96aae7d94b8dcfe5dbf4fdf1148613 | [] | no_license | swisherh/swisherh-logo | 49d622b1239a0972a6fbeece218541cd4878466c | 85e0de3bcdb1a446a414b8d7f0abbe465bf6ae1e | refs/heads/master | 2020-06-07T15:47:13.482825 | 2011-09-06T13:41:31 | 2011-09-06T13:41:31 | 41,885,268 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,159 | py | DirichletPageProcessing.py | def setPageLinks(info, L, args):
info['friends'] =[]
try:
if args['type'] == 'riemann':
info['friends'].append(('\(GL(1)\) twists', '/L/Character/Dirichlet'))
elif args['type'] == 'lcalcurl':
info['friends'].append(('Maass form', '/L/TODO'))
elif args['ty... |
2d4be30f6d1cc6ececbcfbc726e0dfc76a17fc80 | 590416628b3ca8da4ad63310c42b55a6e27ada54 | /custom_modules/image.py | c05948ba369325a8ed12614962af50b29e388b28 | [
"Apache-2.0"
] | permissive | ht44/plant-id | 43c11206b7c4a0ce5d8aeda9a3863f1c38638284 | 7dbf45e423b812270af0e656b59337b01afac4b5 | refs/heads/master | 2022-12-13T03:47:02.782874 | 2017-06-22T19:36:55 | 2017-06-22T19:36:55 | 91,206,935 | 0 | 1 | Apache-2.0 | 2022-12-07T23:57:56 | 2017-05-13T22:45:35 | HTML | UTF-8 | Python | false | false | 3,100 | py | image.py | import os
import math
import shutil
from PIL import Image
from watson_developer_cloud import VisualRecognitionV3
watson = VisualRecognitionV3('2016-05-20',
api_key=os.environ['API_KEY'])
def api():
return dir(watson)
def docs():
help(VisualRecognitionV3)
class DataSet:
def __in... |
25ada9c14fcabf613bad29531b28ccbb1cd56a3c | 195b4a22fcfc9f3fd47a4ef796b8590574507f00 | /penerimaan_biji/config/penerimaan_biji.py | 0f9d118f574dc1813b8ac3f963da140e1b7c2354 | [
"MIT"
] | permissive | bobzz-zone/Biji | 5b680e216d9228130068a7bac839e1ad3a233ff0 | 02bf9001c7bd505041de57c4b952733421b80815 | refs/heads/master | 2020-04-17T03:51:52.449037 | 2019-03-27T04:24:02 | 2019-03-27T04:24:02 | 166,203,588 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,977 | py | penerimaan_biji.py | from frappe import _
def get_data():
return [
{
"label": _("Produksi Bijih"),
"items": [
{
"type": "doctype",
"name": "Data Produksi",
},
{
"type": "doctype",
"name": "Pengiriman Batch",
},
{
"type": "doctype",
"name": "Penerimaan Batch",
},
{
"ty... |
e6f9de542ef9e05c496793fe63f0a4cb81d6de0e | 3f209ce983136653937ac39fe5def1c503e7aeed | /splunk/migrations/0001_initial.py | 2f86a7eed42f593cbf47943d017e9af31df7895f | [] | no_license | sqainsider/django_dev | ef22630c48ec20779eff729474ef11fbb0657ab7 | 2e6944c1bb8769df5c66c426ce8f4ee9ead55c11 | refs/heads/master | 2022-12-10T03:20:47.562574 | 2019-02-28T04:21:08 | 2019-02-28T04:21:08 | 172,435,140 | 1 | 0 | null | 2022-12-08T01:39:29 | 2019-02-25T04:38:38 | JavaScript | UTF-8 | Python | false | false | 3,379 | py | 0001_initial.py | # Generated by Django 2.1.7 on 2019-02-26 00:24
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Document'... |
c9a88541a193e7167e430b2416b5726c4f9680f3 | 4f1fa59cc81dbaabf41c9e95108b643d00faceb9 | /ros/gui/image_gui/nodes/DisplayTF.py | cf13b4eb048699319851c81774c09e6ba50ef91e | [] | no_license | florisvb/Flyatar | 7f31bb27108f6da785e67a2b92f56e7bc0beced0 | dfaf30bcb77d6c95cab67ad280615722a11814c3 | refs/heads/master | 2021-01-01T15:44:54.827787 | 2010-06-24T01:24:06 | 2010-06-24T01:24:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,820 | py | DisplayTF.py | #!/usr/bin/env python
from __future__ import division
import roslib
roslib.load_manifest('image_gui')
import sys
import rospy
import cv
import tf
import math
from sensor_msgs.msg import Image
from cv_bridge import CvBridge, CvBridgeError
from geometry_msgs.msg import PointStamped
from stage.msg import Setpoint
from pla... |
ed12028fb52950de80e297b6e68865059fcb3cc8 | 57fea2bd71865c7f1ffd8b729d0a882a886e567d | /AI_tic_tac_toe.py | 0d190cf8a39901269d87b62c17714dbcc20eca46 | [] | no_license | Deepraj-chawda/Unbeatable-Tic-Tac-Toe-Artifical-intelligence | 28a5a3e53dd2ab1cf6bda2acb55fd546298c07c6 | a57bbc453d8cd17ed779c263d7899403b4bc8111 | refs/heads/main | 2023-04-09T13:02:57.236017 | 2021-04-19T16:52:33 | 2021-04-19T16:52:33 | 331,853,078 | 5 | 3 | null | null | null | null | UTF-8 | Python | false | false | 5,804 | py | AI_tic_tac_toe.py |
import time
import os
PLAY=''
COM=''
start=0
end=0
board = [' ',' ',' ',' ',' ',' ',' ',' ',' ']
def make_board(b) :
print("------------------------")
print("| | | |")
print("| "+ b[0] +" | "+b[1]+" | "+b[2]+" |")
print("| | | |")
print("| | ... |
8d31d2b90ca20cb539301fb3a140593c3c774c8b | f2dee0c12b7dd1e89ec6e1f7c7b76f578591371e | /lexicographicPermuations.py | a5de02cc3ddfba5be16d1cd70252ef08a42b8288 | [] | no_license | vietanhtran2710/projectEuler | 44696ebc47d6865f21e4fe52c99bd2b6f9e017a6 | 259fe2d4b0da236d3d2d88c5956f799acc3aa239 | refs/heads/master | 2020-06-11T16:22:41.298110 | 2020-05-02T04:44:20 | 2020-05-02T04:44:20 | 194,022,159 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 140 | py | lexicographicPermuations.py | a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
from itertools import permutations
lst = list(permutations(a))
print("".join(map(str, lst[1000000 - 1]))) |
6075f7fcef5c46d6e332d886253012c07fbbc1f4 | a22e9cb1cdf5f20f484d1a43a3b3b5c057183cb5 | /python/radare.py | 25d425b9ef2abb5c0ebe4706dfcba713239745fc | [] | no_license | radareorg/radare2-rlang | e0311c212d505176a1733cb04682b8e8b005b31d | e386d5979426ef9adfe9c7fcc23ab439698f2b63 | refs/heads/master | 2023-01-23T04:52:48.294678 | 2023-01-11T14:39:09 | 2023-01-11T14:39:09 | 219,674,173 | 11 | 6 | null | 2021-12-13T15:37:24 | 2019-11-05T06:32:45 | C | UTF-8 | Python | false | false | 8,381 | py | radare.py | #!/usr/bin/env python3
"""python api for it
This is the API provided with radare to use python inside radare as
scripting language for extending its features or automatize some
tasks analyzing code, patching binaries or debugging programs.
Here's a small example of use:
from radare import *
seek(0x1024)
print(hex(3... |
4119bb61a5d972579cfe0a9865cad9f59b4626e1 | 8f6597d9dfd4f8f2b861c573821d2ed03b3e9b87 | /Mytest/consensus_algo.py | 49167e83a2167b94b637635ff5e7db8c452bf4e8 | [] | no_license | diedang/myexperiment | a652861b5a72264788e49e495eb984d790b32b96 | 4651aea9b512c7bc49e22c9c14c21b761cc0f5a9 | refs/heads/master | 2021-09-07T21:16:17.456834 | 2018-03-01T08:09:58 | 2018-03-01T08:09:58 | 109,226,858 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 10,031 | py | consensus_algo.py | # -*-coding:utf-8-*-
# reference:
# [1]py2 compatible with py3, http://blog.csdn.net/u012151283/article/details/58049151
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import numpy as np
import networkx as nx
import matplotlib.pyplot as plt
import random
imp... |
35deee81b75d621074ef929a5aab5ee8c9ab5898 | 013b7e9ade8f837980a2a8c408823f7b1b733afb | /apps/optima_app/urls.py | 58ce7bd107415107a6fb4e08f80f88590392dd6a | [] | no_license | carlamiles/optima | c15325d00a2e8f5c47d83e1d1ea7bb698e1a7711 | 5425c96ea9446eaab07c7db07d13c867125f5dd0 | refs/heads/master | 2022-01-26T16:04:18.077334 | 2019-08-21T21:36:31 | 2019-08-21T21:36:31 | 203,668,228 | 1 | 0 | null | 2022-01-21T20:01:43 | 2019-08-21T21:39:14 | HTML | UTF-8 | Python | false | false | 108 | py | urls.py | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^routes$', views.routes),
] |
72912298750745b8db288d05476b26ddecb62b1b | 2c8c2a60d9202a8c294caee50bffb2a6f3f3df6a | /TSIS_1/Lecture3_tsis/3750.py | 9ba32adf9afec1267d5a3cda2046d42a174237c1 | [] | no_license | aruzhanirgalieva/python | 7400db3dd0d7b04148030e5f2bd0e8eee32bc50b | 0e10272166fa58703e2f97a9f1cd1d6a4b54fc3e | refs/heads/main | 2023-06-24T01:58:27.120952 | 2021-07-29T12:01:59 | 2021-07-29T12:01:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 126 | py | 3750.py | k, t = [int(i) for i in input().split()], [int(i) for i in input().split()]
s = set.intersection(set(k), set(t))
print(len(s)) |
0f508eba56a739cf17431c35df8b3cf9e7b8ffa0 | 802ac18f5d3dbaaf9185e625cde8bb3dc88d7f07 | /sliply_project/urls.py | 428ff21e36b4d1f9baf60670bc9fa0943f429aae | [] | no_license | schunlee/Sliply | d2d22eb2f00740e7b45d28131b825aaf3d9dcffa | e80add7dcefd7e7a24ecd7e86b38d9c8f604e2d1 | refs/heads/master | 2020-06-25T19:05:50.819609 | 2018-05-30T15:37:26 | 2018-05-30T15:37:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,423 | py | urls.py | import registration
from django.conf.urls import url, include
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.auth import views as auth_views
from rest_framework_jwt.views import obtain_jwt_token, refresh_jwt_token
from sliply.views import FileUploadView, SlipListView, S... |
38549c134ea9dbee22ba4537cde2865fbeb15f2a | ccf97375ebcdb3756a5bd7ba6d41703e8064d1f8 | /soluciones/ejercicio_02.py | a5e3756ef04820631a527b180b119f0f17368403 | [] | no_license | ComputoCienciasUniandes/MetComp1_202110 | 35a88e01670906170f416c17c2c0f0b5b0dbd762 | 89b73a1e0ed4a3352c669f3b00c3c6cf46b73bd9 | refs/heads/main | 2023-06-29T23:49:01.674721 | 2021-08-09T13:42:02 | 2021-08-09T13:42:02 | 332,088,748 | 1 | 3 | null | null | null | null | UTF-8 | Python | false | false | 1,237 | py | ejercicio_02.py | #Escriba un programa de python que:
#1. Lea un archivo llamado "texto.txt" usando readlines()
#2. Escriba en un archivo llamado "texto_invertido.txt" el contenido de "texto.txt" pero invertido.
#Por ejemplo, si "texto.txt" contiene la dos líneas siguientes:
#Hola
#Mundo
#El archivo "texto_invertido.txt" debe te... |
50f4350c81fbb9e72039993b66b43ea7d4847edb | baf133ccbaca01237bad3265d0614799eacc6eb3 | /python-scripts/combined_onset_density.py | 85821934928dafc5d6ce833cb595eb2e69b33eab | [] | no_license | mattsetz/Improv-Piano-Coordination | 4523d8e7f2017111bccff550f9dd4eefbb79ad11 | 3f93a1311e96378466805efd94b515d766715a35 | refs/heads/master | 2022-12-04T09:20:21.207799 | 2020-08-20T13:48:36 | 2020-08-20T13:48:36 | 289,017,076 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,413 | py | combined_onset_density.py | # MS 5/7/19
import numpy as np
import pandas as pd
from glob import glob
import re
def get_combined_density(df1, df2, name_, condition_):
df_combined = None # this will be updated later
if len(df1) < len(df2):
combined = df2['num_onsets'].copy()
combined[:len(df1)] += df1['num_onsets']
df_combined = pd.DataF... |
26074e16f4370a8f5d82e2eeeac74b9b27b29436 | 7baac73b7687364ca1c54b102e00019c68e1bbe0 | /hold-files/hold/forms.py | 672072494dfdbb9d7dfe9c6801b5c7acd9c3eda4 | [] | no_license | micdoher/hold | c843cc90d9c883980256df42a7e7cf70cba3f708 | fecc53bc553b14e2a4a2831e4236ca5547bf7f1b | refs/heads/master | 2021-05-02T01:53:32.398497 | 2020-05-14T12:56:58 | 2020-05-14T12:56:58 | 120,876,726 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,594 | py | forms.py | from flask_wtf import Form
from wtforms.fields import StringField, PasswordField, BooleanField, SubmitField
from wtforms.fields import IntegerField
from wtforms.validators import Length, Email, Regexp, DataRequired, EqualTo,\
url, ValidationError, AnyOf, Optional
from hold.models import User, Bookmark, Food
from ho... |
90d66d35f564f2939443c9a21d3ec1bf9a939ccf | 795906b699eb07704b1a0872352184abddb66961 | /bot_1.py | c2766fffa1910d6d0c051ab0cadb7645714ef736 | [] | no_license | stefansn/redditBot | 571178b33c1ab27e547bf07ab43e7e0d7fb89672 | b1e025adc923db12742dd052ab9af35fb7d5c355 | refs/heads/master | 2020-03-27T11:32:40.680973 | 2018-08-28T19:04:07 | 2018-08-28T19:04:07 | 146,493,208 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,716 | py | bot_1.py | import praw
import time
import os
import requests
import json
import pandas as pd
def authenticate():
print("Authenticating...")
reddit = praw.Reddit('redditbot', user_agent="")
print("Authenticated as {}".format(reddit.user.me()))
return reddit
def main():
reddit = authentic... |
ab3380d5f7fd55f9ce806c302caf6a01768da686 | 9e6ed39abd46593213c6b2fabc38d71ea6b69279 | /Reporter.py | 9b2d2565caf56ba131d2a156660fc149728e17f2 | [] | no_license | google-code-export/decada | 8f4bfe9a36d34d1e34135593c21a1afae211c75b | 45a7c527124d5861135c49b974567d847c3660ba | refs/heads/master | 2016-08-04T04:39:14.827935 | 2012-04-16T13:19:00 | 2012-04-16T13:19:00 | 32,108,518 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,968 | py | Reporter.py | # -*- coding: utf-8 -*-
#----------------------------------------------------------------------------
# Name: Reporter
# Purpose: builds reports for Sampo Framework
#
# Author: Stinger
#
# Created: 07.11.2011
# Copyright: (c) Stinger 2011
# Licence: Private
#-----------------------------------... |
ddaeecdaba931f52ef2a2f1f7810be263f9ddb7b | 7e82b6d066d6dfcbf401eea395f91c05463d5c4a | /__init__.py | 3390a8bf85f95061fc9c3ab45a8dc0625c8444b6 | [] | no_license | jijosg/restapi-to-kafka | 097266d5d18bbcb7c7787c24d8ee7ba7ca2d56ab | 3f3351e5d6f6d34f8bd63931c4c58ea0ab55217e | refs/heads/master | 2021-03-19T03:16:52.540767 | 2020-04-16T05:17:26 | 2020-04-16T05:17:26 | 247,128,012 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 620 | py | __init__.py | from flask import Flask,request
from kafka import KafkaProducer
import json
import os
def create_app():
# create and configure the app
app = Flask(__name__)
# a simple page that says hello
@app.route('/hello')
def hello():
return 'Hello, World!'
@app.route('/posttokafka',methods=["POS... |
4e63aa2e98b96ee35a2303466a10317cd60f4d5a | d7e7b05adfd7edea3547d5ad9c796af8ac103446 | /observations/migrations/0002_areaofinterest.py | 276c4784e5dce4edd7d0a6080c3236c936378e5e | [] | no_license | janerikhy/geoDjango | b803979341d42bff39347ca497282474303f9840 | d9b6819068946d5a711d727be6856d01e52f185b | refs/heads/master | 2023-06-30T05:32:30.878790 | 2021-08-09T13:28:44 | 2021-08-09T13:28:44 | 385,169,076 | 0 | 0 | null | 2021-08-03T09:58:05 | 2021-07-12T07:58:03 | PureBasic | UTF-8 | Python | false | false | 672 | py | 0002_areaofinterest.py | # Generated by Django 3.2.5 on 2021-07-07 07:31
import django.contrib.gis.db.models.fields
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('observations', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='AreaOf... |
451c5a26342ff217a24245ff5d43dd2c374cfd02 | c26483bc1399e7879471a9e53d0288cb2c756088 | /onnxmltools/convert/sparkml/operator_converters/count_vectorizer.py | 516eadd20fd8edbe0e1d0914468ab1d88770c259 | [
"Apache-2.0"
] | permissive | onnx/onnxmltools | 6782d9e1d2c75be7618b1378405d31198a310027 | 024a62f6915e6c3b9e040befaf058c7e60c271de | refs/heads/main | 2023-09-04T04:57:10.943548 | 2023-08-28T16:43:37 | 2023-08-28T16:43:37 | 121,798,175 | 827 | 189 | Apache-2.0 | 2023-09-13T16:07:20 | 2018-02-16T20:37:33 | Python | UTF-8 | Python | false | false | 3,569 | py | count_vectorizer.py | # SPDX-License-Identifier: Apache-2.0
from ...common._registration import register_converter, register_shape_calculator
from ...common.data_types import StringTensorType, FloatTensorType
from ...common.utils import check_input_and_output_numbers, check_input_and_output_types
from ...common._topology import Operator, S... |
e229ef27e4a44bce4917fc86d4b758f611232fed | e934188a7b8171632a97661423ae58699b9c492e | /src/my_local_planner_plugin/scripts/phase_portrait.py | 270e2dda31da61f7dd47b8cdba722d2878e28a6d | [] | no_license | hxj0316/ROS | d7674f179761d6772ab889bf0732aad139b0e1ae | b468105fc6bc988b60c845cf5e63cdacd302a00b | refs/heads/main | 2023-06-19T06:27:14.115475 | 2021-07-18T06:47:12 | 2021-07-18T06:47:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,851 | py | phase_portrait.py | #!/usr/bin/env python
# coding=utf-8
# This small script subscribes to the FeedbackMsg message of teb_local_planner
# and plots the current velocity.
# publish_feedback must be turned on such that the planner publishes this information.
# Author: christoph.roesmann@tu-dortmund.de
import rospy
import math
from mpl_tool... |
569944a2ff69e5e333f8b725912373794604935f | 4cebd937d5b2da18501a42f1ca6d19612f382802 | /waaw/apps.py | 4adc337afceed6c107a0df06a34e50648fbbfd91 | [] | no_license | Umidrifkatov/waaw | b1ec14001b3aa20b6b6c6338dd1d9ba02f2031ec | 9c96f0171fef99c924e536831f45bc52d72bf1ba | refs/heads/master | 2023-04-06T01:38:02.598114 | 2021-04-04T12:27:52 | 2021-04-04T12:27:52 | 307,468,295 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 83 | py | apps.py | from django.apps import AppConfig
class WaawConfig(AppConfig):
name = 'waaw'
|
1fbeba73617dfd5eb6d7e3a6d1a15596b340156a | 02161fdfe7c33bb00957c6ef248678d30b85d639 | /poc-self/weblogic-cve-2019.py | 9ae18efa040f39def59aff1b2778810396a6c8d0 | [] | no_license | devsecops-SRC/pocs-collection | bc849903914077d59b6d85fc5fec0970a8cfc6f9 | e22f0b4075a39ff217547613698991dca3273b30 | refs/heads/master | 2022-02-12T19:25:17.253926 | 2019-05-29T14:02:49 | 2019-05-29T14:02:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,563 | py | weblogic-cve-2019.py | # -*- coding: UTF-8 -*-
import requests
import sys
def poc(url):
request_headers = {"Accept-Encoding": "gzip, deflate", "Accept": "*/*", "Accept-Language": "en", "User-Agent": "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)", "Connection": "close", "Content-Type": "text/xml"}
pat... |
f70c58335bc5bee42ef327f0e09dad8a5d976ed8 | ce26934f5e573652d3ae2d3202ad0c6565bc2b79 | /test/unpacker/test_map_dump.py | e940af0c1887335d3d9f82a89dc2c9de30d1f95b | [] | no_license | lawrencefoley/sourcehold-maps | 49d01f86a39b67529915a4e36b02da39fe5b4180 | 74abe620bfdd2d8735a03618d5d3c69d8818249b | refs/heads/master | 2022-02-22T23:40:57.486760 | 2019-09-17T12:09:27 | 2019-09-17T12:09:27 | 208,937,022 | 0 | 0 | null | 2019-09-17T02:02:05 | 2019-09-17T02:02:04 | null | UTF-8 | Python | false | false | 465 | py | test_map_dump.py | import unittest
import maps
import structure_tools
class TestDump(unittest.TestCase):
def test_dump(self):
with open("resources/MxM_unseen_1.map", 'rb') as f:
buf = structure_tools.Buffer(f.read())
m = maps.Map().from_buffer(buf)
m.unpack()
m.directory.unpack()
... |
d86639ae9e53a4cc84de403eb3a27cbe7e689da7 | e3374a0cc1b0bba1ab3c5c11ea5668e36d574d4d | /BasicPlayerCharacter.py | 33467fa660dc4713c57f25629dd58439532928f3 | [] | no_license | SimplyBarbaric/LameGame | 5b4f8f4ace031aebaf073be5c35e3107e4022cca | 43cf10998e3dcdcfc18c113d26cda653040a0eb2 | refs/heads/master | 2021-01-17T17:01:15.323407 | 2014-06-13T04:19:27 | 2014-06-13T04:19:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,180 | py | BasicPlayerCharacter.py | __author__ = 'Chris'
from Character import *
class BasicPlayerCharacter(Character):
attackList={"attack1": "Lame Punch","attack2": "The Fleeing Rat","attack3": "The Royale with Cheese","attack4": "Black Hole"}
def setDefaults(self):
#default gaining 100 every level
self.fullHealth = 150 ... |
9a37dca1b4f75c6955d008f9f9e42b18e82d8694 | f7656a55063a9315d8912700c915ef79d6b92c79 | /SWEA/D4/10966.py | 52ea900b624df7c4b111ef625be1fa1d8e85c9f0 | [] | no_license | BonHyuck/Python | ca0344da490aca6bc34a3cd3a5402a2f6af70b9e | 0c4449b37d94fd3860c44d16bc9e8a3202a5151e | refs/heads/master | 2023-04-18T01:11:01.781292 | 2021-05-03T08:56:55 | 2021-05-04T08:57:01 | 284,568,900 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,720 | py | 10966.py | import sys
sys.stdin = open('input.txt', 'r')
# 상하좌우를 위한 배열
dx = [-1, 1, 0, 0]
dy = [0, 0, -1, 1]
def find_plz(N, M):
queue = [(0, 0)] * (N * M)
front = -1
rear = -1
visited = [[0] * M for _ in range(N)]
for i in range(N):
for j in range(M):
if box[i][j] == 'W':
... |
3864445e8841f259775217dba8dbffb81afe7119 | 84dafd084cfa97b168aabb3e84a3c2b77eae20e2 | /CourseWork/Python/factorial.py | 3882bd9348ef1310e2091a7a8524ff856085ec57 | [] | no_license | dylancapece/UTD_Course_Work | bae5fa44176cd18ddf3f80f7a5e0857d96ea2c9e | 3b04117195d578d62574cbca3a87560f52102396 | refs/heads/main | 2023-03-19T14:38:32.220615 | 2021-03-08T22:20:53 | 2021-03-08T22:20:53 | 345,801,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 656 | py | factorial.py | def recursion(number):
if number == 0:
return 1
return number*recursion(number-1)
def tailRecursion(number,a):
if number == 0:
return a
return tailRecursion(number-1,number*a)
def iterative(number):
result = 1
if number == 0:
return 1
for i in xrange(2,number+1):
re... |
7bd0eb542d49c4631d547241331b5112a60e85b9 | 5f65d81134e2384f668cc920c85d5a95a5559683 | /datasets/cloud_data_connector/cloud_data_connector/gcp/query.py | d8000f2f688d9fa612270f9a8ad9934e9f4a389b | [
"Apache-2.0"
] | permissive | IntelAI/models | a59202087140a868bd8f08d31c5b4cc0c9a91a7d | 9304c9f59fde013f158ac338fc80171c0e8cda5d | refs/heads/master | 2023-08-17T12:30:58.047221 | 2023-08-07T21:12:59 | 2023-08-07T21:12:59 | 154,412,076 | 609 | 220 | Apache-2.0 | 2023-09-02T12:59:45 | 2018-10-23T23:59:08 | Python | UTF-8 | Python | false | false | 7,468 | py | query.py | #
# -*- coding: utf-8 -*-
#
# Copyright (c) 2023 Intel Corporation
#
# 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 app... |
ac02b9ce64f61385d001bfba89de836e4254a4c2 | 30b826d05918d85d0576d73bae343fc76f4bc8a7 | /tests/unit/test__impl/test_util/test_dictionary.py | ba88d684bc8087e278d4da6f77a15ed56883f8f5 | [
"MIT",
"BSD-3-Clause",
"Apache-2.0",
"MPL-2.0",
"MPL-1.1"
] | permissive | navdeep710/selenium-python-helium | 68491b417f99f94b45cc87ba1c64ce9457b6c145 | 37948eb2d384fee7278157cbfa5bf54a1a6adb57 | refs/heads/master | 2023-02-17T15:09:48.808515 | 2021-01-09T19:55:54 | 2021-01-09T19:55:54 | 268,119,463 | 1 | 0 | MIT | 2020-05-30T16:37:34 | 2020-05-30T16:37:33 | null | UTF-8 | Python | false | false | 399 | py | test_dictionary.py | from helium._impl.util.dictionary import inverse
from unittest import TestCase
class InverseTest(TestCase):
def test_inverse_empty(self):
self.assertEqual({}, inverse({}))
def test_inverse(self):
names_for_ints = {
0: {"zero", "naught"},
1: {"one"}
}
ints_for_names = {
"zero": {0},
"naught" : {0}... |
64792a98e689b96eaf1ad05734e1d23a0738e985 | 123b1508c690d7cf7cb78e237ed847ae0f17fb95 | /core/args_loader.py | 3e8e1c6a0f4db4d49f494791a27dfc1fb20160fe | [
"Apache-2.0"
] | permissive | faizzaidi/CMS_Striker | eebcd50edfccab1d63e7451cbb987595738597eb | 5a985185a0eba4273d0c9154e0c1af618313e9e8 | refs/heads/master | 2020-03-10T17:53:54.218918 | 2018-04-14T11:43:06 | 2018-04-14T11:43:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,488 | py | args_loader.py | import argparse
import sys
from core.color import green
banner = '''
______ ______ _ _ ______ ______ ______ _______ ______
/ _____) ___ \ | | | | / _____) /\ | ___ \| ___ \(_______|_____ \
| / | | _ | | \ \ \ \ | / / \ | | | | | | |_____ _____)... |
dfcdcdf161607161b0b6b1e51de9777526309a6f | 3e13654bbde1e61dfbffd68ce4894c1ca757359e | /gongong/ct_lbs/bb.py | 2d6c5328bb7a80d4b6bf366a85ca293a6872f5d2 | [] | no_license | guslearn/python2 | 0faa2facfe76dbbafebae24a9834ca9d84a9989b | 1b8c86e8dc536c84aa62848b62d3a7b7401be804 | refs/heads/master | 2020-12-24T16:07:07.106397 | 2016-03-05T09:01:46 | 2016-03-05T09:01:46 | 33,190,076 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,496 | py | bb.py | #encoding=utf-8
import urllib
import urllib2
import json
from xml.dom.minidom import parseString
from suds import WebFault
from suds.client import Client
def TestUrlOpen():
page = urllib.urlopen("http://www.webxml.com.cn/WebServices/WeatherWebService.asmx/getWeatherbyCityName?theCityName=58367")
lines = page.read... |
d971c80f02f7b0535b737f96148b8cfa74540f92 | 475df3ba9cf3b8f5385e5ecddea46d64482896ba | /0007-reverse_integer.py | 9900b1814655643dde068a69988e9fcb771bba50 | [] | no_license | ALShum/leetcode | 68cc57d9e4eb3e5c10654aa64ee2ad9a3edfe307 | a114d2719b9a147179772680b2df1f6d7c5a0c50 | refs/heads/master | 2022-06-08T20:16:33.421688 | 2020-05-03T17:28:06 | 2020-05-03T17:28:06 | 255,804,221 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 478 | py | 0007-reverse_integer.py | ## Check for overflows:
## n > 2 ** 31 // 10 then 10 * n > max int
## note that (2 ** 31 // 10) * 10 + 8 == max int
class Solution:
def reverse(self, x: int) -> int:
neg = x < 0
x = abs(x)
n = 0
while x > 0:
d = x % 10
x = x // 10
## Check for ov... |
a84516008943cb9e09fdb9d55897ba6d5c8f59e1 | c14efea8f77e9757342713f4050b71ab313960d9 | /src/utils/__init__.py | b3c81a9b0d4725d46bd96b4989b5328e2cb39d07 | [
"Apache-2.0"
] | permissive | syeehyn/hinreddit | a77dac77b4d4789edb2c5e7e01350d354da16ca3 | e19abfa584b8b0cf801dd6968ac7b42d4b68ee96 | refs/heads/master | 2022-11-10T05:32:37.408569 | 2020-06-21T01:15:52 | 2020-06-21T01:15:52 | 251,390,431 | 0 | 0 | Apache-2.0 | 2020-05-16T08:05:18 | 2020-03-30T18:15:26 | Jupyter Notebook | UTF-8 | Python | false | false | 27 | py | __init__.py | from .utils import evaluate |
36da98826037c66c77bf80be99d2958613233c7d | d886db78c784f5944fd047770795d7b44c161eaf | /automation/scripts/github_branch_autosync/github_autosync/gcloud_entrypoint/lib/__init__.py | e966ff1a8ba4f45a97a5edca798f467aed76ee9b | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | MinaProtocol/mina | b9a5a7e94aae4436ad70169788ba62e96fed1e96 | e82479e8898fc48be5907f443eb2ca00b408fc7e | refs/heads/develop | 2023-09-06T05:23:37.621958 | 2023-09-05T19:32:22 | 2023-09-05T19:32:22 | 114,581,326 | 1,443 | 391 | Apache-2.0 | 2023-09-14T20:16:48 | 2017-12-18T01:10:17 | OCaml | UTF-8 | Python | false | false | 223 | py | __init__.py | from .buildkite import BuildkiteApi
from .config import *
from .github import GithubApi, GithubException
from .request_parser import CommitInfo,GithubPayloadInfo
from .request_validator import verify_signature,is_push_event |
3f4f6f72ed2357ee4a9c101fdf5377d88e320cdf | 2ca8f9f4fee83af9d81b1fa2a65e3470b8fcef15 | /model/data_divide.py | 441279f4688af8030c335dab98f6bc5cb46ac023 | [] | no_license | lovekey111/NLP_classify-NER | 3d1a78a620478e468550c2f3049331bc2110f740 | ea072f2bf81d2c5db3bb792b94d686e8e0767011 | refs/heads/master | 2020-07-09T10:52:36.866148 | 2019-08-25T08:52:29 | 2019-08-25T08:52:29 | 203,952,150 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 171 | py | data_divide.py | from model.data_process import *
from model.config import *
# 按比例划分数据集
divide_data(ner_origin_file, ner_91_train_file, ner_91_test_file, train_rate=0.9) |
12aedb2230e9dba450dde3a68a5805a7a281f2b1 | 4df8b8028cc95c2102e4abff38e8b8111641ea45 | /ffmpeg_tools/ConfigReader/ConfigReader.py | 7a573f326a6a77644501ece19da99e9c51988d0a | [] | no_license | samuel-flynn/ffmpeg-tools | 872fcc87a374c17533c1f16d347392f9f0261b1a | 910b1bc747a87e4e418b1b431fe10314145e675e | refs/heads/master | 2020-06-16T17:37:50.400696 | 2017-06-13T01:38:21 | 2017-06-13T01:38:21 | 94,151,897 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 571 | py | ConfigReader.py | # Purpose: This is a class that encapsulates the ffmpeg-tools config file and its properties
import ConfigParser
class ConfigReader:
def __init__(self):
config = ConfigParser.RawConfigParser()
config.read('../resources/config.ini')
self.ffmpegCmd = config.get('ffmpeg properties', 'ffmpeg_command')
self.res... |
edf41798fa0e01ff97c9f048dd79ff4eb088c77a | a7d5fad9c31dc2678505e2dcd2166ac6b74b9dcc | /dlkit/authz_adapter/learning/managers.py | 89a47c8f2c81a8efae575f3c791d4a82dc5e30e3 | [
"MIT"
] | permissive | mitsei/dlkit | 39d5fddbb8cc9a33e279036e11a3e7d4fa558f70 | 445f968a175d61c8d92c0f617a3c17dc1dc7c584 | refs/heads/master | 2022-07-27T02:09:24.664616 | 2018-04-18T19:38:17 | 2018-04-18T19:38:17 | 88,057,460 | 2 | 1 | MIT | 2022-07-06T19:24:50 | 2017-04-12T13:53:10 | Python | UTF-8 | Python | false | false | 62,360 | py | managers.py | """AuthZ Adapter implementations of learning managers."""
# pylint: disable=no-init
# Numerous classes don't require __init__.
# pylint: disable=too-many-public-methods
# Number of methods are defined in specification
# pylint: disable=too-many-ancestors
# Inheritance defined in specification
from . impor... |
ecc9663cd6e96c0df8ab9e5cd7efe7163ffdc151 | ddf4d442d24e7483f175ec848eb8b2e6447067f8 | /CaptainConnsole/cart/forms/checkout_forms.py | 3ba73c2d1400dd63032fd43aba270dc6fae1ca2d | [] | no_license | liljayr/CaptainConsole | b98982854a1bfd7173bd37826409e5fe52afa440 | 08fb3324470998cce6c2adb466cc50d571022f0e | refs/heads/master | 2022-07-14T21:37:58.578276 | 2020-05-15T21:28:28 | 2020-05-15T21:28:28 | 259,962,720 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,057 | py | checkout_forms.py | from django.forms import ModelForm, widgets
from account.models import Location, CardInfo
class CheckoutAddressForm(ModelForm):
class Meta:
model = Location
exclude = ['id', 'user']
widgets ={
'country': widgets.Select(attrs={'class': 'form-control'}),
'city': widge... |
498744856f55297eaad267cda198d5d6987f7e57 | 3f29e9278329ebae7259c658eb12486379c3a193 | /tests/tuple/test_keep_regexp.py | dce790ac0c08bf62e910a89efca6957bd4a6e12e | [
"Apache-2.0"
] | permissive | BBVA/data-refinery | bd1f5f2c4ab2eb52bd4a7adff9d8718c8da059e7 | f4c0e613792c93fe5833f9d5e670e8fa6cf675da | refs/heads/master | 2023-04-09T09:13:00.767014 | 2021-04-18T14:55:53 | 2021-04-18T14:55:53 | 107,103,263 | 23 | 9 | Apache-2.0 | 2021-04-18T14:55:54 | 2017-10-16T09:00:04 | Python | UTF-8 | Python | false | false | 623 | py | test_keep_regexp.py | from datarefinery.TupleOperations import keep_regexp
def test_empty():
imp = None
op = keep_regexp("yes_")
(res, err) = op(imp)
assert res is None
assert err == {'yes_': 'no input provided'}
def test_some_working():
imp = {"yes_name": "Tom", "yes_hire": True, "no_age": 99}
op = keep_re... |
281f812ccc30205a7dda8403a021486986c88a9e | 8c47e547ca672e4d3d4a5325cd527f73e0d7653b | /django/marketbrowser/views.py | aacdaef531ab1109cce1ae4e41b08dca77a57944 | [] | no_license | jgkennedy/emdr-process | b480f9b6508ad06d590d1b850c3f26666d6683ad | 17c7816035ae74fed2248458df5a52d418e69447 | refs/heads/master | 2021-01-21T12:11:53.025112 | 2016-04-14T18:38:22 | 2016-04-14T18:38:22 | 5,084,413 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,833 | py | views.py | from django.http import HttpResponse
from django.shortcuts import render
from django.template import RequestContext
from common.models import Type, Region, MarketOrder, MarketHistory
from django.db.models import Count, Avg, Max, Min
import json
def index(request):
context = {}
return render(request, 'marketbro... |
d407e2c7e89857287fea721fce5fecea02ac210f | ad13583673551857615498b9605d9dcab63bb2c3 | /output/models/ibm_data/valid/d3_4_28/d3_4_28v06_xsd/__init__.py | c0f54ddbc9cae25294224c85af03d9b0614f8c30 | [
"MIT"
] | permissive | tefra/xsdata-w3c-tests | 397180205a735b06170aa188f1f39451d2089815 | 081d0908382a0e0b29c8ee9caca6f1c0e36dd6db | refs/heads/main | 2023-08-03T04:25:37.841917 | 2023-07-29T17:10:13 | 2023-07-30T12:11:13 | 239,622,251 | 2 | 0 | MIT | 2023-07-25T14:19:04 | 2020-02-10T21:59:47 | Python | UTF-8 | Python | false | false | 107 | py | __init__.py | from output.models.ibm_data.valid.d3_4_28.d3_4_28v06_xsd.d3_4_28v06 import Root
__all__ = [
"Root",
]
|
3b2e0ef01801699aa280ea6a4b8b06ca4d29584f | 2e518b44f54e1b4944895c7d24fae33fc30cf012 | /Boardgame/FetchBoardgames.py | b266396b7d4b9ca1ba62b65153915d62e06e5356 | [] | no_license | martaferrer/Boardgames | 7b159ac1e7bd72b892b1b252fe1e2682c8a33558 | 48532d5b7087481759ff8b5ff84112103f14d1ca | refs/heads/main | 2023-04-30T08:42:49.066365 | 2021-05-08T17:14:31 | 2021-05-08T17:14:31 | 361,646,310 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,737 | py | FetchBoardgames.py | # import statements
import pandas as pd
import requests
from bs4 import BeautifulSoup
import re
import numpy as np
import math
import pickle
import os
class BoardgameScrape:
def __init__(self, number=900):
""" Boardgame Scrape class. It provides the methods to:
- parse the Boardgames Geek websi... |
f19db94c23bb50b338c19d50b27b5941420f7af5 | 7f84cbc7cbb9a5fe7eb71dab44a286b4ffa8c48c | /mofanpython/10Def.py | 0bddc27b2865447d034ae78bc58e9af806032769 | [
"Apache-2.0"
] | permissive | AMaoYouDianFang/learnpython | 74996da6e357ae7bb2da9f1ac78e0866c694eae2 | a861d12e8dd237ea05b6edda9855b92ac0a48bcd | refs/heads/master | 2022-01-10T19:15:06.960055 | 2019-06-09T00:48:57 | 2019-06-09T00:48:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 369 | py | 10Def.py | def add(a, b):
return a+b
print(add(1, 2))
print(add(a=1, b=2))
# this is wrong
#print(add(c=1, d=2))
def addVec(a,b):
return a+b, a+1
ca, cb = addVec(1, 3)
print(str(ca) + " " + str(cb))
# 默认参数
def sale(price, brand, color="red", second_hand=True):
print("price", price, " brand:", brand)
sale(1000,... |
8f5a392d675fd29dbbc658a5fc1d5e13e9eacb59 | 4cb8c8f11c2a19a75495771b1d6b53881cd67b58 | /Production/python/Run2016C-23Sep2016-v1/SingleElectron_cff.py | 615c22eb0b2122a325d33b17173f43b1423e9b46 | [] | no_license | kpedro88/TreeMaker | d7498274106067e56aebbed7f086fbee8bf46f7e | 0260dc10392e4828452e559beb3b6dc8fa765df5 | refs/heads/upgrade2017 | 2023-07-06T13:24:04.465706 | 2018-04-03T17:56:48 | 2018-04-03T17:56:48 | 38,841,239 | 0 | 1 | null | 2021-11-11T17:20:57 | 2015-07-09T19:35:41 | Python | UTF-8 | Python | false | false | 124,245 | py | SingleElectron_cff.py | import FWCore.ParameterSet.Config as cms
maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
readFiles = cms.untracked.vstring()
secFiles = cms.untracked.vstring()
source = cms.Source ("PoolSource",fileNames = readFiles, secondaryFileNames = secFiles)
readFiles.extend( [
'/store/data/Run2016C/Sing... |
f97c10dbef24b91b28d889b5730ada1b4010f8d9 | dd80a584130ef1a0333429ba76c1cee0eb40df73 | /external/chromium_org/tools/telemetry/telemetry/page/extensions_profile_creator.py | 4c43774e7070fb943c22ddf54711418870ba667d | [
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference",
"GPL-2.0-only",
"Apache-2.0",
"LicenseRef-scancode-unknown"
] | permissive | karunmatharu/Android-4.4-Pay-by-Data | 466f4e169ede13c5835424c78e8c30ce58f885c1 | fcb778e92d4aad525ef7a995660580f948d40bc9 | refs/heads/master | 2021-03-24T13:33:01.721868 | 2017-02-18T17:48:49 | 2017-02-18T17:48:49 | 81,847,777 | 0 | 2 | MIT | 2020-03-09T00:02:12 | 2017-02-13T16:47:00 | null | UTF-8 | Python | false | false | 8,171 | py | extensions_profile_creator.py | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import json
import logging
import os
import platform
import shutil
import socket
import sys
import tempfile
import time
import urllib2
import zipfile
from te... |
2c8af3bdf4cf2282a71f9249a47575bb0fcbc88d | 08aa0bc5d9053c7cfcb4cb366dea869734b63f54 | /training_data.py | 7a84a3a48c839bbef9695cace7a7048607b7ec02 | [] | no_license | zicongmo/language-classifier | fe9c2254f7f669027889a25f59f72ac685f12a01 | 9172ba7fdd8b07fc92dffb2aef8a60ed096d91d6 | refs/heads/master | 2021-05-16T00:48:05.449953 | 2019-03-04T23:17:15 | 2019-03-04T23:17:15 | 107,081,744 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,458 | py | training_data.py | import random
import numpy as np
class LanguageTrainingData:
# The names of the files containing language data for 2 languages
def __init__(self, language_files, batch_size,
num_char_types=32, max_word_length=10):
self.train_data = {}
self.test_data = {}
self.valid_... |
f354468537cf6115d33d3d6debb6af30fa43d0d4 | 455a501b6e7579a8d150d40645311433bf22d3c4 | /Day 23/q2.py | 8c783f13eef40635a8bdfe08ee6262bb5b737bc9 | [] | no_license | Infinidrix/competitive-programming | e77e442b73590b9bf42a40832323d87f57bbbdf4 | 6cf7a9de7d076405990d497871bb2ccfe04fc6f3 | refs/heads/master | 2023-02-09T04:02:31.389806 | 2023-02-02T11:10:10 | 2023-02-02T11:10:10 | 222,917,959 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 432 | py | q2.py | def isYasserHappy(tastiness):
summation = 0
total_sum = sum(tastiness)
for i in range(len(tastiness)):
if tastiness[i] <= 0 and (-tastiness[i] >= summation or -tastiness[i] >= total_sum - summation - tastiness[i]) :
return "NO"
summation += tastiness[i]
return "YES"
useless = int(input())
for i in... |
cdd283e4a512ffa0b903850474ab0312d8506445 | d321fd237038ba90e18098118ebe05bf751eb625 | /tripweather/models.py | b2511e2b4a351abcb200a81db63cfe4df21dd0e8 | [] | no_license | wahello/herriageio | df3bf9ec447f4226db6c8ddb17151ef230af99af | 988bebb2bf69adc0544b3cc3ca98783ffcecae06 | refs/heads/master | 2020-04-27T08:06:26.122786 | 2019-03-05T19:50:10 | 2019-03-05T19:50:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 727 | py | models.py | import django
import uuid
from django.db import models
from django_hosts import reverse
class Trip(models.Model):
unique_id = models.UUIDField(
default=uuid.uuid4, editable=False, unique=True)
name = models.CharField(max_length=256)
start_loc = models.CharField(max_length=50)
end_loc = models... |
fbbc8e42bdea919910ea09c2f3971807163f505f | 927bd5c34d51d24eacaf24d0ab556126fd7ae16b | /day_14/michael/solution.py | 5eba91a9c40599e185f457811834750d1b6ed18f | [] | no_license | voidlessVoid/advent_of_code_2019 | 3dbef85f1753fedd6418cfb6989604f70f745d64 | fa59c3383ef846c237869a5f8a5284ea3a6ce4e9 | refs/heads/master | 2020-09-18T11:25:41.798889 | 2020-09-16T10:12:59 | 2020-09-16T10:12:59 | 224,144,892 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,390 | py | solution.py | import os
import sys
import pandas as pd
import numpy as np
import math
import datetime
import operator
from copy import deepcopy
from collections import Counter, ChainMap, defaultdict, deque
from itertools import cycle
from functools import reduce
CURRENT_DIRECTORY = os.path.dirname(__file__)
os.chdir(CURRENT_DIRECTO... |
053db75592b37fcabf27307a690a6f9caeb559c4 | 91c16c170d772370dc1110a1a78c2d74a91d753d | /day36_saudidevorg.py | 7407b64191b947b62560a4dfdd16466b3ebbae15 | [] | no_license | zabdulmanea/100DaysOfCode | cafc3e7072d7a58afd164cb0c4b6b4f45a11ce14 | 2d53b18aae7ff27a9f2552cda31281cf4d6e9c95 | refs/heads/master | 2020-07-07T15:08:37.315709 | 2019-12-15T14:35:16 | 2019-12-15T14:35:16 | 203,384,077 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 420 | py | day36_saudidevorg.py | # Python Lambda - part 2
# Why Use Lambda Functions?
# a function that takes one argument, and that
# argument will be multiplied with an unknown number
def myfunc(n):
return lambda a: a * n
# make a function that always doubles a number
mydoubler = myfunc(2)
print(mydoubler(11))
# def mydoubler(a):
# ret... |
d2924db5233bb4c4af1b33ccab0149d93490b1f4 | 1215dc15b9ef2c3a27ef7e2454e0e97299365514 | /scripts/Reader.py | c8a72c548e5ac7b458e44d62cd0dc87860ef38ef | [
"MIT"
] | permissive | peqoud/RPi-Jukebox-RFID | b4dd638b9eb7a2ac663d702f3d2f22de15c8a63d | 58ced191e5dec5740e5ecc4708cc4efaf869c72f | refs/heads/master | 2020-03-09T00:59:02.894774 | 2019-01-27T23:26:53 | 2019-01-27T23:26:53 | 128,501,884 | 0 | 0 | MIT | 2018-04-07T17:06:21 | 2018-04-07T06:13:39 | PHP | UTF-8 | Python | false | false | 1,394 | py | Reader.py | # Forked from Francisco Sahli's https://github.com/fsahli/music-cards/blob/master/Reader.py
import string
import csv
import os.path
import sys
from evdev import InputDevice, categorize, ecodes, list_devices
from select import select
class Reader:
self.deviceName = None
self.dev = None
# Mapping table f... |
cc242c067c04da8dd6dab695d190bf6c89e997a0 | bbb95ee5b48711e247151d7366c8e2075142e625 | /tools_technologies/sources/batch_processing/unspmf/distributed_ADMM_SVM.py | 41b441f626022d89bd22015ec493ce98d9d09228 | [] | no_license | ibidaas/knowledge_repository | 77c86c226da54a2d1cec4ce08ec77b7120d94e5e | e073ec28506faf61b33f695eb6befd8026446fde | refs/heads/master | 2022-07-20T00:36:04.702936 | 2021-03-17T10:28:25 | 2021-03-17T10:28:25 | 123,921,866 | 4 | 11 | null | 2022-07-08T05:04:40 | 2018-03-05T13:14:59 | TypeScript | UTF-8 | Python | false | false | 6,984 | py | distributed_ADMM_SVM.py | """
ADMM SVM regression
This work is supported by the I-BiDaaS project, funded by the European Commission under Grant Agreement No. 780787.
"""
""" To be fully tested """
import numpy as np
import cvxpy as cp
import functools
import time
import sys
import random
from pycompss.api.task import task
from pycompss.api.... |
ba01ddd732e27b88db568715a90a14649f1cc142 | 4849b90001c36af07957a43a4808a0f039817dae | /dags/aws_examples/example_s3_bucket.py | 66872bdc1cdac27b01be3f1d0c53c6f9da7d5c2b | [] | no_license | wisemuffin/airflow | 6c5b3830bdaf93e0819a24c8e1f510a81a76408a | 06b7bccb4f24767a8cc1bfa860054b684ab48a4f | refs/heads/main | 2023-02-23T02:20:53.676434 | 2021-01-28T22:32:16 | 2021-01-28T22:32:16 | 327,523,334 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,344 | py | example_s3_bucket.py | import os
from airflow.models.dag import DAG
from airflow.operators.python import PythonOperator
from airflow.providers.amazon.aws.hooks.s3 import S3Hook
from airflow.providers.amazon.aws.operators.s3_bucket import S3CreateBucketOperator, S3DeleteBucketOperator
from airflow.utils.dates import days_ago
# os.environ.ge... |
081ed1bf80a4cdd8d37a3435f20da5a2f551cb47 | bef1a0cb1e0fc873df027c1a83609dcfc29d3536 | /phase-retrieval.py | 18429f1e9207eb4197b05e580abec4fe86322be3 | [
"MIT"
] | permissive | rwong01/ee364b-phase-retrieval | 6f1ea4a395ec3de2e0d95ca3504f6bdac1e7252b | dff86c62dbe74d022b86fa7c00cfa322d3ca46ba | refs/heads/main | 2023-05-05T10:04:33.633322 | 2021-05-29T06:04:22 | 2021-05-29T06:04:22 | 371,839,609 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,491 | py | phase-retrieval.py | # -*- coding: utf-8 -*-
"""
@author: Rebecca Wong
@project: EE364B Final Project, Spring 2021
"""
import numpy as np
from numpy import linalg as LA
import cvxpy as cp
from matplotlib import pyplot as plt
import scipy.fftpack
from scipy.linalg import dft
import mosek
#%%
## Signal Construction##
def A(x):
# FFT O... |
fbf30c04cfa5b486c3e27d2049dcb2fbebff7805 | 21f38f1a9f6d4edfa3b233697e17d86f30b168ce | /demozoo/settings/test.py | e621bc0b9544b6662de22d40caba3382aee570af | [] | no_license | m100bit/demozoo | 3734d0126a6f0bd9ff98128a4350e40b22cdd8a3 | 93918da57e7cb96a0d2f724e5a876406d3477891 | refs/heads/master | 2023-03-14T05:34:20.323613 | 2023-01-27T23:10:32 | 2023-01-27T23:23:52 | 232,933,218 | 0 | 0 | null | 2020-01-10T00:32:53 | 2020-01-10T00:32:53 | null | UTF-8 | Python | false | false | 16,198 | py | test.py | import io
import json
import os
import urllib
import urllib.request
from PIL import Image
from .base import * # noqa
SECRET_KEY = 'BOOOOM'
PASSWORD_HASHERS = (
'django.contrib.auth.hashers.MD5PasswordHasher', # don't use the intentionally slow default password hasher
)
DEFAULT_FILE_STORAGE = 'django.core.fi... |
6bbf579b2bebcaa836829cb37fca7ed2e4aca60a | 0fd77fec1d2b56dcf73a26127fab38c81ec45386 | /oil_pro/prowebsite/products/migrations/0001_initial.py | 570b0b21e402d8980aa6891176ee3fa207206b87 | [] | no_license | vaibhav1909/web-project | 6367f069800bd5315d12dc644cc040ad0ccb01e2 | cc4e07cca813c6cd8af659a4cb9acddedbfe4f82 | refs/heads/main | 2023-05-21T11:44:41.226409 | 2021-06-13T12:22:52 | 2021-06-13T12:22:52 | 374,067,272 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 678 | py | 0001_initial.py | # Generated by Django 3.0.7 on 2021-06-03 10:14
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Items',
fields=[
('product_id', models.Char... |
8519e226d757eeff2c7fb8ca739017b238642e16 | 7c7defaaa5c11eca461cae9e6949b3bef92f5e7f | /python/hamming/hamming.py | 9ff54a7ba2c4a14493b7c9d3f6a182b05cadaa66 | [
"MIT"
] | permissive | cg-cnu/exercism | 3885b6ba7d6b5c1a2a9ef2f7752dd5e09c231198 | 3e295bbbf38527dd34eb24feaeebdcc779f6e29f | refs/heads/master | 2021-08-28T08:25:51.909654 | 2017-12-11T18:01:34 | 2017-12-11T18:01:34 | 111,211,253 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 169 | py | hamming.py | def distance(strand_a, strand_b):
if len(strand_a) != len(strand_b):
raise ValueError
return len(filter(lambda (x, y): x != y, zip(strand_a, strand_b)))
|
e9adae76738d12875990ebf111aeb30ef68c31ba | 34a48bc2a6ceeccf3092d3431277ee132bf6b6c2 | /clinicsync/views.py | ebf014bf2938aab118b45e46b51cc013092531a5 | [] | no_license | sabm0hmayahai/ClinicSync | fa3ae6e6b97525e8202c7233d458e4b89a76d8ad | 3adbbaeb0b3b5683d956d766b0bbb825b120b4f9 | refs/heads/master | 2022-12-23T23:17:54.107429 | 2020-10-04T05:34:02 | 2020-10-04T05:34:02 | 284,081,500 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,557 | py | views.py | from flask import url_for, request, render_template, Response, jsonify, redirect
from clinicsync import app, model_predict, model
import numpy as np
from clinicsync.util import base64_to_pil
from datetime import datetime
@app.route('/predict', methods=['GET', 'POST'])
def predict():
if request.method == ... |
6e8b74eadec659e9462e29e4a6dfbd265f89d315 | f3969ddc4e4e9a9d36944c8997c3381bcd512f9d | /bin/mergeDPgpd.py | 520273bb120d1ff22598d132906d3fb66c10d653 | [
"Apache-2.0"
] | permissive | jason-weirather/IDP | 876bfc945a9919e7b277928b22cd95f8e30aac8a | a79ac178317dcfa6eaec0cb0d8d9e65c827a79a2 | refs/heads/master | 2021-06-26T22:23:44.920896 | 2017-09-18T01:47:52 | 2017-09-18T01:47:52 | 103,755,677 | 5 | 4 | null | null | null | null | UTF-8 | Python | false | false | 1,224 | py | mergeDPgpd.py | #!/usr/bin/python
import sys
import os
from numpy import *
################################################################################
if len(sys.argv) >= 4:
name_filename = sys.argv[1]
gpd_filename = sys.argv[2]
output_filename = sys.argv[3]
else:
print("usage: python name_filename gpd_filenam... |
ebac048f2fbe3ab9fef57027bc344454d1f9ec77 | a1f2b5290ae1c44e4fb04be6dc827c9f3f424b8b | /iis-3rdparty-madis/src/main/resources/eu/dnetlib/iis/3rdparty/scripts/madis/lib/pyreadline/console/event.py | bb7f014ac1d99266c3c6fc42ca901b2eb14714bb | [
"Apache-2.0",
"Zlib",
"LicenseRef-scancode-free-unknown"
] | permissive | openaire/iis | c45cd3cf98114605453ba3f42bb3c63d3da6e033 | e807df7bd5f0c5127f9c295243558e9b33884e63 | refs/heads/master | 2023-08-18T14:54:35.485327 | 2023-07-21T15:21:05 | 2023-08-08T15:02:21 | 42,290,369 | 23 | 81 | Apache-2.0 | 2023-09-07T12:44:24 | 2015-09-11T05:55:08 | Java | UTF-8 | Python | false | false | 1,131 | py | event.py | class Event(object):
'''Represent events from the console.'''
def __init__(self, console, input):
pass
def __repr__(self):
'''Display an event for debugging.'''
if self.type in ['KeyPress', 'KeyRelease']:
chr=self.char
if ord(chr)<ord("A"):
chr... |
1439a851a3a2f10ee1afa03c54543a936c0809e7 | 0c099bd0990b9723f9bb458fc253017db9ee481f | /src/discourseSSO/default.py | a603482ec334aba7a84b9b964c9c02e7d1bd79fd | [
"Apache-2.0"
] | permissive | fmarco76/DiscourseSSO | e8954446cf20b909908f9d4cb05b2e06376bcfc9 | 97d3318c6ebe9cb10af3d5aeaff4da1b60472ff8 | refs/heads/master | 2021-07-08T02:45:37.995775 | 2021-04-28T16:37:41 | 2021-04-28T16:37:41 | 36,439,902 | 15 | 5 | null | 2015-06-03T10:12:29 | 2015-05-28T13:24:18 | Python | UTF-8 | Python | false | false | 1,225 | py | default.py | # Copyright 2015 INFN
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... |
db852a1ce05edded5244e4395b325ba269c2866f | a4839a482eb10b0ea6c9fd2ce51e2fc195067b0b | /dashboard/migrations/0007_auto_20181120_1344.py | afba554da704284d3df94a0fe48435b16501b95c | [] | no_license | gopuvenkat/ambulance-108 | ab86ed371b767f816a87599b6415fee7f8bf09f5 | e2679548bad9cfba8fec24cdab189d412298f4b4 | refs/heads/master | 2022-12-15T02:51:15.965521 | 2021-03-19T05:42:26 | 2021-03-19T05:42:26 | 157,237,420 | 0 | 2 | null | 2022-04-22T20:58:06 | 2018-11-12T15:48:17 | Python | UTF-8 | Python | false | false | 546 | py | 0007_auto_20181120_1344.py | # Generated by Django 2.1.3 on 2018-11-20 13:44
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dashboard', '0006_auto_20181119_1943'),
]
operations = [
migrations.AlterField(
model_name='ambulance',
name='latitu... |
61e692c8e6659ec61959247589bf91b793622a5c | ae90864ffefaae65da9c6e1809bf27208a9d34fc | /bin/print_server_info.py | 4cce369c2438ea40c417cb189693711d185544ae | [] | no_license | apDataGuy/pytan | 6374f128c4b4070d041d8bfb05c22e2434ff4a68 | 24c2907e28b3a93f3a96aa4cb42933ed2c6f83bf | refs/heads/master | 2021-01-16T22:10:31.715453 | 2015-03-26T17:32:11 | 2015-03-26T17:32:11 | 38,935,203 | 0 | 0 | null | 2015-07-11T17:56:56 | 2015-07-11T17:56:56 | null | UTF-8 | Python | false | false | 2,638 | py | print_server_info.py | #!/usr/bin/env python
# -*- mode: Python; tab-width: 4; indent-tabs-mode: nil; -*-
# ex: set tabstop=4
# Please do not change the two lines above. See PEP 8, PEP 263.
'''Get server info'''
__author__ = 'Jim Olsen (jim.olsen@tanium.com)'
__version__ = '1.0.4'
import os
import sys
import getpass
sys.dont_write_bytecode ... |
a60887610345fc7b047cd8fafc7a4b826c1e9cc1 | 21550f357316b57f0ac510ca9d6452913752e5d4 | /OpenCV/20200203/20200203_6.py | 077c1f1f336ac2b3f8ca402301fa43456d443a09 | [] | no_license | YangBinFan/practice | 8b23ae34c0aaaf4a026cf2e3155362927eff7f39 | eaf44878853583fe73ecfe1622b95d77bc7ab69b | refs/heads/master | 2021-01-03T19:20:10.720380 | 2020-02-17T01:07:53 | 2020-02-17T01:07:53 | 240,205,425 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 257 | py | 20200203_6.py | # -*- coding: utf-8 -*-
"""
Created on Mon Feb 3 15:23:40 2020
@author: bck10
"""
import cv2 as cv
import numpy as np
img = np.zeros((512,512,3), np.uint8)
cv.circle(img,(44,63), 36, (0,100,255), -1)
cv.imshow('image',img)
cv.waitKey()
|
f0cbc729c9009f3d82d1b2070ac3681b4fea45a5 | 744218cbe46604ba42229acd39ff9fdd42c312b9 | /symbol_transmitter/symbol_generator.py | 5e706dbff469efbd1351d2a400768fae2f8f5eb6 | [] | no_license | mtriche128/elec5727_project | 666734d5e979aec54148e65b3cf0f71fb11b6bfe | 9fae896cc4dd0320d0b4c0ef87b9ba618a828c6d | refs/heads/master | 2021-01-01T03:34:31.037431 | 2016-10-24T02:32:22 | 2016-10-24T02:32:22 | 57,099,836 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 5,670 | py | symbol_generator.py | import cv2
import cv2 as cv
import numpy as np
import time
import os
import binascii
#linux cv import
#import cv2
#import cv2.cv as cv
#TODO turn these into arguments
#from sys import argv
#reference_dataset, testfile, refresh_rate = argv
reference_dataset = os.path.abspath("../media")
testfile = os.path.abspath("./... |
ea588189426be10d3fc0b3ecbc3d56f68400c2e0 | f9d68acd78fb44d26985dc06b577a5bc88b18ec1 | /maintenance.py | 4718e189ed31759cc65c02f14a96d7549fb1ebf4 | [] | no_license | jrj2211/343-Sales | e2839c51f6fb89597a15e629205fd311851eb677 | 5df2762f235715fe9c94fa2b27558f2756531aac | refs/heads/master | 2021-01-19T17:54:49.522367 | 2017-05-09T13:31:24 | 2017-05-09T13:31:24 | 82,702,192 | 0 | 1 | null | 2017-05-09T13:31:25 | 2017-02-21T16:30:14 | JavaScript | UTF-8 | Python | false | false | 10,858 | py | maintenance.py | import os
import shutil
import urllib
import sys
import subprocess
# Links
githubURL = "https://github.com/jrj2211/343-Sales.git"
nodeURL = "https://nodejs.org/dist/v6.10.0/node-v6.10.0-linux-x64.tar.gz"
# Other important info
baseName = "sales-"
basePath = "/var/www/"
cwd = os.getcwd()
cwdParts = cwd.s... |
ab820ff83a408ca886a67167a613ae7e3ee9b2a6 | b8b8b36049217e4da9c3693beeeae74a0d97f875 | /sum-of-distances-in-tree.py | deb3acfd1fe9e8ce2d06aa662e31aa51f566027a | [] | no_license | xichagui/algorithm | e9d94a8ac06c6b5d791ed540142fc22f83ef41f2 | 5d4114bc9d77f80da26374168ab289dfe22099f4 | refs/heads/master | 2021-06-20T03:20:55.637823 | 2021-01-13T17:57:05 | 2021-01-13T17:57:05 | 66,262,380 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,032 | py | sum-of-distances-in-tree.py | class Solution:
def sumOfDistancesInTree(self, N: int, edges: List[List[int]]) -> List[int]:
tree = [[] for _ in range(N)]
for node, child in edges:
tree[node].append(child)
tree[child].append(node)
depth = [0 for _ in range(N)]
count = [0 for _ in range(N)]
... |
5cb5a40a32ae007026f710d4a0093ef24a80e601 | 74ea8033621df8db05a2cc5c1acdc85f7ea08d1b | /K-NearestNeighbor/kNN.py | 8d72c12a6bdfbd59d95ebed2a0d4aafc7daa4909 | [] | no_license | CodingChaozhang/python_ml_code | 2583227c048fcf2f874fbf24405d42856da58243 | 2bf19bb5f737c3fbbc41e5e0d45304eb981b44aa | refs/heads/master | 2020-05-26T06:49:03.067219 | 2019-01-02T13:54:13 | 2019-01-02T13:54:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,726 | py | kNN.py | # -*- coding: utf-8 -*-
"""
Created on Sat Oct 13 21:25:31 2018
@author: GEAR
"""
import numpy as np
import pandas as pd
import collections
from sklearn import preprocessing
def dataload1(dir):
'''
使用常规方法读并处理txt文件
'''
fr = open(dir, 'r')
# 读取所有行
lines = fr.readlines()
# 得到文件行数
numLine... |
2d46b89407fc6c233e9700a3e962c824b043d8f9 | 31e2818009a5476f92afc17f71a7d9043cedc4fa | /python/qisrc/actions/checkout.py | 9c3ae04e9c21862ddd2ff41e7e7dd4c4e71af46d | [
"BSD-3-Clause"
] | permissive | Giessen/qibuild | bea3c348c37287b0d9616dd997fc9f584885feb2 | bad7430b2ed5f0619dc8858d8fa430d8a27b8b68 | refs/heads/master | 2021-01-17T07:51:50.458290 | 2014-03-07T14:43:30 | 2014-03-07T14:43:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 913 | py | checkout.py | """ Checkout a new manifest branch and every repository
in the worktree
"""
from qisys import ui
import qisrc.parsers
import sys
def configure_parser(parser):
qisrc.parsers.worktree_parser(parser)
group = parser.add_argument_group("checkout options")
group.add_argument("branch")
group.add_argument("... |
21776b74b9247b52a7b4a2e403a7f9ac576e0191 | cc5d42c8c213a3bf1cce8701da44afec7ea69397 | /basic/010_Color Detection_webcam.py | 384ea74bc26c1d5838a664d0d54b25a55888d0b7 | [] | no_license | SeWonKwon/OpenCV | 067033a9f7824401b214cef6abeddd7e18b65fe7 | 229da044eedd2ac75d6e701db3fd90a0e91b8ef1 | refs/heads/main | 2023-05-02T08:59:41.582551 | 2021-05-22T10:44:59 | 2021-05-22T10:44:59 | 367,872,671 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,642 | py | 010_Color Detection_webcam.py |
import cv2
import numpy as np
frameWidth = 640
frameHeight = 480
cap = cv2.VideoCapture(0)
cap.set(3, frameWidth)
cap.set(4, frameHeight)
def empty(a):
pass
cv2.namedWindow("TrackBars")
cv2.resizeWindow("TrackBars",640,240)
cv2.createTrackbar("Hue Min","TrackBars",30,179,empty)
cv2.createTra... |
c024e3e8d7f89c03d5609e4ac78c00ac84fcf58e | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2878/60770/238129.py | d1a47bff24111323b145696472828ab0f483ea0b | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 282 | py | 238129.py | def solve():
length=int(input().split()[1])
nums = list(map(int, input().split()))
res=999
for num in nums:
if length%num==0:
if int(length/num)<res:
res=int(length/num)
print(res)
if __name__ == '__main__' :
solve() |
23ffb2217b253760e45ab4f7c71fbd433e49291e | 863d18e5f58c13fff7e332f40989f8e231cc236d | /Py_Simulations/icons/magnifying_icon.py | 5a1c8135ef971633596d2487e3a38c76c4d7a06d | [] | no_license | p479h/sloppylowslyeasymade | d010257ba848cd2f4cb69d34d4e28151d6c4dcd1 | ee527855679fad9daae647911f9d09fdfa64853b | refs/heads/master | 2022-12-29T16:42:40.766044 | 2020-10-12T08:06:13 | 2020-10-12T08:06:13 | 255,745,035 | 26 | 2 | null | 2020-04-19T19:10:50 | 2020-04-14T22:46:41 | Python | UTF-8 | Python | false | false | 1,317 | py | magnifying_icon.py | try:
from PIL import Image
magnifying_icon = Image.open(r"icons\magnifying_icon.png")
except:
import time
import pandas as pd
import matplotlib as mpl
import matplotlib.pyplot as plt
#Making the plot
fig, ax = plt.subplots(figsize = (4, 4))
lim =-5, 5
ax.set(xlim = lim, ylim = l... |
498d154326854899ca6590a213d101ff44f287f9 | f8728c12226754e6f7b3451d0f80b7f29a816ecf | /world/creatures/blob.py | d2d5abacfc2863431ee865c5dc93f87cf60ccd62 | [] | no_license | yourprincessisinanothercastle/ascii_server | d80cc75793d5a9e0a4e01668bda17395ee77285c | 3217d2fd6b8cce10882a7f8bd387c913316e353f | refs/heads/master | 2023-03-09T05:08:04.841162 | 2020-05-16T21:40:09 | 2020-05-16T21:40:09 | 258,474,506 | 0 | 0 | null | 2021-02-26T02:51:10 | 2020-04-24T10:01:18 | Python | UTF-8 | Python | false | false | 467 | py | blob.py | import logging
from world.creatures.creature import Creature
logger = logging.getLogger(__name__)
class Blob(Creature):
sprite_name = 'blob'
ACTION_TIME = dict(
move=1.,
attack=.20,
cooldown=.5
)
def __init__(self, x: int = 0, y: int = 0, life: int = 10, damage: int = 5):
... |
94880f5e1338979166c05c6a9e157b8250500e7b | 92efaae55485c703f8db9a1faa8d24e0b826d5ff | /nuggan/id_maker.py | fa00954ecf24e48dd13b12bfaaeb748968b8159f | [
"MIT"
] | permissive | kjschiroo/nuggan | 813bddf739e858775a2dd6e019d5f87b0786aa13 | efb33a4ab2c04934a2518fe7efe48c7df5e7cb5e | refs/heads/master | 2020-09-11T21:49:52.413409 | 2019-11-17T22:29:52 | 2019-11-17T22:29:52 | 222,201,117 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,462 | py | id_maker.py | """Module for creating ids"""
import hashlib
import time
import uuid
def create_id(
prefix: str,
salt: str = None,
) -> str:
"""
Create an id string.
:param prefix:
The prefix with which to prefix the generated id. This should be used
to identify what the id is being appli... |
3424ec142c33bcbefbc9fd9159d7ebd2938c0dd3 | 3e30894c60a76b762444bb8280742b37ee1a6ed2 | /examples/sentiment-analysis/prepare_konlpy.py | b93354cda5c67153d6e247f0ca2a28f06eddb96d | [] | no_license | dkyos/dev-tensorflow | d3b2d26a0c60cf91fe500565ff85a167803eaeeb | ddfd9f5d132bd1ad41ba6b6ca682d13100c63678 | refs/heads/master | 2021-01-23T01:50:49.618916 | 2018-11-06T02:29:11 | 2018-11-06T02:29:11 | 85,936,712 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,166 | py | prepare_konlpy.py | from collections import Counter
import itertools
import tensorflow as tf
import numpy as np
import time
from konlpy.tag import Twitter
def read_data(filename):
with open(filename, 'r', encoding='utf-8') as f:
data = [line.split('\t') for line in f.read().splitlines()]
data = data[1:] # ... |
9e752df028a2dcde668e3a56eb17b24006144dcd | 92023290c3ae7a1ce5398696a7e8feab87d11a04 | /botquery.py | 6feba009e1da3481814ae17c2de4e8485ca04755 | [] | no_license | EigenAlexa/flask-alice | 58234ed91f6be14cfe632c79e06e499ea6570a71 | 8299d32d8f1ceed300d842f9f51904eaede7984d | refs/heads/master | 2021-03-24T12:52:05.869282 | 2017-07-22T17:10:16 | 2017-07-22T17:10:16 | 76,002,079 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,565 | py | botquery.py | """ The main file for the bot server. """
from __future__ import print_function
import json
from flask import Flask, request
from bot_wrapper import BotWrapper
from MeteorClient import MeteorClient
from utils import replace_localhost
import atexit
# create our little application :)
app = Flask(__name__)
running_bots = ... |
f1403254169ae80e7d4469eb09eee3c4c7b82073 | 6e58ea13716031228b8e5c779e6652a7619cc219 | /Model/RealestateScraperItem.py | 0db5803cce532b24676945c9183e4e5300f5f89f | [] | no_license | bassem97/scrapy-flask | 36ce1bc9275176028a900ee01e9841d34d8aa978 | f44406c01bdc691e582b7475db1779ad3bb94716 | refs/heads/master | 2022-07-16T11:18:27.625761 | 2022-06-27T23:12:03 | 2022-06-27T23:12:03 | 489,072,972 | 0 | 0 | null | 2022-06-27T23:11:49 | 2022-05-05T17:48:34 | Python | UTF-8 | Python | false | false | 1,246 | py | RealestateScraperItem.py | # Define here the models for your scraped items
#
# See documentation in:
# https://docs.scrapy.org/en/latest/topics/items.html
import scrapy
class RealestateScraperItem(scrapy.Item):
#default_input_processor = MapCompose(unicode.strip)
# define the fields for your item here like:
typeImm=scrapy.Field()#... |
7f771d77d8a7c64c0216cd2099f51e41e93ec9ad | 63b616feafef6b88f12b060c32901182329be177 | /skrypt 1.py | 37e15c46ab9be01f25c1f6af616bc8f8cb9fcc58 | [] | no_license | ziajek444/Konspekt | b1a165f4f67a7f0afb29c0bd8ee9a72dcc239238 | 69e4658aa2cb61c00a282cc96dc56b639f8a5e32 | refs/heads/master | 2020-05-24T15:24:12.155457 | 2019-05-18T21:51:22 | 2019-05-18T21:51:22 | 187,330,539 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,365 | py | skrypt 1.py | # 1 Podstawowe operacje tekstu
# zmienna typu string
zmienna1 = "111"
# zmienna typu int
zmienna2 = 222
# zmienna typu float
zmienna3 = 3.3
# zmienna typu lista
zmienna4 = ["lista", 4, 5.5]
print(zmienna1, zmienna2, zmienna3, zmienna4, "444",sep=" + ",end=" $$ \n")
print(zmienna1,str(zmienna2),... |
f3f476bad95d1cbf3cd6c980852a0d918d1ae342 | 812696b2f2d2dec6c21c325e524d7f831cf96e53 | /src/connectionFunctions.py | e18cb124cf0dee9839a3897b657d4339e0504e86 | [] | no_license | robrant/twitterCrowded | 1e6cc21ce8c18efb7fc9e81bda443077b69dddcd | 8ee8c942aa13f3f9f30292ac98c6a31cd6eebe91 | refs/heads/master | 2021-01-17T05:28:06.076671 | 2012-10-17T13:38:30 | 2012-10-17T13:38:30 | 6,102,113 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 7,830 | py | connectionFunctions.py | import os
import sys
import datetime
import json
import urllib2
import logging
#============================================================================================
# TO ENSURE ALL OF THE FILES CAN SEE ONE ANOTHER.
# Get the directory in which this was executed (current working dir)
cwd = os.getcwd()
wsDir = o... |
a262d770169b76578914f47c3c2994e698e5dfd7 | dff731575d4d0b1984d24197be179e9c07583f92 | /legacy/dlsd/src/expermient/analysis_16_12_12.py | 1b751ac84740e5fd7283425f19f85ca5d49f516a | [] | no_license | tony32769/dlsd | 11bcfba4e3ff74742d15563f6909d079ae5d399b | d1a0b6db56fe3680d5942ecb2cfbc5ab0eb2baa1 | refs/heads/master | 2021-01-24T20:58:54.742203 | 2018-02-21T20:33:18 | 2018-02-21T20:33:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 24,446 | py | analysis_16_12_12.py | from dlsd.dataset import dataset_helpers as dsh
from dlsd.dataset import dataset_sqlToNumpy as stn
from dlsd.models import SimpleNeuralNetwork as model
from dlsd import debugInfo
from dlsd import makeCommandLineArgs
import tensorflow as tf
import os
import pandas as pd
import numpy as np
import time
class Configurat... |
c4229601c455cce3983a3fb260c75aee81d4909d | 9c829507c42a41d9cf43ebaef07f39aedce0ab3e | /pipeline_dev/v1-LuigiPipeline/venv/lib/python2.7/fnmatch.py | c8e90cb81c3ff9ad07316c29fe8e80b4c5a267f6 | [] | no_license | weizhou2273/Project3_kaggle_Russian_housing | e4490f1aecdc45855f59dd55e6d6e2b07df7f4e3 | 83e22f8bf1214197b25deae775dd26821bdb9757 | refs/heads/master | 2020-12-02T21:12:30.959117 | 2017-07-05T02:52:51 | 2017-07-05T02:52:51 | 96,269,560 | 4 | 2 | null | null | null | null | UTF-8 | Python | false | false | 44 | py | fnmatch.py | /Users/FYB/anaconda/lib/python2.7/fnmatch.py |
e583a9682afed27558019bb85ec91aed7d1aadd6 | 9140f302df4c5a30f54e90b9224921922cf01d58 | /TCP-Server.py | 0767c2b4a0b242bae89029a86f3e9938410d19b9 | [
"MIT"
] | permissive | Zahit61/Sprachnachrichten-Zusammenfassen | 8878cf01a632b1be1d067226b8d086adc5ea84a7 | 331f0a71c06821bef13f08c8e8d91cfc8fe02a00 | refs/heads/main | 2023-02-25T03:58:31.728523 | 2021-01-31T22:07:00 | 2021-01-31T22:07:00 | 319,692,505 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,816 | py | TCP-Server.py | #import of the necessary modules and the API functions
import socket
from speechText import speechtext as st
from NLP import npl
#declaration of the port and adress for the communication
PORT = 8080
SERVER = "127.0.0.1"
ADDR = (SERVER, PORT)
#initiate the TCP-Socket connection
server = socket.socket(socket.AF_INET, ... |
a18eece3c099a80a45f4d71987f2594ddf80d95e | ec834ed391cd2a672d42706c3fe7c73d5fef3139 | /config.py | 69e5ebf8c1a830d39d0b8b008f7a3af69889d6c6 | [] | no_license | deyaberger/cartpole | 1a2afe792659f1b080beb98c1a7e701a77b08c46 | 98396c49882a3a0f3b83202ba1c7691d3f21e041 | refs/heads/master | 2023-07-31T21:05:05.251522 | 2021-09-21T16:28:34 | 2021-09-21T16:28:34 | 336,789,345 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,042 | py | config.py | class DotDict(dict):
"""
a dictionary that supports dot notation
as well as dictionary access notation
usage: d = DotDict() or d = DotDict({'val1':'first'})
set attributes: d.val2 = 'second' or d['val2'] = 'second'
get attributes: d.val2 or d['val2']
"""
__getattr__ = dict.__getitem__
... |
e1552d787045eb863cabce79aa55fddd76eee54f | 400ed284b482a5aa0606a9527fe4d8cdac692956 | /scripts/hng03517.py | ab3ab7e08a9fd8046f8e62b94964b7d347d5a390 | [] | no_license | coding4rever/HNG-Task-2-Team-Falcon | 64159ddb166b3922b058108aa060aad85ff28fc6 | 68ce88ac421e23e6a145b63e6032d408f83ea92d | refs/heads/master | 2022-09-18T04:49:33.699388 | 2020-06-06T20:01:06 | 2020-06-06T20:01:06 | 269,091,713 | 1 | 0 | null | 2020-06-05T19:16:37 | 2020-06-03T13:11:47 | JavaScript | UTF-8 | Python | false | false | 315 | py | hng03517.py |
def printInfo(my_name, my_id, my_language,my_email_address):
print( "Hello World,","this is",my_name, "with HNGi7 ID", my_id, "using", my_language, "for stage 2 task", "email address is", my_email_address);
return;
printInfo('Olalekan Sarafa','HNG-03517', 'Python', 'sarafaolalekan7@gmail.com');
|
394c417356ebcd78d1beab6981ff05d8d6f3a7ab | 07635289dbd761bb82083ddff1ee6c10c97cceae | /TSF Task 1.py | 0a089b0d14ccb937295c17591040f386ca608b1a | [] | no_license | Satyam54/TSF-Task-1 | 6507f9a62c5e6983439f3042240335b0d2562458 | ee961bf87c897e3777619730d969bdcd6c24117b | refs/heads/main | 2023-03-24T04:43:13.999201 | 2021-03-08T11:25:55 | 2021-03-08T11:25:55 | 345,621,477 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,463 | py | TSF Task 1.py | #!/usr/bin/env python
# coding: utf-8
# # Python code for predicting Marks of a Student
# ## Made By : Satyam Choudhury
# ### Importing the Libraries
# In[36]:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
get_ipython().run_line_magic('matplotlib', 'inline')
# In[37]:
url="http://bit.... |
427d8c824a0b0c40a2974d1cf1c05d6fb2b5b985 | cdd7989c08d70da754d4f0dda143b054af836532 | /sx.py | 3e4368f66a63933967fa1d873ec78b93cb81f90a | [] | no_license | PhantasmicSky/FlaskPy2Py | 317b52cd5c0831da09be87723e5a53d5d8c3851d | 4782cb00061379372e3506d1f3e6cade143eefa2 | refs/heads/master | 2022-06-08T20:34:21.559687 | 2020-05-05T08:19:29 | 2020-05-05T08:19:29 | 261,398,583 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 615 | py | sx.py | from flask import Flask, render_template
from threading import Lock
from flask_socketio import SocketIO, emit
async_mode = None
app = Flask(__name__)
app.config['SECRET_KEY'] = 'secret!'
socketio = SocketIO(app, async_mode=async_mode)
thread = None
thread_lock = Lock()
@app.route("/")
def main():
r... |
c1b3fc972b3b7d283b0b338b8fc8e30ba9230a7f | 04ddba57bd3f435af7f78f32fcb6a3b3c677c309 | /demo/somose_robust.py | 1434089d949831d10b208bb0bedaa2eb673a259c | [
"MIT"
] | permissive | Inqbus/somose | 1a8a303f9430dee434480be4f7e7644cdfb18d8c | d7f664e4b0fc8048be756de707a272683dcd3b07 | refs/heads/main | 2023-08-08T23:39:35.925154 | 2023-07-30T21:07:13 | 2023-07-30T21:07:13 | 378,282,875 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,830 | py | somose_robust.py | """
A more robust control code. If the measurement raises an error the SoMoSe is restarted by doing a power cycle.
To achieve this functionality the Vcc of the SoMoSe has to be a GPIO and NOT the Vcc of the Microcontroller.
"""
from machine import Pin, I2C, Timer, RTC
from somose import SoMoSe
from wifi import WiFi
f... |
c7be221ac7502e0efdad210e314f322e0ebe0577 | dbb921932b0d3310885382c3b6e3886027be1bfc | /03_FeistelNetworks_Decomposition/utils.py | f1f409017bb660b79c8e7a5bff9a068c74a887f7 | [
"MIT"
] | permissive | hellman/thesis | 37fc5d5b9bb8735f1183b4f98e178887bf2f8d33 | 6ba1c2b241e63c07cf76108481c1b67f21a50f12 | refs/heads/master | 2020-05-16T06:14:08.529234 | 2020-04-01T09:25:32 | 2020-04-01T09:25:32 | 182,838,306 | 22 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,839 | py | utils.py | from cryptools.sagestuff import identity_matrix, GF, shuffle
# MATRIX 2x2
def mat2blocks(mat):
assert mat.nrows() == mat.ncols()
n = mat.nrows()/2
res = [[None, None], [None, None]]
for i in xrange(2):
for j in xrange(2):
res[i][j] = mat[i*n:i*n+n,j*n:j*n+n]
return res
def UL2(... |