๐
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Hi, I'm trying to generate "Hello world!", but my results stop improving strings reach roughly about 70% similarity. Here's what I've done: | |
| from difflib import SequenceMatcher | |
| from numpy import std | |
| from random import randint | |
| import random | |
| from pprint import pprint | |
| GENES = " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!." | |
| TARGET = "Hello World!" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from difflib import SequenceMatcher | |
| from jellyfish import levenshtein_distance, jaro_distance, damerau_levenshtein_distance | |
| from numpy import std, clip | |
| from random import randint | |
| import random | |
| from pprint import pprint | |
| GENES = " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!." | |
| TARGET = "Hello World!" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| from glob import glob | |
| from os import rename, listdir | |
| # Makes a .csv file with a row of file names per subdirectory | |
| # Appends "directoryName_" to each file | |
| # Get the script directory path | |
| path = os.path.dirname(os.path.realpath(__file__)) | |
| folderName = os.path.basename(path) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| listen 80; | |
| listen [::]:80 yupty.vladyv.me ipv6only=on; | |
| return 301 https://yupty.vladyv.me$request_uri; | |
| } | |
| server { | |
| # Enable HTTP/2 | |
| listen 443 ssl http2; | |
| listen [::]:443 ssl http2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>ACPI</key> | |
| <dict> | |
| <key>DSDT</key> | |
| <dict> | |
| <key>Debug</key> | |
| <false/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using System.Collections; | |
| public class rayCast : MonoBehaviour { | |
| public GameObject hoveredObject; | |
| public float selectRange = 50f; | |
| public float hitForce = 100f; | |
| public Camera fpCamera; | |
| public Material hoveredMaterial; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // See it in action: http://i.imgur.com/AvhOdss.gifv | |
| // Inspired by https://schier.co/blog/2014/12/08/wait-for-user-to-stop-typing-using-javascript.html | |
| import React from 'react'; | |
| export default class WaitUntilInputStopsThenDoSomething extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.doSomething = this.doSomething.bind(this); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| public class Inventory : MonoBehaviour { | |
| InventoryDatabase database; | |
| GameObject inventoryPanel; | |
| public GameObject inventoryItem; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Onsets look like this (the red parts in the photo): http://i.stack.imgur.com/vYa0v.jpg | |
| import sys | |
| from essentia import Pool, array | |
| from essentia.standard import * | |
| # In this example we are going to look at how to perform some onset detection | |
| # and mark them on the audio using the AudioOnsetsMarker algorithm. | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def doesStringContainLetter(letter, string): | |
| for char in string: | |
| if letter in char: | |
| print letter | |
| return letter | |
| else: | |
| print "Didn't find the letter you're looking for" |